Removing dedicated emdebian mode, this can entirely be handled with different defaults.
[debian-live-build.git] / scripts / build / config
blob6d3e4dbd4734c2c1597dbcbc7e0aec44d9de19b9
1 #!/bin/sh
3 ## live-build(7) - System Build Scripts
4 ## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
5 ##
6 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7 ## This is free software, and you are welcome to redistribute it
8 ## under certain conditions; see COPYING for details.
11 set -e
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
16 # Setting static variables
17 PROGRAM="lb config"
18 DESCRIPTION="$(Echo 'create configuration for live-build(7)')"
19 USAGE="${PROGRAM} [--apt apt|aptitude]\n\
20 \t [--apt-ftp-proxy URL]\n\
21 \t [--apt-http-proxy URL]\n\
22 \t [--apt-indices true|false]\n\
23 \t [--apt-options OPTION|\"OPTIONS\"]\n\
24 \t [--aptitude-options OPTION|\"OPTIONS\"]\n\
25 \t [--apt-pipeline DEPTH]\n\
26 \t [--apt-recommends true|false]\n\
27 \t [--apt-secure true|false]\n\
28 \t [--apt-source-archives true|false]\n\
29 \t [-a|--architectures ARCHITECTURE]\n\
30 \t [-b|--binary-images iso|iso-hybrid|netboot|tar|hdd]\n\
31 \t [--binary-filesystem fat16|fat32|ext2|ext3|ext4|ntfs]\n\
32 \t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\
33 \t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\
34 \t [--bootappend-live-failsafe PARAMETER|\"PARAMETERS\"]\n\
35 \t [--bootloader grub|syslinux]\n\
36 \t [--bootstrap cdebootstrap|cdebootstrap-static|debootstrap]\n\
37 \t [--cache true|false]\n\
38 \t [--cache-indices true|false]\n\
39 \t [--cache-packages true|false]\n\
40 \t [--cache-stages STAGE|\"STAGES\"]\n\
41 \t [--checksums md5|sha1|sha256|sha512|none]\n\
42 \t [--compression bzip2|gzip|lzip|xz|none]\n\
43 \t [--config GIT_URL::GIT_BRANCH]\n\
44 \t [--zsync true|false]\n\
45 \t [--build-with-chroot true|false]\n\
46 \t [--chroot-filesystem ext2|ext3|ext4|squashfs|jffs2|none]\n\
47 \t [--clean\n\
48 \t [-c|--conffile FILE]\n\
49 \t [--debconf-frontend dialog|editor|noninteractive|readline]\n\
50 \t [--debconf-priority low|medium|high|critical]\n\
51 \t [--debian-installer true|cdrom|netinst|netboot|businesscard|live|false]\n\
52 \t [--debian-installer-distribution daily|CODENAME]\n\
53 \t [--debian-installer-preseedfile FILE|URL]\n\
54 \t [--debian-installer-gui true|false]\n\
55 \t [--debug]\n\
56 \t [-d|--distribution CODENAME]\n\
57 \t [--parent-distribution CODENAME]\n\
58 \t [--parent-debian-installer-distribution CODENAME]\n\
59 \t [--dump]\n\
60 \t [--fdisk fdisk|fdisk.dist]\n\
61 \t [--force]\n\
62 \t [--grub-splash FILE]\n\
63 \t [--gzip-options OPTION|\"OPTIONS\"]\n\
64 \t [--hooks FILE]\n\
65 \t [--ignore-system-defaults]\n\
66 \t [--initramfs auto|none|live-boot|casper]\n\
67 \t [--initramfs-compression bzip2|gzip|lzma]\n\
68 \t [--initsystem sysvinit|runit|systemd|upstart|none]\n\
69 \t [--image-name [NAME]\n\
70 \t [--interactive shell]\n\
71 \t [--isohybrid-options OPTION|\"OPTIONS\"]\n\
72 \t [--hdd-label LABEL]\n\
73 \t [--hdd-size MB]\n\
74 \t [--iso-application NAME]\n\
75 \t [--iso-preparer NAME]\n\
76 \t [--iso-publisher NAME]\n\
77 \t [--iso-volume NAME]\n\
78 \t [--jffs2-eraseblock SIZE]\n\
79 \t [--keyring-packages PACKAGE|\"PACKAGES\"]\n\
80 \t [-k|--linux-flavours FLAVOUR|\"FLAVOURS\"]\n\
81 \t [--linux-packages \"PACKAGES\"]\n\
82 \t [--losetup losetup|losetup.orig]\n\
83 \t [--memtest memtest86+|memtest86|none]\n\
84 \t [-m|--parent-mirror-bootstrap URL]\n\
85 \t [--parent-mirror-chroot URL]\n\
86 \t [--parent-mirror-chroot-security URL]\n\
87 \t [--parent-mirror-binary URL]\n\
88 \t [--parent-mirror-binary-security URL]\n\
89 \t [--parent-mirror-debian-installer URL]\n\
90 \t [--mirror-bootstrap URL]\n\
91 \t [--mirror-chroot URL]\n\
92 \t [--mirror-chroot-security URL]\n\
93 \t [--mirror-binary URL]\n\
94 \t [--mirror-binary-security URL]\n\
95 \t [--mirror-debian-installer URL]\n\
96 \t [--mode debian|ubuntu]\n\
97 \t [--system live|normal]\n\
98 \t [--net-root-filesystem nfs|cfs]\n\
99 \t [--net-root-mountoptions OPTIONS]\n\
100 \t [--net-root-path PATH]\n\
101 \t [--net-root-server IP|HOSTNAME]\n\
102 \t [--net-cow-filesystem nfs|cfs]\n\
103 \t [--net-cow-mountoptions OPTIONS]\n\
104 \t [--net-cow-path PATH]\n\
105 \t [--net-cow-server IP|HOSTNAME]\n\
106 \t [--net-tarball true|false]\n\
107 \t [--quiet]\n\
108 \t [--archives ARCHIVE|\"ARCHIVES\"]\n\
109 \t [--archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\
110 \t [--parent-archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\
111 \t [--security true|false]\n\
112 \t [--source true|false]\n\
113 \t [-s|--source-images iso|netboot|tar|hdd]\n\
114 \t [--firmware-binary true|false]\n\
115 \t [--firmware-chroot true|false]\n\
116 \t [--swap-file-path PATH]\n\
117 \t [--swap-file-size MB]\n\
118 \t [--tasksel apt|aptitude|tasksel]\n\
119 \t [--templates PATH]\n\
120 \t [--updates true|false]\n\
121 \t [--backports true|false]\n\
122 \t [--exposed-root true|false]\n\
123 \t [--verbose]\n\
124 \t [--loadlin true|false]\n\
125 \t [--win32-loader true|false]\n\
126 \t [--bootstrap-qemu-exclude PACKAGES]\n\
127 \t [--bootstrap-qemu-static PATH]\n\
128 \t [--bootstrap-qemu-arch ARCH]"
131 Local_arguments ()
133 LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitude-options:,debootstrap-options:,cdebootstrap-options:,
134 apt-pipeline:,apt-recommends:,apt-secure:,apt-source-archives:,bootstrap:,cache:,cache-indices:,cache-packages:,
135 cache-stages:,debconf-frontend:,debconf-priority:,dump,
136 initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,tasksel:,
137 templates:,architectures:,clean,
138 distribution:,parent-distribution:,parent-debian-installer-distribution:,parent-mirror-bootstrap:,parent-mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-binary:,
139 parent-mirror-binary-security:,parent-mirror-debian-installer:,
140 mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,
141 mirror-binary-security:,mirror-debian-installer:,
142 archives:,archive-areas:,parent-archive-areas:,chroot-filesystem:,exposed-root:,
143 gzip-options:,hooks:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:,
144 security:,updates:,backports:,binary-filesystem:,binary-images:,
145 apt-indices:,bootappend-install:,bootappend-live:,bootappend-live-failsafe:,bootloader:,checksums:,compression:,config:,zsync:,build-with-chroot:,
146 debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
147 grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,iso-application:,iso-preparer:,iso-publisher:,
148 iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
149 net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,
150 net-cow-server:,net-tarball:,firmware-binary:,firmware-chroot:,swap-file-path:,swap-file-size:,
151 loadlin:,win32-loader:,source:,source-images:,breakpoints,conffile:,debug,force,
152 help,ignore-system-defaults,quiet,usage,verbose,version,bootstrap-qemu-static:,bootstrap-qemu-arch:,
153 bootstrap-qemu-exclude:"
154 # Remove spaces added by indentation
155 LONG_OPTIONS="$(echo ${LONG_OPTIONS} | tr -d ' ')"
156 ARGUMENTS="$(getopt --longoptions ${LONG_OPTIONS} --name="${PROGRAM}" --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
158 if [ "${?}" != "0" ]
159 then
160 Echo_error "terminating" >&2
161 exit 1
164 eval set -- "${ARGUMENTS}"
166 while true
168 case "${1}" in
169 --dump)
170 # Dump version
171 if [ -x "$(which dpkg-query 2>/dev/null)" ]
172 then
173 VERSION_DPKG="$(dpkg-query -f='${Version}' --show live-build)"
176 Echo "%s: This is live-build version %s" "${0}" "${VERSION_DPKG:-${VERSION}}"
178 # Dump conffile contents
179 Print_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
181 # Dump contents of directories that contain text files
182 for DIRECTORY in config/package-lists config/apt config/preseed config/rootfs
184 if Find_files "${DIRECTORY}"
185 then
186 Echo_file "${DIRECTORY}"/*
188 done
190 # Dump directory listings of all directories under config/
191 for DIRECTORY in $(find config/ -mindepth 1 -maxdepth 1 -type d)
193 if Find_files "${DIRECTORY}"
194 then
195 ls -lR "${DIRECTORY}" | while read LINE
197 echo "${DIRECTORY}: ${LINE}"
198 done
200 done
202 exit 0
205 --clean)
206 _CLEAN="true"
207 shift
210 # config/common
211 --apt)
212 LB_APT="${2}"
213 shift 2
216 --apt-ftp-proxy)
217 LB_APT_FTP_PROXY="${2}"
218 shift 2
221 --apt-http-proxy)
222 LB_APT_HTTP_PROXY="${2}"
223 shift 2
226 --apt-indices)
227 LB_APT_INDICES="${2}"
228 shift 2
231 --apt-options)
232 APT_OPTIONS="${2}"
233 shift 2
236 --aptitude-options)
237 APTITUDE_OPTIONS="${2}"
238 shift 2
241 --apt-pipeline)
242 LB_APT_PIPELINE="${2}"
243 shift 2
246 --apt-recommends)
247 LB_APT_RECOMMENDS="${2}"
248 shift 2
251 --apt-secure)
252 LB_APT_SECURE="${2}"
253 shift 2
256 --apt-source-archives)
257 LB_APT_SOURCE_ARCHIVES="${2}"
258 shift 2
261 --bootstrap)
262 LB_BOOTSTRAP="${2}"
263 shift 2
266 --debootstrap-options)
267 DEBOOTSTRAP_OPTIONS="${2}"
268 shift 2
271 --cdebootstrap-options)
272 CDEBOOTSTRAP_OPTIONS="${2}"
273 shift 2
276 --cache)
277 LB_CACHE="${2}"
278 shift 2
281 --cache-indices)
282 LB_CACHE_INDICES="${2}"
283 shift 2
286 --cache-packages)
287 LB_CACHE_PACKAGES="${2}"
288 shift 2
291 --cache-stages)
292 LB_CACHE_STAGES="${2}"
293 shift 2
296 --debconf-frontend)
297 LB_DEBCONF_FRONTEND="${2}"
298 shift 2
301 --debconf-priority)
302 LB_DEBCONF_PRIORITY="${2}"
303 shift 2
306 --initramfs)
307 LB_INITRAMFS="${2}"
308 shift 2
311 --initramfs-compression)
312 LB_INITRAMFS_COMPRESSION="${2}"
313 shift 2
316 --initsystem)
317 LB_INITSYSTEM="${2}"
318 shift 2
321 --fdisk)
322 LB_FDISK="${2}"
323 shift 2
326 --losetup)
327 LB_LOSETUP="${2}"
328 shift 2
331 --mode)
332 LB_MODE="${2}"
333 shift 2
336 --system)
337 LB_SYSTEM="${2}"
338 shift 2
341 --tasksel)
342 LB_TASKSEL="${2}"
343 shift 2
346 --templates)
347 LB_TEMPLATES="${2}"
348 shift 2
351 # config/bootstrap
352 -a|--architectures)
353 LIVE_IMAGE_ARCHITECTURE="${2}"
354 shift 2
357 -d|--distribution)
358 LB_DISTRIBUTION="${2}"
359 shift 2
362 --parent-distribution)
363 LB_PARENT_DISTRIBUTION="${2}"
364 shift 2
367 -m|--parent-mirror-bootstrap)
368 LB_PARENT_MIRROR_BOOTSTRAP="${2}"
369 shift 2
372 --parent-mirror-chroot)
373 LB_PARENT_MIRROR_CHROOT="${2}"
374 shift 2
377 --parent-mirror-chroot-security)
378 LB_PARENT_MIRROR_CHROOT_SECURITY="${2}"
379 shift 2
382 --parent-mirror-binary)
383 LB_PARENT_MIRROR_BINARY="${2}"
384 shift 2
387 --parent-mirror-binary-security)
388 LB_PARENT_MIRROR_BINARY_SECURITY="${2}"
389 shift 2
392 --parent-mirror-debian-installer)
393 LB_PARENT_MIRROR_DEBIAN_INSTALLER="${2}"
394 shift 2
397 --mirror-bootstrap)
398 LB_MIRROR_BOOTSTRAP="${2}"
399 shift 2
402 --mirror-chroot)
403 LB_MIRROR_CHROOT="${2}"
404 shift 2
407 --mirror-chroot-security)
408 LB_MIRROR_CHROOT_SECURITY="${2}"
409 shift 2
412 --mirror-binary)
413 LB_MIRROR_BINARY="${2}"
414 shift 2
417 --mirror-binary-security)
418 LB_MIRROR_BINARY_SECURITY="${2}"
419 shift 2
422 --mirror-debian-installer)
423 LB_MIRROR_DEBIAN_INSTALLER="${2}"
424 shift 2
427 --archives)
428 LB_ARCHIVES="${2}"
429 shift 2
432 --archive-areas)
433 LIVE_IMAGE_ARCHIVE_AREAS="${2}"
434 shift 2
437 --parent-archive-areas)
438 LIVE_IMAGE_PARENT_ARCHIVE_AREAS="${2}"
439 shift 2
442 # config/chroot
443 --chroot-filesystem)
444 LB_CHROOT_FILESYSTEM="${2}"
445 shift 2
448 --exposed-root)
449 LB_EXPOSED_ROOT="${2}"
450 shift 2
453 --gzip-options)
454 GZIP_OPTIONS="${2}"
455 shift 2
458 --hooks)
459 LB_HOOKS="${2}"
460 shift 2
463 --image-name)
464 LIVE_IMAGE_NAME="${2}"
465 shift 2
468 --interactive)
469 LB_INTERACTIVE="${2}"
470 shift 2
473 --keyring-packages)
474 LB_KEYRING_PACKAGES="${2}"
475 shift 2
478 -k|--linux-flavours)
479 LB_LINUX_FLAVOURS="${2}"
480 shift 2
483 --linux-packages)
484 LB_LINUX_PACKAGES="${2}"
485 shift 2
488 --security)
489 LB_SECURITY="${2}"
490 shift 2
493 --updates)
494 LB_UPDATES="${2}"
495 shift 2
498 --backports)
499 LB_BACKPORTS="${2}"
500 shift 2
503 # config/binary
504 --binary-filesystem)
505 LB_BINARY_FILESYSTEM="${2}"
506 shift 2
509 -b|--binary-images)
510 LIVE_IMAGE_TYPE="${2}"
511 shift 2
514 --bootappend-live)
515 LB_BOOTAPPEND_LIVE="${2}"
516 shift 2
519 --bootappend-live-failsafe)
520 LB_BOOTAPPEND_LIVE_FAILSAFE="${2}"
521 shift 2
524 --bootappend-install)
525 LB_BOOTAPPEND_INSTALL="${2}"
526 shift 2
529 --bootloader)
530 LB_BOOTLOADER="${2}"
531 shift 2
534 --checksums)
535 LB_CHECKSUMS="${2}"
536 shift 2
539 --compression)
540 LB_COMPRESSION="${2}"
541 shift 2
544 --config)
545 _CONFIG="${2}"
546 shift 2
549 --zsync)
550 LB_ZSYNC="${2}"
551 shift 2
554 --build-with-chroot)
555 LB_BUILD_WITH_CHROOT="${2}"
556 shift 2
559 --debian-installer)
560 LB_DEBIAN_INSTALLER="${2}"
561 shift 2
564 --debian-installer-distribution)
565 LB_DEBIAN_INSTALLER_DISTRIBUTION="${2}"
566 shift 2
569 --parent-debian-installer-distribution)
570 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${2}"
571 shift 2
574 --debian-installer-preseedfile)
575 LB_DEBIAN_INSTALLER_PRESEEDFILE="${2}"
576 shift 2
579 --debian-installer-gui)
580 LB_DEBIAN_INSTALLER_GUI="${2}"
581 shift 2
584 --grub-splash)
585 LB_GRUB_SPLASH="${2}"
586 shift 2
589 --isohybrid-options)
590 LB_ISOHYBRID_OPTIONS="${2}"
591 shift 2
594 --hdd-label)
595 LB_HDD_LABEL="${2}"
596 shift 2
599 --hdd-size)
600 LB_HDD_SIZE="${2}"
601 shift 2
604 --iso-application)
605 LB_ISO_APPLICATION="${2}"
606 shift 2
609 --iso-preparer)
610 LB_ISO_PREPARER="${2}"
611 shift 2
614 --iso-publisher)
615 LB_ISO_PUBLISHER="${2}"
616 shift 2
619 --iso-volume)
620 LB_ISO_VOLUME="${2}"
621 shift 2
624 --jffs2-eraseblock)
625 LB_JFFS2_ERASEBLOCK="${2}"
626 shift 2
629 --memtest)
630 LB_MEMTEST="${2}"
631 shift 2
634 --net-root-filesystem)
635 LB_NET_ROOT_FILESYSTEM="${2}"
636 shift 2
639 --net-root-mountoptions)
640 LB_NET_ROOT_MOUNTOPTIONS="${2}"
641 shift 2
644 --net-root-path)
645 LB_NET_ROOT_PATH="${2}"
646 shift 2
649 --net-root-server)
650 LB_NET_ROOT_SERVER="${2}"
651 shift 2
654 --net-cow-filesystem)
655 LB_NET_COW_FILESYSTEM="${2}"
656 shift 2
659 --net-cow-mountoptions)
660 LB_NET_COW_MOUNTOPTIONS="${2}"
661 shift 2
664 --net-cow-path)
665 LB_NET_COW_PATH="${2}"
666 shift 2
669 --net-cow-server)
670 LB_NET_COW_SERVER="${2}"
671 shift 2
674 --net-tarball)
675 LB_NET_TARBALL="${2}"
676 shift 2
679 --firmware-binary)
680 LB_FIRMWARE_BINARY="${2}"
681 shift 2
684 --firmware-chroot)
685 LB_FIRMWARE_CHROOT="${2}"
686 shift 2
689 --swap-file-path)
690 LB_SWAP_FILE_PATH="${2}"
691 shift 2
694 --swap-file-size)
695 LB_SWAP_FILE_SIZE="${2}"
696 shift 2
699 --loadlin)
700 LB_LOADLIN="${2}"
701 shift 2
704 --win32-loader)
705 LB_WIN32_LOADER="${2}"
706 shift 2
709 --bootstrap-qemu-arch)
710 LB_BOOTSTRAP_QEMU_ARCHITECTURES="${2}"
711 shift 2
714 --bootstrap-qemu-exclude)
715 LB_BOOTSTRAP_QEMU_EXCLUDE="${2}"
716 shift 2
719 --bootstrap-qemu-static)
720 LB_BOOTSTRAP_QEMU_STATIC="${2}"
721 shift 2
724 # config/source
725 --source)
726 LB_SOURCE="${2}"
727 shift 2
730 -s|--source-images)
731 LB_SOURCE_IMAGES="${2}"
732 shift 2
735 # other
736 --breakpoints)
737 _BREAKPOINTS="true"
738 shift
741 -c|--conffile)
742 _CONFFILE="${2}"
743 shift 2
746 --color)
747 _COLOR="true"
748 shift
751 --debug)
752 _DEBUG="true"
753 shift
756 --force)
757 _FORCE="true"
758 shift
761 -h|--help)
762 Help
763 shift
766 --ignore-system-defaults)
767 shift
770 --quiet)
771 _QUIET="true"
772 shift
775 -u|--usage)
776 Usage
777 shift
780 --verbose)
781 _VERBOSE="true"
782 shift
785 -v|--version)
786 echo "${VERSION}"
787 exit 0
791 shift
792 break
796 Echo_error "internal error %s" "${0}"
797 exit 1
799 esac
800 done
803 Local_arguments "${@}"
805 if [ -e .git ] && [ -n "${_CONFIG}" ]
806 then
807 if [ "${1}" != "noauto" ]
808 then
809 Echo_message "Ignoring --config ${_CONFIG}: ${PWD} is already a git repository"
812 _CONFIG=""
815 if [ -e .build/config ] && [ -n "${_CONFIG}" ]
816 then
817 if [ "${1}" != "noauto" ]
818 then
819 Echo_message "Ignoring --config ${_CONFIG}: ${PWD} is already a live-build configuration tree"
822 _CONFIG=""
825 if [ -n "${_CONFIG}" ]
826 then
827 if [ -e "${_CONFIG}" ] || [ -e "/usr/share/live/images/${_CONFIG}" ]
828 then
829 if [ ! -e "${_CONFIG}" ] && [ -e "/usr/share/live/images/${_CONFIG}" ]
830 then
831 _CONFIG="/usr/share/live/images/${_CONFIG}"
834 Echo_message "Copying ${_CONFIG}"
835 tar -C "${_CONFIG}" -c . | tar -C ./ -x
836 else
837 _GIT_REPOSITORY="$(echo ${_CONFIG} | sed -e 's|::.*$||')"
839 Echo_message "Cloning ${_GIT_REPOSITORY}"
840 git clone ${_GIT_REPOSITORY} ./
842 if [ "${_GIT_REPOSITORY}" != "${_CONFIG}" ]
843 then
844 _GIT_BRANCH="$(echo ${_CONFIG} | awk -F\:\: '{ print $NF }')"
846 Echo_message "Checking out ${_GIT_BRANCH}"
847 git checkout ${_GIT_BRANCH}
851 if [ -e auto/config ]
852 then
853 _EXTRA_OPTIONS="$(echo ${@} | sed -e "s|--config ${_GIT_REPOSITORY}::${_GIT_BRANCH}||g" -e "s|--config ${_GIT_REPOSITORY}||g")"
855 Echo_message "The following extra options specified to lb config are going to be added to auto/config: ${_EXTRA_OPTIONS}"
856 sed -i -e "s|\"\${@}\"|${_EXTRA_OPTIONS} \"\${@}\"|" auto/config
860 # Read meta config
861 if [ "${1}" != "noauto" ] && [ -x auto/config ]
862 then
863 Echo_message "Executing auto/config script."
864 ./auto/config "${@}"
865 exit ${?}
868 if [ "${1}" = "noauto" ]
869 then
870 shift
873 # Reading system configuration
874 if ls /etc/live/build.conf > /dev/null 2>&1 || ls /etc/live/build/* > /dev/null 2>&1
875 then
876 if In_list "--ignore-system-defaults" "${@}"
877 then
878 Echo_message "Ignoring defaults in %s" "/etc/live/build.conf"
879 else
880 Echo_message "Using defaults in %s" "/etc/live/build.conf"
882 Read_conffiles /etc/live/build.conf /etc/live/build/*
886 # Reading existing configuration
887 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
889 Local_arguments "${@}"
891 if [ -n "${_CONFFILE}" ]
892 then
893 Read_conffiles "${_CONFFILE}"
896 # Setting defaults
897 Set_defaults
899 # Checking defaults
900 Check_defaults
902 if [ ! -e config ]
903 then
904 Echo_message "Creating config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LIVE_IMAGE_ARCHITECTURE} system"
905 else
906 Echo_message "Updating config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LIVE_IMAGE_ARCHITECTURE} system"
909 # Creating bootstrap configuration
910 mkdir -p config
911 mkdir -p config/includes
913 # Creating live-build configuration
914 cat > config/common << EOF
915 # config/common - common options for live-build(7)
917 # \$LB_APT: set package manager
918 # (Default: ${LB_APT})
919 LB_APT="${LB_APT}"
921 # \$LB_APT_FTP_PROXY: set apt/aptitude ftp proxy
922 # (Default: autodetected or empty)
923 LB_APT_FTP_PROXY="${LB_APT_FTP_PROXY}"
925 # \$LB_APT_HTTP_PROXY: set apt/aptitude http proxy
926 # (Default: autodetected or empty)
927 LB_APT_HTTP_PROXY="${LB_APT_HTTP_PROXY}"
929 # \$LB_APT_PIPELINE: set apt/aptitude pipeline depth
930 # (Default: ${LB_APT_PIPELINE})
931 LB_APT_PIPELINE="${LB_APT_PIPELINE}"
933 # \$LB_APT_RECOMMENDS: set apt/aptitude recommends
934 # (Default: ${LB_APT_RECOMMENDS})
935 LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS}"
937 # \$LB_APT_SECURE: set apt/aptitude security
938 # (Default: ${LB_APT_SECURE})
939 LB_APT_SECURE="${LB_APT_SECURE}"
941 # \$LB_APT_SOURCE_ARCHIVES: set apt/aptitude source entries in sources.list
942 # (Default: ${LB_APT_SOURCE_ARCHIVES})
943 LB_APT_SOURCE_ARCHIVES="${LB_APT_SOURCE_ARCHIVES}"
945 # \$LB_BOOTSTRAP: set bootstrap program
946 # (Default: ${LB_BOOTSTRAP})
947 LB_BOOTSTRAP="${LB_BOOTSTRAP}"
949 # \$LB_CACHE: control cache
950 # (Default: ${LB_CACHE})
951 LB_CACHE="${LB_CACHE}"
953 # \$LB_CACHE_INDICES: control if downloaded package indices should be cached
954 # (Default: ${LB_CACHE_INDICES})
955 LB_CACHE_INDICES="${LB_CACHE_INDICES}"
957 # \$LB_CACHE_PACKAGES: control if downloaded packages files should be cached
958 # (Default: ${LB_CACHE_PACKAGES})
959 LB_CACHE_PACKAGES="${LB_CACHE_PACKAGES}"
961 # \$LB_CACHE_STAGES: control if completed stages should be cached
962 # (Default: ${LB_CACHE_STAGES})
963 LB_CACHE_STAGES="${LB_CACHE_STAGES}"
965 # \$LB_DEBCONF_FRONTEND: set debconf(1) frontend to use
966 # (Default: ${LB_DEBCONF_FRONTEND})
967 LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND}"
969 # \$LB_DEBCONF_PRIORITY: set debconf(1) priority to use
970 # (Default: ${LB_DEBCONF_PRIORITY})
971 LB_DEBCONF_PRIORITY="${LB_DEBCONF_PRIORITY}"
973 # \$LB_INITRAMFS: set initramfs hook
974 # (Default: ${LB_INITRAMFS})
975 LB_INITRAMFS="${LB_INITRAMFS}"
977 # \$LB_INITRAMFS_COMPRESSION: set initramfs compression
978 # (Default: ${LB_INITRAMFS_COMPRESSION})
979 LB_INITRAMFS_COMPRESSION="${LB_INITRAMFS_COMPRESSION}"
981 # \$LB_INITSYSTEM: set init system
982 # (Default: ${LB_INITSYSTEM})
983 LB_INITSYSTEM="${LB_INITSYSTEM}"
985 # \$LB_FDISK: set fdisk program
986 # (Default: autodetected)
987 LB_FDISK="${LB_FDISK}"
989 # \$LB_LOSETUP: set losetup program
990 # (Default: autodetected)
991 LB_LOSETUP="${LB_LOSETUP}"
993 # \$LB_MODE: set distribution mode
994 # (Default: ${LB_MODE})
995 LB_MODE="${LB_MODE}"
997 # \$LB_SYSTEM: set system type
998 # (Default: ${LB_SYSTEM})
999 LB_SYSTEM="${LB_SYSTEM}"
1001 # \$LB_TASKSEL: set tasksel program
1002 # (Default: ${LB_TASKSEL})
1003 LB_TASKSEL="${LB_TASKSEL}"
1005 # \$LB_TEMPLATES: set templates
1006 # (Default: ${LB_TEMPLATES})
1007 LB_TEMPLATES="${LB_TEMPLATES}"
1009 # live-build options
1011 # \$_BREAKPOINTS: enable breakpoints
1012 # (Default: ${_BREAKPOINTS})
1013 #_BREAKPOINTS="${_BREAKPOINTS}"
1015 # \$_DEBUG: enable debug
1016 # (Default: ${_DEBUG})
1017 #_DEBUG="${_DEBUG}"
1019 # \$_COLOR: enable color
1020 # (Default: ${_COLOR})
1021 #_COLOR="${_COLOR}"
1023 # \$_FORCE: enable force
1024 # (Default: ${_FORCE})
1025 #_FORCE="${_FORCE}"
1027 # \$_QUIET: enable quiet
1028 # (Default: ${_QUIET})
1029 _QUIET="${_QUIET}"
1031 # \$_VERBOSE: enable verbose
1032 # (Default: ${_VERBOSE})
1033 #_VERBOSE="${_VERBOSE}"
1035 # Internal stuff (FIXME)
1036 APT_OPTIONS="${APT_OPTIONS}"
1037 APTITUDE_OPTIONS="${APTITUDE_OPTIONS}"
1038 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS}"
1039 CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS}"
1040 GZIP_OPTIONS="${GZIP_OPTIONS}"
1041 ISOHYBRID_OPTIONS="${ISOHYBRID_OPTIONS}"
1044 # Creating lb_bootstrap_* configuration
1045 cat > config/bootstrap << EOF
1046 # config/bootstrap - options for live-build(7), bootstrap stage
1048 # \$LB_DISTRIBUTION: select distribution to use
1049 # (Default: ${LB_DISTRIBUTION})
1050 LB_DISTRIBUTION="${LB_DISTRIBUTION}"
1052 # \$LB_PARENT_DISTRIBUTION: select parent distribution to use
1053 # (Default: ${LB_PARENT_DISTRIBUTION})
1054 LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION}"
1056 # \$LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION: select parent distribution for debian-installer to use
1057 # (Default: ${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION})
1058 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"
1060 # \$LB_PARENT_MIRROR_BOOTSTRAP: set parent mirror to bootstrap from
1061 # (Default: ${LB_PARENT_MIRROR_BOOTSTRAP})
1062 LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP}"
1064 # \$LB_PARENT_MIRROR_CHROOT: set parent mirror to fetch packages from
1065 # (Default: ${LB_PARENT_MIRROR_CHROOT})
1066 LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIRROR_CHROOT}"
1068 # \$LB_PARENT_MIRROR_CHROOT_SECURITY: set security parent mirror to fetch packages from
1069 # (Default: ${LB_PARENT_MIRROR_CHROOT_SECURITY})
1070 LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY}"
1072 # \$LB_PARENT_MIRROR_BINARY: set parent mirror which ends up in the image
1073 # (Default: ${LB_PARENT_MIRROR_BINARY})
1074 LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY}"
1076 # \$LB_PARENT_MIRROR_BINARY_SECURITY: set security parent mirror which ends up in the image
1077 # (Default: ${LB_PARENT_MIRROR_BINARY_SECURITY})
1078 LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY}"
1080 # \$LB_PARENT_MIRROR_DEBIAN_INSTALLER: set debian-installer parent mirror
1081 # (Default: ${LB_PARENT_MIRROR_BOOTSTRAP})
1082 LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER}"
1084 # \$LB_MIRROR_BOOTSTRAP: set mirror to bootstrap from
1085 # (Default: ${LB_MIRROR_BOOTSTRAP})
1086 LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP}"
1088 # \$LB_MIRROR_CHROOT: set mirror to fetch packages from
1089 # (Default: ${LB_MIRROR_CHROOT})
1090 LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT}"
1092 # \$LB_MIRROR_CHROOT_SECURITY: set security mirror to fetch packages from
1093 # (Default: ${LB_MIRROR_CHROOT_SECURITY})
1094 LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY}"
1096 # \$LB_MIRROR_BINARY: set mirror which ends up in the image
1097 # (Default: ${LB_MIRROR_BINARY})
1098 LB_MIRROR_BINARY="${LB_MIRROR_BINARY}"
1100 # \$LB_MIRROR_BINARY_SECURITY: set security mirror which ends up in the image
1101 # (Default: ${LB_MIRROR_BINARY_SECURITY})
1102 LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY}"
1104 # \$LB_MIRROR_DEBIAN_INSTALLER: set debian-installer mirror
1105 # (Default: ${LB_MIRROR_BOOTSTRAP})
1106 LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER}"
1108 # \$LB_ARCHIVES: enable available third-party archives
1109 # (Default: empty)
1110 LB_ARCHIVES="${LB_ARCHIVES}"
1112 # \$LB_BOOTSTRAP_QEMU_ARCHITECTURES: architectures to use foreign bootstrap
1113 # (Default: ${LB_BOOTSTRAP_QEMU_ARCHITECTURES})
1114 LB_BOOTSTRAP_QEMU_ARCHITECTURES="${LB_BOOTSTRAP_QEMU_ARCHITECTURES}"
1116 # \$LB_BOOTSTRAP_QEMU_EXCLUDE: packages to exclude during foreign bootstrap
1117 # (Default: ${LB_BOOTSTRAP_QEMU_EXCLUDE})
1118 LB_BOOTSTRAP_QEMU_EXCLUDE="${LB_BOOTSTRAP_QEMU_EXCLUDE}"
1120 # \$LB_BOOTSTRAP_QEMU_STATIC: static qemu binary for foreign bootstrap
1121 # (Default: ${LB_BOOTSTRAP_QEMU_STATIC})
1122 LB_BOOTSTRAP_QEMU_STATIC="${LB_BOOTSTRAP_QEMU_STATIC}"
1125 # Creating lb_chroot_* configuration
1126 mkdir -p config/archives
1127 mkdir -p config/apt
1128 mkdir -p config/hooks
1129 mkdir -p config/includes.chroot
1130 mkdir -p config/packages
1131 mkdir -p config/packages.chroot
1132 mkdir -p config/package-lists
1133 mkdir -p config/preseed
1135 cat > config/chroot << EOF
1136 # config/chroot - options for live-build(7), chroot stage
1138 # \$LB_CHROOT_FILESYSTEM: set chroot filesystem
1139 # (Default: ${LB_CHROOT_FILESYSTEM})
1140 LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}"
1142 # \$LB_UNION_FILESYSTEM: set union filesystem
1143 # (Default: ${LB_UNION_FILESYSTEM})
1144 LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM}"
1146 # \$LB_EXPOSED_ROOT: expose root as read only
1147 # (Default: ${LB_EXPOSED_ROOT})
1148 LB_EXPOSED_ROOT="${LB_EXPOSED_ROOT}"
1150 # \$LB_HOOKS: set hook commands
1151 # (Default: empty)
1152 LB_HOOKS="${LB_HOOKS}"
1154 # \$LB_INTERACTIVE: set interactive build
1155 # (Default: ${LB_INTERACTIVE})
1156 LB_INTERACTIVE="${LB_INTERACTIVE}"
1158 # \$LB_KEYRING_PACKAGES: set keyring packages
1159 # (Default: empty)
1160 LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES}"
1162 # \$LB_LINUX_FLAVOURS: set kernel flavour to use
1163 # (Default: autodetected)
1164 LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS}"
1166 # \$LB_LINUX_PACKAGES: set kernel packages to use
1167 # (Default: autodetected)
1168 LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES}"
1170 # \$LB_SECURITY: enable security updates
1171 # (Default: ${LB_SECURITY})
1172 LB_SECURITY="${LB_SECURITY}"
1174 # \$LB_UPDATES: enable updates updates
1175 # (Default: ${LB_UPDATES})
1176 LB_UPDATES="${LB_UPDATES}"
1178 # \$LB_BACKPORTS: enable backports updates
1179 # (Default: ${LB_BACKPORTS})
1180 LB_BACKPORTS="${LB_BACKPORTS}"
1183 # Creating lb_binary_* configuration
1184 mkdir -p config/debian-installer
1185 mkdir -p config/includes.binary
1186 mkdir -p config/includes.debian-installer
1187 mkdir -p config/packages.binary
1188 mkdir -p config/package-lists
1189 mkdir -p config/rootfs
1191 cat > config/binary << EOF
1192 # config/binary - options for live-build(7), binary stage
1194 # \$LB_BINARY_FILESYSTEM: set image filesystem
1195 # (Default: ${LB_BINARY_FILESYSTEM})
1196 LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM}"
1198 # \$LB_APT_INDICES: set apt/aptitude generic indices
1199 # (Default: ${LB_APT_INDICES})
1200 LB_APT_INDICES="${LB_APT_INDICES}"
1202 # \$LB_BOOTAPPEND_LIVE: set boot parameters
1203 # (Default: empty)
1204 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE}"
1206 # \$LB_BOOTAPPEND_INSTALL: set boot parameters
1207 # (Default: empty)
1208 LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL}"
1210 # \$LB_BOOTAPPEND_LIVE_FAILSAFE: set boot parameters
1211 # (Default: empty)
1212 LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE}"
1214 # \$LB_BOOTLOADER: set bootloader
1215 # (Default: ${LB_BOOTLOADER})
1216 LB_BOOTLOADER="${LB_BOOTLOADER}"
1218 # \$LB_CHECKSUMS: set checksums
1219 # (Default: ${LB_CHECKSUMS})
1220 LB_CHECKSUMS="${LB_CHECKSUMS}"
1222 # \$LB_COMPRESSION: set compression
1223 # (Default: ${LB_COMPRESSION})
1224 LB_COMPRESSION="${LB_COMPRESSION}"
1226 # \$LB_ZSYNC: set zsync
1227 # (Default: ${LB_ZSYNC})
1228 LB_ZSYNC="${LB_ZSYNC}"
1230 # \${LB_BUILD_WITH_CHROOT: control if we build binary images chrooted
1231 # (Default: ${LB_BUILD_WITH_CHROOT})
1232 # DO NEVER, *NEVER*, *N*E*V*E*R* SET THIS OPTION to false.
1233 LB_BUILD_WITH_CHROOT="${LB_BUILD_WITH_CHROOT}"
1235 # \$LB_DEBIAN_INSTALLER: set debian-installer
1236 # (Default: ${LB_DEBIAN_INSTALLER})
1237 LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER}"
1239 # \$LB_DEBIAN_INSTALLER_DISTRIBUTION: set debian-installer suite
1240 # (Default: empty)
1241 LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION}"
1243 # \$LB_DEBIAN_INSTALLER_PRESEEDFILE: set debian-installer preseed filename/url
1244 # (Default: ${LB_DEBIAN_INSTALLER_PRESEEDFILE})
1245 LB_DEBIAN_INSTALLER_PRESEEDFILE="${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
1247 # \$LB_DEBIAN_INSTALLER_GUI: toggle use of GUI debian-installer
1248 # (Default: ${LB_DEBIAN_INSTALLER_GUI})
1249 LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI}"
1251 # \$LB_GRUB_SPLASH: set custom grub splash
1252 # (Default: empty)
1253 LB_GRUB_SPLASH="${LB_GRUB_SPLASH}"
1255 # \$LB_HDD_LABEL: set hdd label
1256 # (Default: ${LB_HDD_LABEL})
1257 LB_HDD_LABEL="${LB_HDD_LABEL}"
1259 # \$LB_HDD_SIZE: set hdd filesystem size
1260 # (Default: ${LB_HDD_SIZE})
1261 LB_HDD_SIZE="${LB_HDD_SIZE}"
1263 # \$LB_ISO_APPLICATION: set iso author
1264 # (Default: ${LB_ISO_APPLICATION})
1265 LB_ISO_APPLICATION="${LB_ISO_APPLICATION}"
1267 # \$LB_ISO_PREPARER: set iso preparer
1268 # (Default: ${LB_ISO_PREPARER})
1269 LB_ISO_PREPARER="${LB_ISO_PREPARER}"
1271 # \$LB_ISO_PUBLISHER: set iso publisher
1272 # (Default: ${LB_ISO_PUBLISHER})
1273 LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER}"
1275 # \$LB_ISO_VOLUME: set iso volume (max 32 chars)
1276 # (Default: ${LB_ISO_VOLUME})
1277 LB_ISO_VOLUME="${LB_ISO_VOLUME}"
1279 # \$LB_JFFS2_ERASEBLOCK: set jffs2 eraseblock size
1280 # (Default: unset)
1281 LB_JFFS2_ERASEBLOCK=""
1283 # \$LB_MEMTEST: set memtest
1284 # (Default: ${LB_MEMTEST})
1285 LB_MEMTEST="${LB_MEMTEST}"
1287 # \$LB_LOADLIN: set loadlin
1288 # (Default: ${LB_LOADLIN})
1289 LB_LOADLIN="${LB_LOADLIN}"
1291 # \$LB_WIN32_LOADER: set win32-loader
1292 # (Default: ${LB_WIN32_LOADER})
1293 LB_WIN32_LOADER="${LB_WIN32_LOADER}"
1295 # \$LB_NET_ROOT_FILESYSTEM: set netboot filesystem
1296 # (Default: ${LB_NET_ROOT_FILESYSTEM})
1297 LB_NET_ROOT_FILESYSTEM="${LB_NET_ROOT_FILESYSTEM}"
1299 # \$LB_NET_ROOT_MOUNTOPTIONS: set nfsopts
1300 # (Default: empty)
1301 LB_NET_ROOT_MOUNTOPTIONS="${LB_NET_ROOT_MOUNTOPTIONS}"
1303 # \$LB_NET_ROOT_PATH: set netboot server directory
1304 # (Default: ${LB_NET_ROOT_PATH})
1305 LB_NET_ROOT_PATH="${LB_NET_ROOT_PATH}"
1307 # \$LB_NET_ROOT_SERVER: set netboot server address
1308 # (Default: ${LB_NET_ROOT_SERVER})
1309 LB_NET_ROOT_SERVER="${LB_NET_ROOT_SERVER}"
1311 # \$LB_NET_COW_FILESYSTEM: set net client cow filesystem
1312 # (Default: ${LB_NET_COW_FILESYSTEM})
1313 LB_NET_COW_FILESYSTEM="${LB_NET_COW_FILESYSTEM}"
1315 # \$LB_NET_COW_MOUNTOPTIONS: set cow mount options
1316 # (Default: empty)
1317 LB_NET_COW_MOUNTOPTIONS="${LB_NET_COW_MOUNTOPTIONS}"
1319 # \$LB_NET_COW_PATH: set cow directory
1320 # (Default: ${LB_NET_COW_PATH})
1321 LB_NET_COW_PATH="${LB_NET_COW_PATH}"
1323 # \$LB_NET_COW_SERVER: set cow server
1324 # (Default: ${LB_NET_COW_SERVER})
1325 LB_NET_COW_SERVER="${LB_NET_COW_SERVER}"
1327 # \$LB_NET_TARBALL: set net tarball
1328 # (Default: ${LB_NET_TARBALL})
1329 LB_NET_TARBALL="${LB_NET_TARBALL}"
1331 # \$LB_FIRMWARE_BINARY: include firmware packages in debian-installer
1332 # (Default: ${LB_FIRMWARE_BINARY})
1333 LB_FIRMWARE_BINARY="${LB_FIRMWARE_BINARY}"
1335 # \$LB_FIRMWARE_CHROOT: include firmware packages in debian-installer
1336 # (Default: ${LB_FIRMWARE_CHROOT})
1337 LB_FIRMWARE_CHROOT="${LB_FIRMWARE_CHROOT}"
1339 # \$LB_SWAP_FILE_PATH: set swap file path
1340 # (Default: ${LB_SWAP_FILE_PATH})
1341 LB_SWAP_FILE_PATH="${LB_SWAP_FILE_PATH}"
1343 # \$LB_SWAP_FILE_SIZE: set swap file size
1344 # (Default: ${LB_SWAP_FILE_SIZE})
1345 LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE}"
1348 # Creating lb_source_* configuration
1349 cat > config/source << EOF
1350 # config/source - options for live-build(7), source stage
1352 # \$LB_SOURCE: set source option
1353 # (Default: ${LB_SOURCE})
1354 LB_SOURCE="${LB_SOURCE}"
1356 # \$LB_SOURCE_IMAGES: set image type
1357 # (Default: ${LB_SOURCE_IMAGES})
1358 LB_SOURCE_IMAGES="${LB_SOURCE_IMAGES}"
1361 mkdir -p auto
1362 mkdir -p local/bin
1364 # Checking defaults again
1365 Check_defaults
1367 if [ "${_CLEAN}" = "true" ]
1368 then
1369 # Remove empty directories in config tree
1370 rmdir --ignore-fail-on-non-empty auto > /dev/null 2>&1 || true
1371 rmdir --ignore-fail-on-non-empty config/*/ > /dev/null 2>&1 || true
1372 rmdir --ignore-fail-on-non-empty config > /dev/null 2>&1 || true
1373 rmdir --ignore-fail-on-non-empty local/*/ > /dev/null 2>&1 || true
1374 rmdir --ignore-fail-on-non-empty local > /dev/null 2>&1 || true
1377 # New style configuration
1378 Echo_warning "WARNING: THIS VERSION OF LIVE-BUILD IS EXPERIMENTAL!"
1379 Echo_warning "IT IS UNFINISHED AND CHANGES HEAVILY WITHOUT PRIOR NOTICE."
1380 Echo_warning "USER DISCRETION IS ADVISED."
1382 if [ ! -e config/image ]
1383 then
1384 _NEW_CONFIG="true"
1387 # config/image
1388 Set_configuration "config/image" "Configuration-Version" "${LIVE_CONFIGURATION_VERSION}"
1389 [ "${_NEW_CONFIG}" = "true" ] && echo "" >> config/image
1390 Set_configuration "config/image" "Name" "${LIVE_IMAGE_NAME}"
1391 Set_configuration "config/image" "Architecture" "${LIVE_IMAGE_ARCHITECTURE}"
1392 Set_configuration "config/image" "Archive-Areas" "${LIVE_IMAGE_ARCHIVE_AREAS}"
1393 [ "${LB_DERIVATIVE}" = "true" ] && Set_configuration "config/image" "Parent-Archive-Areas" "${LIVE_IMAGE_PARENT_ARCHIVE_AREAS}" # FIXME
1394 Set_configuration "config/image" "Type" "${LIVE_IMAGE_TYPE}"
1396 # Creating stage file
1397 Create_stagefile .build/config