/usr/lib/live/build/lb_config is in live-build 3.0~a57-1ubuntu25.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 | #!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
set -e
# Including common functions
( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
# Setting static variables
PROGRAM="lb config"
DESCRIPTION="$(Echo 'create configuration for live-build(7)')"
USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--apt-ftp-proxy URL]\n\
\t [--apt-http-proxy URL]\n\
\t [--apt-indices true|false|none]\n\
\t [--apt-options OPTION|\"OPTIONS\"]\n\
\t [--aptitude-options OPTION|\"OPTIONS\"]\n\
\t [--apt-pipeline DEPTH]\n\
\t [--apt-recommends true|false]\n\
\t [--apt-secure true|false]\n\
\t [--apt-source-archives true|false]\n\
\t [-a|--architectures ARCHITECTURE]\n\
\t [-b|--binary-images iso|iso-hybrid|netboot|tar|hdd]\n\
\t [--binary-filesystem fat16|fat32|ext2|ext3|ext4|ntfs]\n\
\t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\
\t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\
\t [--bootappend-failsafe PARAMETER|\"PARAMETERS\"]\n\
\t [--bootloader grub|syslinux|yaboot]\n\
\t [--bootstrap cdebootstrap|cdebootstrap-static|debootstrap|copy]\n\
\t [-f|--bootstrap-flavour minimal|standard]\n\
\t [--bootstrap-keyring PACKAGE]\n\
\t [--cache true|false]\n\
\t [--cache-indices true|false]\n\
\t [--cache-packages true|false]\n\
\t [--cache-stages STAGE|\"STAGES\"]\n\
\t [--checksums md5|sha1|sha256|none]\n\
\t [--compression bzip2|gzip|lzip|xz|none]\n\
\t [--config GIT_URL::GIT_BRANCH]\n\
\t [--zsync true|false]\n\
\t [--build-with-chroot true|false]\n\
\t [--chroot-filesystem ext2|ext3|ext4|squashfs|jffs2|none]\n\
\t [--clean\n\
\t [-c|--conffile FILE]\n\
\t [--debconf-frontend dialog|editor|noninteractive|readline]\n\
\t [--debconf-nowarnings true|false]\n\
\t [--debconf-priority low|medium|high|critical]\n\
\t [--debian-installer true|cdrom|netinst|netboot|businesscard|live|false]\n\
\t [--debian-installer-distribution daily|CODENAME]\n\
\t [--debian-installer-preseedfile FILE|URL]\n\
\t [--debian-installer-gui true|false]\n\
\t [--debug]\n\
\t [-d|--distribution CODENAME]\n\
\t [--ext-block-size 1024|2048|4096]\n\
\t [--ext-resize-blocks N]\n\
\t [--ext-fudge-factor PERCENTAGE]\n\
\t [--parent-distribution CODENAME]\n\
\t [--parent-debian-installer-distribution CODENAME]\n\
\t [--dump]\n\
\t [--fdisk fdisk|fdisk.dist]\n\
\t [--force]\n\
\t [--grub-splash FILE]\n\
\t [--gzip-options OPTION|\"OPTIONS\"]\n\
\t [--hooks FILE]\n\
\t [--ignore-system-defaults]\n\
\t [--initramfs auto|none|live-boot|casper]\n\
\t [--initramfs-compression bzip2|gzip|lzma]\n\
\t [--initsystem sysvinit|runit|systemd|upstart|none]\n\
\t [--interactive shell]\n\
\t [--isohybrid-options OPTION|\"OPTIONS\"]\n\
\t [--hdd-label LABEL]\n\
\t [--hdd-size MB]\n\
\t [--iso-application NAME]\n\
\t [--iso-preparer NAME]\n\
\t [--iso-publisher NAME]\n\
\t [--iso-volume NAME]\n\
\t [--jffs2-eraseblock SIZE]\n\
\t [--keyring-packages PACKAGE|\"PACKAGES\"]\n\
\t [-k|--linux-flavours FLAVOUR|\"FLAVOURS\"]\n\
\t [--linux-packages \"PACKAGES\"]\n\
\t [--losetup losetup|losetup.orig]\n\
\t [--memtest memtest86+|memtest86|none]\n\
\t [-m|--parent-mirror-bootstrap URL]\n\
\t [--parent-mirror-chroot URL]\n\
\t [--parent-mirror-chroot-security URL]\n\
\t [--parent-mirror-chroot-volatile URL]\n\
\t [--parent-mirror-chroot-backports URL]\n\
\t [--parent-mirror-binary URL]\n\
\t [--parent-mirror-binary-security URL]\n\
\t [--parent-mirror-binary-volatile URL]\n\
\t [--parent-mirror-binary-backports URL]\n\
\t [--parent-mirror-debian-installer URL]\n\
\t [--mirror-bootstrap URL]\n\
\t [--mirror-chroot URL]\n\
\t [--mirror-chroot-security URL]\n\
\t [--mirror-chroot-volatile URL]\n\
\t [--mirror-chroot-backports URL]\n\
\t [--mirror-binary URL]\n\
\t [--mirror-binary-security URL]\n\
\t [--mirror-binary-volatile URL]\n\
\t [--mirror-binary-backports URL]\n\
\t [--mirror-debian-installer URL]\n\
\t [--mode debian|emdebian|ubuntu|kubuntu]\n\
\t [--system live|normal]\n\
\t [--net-root-filesystem nfs|cfs]\n\
\t [--net-root-mountoptions OPTIONS]\n\
\t [--net-root-path PATH]\n\
\t [--net-root-server IP|HOSTNAME]\n\
\t [--net-cow-filesystem nfs|cfs]\n\
\t [--net-cow-mountoptions OPTIONS]\n\
\t [--net-cow-path PATH]\n\
\t [--net-cow-server IP|HOSTNAME]\n\
\t [--net-tarball true|false]\n\
\t [--quiet]\n\
\t [--root-command sudo]\n\
\t [--use-fakeroot true|false]\n\
\t [--archives ARCHIVE|\"ARCHIVES\"]\n\
\t [--archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\
\t [--parent-archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\
\t [--security true|false]\n\
\t [--source true|false]\n\
\t [-s|--source-images iso|netboot|tar|hdd]\n\
\t [--firmware-binary true|false]\n\
\t [--firmware-chroot true|false]\n\
\t [--swap-file-path PATH]\n\
\t [--swap-file-size MB]\n\
\t [--syslinux-theme THEME_SUFFIX]\n\
\t [--tasksel apt|aptitude|tasksel]\n\
\t [--templates PATH]\n\
\t [--volatile true|false]\n\
\t [--backports true|false]\n\
\t [--exposed-root true|false]\n\
\t [--verbose]\n\
\t [--win32-loader true|false]\n\
\t [--bootstrap-qemu-exclude PACKAGES]\n\
\t [--bootstrap-qemu-static PATH]\n\
\t [--bootstrap-qemu-arch ARCH]"
Local_arguments ()
{
LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitute-options:,
apt-pipeline:,apt-recommends:,apt-secure:,apt-source-archives:,bootstrap:,cache:,cache-indices:,cache-packages:,
cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,dump,
initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,root-command:,use-fakeroot:,tasksel:,
templates:,architectures:,bootstrap-flavour:,bootstrap-keyring:,clean,
distribution:,parent-distribution:,parent-debian-installer-distribution:,parent-mirror-bootstrap:,parent-mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-chroot-volatile:,parent-mirror-chroot-backports:,parent-mirror-binary:,
parent-mirror-binary-security:,parent-mirror-binary-volatile:,parent-mirror-binary-backports:,parent-mirror-debian-installer:,
mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-chroot-volatile:,mirror-chroot-backports:,mirror-binary:,
mirror-binary-security:,mirror-binary-volatile:,mirror-binary-backports:,mirror-debian-installer:,
archives:,archive-areas:,parent-archive-areas:,chroot-filesystem:,exposed-root:,
gzip-options:,hooks:,interactive:,keyring-packages:,linux-flavours:,linux-packages:,
security:,volatile:,backports:,binary-filesystem:,binary-images:,
apt-indices:,bootappend-install:,bootappend-live:,bootappend-failsafe:,bootloader:,checksums:,compression:,config:,zsync:,build-with-chroot:,
debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,iso-application:,iso-preparer:,iso-publisher:,
iso-volume:,jffs2-eraseblock:,ext-block-size:,ext-resize-blocks:,ext-fudge-factor:,memtest:,net-root-filesystem:,net-root-mountoptions:,
net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,
net-cow-server:,net-tarball:,firmware-binary:,firmware-chroot:,swap-file-path:,swap-file-size:,syslinux-theme:,
win32-loader:,source:,source-images:,breakpoints,conffile:,debug,force,
help,ignore-system-defaults,quiet,usage,verbose,version,bootstrap-qemu-static:,bootstrap-qemu-arch:,
bootstrap-qemu-exclude:"
# Remove spaces added by indentation
LONG_OPTIONS="$(echo ${LONG_OPTIONS} | tr -d ' ')"
ARGUMENTS="$(getopt --longoptions ${LONG_OPTIONS} --name="${PROGRAM}" --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
if [ "${?}" != "0" ]
then
Echo_error "terminating" >&2
exit 1
fi
eval set -- "${ARGUMENTS}"
while true
do
case "${1}" in
--dump)
# Dump version
if [ -x "$(which dpkg-query 2>/dev/null)" ]
then
VERSION_DPKG="$(dpkg-query -f='${Version}' --show live-build)"
fi
Echo "%s: This is live-build version %s" "${0}" "${VERSION_DPKG:-${VERSION}}"
# Dump conffile contents
Print_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
# Dump contents of directories that contain text files
for DIRECTORY in config/package-lists config/chroot_apt config/preseed config/binary_rootfs
do
if Find_files "${DIRECTORY}"
then
Echo_file "${DIRECTORY}"/*
fi
done
# Dump directory listings of all directories under config/
for DIRECTORY in $(find config/ -mindepth 1 -maxdepth 1 -type d)
do
if Find_files "${DIRECTORY}"
then
ls -lR "${DIRECTORY}" | while read LINE
do
echo "${DIRECTORY}: ${LINE}"
done
fi
done
exit 0
;;
--clean)
_CLEAN="true"
shift
;;
# config/common
--apt)
LB_APT="${2}"
shift 2
;;
--apt-ftp-proxy)
LB_APT_FTP_PROXY="${2}"
shift 2
;;
--apt-http-proxy)
LB_APT_HTTP_PROXY="${2}"
shift 2
;;
--apt-indices)
LB_APT_INDICES="${2}"
shift 2
;;
--apt-options)
APT_OPTIONS="${2}"
shift 2
;;
--aptitude-options)
LB_APTITUDE_OPTIONS="${2}"
shift 2
;;
--apt-pipeline)
LB_APT_PIPELINE="${2}"
shift 2
;;
--apt-recommends)
LB_APT_RECOMMENDS="${2}"
shift 2
;;
--apt-secure)
LB_APT_SECURE="${2}"
shift 2
;;
--apt-source-archives)
LB_APT_SOURCE_ARCHIVES="${2}"
shift 2
;;
--bootstrap)
LB_BOOTSTRAP="${2}"
shift 2
;;
--cache)
LB_CACHE="${2}"
shift 2
;;
--cache-indices)
LB_CACHE_INDICES="${2}"
shift 2
;;
--cache-packages)
LB_CACHE_PACKAGES="${2}"
shift 2
;;
--cache-stages)
LB_CACHE_STAGES="${2}"
shift 2
;;
--debconf-frontend)
LB_DEBCONF_FRONTEND="${2}"
shift 2
;;
--debconf-nowarnings)
LB_DEBCONF_NOWARNINGS="${2}"
shift 2
;;
--debconf-priority)
LB_DEBCONF_PRIORITY="${2}"
shift 2
;;
--initramfs)
LB_INITRAMFS="${2}"
shift 2
;;
--initramfs-compression)
LB_INITRAMFS_COMPRESSION="${2}"
shift 2
;;
--initsystem)
LB_INITSYSTEM="${2}"
shift 2
;;
--fdisk)
LB_FDISK="${2}"
shift 2
;;
--losetup)
LB_LOSETUP="${2}"
shift 2
;;
--mode)
LB_MODE="${2}"
shift 2
;;
--system)
LB_SYSTEM="${2}"
shift 2
;;
--root-command)
LB_ROOT_COMMAND="${2}"
shift 2
;;
--use-fakeroot)
LB_USE_FAKEROOT="${2}"
shift 2
;;
--tasksel)
LB_TASKSEL="${2}"
shift 2
;;
--templates)
LB_TEMPLATES="${2}"
shift 2
;;
# config/bootstrap
-a|--architectures)
LB_ARCHITECTURES="${2}"
shift 2
;;
-f|--bootstrap-flavour)
LB_BOOTSTRAP_FLAVOUR="${2}"
shift 2
;;
--bootstrap-keyring)
LB_BOOTSTRAP_KEYRING="${2}"
shift 2
;;
-d|--distribution)
LB_DISTRIBUTION="${2}"
shift 2
;;
--parent-distribution)
LB_PARENT_DISTRIBUTION="${2}"
shift 2
;;
-m|--parent-mirror-bootstrap)
LB_PARENT_MIRROR_BOOTSTRAP="${2}"
shift 2
;;
--parent-mirror-chroot)
LB_PARENT_MIRROR_CHROOT="${2}"
shift 2
;;
--parent-mirror-chroot-security)
LB_PARENT_MIRROR_CHROOT_SECURITY="${2}"
shift 2
;;
--parent-mirror-chroot-volatile)
LB_PARENT_MIRROR_CHROOT_VOLATILE="${2}"
shift 2
;;
--parent-mirror-chroot-backports)
LB_PARENT_MIRROR_CHROOT_BACKPORTS="${2}"
shift 2
;;
--parent-mirror-binary)
LB_PARENT_MIRROR_BINARY="${2}"
shift 2
;;
--parent-mirror-binary-security)
LB_PARENT_MIRROR_BINARY_SECURITY="${2}"
shift 2
;;
--parent-mirror-binary-volatile)
LB_PARENT_MIRROR_BINARY_VOLATILE="${2}"
shift 2
;;
--parent-mirror-binary-backports)
LB_PARENT_MIRROR_BINARY_BACKPORTS="${2}"
shift 2
;;
--parent-mirror-debian-installer)
LB_PARENT_MIRROR_DEBIAN_INSTALLER="${2}"
shift 2
;;
--mirror-bootstrap)
LB_MIRROR_BOOTSTRAP="${2}"
shift 2
;;
--mirror-chroot)
LB_MIRROR_CHROOT="${2}"
shift 2
;;
--mirror-chroot-security)
LB_MIRROR_CHROOT_SECURITY="${2}"
shift 2
;;
--mirror-chroot-volatile)
LB_MIRROR_CHROOT_VOLATILE="${2}"
shift 2
;;
--mirror-chroot-backports)
LB_MIRROR_CHROOT_BACKPORTS="${2}"
shift 2
;;
--mirror-binary)
LB_MIRROR_BINARY="${2}"
shift 2
;;
--mirror-binary-security)
LB_MIRROR_BINARY_SECURITY="${2}"
shift 2
;;
--mirror-binary-volatile)
LB_MIRROR_BINARY_VOLATILE="${2}"
shift 2
;;
--mirror-binary-backports)
LB_MIRROR_BINARY_BACKPORTS="${2}"
shift 2
;;
--mirror-debian-installer)
LB_MIRROR_DEBIAN_INSTALLER="${2}"
shift 2
;;
--archives)
LB_ARCHIVES="${2}"
shift 2
;;
--archive-areas)
LB_ARCHIVE_AREAS="${2}"
shift 2
;;
--parent-archive-areas)
LB_PARENT_ARCHIVE_AREAS="${2}"
shift 2
;;
# config/chroot
--chroot-filesystem)
LB_CHROOT_FILESYSTEM="${2}"
shift 2
;;
--exposed-root)
LB_EXPOSED_ROOT="${2}"
shift 2
;;
--gzip-options)
GZIP_OPTIONS="${2}"
shift 2
;;
--hooks)
LB_HOOKS="${2}"
shift 2
;;
--interactive)
LB_INTERACTIVE="${2}"
shift 2
;;
--keyring-packages)
LB_KEYRING_PACKAGES="${2}"
shift 2
;;
-k|--linux-flavours)
LB_LINUX_FLAVOURS="${2}"
shift 2
;;
--linux-packages)
LB_LINUX_PACKAGES="${2}"
shift 2
;;
--security)
LB_SECURITY="${2}"
shift 2
;;
--volatile)
LB_VOLATILE="${2}"
shift 2
;;
--backports)
LB_BACKPORTS="${2}"
shift 2
;;
# config/binary
--binary-filesystem)
LB_BINARY_FILESYSTEM="${2}"
shift 2
;;
-b|--binary-images)
LB_BINARY_IMAGES="${2}"
shift 2
;;
--bootappend-live)
LB_BOOTAPPEND_LIVE="${2}"
shift 2
;;
--bootappend-install)
LB_BOOTAPPEND_INSTALL="${2}"
shift 2
;;
--bootappend-failsafe)
LB_BOOTAPPEND_FAILSAFE="${2}"
shift 2
;;
--bootloader)
LB_BOOTLOADER="${2}"
shift 2
;;
--checksums)
LB_CHECKSUMS="${2}"
shift 2
;;
--compression)
LB_COMPRESSION="${2}"
shift 2
;;
--config)
_CONFIG="${2}"
shift 2
;;
--zsync)
LB_ZSYNC="${2}"
shift 2
;;
--build-with-chroot)
LB_BUILD_WITH_CHROOT="${2}"
shift 2
;;
--debian-installer)
LB_DEBIAN_INSTALLER="${2}"
shift 2
;;
--debian-installer-distribution)
LB_DEBIAN_INSTALLER_DISTRIBUTION="${2}"
shift 2
;;
--parent-debian-installer-distribution)
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${2}"
shift 2
;;
--debian-installer-preseedfile)
LB_DEBIAN_INSTALLER_PRESEEDFILE="${2}"
shift 2
;;
--debian-installer-gui)
LB_DEBIAN_INSTALLER_GUI="${2}"
shift 2
;;
--grub-splash)
LB_GRUB_SPLASH="${2}"
shift 2
;;
--isohybrid-options)
LB_ISOHYBRID_OPTIONS="${2}"
shift 2
;;
--hdd-label)
LB_HDD_LABEL="${2}"
shift 2
;;
--hdd-size)
LB_HDD_SIZE="${2}"
shift 2
;;
--iso-application)
LB_ISO_APPLICATION="${2}"
shift 2
;;
--iso-preparer)
LB_ISO_PREPARER="${2}"
shift 2
;;
--iso-publisher)
LB_ISO_PUBLISHER="${2}"
shift 2
;;
--iso-volume)
LB_ISO_VOLUME="${2}"
shift 2
;;
--ext-block-size)
LB_EXT_BLOCKSIZE="${2}"
shift 2
;;
--ext-resize-blocks)
LB_EXT_RESIZEBLOCKS="${2}"
shift 2
;;
--ext-fudge-factor)
LB_EXT_FUDGEFACTOR="${2}"
shift 2
;;
--jffs2-eraseblock)
LB_JFFS2_ERASEBLOCK="${2}"
shift 2
;;
--memtest)
LB_MEMTEST="${2}"
shift 2
;;
--net-root-filesystem)
LB_NET_ROOT_FILESYSTEM="${2}"
shift 2
;;
--net-root-mountoptions)
LB_NET_ROOT_MOUNTOPTIONS="${2}"
shift 2
;;
--net-root-path)
LB_NET_ROOT_PATH="${2}"
shift 2
;;
--net-root-server)
LB_NET_ROOT_SERVER="${2}"
shift 2
;;
--net-cow-filesystem)
LB_NET_COW_FILESYSTEM="${2}"
shift 2
;;
--net-cow-mountoptions)
LB_NET_COW_MOUNTOPTIONS="${2}"
shift 2
;;
--net-cow-path)
LB_NET_COW_PATH="${2}"
shift 2
;;
--net-cow-server)
LB_NET_COW_SERVER="${2}"
shift 2
;;
--net-tarball)
LB_NET_TARBALL="${2}"
shift 2
;;
--firmware-binary)
LB_FIRMWARE_BINARY="${2}"
shift 2
;;
--firmware-chroot)
LB_FIRMWARE_CHROOT="${2}"
shift 2
;;
--swap-file-path)
LB_SWAP_FILE_PATH="${2}"
shift 2
;;
--swap-file-size)
LB_SWAP_FILE_SIZE="${2}"
shift 2
;;
--syslinux-theme)
LB_SYSLINUX_THEME="${2}"
shift 2
;;
--win32-loader)
LB_WIN32_LOADER="${2}"
shift 2
;;
--bootstrap-qemu-arch)
LB_BOOTSTRAP_QEMU_ARCHITECTURES="${2}"
shift 2
;;
--bootstrap-qemu-exclude)
LB_BOOTSTRAP_QEMU_EXCLUDE="${2}"
shift 2
;;
--bootstrap-qemu-static)
LB_BOOTSTRAP_QEMU_STATIC="${2}"
shift 2
;;
# config/source
--source)
LB_SOURCE="${2}"
shift 2
;;
-s|--source-images)
LB_SOURCE_IMAGES="${2}"
shift 2
;;
# other
--breakpoints)
_BREAKPOINTS="true"
shift
;;
-c|--conffile)
_CONFFILE="${2}"
shift 2
;;
--color)
_COLOR="true"
shift
;;
--debug)
_DEBUG="true"
shift
;;
--force)
_FORCE="true"
shift
;;
-h|--help)
Help
shift
;;
--ignore-system-defaults)
shift
;;
--quiet)
_QUIET="true"
shift
;;
-u|--usage)
Usage
shift
;;
--verbose)
_VERBOSE="true"
shift
;;
-v|--version)
echo "${VERSION}"
exit 0
;;
--)
shift
break
;;
*)
Echo_error "internal error %s" "${0}"
exit 1
;;
esac
done
}
Local_arguments "${@}"
if [ -e .git ] && [ -n "${_CONFIG}" ]
then
if [ "${1}" != "noauto" ]
then
Echo_message "Ignoring --config ${_CONFIG}: ${PWD} is already a git repository"
fi
_CONFIG=""
fi
if [ -n "${_CONFIG}" ]
then
_GIT_REPOSITORY="$(echo ${_CONFIG} | sed -e 's|::.*$||')"
Echo_message "Cloning ${_GIT_REPOSITORY}"
git clone ${_GIT_REPOSITORY} ./
if [ "${_GIT_REPOSITORY}" != "${_CONFIG}" ]
then
_GIT_BRANCH="$(echo ${_CONFIG} | awk -F\:\: '{ print $NF }')"
Echo_message "Checking out ${_GIT_BRANCH}"
git checkout ${_GIT_BRANCH}
fi
if [ -e auto/config ]
then
_EXTRA_OPTIONS="$(echo ${@} | sed -e "s|--config ${_GIT_REPOSITORY}::${_GIT_BRANCH}||g" -e "s|--config ${_GIT_REPOSITORY}||g")"
Echo_message "The following extra options specified to lb config are going to be added to auto/config: ${_EXTRA_OPTIONS}"
sed -i -e "s|\"\${@}\"|${_EXTRA_OPTIONS} \"\${@}\"|" auto/config
fi
fi
# Read meta config
if [ "${1}" != "noauto" ] && [ -x auto/config ]
then
Echo_message "Executing auto/config script."
./auto/config "${@}"
exit ${?}
fi
if [ "${1}" = "noauto" ]
then
shift
fi
# Reading system configuration
if ! In_list "--ignore-system-defaults" "${@}"
then
Echo_message "Considering defaults defined in %s" "/etc/live/build.conf"
Read_conffiles /etc/live/build.conf /etc/live/build.d/*
fi
# Reading existing configuration
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Local_arguments "${@}"
if [ -n "${_CONFFILE}" ]
then
Read_conffiles "${_CONFFILE}"
fi
# Setting defaults
Set_defaults
# Checking defaults
Check_defaults
if [ ! -e config ]
then
Echo_message "Creating config tree for a ${LB_MODE}/${LB_ARCHITECTURES} system"
else
Echo_message "Updating config tree for a ${LB_MODE}/${LB_ARCHITECTURES} system"
fi
# Creating bootstrap configuration
mkdir -p config
mkdir -p config/includes
mkdir -p config/templates
# Creating live-build configuration
cat > config/common << EOF
# config/common - common options for live-build(7)
# LB_CONFIG_VERSION: internal version of the configuration file format
LB_CONFIG_VERSION="${CONFIG_VERSION}"
# \$LB_APT: set package manager
# (Default: ${LB_APT})
LB_APT="${LB_APT}"
# \$LB_APT_FTP_PROXY: set apt/aptitude ftp proxy
# (Default: autodetected or empty)
LB_APT_FTP_PROXY="${LB_APT_FTP_PROXY}"
# \$LB_APT_HTTP_PROXY: set apt/aptitude http proxy
# (Default: autodetected or empty)
LB_APT_HTTP_PROXY="${LB_APT_HTTP_PROXY}"
# \$LB_APT_PIPELINE: set apt/aptitude pipeline depth
# (Default: ${LB_APT_PIPELINE})
LB_APT_PIPELINE="${LB_APT_PIPELINE}"
# \$LB_APT_RECOMMENDS: set apt/aptitude recommends
# (Default: ${LB_APT_RECOMMENDS})
LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS}"
# \$LB_APT_SECURE: set apt/aptitude security
# (Default: ${LB_APT_SECURE})
LB_APT_SECURE="${LB_APT_SECURE}"
# \$LB_APT_SOURCE_ARCHIVES: set apt/aptitude source entries in sources.list
# (Default: ${LB_APT_SOURCE_ARCHIVES})
LB_APT_SOURCE_ARCHIVES="${LB_APT_SOURCE_ARCHIVES}"
# \$LB_BOOTSTRAP: set bootstrap program
# (Default: ${LB_BOOTSTRAP})
LB_BOOTSTRAP="${LB_BOOTSTRAP}"
# \$LB_CACHE: control cache
# (Default: ${LB_CACHE})
LB_CACHE="${LB_CACHE}"
# \$LB_CACHE_INDICES: control if downloaded package indices should be cached
# (Default: ${LB_CACHE_INDICES})
LB_CACHE_INDICES="${LB_CACHE_INDICES}"
# \$LB_CACHE_PACKAGES: control if downloaded packages files should be cached
# (Default: ${LB_CACHE_PACKAGES})
LB_CACHE_PACKAGES="${LB_CACHE_PACKAGES}"
# \$LB_CACHE_STAGES: control if completed stages should be cached
# (Default: ${LB_CACHE_STAGES})
LB_CACHE_STAGES="${LB_CACHE_STAGES}"
# \$LB_DEBCONF_FRONTEND: set debconf(1) frontend to use
# (Default: ${LB_DEBCONF_FRONTEND})
LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND}"
# \$LB_DEBCONF_NOWARNINGS: set debconf(1) warnings
# (Default: ${LB_DEBCONF_NOWARNINGS})
LB_DEBCONF_NOWARNINGS="${LB_DEBCONF_NOWARNINGS}"
# \$LB_DEBCONF_PRIORITY: set debconf(1) priority to use
# (Default: ${LB_DEBCONF_PRIORITY})
LB_DEBCONF_PRIORITY="${LB_DEBCONF_PRIORITY}"
# \$LB_INITRAMFS: set initramfs hook
# (Default: ${LB_INITRAMFS})
LB_INITRAMFS="${LB_INITRAMFS}"
# \$LB_INITRAMFS_COMPRESSION: set initramfs compression
# (Default: ${LB_INITRAMFS_COMPRESSION})
LB_INITRAMFS_COMPRESSION="${LB_INITRAMFS_COMPRESSION}"
# \$LB_INITSYSTEM: set init system
# (Default: ${LB_INITSYSTEM})
LB_INITSYSTEM="${LB_INITSYSTEM}"
# \$LB_FDISK: set fdisk program
# (Default: autodetected)
LB_FDISK="${LB_FDISK}"
# \$LB_LOSETUP: set losetup program
# (Default: autodetected)
LB_LOSETUP="${LB_LOSETUP}"
# \$LB_MODE: set distribution mode
# (Default: ${LB_MODE})
LB_MODE="${LB_MODE}"
# \$LB_SYSTEM: set system type
# (Default: ${LB_SYSTEM})
LB_SYSTEM="${LB_SYSTEM}"
# \$LB_ROOT_COMMAND: use sudo or equivalent
# (Default: empty)
#LB_ROOT_COMMAND="sudo"
# \$LB_USE_FAKEROOT: use fakeroot/fakechroot
# (Default: ${LB_USE_FAKEROOT})
LB_USE_FAKEROOT="${LB_USE_FAKEROOT}"
# \$LB_TASKSEL: set tasksel program
# (Default: ${LB_TASKSEL})
LB_TASKSEL="${LB_TASKSEL}"
# \$LB_TEMPLATES: set templates
# (Default: ${LB_TEMPLATES})
LB_TEMPLATES="${LB_TEMPLATES}"
# live-build options
# \$_BREAKPOINTS: enable breakpoints
# (Default: ${_BREAKPOINTS})
#_BREAKPOINTS="${_BREAKPOINTS}"
# \$_DEBUG: enable debug
# (Default: ${_DEBUG})
#_DEBUG="${_DEBUG}"
# \$_COLOR: enable color
# (Default: ${_COLOR})
#_COLOR="${_COLOR}"
# \$_FORCE: enable force
# (Default: ${_FORCE})
#_FORCE="${_FORCE}"
# \$_QUIET: enable quiet
# (Default: ${_QUIET})
_QUIET="${_QUIET}"
# \$_VERBOSE: enable verbose
# (Default: ${_VERBOSE})
#_VERBOSE="${_VERBOSE}"
# Internal stuff (FIXME)
APT_OPTIONS="${APT_OPTIONS}"
APTITUDE_OPTIONS="${APTITUDE_OPTIONS}"
GZIP_OPTIONS="${GZIP_OPTIONS}"
ISOHYBRID_OPTIONS="${ISOHYBRID_OPTIONS}"
EOF
# Creating lb_bootstrap_* configuration
cat > config/bootstrap << EOF
# config/bootstrap - options for live-build(7), bootstrap stage
# \$LB_ARCHITECTURES: select chroot architectures
# (Default: autodetected)
LB_ARCHITECTURES="${LB_ARCHITECTURES}"
# \$LB_BOOTSTRAP_INCLUDE: include packages on base
# (Default: empty)
LB_BOOTSTRAP_INCLUDE="${LB_BOOTSTRAP_INCLUDE}"
# \$LB_BOOTSTRAP_EXCLUDE: exclude packages on base
# (Default: empty)
LB_BOOTSTRAP_EXCLUDE="${LB_BOOTSTRAP_EXCLUDE}"
# \$LB_BOOTSTRAP_FLAVOUR: select flavour to use
# (Default: empty)
LB_BOOTSTRAP_FLAVOUR="${LB_BOOTSTRAP_FLAVOUR}"
# \$LB_BOOTSTRAP_KEYRING: set distribution keyring
# (Default: empty)
LB_BOOTSTRAP_KEYRING="${LB_BOOTSTRAP_KEYRING}"
# \$LB_DISTRIBUTION: select distribution to use
# (Default: ${LB_DISTRIBUTION})
LB_DISTRIBUTION="${LB_DISTRIBUTION}"
# \$LB_PARENT_DISTRIBUTION: select parent distribution to use
# (Default: ${LB_PARENT_DISTRIBUTION})
LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION}"
# \$LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION: select parent distribution for debian-installer to use
# (Default: ${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION})
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"
# \$LB_PARENT_MIRROR_BOOTSTRAP: set parent mirror to bootstrap from
# (Default: ${LB_PARENT_MIRROR_BOOTSTRAP})
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP}"
# \$LB_PARENT_MIRROR_CHROOT: set parent mirror to fetch packages from
# (Default: ${LB_PARENT_MIRROR_CHROOT})
LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIRROR_CHROOT}"
# \$LB_PARENT_MIRROR_CHROOT_SECURITY: set security parent mirror to fetch packages from
# (Default: ${LB_PARENT_MIRROR_CHROOT_SECURITY})
LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY}"
# \$LB_PARENT_MIRROR_CHROOT_VOLATILE: set volatile parent mirror to fetch packages from
# (Default: ${LB_PARENT_MIRROR_CHROOT_VOLATILE})
LB_PARENT_MIRROR_CHROOT_VOLATILE="${LB_PARENT_MIRROR_CHROOT_VOLATILE}"
# \$LB_PARENT_MIRROR_CHROOT_BACKPORTS: set backports parent mirror to fetch packages from
# (Default: ${LB_PARENT_MIRROR_CHROOT_BACKPORTS})
LB_PARENT_MIRROR_CHROOT_BACKPORTS="${LB_PARENT_MIRROR_CHROOT_BACKPORTS}"
# \$LB_PARENT_MIRROR_BINARY: set parent mirror which ends up in the image
# (Default: ${LB_PARENT_MIRROR_BINARY})
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY}"
# \$LB_PARENT_MIRROR_BINARY_SECURITY: set security parent mirror which ends up in the image
# (Default: ${LB_PARENT_MIRROR_BINARY_SECURITY})
LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY}"
# \$LB_PARENT_MIRROR_BINARY_VOLATILE: set volatile parent mirror which ends up in the image
# (Default: ${LB_PARENT_MIRROR_BINARY_VOLATILE})
LB_PARENT_MIRROR_BINARY_VOLATILE="${LB_PARENT_MIRROR_BINARY_VOLATILE}"
# \$LB_PARENT_MIRROR_BINARY_BACKPORTS: set backports parent mirror which ends up in the image
# (Default: ${LB_PARENT_MIRROR_BINARY_BACKPORTS})
LB_PARENT_MIRROR_BINARY_BACKPORTS="${LB_PARENT_MIRROR_BINARY_BACKPORTS}"
# \$LB_PARENT_MIRROR_DEBIAN_INSTALLER: set debian-installer parent mirror
# (Default: ${LB_PARENT_MIRROR_BOOTSTRAP})
LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER}"
# \$LB_MIRROR_BOOTSTRAP: set mirror to bootstrap from
# (Default: ${LB_MIRROR_BOOTSTRAP})
LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP}"
# \$LB_MIRROR_CHROOT: set mirror to fetch packages from
# (Default: ${LB_MIRROR_CHROOT})
LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT}"
# \$LB_MIRROR_CHROOT_SECURITY: set security mirror to fetch packages from
# (Default: ${LB_MIRROR_CHROOT_SECURITY})
LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY}"
# \$LB_MIRROR_CHROOT_VOLATILE: set volatile mirror to fetch packages from
# (Default: ${LB_MIRROR_CHROOT_VOLATILE})
LB_MIRROR_CHROOT_VOLATILE="${LB_MIRROR_CHROOT_VOLATILE}"
# \$LB_MIRROR_CHROOT_BACKPORTS: set backports mirror to fetch packages from
# (Default: ${LB_MIRROR_CHROOT_BACKPORTS})
LB_MIRROR_CHROOT_BACKPORTS="${LB_MIRROR_CHROOT_BACKPORTS}"
# \$LB_MIRROR_BINARY: set mirror which ends up in the image
# (Default: ${LB_MIRROR_BINARY})
LB_MIRROR_BINARY="${LB_MIRROR_BINARY}"
# \$LB_MIRROR_BINARY_SECURITY: set security mirror which ends up in the image
# (Default: ${LB_MIRROR_BINARY_SECURITY})
LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY}"
# \$LB_MIRROR_BINARY_VOLATILE: set volatile mirror which ends up in the image
# (Default: ${LB_MIRROR_BINARY_VOLATILE})
LB_MIRROR_BINARY_VOLATILE="${LB_MIRROR_BINARY_VOLATILE}"
# \$LB_MIRROR_BINARY_BACKPORTS: set backports mirror which ends up in the image
# (Default: ${LB_MIRROR_BINARY_BACKPORTS})
LB_MIRROR_BINARY_BACKPORTS="${LB_MIRROR_BINARY_BACKPORTS}"
# \$LB_MIRROR_DEBIAN_INSTALLER: set debian-installer mirror
# (Default: ${LB_MIRROR_BOOTSTRAP})
LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER}"
# \$LB_ARCHIVES: enable available third-party archives
# (Default: empty)
LB_ARCHIVES="${LB_ARCHIVES}"
# \$LB_ARCHIVE_AREAS: select archive areas to use
# (Default: ${LB_ARCHIVE_AREAS})
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS}"
# \$LB_PARENT_ARCHIVE_AREAS: select archive areas to use
# (Default: ${LB_PARENT_ARCHIVE_AREAS})
LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS}"
# \$LB_BOOTSTRAP_QEMU_ARCHITECTURES: architectures to use foreign bootstrap
# (Default: ${LB_BOOTSTRAP_QEMU_ARCHITECTURES})
LB_BOOTSTRAP_QEMU_ARCHITECTURES="${LB_BOOTSTRAP_QEMU_ARCHITECTURES}"
# \$LB_BOOTSTRAP_QEMU_EXCLUDE: packages to exclude during foreign bootstrap
# (Default: ${LB_BOOTSTRAP_QEMU_EXCLUDE})
LB_BOOTSTRAP_QEMU_EXCLUDE="${LB_BOOTSTRAP_QEMU_EXCLUDE}"
# \$LB_BOOTSTRAP_QEMU_STATIC: static qemu binary for foreign bootstrap
# (Default: ${LB_BOOTSTRAP_QEMU_STATIC})
LB_BOOTSTRAP_QEMU_STATIC="${LB_BOOTSTRAP_QEMU_STATIC}"
EOF
# Creating lb_chroot_* configuration
mkdir -p config/archives
mkdir -p config/chroot_apt
mkdir -p config/hooks
mkdir -p config/includes.chroot
mkdir -p config/packages
mkdir -p config/packages.chroot
mkdir -p config/package-lists
mkdir -p config/preseed
cat > config/chroot << EOF
# config/chroot - options for live-build(7), chroot stage
# \$LB_CHROOT_FILESYSTEM: set chroot filesystem
# (Default: ${LB_CHROOT_FILESYSTEM})
LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}"
# \$LB_UNION_FILESYSTEM: set union filesystem
# (Default: ${LB_UNION_FILESYSTEM})
LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM}"
# \$LB_EXPOSED_ROOT: expose root as read only
# (Default: ${LB_EXPOSED_ROOT})
LB_EXPOSED_ROOT="${LB_EXPOSED_ROOT}"
# \$LB_HOOKS: set hook commands
# (Default: empty)
LB_HOOKS="${LB_HOOKS}"
# \$LB_INTERACTIVE: set interactive build
# (Default: ${LB_INTERACTIVE})
LB_INTERACTIVE="${LB_INTERACTIVE}"
# \$LB_KEYRING_PACKAGES: set keyring packages
# (Default: empty)
LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES}"
# \$LB_LINUX_FLAVOURS: set kernel flavour to use
# (Default: autodetected)
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS}"
# \$LB_LINUX_PACKAGES: set kernel packages to use
# (Default: autodetected)
LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES}"
# \$LB_SECURITY: enable security updates
# (Default: ${LB_SECURITY})
LB_SECURITY="${LB_SECURITY}"
# \$LB_VOLATILE: enable volatile updates
# (Default: ${LB_VOLATILE})
LB_VOLATILE="${LB_VOLATILE}"
# \$LB_BACKPORTS: enable backports updates
# (Default: ${LB_BACKPORTS})
LB_BACKPORTS="${LB_BACKPORTS}"
EOF
# Creating lb_binary_* configuration
mkdir -p config/binary_debian-installer
mkdir -p config/binary_grub
mkdir -p config/includes.binary
mkdir -p config/includes.binary_debian-installer
mkdir -p config/packages.binary
mkdir -p config/package-lists
mkdir -p config/binary_rootfs
mkdir -p config/binary_syslinux
cat > config/binary << EOF
# config/binary - options for live-build(7), binary stage
# \$LB_BINARY_FILESYSTEM: set image filesystem
# (Default: ${LB_BINARY_FILESYSTEM})
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM}"
# \$LB_BINARY_IMAGES: set image type
# (Default: ${LB_BINARY_IMAGES})
LB_BINARY_IMAGES="${LB_BINARY_IMAGES}"
# \$LB_APT_INDICES: set apt/aptitude generic indices
# (Default: ${LB_APT_INDICES})
LB_APT_INDICES="${LB_APT_INDICES}"
# \$LB_BOOTAPPEND_LIVE: set boot parameters
# (Default: empty)
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE}"
# \$LB_BOOTAPPEND_INSTALL: set boot parameters
# (Default: empty)
LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL}"
# \$LB_BOOTAPPEND_FAILSAFE: set boot parameters
# (Default: empty)
LB_BOOTAPPEND_FAILSAFE="${LB_BOOTAPPEND_FAILSAFE}"
# \$LB_BOOTLOADER: set bootloader
# (Default: ${LB_BOOTLOADER})
LB_BOOTLOADER="${LB_BOOTLOADER}"
# \$LB_CHECKSUMS: set checksums
# (Default: ${LB_CHECKSUMS})
LB_CHECKSUMS="${LB_CHECKSUMS}"
# \$LB_COMPRESSION: set compression
# (Default: ${LB_COMPRESSION})
LB_COMPRESSION="${LB_COMPRESSION}"
# \$LB_ZSYNC: set zsync
# (Default: ${LB_ZSYNC})
LB_ZSYNC="${LB_ZSYNC}"
# \${LB_BUILD_WITH_CHROOT: control if we build binary images chrooted
# (Default: ${LB_BUILD_WITH_CHROOT})
# DO NEVER, *NEVER*, *N*E*V*E*R* SET THIS OPTION to false.
LB_BUILD_WITH_CHROOT="${LB_BUILD_WITH_CHROOT}"
# \$LB_DEBIAN_INSTALLER: set debian-installer
# (Default: ${LB_DEBIAN_INSTALLER})
LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER}"
# \$LB_DEBIAN_INSTALLER_DISTRIBUTION: set debian-installer suite
# (Default: empty)
LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION}"
# \$LB_DEBIAN_INSTALLER_PRESEEDFILE: set debian-installer preseed filename/url
# (Default: ${LB_DEBIAN_INSTALLER_PRESEEDFILE})
LB_DEBIAN_INSTALLER_PRESEEDFILE="${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
# \$LB_DEBIAN_INSTALLER_GUI: toggle use of GUI debian-installer
# (Default: ${LB_DEBIAN_INSTALLER_GUI})
LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI}"
# \$LB_GRUB_SPLASH: set custom grub splash
# (Default: empty)
LB_GRUB_SPLASH="${LB_GRUB_SPLASH}"
# \$LB_HDD_LABEL: set hdd label
# (Default: ${LB_HDD_LABEL})
LB_HDD_LABEL="${LB_HDD_LABEL}"
# \$LB_HDD_SIZE: set hdd filesystem size
# (Default: ${LB_HDD_SIZE})
LB_HDD_SIZE="${LB_HDD_SIZE}"
# \$LB_ISO_APPLICATION: set iso author
# (Default: ${LB_ISO_APPLICATION})
LB_ISO_APPLICATION="${LB_ISO_APPLICATION}"
# \$LB_ISO_PREPARER: set iso preparer
# (Default: ${LB_ISO_PREPARER})
LB_ISO_PREPARER="${LB_ISO_PREPARER}"
# \$LB_ISO_PUBLISHER: set iso publisher
# (Default: ${LB_ISO_PUBLISHER})
LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER}"
# \$LB_ISO_VOLUME: set iso volume (max 32 chars)
# (Default: ${LB_ISO_VOLUME})
LB_ISO_VOLUME="${LB_ISO_VOLUME}"
# \$LB_EXT_BLOCKSIZE: set EXT block size
# (Default: unset)
LB_EXT_BLOCKSIZE="${LB_EXT_BLOCKSIZE}"
# \$LB_EXT_RESIZEBLOCKS: set EXT resize parameter
# (Default: unset)
LB_EXT_RESIZEBLOCKS="${LB_EXT_RESIZEBLOCKS}"
# \$LB_EXT_FUDGEFACTOR: set extra size of EXT images (in %)
# (Default: unset)
LB_EXT_FUDGEFACTOR="${LB_EXT_FUDGEFACTOR}"
# \$LB_JFFS2_ERASEBLOCK: set jffs2 eraseblock size
# (Default: unset)
LB_JFFS2_ERASEBLOCK=""
# \$LB_MEMTEST: set memtest
# (Default: ${LB_MEMTEST})
LB_MEMTEST="${LB_MEMTEST}"
# \$LB_WIN32_LOADER: set win32-loader
# (Default: ${LB_WIN32_LOADER})
LB_WIN32_LOADER="${LB_WIN32_LOADER}"
# \$LB_NET_ROOT_FILESYSTEM: set netboot filesystem
# (Default: ${LB_NET_ROOT_FILESYSTEM})
LB_NET_ROOT_FILESYSTEM="${LB_NET_ROOT_FILESYSTEM}"
# \$LB_NET_ROOT_MOUNTOPTIONS: set nfsopts
# (Default: empty)
LB_NET_ROOT_MOUNTOPTIONS="${LB_NET_ROOT_MOUNTOPTIONS}"
# \$LB_NET_ROOT_PATH: set netboot server directory
# (Default: ${LB_NET_ROOT_PATH})
LB_NET_ROOT_PATH="${LB_NET_ROOT_PATH}"
# \$LB_NET_ROOT_SERVER: set netboot server address
# (Default: ${LB_NET_ROOT_SERVER})
LB_NET_ROOT_SERVER="${LB_NET_ROOT_SERVER}"
# \$LB_NET_COW_FILESYSTEM: set net client cow filesystem
# (Default: ${LB_NET_COW_FILESYSTEM})
LB_NET_COW_FILESYSTEM="${LB_NET_COW_FILESYSTEM}"
# \$LB_NET_COW_MOUNTOPTIONS: set cow mount options
# (Default: empty)
LB_NET_COW_MOUNTOPTIONS="${LB_NET_COW_MOUNTOPTIONS}"
# \$LB_NET_COW_PATH: set cow directory
# (Default: ${LB_NET_COW_PATH})
LB_NET_COW_PATH="${LB_NET_COW_PATH}"
# \$LB_NET_COW_SERVER: set cow server
# (Default: ${LB_NET_COW_SERVER})
LB_NET_COW_SERVER="${LB_NET_COW_SERVER}"
# \$LB_NET_TARBALL: set net tarball
# (Default: ${LB_NET_TARBALL})
LB_NET_TARBALL="${LB_NET_TARBALL}"
# \$LB_FIRMWARE_BINARY: include firmware packages in debian-installer
# (Default: ${LB_FIRMWARE_BINARY})
LB_FIRMWARE_BINARY="${LB_FIRMWARE_BINARY}"
# \$LB_FIRMWARE_CHROOT: include firmware packages in debian-installer
# (Default: ${LB_FIRMWARE_CHROOT})
LB_FIRMWARE_CHROOT="${LB_FIRMWARE_CHROOT}"
# \$LB_SWAP_FILE_PATH: set swap file path
# (Default: ${LB_SWAP_FILE_PATH})
LB_SWAP_FILE_PATH="${LB_SWAP_FILE_PATH}"
# \$LB_SWAP_FILE_SIZE: set swap file size
# (Default: ${LB_SWAP_FILE_SIZE})
LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE}"
# \$LB_SYSLINUX_THEME: set syslinux theme package
# (Default: ${LB_SYSLINUX_THEME})
LB_SYSLINUX_THEME="${LB_SYSLINUX_THEME}"
EOF
# Creating lb_source_* configuration
cat > config/source << EOF
# config/source - options for live-build(7), source stage
# \$LB_SOURCE: set source option
# (Default: ${LB_SOURCE})
LB_SOURCE="${LB_SOURCE}"
# \$LB_SOURCE_IMAGES: set image type
# (Default: ${LB_SOURCE_IMAGES})
LB_SOURCE_IMAGES="${LB_SOURCE_IMAGES}"
EOF
mkdir -p auto
mkdir -p local/functions
mkdir -p local/scripts
if [ "${CONFIG}" = "clone" ] # FIXME
then
# Read package selection
echo $(dpkg --get-selections | awk '{ print $1 }') > config/package-lists/local.list.chroot
# Read debconf questions
if [ ! -f /usr/bin/debconf-get-selections ]
then
Echo_warning "Please install 'debconf-utils' in order to use this feature."
else
debconf-get-selections | grep -v deinstall | cut -f1 > config/preseed/local.preseed.chroot
fi
fi
# Checking defaults again
Check_defaults
if [ "${_CLEAN}" = "true" ]
then
# Remove empty directories in config tree
rmdir --ignore-fail-on-non-empty config/*/ > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty config > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty auto > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty local/functions > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty local/scripts > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty local > /dev/null 2>&1 || true
fi
# Creating stage file
Create_stagefile .build/config
|