Codebase list live-build / 3efe0ac
Import Debian version 20210122 live-build (1:20210122) unstable; urgency=medium . [ Raphaël Hertzog ] * Get rid of extraneous whitespace showing up in syslinux menu * Standardize on having the GUI installation first in boot menus * config: obsolete --net-root-path * Drop the epoch in /usr/share/live/build/VERSION * Fix version computing when LIVE_BUILD is set * binary_syslinux: rely on $LIVE_BUILD_VERSION instead of lb --version * Add updated directives to enable cryptsetup support in initrd * frontend: do no try to look for sub-commands in the PATH * Synchronize syslinux menu structure with the grub-pc one * Make librsvg2-bin dependency unconditional for syslinux * Do not overwrite splash.png if the user has provided it * Tell APT to retry downloads a few times before giving up * Use bullseye as default release in preparation of the next stable release * Use truncate --no-create --size=0 to truncate files * Document our autopkgtest tests as needing internet access * Update renamed lintian tag names in lintian overrides. * Don't fail if one of the package lists expands to an empty list * Fix a small info message * autopkgtest: get rid of deprecated needs-recommends feature . [ David Hewitt ] * binary_syslinux: Accommodate LB_INITRAMFS not live-boot . [ Lyndon Brown ] * Lots of cleanup and refactoring. * remove redundant files (Closes: #952834, #952835) * source: fix wrong action value for script execution (Closes: #952837) * archives: fix removal of chroot/root/packages.chroot package list (Closes: #952838) * archives: fix incorrect usage string (Closes: #952839) * archives: add 'pass' param validation check (Closes: #952841) * archives: fix deb-src entry exclusion (Closes: #952842) * fix indentation (Closes: #952857) * installer: de-dup daily DI url (Closes: #952860) * don't unnecessarily convert exit codes to strings (Closes: #952861) * source: fix mistaken append instead of overwrite (Closes: #952862) * memtest: better handle obsolete LB_MEMTEST value (Closes: #952866) * bootloaders: fix ignoring LB_DEBIAN_INSTALLER_GUI in menu creation (Closes: #952890) * chroot_dpkg: start-stop-daemon simplification (Closes: #952891) * add missing shebangs to temp generated shell code files (Closes: #952863) * help/usage: fix incorrect program command (Closes: #952884) * config: rename --architectures to --architecture (Closes: #952892) * echo: fix problem with error printing (Closes: #952878) * echo: ensure output goes to stdout/stderr (Closes: #952879) * cursor: purge unused cursor functions (Closes: #952880) * binary_iso: fix wrong echo helper (Closes: #952881) * binarie_onie: fix missing use of echo helpers (Closes: #952882) * binary_onie: fix lack of newline on error (Closes: #952883) * installer: robustify udeb inclusion * installer: filter derived udebs from parent list * installer: download udebs directly from correct mirror (Closes: #952914) * firmware: avoid building unnecessary lists * firmware: construct file location once and reuse * firmware: fix possible duplication in firmware package lists (inefficiency) (Closes: #952906) * firmware: delete pointlessly cached (large) file after use (Closes: #952907) * firmware: de-dup firmware list parsing (Closes: #952908) * firmware: reorder firmware list construction * firmware: avoid potentially duplicate work (Closes: #952909) * firmware: save the compressed contents file to disk instead of decompressed (Closes: #952910) * firmware: enable caching for archive content file with firmware lists (Closes: #952911) * fix inadequate chroot_archives validation * fix consistency in binary execution and existance checking (Closes: #952927) * archives: tidy deb-src exclusion (Closes: #952928) * installer: use boolean for clarity (Closes: #952930) * top level cmd "auto redirect" handling (Closes: #952919) * help/usage: remove pointless vars (Closes: #952859) * archives: always include enabled/disabled deb-src apt entries (Closes: #952929) * copyright: add missing "The Debian Live team" entry * remove obsolete loop-aes-utils related losetup hack * debootstrap: use --force-check-gpg * hide mountpoints from nautilus * source: properly fix _apt permissions warning (Closes: #953957) * fix -h|--help component script man page redirection * strip progress-linux distro hacks * grub-pc: fix broken boot capability (Closes: #956131) * Fix permissions & ownership of copied /etc/resolv.conf (Closes: #857740) * manpage: document that multiple archive areas should be space separated * manpages: document space separation for --keyring-packages * manpages: document that --linux-flavours is space separated * manpages: fix typo (Closes: #926238) * config: stop writing 'default: <foo>' lines to config files (Closes: #904614) * config: obsolete unused --isohybrid-options option * config: obsolete unused --net-cow-* options * config: obsolete --net-root-* options (except one) * rename LB_ARCHITECTURES to LB_ARCHITECTURE * rename LB_BOOTSTRAP_QEMU_ARCHITECTURES to LB_BOOTSTRAP_QEMU_ARCHITECTURE * rename binary_loopback_cfg to binary_grub_cfg * bootloaders: reorganise installer menu entries * grub2: fix using wrong directory in certain cases (Closes: #952843) * binary: fix missing use of chroot_dpkg in binary stage (Closes: #776532) * bootstrap: drop obsolete check for `--no-check-gpg` support in debootstrap (Closes: #952847) * binary_rootfs: fix deletion of excludes file from wrong location in squashfs after use (Closes: #952849) * binary_rootfs: fix chmod of squashfs image only being applied when using chroot (Closes: #952850) * binary: fix missing handling of disk info for netboot case (Closes: #952846) * simplify --debian-installer choices (Closes: #952864) * archives: fix mount local repo comments (Closes: #952873) * fix capitalisation of some output messages (Closes: #952875) * help/usage: avoid unnecessary use of echo helpers (Closes: #952877) * chroot: fix redundant usage line (Closes: #952885) * binary_disk: refactor (Closes: #952865) * help/usage: fix overly complex script description handling (Closes: #952887) * fix missing use of echo helpers (Closes: #952876) * archives: deduplicate apt sourcelist file construction (Closes: #952889) * aliases: simplify excessively complex In_list function (Closes: #952915) * cache: clarify and simplify package cache save/restore (Closes: #952916) * source: add output of config readme file to source image (Closes: #952921) * defaults: ensure global caching param overrides specific caching params if disabled (Closes: #952923) * simplify STAGE checks - use In_List (Closes: #952917) * config: rename the config set/check functions for clarity (Closes: #952920) * chroot: improve directory creation/destruction efficiency (Closes: #952924) * source: downloaded pkgs to a clean directory rather than chroot root (Closes: #952931) * source: target downloads with corresponding version (Closes: #952932) * strip useless multi-arch separate directory stuff * locks: tidy lock acquisition (Closes: #952918) * grub1/grub2/loopback: fix missing delimiter in menu kernel parameter lists (Closes: #775143) * syslinux: remove replacement of unused label in menu configs * syslinux: fix shortcut caret appearing in menu entries * syslinux: changed 'build' to 'built' in splash * bootloaders: add install with speech synthesis menu entries * syslinux: expand list of install options * syslinux: add install menu entries only if including installer * syslinux: add memtest menu entry only if including memtest * syslinux: use more dynamic memtest menu config file . [ Luca Boccassi ] * Fix Lintian Warnings about changelog: day-of-week, trailing whitespace * Bump Standards-Version to 4.5.0, no changes. * Add autopkgtest: default image build * autopkgtest: build kali image * autopkgtest: disable updates/security repositories, not available for Bullseye . [ johnraff ] * Replace 'which' with 'command -v' to test for the existance of an executable This is considered to be more robust. . [ Steven Shiau ] * Add grub EFI support for armhf arch. . [ adrian15 ] * grub-efi: fix partial broken boot capability (Closes: #924053) . [ Ryan Finnie ] * Add initial ppc64el support * Enable arm64 for binary_grub_cfg * architectures.sh: armhf/armel can be built on arm64 * grub-efi: Show fwsetup, do not show incompatible memtest even if enabled * Bugfix: Fix grub.cfg pc/ENABLE_MEMTEST check . [ Victor Gavro ] * chroot_apt: fixed adding Pin-Priority (broken in da1fab11) . [ Roland Clobus ] * Some changes towards reproducible builds of live images and various bugfixes discovered while working on this. * A second invocation of 'lb config' will result in an identical settings file * Delay resolving the timestamp for the ISO volume to the moment the ISO-image is created * Preserve timestamps * Add new manpage to the list of translatable files * Ensure that SOURCE_DATE_EPOCH is always set in all sub scripts. When SOURCE_DATE_EPOCH was already set before 'lb config', also enable UTC timestamps. * SOURCE_DATE_EPOCH is always set * Use SOURCE_DATE_EPOCH for 'now' in the boot splash image * Use SOURCE_DATE_EPOCH for 'now' in .disk/info * Use SOURCE_DATE_EPOCH for the partition-id of /efi.img * Use SOURCE_DATE_EPOCH for the partition-id of /boot/grub/efi.img * Set timestamp embedded in EFI files * Set timestamp in embedded files of the installer * Apply SOURCE_DATE_EPOCH to newly generated files and create a log * Bugfix: do not create /dev/lock and /dev/lock-frontend . [ Marcel Partap ] * For 32bit UEFI secure boot, the package name is grub-efi-ia32-signed * binary_rootfs stage: give custom MKSQUASHFS_OPTIONS precedence * binary_rootfs stage: disable mksquashfs progress bar only in quiet mode * binary_rootfs stage: slightly lower mksquashfs nice levels (19 -> 17) . [ Thore Sommer ] * Add option to change compression algorithm and level for squashfs. * Option for using systemd-nspawn instead of chroot for hooks. (Closes: #965953) * Added the option to include files before and after package installation (Closes: #927128) . [ Matthijs Kooijman ] * binary_iso: Execute mkdir binary/.disk before writing to it . [ Unit 193 ] * Add 'unstable' as a valid distribution and link to sid. . [ Jan Kot ] * bootstrap_debootstrap: change debootstrap path to /usr/sbin/debootstrap * packages.sh: check for /etc/debian_version existance rather than dpkg-query aviability * exit.sh: fix selinux mountpoint . [ Steev Klimaszewski ] * Add arm64 udeb include files Raphaël Hertzog 3 years ago
230 changed file(s) with 7117 addition(s) and 8804 deletion(s). Raw diff Collapse all Expand all
2828 echo -n "."; \
2929 done; \
3030 else \
31 echo "WARNING: skipping bashism test - you need to install devscripts."; \
31 echo "WARNING: Skipping bashism test - you need to install devscripts."; \
3232 fi
3333
3434 @echo " done."
4040 # Installing shared data
4141 mkdir -p $(DESTDIR)/usr/share/live/build
4242 cp -r data functions $(DESTDIR)/usr/share/live/build
43 sed -e 's/.*(\(.*\)).*/\1/; q' debian/changelog >$(DESTDIR)/usr/share/live/build/VERSION
43 sed -e 's/.*(\(.*\)).*/\1/; s/^[0-9]://; q' debian/changelog >$(DESTDIR)/usr/share/live/build/VERSION
4444 cp -r share/* $(DESTDIR)/usr/share/live/build
4545
4646 # Installing executables
0 live-build (1:20210122) unstable; urgency=medium
1
2 [ Raphaël Hertzog ]
3 * Get rid of extraneous whitespace showing up in syslinux menu
4 * Standardize on having the GUI installation first in boot menus
5 * config: obsolete --net-root-path
6 * Drop the epoch in /usr/share/live/build/VERSION
7 * Fix version computing when LIVE_BUILD is set
8 * binary_syslinux: rely on $LIVE_BUILD_VERSION instead of lb --version
9 * Add updated directives to enable cryptsetup support in initrd
10 * frontend: do no try to look for sub-commands in the PATH
11 * Synchronize syslinux menu structure with the grub-pc one
12 * Make librsvg2-bin dependency unconditional for syslinux
13 * Do not overwrite splash.png if the user has provided it
14 * Tell APT to retry downloads a few times before giving up
15 * Use bullseye as default release in preparation of the next stable release
16 * Use truncate --no-create --size=0 to truncate files
17 * Document our autopkgtest tests as needing internet access
18 * Update renamed lintian tag names in lintian overrides.
19 * Don't fail if one of the package lists expands to an empty list
20 * Fix a small info message
21 * autopkgtest: get rid of deprecated needs-recommends feature
22
23 [ David Hewitt ]
24 * binary_syslinux: Accommodate LB_INITRAMFS not live-boot
25
26 [ Lyndon Brown ]
27 * Lots of cleanup and refactoring.
28 * remove redundant files (Closes: #952834, #952835)
29 * source: fix wrong action value for script execution (Closes: #952837)
30 * archives: fix removal of chroot/root/packages.chroot package list
31 (Closes: #952838)
32 * archives: fix incorrect usage string (Closes: #952839)
33 * archives: add 'pass' param validation check (Closes: #952841)
34 * archives: fix deb-src entry exclusion (Closes: #952842)
35 * fix indentation (Closes: #952857)
36 * installer: de-dup daily DI url (Closes: #952860)
37 * don't unnecessarily convert exit codes to strings (Closes: #952861)
38 * source: fix mistaken append instead of overwrite (Closes: #952862)
39 * memtest: better handle obsolete LB_MEMTEST value (Closes: #952866)
40 * bootloaders: fix ignoring LB_DEBIAN_INSTALLER_GUI in menu creation
41 (Closes: #952890)
42 * chroot_dpkg: start-stop-daemon simplification (Closes: #952891)
43 * add missing shebangs to temp generated shell code files
44 (Closes: #952863)
45 * help/usage: fix incorrect program command (Closes: #952884)
46 * config: rename --architectures to --architecture (Closes: #952892)
47 * echo: fix problem with error printing (Closes: #952878)
48 * echo: ensure output goes to stdout/stderr (Closes: #952879)
49 * cursor: purge unused cursor functions (Closes: #952880)
50 * binary_iso: fix wrong echo helper (Closes: #952881)
51 * binarie_onie: fix missing use of echo helpers (Closes: #952882)
52 * binary_onie: fix lack of newline on error (Closes: #952883)
53 * installer: robustify udeb inclusion
54 * installer: filter derived udebs from parent list
55 * installer: download udebs directly from correct mirror
56 (Closes: #952914)
57 * firmware: avoid building unnecessary lists
58 * firmware: construct file location once and reuse
59 * firmware: fix possible duplication in firmware package lists
60 (inefficiency) (Closes: #952906)
61 * firmware: delete pointlessly cached (large) file after use
62 (Closes: #952907)
63 * firmware: de-dup firmware list parsing (Closes: #952908)
64 * firmware: reorder firmware list construction
65 * firmware: avoid potentially duplicate work (Closes: #952909)
66 * firmware: save the compressed contents file to disk instead of
67 decompressed (Closes: #952910)
68 * firmware: enable caching for archive content file with firmware lists
69 (Closes: #952911)
70 * fix inadequate chroot_archives validation
71 * fix consistency in binary execution and existance checking
72 (Closes: #952927)
73 * archives: tidy deb-src exclusion (Closes: #952928)
74 * installer: use boolean for clarity (Closes: #952930)
75 * top level cmd "auto redirect" handling (Closes: #952919)
76 * help/usage: remove pointless vars (Closes: #952859)
77 * archives: always include enabled/disabled deb-src apt entries
78 (Closes: #952929)
79 * copyright: add missing "The Debian Live team" entry
80 * remove obsolete loop-aes-utils related losetup hack
81 * debootstrap: use --force-check-gpg
82 * hide mountpoints from nautilus
83 * source: properly fix _apt permissions warning (Closes: #953957)
84 * fix -h|--help component script man page redirection
85 * strip progress-linux distro hacks
86 * grub-pc: fix broken boot capability (Closes: #956131)
87 * Fix permissions & ownership of copied /etc/resolv.conf (Closes: #857740)
88 * manpage: document that multiple archive areas should be space separated
89 * manpages: document space separation for --keyring-packages
90 * manpages: document that --linux-flavours is space separated
91 * manpages: fix typo (Closes: #926238)
92 * config: stop writing 'default: <foo>' lines to config files
93 (Closes: #904614)
94 * config: obsolete unused --isohybrid-options option
95 * config: obsolete unused --net-cow-* options
96 * config: obsolete --net-root-* options (except one)
97 * rename LB_ARCHITECTURES to LB_ARCHITECTURE
98 * rename LB_BOOTSTRAP_QEMU_ARCHITECTURES to LB_BOOTSTRAP_QEMU_ARCHITECTURE
99 * rename binary_loopback_cfg to binary_grub_cfg
100 * bootloaders: reorganise installer menu entries
101 * grub2: fix using wrong directory in certain cases (Closes: #952843)
102 * binary: fix missing use of chroot_dpkg in binary stage (Closes: #776532)
103 * bootstrap: drop obsolete check for `--no-check-gpg` support in debootstrap
104 (Closes: #952847)
105 * binary_rootfs: fix deletion of excludes file from wrong location in
106 squashfs after use (Closes: #952849)
107 * binary_rootfs: fix chmod of squashfs image only being applied when using
108 chroot (Closes: #952850)
109 * binary: fix missing handling of disk info for netboot case
110 (Closes: #952846)
111 * simplify --debian-installer choices (Closes: #952864)
112 * archives: fix mount local repo comments (Closes: #952873)
113 * fix capitalisation of some output messages (Closes: #952875)
114 * help/usage: avoid unnecessary use of echo helpers (Closes: #952877)
115 * chroot: fix redundant usage line (Closes: #952885)
116 * binary_disk: refactor (Closes: #952865)
117 * help/usage: fix overly complex script description handling
118 (Closes: #952887)
119 * fix missing use of echo helpers (Closes: #952876)
120 * archives: deduplicate apt sourcelist file construction (Closes: #952889)
121 * aliases: simplify excessively complex In_list function (Closes: #952915)
122 * cache: clarify and simplify package cache save/restore (Closes: #952916)
123 * source: add output of config readme file to source image (Closes: #952921)
124 * defaults: ensure global caching param overrides specific caching params if
125 disabled (Closes: #952923)
126 * simplify STAGE checks - use In_List (Closes: #952917)
127 * config: rename the config set/check functions for clarity
128 (Closes: #952920)
129 * chroot: improve directory creation/destruction efficiency
130 (Closes: #952924)
131 * source: downloaded pkgs to a clean directory rather than chroot root
132 (Closes: #952931)
133 * source: target downloads with corresponding version (Closes: #952932)
134 * strip useless multi-arch separate directory stuff
135 * locks: tidy lock acquisition (Closes: #952918)
136 * grub1/grub2/loopback: fix missing delimiter in menu kernel parameter lists
137 (Closes: #775143)
138 * syslinux: remove replacement of unused label in menu configs
139 * syslinux: fix shortcut caret appearing in menu entries
140 * syslinux: changed 'build' to 'built' in splash
141 * bootloaders: add install with speech synthesis menu entries
142 * syslinux: expand list of install options
143 * syslinux: add install menu entries only if including installer
144 * syslinux: add memtest menu entry only if including memtest
145 * syslinux: use more dynamic memtest menu config file
146
147 [ Luca Boccassi ]
148 * Fix Lintian Warnings about changelog: day-of-week, trailing whitespace
149 * Bump Standards-Version to 4.5.0, no changes.
150 * Add autopkgtest: default image build
151 * autopkgtest: build kali image
152 * autopkgtest: disable updates/security repositories, not available for
153 Bullseye
154
155 [ johnraff ]
156 * Replace 'which' with 'command -v' to test for the existance of an
157 executable This is considered to be more robust.
158
159 [ Steven Shiau ]
160 * Add grub EFI support for armhf arch.
161
162 [ adrian15 ]
163 * grub-efi: fix partial broken boot capability (Closes: #924053)
164
165 [ Ryan Finnie ]
166 * Add initial ppc64el support
167 * Enable arm64 for binary_grub_cfg
168 * architectures.sh: armhf/armel can be built on arm64
169 * grub-efi: Show fwsetup, do not show incompatible memtest even if enabled
170 * Bugfix: Fix grub.cfg pc/ENABLE_MEMTEST check
171
172 [ Victor Gavro ]
173 * chroot_apt: fixed adding Pin-Priority (broken in da1fab11)
174
175 [ Roland Clobus ]
176 * Some changes towards reproducible builds of live images and
177 various bugfixes discovered while working on this.
178 * A second invocation of 'lb config' will result in an identical settings
179 file
180 * Delay resolving the timestamp for the ISO volume to the moment the
181 ISO-image is created
182 * Preserve timestamps
183 * Add new manpage to the list of translatable files
184 * Ensure that SOURCE_DATE_EPOCH is always set in all sub scripts. When
185 SOURCE_DATE_EPOCH was already set before 'lb config', also enable UTC
186 timestamps.
187 * SOURCE_DATE_EPOCH is always set
188 * Use SOURCE_DATE_EPOCH for 'now' in the boot splash image
189 * Use SOURCE_DATE_EPOCH for 'now' in .disk/info
190 * Use SOURCE_DATE_EPOCH for the partition-id of /efi.img
191 * Use SOURCE_DATE_EPOCH for the partition-id of /boot/grub/efi.img
192 * Set timestamp embedded in EFI files
193 * Set timestamp in embedded files of the installer
194 * Apply SOURCE_DATE_EPOCH to newly generated files and create a log
195 * Bugfix: do not create /dev/lock and /dev/lock-frontend
196
197 [ Marcel Partap ]
198 * For 32bit UEFI secure boot, the package name is grub-efi-ia32-signed
199 * binary_rootfs stage: give custom MKSQUASHFS_OPTIONS precedence
200 * binary_rootfs stage: disable mksquashfs progress bar only in quiet mode
201 * binary_rootfs stage: slightly lower mksquashfs nice levels (19 -> 17)
202
203 [ Thore Sommer ]
204 * Add option to change compression algorithm and level for squashfs.
205 * Option for using systemd-nspawn instead of chroot for hooks.
206 (Closes: #965953)
207 * Added the option to include files before and after package installation
208 (Closes: #927128)
209
210 [ Matthijs Kooijman ]
211 * binary_iso: Execute mkdir binary/.disk before writing to it
212
213 [ Unit 193 ]
214 * Add 'unstable' as a valid distribution and link to sid.
215
216 [ Jan Kot ]
217 * bootstrap_debootstrap: change debootstrap path to /usr/sbin/debootstrap
218 * packages.sh: check for /etc/debian_version existance rather than
219 dpkg-query aviability
220 * exit.sh: fix selinux mountpoint
221
222 [ Steev Klimaszewski ]
223 * Add arm64 udeb include files
224
225 -- Raphaël Hertzog <[email protected]> Fri, 22 Jan 2021 15:13:32 +0100
226
0227 live-build (1:20191221) unstable; urgency=medium
1228
2229 * Revert some Kali-specific change in scripts/build/binary_iso
304531 * Drop left-over translation files for removed lb_testroot command.
305532 * Get rid of useless bootstrap_archive-keys script. Closes: #773775
306533 * Drop an optimization in chroot_archives that has undesired side-effects.
307 Thanks to jnqnfe for the patch. Closes: #775989
534 Thanks to jnqnfe for the patch. Closes: #775989
308535 * Drop gpgv and debian-keyring from Suggests.
309536 * Fix Check_installed function when checking against host. Thanks to jnqnfe
310537 for the report. Closes: #774807
66046831 - adds LIVE_INCLUDE_CHROOT to the manual exported variables as reported by
66056832 Mathieu Geli <[email protected]> (Closes: #412325).
66066833
6607 -- Daniel Baumann <[email protected]> Sun, 3 Mar 2007 12:25:00 +0100
6834 -- Daniel Baumann <[email protected]> Sat, 03 Mar 2007 12:25:00 +0100
66086835
66096836 live-package (0.99.23-1) unstable; urgency=low
66106837
77 debhelper-compat (= 12),
88 po4a,
99 gettext,
10 Standards-Version: 4.4.1
10 Standards-Version: 4.5.1
1111 Rules-Requires-Root: no
1212 Homepage: https://wiki.debian.org/DebianLive
1313 Vcs-Browser: https://salsa.debian.org/live-team/live-build
2626 live-boot-doc,
2727 live-config-doc,
2828 live-manual-html | live-manual,
29 rsync,
30 systemd-container,
2931 wget,
3032 xz-utils,
3133 Suggests:
3335 parted,
3436 mtd-utils,
3537 Description: Live System Build Components
36 The Live Systems project maintains the components to build Debian based Live
38 The Debian Live project maintains the components to build Debian based Live
3739 systems and the official Debian Live images themselves.
3840 .
3941 live-build contains the components to build a live system from a configuration
33
44 Files: *
55 Copyright:
6 2016-2020 The Debian Live team
67 2016-2017 Raphaël Hertzog <[email protected]>
78 2006-2015 Daniel Baumann <[email protected]>
89 License: GPL-3+
0 image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
0 ---
1 include:
2 - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
3 - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
4
5 stages:
6 - provisioning
7 - build
8 - publish
9 - test
10 - deploy
111
212 pages:
13 image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest
314 stage: deploy
15 allow_failure: true
416 artifacts:
517 paths:
618 - public
719 only:
820 - master
921 script:
10 - gitlab-ci-git-buildpackage-all
22 - mkdir ${CI_PROJECT_DIR}/debian/output/aptly; cd ${CI_PROJECT_DIR}/debian/output/aptly
1123 - gitlab-ci-aptly
24 - cd ${CI_PROJECT_DIR}
25 - mv ${CI_PROJECT_DIR}/debian/output/aptly/public .
26 dependencies:
27 - build
0 live-build: symlink-should-be-relative
0 live-build: absolute-symlink-in-top-level-folder
11 # Those cases are legitimate uses of direct access to the database
22 live-build: uses-dpkg-database-directly usr/lib/live/build/chroot_tmpfs
33 live-build: uses-dpkg-database-directly usr/lib/live/build/clean
00 # Ignore those errors, it's not nice but works currently
1 source-contains-unsafe-symlink share/bootloaders/*
1 absolute-symbolic-link-target-in-source share/bootloaders/*
0 #!/bin/bash
1
2 set -eu
3 set -o pipefail
4
5 cd "${AUTOPKGTEST_TMP}"
6 lb config --verbose --updates false --security false
7 lb build --verbose
8 ls -l
0 #!/bin/bash
1
2 set -eu
3 set -o pipefail
4
5 # Ensure Kali's keyring archive is installed and is always up to date
6 echo "Acquire::Retries 5;" > /etc/apt/apt.conf.d/live-build-ci
7 curl https://archive.kali.org/archive-key.asc > /etc/apt/trusted.gpg.d/kali.asc
8 mkdir -p /etc/apt/sources.list.d
9 echo "deb http://http.kali.org/kali kali-rolling main" > /etc/apt/sources.list.d/kali.list
10 apt-get update
11 apt-get install -y kali-archive-keyring
12 rm -f /etc/apt/trusted.gpg.d/kali.asc /etc/apt/sources.list.d/kali.list /etc/apt/apt.conf.d/live-build-ci
13 apt-get update
14
15 cd "${AUTOPKGTEST_TMP}"
16 git clone --depth 1 --no-tags https://gitlab.com/kalilinux/build-scripts/live-build-config.git
17 cd live-build-config
18 ./build.sh --verbose
19 ls -l
20 ls -l images
0 Tests: build-default-image
1 Depends: live-build,
2 Restrictions: needs-root, allow-stderr, needs-internet
3
4 Tests: build-kali-image
5 Depends: live-build, git, ca-certificates, curl, apt-utils, bzip2, cpio, file, wget, xz-utils
6 Restrictions: needs-root, allow-stderr, flaky, needs-internet
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1011 set -e
1112
1213 # Including common functions
13 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
14 [ -n "${LIVE_BUILD}" ] && [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'utility to build live systems')"
17 HELP="FIXME"
18 USAGE="FIXME"
17 PROGRAM="${FRONTEND}"
18 DESCRIPTION="Utility to build live systems"
19 USAGE="lb {clean|config|build}"
1920
20 case "${1}" in
21 -h|--help)
22 if [ -x "$(which man 2>/dev/null)" ]
23 then
24 man lb
25 exit 0
26 else
27 ${0} --usage
28 exit 0
29 fi
30 ;;
21 # This bits of code relies on the fact that we only accept
22 # options without values before the real command.
23 GLOBAL_ARGS=""
24 while true; do
25 case $1 in
26 -*)
27 GLOBAL_ARGS="${GLOBAL_ARGS:+$GLOBAL_ARGS }$1"
28 shift
29 ;;
30 *)
31 break
32 ;;
33 esac
34 done
35 Arguments $GLOBAL_ARGS
3136
32 ""|-u|--usage)
33 Usage
34 ;;
37 if [ $# = 0 ]; then
38 Echo_error "Missing sub-command"
39 Usage --fail
40 fi
3541
36 -v|--version)
37 echo "${VERSION}"
38 exit 0
39 ;;
42 COMMAND="${1}"
43 shift
4044
41 *)
42 COMMAND="${1}"
43 shift
45 if [ -x "${LIVE_BUILD}/scripts/build/${COMMAND}" ]; then
46 # User has live-build copied locally in the system
47 SCRIPT="${LIVE_BUILD}/scripts/build/${COMMAND}"
48 elif [ -x "local/live-build/scripts/build/${COMMAND}" ]; then
49 # User has live-build copied locally in the config
50 SCRIPT="local/live-build/scripts/build/${COMMAND}";
51 elif [ -x /usr/lib/live/build/${COMMAND} ]; then
52 # User has live-build installed in the system
53 SCRIPT=/usr/lib/live/build/"${COMMAND}"
54 else
55 Echo_error "Unknown command: ${COMMAND}"
56 exit 1
57 fi
4458
45 ENV=""
59 if [ "${COMMAND}" != "config" ]; then
60 # Checking user account
61 if [ "$(id -u)" -ne "0" ]; then
62 Echo_error "Root privileges needed!"
63 exit 1
64 fi
65 fi
4666
47 if [ "${COMMAND}" != "config" ]
48 then
49 # Checking user account
50 if [ "$(id -u)" -ne "0" ]
51 then
52 Echo_error "need root privileges"
53 exit 1
54 fi
55 fi
67 ENV=""
68 for _FILE in config/environment config/environment.binary; do
69 if [ -e "${_FILE}" ]; then
70 ENV="${ENV} $(grep -v '^#' ${_FILE})"
71 fi
72 done
5673
57 for _FILE in config/environment config/environment.binary
58 do
59 if [ -e "${_FILE}" ]
60 then
61 ENV="${ENV} $(grep -v '^#' ${_FILE})"
62 fi
63 done
74 _CMD_LABEL="lb ${COMMAND}"
75 if [ "${_COLOR_OUT}" = "true" ]; then
76 _CMD_LABEL="${CYAN}${_CMD_LABEL}${NO_COLOR}"
77 fi
78 Echo "[%s] ${_CMD_LABEL} %s" "$(date +'%F %T')" "$(echo ${GLOBAL_ARGS} ${@})"
6479
65 if [ -x "${LIVE_BUILD}/scripts/build/${COMMAND}" ]
66 then
67 # User has live-build copied locally in the system
68 SCRIPT="${LIVE_BUILD}/scripts/build/${COMMAND}"
69 elif [ -x "local/live-build/scripts/build/${COMMAND}" ]
70 then
71 # User has live-build copied locally in the config
72 SCRIPT="local/live-build/scripts/build/${COMMAND}"
73 elif [ -x /usr/lib/live/build/${COMMAND} ]
74 then
75 # User has live-build installed in the system
76 SCRIPT=/usr/lib/live/build/"${COMMAND}"
77 elif [ -x "$(which ${COMMAND} 2>/dev/null)" ]
78 then
79 # User has live-build commands in path
80 SCRIPT="${COMMAND}"
81 else
82 Echo_error "no such script: ${COMMAND}"
83 exit 1
84 fi
85
86 Echo "[%s] %s" "$(date +'%F %T')" "lb ${COMMAND} $(echo ${@})"
87 ${ENV} exec "${SCRIPT}" "${@}"
88 ;;
89 esac
80 exec /usr/bin/env ${ENV} "${SCRIPT}" ${GLOBAL_ARGS} "${@}"
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program is free software: you can redistribute it and/or modify
2122
2223 set -e
2324
24 if [ -x "$(which man 2>/dev/null)" ]
25 if command -v man >/dev/null
2526 then
2627 man live-build
2728 else
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1415
1516 In_list ()
1617 {
17 NEEDLES="${1}"
18 local NEEDLE="${1}"
1819 shift
1920
20 for ITEM in ${@}
21 do
22 for NEEDLE in ${NEEDLES}
23 do
24 if [ "${NEEDLE}" = "${ITEM}" ]
25 then
26 return 0
27 fi
28 done
21 local ITEM
22 for ITEM in "${@}"; do
23 if [ "${NEEDLE}" = "${ITEM}" ]; then
24 return 0
25 fi
2926 done
3027
3128 return 1
3330
3431 Truncate ()
3532 {
36 for FILE in ${@}
37 do
33 local FILE
34 for FILE in "${@}"; do
3835 if [ ! -L ${FILE} ]
3936 then
4037 : > ${FILE}
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Check_architectures ()
1112 {
12 ARCHITECTURES="${@}"
13 VALID="false"
13 local ARCHITECTURE
14 for ARCHITECTURE in "${@}"; do
15 if [ "${ARCHITECTURE}" = "${LB_ARCHITECTURE}" ]; then
16 return
17 fi
1418
15 for ARCHITECTURE in ${ARCHITECTURES}
16 do
17 if [ "$(echo ${LB_ARCHITECTURES} | grep ${ARCHITECTURE})" ]
18 then
19 VALID="true"
20 break
19 if [ "${ARCHITECTURE}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURE}" ]; then
20 if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
21 Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURE} was not found" "${0}"
22 continue
23 fi
24
25 if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
26 Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable" "${0}"
27 continue
28 fi
29
30 return
2131 fi
2232 done
2333
24 if [ "${ARCHITECTURES}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]
25 then
26 VALID="true"
27
28 if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]
29 then
30 Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURES} was not found"
31 VALID="false"
32 fi
33
34 if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]
35 then
36 Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable"
37 VALID="false"
38 fi
39
40 fi
41
42 if [ "${VALID}" = "false" ]
43 then
44 Echo_warning "skipping %s, foreign architecture(s)." "${0}"
45 exit 0
46 fi
34 Echo_warning "skipping %s, foreign architecture(s)." "${0}"
35 exit 0
4736 }
4837
4938 Check_crossarchitectures ()
5039 {
51 if [ -x /usr/bin/dpkg ]
52 then
40 local HOST
41 if command -v dpkg >/dev/null; then
5342 HOST="$(dpkg --print-architecture)"
5443 else
5544 HOST="$(uname -m)"
5645 fi
5746
47 local CROSS
5848 case "${HOST}" in
5949 amd64|i386|x86_64)
6050 CROSS="amd64 i386"
51 ;;
52
53 arm64)
54 CROSS="arm64 armhf armel"
6155 ;;
6256
6357 powerpc|ppc64)
6963 ;;
7064 esac
7165
72 if [ "${LB_ARCHITECTURES}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]
73 then
74
75 if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]
76 then
77 Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURES} was not found"
66 if [ "${LB_ARCHITECTURE}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURE}" ]; then
67 if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
68 Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURE} was not found" "${0}"
7869 exit 0
7970 fi
8071
81 if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]
82 then
83 Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable"
72 if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
73 Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable" "${0}"
8474 exit 0
8575 fi
8676 return
8777 fi
8878
89
90 Check_architectures "${CROSS}"
79 Check_architectures ${CROSS}
9180 }
92
93 Check_multiarchitectures ()
94 {
95 if [ "$(echo ${LB_ARCHITECTURES} | wc -w)" -gt "1" ]
96 then
97 # First, only support multiarch on iso
98 case "${LIVE_IMAGE_TYPE}" in
99 iso*)
100 # Assemble multi-arch
101 case "${LB_CURRENT_ARCHITECTURE}" in
102 amd64)
103 DESTDIR="${DESTDIR}.amd"
104 DESTDIR_LIVE="${DESTDIR_LIVE}.amd"
105 DESTDIR_INSTALL="${DESTDIR_INSTALL}.amd"
106 ;;
107
108 i386)
109 DESTDIR="${DESTDIR}.386"
110 DESTDIR_LIVE="${DESTDIR_LIVE}.386"
111 DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
112 ;;
113
114 powerpc)
115 DESTDIR="${DESTDIR}.ppc"
116 DESTDIR_LIVE="${DESTDIR_LIVE}.ppc"
117 DESTDIR_INSTALL="${DESTDIR_INSTALL}.ppc"
118 ;;
119 esac
120 ;;
121 esac
122 fi
123 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Arguments ()
1112 {
12 ARGUMENTS="$(getopt --longoptions breakpoints,color,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}")"
13 local LONGOPTS="breakpoints,color,debug,force,help,no-color,quiet,usage,verbose,version"
14 local SHORTOPTS="huv"
1315
14 if [ "${?}" != "0" ]
15 then
16 Echo_error "terminating" >&2
16 local ARGUMENTS
17 local ERR=0
18 ARGUMENTS="$(getopt --shell sh --name "${PROGRAM}" --longoptions $LONGOPTS --options $SHORTOPTS -- "${@}")" || ERR=$?
19
20 if [ $ERR -eq 1 ]; then
21 Echo_error "invalid argument(s)"
22 exit 1
23 elif [ $ERR -ne 0 ]; then
24 Echo_error "getopt failure"
1725 exit 1
1826 fi
1927
2028 eval set -- "${ARGUMENTS}"
2129
22 while true
23 do
24 case "${1}" in
25 --breakpoints)
26 _BREAKPOINTS="true"
30 while true; do
31 local ARG="${1}"
32 case "${ARG}" in
33 --breakpoints|--color|--debug|--force|-h|--help|--no-color|--quiet|-u|--usage|--verbose|-v|--version)
34 Handle_common_option "${ARG}"
2735 shift
28 ;;
29
30 --color)
31 _COLOR="true"
32 shift
33 ;;
34
35 -c|--conffile)
36 _CONFFILE="${2}"
37 shift 2
38 ;;
39
40 --debug)
41 _DEBUG="true"
42 shift
43 ;;
44
45 --force)
46 _FORCE="true"
47 shift
48 ;;
49
50 -h|--help)
51 Man
52 shift
53 ;;
54
55 --quiet)
56 _QUIET="true"
57 shift
58 ;;
59
60 -u|--usage)
61 Usage
62 shift
63 ;;
64
65 --verbose)
66 _VERBOSE="true"
67 shift
68 ;;
69
70 -v|--version)
71 echo "${VERSION}"
72 exit 0
7336 ;;
7437
7538 --)
7841 ;;
7942
8043 *)
81 Echo_error "internal error %s" "${0}"
44 Echo_error "Internal error, unhandled option: %s" "${ARG}"
8245 exit 1
8346 ;;
8447 esac
8548 done
8649 }
50
51 Handle_common_option ()
52 {
53 case "${1}" in
54 --breakpoints)
55 _BREAKPOINTS="true"
56 ;;
57
58 --color)
59 _COLOR="true"
60 _COLOR_OUT="true"
61 _COLOR_ERR="true"
62 ;;
63
64 --no-color)
65 _COLOR="false"
66 _COLOR_OUT="false"
67 _COLOR_ERR="false"
68 ;;
69
70 --debug)
71 _DEBUG="true"
72 ;;
73
74 --force)
75 _FORCE="true"
76 ;;
77
78 -h|--help)
79 Man
80 ;;
81
82 --quiet)
83 _QUIET="true"
84 ;;
85
86 -u|--usage)
87 Usage --exit
88 ;;
89
90 --verbose)
91 _VERBOSE="true"
92 ;;
93
94 -v|--version)
95 echo "${VERSION}"
96 exit 0
97 ;;
98
99 *)
100 Echo_error "Internal error: Unknown common option '%s'" "${1}"
101 exit 1
102 ;;
103 esac
104 }
+0
-128
functions/bootloaders.sh less more
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016 Adrian Gibanel Lopez <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9 Is_First_Bootloader ()
10 {
11 EVAL_FIRST_BOOTLOADER="${1}"
12
13 if [ "${LB_FIRST_BOOTLOADER}" = "${EVAL_FIRST_BOOTLOADER}" ]
14 then
15 return 0
16 else
17 return 1
18 fi
19
20 }
21
22 Is_Bootloader ()
23 {
24 EVAL_BOOTLOADER="${1}"
25 OLDIFS="$IFS"
26 IFS=","
27 for BOOTLOADER in ${LB_BOOTLOADERS}
28 do
29 if [ "${BOOTLOADER}" = "${EVAL_BOOTLOADER}" ]
30 then
31 IFS="$OLDIFS"
32 return 0
33 fi
34 done
35 IFS="$OLDIFS"
36 return 1
37 }
38
39 Is_Extra_Bootloader ()
40 {
41 EVAL_EXTRA_BOOTLOADER="${1}"
42
43 if Is_First_Bootloader "${EVAL_EXTRA_BOOTLOADER}"
44 then
45 return 1
46 else
47 if Is_Bootloader "${EVAL_EXTRA_BOOTLOADER}"
48 then
49 return 0
50 fi
51 fi
52 return 1
53
54 }
55
56 Check_Non_First_Bootloader ()
57 {
58 NON_FIRST_BOOTLOADER="${1}"
59
60 if Is_First_Bootloader "${NON_FIRST_BOOTLOADER}"
61 then
62 Echo_error "Bootloader: ${NON_FIRST_BOOTLOADER} not supported as a first bootloader."
63 exit 1
64 else
65 return 0
66 fi
67 }
68
69
70 Check_Non_Extra_Bootloader ()
71 {
72 NON_EXTRA_BOOTLOADER="${1}"
73
74 if Is_Extra_Bootloader "${NON_EXTRA_BOOTLOADER}"
75 then
76 Echo_error "Bootloader: ${NON_EXTRA_BOOTLOADER} not supported as a extra bootloader."
77 exit 1
78 else
79 return 0
80 fi
81 }
82
83 Check_First_Bootloader_Role ()
84 {
85 FIRST_BOOTLOADER_ROLE="${1}"
86 Check_Non_Extra_Bootloader "${FIRST_BOOTLOADER_ROLE}"
87
88 if Is_First_Bootloader "${FIRST_BOOTLOADER_ROLE}"
89 then
90 return 0
91 else
92 exit 0
93 fi
94
95 }
96
97 Check_Extra_Bootloader_Role ()
98 {
99 EXTRA_BOOTLOADER_ROLE="${1}"
100 Check_Non_First_Bootloader "${EXTRA_BOOTLOADER_ROLE}"
101
102 if Is_Extra_Bootloader "${EXTRA_BOOTLOADER_ROLE}"
103 then
104 return 0
105 else
106 exit 0
107 fi
108
109 }
110
111 Check_Any_Bootloader_Role ()
112 {
113 ANY_BOOTLOADER_ROLE="${1}"
114
115 if Is_First_Bootloader "${ANY_BOOTLOADER_ROLE}"
116 then
117 return 0
118 fi
119
120 if Is_Extra_Bootloader "${ANY_BOOTLOADER_ROLE}"
121 then
122 return 0
123 fi
124
125 exit 0
126
127 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Breakpoint ()
1112 {
12 NAME="${1}"
13 local NAME="${1}"
1314
1415 if [ "${_BREAKPOINTS}" = "true" ]
1516 then
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
78 ## under certain conditions; see COPYING for details.
89
910
10 Restore_cache ()
11 Restore_package_cache ()
1112 {
12 DIRECTORY="${1}"
13 local DIRECTORY="cache/packages.${1}"
1314
1415 if [ "${LB_CACHE}" = "true" ] && [ "${LB_CACHE_PACKAGES}" = "true" ]
1516 then
2829 fi
2930 }
3031
31 Save_cache ()
32 Save_package_cache ()
3233 {
33 DIRECTORY="${1}"
34 local DIRECTORY="cache/packages.${1}"
3435
3536 if [ "${LB_CACHE}" = "true" ] && [ "${LB_CACHE_PACKAGES}" = "true" ]
3637 then
4546 mkdir -p "${DIRECTORY}"
4647
4748 # Saving new cache
49 local PACKAGE
4850 for PACKAGE in chroot/var/cache/apt/archives/*.deb
4951 do
5052 if [ -e "${DIRECTORY}"/"$(basename ${PACKAGE})" ]
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Chroot ()
1112 {
12 CHROOT="${1}"; shift
13 COMMANDS="${@}"
13 local CHROOT="${1}"; shift
14 local COMMANDS
15 COMMANDS="${@}" #must be on separate line to 'local' declaration to avoid error
1416
1517 # Executing commands in chroot
1618 Echo_debug "Executing: %s" "${COMMANDS}"
1719
18 ENV=""
20 local ENV=""
1921
22 local _FILE
2023 for _FILE in config/environment config/environment.chroot
2124 do
2225 if [ -e "${_FILE}" ]
2528 fi
2629 done
2730
28 # Only pass SOURCE_DATE_EPOCH if its already set
29 if [ "${SOURCE_DATE_EPOCH:-}" != "" ]
30 then
31 ENV="${ENV} SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH}"
32 fi
31 ${_LINUX32} chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" DEBIAN_FRONTEND="${LB_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LB_DEBCONF_PRIORITY}" DEBCONF_NONINTERACTIVE_SEEN="true" DEBCONF_NOWARNINGS="true" SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} ${ENV} ${COMMANDS}
3332
34 ${_LINUX32} chroot "${CHROOT}" /usr/bin/env -i HOME="/root" PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" TERM="${TERM}" DEBIAN_FRONTEND="${LB_DEBCONF_FRONTEND}" DEBIAN_PRIORITY="${LB_DEBCONF_PRIORITY}" DEBCONF_NONINTERACTIVE_SEEN="true" DEBCONF_NOWARNINGS="true" ${ENV} ${COMMANDS}
35
36 return "${?}"
33 return ${?}
3734 }
3835
3936 Chroot_has_package() {
40 PACKAGE="${1}"; shift
41 CHROOT="${2:-chroot}"; shift
37 local PACKAGE="${1}"; shift
38 local CHROOT="${2:-chroot}"; shift
4239
4340 if dpkg-query --admindir=${CHROOT}/var/lib/dpkg -s ${PACKAGE} >/dev/null 2>&1 | grep -q "^Status: install"
4441 then
4845 }
4946
5047 Chroot_package_list() {
51 CHROOT="${1:-chroot}"; shift
48 local CHROOT="${1:-chroot}"; shift
5249
5350 dpkg-query --admindir=${CHROOT}/var/lib/dpkg -W -f'${Package}\n'
5451 }
52
53 Chroot_copy_dir() {
54 local DIR="${1}"
55 local NAME="${2:-$(basename ${DIR})}"
56
57 Check_installed host /usr/bin/rsync rsync
58 if [ "${INSTALL_STATUS}" -eq "0" ]
59 then
60 Echo_message "Copying ${NAME} into chroot using rsync..."
61 rsync -Klrv --chown=0:0 "${DIR}" chroot/
62 else
63 cd "${DIR}"
64 Echo_message "Creating a tarball with files from ${NAME}..."
65 tar cf "${OLDPWD}"/chroot/"${NAME}".tar .
66 cd "${OLDPWD}"
67 Echo_message "Extracting the tarball in the chroot..."
68 Chroot chroot "tar -xvf ${NAME}.tar --no-same-owner --keep-directory-symlink --overwrite"
69 rm chroot/"${NAME}".tar
70 fi
71 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Chroot_bind_path ()
1112 {
13 local CHROOT
14 local BIND_SRC
15 local BIND_DEST
1216 CHROOT="$(readlink -f ${1})"
1317 BIND_SRC="$(readlink -f ${2})"
1418
2529
2630 Chroot_unbind_path ()
2731 {
32 local CHROOT
33 local BIND_SRC
34 local BIND_DEST
2835 CHROOT="$(readlink -f ${1})"
2936 BIND_SRC="$(readlink -f ${2})"
3037
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 NO_COLOR="\033[0m"
1112
13 BOLD="\033[1m"
1214 UNDERSCORE="\033[4m"
1315 BLINK="\033[5m"
1416
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
78 ## under certain conditions; see COPYING for details.
89
910
10 PROGRAM="live-build"
11 VERSION="$(if [ -e ${LIVE_BUILD}/VERSION ]; then cat ${LIVE_BUILD}/VERSION; else cat /usr/share/live/build/VERSION; fi)"
12 CONFIG_VERSION="$(echo ${VERSION} | awk -F- '{ print $1 }')"
11 PROGRAM_NAME="live-build"
12 FRONTEND="lb"
13 PROGRAM="${FRONTEND} $(basename "${0}")"
14 VERSION="$(if [ -e ${LIVE_BUILD}/debian/changelog ]; then sed -e 's/.*(\(.*\)).*/\1/; s/^[0-9]://; q' ${LIVE_BUILD}/debian/changelog; else cat /usr/share/live/build/VERSION; fi)"
1315
14 # FIXME
15 LIVE_BUILD_VERSION="${CONFIG_VERSION}"
16 LIVE_BUILD_VERSION="${VERSION}"
1617
1718 PATH="${PWD}/local/bin:${PATH}"
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
4 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
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.
9
10 # We've added the option to also include files before packages renamed the old directory.
11 # This function auto detects which version should be used.
12 select_includes_chroot(){
13 local OLD_DIR="includes.chroot"
14 local NEW_DIR="includes.chroot_after_packages"
15
16 if Find_files "config/${NEW_DIR}/" && Find_files "config/${OLD_DIR}/"
17 then
18 Echo_error "You have files in ${OLD_DIR} and ${NEW_DIR}. Only one directory is allowed."
19 exit 1
20 fi
21
22 if Find_files "config/${NEW_DIR}/"
23 then
24 echo -n "${NEW_DIR}"
25 elif Find_files "config/${OLD_DIR}/"
26 then
27 echo -n "${OLD_DIR}"
28 fi
29 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
78 ## under certain conditions; see COPYING for details.
89
910
11 Common_conffiles ()
12 {
13 echo "config/all config/common config/bootstrap config/chroot config/binary config/source"
14 }
15
1016 Get_conffiles ()
1117 {
18 local FILES
1219 if [ -n "${LB_CONFIG}" ]
1320 then
1421 FILES="${LB_CONFIG}"
1522 else
16 for FILE in ${@}
17 do
18 FILES="${FILES} ${FILE} ${FILE}.${LB_ARCHITECTURES} ${FILE}.${DISTRIBUTION}"
19 FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||')"
20 FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||').${ARCHITECTURE}"
21 FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||').${DISTRIBUTION}"
23 # List standard files first, then possible user arch/dist overrides
24 FILES="${@}"
25 local FILE
26 for FILE in "${@}"; do
27 FILES="${FILES} ${LB_ARCHITECTURE:+$FILE.$LB_ARCHITECTURE}"
28 FILES="${FILES} ${LB_DISTRIBUTION:+$FILE.$LB_DISTRIBUTION}"
2229 done
2330 fi
2431
2734
2835 Read_conffiles ()
2936 {
37 local CONFFILE
3038 for CONFFILE in $(Get_conffiles "${@}")
3139 do
3240 if [ -f "${CONFFILE}" ]
4452
4553 Print_conffiles ()
4654 {
55 local CONFFILE
4756 for CONFFILE in $(Get_conffiles "${@}")
4857 do
4958 if [ -f "${CONFFILE}" ]
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
78 ## under certain conditions; see COPYING for details.
89
910
10 Get_configuration ()
11 # Prepare config for use, filling in defaults where no value provided for instance
12 #
13 # This function should avoid performing validation checks and failing from invalid values.
14 # Validation should be done through `Validate_config()`.
15 Prepare_config ()
1116 {
12 _CONFIGURATION_FILE="${1}"
13 _FIELD_NAME="${2}"
14
15 if [ -e "${_CONFIGURATION_FILE}" ]
17 # Colouring is re-evaluated here just incase a hard coded override was given in the saved config
18 case "${_COLOR}" in
19 true)
20 _COLOR_OUT="true"
21 _COLOR_ERR="true"
22 ;;
23 false)
24 _COLOR_OUT="false"
25 _COLOR_ERR="false"
26 ;;
27 auto)
28 ;;
29 esac
30 _BREAKPOINTS="${_BREAKPOINTS:-false}"
31 _DEBUG="${_DEBUG:-false}"
32 _FORCE="${_FORCE:-false}"
33 _QUIET="${_QUIET:-false}"
34 _VERBOSE="${_VERBOSE:-false}"
35
36 LB_CONFIGURATION_VERSION="${LB_CONFIGURATION_VERSION:-${LIVE_BUILD_VERSION}}"
37 LIVE_CONFIGURATION_VERSION="${LB_CONFIGURATION_VERSION}" #for backwards compatibility with hooks
38
39 LB_SYSTEM="${LB_SYSTEM:-live}"
40
41 LB_MODE="${LB_MODE:-debian}"
42 LB_DERIVATIVE="false"
43 LB_DISTRIBUTION="${LB_DISTRIBUTION:-bullseye}"
44 LB_DISTRIBUTION_CHROOT="${LB_DISTRIBUTION_CHROOT:-${LB_DISTRIBUTION}}"
45 LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_CHROOT}}"
46
47 # Do a reproducible build, i.e. is SOURCE_DATE_EPOCH already set?
48 _REPRODUCIBLE="${SOURCE_DATE_EPOCH:-false}"
49 if [ "${_REPRODUCIBLE}" != "false" ]; then
50 _REPRODUCIBLE=true
51 fi
52 # For a reproducible build, use UTC per default, otherwise the local time
53 _UTC_TIME_DEFAULT=${_REPRODUCIBLE}
54
55 # The current time: for a unified timestamp throughout the building process
56 export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date '+%s')}"
57
58 LB_UTC_TIME="${LB_UTC_TIME:-${_UTC_TIME_DEFAULT}}"
59 # Set UTC option for use with `date` where applicable
60 if [ "${LB_UTC_TIME}" = "true" ]; then
61 DATE_UTC_OPTION="--utc"
62 else
63 DATE_UTC_OPTION=""
64 fi
65
66 LB_IMAGE_NAME="${LB_IMAGE_NAME:-live-image}"
67 LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso-hybrid}"
68 #for backwards compatibility with hooks
69 LIVE_IMAGE_NAME="${LB_IMAGE_NAME}"
70 LIVE_IMAGE_TYPE="${LB_IMAGE_TYPE}"
71
72 if [ -z "${LB_ARCHITECTURE}" ]; then
73 if command -v dpkg >/dev/null; then
74 LB_ARCHITECTURE="$(dpkg --print-architecture)"
75 else
76 case "$(uname -m)" in
77 x86_64)
78 LB_ARCHITECTURE="amd64"
79 ;;
80
81 i?86)
82 LB_ARCHITECTURE="i386"
83 ;;
84
85 *)
86 Echo_error "Unable to determine current architecture"
87 exit 1
88 ;;
89 esac
90 fi
91 fi
92 # For backwards compat with custom hooks and conditional includes
93 LB_ARCHITECTURES="${LB_ARCHITECTURE}"
94
95 LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-main}"
96 LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS:-${LB_ARCHIVE_AREAS}}"
97 LB_ARCHIVE_AREAS="$(echo "${LB_ARCHIVE_AREAS}" | tr "," " ")"
98 LB_PARENT_ARCHIVE_AREAS="$(echo "${LB_PARENT_ARCHIVE_AREAS}" | tr "," " ")"
99
100 LB_BACKPORTS="${LB_BACKPORTS:-false}"
101 if [ -n "$LB_PARENT_DISTRIBUTION" ]; then
102 LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT:-${LB_PARENT_DISTRIBUTION}}"
103 LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY:-${LB_PARENT_DISTRIBUTION}}"
104 else
105 LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT:-${LB_DISTRIBUTION_CHROOT}}"
106 LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_BINARY}}"
107 fi
108 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION_CHROOT}}"
109
110 LB_APT="${LB_APT:-apt}"
111 LB_APT_FTP_PROXY="${LB_APT_FTP_PROXY}"
112 LB_APT_HTTP_PROXY="${LB_APT_HTTP_PROXY}"
113 LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS:-true}"
114 LB_APT_SECURE="${LB_APT_SECURE:-true}"
115 LB_APT_SOURCE_ARCHIVES="${LB_APT_SOURCE_ARCHIVES:-true}"
116 LB_APT_INDICES="${LB_APT_INDICES:-true}"
117
118 APT_OPTIONS="${APT_OPTIONS:---yes -o Acquire::Retries=5}"
119 APTITUDE_OPTIONS="${APTITUDE_OPTIONS:---assume-yes -o Acquire::Retries=5}"
120
121 BZIP2_OPTIONS="${BZIP2_OPTIONS:--6}"
122 GZIP_OPTIONS="${GZIP_OPTIONS:--6}"
123 LZIP_OPTIONS="${LZIP_OPTIONS:--6}"
124 LZMA_OPTIONS="${LZMA_OPTIONS:--6}"
125 XZ_OPTIONS="${XZ_OPTIONS:--6}"
126
127 if gzip --help | grep -qs "\-\-rsyncable"
16128 then
17 _FIELD_BODY="$(grep ^${_FIELD_NAME}: ${_CONFIGURATION_FILE} | awk '{ $1=""; print $0 }' | sed -e 's|^ ||')"
18 fi
19
20 echo ${_FIELD_BODY}
129 GZIP_OPTIONS="$(echo ${GZIP_OPTIONS} | sed -E -e 's|[ ]?--rsyncable||') --rsyncable"
130 fi
131
132 LB_CACHE="${LB_CACHE:-true}"
133 if [ "${LB_CACHE}" = "false" ]
134 then
135 LB_CACHE_INDICES="false"
136 LB_CACHE_PACKAGES="false"
137 LB_CACHE_STAGES="bootstrap" #bootstrap caching currently required for process to work
138 else
139 LB_CACHE_INDICES="${LB_CACHE_INDICES:-false}"
140 LB_CACHE_PACKAGES="${LB_CACHE_PACKAGES:-true}"
141 LB_CACHE_STAGES="${LB_CACHE_STAGES:-bootstrap}"
142 fi
143 LB_CACHE_STAGES="$(echo "${LB_CACHE_STAGES}" | tr "," " ")"
144
145 LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND:-noninteractive}"
146 LB_DEBCONF_PRIORITY="${LB_DEBCONF_PRIORITY:-critical}"
147
148 case "${LB_SYSTEM}" in
149 live)
150 LB_INITRAMFS="${LB_INITRAMFS:-live-boot}"
151 ;;
152
153 normal)
154 LB_INITRAMFS="${LB_INITRAMFS:-none}"
155 ;;
156 esac
157
158 LB_INITRAMFS_COMPRESSION="${LB_INITRAMFS_COMPRESSION:-gzip}"
159
160 case "${LB_SYSTEM}" in
161 live)
162 LB_INITSYSTEM="${LB_INITSYSTEM:-systemd}"
163 ;;
164
165 normal)
166 LB_INITSYSTEM="${LB_INITSYSTEM:-none}"
167 ;;
168 esac
169
170 if [ "${LB_ARCHITECTURE}" = "i386" ] && [ "${CURRENT_IMAGE_ARCHITECTURE}" = "amd64" ]
171 then
172 # Use linux32 when building amd64 images on i386
173 _LINUX32="linux32"
174 else
175 _LINUX32=""
176 fi
177
178 # Mirrors:
179 # *_MIRROR_BOOTSTRAP: to fetch packages from
180 # *_MIRROR_CHROOT: to fetch packages from
181 # *_MIRROR_CHROOT_SECURITY: security mirror to fetch packages from
182 # *_MIRROR_BINARY: mirror which ends up in the image
183 # *_MIRROR_BINARY_SECURITY: security mirror which ends up in the image
184 # *_MIRROR_DEBIAN_INSTALLER: to fetch installer from
185 if [ "${LB_MODE}" = "debian" ]; then
186 LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://deb.debian.org/debian/}"
187 LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-${LB_MIRROR_BOOTSTRAP}}"
188 fi
189 LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT:-${LB_MIRROR_BOOTSTRAP}}"
190 LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIRROR_CHROOT:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
191 if [ "${LB_MODE}" = "debian" ]; then
192 LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-http://security.debian.org/}"
193 LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-${LB_MIRROR_CHROOT_SECURITY}}"
194
195 LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-http://deb.debian.org/debian/}"
196 LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-${LB_MIRROR_BINARY}}"
197
198 LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-http://security.debian.org/}"
199 LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-${LB_MIRROR_BINARY_SECURITY}}"
200 fi
201 LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
202 LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_PARENT_MIRROR_CHROOT}}"
203
204 LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM:-squashfs}"
205
206 LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-overlay}"
207
208 LB_INTERACTIVE="${LB_INTERACTIVE:-false}"
209
210 LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-debian-archive-keyring}"
211
212 # first, handle existing LB_LINUX_FLAVOURS for backwards compatibility
213 if [ -n "${LB_LINUX_FLAVOURS}" ]; then
214 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS}"
215 fi
216 case "${LB_ARCHITECTURE}" in
217 arm64)
218 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-arm64}"
219 ;;
220
221 armel)
222 # armel will have special images: one rootfs image and many additional kernel images.
223 # therefore we default to all available armel flavours
224 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-marvell}"
225 ;;
226
227 armhf)
228 # armhf will have special images: one rootfs image and many additional kernel images.
229 # therefore we default to all available armhf flavours
230 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-armmp armmp-lpae}"
231 ;;
232
233 amd64)
234 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-amd64}"
235 ;;
236
237 i386)
238 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-686-pae}"
239 ;;
240
241 ia64)
242 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-itanium}"
243 ;;
244
245 powerpc)
246 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-powerpc64 powerpc}"
247 ;;
248
249 ppc64el)
250 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-powerpc64le}"
251 ;;
252
253 s390x)
254 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-s390x}"
255 ;;
256
257 *)
258 Echo_error "Architecture(s) ${LB_ARCHITECTURE} not yet supported (FIXME)"
259 exit 1
260 ;;
261 esac
262
263 LB_LINUX_FLAVOURS=""
264 for FLAVOUR in ${LB_LINUX_FLAVOURS_WITH_ARCH}
265 do
266 ARCH_FILTERED_FLAVOUR="$(echo ${FLAVOUR} | awk -F':' '{print $1}')"
267 LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:+$LB_LINUX_FLAVOURS }${ARCH_FILTERED_FLAVOUR}"
268 done
269
270 LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES:-linux-image}"
271
272 LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat32}"
273
274 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
275 sid|unstable)
276 LB_SECURITY="${LB_SECURITY:-false}"
277 ;;
278
279 *)
280 LB_SECURITY="${LB_SECURITY:-true}"
281 ;;
282 esac
283
284 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
285 sid|unstable)
286 LB_UPDATES="${LB_UPDATES:-false}"
287 ;;
288
289 *)
290 LB_UPDATES="${LB_UPDATES:-true}"
291 ;;
292 esac
293
294 case "${LB_ARCHITECTURE}" in
295 amd64|i386)
296 LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso-hybrid}"
297 ;;
298
299 *)
300 LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso}"
301 ;;
302 esac
303
304 case "${LB_ARCHITECTURE}" in
305 amd64|i386)
306 LB_BOOTLOADER_BIOS="${LB_BOOTLOADER_BIOS:-syslinux}"
307 if ! In_list "${LB_IMAGE_TYPE}" hdd netboot; then
308 LB_BOOTLOADER_EFI="${LB_BOOTLOADER_EFI:-grub-efi}"
309 fi
310 ;;
311 esac
312 # Command line option combines BIOS and EFI selection in one.
313 # Also, need to support old config files that held `LB_BOOTLOADERS`.
314 # Note that this function does not perform validation, so none is done here.
315 if [ -n "${LB_BOOTLOADERS}" ]; then
316 LB_BOOTLOADERS="$(echo "${LB_BOOTLOADERS}" | tr "," " ")"
317 unset LB_BOOTLOADER_BIOS
318 unset LB_BOOTLOADER_EFI
319 local BOOTLOADER
320 for BOOTLOADER in $LB_BOOTLOADERS; do
321 case "${BOOTLOADER}" in
322 grub-legacy|grub-pc|syslinux)
323 LB_BOOTLOADER_BIOS="${BOOTLOADER}"
324 ;;
325 grub-efi)
326 LB_BOOTLOADER_EFI="${BOOTLOADER}"
327 ;;
328 esac
329 done
330 fi
331
332 LB_CHECKSUMS="${LB_CHECKSUMS:-sha256}"
333
334 LB_COMPRESSION="${LB_COMPRESSION:-none}"
335
336 LB_ZSYNC="${LB_ZSYNC:-true}"
337
338 LB_BUILD_WITH_CHROOT="${LB_BUILD_WITH_CHROOT:-true}"
339
340 LB_BUILD_WITH_TMPFS="${LB_BUILD_WITH_TMPFS:-false}"
341
342 LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER:-none}"
343 if [ "${LB_DEBIAN_INSTALLER}" = "false" ]
344 then
345 LB_DEBIAN_INSTALLER="none"
346 Echo_warning "A value of 'false' for option LB_DEBIAN_INSTALLER is deprecated, please use 'none' in future."
347 fi
348 if [ "${LB_DEBIAN_INSTALLER}" = "true" ]
349 then
350 LB_DEBIAN_INSTALLER="netinst"
351 Echo_warning "A value of 'true' for option LB_DEBIAN_INSTALLER is deprecated, please use 'netinst' in future."
352 fi
353
354 LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_DISTRIBUTION}}"
355 LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-true}"
356
357 if [ -z "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
358 then
359 if Find_files config/debian-installer/preseed.cfg
360 then
361 LB_DEBIAN_INSTALLER_PRESEEDFILE="/preseed.cfg"
362 fi
363
364 if Find_files config/debian-installer/*.cfg && [ ! -e config/debian-installer/preseed.cfg ]
365 then
366 Echo_warning "You have placed some preseeding files into config/debian-installer but you didn't specify the default preseeding file through LB_DEBIAN_INSTALLER_PRESEEDFILE. This means that debian-installer will not take up a preseeding file by default."
367 fi
368 fi
369
370 case "${LB_INITRAMFS}" in
371 live-boot)
372 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-boot=live components quiet splash}"
373 LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=788}"
374 ;;
375
376 none)
377 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-quiet splash}"
378 LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=788}"
379 ;;
380 esac
381
382 local _LB_BOOTAPPEND_PRESEED
383 if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
384 then
385 case "${LB_IMAGE_TYPE}" in
386 iso|iso-hybrid)
387 _LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
388 ;;
389
390 hdd)
391 _LB_BOOTAPPEND_PRESEED="file=/hd-media/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
392 ;;
393
394 netboot)
395 case "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" in
396 *://*)
397 _LB_BOOTAPPEND_PRESEED="file=${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
398 ;;
399
400 *)
401 _LB_BOOTAPPEND_PRESEED="file=/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
402 ;;
403 esac
404 ;;
405
406 tar)
407 ;;
408 esac
409 fi
410
411 if [ -n ${_LB_BOOTAPPEND_PRESEED} ]
412 then
413 LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL} ${_LB_BOOTAPPEND_PRESEED}"
414 fi
415
416 LB_BOOTAPPEND_INSTALL="$(echo ${LB_BOOTAPPEND_INSTALL} | sed -e 's/[ \t]*$//')"
417
418 LB_ISO_APPLICATION="${LB_ISO_APPLICATION:-Debian Live}"
419 LB_ISO_PREPARER="${LB_ISO_PREPARER:-live-build @LB_VERSION@; https://salsa.debian.org/live-team/live-build}"
420 LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER:-Debian Live project; https://wiki.debian.org/DebianLive; [email protected]}"
421 # The string @ISOVOLUME_TS@ must have the same length as the output of `date +%Y%m%d-%H:%M`
422 LB_ISO_VOLUME="${LB_ISO_VOLUME:-Debian ${LB_DISTRIBUTION} @ISOVOLUME_TS@}"
423
424 LB_HDD_LABEL="${LB_HDD_LABEL:-DEBIAN_LIVE}"
425 LB_HDD_SIZE="${LB_HDD_SIZE:-auto}"
426
427 LB_MEMTEST="${LB_MEMTEST:-none}"
428 if [ "${LB_MEMTEST}" = "false" ]; then
429 LB_MEMTEST="none"
430 Echo_warning "A value of 'false' for option LB_MEMTEST is deprecated, please use 'none' in future."
431 fi
432
433 case "${LB_ARCHITECTURE}" in
434 amd64|i386)
435 if [ "${LB_DEBIAN_INSTALLER}" != "none" ]; then
436 LB_LOADLIN="${LB_LOADLIN:-true}"
437 else
438 LB_LOADLIN="${LB_LOADLIN:-false}"
439 fi
440 ;;
441
442 *)
443 LB_LOADLIN="${LB_LOADLIN:-false}"
444 ;;
445 esac
446
447 case "${LB_ARCHITECTURE}" in
448 amd64|i386)
449 if [ "${LB_DEBIAN_INSTALLER}" != "none" ]; then
450 LB_WIN32_LOADER="${LB_WIN32_LOADER:-true}"
451 else
452 LB_WIN32_LOADER="${LB_WIN32_LOADER:-false}"
453 fi
454 ;;
455
456 *)
457 LB_WIN32_LOADER="${LB_WIN32_LOADER:-false}"
458 ;;
459 esac
460
461 LB_NET_TARBALL="${LB_NET_TARBALL:-true}"
462
463 LB_ONIE="${LB_ONIE:-false}"
464 LB_ONIE_KERNEL_CMDLINE="${LB_ONIE_KERNEL_CMDLINE:-}"
465
466 LB_FIRMWARE_CHROOT="${LB_FIRMWARE_CHROOT:-true}"
467 LB_FIRMWARE_BINARY="${LB_FIRMWARE_BINARY:-true}"
468
469 LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE:-512}"
470
471 LB_UEFI_SECURE_BOOT="${LB_UEFI_SECURE_BOOT:-auto}"
472
473 LB_SOURCE="${LB_SOURCE:-false}"
474 LB_SOURCE_IMAGES="${LB_SOURCE_IMAGES:-tar}"
475 LB_SOURCE_IMAGES="$(echo "${LB_SOURCE_IMAGES}" | tr "," " ")"
476
477 # Foreign/port bootstrapping
478 if [ -n "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]; then
479 LB_BOOTSTRAP_QEMU_ARCHITECTURE="${LB_BOOTSTRAP_QEMU_ARCHITECTURES}"
480 unset LB_BOOTSTRAP_QEMU_ARCHITECTURES
481 Echo_warning "LB_BOOTSTRAP_QEMU_ARCHITECTURES was renamed to LB_BOOTSTRAP_QEMU_ARCHITECTURE, please updated your config."
482 fi
483 LB_BOOTSTRAP_QEMU_ARCHITECTURE="${LB_BOOTSTRAP_QEMU_ARCHITECTURE:-}"
484 LB_BOOTSTRAP_QEMU_EXCLUDE="${LB_BOOTSTRAP_QEMU_EXCLUDE:-}"
485 LB_BOOTSTRAP_QEMU_STATIC="${LB_BOOTSTRAP_QEMU_STATIC:-}"
21486 }
22487
23 Set_configuration ()
488 Validate_config ()
24489 {
25 _CONFIGURATION_FILE="${1}"
26 _FIELD_NAME="${2}"
27 _FIELD_BODY="${3}"
28
29 if grep -qs "^${_FIELD_NAME}:" "${_CONFIGURATION_FILE}"
30 then
31 # Update configuration
32 sed -i -e "s|^${_FIELD_NAME}:.*$|${_FIELD_NAME}: ${_FIELD_BODY}|" "${_CONFIGURATION_FILE}"
33 else
34 # Append configuration
35 echo "${_FIELD_NAME}: ${_FIELD_BODY}" >> "${_CONFIGURATION_FILE}"
36 fi
490 Validate_config_permitted_values
491 Validate_config_dependencies
37492 }
493
494 # Check values are individually permitted, including:
495 # - value in list of available values
496 # - string lengths within permitted ranges
497 Validate_config_permitted_values ()
498 {
499 if [ "${LB_APT_INDICES}" != "true" ] && [ "${LB_APT_INDICES}" != "false" ]; then
500 Echo_error "Value for LB_APT_INDICES (--apt-indices) can only be 'true' or 'false'!"
501 exit 1
502 fi
503 if [ "${LB_APT_RECOMMENDS}" != "true" ] && [ "${LB_APT_RECOMMENDS}" != "false" ]; then
504 Echo_error "Value for LB_APT_RECOMMENDS (--apt-recommends) can only be 'true' or 'false'!"
505 exit 1
506 fi
507 if [ "${LB_APT_SECURE}" != "true" ] && [ "${LB_APT_SECURE}" != "false" ]; then
508 Echo_error "Value for LB_APT_SECURE (--apt-secure) can only be 'true' or 'false'!"
509 exit 1
510 fi
511 if [ "${LB_APT_SOURCE_ARCHIVES}" != "true" ] && [ "${LB_APT_SOURCE_ARCHIVES}" != "false" ]; then
512 Echo_error "Value for LB_APT_SOURCE_ARCHIVES (--apt-source-archives) can only be 'true' or 'false'!"
513 exit 1
514 fi
515 if [ "${LB_BACKPORTS}" != "true" ] && [ "${LB_BACKPORTS}" != "false" ]; then
516 Echo_error "Value for LB_BACKPORTS (--backports) can only be 'true' or 'false'!"
517 exit 1
518 fi
519 if [ "${LB_BUILD_WITH_CHROOT}" != "true" ] && [ "${LB_BUILD_WITH_CHROOT}" != "false" ]; then
520 Echo_error "Value for LB_BUILD_WITH_CHROOT (--build-with-chroot) can only be 'true' or 'false'!"
521 exit 1
522 fi
523 if [ "${LB_CACHE}" != "true" ] && [ "${LB_CACHE}" != "false" ]; then
524 Echo_error "Value for LB_CACHE (--cache) can only be 'true' or 'false'!"
525 exit 1
526 fi
527 if [ "${LB_CACHE_INDICES}" != "true" ] && [ "${LB_CACHE_INDICES}" != "false" ]; then
528 Echo_error "Value for LB_CACHE_INDICES (--cache-indices) can only be 'true' or 'false'!"
529 exit 1
530 fi
531 if [ "${LB_CACHE_PACKAGES}" != "true" ] && [ "${LB_CACHE_PACKAGES}" != "false" ]; then
532 Echo_error "Value for LB_CACHE_PACKAGES (--cache-packages) can only be 'true' or 'false'!"
533 exit 1
534 fi
535 if [ "${LB_DEBIAN_INSTALLER_GUI}" != "true" ] && [ "${LB_DEBIAN_INSTALLER_GUI}" != "false" ]; then
536 Echo_error "Value for LB_DEBIAN_INSTALLER_GUI (--debian-installer-gui) can only be 'true' or 'false'!"
537 exit 1
538 fi
539 if [ "${LB_FIRMWARE_BINARY}" != "true" ] && [ "${LB_FIRMWARE_BINARY}" != "false" ]; then
540 Echo_error "Value for LB_FIRMWARE_BINARY (--firmware-binary) can only be 'true' or 'false'!"
541 exit 1
542 fi
543 if [ "${LB_FIRMWARE_CHROOT}" != "true" ] && [ "${LB_FIRMWARE_CHROOT}" != "false" ]; then
544 Echo_error "Value for LB_FIRMWARE_CHROOT (--firmware-chroot) can only be 'true' or 'false'!"
545 exit 1
546 fi
547 if [ "${LB_LOADLIN}" != "true" ] && [ "${LB_LOADLIN}" != "false" ]; then
548 Echo_error "Value for LB_LOADLIN (--loadlin) can only be 'true' or 'false'!"
549 exit 1
550 fi
551 if [ "${LB_NET_TARBALL}" != "true" ] && [ "${LB_NET_TARBALL}" != "false" ]; then
552 Echo_error "Value for LB_NET_TARBALL (--net-tarball) can only be 'true' or 'false'!"
553 exit 1
554 fi
555 if [ "${LB_ONIE}" != "true" ] && [ "${LB_ONIE}" != "false" ]; then
556 Echo_error "Value for LB_ONIE (--onie) can only be 'true' or 'false'!"
557 exit 1
558 fi
559 if [ "${LB_SECURITY}" != "true" ] && [ "${LB_SECURITY}" != "false" ]; then
560 Echo_error "Value for LB_SECURITY (--security) can only be 'true' or 'false'!"
561 exit 1
562 fi
563 if [ "${LB_SOURCE}" != "true" ] && [ "${LB_SOURCE}" != "false" ]; then
564 Echo_error "Value for LB_SOURCE (--source) can only be 'true' or 'false'!"
565 exit 1
566 fi
567 if [ "${LB_UPDATES}" != "true" ] && [ "${LB_UPDATES}" != "false" ]; then
568 Echo_error "Value for LB_UPDATES (--updates) can only be 'true' or 'false'!"
569 exit 1
570 fi
571 if [ "${LB_UTC_TIME}" != "true" ] && [ "${LB_UTC_TIME}" != "false" ]; then
572 Echo_error "Value for LB_UTC_TIME (--utc-time) can only be 'true' or 'false'!"
573 exit 1
574 fi
575 if [ "${LB_WIN32_LOADER}" != "true" ] && [ "${LB_WIN32_LOADER}" != "false" ]; then
576 Echo_error "Value for LB_WIN32_LOADER (--win32-loader) can only be 'true' or 'false'!"
577 exit 1
578 fi
579 if [ "${LB_ZSYNC}" != "true" ] && [ "${LB_ZSYNC}" != "false" ]; then
580 Echo_error "Value for LB_ZSYNC (--zsync) can only be 'true' or 'false'!"
581 exit 1
582 fi
583
584 if ! In_list "${LB_APT}" apt apt-get aptitude; then
585 Echo_error "You have specified an invalid value for LB_APT (--apt)."
586 exit 1
587 fi
588
589 if ! In_list "${LB_BINARY_FILESYSTEM}" fat16 fat32 ext2 ext3 ext4 ntfs; then
590 Echo_error "You have specified an invalid value for LB_BINARY_FILESYSTEM (--binary-filesystem)."
591 exit 1
592 fi
593
594 if ! In_list "${LB_IMAGE_TYPE}" iso iso-hybrid hdd tar netboot; then
595 Echo_error "You have specified an invalid value for --binary-image."
596 exit 1
597 fi
598
599 if [ -z "${LB_BOOTLOADER_BIOS}" ] && [ -z "${LB_BOOTLOADER_EFI}" ]; then
600 Echo_warning "You have specified no bootloaders; I predict that you will experience some problems!"
601 fi
602 if [ -n "${LB_BOOTLOADER_BIOS}" ] && ! In_list "${LB_BOOTLOADER_BIOS}" grub-legacy grub-pc syslinux; then
603 Echo_error "You have specified an invalid BIOS bootloader."
604 exit 1
605 fi
606 if [ -n "${LB_BOOTLOADER_EFI}" ] && ! In_list "${LB_BOOTLOADER_EFI}" grub-efi; then
607 Echo_error "You have specified an invalid EFI bootloader."
608 exit 1
609 fi
610 if [ -n "${LB_BOOTLOADERS}" ]; then
611 local BOOTLOADER
612 local BOOTLOADERS_BIOS=0
613 local BOOTLOADERS_EFI=0
614 for BOOTLOADER in $LB_BOOTLOADERS; do
615 # Note, multiple instances of the same bootloader should be rejected,
616 # to avoid issues (e.g. in `binary_iso` bootloader handling).
617 case "${BOOTLOADER}" in
618 grub-legacy|grub-pc|syslinux)
619 BOOTLOADERS_BIOS=$(( $BOOTLOADERS_BIOS + 1 ))
620 ;;
621 grub-efi)
622 BOOTLOADERS_EFI=$(( $BOOTLOADERS_EFI + 1 ))
623 ;;
624 *)
625 Echo_error "The following is not a valid bootloader: '%s'" "${BOOTLOADER}"
626 exit 1
627 ;;
628 esac
629 done
630 if [ $BOOTLOADERS_BIOS -ge 2 ]; then
631 Echo_error "Invalid bootloader selection. Multiple BIOS instances specified."
632 exit 1
633 fi
634 if [ $BOOTLOADERS_EFI -ge 2 ]; then
635 Echo_error "Invalid bootloader selection. Multiple EFI instances specified."
636 exit 1
637 fi
638 if [ $BOOTLOADERS_BIOS -eq 0 ] && [ $BOOTLOADERS_EFI -eq 0 ]; then
639 Echo_warning "You have specified no bootloaders; I predict that you will experience some problems!"
640 fi
641 fi
642
643 local CACHE_STAGE
644 for CACHE_STAGE in ${LB_CACHE_STAGES}; do
645 if ! In_list "${CACHE_STAGE}" bootstrap chroot installer binary source; then
646 Echo_warning "The following is not a valid stage: '%s'" "${CACHE_STAGE}"
647 fi
648 done
649
650 if ! In_list "${LB_CHECKSUMS}" md5 sha1 sha224 sha256 sha384 sha512 none; then
651 Echo_error "You have specified an invalid value for LB_CHECKSUMS (--checksums)."
652 exit 1
653 fi
654
655 if ! In_list "${LB_CHROOT_FILESYSTEM}" ext2 ext3 ext4 squashfs jffs2 none; then
656 Echo_error "You have specified an invalid value for LB_CHROOT_FILESYSTEM (--chroot-filesystem)."
657 exit 1
658 fi
659
660 if ! In_list "${LB_COMPRESSION}" bzip2 gzip lzip xz none; then
661 Echo_error "You have specified an invalid value for LB_COMPRESSION (--compression)."
662 exit 1
663 fi
664
665 if ! In_list "${LB_DEBCONF_FRONTEND}" dialog editor noninteractive readline; then
666 Echo_error "You have specified an invalid value for LB_DEBCONF_FRONTEND (--debconf-frontend)."
667 exit 1
668 fi
669
670 if ! In_list "${LB_DEBCONF_PRIORITY}" low medium high critical; then
671 Echo_error "You have specified an invalid value for LB_DEBCONF_PRIORITY (--debconf-priority)."
672 exit 1
673 fi
674
675 if ! In_list "${LB_DEBIAN_INSTALLER}" cdrom netinst netboot businesscard live none; then
676 Echo_error "You have specified an invalid value for LB_DEBIAN_INSTALLER (--debian-installer)."
677 exit 1
678 fi
679
680 if echo ${LB_HDD_LABEL} | grep -qs ' '; then
681 Echo_error "Whitespace is not currently supported in HDD labels (LB_HDD_LABEL; --hdd-label)."
682 exit 1
683 fi
684
685 if ! In_list "${LB_INITRAMFS}" none live-boot; then
686 Echo_error "You have specified an invalid value for LB_INITRAMFS (--initramfs)."
687 exit 1
688 fi
689
690 if ! In_list "${LB_INITRAMFS_COMPRESSION}" bzip2 gzip lzma; then
691 Echo_error "You have specified an invalid value for LB_INITRAMFS_COMPRESSION (--initramfs-compression)."
692 exit 1
693 fi
694
695 if ! In_list "${LB_INITSYSTEM}" sysvinit systemd none; then
696 Echo_error "You have specified an invalid value for LB_INITSYSTEM (--initsystem)."
697 exit 1
698 fi
699
700 if ! In_list "${LB_INTERACTIVE}" true shell x11 xnest false; then
701 Echo_error "You have specified an invalid value for LB_INTERACTIVE (--interactive)."
702 exit 1
703 fi
704
705 if [ "$(echo \"${LB_ISO_APPLICATION}\" | wc -c)" -gt 128 ]; then
706 Echo_warning "You have specified a value of LB_ISO_APPLICATION (--iso-application) that is too long; the maximum length is 128 characters."
707 fi
708
709 if [ "$(echo \"${LB_ISO_PREPARER}\" | wc -c)" -gt 128 ]; then
710 Echo_warning "You have specified a value of LB_ISO_PREPARER (--iso-preparer) that is too long; the maximum length is 128 characters."
711 fi
712
713 if [ "$(echo \"${LB_ISO_PUBLISHER}\" | wc -c)" -gt 128 ]; then
714 Echo_warning "You have specified a value of LB_ISO_PUBLISHER (--iso-publisher) that is too long; the maximum length is 128 characters."
715 fi
716
717 if [ "$(eval "echo \"${LB_ISO_VOLUME}\"" | wc -c)" -gt 32 ]; then
718 Echo_warning "You have specified a value of LB_ISO_VOLUME (--iso-volume) that is too long; the maximum length is 32 characters."
719 fi
720
721 if ! In_list "${LB_MEMTEST}" memtest86+ memtest86 none; then
722 Echo_error "You have specified an invalid value for LB_MEMTEST (--memtest)."
723 exit 1
724 fi
725
726 if ! In_list "${LB_SOURCE_IMAGES}" iso netboot tar hdd; then
727 Echo_error "You have specified an invalid value for LB_SOURCE_IMAGES (--source-images)."
728 exit 1
729 fi
730
731 if ! In_list "${LB_SYSTEM}" live normal; then
732 Echo_error "You have specified an invalid value for LB_SYSTEM (--system)."
733 exit 1
734 fi
735
736 if ! In_list "${LB_UEFI_SECURE_BOOT}" auto enable disable; then
737 Echo_error "You have specified an invalid value for LB_UEFI_SECURE_BOOT (--uefi-secure-boot)."
738 exit 1
739 fi
740 }
741
742 # Check option combinations and other extra stuff
743 Validate_config_dependencies ()
744 {
745 if [ "${LB_BINARY_FILESYSTEM}" = "ntfs" ] && ! command -v ntfs-3g >/dev/null; then
746 Echo_error "Using ntfs as the binary filesystem is currently only supported if ntfs-3g is installed on the host system."
747 exit 1
748 fi
749
750 if [ "${LB_DEBIAN_INSTALLER}" != "none" ] && [ "${LB_DEBIAN_INSTALLER}" != "live" ]; then
751 # d-i true, no caching
752 if ! In_list "bootstrap" ${LB_CACHE_STAGES} || [ "${LB_CACHE}" != "true" ] || [ "${LB_CACHE_PACKAGES}" != "true" ]
753 then
754 Echo_warning "You have selected values of LB_CACHE, LB_CACHE_PACKAGES, LB_CACHE_STAGES and LB_DEBIAN_INSTALLER which will result in 'bootstrap' packages not being cached. This configuration is potentially unsafe as the bootstrap packages are re-used when integrating the Debian Installer."
755 fi
756 fi
757
758 if In_list "syslinux" $LB_BOOTLOADERS; then
759 # syslinux + fat or ntfs, or extlinux + ext[234] or btrfs
760 if ! In_list "${LB_BINARY_FILESYSTEM}" fat16 fat32 ntfs ext2 ext3 ext4 btrfs; then
761 Echo_warning "You have selected values of LB_BOOTLOADERS and LB_BINARY_FILESYSTEM which are incompatible - the syslinux family only support FAT, NTFS, ext[234] or btrfs filesystems."
762 fi
763 fi
764
765 if In_list "grub-pc" ${LB_BOOTLOADERS} || In_list "grub-efi" ${LB_BOOTLOADERS} || In_list "grub-legacy" ${LB_BOOTLOADERS}; then
766 if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
767 Echo_error "You have selected an invalid combination of bootloaders and live image type; the grub-* bootloaders are not compatible with hdd and netboot types."
768 exit 1
769 fi
770 fi
771 }
+0
-74
functions/cursor.sh less more
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 Cursor_goto_position ()
11 {
12 __LINE="${1}"
13 __COLUMN="${2}"
14
15 #echo -e "[${__LINE};${__COLUMN};H\c"
16 printf "[${__LINE};${__COLUMN};H"
17 }
18
19 Cursor_save_position ()
20 {
21 #echo -e "\c"
22 printf ""
23 }
24
25 Cursor_restore_position ()
26 {
27 #echo -e "\c"
28 printf ""
29 }
30
31 Cursor_line_up ()
32 {
33 __LINES="${1}"
34
35 #echo -e "[${__LINES}A\c"
36 printf "[${__LINES}A"
37 }
38
39 Cursor_line_down ()
40 {
41 __LINES="${1}"
42
43 #echo -e "[${__LINES}B\c"
44 printf "[${__LINES}B"
45 }
46
47 Cursor_columns_forward ()
48 {
49 __COLUMNS="${1}"
50
51 #echo -e "[${__COLUMNS}C\c"
52 printf "[${__COLUMNS}C"
53 }
54
55 Cursor_columns_backward ()
56 {
57 __COLUMNS="${1}"
58
59 #echo -e "[${__COLUMNS}D\c"
60 printf "[${__COLUMNS}D"
61 }
62
63 Cursor_clear_screen ()
64 {
65 #echo -e "\c"
66 printf ""
67 }
68
69 Cursor_erase_EOL ()
70 {
71 #echo -e "\c"
72 printf ""
73 }
+0
-887
functions/defaults.sh less more
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 New_configuration ()
11 {
12 ## Runtime
13
14 # Image: Architecture
15 if [ -x "/usr/bin/dpkg" ]
16 then
17 CURRENT_IMAGE_ARCHITECTURE="$(dpkg --print-architecture)"
18 else
19 case "$(uname -m)" in
20 x86_64)
21 CURRENT_IMAGE_ARCHITECTURE="amd64"
22 ;;
23
24 i?86)
25 CURRENT_IMAGE_ARCHITECTURE="i386"
26 ;;
27
28 *)
29 Echo_warning "Unable to determine current architecture, using ${CURRENT_IMAGE_ARCHITECTURE}"
30 ;;
31 esac
32 fi
33
34
35 ## Configuration
36
37 # Configuration-Version
38 LIVE_CONFIGURATION_VERSION="${LIVE_CONFIGURATION_VERSION:-$(Get_configuration config/build Configuration-Version)}"
39 LIVE_CONFIGURATION_VERSION="${LIVE_CONFIGURATION_VERSION:-${LIVE_BUILD_VERSION}}"
40 export LIVE_CONFIGURATION_VERSION
41
42 # Image: Name
43 LIVE_IMAGE_NAME="${LIVE_IMAGE_NAME:-$(Get_configuration config/build Name)}"
44 LIVE_IMAGE_NAME="${LIVE_IMAGE_NAME:-live-image}"
45 export LIVE_IMAGE_NAME
46
47 # Image: Architecture (FIXME: Support and default to 'any')
48 LB_ARCHITECTURES="${LB_ARCHITECTURES:-$(Get_configuration config/build Architecture)}"
49 LB_ARCHITECTURES="${LB_ARCHITECTURES:-${CURRENT_IMAGE_ARCHITECTURE}}"
50 export LB_ARCHITECTURES
51
52 # Image: Archive Areas
53 LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-$(Get_configuration config/build Archive-Areas)}"
54
55 case "${LB_MODE}" in
56 progress-linux)
57 LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-main contrib non-free}"
58 ;;
59
60 *)
61 LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-main}"
62 ;;
63 esac
64
65 export LB_ARCHIVE_AREAS
66
67 # Image: Archive Areas
68 LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS:-$(Get_configuration config/build Parent-Archive-Areas)}"
69 LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS:-${LB_ARCHIVE_AREAS}}"
70 export LB_PARENT_ARCHIVE_AREAS
71
72 # Image: Type
73 LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-$(Get_configuration config/build Type)}"
74 LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
75 export LIVE_IMAGE_TYPE
76 }
77
78 Set_defaults ()
79 {
80 # FIXME
81 New_configuration
82
83 ## config/common
84
85 if [ -e local/live-build ]
86 then
87 LIVE_BUILD="${LIVE_BUILD:-${PWD}/local/live-build}"
88 export LIVE_BUILD
89 fi
90
91 # Setting system type
92 LB_SYSTEM="${LB_SYSTEM:-live}"
93
94 # Setting mode (currently: debian, progress-linux)
95 if [ -x /usr/bin/lsb_release ]
96 then
97 _DISTRIBUTOR="$(lsb_release -is | tr "[A-Z]" "[a-z]")"
98
99 case "${_DISTRIBUTOR}" in
100 debian|progress-linux)
101 LB_MODE="${LB_MODE:-${_DISTRIBUTOR}}"
102 ;;
103
104 *)
105 LB_MODE="${LB_MODE:-debian}"
106 ;;
107 esac
108 else
109 if [ -e /etc/progress-linux_version ]
110 then
111 LB_MODE="${LB_MODE:-progress-linux}"
112 else
113 LB_MODE="${LB_MODE:-debian}"
114 fi
115 fi
116
117 # Setting distribution name
118 case "${LB_MODE}" in
119 progress-linux)
120 LB_DISTRIBUTION="${LB_DISTRIBUTION:-cairon}"
121 LB_DERIVATIVE="true"
122 LB_DERIVATIVE_IS_BASED_ON="debian"
123 ;;
124
125 *)
126 LB_DISTRIBUTION="${LB_DISTRIBUTION:-buster}"
127 LB_DERIVATIVE="false"
128 ;;
129 esac
130 LB_DISTRIBUTION_CHROOT="${LB_DISTRIBUTION_CHROOT:-${LB_DISTRIBUTION}}"
131 LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_CHROOT}}"
132
133
134 case "${LB_MODE}" in
135 progress-linux)
136 case "${LB_DISTRIBUTION}" in
137 baureo|baureo-backports)
138 LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION:-wheezy}"
139 ;;
140
141 cairon|cairon-backports)
142 LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION:-sid}"
143 ;;
144 esac
145
146 LB_BACKPORTS="${LB_BACKPORTS:-true}"
147 ;;
148
149 *)
150 LB_BACKPORTS="${LB_BACKPORTS:-false}"
151 ;;
152 esac
153 if [ -n "$LB_PARENT_DISTRIBUTION" ]; then
154 LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT:-${LB_PARENT_DISTRIBUTION}}"
155 LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY:-${LB_PARENT_DISTRIBUTION}}"
156 else
157 LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT:-${LB_DISTRIBUTION_CHROOT}}"
158 LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_BINARY}}"
159 fi
160 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION_CHROOT}}"
161
162 # Setting package manager
163 LB_APT="${LB_APT:-apt}"
164
165 # Setting apt ftp proxy
166 LB_APT_FTP_PROXY="${LB_APT_FTP_PROXY}"
167
168 # Setting apt http proxy
169 LB_APT_HTTP_PROXY="${LB_APT_HTTP_PROXY}"
170
171 # Setting apt pipeline
172 # LB_APT_PIPELINE
173
174 APT_OPTIONS="${APT_OPTIONS:---yes}"
175 APTITUDE_OPTIONS="${APTITUDE_OPTIONS:---assume-yes}"
176
177 BZIP2_OPTIONS="${BZIP2_OPTIONS:--6}"
178
179 GZIP_OPTIONS="${GZIP_OPTIONS:--6}"
180
181 if gzip --help | grep -qs "\-\-rsyncable"
182 then
183 GZIP_OPTIONS="$(echo ${GZIP_OPTIONS} | sed -e 's|--rsyncable||') --rsyncable"
184 fi
185
186 LZIP_OPTIONS="${LZIP_OPTIONS:--6}"
187
188 LZMA_OPTIONS="${LZMA_OPTIONS:--6}"
189
190 XZ_OPTIONS="${XZ_OPTIONS:--6}"
191
192 # Setting apt recommends
193 case "${LB_MODE}" in
194 progress-linux)
195 LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS:-false}"
196 ;;
197
198 *)
199 LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS:-true}"
200 ;;
201 esac
202
203 # Setting apt secure
204 LB_APT_SECURE="${LB_APT_SECURE:-true}"
205
206 # Setting apt source
207 case "${LB_MODE}" in
208 progress-linux)
209 LB_APT_SOURCE_ARCHIVES="${LB_APT_SOURCE_ARCHIVES:-false}"
210 ;;
211
212 *)
213 LB_APT_SOURCE_ARCHIVES="${LB_APT_SOURCE_ARCHIVES:-true}"
214 ;;
215 esac
216
217 # Setting cache option
218 LB_CACHE="${LB_CACHE:-true}"
219 LB_CACHE_INDICES="${LB_CACHE_INDICES:-false}"
220 LB_CACHE_PACKAGES="${LB_CACHE_PACKAGES:-true}"
221 LB_CACHE_STAGES="${LB_CACHE_STAGES:-bootstrap}"
222
223 # Setting debconf frontend
224 LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND:-noninteractive}"
225 LB_DEBCONF_PRIORITY="${LB_DEBCONF_PRIORITY:-critical}"
226
227 # Setting initramfs hook
228 case "${LB_SYSTEM}" in
229 live)
230 LB_INITRAMFS="${LB_INITRAMFS:-live-boot}"
231 ;;
232
233 normal)
234 LB_INITRAMFS="${LB_INITRAMFS:-none}"
235 ;;
236 esac
237
238 LB_INITRAMFS_COMPRESSION="${LB_INITRAMFS_COMPRESSION:-gzip}"
239
240 # Setting initsystem
241 case "${LB_MODE}" in
242 progress-linux)
243 case "${LB_DISTRIBUTION}" in
244 cairon*)
245 LB_INITSYSTEM="${LB_INITSYSTEM:-systemd}"
246 ;;
247
248 *)
249 LB_INITSYSTEM="${LB_INITSYSTEM:-sysvinit}"
250 ;;
251 esac
252 ;;
253
254 *)
255 case "${LB_SYSTEM}" in
256 live)
257 LB_INITSYSTEM="${LB_INITSYSTEM:-systemd}"
258 ;;
259
260 normal)
261 LB_INITSYSTEM="${LB_INITSYSTEM:-none}"
262 ;;
263 esac
264 ;;
265 esac
266
267 # Setting fdisk
268 if [ -z "${LB_FDISK}" ] || [ ! -x "${LB_FDISK}" ]
269 then
270 # Workaround for gnu-fdisk divertion
271 # (gnu-fdisk is buggy, #445304).
272 if [ -x /sbin/fdisk.distrib ]
273 then
274 LB_FDISK="fdisk.distrib"
275 elif [ -x /sbin/fdisk ]
276 then
277 LB_FDISK="fdisk"
278 else
279 Echo_error "Can't process file /sbin/fdisk"
280 fi
281 fi
282
283 # Setting losetup
284 if [ -z "${LB_LOSETUP}" ] || [ "${LB_LOSETUP}" != "/sbin/losetup.orig" ]
285 then
286 # Workaround for loop-aes-utils divertion
287 # (loop-aes-utils' losetup lacks features).
288 if [ -x /sbin/losetup.orig ]
289 then
290 LB_LOSETUP="losetup.orig"
291 elif [ -x /sbin/losetup ]
292 then
293 LB_LOSETUP="losetup"
294 else
295 Echo_error "Can't process file /sbin/losetup"
296 fi
297 fi
298
299 if [ "${LB_ARCHITECTURES}" = "i386" ] && [ "${CURRENT_IMAGE_ARCHITECTURE}" = "amd64" ]
300 then
301 # Use linux32 when building amd64 images on i386
302 _LINUX32="linux32"
303 else
304 _LINUX32=""
305 fi
306
307 # Setting tasksel
308 LB_TASKSEL="${LB_TASKSEL:-apt}"
309
310 # Setting root directory
311 case "${LB_MODE}" in
312 progress-linux)
313 LB_ROOT="${LB_ROOT:-progress-linux}"
314 ;;
315
316 *)
317 LB_ROOT="${LB_ROOT:-${LB_MODE}-live}"
318 ;;
319 esac
320
321 # Setting live build options
322 _BREAKPOINTS="${_BREAKPOINTS:-false}"
323 _COLOR="${_COLOR:-false}"
324 _DEBUG="${_DEBUG:-false}"
325 _FORCE="${_FORCE:-false}"
326 _QUIET="${_QUIET:-false}"
327 _VERBOSE="${_VERBOSE:-false}"
328
329 ## config/bootstrap
330
331 # Setting mirror to fetch packages from
332 case "${LB_MODE}" in
333 debian)
334 LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://deb.debian.org/debian/}"
335 LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-${LB_MIRROR_BOOTSTRAP}}"
336 ;;
337
338 progress-linux)
339 LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-http://deb.debian.org/debian/}"
340 LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://cdn.archive.progress-linux.org/packages/}"
341 ;;
342 esac
343
344 LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIRROR_CHROOT:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
345 LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT:-${LB_MIRROR_BOOTSTRAP}}"
346
347 # Setting security mirror to fetch packages from
348 case "${LB_MODE}" in
349 debian)
350 LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-http://security.debian.org/}"
351 LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-${LB_MIRROR_CHROOT_SECURITY}}"
352 ;;
353
354 progress-linux)
355 LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-http://security.debian.org/}"
356 LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-${LB_MIRROR_CHROOT}}"
357 ;;
358 esac
359
360 # Setting mirror which ends up in the image
361 case "${LB_MODE}" in
362 debian)
363 LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-http://deb.debian.org/debian/}"
364 LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-${LB_MIRROR_BINARY}}"
365 ;;
366
367 progress-linux)
368 LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-http://deb.debian.org/debian/}"
369 LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-${LB_MIRROR_CHROOT}}"
370 ;;
371 esac
372
373 # Setting security mirror which ends up in the image
374 case "${LB_MODE}" in
375 debian)
376 LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-http://security.debian.org/}"
377 LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-${LB_MIRROR_BINARY_SECURITY}}"
378 ;;
379
380 progress-linux)
381 LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-http://security.debian.org/}"
382 LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-${LB_MIRROR_CHROOT}}"
383 ;;
384 esac
385
386 case "${LB_MODE}" in
387 progress-linux)
388 LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
389 LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
390 ;;
391
392 *)
393 LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
394 LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_PARENT_MIRROR_CHROOT}}"
395 ;;
396 esac
397
398 ## config/chroot
399
400 # Setting chroot filesystem
401 LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM:-squashfs}"
402
403 # Setting union filesystem
404 LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-overlay}"
405
406 # Setting interactive shell/X11/Xnest
407 LB_INTERACTIVE="${LB_INTERACTIVE:-false}"
408
409 # Setting keyring packages
410 LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-debian-archive-keyring}"
411
412 # Setting linux flavour string
413 case "${LB_ARCHITECTURES}" in
414 arm64)
415 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-arm64}"
416 ;;
417
418 armel)
419 # armel will have special images: one rootfs image and many additional kernel images.
420 # therefore we default to all available armel flavours
421 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-marvell}"
422 ;;
423
424 armhf)
425 # armhf will have special images: one rootfs image and many additional kernel images.
426 # therefore we default to all available armhf flavours
427 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-armmp armmp-lpae}"
428 ;;
429
430 amd64)
431 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-amd64}"
432 ;;
433
434 i386)
435 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-686-pae}"
436 ;;
437
438 ia64)
439 case "${LB_MODE}" in
440 progress-linux)
441 Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
442 exit 1
443 ;;
444
445 *)
446 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-itanium}"
447 ;;
448 esac
449 ;;
450
451 powerpc)
452 case "${LB_MODE}" in
453 progress-linux)
454 Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
455 exit 1
456 ;;
457
458 *)
459 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-powerpc64 powerpc}"
460 ;;
461 esac
462 ;;
463
464 s390x)
465 case "${LB_MODE}" in
466 progress-linux)
467 Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
468 exit 1
469 ;;
470
471 *)
472 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-s390x}"
473 ;;
474 esac
475 ;;
476
477 *)
478 Echo_error "Architecture(s) ${LB_ARCHITECTURES} not yet supported (FIXME)"
479 exit 1
480 ;;
481 esac
482
483 LB_LINUX_FLAVOURS=""
484 for FLAVOUR in ${LB_LINUX_FLAVOURS_WITH_ARCH}
485 do
486 ARCH_FILTERED_FLAVOUR="$(echo ${FLAVOUR} | awk -F':' '{print $1}')"
487 LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS} ${ARCH_FILTERED_FLAVOUR}"
488 done
489
490
491 # Set linux packages
492 LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES:-linux-image}"
493
494 # Setting security updates option
495 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
496 sid)
497 LB_SECURITY="${LB_SECURITY:-false}"
498 ;;
499
500 *)
501 LB_SECURITY="${LB_SECURITY:-true}"
502 ;;
503 esac
504
505 # Setting updates updates option
506 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
507 sid)
508 LB_UPDATES="${LB_UPDATES:-false}"
509 ;;
510
511 *)
512 LB_UPDATES="${LB_UPDATES:-true}"
513 ;;
514 esac
515
516 ## config/binary
517
518 # Setting image filesystem
519 LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat32}"
520
521 # Setting image type
522 case "${LB_ARCHITECTURES}" in
523 amd64|i386)
524 LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
525 ;;
526
527 *)
528 LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso}"
529 ;;
530 esac
531
532 # Setting apt indices
533 case "${LB_MODE}" in
534 progress-linux)
535 LB_APT_INDICES="${LB_APT_INDICES:-false}"
536 ;;
537
538 *)
539 LB_APT_INDICES="${LB_APT_INDICES:-true}"
540 ;;
541 esac
542
543 # Setting bootloader
544 if [ -z "${LB_BOOTLOADERS}" ]
545 then
546 case "${LB_ARCHITECTURES}" in
547 amd64|i386)
548 LB_BOOTLOADERS="syslinux,grub-efi"
549 ;;
550 esac
551 fi
552
553 LB_FIRST_BOOTLOADER=$(echo "${LB_BOOTLOADERS}" | awk -F, '{ print $1 }')
554
555 # Setting checksums
556 case "${LB_MODE}" in
557 progress-linux)
558 LB_CHECKSUMS="${LB_CHECKSUMS:-sha256}"
559 ;;
560
561 *)
562 LB_CHECKSUMS="${LB_CHECKSUMS:-md5}"
563 ;;
564 esac
565
566 # Setting compression
567 LB_COMPRESSION="${LB_COMPRESSION:-none}"
568
569 # Setting zsync
570 LB_ZSYNC="${LB_ZSYNC:-true}"
571
572 # Setting chroot option
573 LB_BUILD_WITH_CHROOT="${LB_BUILD_WITH_CHROOT:-true}"
574
575 LB_BUILD_WITH_TMPFS="${LB_BUILD_WITH_TMPFS:-false}"
576
577 # Setting debian-installer option
578 LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER:-false}"
579
580 LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_DISTRIBUTION}}"
581
582 # Setting debian-installer-gui
583 case "${LB_MODE}" in
584 debian|progress-linux)
585 LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-true}"
586 ;;
587
588 *)
589 LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-false}"
590 ;;
591 esac
592
593 # Setting debian-installer preseed filename
594 if [ -z "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
595 then
596 if Find_files config/debian-installer/preseed.cfg
597 then
598 LB_DEBIAN_INSTALLER_PRESEEDFILE="/preseed.cfg"
599 fi
600
601 if Find_files config/debian-installer/*.cfg && [ ! -e config/debian-installer/preseed.cfg ]
602 then
603 Echo_warning "You have placed some preseeding files into config/debian-installer but you didn't specify the default preseeding file through LB_DEBIAN_INSTALLER_PRESEEDFILE. This means that debian-installer will not take up a preseeding file by default."
604 fi
605 fi
606
607 # Setting boot parameters
608 case "${LB_INITRAMFS}" in
609 live-boot)
610 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-boot=live components quiet splash}"
611 LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal}"
612 ;;
613
614 none)
615 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-quiet splash}"
616 LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal}"
617 ;;
618 esac
619
620 if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
621 then
622 case "${LIVE_IMAGE_TYPE}" in
623 iso*)
624 _LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
625 ;;
626
627 hdd*)
628 _LB_BOOTAPPEND_PRESEED="file=/hd-media/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
629 ;;
630
631 netboot)
632 case "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" in
633 *://*)
634 _LB_BOOTAPPEND_PRESEED="file=${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
635 ;;
636
637 *)
638 _LB_BOOTAPPEND_PRESEED="file=/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
639 ;;
640 esac
641 ;;
642 esac
643 fi
644
645 if [ -n ${_LB_BOOTAPPEND_PRESEED} ]
646 then
647 LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL} ${_LB_BOOTAPPEND_PRESEED}"
648 fi
649
650 LB_BOOTAPPEND_INSTALL="$(echo ${LB_BOOTAPPEND_INSTALL} | sed -e 's/[ \t]*$//')"
651
652 # Setting grub splash
653 # LB_GRUB_SPLASH
654
655 # Setting iso author
656 case "${LB_MODE}" in
657 debian)
658 LB_ISO_APPLICATION="${LB_ISO_APPLICATION:-Debian Live}"
659 ;;
660
661 progress-linux)
662 LB_ISO_APPLICATION="${LB_ISO_APPLICATION:-Progress Linux}"
663 ;;
664 esac
665
666 # Set iso preparer
667 LB_ISO_PREPARER="${LB_ISO_PREPARER:-live-build \$VERSION; https://salsa.debian.org/live-team/live-build}"
668
669 # Set iso publisher
670 case "${LB_MODE}" in
671 progress-linux)
672 LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER:-Progress Linux; http://www.progress-linux.org/; [email protected]}"
673 ;;
674
675 *)
676 LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER:-Live Systems project; https://wiki.debian.org/DebianLive; [email protected]}"
677 ;;
678 esac
679
680 # Setting hdd options
681 case "${LB_MODE}" in
682 debian)
683 LB_HDD_LABEL="${LB_HDD_LABEL:-DEBIAN_LIVE}"
684 ;;
685
686 progress-linux)
687 LB_HDD_LABEL="${LB_HDD_LABEL:-PROGRESS_$(echo ${LB_DISTRIBUTION} | tr "[a-z]" "[A-Z]")}"
688 ;;
689 esac
690
691 # Setting hdd size
692 LB_HDD_SIZE="${LB_HDD_SIZE:-auto}"
693
694 # Setting iso volume
695 case "${LB_MODE}" in
696 debian)
697 LB_ISO_VOLUME="${LB_ISO_VOLUME:-Debian ${LB_DISTRIBUTION} \$(date +%Y%m%d-%H:%M)}"
698 ;;
699
700 progress-linux)
701 LB_ISO_VOLUME="${LB_ISO_VOLUME:-Progress ${LB_DISTRIBUTION}}"
702 ;;
703 esac
704
705 # Setting memtest option
706 LB_MEMTEST="${LB_MEMTEST:-none}"
707
708 # Setting loadlin option
709 case "${LB_MODE}" in
710 progress-linux)
711
712 ;;
713
714 *)
715 case "${LB_ARCHITECTURES}" in
716 amd64|i386)
717 if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
718 then
719 LB_LOADLIN="${LB_LOADLIN:-true}"
720 else
721 LB_LOADLIN="${LB_LOADLIN:-false}"
722 fi
723 ;;
724
725 *)
726 LB_LOADLIN="${LB_LOADLIN:-false}"
727 ;;
728 esac
729 ;;
730 esac
731
732 # Setting win32-loader option
733 case "${LB_MODE}" in
734 progress-linux)
735
736 ;;
737
738 *)
739 case "${LB_ARCHITECTURES}" in
740 amd64|i386)
741 if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
742 then
743 LB_WIN32_LOADER="${LB_WIN32_LOADER:-true}"
744 else
745 LB_WIN32_LOADER="${LB_WIN32_LOADER:-false}"
746 fi
747 ;;
748
749 *)
750 LB_WIN32_LOADER="${LB_WIN32_LOADER:-false}"
751 ;;
752 esac
753 ;;
754 esac
755
756 # Setting netboot filesystem
757 LB_NET_ROOT_FILESYSTEM="${LB_NET_ROOT_FILESYSTEM:-nfs}"
758
759 # Setting netboot server path
760 case "${LB_MODE}" in
761 progress-linux)
762 LB_NET_ROOT_PATH="${LB_NET_ROOT_PATH:-/srv/progress-linux}"
763 ;;
764
765 *)
766 LB_NET_ROOT_PATH="${LB_NET_ROOT_PATH:-/srv/${LB_MODE}-live}"
767 ;;
768 esac
769
770 # Setting netboot server address
771 LB_NET_ROOT_SERVER="${LB_NET_ROOT_SERVER:-192.168.1.1}"
772
773 # Setting net cow filesystem
774 LB_NET_COW_FILESYSTEM="${LB_NET_COW_FILESYSTEM:-nfs}"
775
776 # Setting net tarball
777 LB_NET_TARBALL="${LB_NET_TARBALL:-true}"
778
779 # Setting onie
780 LB_ONIE="${LB_ONIE:-false}"
781
782 # Setting onie additional kernel cmdline options
783 LB_ONIE_KERNEL_CMDLINE="${LB_ONIE_KERNEL_CMDLINE:-}"
784
785 # Setting firmware option
786 LB_FIRMWARE_CHROOT="${LB_FIRMWARE_CHROOT:-true}"
787 LB_FIRMWARE_BINARY="${LB_FIRMWARE_BINARY:-true}"
788
789 # Setting swap file
790 LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE:-512}"
791
792 # Setting UEFI Secure Boot
793 LB_UEFI_SECURE_BOOT="${LB_UEFI_SECURE_BOOT:-auto}"
794
795 ## config/source
796
797 # Setting source option
798 LB_SOURCE="${LB_SOURCE:-false}"
799
800 # Setting image type
801 LB_SOURCE_IMAGES="${LB_SOURCE_IMAGES:-tar}"
802 }
803
804 Check_defaults ()
805 {
806 case "${LB_BINARY_FILESYSTEM}" in
807 ntfs)
808 if [ ! -x "$(which ntfs-3g 2>/dev/null)" ]
809 then
810 Echo_error "Using ntfs as the binary filesystem is currently only supported"
811 Echo_error "if ntfs-3g is installed on the host system."
812
813 exit 1
814 fi
815 ;;
816 esac
817
818 if echo ${LB_HDD_LABEL} | grep -qs ' '
819 then
820 Echo_error "There are currently no whitespaces supported in hdd labels."
821
822 exit 1
823 fi
824
825 if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
826 then
827 # d-i true, no caching
828 if ! echo ${LB_CACHE_STAGES} | grep -qs "bootstrap\b" || [ "${LB_CACHE}" != "true" ] || [ "${LB_CACHE_PACKAGES}" != "true" ]
829 then
830 Echo_warning "You have selected values of LB_CACHE, LB_CACHE_PACKAGES, LB_CACHE_STAGES and LB_DEBIAN_INSTALLER which will result in 'bootstrap' packages not being cached. This configuration is potentially unsafe as the bootstrap packages are re-used when integrating the Debian Installer."
831 fi
832 fi
833
834 if [ "${LB_FIRST_BOOTLOADER}" = "syslinux" ]
835 then
836 # syslinux + fat or ntfs, or extlinux + ext[234] or btrfs
837 case "${LB_BINARY_FILESYSTEM}" in
838 fat*|ntfs|ext[234]|btrfs)
839 ;;
840 *)
841 Echo_warning "You have selected values of LB_BOOTLOADERS and LB_BINARY_FILESYSTEM which are incompatible - the syslinux family only support FAT, NTFS, ext[234] or btrfs filesystems."
842 ;;
843 esac
844 fi
845
846 case "${LIVE_IMAGE_TYPE}" in
847 hdd*)
848 case "${LB_FIRST_BOOTLOADER}" in
849 grub)
850 Echo_error "You have selected a combination of bootloader and image type that is currently not supported by live-build. Please use either another bootloader or a different image type."
851 exit 1
852 ;;
853 esac
854 ;;
855 esac
856
857 if [ "$(echo \"${LB_ISO_APPLICATION}\" | wc -c)" -gt 128 ]
858 then
859 Echo_warning "You have specified a value of LB_ISO_APPLICATION that is too long; the maximum length is 128 characters."
860 fi
861
862 if [ "$(echo \"${LB_ISO_PREPARER}\" | wc -c)" -gt 128 ]
863 then
864 Echo_warning "You have specified a value of LB_ISO_PREPARER that is too long; the maximum length is 128 characters."
865 fi
866
867 if [ "$(echo \"${LB_ISO_PUBLISHER}\" | wc -c)" -gt 128 ]
868 then
869 Echo_warning "You have specified a value of LB_ISO_PUBLISHER that is too long; the maximum length is 128 characters."
870 fi
871
872 if [ "$(eval "echo \"${LB_ISO_VOLUME}\"" | wc -c)" -gt 32 ]
873 then
874 Echo_warning "You have specified a value of LB_ISO_VOLUME that is too long; the maximum length is 32 characters."
875 fi
876
877 # Architectures to use foreign bootstrap for
878 LB_BOOTSTRAP_QEMU_ARCHITECTURES="${LB_BOOTSTRAP_QEMU_ARCHITECTURES:-}"
879
880 # Packages to exclude for the foreign/ports bootstrapping
881 LB_BOOTSTRAP_QEMU_EXCLUDE="${LB_BOOTSTRAP_QEMU_EXCLUDE:-}"
882
883 # Ports using foreign bootstrap need a working qemu-*-system. This is the location it
884 LB_BOOTSTRAP_QEMU_STATIC="${LB_BOOTSTRAP_QEMU_STATIC:-}"
885
886 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
67 ## This is free software, and you are welcome to redistribute it
78 ## under certain conditions; see COPYING for details.
89
10 exec 3>&1
911
1012 Echo ()
1113 {
12 STRING="${1}"
14 local STRING="${1}"
1315 shift
1416
15 printf "${STRING}\n" "${@}"
17 printf "${STRING}\n" "${@}" >&3
1618 }
1719
1820 Echo_debug ()
1921 {
20 if [ "${_DEBUG}" = "true" ]
21 then
22 STRING="${1}"
22 if [ "${_DEBUG}" = "true" ]; then
23 local STRING="${1}"
2324 shift
2425
25 printf "D: ${STRING}\n" "${@}"
26 fi
27 }
28
29 Echo_debug_running ()
30 {
31 if [ "${_DEBUG}" = "true" ]
32 then
33 STRING="${1}"
34 shift
35
36 printf "D: ${STRING}" "${@}"
37
38 if [ "${_COLOR}" = "false" ]
39 then
40 printf "..."
41 else
42 printf "... ${YELLOW}${BLINK}running${NO_COLOR}"
43 fi
26 printf "D: ${STRING}\n" "${@}" >&3
4427 fi
4528 }
4629
4730 Echo_error ()
4831 {
49 STRING="${1}"
32 local STRING="${1}"
5033 shift
5134
52 if [ "${_COLOR}" = "false" ]
53 then
54 printf "E:"
55 else
56 printf "${RED}E${NO_COLOR}:"
35 local PREFIX="${RED}E${NO_COLOR}"
36 if [ "${_COLOR_ERR}" = "false" ]; then
37 PREFIX="E"
5738 fi
5839
59 printf " ${STRING}\n" "${@}" >&2
40 printf "${PREFIX}: ${STRING}\n" "${@}" >&2
6041 }
6142
6243 Echo_message ()
6344 {
6445 if [ "${_QUIET}" != "true" ]
6546 then
66 STRING="${1}"
47 local STRING="${1}"
6748 shift
6849
69 if [ "${_COLOR}" = "false" ]
70 then
71 printf "P:"
72 else
73 printf "${WHITE}P${NO_COLOR}:"
50 local PREFIX="${PURPLE}P${NO_COLOR}"
51 if [ "${_COLOR_OUT}" = "false" ]; then
52 PREFIX="P"
7453 fi
7554
76 printf " ${STRING}\n" "${@}"
77 fi
78 }
79
80 Echo_message_running ()
81 {
82 if [ "${_QUIET}" != "true" ]
83 then
84 STRING="${1}"
85 shift
86
87 if [ "${_COLOR}" = "false" ]
88 then
89 printf "P:"
90 else
91 printf "${WHITE}P${NO_COLOR}:"
92 fi
93
94 printf " ${STRING}" "${@}"
95
96 if [ "${_COLOR}" = "true" ]
97 then
98 printf "... ${YELLOW}${BLINK}running${NO_COLOR}"
99 else
100 printf "..."
101 fi
55 printf "${PREFIX}: ${STRING}\n" "${@}" >&3
10256 fi
10357 }
10458
10559 Echo_verbose ()
10660 {
107 if [ "${_VERBOSE}" = "true" ]
108 then
109 STRING="${1}"
61 if [ "${_VERBOSE}" = "true" ]; then
62 local STRING="${1}"
11063 shift
11164
112 printf "I: ${STRING}\n" "${@}"
113 fi
114 }
115
116 Echo_verbose_running ()
117 {
118 if [ "${_VERBOSE}" != "true" ]
119 then
120 STRING="${1}"
121 shift
122
123 printf "I: ${STRING}" "${@}"
124
125 if [ "${_COLOR}" = "true" ]
126 then
127 printf "... ${YELLOW}${BLINK}running${NO_COLOR}"
128 else
129 printf "..."
130 fi
65 printf "I: ${STRING}\n" "${@}" >&3
13166 fi
13267 }
13368
13469 Echo_warning ()
13570 {
136 STRING="${1}"
71 local STRING="${1}"
13772 shift
13873
139 if [ "${_COLOR}" = "false" ]
140 then
141 printf "W:"
142 else
143 printf "${YELLOW}W${NO_COLOR}:"
74 local PREFIX="${YELLOW}W${NO_COLOR}"
75 if [ "${_COLOR_ERR}" = "false" ]; then
76 PREFIX="W"
14477 fi
14578
146 printf " ${STRING}\n" "${@}"
147 }
148
149 Echo_status ()
150 {
151 __RETURN="${?}"
152
153 if [ "${_COLOR}" = "false" ]
154 then
155 if [ "${__RETURN}" = "0" ]
156 then
157 printf " done.\n"
158 else
159 printf " failed.\n"
160 fi
161 else
162 Cursor_columns_backward 8
163
164 if [ "${__RETURN}" = "0" ]
165 then
166 printf " ${GREEN}done${NO_COLOR}. \n"
167 else
168 printf " ${RED}failed${NO_COLOR}.\n"
169 fi
170 fi
171 }
172
173 Echo_done ()
174 {
175 if [ "${_COLOR}" = "false" ]
176 then
177 printf " already done.\n"
178 else
179 Cursor_columns_backward 8
180
181 printf " ${GREEN}already done${NO_COLOR}.\n"
182 fi
79 printf "${PREFIX}: ${STRING}\n" "${@}" >&2
18380 }
18481
18582 Echo_file ()
18683 {
187 while read LINE
84 local LINE
85 while read -r LINE
18886 do
189 echo "${1}: ${LINE}"
87 echo "${1}: ${LINE}" >&3
19088 done < "${1}"
19189 }
192
193 Echo_breakage ()
194 {
195 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
196 sid)
197 Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration, a caching proxy or the sid distribution."
198 ;;
199 *)
200 Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy."
201 ;;
202 esac
203
204 Echo_message "${@}"
205 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Exit ()
1112 {
12 VALUE="${?}"
13 local VALUE=$1
1314
1415 if [ "${_DEBUG}" = "true" ]
1516 then
1718 set | grep -e ^LB
1819 fi
1920
21 # Skip if we have not yet completed the initial bootstrapping (bootstrap_debootstrap)
22 # (nothing to be done; avoids unhelpful messages)
23 if ! Stagefile_exists bootstrap; then
24 return ${VALUE}
25 fi
26
2027 # Always exit true in case we are not able to unmount
2128 # (e.g. due to running processes in chroot from user customizations)
2229 Echo_message "Begin unmounting filesystems..."
2330
31 local DIRECTORY
2432 if [ -e /proc/mounts ]
2533 then
2634 for DIRECTORY in $(awk -v dir="${PWD}/chroot/" '$2 ~ dir { print $2 }' /proc/mounts | sort -r)
2836 umount ${DIRECTORY} > /dev/null 2>&1 || true
2937 done
3038 else
31 for DIRECTORY in /dev/shm /dev/pts /dev /proc /selinux /sys /root/config
39 for DIRECTORY in /dev/shm /dev/pts /dev /proc /sys/fs/selinux /sys /root/config
3240 do
3341 umount -f chroot/${DIRECTORY} > /dev/null 2>&1 || true
3442 done
3543 fi
3644
37 rm -f .build/chroot_devpts
38 rm -f .build/chroot_proc
39 rm -f .build/chroot_selinuxfs
40 rm -f .build/chroot_sysfs
45 STAGEFILES_DIR="$(Stagefiles_dir)"
46
47 rm -f "${STAGEFILES_DIR}"/chroot_devpts
48 rm -f "${STAGEFILES_DIR}"/chroot_proc
49 rm -f "${STAGEFILES_DIR}"/chroot_selinuxfs
50 rm -f "${STAGEFILES_DIR}"/chroot_sysfs
4151
4252 Echo_message "Saving caches..."
4353
4555 # but let's assume that if there's any binary stage file arround
4656 # we are in binary stage.
4757
48 if ls .build/binary* > /dev/null 2>&1
58 if ls "${STAGEFILES_DIR}"/binary* > /dev/null 2>&1
4959 then
50 Save_cache cache/packages.binary
60 Save_package_cache binary
5161 else
52 Save_cache cache/packages.chroot
62 Save_package_cache chroot
5363 fi
5464
5565 return ${VALUE}
5666 }
5767
58 Setup_cleanup ()
68 Exit_exit ()
5969 {
60 Echo_message "Setting up cleanup function"
61 trap 'Exit' EXIT HUP INT QUIT TERM
70 local VALUE=$?
71 if [ "${VALUE}" -ne 0 ]; then
72 Echo_error "An unexpected failure occurred, exiting..."
73 fi
74 Exit ${VALUE}
6275 }
76
77 Exit_other ()
78 {
79 local VALUE=$?
80 Echo_warning "Unexpected early exit caught, attempting cleanup..."
81 Exit ${VALUE}
82 }
83
84 Setup_clean_exit ()
85 {
86 Echo_message "Setting up clean exit handler"
87 trap 'Exit_other' HUP INT QUIT TERM
88 trap 'Exit_exit' EXIT
89 }
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
4 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
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.
9
10 # Updates FIRMWARE_PACKAGES with list of packages determined from specified
11 # archive areas of specified distro, based upon reading archive content file.
12 #
13 # Shared by chroot_firmware and installer_debian-installer
14 #
15 # Assumption: firmware packages install files into /lib/firmware
16 Firmware_List_From_Contents () {
17 local MIRROR_CHROOT="${1}"
18 local DISTRO_CHROOT="${2}"
19 local ARCHIVE_AREAS="${3}"
20
21 local _ARCHIVE_AREA
22 for _ARCHIVE_AREA in ${ARCHIVE_AREAS}
23 do
24 local CONTENTS_URL="${MIRROR_CHROOT}/dists/${DISTRO_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURE}.gz"
25 local CONTENTS_FILEDIR="cache/contents.chroot/${DISTRO_CHROOT}/${_ARCHIVE_AREA}"
26 local CONTENTS_FILE="${CONTENTS_FILEDIR}/contents-${LB_ARCHITECTURE}.gz"
27
28 mkdir -p "${CONTENTS_FILEDIR}"
29
30 # Purge from cache if not wanting to use from cache, ensuring fresh copy
31 if [ "${LB_CACHE}" != "true" ]
32 then
33 rm -f "${CONTENTS_FILE}"
34 fi
35
36 # If not cached, download
37 if [ ! -e "${CONTENTS_FILE}" ]
38 then
39 wget ${WGET_OPTIONS} "${CONTENTS_URL}" -O "${CONTENTS_FILE}"
40 fi
41
42 local PACKAGES
43 PACKAGES="$(gunzip -c "${CONTENTS_FILE}" | awk '/^lib\/firmware/ { print $2 }' | sort -u )"
44 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} ${PACKAGES}"
45
46 # Don't waste disk space, if not making use of caching
47 if [ "${LB_CACHE}" != "true" ]
48 then
49 rm -f "${CONTENTS_FILE}"
50 fi
51 done
52 }
+0
-36
functions/help.sh less more
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 Help ()
11 {
12 Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}"
13 echo
14 Echo "Usage:"
15 echo
16
17 if [ -n "${USAGE}" ]
18 then
19 Echo "${USAGE}"
20 echo
21 fi
22 Echo " %s [-h|--help]" "${PROGRAM}"
23 Echo " %s [-u|--usage]" "${PROGRAM}"
24 Echo " %s [-v|--version]" "${PROGRAM}"
25 echo
26
27 if [ -n "${HELP}" ]
28 then
29 Echo "${HELP}"
30 echo
31 fi
32
33 Echo "Report bugs to the Live Systems project <https://wiki.debian.org/DebianLive>."
34 exit 0
35 }
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
4 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
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.
9
10
11 Auto_build_config ()
12 {
13 # Automatically build config
14 if [ -x auto/config ] && ! Stagefile_exists config; then
15 Echo_message "Automatically populating config tree."
16 lb config
17 fi
18 }
19
20 Init_config_data ()
21 {
22 Arguments "${@}"
23
24 Read_conffiles $(Common_conffiles)
25 Prepare_config
26
27 # Validating config
28 if [ "${CONFIG_VALIDATED}" != "true" ]; then
29 Validate_config
30 export CONFIG_VALIDATED="true"
31 fi
32
33 # Apt v2.0.1 introduced color support, but it needs to be explicitly enabled.
34 # This is done here so that the injection of the option does not get stored in the config file.
35 if [ "${_COLOR_OUT}" = "true" ] && [ "${_COLOR_ERR}" = "true" ]; then
36 APT_OPTIONS="${APT_OPTIONS} -o APT::Color=true"
37 APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=true"
38 else
39 APT_OPTIONS="${APT_OPTIONS} -o APT::Color=false"
40 APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=false"
41 fi
42 }
43
44 # "Auto" script redirection.
45 #
46 # As a matter of convenience users can have a set of saved commandline options
47 # which will be automatically included in every execution of live-build. How
48 # this works is that the save file is itself a shell script saved in the config
49 # directory (one per top-level live-build command in fact). When `lb config`,
50 # `lb build` or `lb clean` is run, these scripts, if they see that an "auto"
51 # file exists in the config, they run that file, passing along any user
52 # arguments, and terminate once that ends. The "auto" script simply re-executes
53 # the same command (e.g. `lb config`), only with a first param of "noauto",
54 # used to stop an infinite loop of further redirection, then a fixed saved set
55 # of command line options, as saved in the file by the user, then any
56 # additional command line arguments passed into the script. This is simply a
57 # means of injecting a saved set of command line options into the execution of
58 # live-build.
59 #
60 # As for this function, it is a simple helper, used by the top-level commands
61 # to perform the redirection if the relevant "auto" file exists. It should only
62 # be called if the calling command script was not run with "noauto" as the
63 # first argument (the purpose of which was just described).
64 Maybe_auto_redirect ()
65 {
66 local TYPE="${1}"; shift
67
68 case "${TYPE}" in
69 clean|config|build)
70 ;;
71 *)
72 Echo_error "Unknown auto redirect type"
73 exit 1
74 ;;
75 esac
76
77 local AUTO_SCRIPT="auto/${TYPE}"
78 if [ -x "${AUTO_SCRIPT}" ]; then
79 Echo_message "Executing ${AUTO_SCRIPT} script."
80 ./"${AUTO_SCRIPT}" "${@}"
81 exit ${?}
82 elif [ -f "${AUTO_SCRIPT}" ]; then
83 Echo_warning "The ${AUTO_SCRIPT} script exists but is not executable, ignoring."
84 fi
85 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
78 ## under certain conditions; see COPYING for details.
89
910
11 Acquire_lockfile ()
12 {
13 local FILE="${1:-.lock}"
14 Check_lockfile "${FILE}"
15 Create_lockfile "${FILE}"
16 }
17
1018 Check_lockfile ()
1119 {
12 FILE="${1}"
20 local FILE="${1}"
1321
14 if [ -z "${FILE}" ]
15 then
16 FILE=".build/lock"
17 fi
18
19 # Checking lock file
20 if [ -f "${FILE}" ]
21 then
22 Echo_error "${PROGRAM} locked"
22 if [ -f "${FILE}" ]; then
23 Echo_error "${PROGRAM} already locked"
2324 exit 1
2425 fi
2526 }
2627
2728 Create_lockfile ()
2829 {
29 FILE="${1}"
30 local FILE="${1}"
3031
31 if [ -z "${FILE}" ]
32 then
33 FILE=".build/lock"
34 fi
35
36 DIRECTORY="$(dirname ${FILE})"
37
38 # Creating lock directory
39 mkdir -p "${DIRECTORY}"
40
41 # Creating lock trap
32 # Create lock trap
33 # This automatically removes the lock file in certain conditions
4234 trap 'ret=${?}; '"rm -f \"${FILE}\";"' exit ${ret}' EXIT HUP INT QUIT TERM
4335
4436 # Creating lock file
4537 touch "${FILE}"
4638 }
39
40 Remove_lockfile ()
41 {
42 local FILE="${1:-.lock}"
43
44 rm -f "${FILE}"
45 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
89
910 Lodetach ()
1011 {
11 DEVICE="${1}"
12 ATTEMPT="${2:-1}"
12 local DEVICE="${1}"
13 local ATTEMPT="${2:-1}"
1314
1415 if [ "${ATTEMPT}" -gt 3 ]
1516 then
2021 # Changes to block devices result in uevents which trigger rules which in
2122 # turn access the loop device (ex. udisks-part-id, blkid) which can cause
2223 # a race condition. We call 'udevadm settle' to help avoid this.
23 if [ -x "$(which udevadm 2>/dev/null)" ]
24 if command -v udevadm >/dev/null
2425 then
2526 udevadm settle
2627 fi
3031 sync
3132 sleep 1
3233
33 ${LB_LOSETUP} -d "${DEVICE}" || Lodetach "${DEVICE}" "$(expr ${ATTEMPT} + 1)"
34 losetup -d "${DEVICE}" || Lodetach "${DEVICE}" "$(expr ${ATTEMPT} + 1)"
3435 }
3536
3637 Losetup ()
3738 {
38 DEVICE="${1}"
39 FILE="${2}"
40 PARTITION="${3:-1}"
39 local DEVICE="${1}"
40 local FILE="${2}"
41 local PARTITION="${3:-1}"
4142
42 ${LB_LOSETUP} --read-only --partscan "${DEVICE}" "${FILE}"
43 FDISK_OUT="$(${LB_FDISK} -l -u ${DEVICE} 2>&1)"
43 local FDISK_OUT
44 local LOOPDEVICE
45 losetup --read-only --partscan "${DEVICE}" "${FILE}"
46 FDISK_OUT="$(fdisk -l -u ${DEVICE} 2>&1)"
4447 Lodetach "${DEVICE}"
4548
4649 LOOPDEVICE="$(echo ${DEVICE}p${PARTITION})"
4952 then
5053 Echo_message "Mounting %s with offset 0" "${DEVICE}"
5154
52 ${LB_LOSETUP} --partscan "${DEVICE}" "${FILE}"
55 losetup --partscan "${DEVICE}" "${FILE}"
5356 else
57 local SECTORS
58 local OFFSET
5459 SECTORS="$(echo "$FDISK_OUT" | sed -ne "s|^$LOOPDEVICE[ *]*\([0-9]*\).*|\1|p")"
5560 OFFSET="$(expr ${SECTORS} '*' 512)"
5661
5762 Echo_message "Mounting %s with offset %s" "${DEVICE}" "${OFFSET}"
5863
59 ${LB_LOSETUP} --partscan -o "${OFFSET}" "${DEVICE}" "${FILE}"
64 losetup --partscan -o "${OFFSET}" "${DEVICE}" "${FILE}"
6065 fi
6166 }
6267
6368 # adapted from lib/ext2fs/mkjournal.c, default block size is 4096 bytes (/etc/mke2fs.conf).
6469 ext2fs_default_journal_size()
6570 {
66 SIZE="$1"
71 local SIZE="$1"
6772 if [ "${SIZE}" -lt "8" ]; then # 2048*4096
6873 echo 0
6974 elif [ "${SIZE}" -lt "128" ]; then # 32768*4096
8186
8287 Calculate_partition_size_without_journal ()
8388 {
84 WITHOUT_JOURNAL_ORIGINAL_SIZE="${1}"
85 WITHOUT_JOURNAL_FILESYSTEM="${2}"
89 local WITHOUT_JOURNAL_ORIGINAL_SIZE="${1}"
90 local WITHOUT_JOURNAL_FILESYSTEM="${2}"
8691
92 local PERCENT
8793 case "${WITHOUT_JOURNAL_FILESYSTEM}" in
8894 ext2|ext3|ext4)
8995 PERCENT="6"
98104
99105 Calculate_partition_size ()
100106 {
101 ORIGINAL_SIZE="${1}"
102 FILESYSTEM="${2}"
107 local ORIGINAL_SIZE="${1}"
108 local FILESYSTEM="${2}"
103109
104110 case "${FILESYSTEM}" in
105111 ext3|ext4)
112 local NON_JOURNAL_SIZE
113 local PROJECTED_JOURNAL_SIZE
114 local PROJECTED_PARTITION_SIZE
115 local PRE_FINAL_PARTITION_SIZE
116 local JOURNAL_SIZE
106117 NON_JOURNAL_SIZE=$(Calculate_partition_size_without_journal ${ORIGINAL_SIZE} ${FILESYSTEM})
107118 PROJECTED_JOURNAL_SIZE=$(ext2fs_default_journal_size ${NON_JOURNAL_SIZE})
108119 PROJECTED_PARTITION_SIZE=$(expr ${ORIGINAL_SIZE} + ${PROJECTED_JOURNAL_SIZE})
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Man ()
1112 {
12 if [ -x "$(which man 2>/dev/null)" ]
13 then
14 man $(basename ${0})
15 exit 0
13 if command -v man >/dev/null; then
14 man ${PROGRAM}
15 else
16 Echo_warning "man is not installed, falling back to usage output."
17 Usage
1618 fi
19 exit 0
1720 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Expand_packagelist ()
1112 {
13 local _LB_EXPAND_QUEUE
1214 _LB_EXPAND_QUEUE="$(basename "${1}")"
1315
1416 shift
1517
1618 while [ -n "${_LB_EXPAND_QUEUE}" ]
1719 do
20 local _LB_LIST_NAME
21 local _LB_EXPAND_QUEUE
1822 _LB_LIST_NAME="$(echo ${_LB_EXPAND_QUEUE} | cut -d" " -f1)"
1923 _LB_EXPAND_QUEUE="$(echo ${_LB_EXPAND_QUEUE} | cut -s -d" " -f2-)"
20 _LB_LIST_LOCATION=""
21 _LB_NESTED=0
22 _LB_ENABLED=1
24 local _LB_LIST_LOCATION=""
25 local _LB_NESTED=0
26 local _LB_ENABLED=1
2327
24 for _LB_SEARCH_PATH in ${@}
25 do
28 for _LB_SEARCH_PATH in "${@}"; do
2629 if [ -e "${_LB_SEARCH_PATH}/${_LB_LIST_NAME}" ]
2730 then
2831 _LB_LIST_LOCATION="${_LB_SEARCH_PATH}/${_LB_LIST_NAME}"
3235
3336 if [ -z "${_LB_LIST_LOCATION}" ]
3437 then
35 echo "W: Unknown package list '${_LB_LIST_NAME}'" >&2
38 Echo_warning "Unknown package list '${_LB_LIST_NAME}'"
3639 continue
3740 fi
3841
4043 do
4144 case "${_LB_LINE}" in
4245 \!*)
46 local _EXEC
4347 _EXEC="$(echo ${_LB_LINE} | sed -e 's|^!||')"
4448
4549 case "${LB_BUILD_WITH_CHROOT}" in
5660 \#if\ *)
5761 if [ ${_LB_NESTED} -eq 1 ]
5862 then
59 echo "E: Nesting conditionals is not supported" >&2
63 Echo_error "Nesting conditionals is not supported"
6064 exit 1
6165 fi
6266 _LB_NESTED=1
6367
68 local _LB_NEEDLE
69 local _LB_HAYSTACK
70 local _LB_NEEDLE_PART
71 local _LB_HAYSTACK_PART
6472 _LB_NEEDLE="$(echo "${_LB_LINE}" | cut -d' ' -f3-)"
6573 _LB_HAYSTACK="$(eval "echo \$LB_$(echo "${_LB_LINE}" | cut -d' ' -f2)")"
6674
8088 \#nif\ *)
8189 if [ ${_LB_NESTED} -eq 1 ]
8290 then
83 echo "E: Nesting conditionals is not supported" >&2
91 Echo_error "Nesting conditionals is not supported"
8492 exit 1
8593 fi
8694 _LB_NESTED=1
8795
96 local _LB_NEEDLE
97 local _LB_HAYSTACK
98 local _LB_NEEDLE_PART
99 local _LB_HAYSTACK_PART
88100 _LB_NEEDLE="$(echo "${_LB_LINE}" | cut -d' ' -f3-)"
89101 _LB_HAYSTACK="$(eval "echo \$LB_$(echo "${_LB_LINE}" | cut -d' ' -f2)")"
90102
124136
125137 Discover_package_architectures ()
126138 {
127 _LB_EXPANDED_PKG_LIST="${1}"
128 _LB_DISCOVERED_ARCHITECTURES=""
139 local _LB_EXPANDED_PKG_LIST="${1}"
140 local _LB_DISCOVERED_ARCHITECTURES=""
129141
130142 shift
131143
132144 if [ -e "${_LB_EXPANDED_PKG_LIST}" ] && [ -s "${_LB_EXPANDED_PKG_LIST}" ]
133145 then
146 local _LB_PACKAGE_LINE
147 local _LB_PACKAGE_LINE_PART
134148 while read _LB_PACKAGE_LINE
135149 do
136150 # Lines from the expanded package list may have multiple, space-separated packages
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
78 ## under certain conditions; see COPYING for details.
89
910
11 # The file that records temporarily installed packages.
12 Installed_tmp_packages_file ()
13 {
14 echo "chroot.installed_tmp_pkgs"
15 }
16
17 # Note, writes to _LB_PACKAGES
1018 Check_package ()
1119 {
12 CHROOT="${1}"
13 FILE="${2}"
14 PACKAGE="${3}"
20 local CHROOT="${1}"
21 local FILE="${2}"
22 local PACKAGE="${3}"
1523
1624 Check_installed "${CHROOT}" "${FILE}" "${PACKAGE}"
1725
2735 fi
2836 }
2937
30 Install_package ()
38 # Note, reads from _LB_PACKAGES
39 Install_packages ()
3140 {
32 if [ -n "${_LB_PACKAGES}" ] && [ "${LB_BUILD_WITH_CHROOT}" != "false" ]
33 then
41 if [ -z "${_LB_PACKAGES}" ] || [ "${LB_BUILD_WITH_CHROOT}" != "true" ]; then
42 return
43 fi
44
45 # Record in file to survive failure such that recovery can take place.
46 local LIST_FILE
47 LIST_FILE="$(Installed_tmp_packages_file)"
48 local PACKAGE
49 for PACKAGE in ${_LB_PACKAGES}; do
50 echo "${PACKAGE}" >> "${LIST_FILE}"
51 done
52
53 case "${LB_APT}" in
54 apt|apt-get)
55 Chroot chroot "apt-get install -o APT::Install-Recommends=false ${APT_OPTIONS} ${_LB_PACKAGES}"
56 ;;
57
58 aptitude)
59 Chroot chroot "aptitude install --without-recommends ${APTITUDE_OPTIONS} ${_LB_PACKAGES}"
60 ;;
61 esac
62 unset _LB_PACKAGES # Can clear this now
63 }
64
65 Remove_packages ()
66 {
67 if [ "${LB_BUILD_WITH_CHROOT}" != "true" ]; then
68 return
69 fi
70
71 local LIST_FILE
72 LIST_FILE="$(Installed_tmp_packages_file)"
73
74 # List is read from file to ensure packages from any past failure are
75 # included in the list on re-running scripts to recover.
76 local PACKAGES=""
77 if [ -e "${LIST_FILE}" ]; then
78 local PACKAGE
79 while read -r PACKAGE; do
80 PACKAGES="${PACKAGES} ${PACKAGE}"
81 done < "${LIST_FILE}"
82 fi
83
84 if [ -n "${PACKAGES}" ]; then
3485 case "${LB_APT}" in
3586 apt|apt-get)
36 Chroot chroot "apt-get install -o APT::Install-Recommends=false ${APT_OPTIONS} ${_LB_PACKAGES}"
87 Chroot chroot "apt-get remove --auto-remove --purge ${APT_OPTIONS} ${PACKAGES}"
3788 ;;
3889
3990 aptitude)
40 Chroot chroot "aptitude install --without-recommends ${APTITUDE_OPTIONS} ${_LB_PACKAGES}"
91 Chroot chroot "aptitude purge --purge-unused ${APTITUDE_OPTIONS} ${PACKAGES}"
4192 ;;
4293 esac
4394 fi
95
96 rm -f "${LIST_FILE}"
4497 }
4598
46 Remove_package ()
99 #FIXME: make use of this. see commit log that added this for details.
100 # Perform temp package removal for recovery if necessary
101 Cleanup_temp_packages ()
47102 {
48 if [ -n "${_LB_PACKAGES}" ] && [ "${LB_BUILD_WITH_CHROOT}" != "false" ]
49 then
50 case "${LB_APT}" in
51 apt|apt-get)
52 Chroot chroot "apt-get remove --purge ${APT_OPTIONS} ${_LB_PACKAGES}"
53 ;;
54
55 aptitude)
56 Chroot chroot "aptitude purge ${APTITUDE_OPTIONS} ${_LB_PACKAGES}"
57 ;;
58 esac
103 if [ -e "$(Installed_tmp_packages_file)" ]; then
104 Remove_packages
59105 fi
60106 }
61107
66112 # 2 if package isn't installed and we aren't in an apt managed system
67113 Check_installed ()
68114 {
69 CHROOT="${1}"
70 FILE="${2}"
71 PACKAGE="${3}"
115 local CHROOT="${1}"
116 local FILE="${2}"
117 local PACKAGE="${3}"
72118
73119 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] && [ "${CHROOT}" = "chroot" ]
74120 then
79125 INSTALL_STATUS=1
80126 fi
81127 else
82 if which dpkg-query > /dev/null 2>&1
128 if [ -e /etc/debian_version ]
83129 then
84130 if dpkg-query -s "${PACKAGE}" 2> /dev/null | grep -qs "Status: install"
85131 then
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
4 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
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.
9
10
11 Create_apt_sources_list ()
12 {
13 local PARENT_MIRROR
14 local MIRROR
15 local PARENT_MIRROR_SECURITY
16 local MIRROR_SECURITY
17 local PARENT_DISTRIBUTION
18 local DISTRIBUTION
19
20 case "${1}" in
21 chroot)
22 PARENT_MIRROR=${LB_PARENT_MIRROR_CHROOT}
23 MIRROR=${LB_MIRROR_CHROOT}
24 PARENT_MIRROR_SECURITY=${LB_PARENT_MIRROR_CHROOT_SECURITY}
25 MIRROR_SECURITY=${LB_MIRROR_CHROOT_SECURITY}
26 PARENT_DISTRIBUTION=${LB_PARENT_DISTRIBUTION_CHROOT}
27 DISTRIBUTION=${LB_DISTRIBUTION_CHROOT}
28 ;;
29 binary)
30 PARENT_MIRROR=${LB_PARENT_MIRROR_BINARY}
31 MIRROR=${LB_MIRROR_BINARY}
32 PARENT_MIRROR_SECURITY=${LB_PARENT_MIRROR_BINARY_SECURITY}
33 MIRROR_SECURITY=${LB_MIRROR_BINARY_SECURITY}
34 PARENT_DISTRIBUTION=${LB_PARENT_DISTRIBUTION_BINARY}
35 DISTRIBUTION=${LB_DISTRIBUTION_BINARY}
36 ;;
37 *)
38 Echo_error "Invalid mode '${1}' specified for source list creation!"
39 exit 1
40 ;;
41 esac
42
43 local _PASS="${2}"
44
45 local PARENT_FILE
46 case "${LB_DERIVATIVE}" in
47 true)
48 PARENT_FILE="sources.list.d/debian.list"
49 ;;
50
51 false)
52 PARENT_FILE="sources.list"
53 ;;
54 esac
55
56 local LIST_FILE="chroot/etc/apt/sources.list.d/${LB_MODE}.list"
57 local PARENT_LIST_FILE="chroot/etc/apt/${PARENT_FILE}"
58
59 local _DISTRIBUTION
60 if [ "${LB_DERIVATIVE}" = "true" ]; then
61 _DISTRIBUTION="$(echo ${DISTRIBUTION} | sed -e 's|-backports||')"
62 fi
63
64 # Clear out existing lists
65 rm -f ${PARENT_LIST_FILE} ${LIST_FILE}
66
67 # Set general repo
68 echo "deb ${PARENT_MIRROR} ${PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> ${PARENT_LIST_FILE}
69 echo "deb-src ${PARENT_MIRROR} ${PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
70
71 if [ "${LB_DERIVATIVE}" = "true" ]; then
72 echo "deb ${MIRROR} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
73 echo "deb-src ${MIRROR} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
74 fi
75
76 # Set security repo
77 if [ "${LB_SECURITY}" = "true" ]; then
78 case "${LB_MODE}" in
79 debian)
80 case "${PARENT_DISTRIBUTION}" in
81 sid|unstable)
82 # do nothing
83 ;;
84
85 *)
86 echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
87 echo "deb-src ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
88 ;;
89 esac
90
91 if [ "${LB_DERIVATIVE}" = "true" ]; then
92 echo "deb ${MIRROR_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
93 echo "deb-src ${MIRROR_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
94 fi
95 ;;
96 esac
97 fi
98
99 # Set updates repo
100 if [ "${LB_UPDATES}" = "true" ]; then
101 echo "deb ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
102 echo "deb-src ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
103
104 if [ "${LB_DERIVATIVE}" = "true" ]; then
105 echo "deb ${MIRROR} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
106 echo "deb-src ${MIRROR} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
107 fi
108 fi
109
110 # Set backports repo
111 if [ "${LB_BACKPORTS}" = "true" ]; then
112 case "${LB_MODE}" in
113 debian)
114 if [ "${PARENT_DISTRIBUTION}" != "sid" ] && [ "${PARENT_DISTRIBUTION}" != "unstable" ]; then
115 echo "deb ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
116 echo "deb-src ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
117 fi
118 ;;
119 esac
120
121 if [ "${LB_DERIVATIVE}" = "true" ]; then
122 echo "deb ${MIRROR} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
123 echo "deb-src ${MIRROR} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
124 fi
125 fi
126
127 # Disable deb-src entries?
128 if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" != "true" ]; then
129 sed -i "s/^deb-src/#deb-src/g" "${PARENT_LIST_FILE}"
130 if [ "${LB_DERIVATIVE}" = "true" ]; then
131 sed -i "s/^deb-src/#deb-src/g" "${LIST_FILE}"
132 fi
133 fi
134 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
78 ## under certain conditions; see COPYING for details.
89
910
11 Stagefiles_dir ()
12 {
13 echo ".build"
14 }
15
16 # Get the default filename for a script's stagefile (the name of the script
17 # file itself). A suffix can be appended via providing as a param.
18 Stagefile_name ()
19 {
20 local SUFFIX="${1}"
21 local FILENAME
22 FILENAME="$(basename $0)"
23 echo ${FILENAME}${SUFFIX:+.$SUFFIX}
24 }
25
26 Stagefile_exists ()
27 {
28 if [ -f ".build/${1:-$(Stagefile_name)}" ]; then
29 return 0
30 fi
31 return 1
32 }
33
1034 Check_stagefile ()
1135 {
12 FILE="${1}"
13 NAME="$(basename ${1})"
36 local FILE
37 local NAME
38 FILE=".build/${1:-$(Stagefile_name)}"
39 NAME="$(basename ${FILE})"
1440
1541 # Checking stage file
16 if [ -f "${FILE}" ]
17 then
18 if [ "${_FORCE}" != "true" ]
19 then
20 # Skipping execution
21 Echo_warning "skipping %s, already done" "${NAME}"
42 if [ -f "${FILE}" ]; then
43 if [ "${_FORCE}" != "true" ]; then
44 # Skip execution
45 Echo_warning "Skipping %s, already done" "${NAME}"
2246 exit 0
2347 else
24 # Forcing execution
25 Echo_message "forcing %s" "${NAME}"
48 # Force execution
49 Echo_message "Forcing %s" "${NAME}"
2650 rm -f "${FILE}"
51 fi
52 fi
53 }
54
55 # Used by chroot preparation scripts in removal mode
56 Ensure_stagefile_exists ()
57 {
58 local FILE
59 local NAME
60 FILE=".build/${1:-$(Stagefile_name)}"
61 NAME="$(basename ${FILE})"
62
63 # Checking stage file
64 if [ ! -f "${FILE}" ]; then
65 if [ "${_FORCE}" != "true" ]; then
66 # Skip execution
67 Echo_warning "Skipping removal of %s, it is not applied" "${NAME}"
68 exit 0
69 else
70 # Force execution
71 Echo_message "Forcing %s" "${NAME}"
2772 fi
2873 fi
2974 }
3075
3176 Create_stagefile ()
3277 {
33 FILE="${1}"
34 DIRECTORY="$(dirname ${1})"
78 local FILE
79 local DIRECTORY
80 FILE=".build/${1:-$(Stagefile_name)}"
81 DIRECTORY="$(dirname ${FILE})"
3582
3683 # Creating stage directory
3784 mkdir -p "${DIRECTORY}"
4087 touch "${FILE}"
4188 }
4289
43 Require_stagefile ()
90 Remove_stagefile ()
4491 {
45 NAME="$(basename ${0})"
46 FILES="${@}"
47 NUMBER="$(echo ${@} | wc -w)"
92 local FILE
93 FILE=".build/${1:-$(Stagefile_name)}"
94 rm -f "${FILE}"
95 }
4896
49 for FILE in ${FILES}
50 do
51 # Find at least one of the required stages
52 if [ -f ${FILE} ]
53 then
54 CONTINUE="true"
55 NAME="${NAME} $(basename ${FILE})"
97 # Ensure that all specified stagefiles exist (and thus that all associated stages are complete)
98 Require_stagefiles ()
99 {
100 if [ $# -eq 0 ]; then
101 Echo_warning "Bad 'Require_stagefiles' usage, no params were supplied"
102 return 0
103 fi
104
105 local FILE
106 local MISSING=""
107 local MISSING_COUNT=0
108 for FILE in "${@}"; do
109 if [ ! -f ".build/${FILE}" ]; then
110 MISSING_COUNT=$(( $MISSING_COUNT + 1 ))
111 MISSING="${MISSING:+$MISSING }${FILE}"
56112 fi
57113 done
114 if [ $MISSING_COUNT -eq 0 ]; then
115 return 0
116 elif [ $MISSING_COUNT -eq 1 ]; then
117 Echo_error "the following stage is required to be done first: %s" "${MISSING}"
118 else
119 Echo_error "the following stages are required to be completed first: %s" "${MISSING}"
120 fi
58121
59 if [ "${CONTINUE}" != "true" ]
60 then
61 if [ "${NUMBER}" -eq 1 ]
62 then
63 Echo_error "%s: %s missing" "${NAME}" "${FILE}"
64 else
65 Echo_error "%s: one of %s is missing" "${NAME}" "${FILES}"
66 fi
67
68 exit 1
69 fi
122 exit 1
70123 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Usage ()
1112 {
12 printf "%s - %s\n" "${PROGRAM}" "${DESCRIPTION}"
13 echo
14 Echo "Usage:"
15 echo
13 echo "${PROGRAM_NAME} - ${DESCRIPTION}"
14 printf "\nUsage:\n\n"
1615
17 if [ -n "${USAGE}" ]
18 then
19 Echo " ${USAGE}"
20 echo
16 if [ -n "${USAGE}" ]; then
17 # printf without placeholder required here for correct \t and \n formatting of `lb config` usage string
18 printf " ${USAGE}\n"
2119 fi
2220
23 printf " %s [-h|--help]\n" "${PROGRAM}"
24 printf " %s [-u|--usage]\n" "${PROGRAM}"
25 printf " %s [-v|--version]\n" "${PROGRAM}"
21 echo " ${PROGRAM} [-h|--help]"
22 echo " ${PROGRAM} [-u|--usage]"
23 echo " ${PROGRAM} [-v|--version]"
2624 echo
27 Echo "Try \"%s --help\" for more information." "${PROGRAM}"
25 echo "Try \"${PROGRAM} --help\" for more information."
2826
29 exit 1
27 case $1 in
28 --fail)
29 exit 1
30 ;;
31 --exit)
32 exit 0
33 ;;
34 "")
35 :
36 ;;
37 *)
38 Echo_error "Unexpected parameter to Usage(): $1"
39 ;;
40 esac
3041 }
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 Apt ()
1112 {
12 CHROOT="${1}"
13 local CHROOT="${1}"
1314 shift
1415
1516 case "${LB_APT}" in
1617 apt|apt-get)
17 Chroot ${CHROOT} apt-get ${APT_OPTIONS} ${@}
18 Chroot ${CHROOT} apt-get ${APT_OPTIONS} "${@}"
1819 ;;
1920
2021 aptitude)
21 Chroot ${CHROOT} aptitude ${APTITUDE_OPTIONS} ${@}
22 Chroot ${CHROOT} aptitude ${APTITUDE_OPTIONS} "${@}"
2223 ;;
2324 esac
2425 }
4646 exit 1; \
4747 fi
4848
49 po4a --copyright-holder "Live Systems Project" --keep 0 --package-name live-build --package-version $(shell cd .. && dpkg-parsechangelog -S Version) po4a.cfg
49 po4a --copyright-holder "Debian Live Project" --keep 0 --package-name live-build --package-version $(shell cd .. && dpkg-parsechangelog -S Version) po4a.cfg
5050
5151 clean:
5252 rm -f po/*/*.po~
00 #!/bin/sh
11
22 ## live-build(7) - Live System Build Components
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
2425 do
2526 SECTION="$(basename ${MANPAGE} | awk -F. '{ print $2 }')"
2627
27 sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Live Systems Project\"|" ${MANPAGE}
28 sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Debian Live Project\"|" ${MANPAGE}
2829 done
2930
3031 # European date format
0 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
11
22 .SH NAME
33 \fBlb\fR \- wrapper for live\-build programs
44
55 .SH SYNOPSIS
6 \fBlb\fR COMMAND [COMMAND_OPTIONS]
6 \fBlb\fR \fICOMMAND\fR [\fICOMMAND_OPTIONS\fR]
77 .PP
8 \fBlb\fR [\fIlive\-build\ options\fR]
8 \fBlb\fR [\fIOPTIONS\fR]
99
1010 .SH DESCRIPTION
11 \fBlb\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
12 .PP
13 .\" FIXME
11 \fBlb\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
1412
1513 .SH OPTIONS
1614 \fBlb\fR has no specific options but understands all generic live\-build options. See \fIlive\-build\fR(7) for a complete list of all generic live\-build options.
2422 This program is a part of live\-build.
2523
2624 .SH HOMEPAGE
27 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
25 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
2826
2927 .SH BUGS
30 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
28 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
3129
3230 .SH AUTHOR
33 live\-build was written by Daniel Baumann <\[email protected]\fR>.
31 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
0 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
11
22 .SH NAME
33 \fBlb_binary\fR \- Complete the binary stage
44
55 .SH SYNOPSIS
6 \fBlb binary\fR [\fIlive\-build options\fR]
6 \fBlb binary\fR [\fIOPTIONS\fR]
77
88 .SH DESCRIPTION
9 \fBlb binary\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
9 \fBlb binary\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
1010 .PP
1111 \fBlb binary\fR calls all necessary live\-build programs in the correct order to complete the binary stage.
1212
2222 This program is a part of live\-build.
2323
2424 .SH HOMEPAGE
25 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
25 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
2626
2727 .SH BUGS
28 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
28 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
2929
3030 .SH AUTHOR
31 live\-build was written by Daniel Baumann <\[email protected]\fR>.
31 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
0 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
11
22 .SH NAME
33 \fBlb_bootstrap\fR \- Complete the bootstrap stage
44
55 .SH SYNOPSIS
6 \fBlb bootstrap\fR [\fIlive\-build options\fR]
6 \fBlb bootstrap\fR [\fIOPTIONS\fR]
77
88 .SH DESCRIPTION
9 \fBlb bootstrap\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
9 \fBlb bootstrap\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
1010 .PP
1111 \fBlb bootstrap\fR calls all necessary live\-build programs in the correct order to complete the bootstrap stage.
1212
2222 This program is a part of live\-build.
2323
2424 .SH HOMEPAGE
25 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
25 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
2626
2727 .SH BUGS
28 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
28 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
2929
3030 .SH AUTHOR
31 live\-build was written by Daniel Baumann <\[email protected]\fR>.
31 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
0 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
11
22 .SH NAME
3 \fBlb_build\fR \- Complete the bootstrap, chroot, binary, and source stages
3 \fBlb_build\fR \- Complete the bootstrap, chroot, installer, binary, and source stages
44
55 .SH SYNOPSIS
6 \fBlb build\fR [\fIlive\-build options\fR]
6 \fBlb build\fR [\fIOPTIONS\fR]
77
88 .SH DESCRIPTION
9 \fBlb build\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
9 \fBlb build\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
1010 .PP
11 \fBlb build\fR calls all necessary live\-build programs in the correct order to complete the bootstrap, chroot, binary, and source stages.
11 \fBlb build\fR calls all necessary live\-build programs in the correct order to complete the bootstrap, chroot, installer, binary, and source stages.
1212
1313 .SH OPTIONS
1414 \fBlb build\fR has no specific options but understands all generic live\-build options. See \fIlive\-build\fR(7) for a complete list of all generic live\-build options.
1515
1616 .SH FILES
17 .\" FIXME
1817 .IP "\fBauto/build\fR" 4
19 .\" FIXME
2018
2119 .SH SEE ALSO
2220 \fIlive\-build\fR(7)
2422 This program is a part of live\-build.
2523
2624 .SH HOMEPAGE
27 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
25 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
2826
2927 .SH BUGS
30 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
28 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
3129
3230 .SH AUTHOR
33 live\-build was written by Daniel Baumann <\[email protected]\fR>.
31 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
0 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
11
22 .SH NAME
33 \fBlb_chroot\fR \- Complete the chroot stage
44
55 .SH SYNOPSIS
6 \fBlb chroot\fR [\fIlive\-build options\fR]
6 \fBlb chroot\fR [\fIOPTIONS\fR]
77
88 .SH DESCRIPTION
9 \fBlb chroot\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
9 \fBlb chroot\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
1010 .PP
1111 \fBlb chroot\fR calls all necessary live\-build programs in the correct order to complete the chroot stage.
1212
2222 This program is a part of live\-build.
2323
2424 .SH HOMEPAGE
25 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
25 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
2626
2727 .SH BUGS
28 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
28 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
2929
3030 .SH AUTHOR
31 live\-build was written by Daniel Baumann <\[email protected]\fR>.
31 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
0 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
11
22 .SH NAME
33 \fBlb_clean\fR \- Clean build directory
44
55 .SH SYNOPSIS
6 \fBlb clean\fR [\fIlive\-build options\fR]
6 \fBlb clean\fR [\fIOPTIONS\fR]
77
88 .SH DESCRIPTION
9 \fBlb clean\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
9 \fBlb clean\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
1010 .PP
11 .\" FIXME
1211 \fBlb clean\fR is responsible for cleaning up after a system is built. It removes the build directories, and removes some other files including stage files, and any detritus left behind by other live\-build commands.
13 .\" FIXME
1412
1513 .SH OPTIONS
1614 In addition to its specific options \fBlb clean\fR understands all generic live\-build options. See \fIlive\-build\fR(7) for a complete list of all generic live\-build options.
1715 .PP
18 .\" FIXME
1916 .IP "\fB\-\-all\fR" 4
2017 removes chroot, binary, stage, and source. The cache directory is kept. This is the default operation and will be performed if no argument is given.
2118 .IP "\fB\-\-cache\fR" 4
3229 removes all stage files.
3330 .IP "\fB\-\-source\fR" 4
3431 removes all source related caches, files, directories, and stage files.
35 .\" FIXME
3632
3733 .SH FILES
38 .\" FIXME
3934 .IP "\fBauto/clean\fR" 4
40 .\" FIXME
4135
4236 .SH SEE ALSO
4337 \fIlive\-build\fR(7)
4539 This program is a part of live\-build.
4640
4741 .SH HOMEPAGE
48 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
42 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
4943
5044 .SH BUGS
51 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
45 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
5246
5347 .SH AUTHOR
54 live\-build was written by Daniel Baumann <\[email protected]\fR>.
48 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
0 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 1 2020\-04\-27 1:20191222 "Debian Live Project"
11
22 .SH NAME
33 \fBlb_config\fR \- Create config directory
44
55 .SH SYNOPSIS
6 \fBlb config\fR [\fIlive\-build options\fR]
6 \fBlb config\fR {\fB\-h\fR|\fB\-\-help\fR|\fB\-u\fR|\fB\-\-usage\fR|\fB\-v\fR|\fB\-\-version\fR}
77 .PP
88 \fBlb config\fR
99 .br
10 [\fB\-\-apt\fR apt|aptitude]
10 [\fB\-\-apt\fR apt|apt-get|aptitude]
1111 .br
1212 [\fB\-\-apt\-ftp\-proxy\fR \fIURL\fR]
1313 .br
2727 .br
2828 [\fB\-\-aptitude\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
2929 .br
30 [\-a|\fB\-\-architectures\fR \fIARCHITECTURE\fR]
31 .br
32 [\fB\-\-archive\-areas\fR \fIARCHIVE_AREA\fR|\fI"ARCHIVE_AREAS"\fR]
30 [\fB\-a\fR|\fB\-\-architecture\fR \fIARCHITECTURE\fR]
31 .br
32 [\fB\-\-archive\-areas\fR \fIARCHIVE_AREA\fR|"\fIARCHIVE_AREAS\fR"]
3333 .br
3434 [\fB\-\-backports\fR true|false]
3535 .br
3636 [\fB\-\-binary\-filesystem\fR fat16|fat32|ext2|ext3|ext4|ntfs]
3737 .br
38 [\-b|\fB\-\-binary\-images\fR iso|iso\-hybrid|netboot|tar|hdd]
39 .br
40 [\fB\-\-bootappend\-install\fR \fIPARAMETER\fR|\fI"PARAMETERS"\fR]
41 .br
42 [\fB\-\-bootappend\-live\fR \fIPARAMETER\fR|\fI"PARAMETERS"\fR]
43 .br
44 [\fB\-\-bootappend\-live\-failsafe\fR \fIPARAMETER\fR|\fI"PARAMETERS"\fR]
45 .br
46 [\fB\-\-bootloaders\fR grub-legacy|grub-pc|syslinux|grub-efi]
47 .br
48 [\fB\-\-bootstrap\-qemu\-arch \fIARCH\fR]
49 .br
50 [\fB\-\-bootstrap\-qemu\-exclude \fIPACKAGES\fR]
51 .br
52 [\fB\-\-bootstrap\-qemu\-static \fIPATH\fR]
53 .br
54 [\fB\-\-breakpoints]
38 [\fB\-b\fR|\fB\-\-binary\-image\fR iso|iso\-hybrid|netboot|tar|hdd]
39 .br
40 [\fB\-\-bootappend\-install\fR \fIPARAMETER\fR|"\fIPARAMETERS\fR"]
41 .br
42 [\fB\-\-bootappend\-live\fR \fIPARAMETER\fR|"\fIPARAMETERS\fR"]
43 .br
44 [\fB\-\-bootappend\-live\-failsafe\fR \fIPARAMETER\fR|"\fIPARAMETERS\fR"]
45 .br
46 [\fB\-\-bootloaders\fR grub-legacy|grub-pc|syslinux|grub-efi|"\fIBOOTLOADERS\fR"]
47 .br
48 [\fB\-\-bootstrap\-qemu\-arch\fR \fIARCH\fR]
49 .br
50 [\fB\-\-bootstrap\-qemu\-exclude\fR \fIPACKAGE\fR|"\fIPACKAGES\fR"]
51 .br
52 [\fB\-\-bootstrap\-qemu\-static\fR \fIPATH\fR]
53 .br
54 [\fB\-\-breakpoints\fR]
5555 .br
5656 [\fB\-\-build\-with\-chroot\fR true|false]
5757 .br
6161 .br
6262 [\fB\-\-cache\-packages\fR true|false]
6363 .br
64 [\fB\-\-cache\-stages\fR \fISTAGE\fR|\fI"STAGES"\fR]
64 [\fB\-\-cache\-stages\fR \fISTAGE\fR|"\fISTAGES\fR"]
6565 .br
6666 [\fB\-\-checksums\fR md5|sha1|sha224|sha256|sha384|sha512|none]
6767 .br
6868 [\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none]
6969 .br
70 [\fB\-\-chroot\-squashfs\-compression\-level\fR LEVEL]
71 .br
72 [\fB\-\-chroot\-squashfs\-compression\-type\fR gzip|lzma|lzo|lz4|xz|zstd]
73 .br
7074 [\fB\-\-clean\fR]
7175 .br
72 [\fB\-\-color]
76 [\fB\-\-color\fR]
7377 .br
7478 [\fB\-\-compression\fR bzip2|gzip|lzip|xz|none]
7579 .br
76 [\-c|\fB\-\-conffile\fR \fIFILE\fR]
77 .br
78 [\fB\-\-config\fR \fIGIT_URL::GIT_BRANCH\fR]
80 [\fB\-c\fR|\fB\-\-conffile\fR \fIFILE\fR]
81 .br
82 [\fB\-\-config\fR \fIGIT_URL\fR::\fIGIT_BRANCH\fR]
7983 .br
8084 [\fB\-\-debconf\-frontend\fR dialog|editor|noninteractive|readline]
8185 .br
8286 [\fB\-\-debconf\-priority\fR low|medium|high|critical]
8387 .br
84 [\fB\-\-debian\-installer\fR true|cdrom|netinst|netboot|businesscard|live|false]
88 [\fB\-\-debian\-installer\fR cdrom|netinst|netboot|businesscard|live|none]
8589 .br
8690 [\fB\-\-debian\-installer\-distribution\fR daily|\fICODENAME\fR]
8791 .br
8993 .br
9094 [\fB\-\-debian\-installer\-preseedfile\fR \fIFILE\fR|\fIURL\fR]
9195 .br
92 [\fB\-\-debootstrap\-options\fR \fIOPTIONS\fR]
96 [\fB\-\-debootstrap\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
9397 .br
9498 [\fB\-\-debootstrap\-script\fR \fISCRIPT\fR]
9599 .br
96100 [\fB\-\-debug\fR]
97101 .br
98 [\-d|\fB\-\-distribution\fR \fICODENAME\fR]
102 [\fB\-d\fR|\fB\-\-distribution\fR \fICODENAME\fR]
99103 .br
100104 [\fB\-\-distribution\-chroot\fR \fICODENAME\fR]
101105 .br
103107 .br
104108 [\fB\-\-dump\fR]
105109 .br
106 [\fB\-\-fdisk\fR fdisk|fdisk.dist]
107 .br
108110 [\fB\-\-firmware\-binary\fR true|false]
109111 .br
110112 [\fB\-\-firmware\-chroot\fR true|false]
111113 .br
112114 [\fB\-\-force\fR]
113115 .br
114 [\fB\-\-grub\-splash\fR \fIFILE\fR]
115 .br
116116 [\fB\-\-gzip\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
117117 .br
118118 [\fB\-\-hdd\-label\fR \fILABEL\fR]
131131 .br
132132 [\fB\-\-initsystem\fR sysvinit|systemd|none]
133133 .br
134 [\fB\-\-interactive\fR shell]
134 [\fB\-\-interactive\fR true|shell|x11|xnest|false]
135135 .br
136136 [\fB\-\-iso\-application\fR \fINAME\fR]
137137 .br
141141 .br
142142 [\fB\-\-iso\-volume\fR \fINAME\fR]
143143 .br
144 [\fB\-\-isohybrid\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
145 .br
146144 [\fB\-\-jffs2\-eraseblock\fR \fISIZE\fR]
147145 .br
148 [\fB\-\-keyring\-packages\fR \fIPACKAGE\fI|\fI"PACKAGES"\fR]
149 .br
150 [\-k|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|\fI"FLAVOURS"\fR]
151 .br
152 [\fB\-\-linux\-packages\fR \fI"PACKAGES"\fR]
146 [\fB\-\-keyring\-packages\fR \fIPACKAGE\fR|"\fIPACKAGES\fR"]
147 .br
148 [\fB\-k\fR|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|"\fIFLAVOURS\fR"]
149 .br
150 [\fB\-\-linux\-packages\fR \fIPACKAGE\fR|"\fIPACKAGES\fR"]
153151 .br
154152 [\fB\-\-loadlin\fR true|false]
155153 .br
156 [\fB\-\-losetup\fR losetup|losetup.orig]
157 .br
158154 [\fB\-\-memtest\fR memtest86+|memtest86|none]
159155 .br
160156 [\fB\-\-mirror\-binary\fR \fIURL\fR]
169165 .br
170166 [\fB\-\-mirror\-debian\-installer\fR \fIURL\fR]
171167 .br
172 [\fB\-\-mode\fR debian|progress-linux]
173 .br
174 [\fB\-\-net\-cow\-filesystem\fR nfs|cfs]
175 .br
176 [\fB\-\-net\-cow\-mountoptions\fR \fIOPTIONS\fR]
177 .br
178 [\fB\-\-net\-cow\-path\fR \fIPATH\fR]
179 .br
180 [\fB\-\-net\-cow\-server\fR \fIIP\fR|\fIHOSTNAME\fR]
181 .br
182 [\fB\-\-net\-root\-filesystem\fR nfs|cfs]
183 .br
184 [\fB\-\-net\-root\-mountoptions\fR \fIOPTIONS\fR]
185 .br
186 [\fB\-\-net\-root\-path\fR \fIPATH\fR]
187 .br
188 [\fB\-\-net\-root\-server\fR \fIIP\fR|\fIHOSTNAME\fR]
168 [\fB\-\-mode\fR debian]
189169 .br
190170 [\fB\-\-net\-tarball\fR true|false]
191171 .br
172 [\fB\-\-no\-color\fR]
173 .br
192174 [\fB\-\-onie\fR true|false]
193175 .br
194 [\fB\-\-onie\-kernel\-cmdline\fR \fI"OPTION1 OPTION2"\fR]
195 .br
196 [\fB\-\-parent\-archive\-areas\fR \fIARCHIVE_AREA\fR|\fI"ARCHIVE_AREAS"\fR]
197 .br
198 [\fB\-\-parent\-debian\-installer\-distribution\fR \fICODENAME\fR]
176 [\fB\-\-onie\-kernel\-cmdline\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
177 .br
178 [\fB\-\-parent\-archive\-areas\fR \fIARCHIVE_AREA\fR|"\fIARCHIVE_AREAS\fR"]
179 .br
180 [\fB\-\-parent\-debian\-installer\-distribution\fR daily|\fICODENAME\fR]
199181 .br
200182 [\fB\-\-parent\-distribution\fR \fICODENAME\fR]
201183 .br
207189 .br
208190 [\fB\-\-parent\-mirror\-binary\-security\fR \fIURL\fR]
209191 .br
210 [\-m|\fB\-\-parent\-mirror\-bootstrap\fR \fIURL\fR]
192 [\fB\-m\fR|\fB\-\-parent\-mirror\-bootstrap\fR \fIURL\fR]
211193 .br
212194 [\fB\-\-parent\-mirror\-chroot\fR \fIURL\fR]
213195 .br
221203 .br
222204 [\fB\-\-source\fR true|false]
223205 .br
224 [\-s|\fB\-\-source\-images\fR iso|netboot|tar|hdd]
225 .br
226 [\fB\-\-swap\-file\-path PATH]
227 .br
228 [\fB\-\-swap\-file\-size MB]
206 [\fB\-s\fR|\fB\-\-source\-images\fR iso|netboot|tar|hdd|"\fIIMAGES\fR"]
207 .br
208 [\fB\-\-swap\-file\-path\fR \fIPATH\fR]
209 .br
210 [\fB\-\-swap\-file\-size\fR \fIMB\fR]
229211 .br
230212 [\fB\-\-system\fR live|normal]
231213 .br
232 [\fB\-\-tasksel\fR apt|aptitude|tasksel]
233 .br
234 [\fB\-\-uefi\-secure\-boot\fR \fIauto|enable|disable\fR]
214 [\fB\-\-uefi\-secure\-boot\fR auto|enable|disable]
235215 .br
236216 [\fB\-\-updates\fR true|false]
237217 .br
218 [\fB\-\-utc\-time\fR true|false]
219 .br
220 [\fB\-\-validate\fR]
221 .br
238222 [\fB\-\-verbose\fR]
239223 .br
240224 [\fB\-\-win32\-loader\fR true|false]
242226 [\fB\-\-zsync\fR true|false]
243227
244228 .SH DESCRIPTION
245 \fBlb config\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
229 \fBlb config\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
246230 .PP
247231 \fBlb config\fR populates the configuration directory for live\-build. This directory is named 'config' and is created in the current directory where \fBlb config\fR was executed.
248232 .PP
249 Note: \fBlb config\fR tries to be smart and sets defaults for some options depending on the setting of other options. This means that when generating a new configuration, you should call \fBlb config\fR only once with all options specified. Calling it several times with only a subset of the options each can result in non working configurations. This is also caused by the fact that \fBlb config\fR called with one option only changes that option, and leaves everything else as is unless it is not defined. However, \fBlb config\fR does warn about know impossible or likely impossible combinations that would lead to non working live systems. If unsure, remove config/{binary,bootstrap,chroot,common,source} and call \fBlb config\fR again.
233 Note: \fBlb config\fR tries to be smart and sets defaults for some options depending upon the settings of others. However, this only typically happens when no existing saved config exists, because values are only automatically set when not already defined (and running \fBlb config\fR involves loading any existing config). This means that when generating a new configuration, you should typically first ensure that any existing saved config files are removed (by deletion of \fBconfig/{binary,bootstrap,chroot,common,source}\fR), before then calling \fBlb config\fR just once with \fBall\fR necessary options specified. Calling it when an existing saved config exists risks ending up with a non\-working configuration, depending on the options changed, since in doing so other options may end up with different values than they otherwise might have had had automatic setting of them not been blocked by an existing saved value. In some cases invalid combinations will be noticed and reported as an error or warning, but this is not always the case and should not be relied upon.
250234
251235 .SH OPTIONS
252236 In addition to its specific options \fBlb config\fR understands all generic live\-build options. See \fIlive\-build\fR(7) for a complete list of all generic live\-build options.
253237 .PP
254 .\" FIXME
255 .IP "\fB\-\-apt\fR apt|aptitude" 4
238 .IP "\fB\-\-apt\fR apt|apt-get|aptitude" 4
256239 defines if apt\-get or aptitude is used to install packages when building the image. The default is apt.
257240 .IP "\fB\-\-apt\-ftp\-proxy\fR \fIURL\fR" 4
258 sets the ftp proxy to be used by apt. By default, this is empty. Note that this variable is only for the proxy that gets used by apt internally within the chroot, it is not used for anything else.
241 sets the FTP proxy to be used by apt. By default, this is empty. Note that this variable is only for the proxy that gets used by apt internally within the chroot, it is not used for anything else.
259242 .IP "\fB\-\-apt\-http\-proxy\fR \fIURL\fR" 4
260 sets the http proxy to be used by apt. By default, this is empty. Note that this variable is only for the proxy that gets used by apt internally within the chroot, it is not used for anything else.
243 sets the HTTP proxy to be used by apt. By default, this is empty. Note that this variable is only for the proxy that gets used by apt internally within the chroot, it is not used for anything else.
261244 .IP "\fB\-\-apt\-indices\fR true|false" 4
262245 defines if the resulting images should have apt indices or not and defaults to true.
263246 .IP "\fB\-\-apt\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
264 defines the default options that will be appended to every apt call that is made inside chroot during the building of the image. By default, this is set to \-\-yes to allow non-interactive installation of packages.
247 defines the default options that will be appended to every apt call that is made inside chroot during the building of the image. By default, this is set to '\-\-yes' to allow non-interactive installation of packages.
265248 .IP "\fB\-\-apt\-pipeline\fR \fIDEPTH\fR" 4
266 sets the depth of the apt/aptitude pipeline. In cases where the remote server is not RFC conforming or buggy (such as Squid 2.0.2) this option can be a value from 0 to 5 indicating how many outstanding requests APT should send. A value of zero MUST be specified if the remote host does not properly linger on TCP connections \- otherwise data corruption will occur. Hosts which require this are in violation of RFC 2068. By default, live\-build does not set this option.
249 sets the depth of the apt/aptitude pipeline. In cases where the remote server is not RFC conforming or buggy (such as Squid 2.0.2) this option can be a value from 0 to 5 indicating how many outstanding requests apt should send. A value of zero MUST be specified if the remote host does not properly linger on TCP connections \- otherwise data corruption will occur. Hosts which require this are in violation of RFC 2068. By default, live\-build does not set this option.
267250 .IP "\fB\-\-apt\-recommends\fR true|false" 4
268251 defines if apt should install recommended packages automatically. By default, this is true.
269252 .IP "\fB\-\-apt\-secure\fR true|false" 4
270253 defines if apt should check repository signatures. This is true by default.
271254 .IP "\fB\-\-apt\-source\-archives\fR true|false" 4
272 defines if deb-src entries should be included in the resulting live image or not, defaults to true.
255 defines if deb-src entries should be included in the resulting live image's apt sources.list or not, defaults to true.
273256 .IP "\fB\-\-aptitude\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
274 defines the default options that will be appended to every aptitude call that is made inside chroot during building of the image. By default, this is set to \-\-assume\-yes to allow non-interactive installation of packages.
275 .IP "\-a|\fB\-\-architectures\fR \fIARCHITECTURE\fR" 4
276 defines the architecture of the to be build image. By default, this is set to the host architecture. Note that you cannot crossbuild for another architecture if your host system is not able to execute binaries for the target architecture natively. For example, building amd64 images on i386 and vice versa is possible if you have a 64bit capable i386 processor and the right kernel. But building powerpc images on an i386 system is not possible.
257 defines the default options that will be appended to every aptitude call that is made inside chroot during building of the image. By default, this is set to '\-\-assume\-yes' to allow non-interactive installation of packages.
258 .IP "\fB\-a\fR|\fB\-\-architecture\fR \fIARCHITECTURE\fR" 4
259 defines the architecture of the to be built image. By default, this is set to the host architecture. Note that you cannot crossbuild for another architecture if your host system is not able to execute binaries for the target architecture natively. For example, building amd64 images on i386 and vice versa is possible if you have a 64bit capable i386 processor and the right kernel. But building powerpc images on an i386 system is not possible.
277260 .IP "\fB\-\-archive\-areas\fR \fIARCHIVE_AREA\fR|""\fIARCHIVE_AREAS\fR""" 4
278 defines which package archive areas of a debian packages archive should be used for configured debian package mirrors. By default, this is set to main. Remember to check the licenses of each packages with respect to their redistributability in your juristiction when enabling contrib or non\-free with this mechanism.
261 defines which package archive areas (a comma or space separated list) of a debian package archive should be used for configured debian package mirrors. By default, this is set to main only. Remember to check the licenses of each package with respect to their redistributability in your juristiction when enabling contrib or non\-free with this mechanism.
279262 .IP "\fB\-\-backports\fR true|false" 4
280263 defines if debian backports package archives should be included in the image or not.
281264 .IP "\fB\-\-binary\-filesystem\fR fat16|fat32|ext2|ext3|ext4|ntfs" 4
282 defines the filesystem to be used in the image type. This only has an effect if the selected binary image type lets you choose a filesystem. For example, when selection iso the resulting CD/DVD has always the filesystem ISO9660. When building hdd images for usb sticks, this is active. Note that it defaults to fat16 on all architectures except sparc where it defaults to ext4. Also note that if you choose fat16 and your resulting binary image gets bigger than 2GB, the binary filesystem automatically gets switched to fat32.
283 .IP "\-b|\fB\-\-binary\-images\fR iso|iso\-hybrid|netboot|tar|hdd" 4
284 defines the image type to build. By default, for images using syslinux this is set to iso\-hybrid to build CD/DVD images that may also be used like hdd images, for non\-syslinux images, it defaults to iso.
265 defines the filesystem to be used in the image type. This only has an effect if the selected binary image type lets you choose a filesystem. For example, for the ISO image type the resulting CD/DVD always has the filesystem ISO9660. When building HDD images for USB sticks, multiple filesystem formats are supported, thus this becomes applicable to allow selection. Note that it defaults to 'fat32' on all architectures. Also note that if you choose 'fat16' and your resulting binary image gets bigger than 2GB, the binary filesystem automatically gets switched to 'fat32'.
266 .IP "\fB\-b\fR|\fB\-\-binary\-image\fR iso|iso\-hybrid|netboot|tar|hdd" 4
267 defines the image type to build. By default, for images using syslinux, this is set to 'iso\-hybrid' to build CD/DVD images that may also be used like HDD images, for non\-syslinux images, it defaults to 'iso'.
285268 .IP "\fB\-\-bootappend\-install\fR \fIPARAMETER\fR|""\fIPARAMETERS\fR""" 4
286269 sets boot parameters specific to debian\-installer, if included.
287270 .IP "\fB\-\-bootappend\-live\fR \fIPARAMETER\fR|""\fIPARAMETERS\fR""" 4
288271 sets boot parameters specific to debian\-live. A complete list of boot parameters can be found in the \fIlive\-boot\fR(7) and \fIlive\-config\fR(7) manual pages.
289272 .IP "\fB\-\-bootappend\-live\-failsafe\fR \fIPARAMETER\fR|""\fIPARAMETERS\fR""" 4
290273 sets boot parameters specific to debian\-live failsafe boot entries. A complete list of boot parameters can be found in the \fIlive\-boot\fR(7) and \fIlive\-config\fR(7) manual pages.
291 .IP "\fB\-\-bootloaders\fR grub-legacy|grub-pc|syslinux|grub-efi" 4
292 defines which bootloader is being used in the generated image. This has only an effect if the selected binary image type lets you choose the bootloader. For example, if you build a iso, always syslinux (or more precise, isolinux) is being used. Also note that some combinations of binary images types and bootloaders may be possible but live\-build does not support them yet. \fBlb config\fR will fail to create such a not yet supported configuration and give a explanation about it. For hdd images on amd64 and i386, the default is syslinux.
293 .IP "\fB\-\-bootstrap\-qemu\-arch \fIARCH\fR" 4
294 sets the architectures to use foreign bootstrap. Defaults to empty.
295 .IP "\fB\-\-bootstrap\-qemu\-exclude \fIPACKAGES\fR" 4
274 .IP "\fB\-\-bootloaders\fR grub-legacy|grub-pc|syslinux|grub-efi|""\fIBOOTLOADERS\fR""" 4
275 defines which bootloaders to use in the generated image. This only has an effect if the selected binary image type lets you choose the bootloader. For example, if you build an ISO then syslinux (or more precise, isolinux) is always used. Also note that not all combinations of binary image types and bootloaders are supported (\fBlb config\fR will fail to create such an unsupported configuration and will give a explanation about it). For HDD images on amd64 and i386, the default is 'syslinux'. This option supports more than one bootloader to be specified (space or comma separated) in order to allow for both BIOS and EFI bootloaders to be included, though note that only one of each type can be used (i.e. do not try to use two BIOS bootloaders).
276 .IP "\fB\-\-bootstrap\-qemu\-arch\fR \fIARCH\fR" 4
277 sets the architecture to use for foreign bootstrap. Defaults to empty.
278 .IP "\fB\-\-bootstrap\-qemu\-exclude\fR \fIPACKAGE\fR|""\fIPACKAGES\fR""" 4
296279 sets the packages to exclude during foreign bootstrap. Defaults to empty.
297 .IP "\fB\-\-bootstrap\-qemu\-static \fIPATH\fR" 4
280 .IP "\fB\-\-bootstrap\-qemu\-static\fR \fIPATH\fR" 4
298281 sets the static qemu binary for foreign bootstrap. Defaults to empty.
299282 .IP "\fB\-\-breakpoints\fR" 4
300 inserts pauses during the generation of the image.
283 inserts pauses during the generation of the image, where breakpoints have been placed, if any (development oriented).
301284 .IP "\fB\-\-build\-with\-chroot\fR true|false" 4
302 defines whether live\-build should use the tools from within the chroot to build the binary image or not by using and including the host system's tools. This is a very dangerous option, using the tools of the host system can lead to tainted and even non-bootable images if the host systems version of the required tools (mainly these are the bootloaders such as syslinux and grub, and the auxiliary tools such as dosfstools, xorriso, squashfs-tools and others) do not \fBexactly\fR match what is present at build-time in the target distribution. Never do disable this option unless you are \fBexactly\fR sure what you are doing and have \fBcompletely\fI understood its consequences.
285 defines whether live\-build should use the tools from within the chroot to build the binary image or not by using and including the host system's tools. This is a very dangerous option, using the tools of the host system can lead to tainted and even non-bootable images if the host systems version of the required tools (mainly these are the bootloaders such as syslinux and grub, and the auxiliary tools such as dosfstools, xorriso, squashfs-tools and others) do not \fBexactly\fR match what is present at build-time in the target distribution. Never disable this option unless you are \fBexactly\fR sure what you are doing and have \fBcompletely\fR understood its consequences.
303286 .IP "\fB\-\-cache\fR true|false" 4
304 defines globally if any cache should be used at all. Different caches can be controlled through the their own options.
287 defines globally if any cache should be used at all. Different caches can be controlled through their own options.
305288 .IP "\fB\-\-cache\-indices\fR true|false" 4
306 defines if downloaded package indices and lists should be cached which is false by default. Enabling it lets you rebuild an image completely offline, however, you would not get updates anymore then.
289 defines if downloaded package indices and lists should be cached. This is false by default. Enabling it lets you rebuild an image completely offline, however, you would not get updates anymore then.
307290 .IP "\fB\-\-cache\-packages\fR true|false" 4
308 defines if downloaded packages files should be cached which is true by default. Disabling it does save space consumption in your build directory, but remember that you will cause much unnecessary traffic if you do a couple of rebuilds. In general you should always leave it true, however, in some particular rare build setups, it can be faster to refetch packages from the local network mirror rather than to utilize the local disk.
291 defines if downloaded packages files should be cached. This is true by default. Disabling it does save space consumption in your build directory, but remember that you will cause much unnecessary traffic if you do a couple of rebuilds. In general you should always leave it true, however, in some particular rare build setups, it can be faster to refetch packages from the network mirror, if using a local one, rather than to utilize the local disk.
309292 .IP "\fB\-\-cache\-stages\fR \fISTAGE\fR|""\fISTAGES\fR""" 4
310 sets which stages should be cached. By default set to bootstrap. As an exception to the normal stage names, also rootfs can be used here which does only cache the generated root filesystem in filesystem.{dir,ext*,squashfs}. This is useful during development if you want to rebuild the binary stage but not regenerate the root filesystem all the time.
293 sets which stages should be cached (a comma or space separated list). By default this is set to 'bootstrap'. As an exception to the normal stage names, 'rootfs' can also be used here which means only cache the generated root filesystem in filesystem.{dir,ext*,squashfs}. This is useful during development if you want to rebuild the binary stage but not regenerate the root filesystem all the time.
311294 .IP "\fB\-\-checksums\fR md5|sha1|sha224|sha256|sha384|sha512|none" 4
312 defines if the binary image should contain a file called XXXsums.txt, where XXX is one of the mentioned checksum types. This file lists all files on the image together with their checksums. This in turn can be used by \fIlive\-boot\fR(7)'s built\-in integrity\-check to verify the medium if specified at boot prompt. In general, this should not be none and is an important feature of live system released to the public. However, during development of very big images it can save some time by not calculating the checksums.
295 defines if the binary image should contain a file called XXXsums.txt, where XXX is one of the mentioned checksum types. This file lists all files on the image together with their checksums. This in turn can be used by \fIlive\-boot\fR(7)'s built\-in integrity\-check to verify the medium if specified at boot prompt. In general, this should not be 'none' and is an important feature of live system released to the public. However, during development of very big images it can save some time by not calculating the checksums.
313296 .IP "\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none" 4
314 defines which filesystem type should be used for the root filesystem image. If you use none, then no filesystem image is created and the root filesystem content is copied on the binary image filesystem as flat files. Depending on what binary filesystem you have chosen, it may not be possible to build with such a plain root filesystem, e.g. fat16/fat32 will not work as linux does not support to run directly on them.
297 defines which filesystem type should be used for the root filesystem image. If you use none, then no filesystem image is created and the root filesystem content is copied on the binary image filesystem as flat files. Depending on what binary filesystem you have chosen, it may not be possible to build with such a plain root filesystem, e.g. fat16/fat32 will not work as linux does not support running directly on them.
298 .IP "\fB\-\-chroot\-squashfs\-compression\-level\fR LEVEL" 4
299 defines the compression level that is used for the root filesystem image if squashfs is used. Each compression algorithm supports different levels (or none). You can look them up in the \fImksquashfs\fR help. Defaults to the default setting in \fImksquashfs\fR.
300 .IP "\fB\-\-chroot\-squashfs\-compression\-type\fR gzip|lzma|lzo|lz4|xz|zstd" 4
301 defines the compression algorithm that is used for the root filesystem image if squashfs is used. Defaults to xz.
315302 .IP "\fB\-\-clean\fR" 4
316303 minimizes config directory by automatically removing unused and thus empty subdirectories.
317304 .IP "\fB\-\-color\fR" 4
318305 turns on color in the messages.
319306 .IP "\fB\-\-compression\fR bzip2|gzip|lzip|xz|none" 4
320307 defines the compression program to be used to compress tarballs. Defaults to none.
321 .IP "\-c|\fB\-\-conffile\fR \fIFILE\fR" 4
322 uses a user specified alternative configuration file in addition to the normally used one in the config directory.
308 .IP "\fB\-c\fR|\fB\-\-conffile\fR \fIFILE\fR" 4
309 defines a user specified alternative configuration file to use in addition to the normally used one in the config directory.
323310 .IP "\fB\-\-config\fR \fIGIT_URL\fR::\fIGIT_BRANCH\fR" 4
324 bootstraps the config tree from a git repository, optionally appended by a Git Id (branch, commit, tag, etc.).
311 bootstraps the config tree from a git repository, optionally appended by a Git ID (branch, commit, tag, etc.).
325312 .IP "\fB\-\-debconf\-frontend\fR dialog|editor|noninteractive|readline" 4
326 defines what value the debconf frontend should be set to inside the chroot. Note that setting it to anything but noninteractive, which is the default, makes your build asking questions during the build.
313 defines what value the debconf frontend should be set to inside the chroot. Note that setting it to anything but 'noninteractive', which is the default, makes your build asking questions during the build.
327314 .IP "\fB\-\-debconf\-priority\fR low|medium|high|critical" 4
328315 defines what value the debconf priority should be set to inside the chroot. By default, it is set to critical, which means that almost no questions are displayed. Note that this only has an effect if you use any debconf frontend different from noninteractive.
329 .IP "\fB\-\-debian\-installer\fR true|cdrom|netinst|netboot|businesscard|live|false" 4
316 .IP "\fB\-\-debian\-installer\fR cdrom|netinst|netboot|businesscard|live|none" 4
330317 defines which type, if any, of the debian\-installer should be included in the resulting binary image. By default, no installer is included. All available flavours except live are the identical configurations used on the installer media produced by regular debian\-cd. When live is chosen, the live\-installer udeb is included so that debian\-installer will behave different than usual \- instead of installing the debian system from packages from the medium or the network, it installs the live system to the disk.
331318 .IP "\fB\-\-debian\-installer\-distribution\fR daily|\fICODENAME\fR" 4
332 defines the distribution where the debian\-installer files should be taken out from. Normally, this should be set to the same distribution as the live system. However, some times, one wants to use a newer or even daily built installer.
319 defines the distribution where the debian\-installer files should be taken out from. Normally, this should be set to the same distribution as the live system. However, sometimes, one wants to use a newer or even daily built installer.
333320 .IP "\fB\-\-debian\-installer\-gui\fR true|false" 4
334 defines if the debian\-installer graphical GTK interface should be true or not. In Debian mode and for most versions of Ubuntu, this option is true, whereas otherwise false, by default.
321 defines whether the graphical version of the debian\-installer should be provided alongside the text based one. This defaults to true.
335322 .IP "\fB\-\-debian\-installer\-preseedfile\fR \fIFILE\fR|\fIURL\fR" 4
336323 sets the filename or URL for an optionally used and included preseeding file for debian\-installer. If config/binary_debian\-installer/preseed.cfg exists, it will be used by default.
337 .IP "\fB\-\-debootstrap\-options\fR \fIOPTIONS\fR" 4
324 .IP "\fB\-\-debootstrap\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
338325 passes the given options to debootstrap when setting up the base system.
339326 .IP "\fB\-\-debootstrap\-script\fR \fISCRIPT\fR" 4
340327 tells debootstrap to use an alternate bootstrap script (last parameter to debootstrap).
341328 .IP "\fB\-\-debug\fR" 4
342329 turns on debugging informational messages.
343 .IP "\-d|\fB\-\-distribution\fR \fICODENAME\fR" 4
344 defines the distribution of the resulting live system.
330 .IP "\fB\-d\fR|\fB\-\-distribution\fR \fICODENAME\fR" 4
331 defines the distribution of the resulting live system. This currently defaults to 'buster'. The value 'sid' can be used for Debian unstable.
345332 .IP "\fB\-\-distribution\-binary\fR \fICODENAME\fR" 4
346333 defines the distribution enabled in the resulting live system (defaults to the value set in \fB\-\-distribution\fR)
347334 .IP "\fB\-\-distribution\-chroot\fR \fICODENAME\fR" 4
348335 defines the distribution used to build the live system (defaults to the value set in \fB\-\-distribution\fR)
349336 .IP "\fB\-\-dump\fR" 4
350 prepares a report of the currently present live system configuration and the version of live\-build used. This is useful to provide if you submit bug reports, we do get all information required for us to locate and replicate an error.
351 .IP "\fB\-\-fdisk\fR fdisk|fdisk.dist" 4
352 sets the filename of the fdisk binary from the host system that should be used. This is autodetected and does generally not need any customization.
337 prepares a report of the currently present live system configuration and the version of live\-build used. This is useful to provide if you submit bug reports, helping to provide basic useful information required for us to locate and replicate an error.
353338 .IP "\fB\-\-firmware\-binary\fR true|false" 4
354339 includes firmware packages in debian-installer. Defaults to true.
355340 .IP "\fB\-\-firmware\-chroot\fR true|false" 4
356 includes firmware packages in debian-installer. Defaults to true.
341 includes firmware packages in the live image. Defaults to true. Beware that some firmware packages are non-free and will only be included if the non-free archive area is included in \fB\-\-archive\-areas\fR (and \fB\-\-parent\-archive\-areas\fR). This is particularly relevant if you want working wifi for instance.
357342 .IP "\fB\-\-force\fR" 4
358343 forces re\-execution of already run stages. Use only if you know what you are doing. It is generally safer to use \fBlb clean\fR to clean up before re\-executing \fBlb build\fR.
359 .IP "\fB\-\-grub\-splash\fR \fIFILE\fR" 4
360 defines the name of an optional to be included splash screen graphic for the grub bootloader.
361344 .IP "\fB\-\-gzip\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
362 defines the default options that will be appended to (almost) every gzip call during the building of the image. By default, this is set to \-\-best to use highest (but slowest) compression. Dynamically, if the host system supports it, also \-\-rsyncable is added.
345 defines the default options that will be appended to (almost) every gzip call during the building of the image. By default, this is set to '\-\-best' to use highest (but slowest) compression. Dynamically, if the host system supports it, also '\-\-rsyncable' is added.
363346 .IP "\fB\-\-hdd\-label\fR \fILABEL\fR" 4
364 defines the label for the hdd target. Defaults to DEBIAN_LIVE.
347 defines the label for the HDD target. Defaults to 'DEBIAN_LIVE'.
365348 .IP "\fB\-\-hdd\-partition\-start\fR \fISTART\fR" 4
366 sets the start of the partition for the hdd target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout. Defaults to empty.
349 sets the start of the partition for the HDD target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout. Defaults to empty.
367350 .IP "\fB\-\-hdd\-size\fR \fISIZE\fR" 4
368 defines the size for the hdd target. The unit is MiB. Defaults to auto, which generates the smallest possible image.
351 defines the size for the HDD target. The unit is MiB. Defaults to 'auto', which generates the smallest possible image.
369352 .IP "\fB\-\-ignore\-system\-defaults\fR" 4
370 \fBlb config\fR by default reads system defaults from \fI/etc/live/build.conf\fR and \fI/etc/live/build/*\fR when generating a new live system config directory. This is useful if you want to set global settings, such as mirror locations, and don't want to specify them all of the time.
353 \fBlb config\fR by default reads system defaults from \fI/etc/live/build.conf\fR and \fI/etc/live/build/*\fR when generating a new live system config directory. This is useful if you want to set global settings, such as mirror locations, and don't want to specify them all of the time. This option allows you to ignore such global settings.
371354 .IP "\fB\-\-image\-name\fR \fINAME\fR" 4
372355 sets the base name of the image. Defaults to live-image.
373356 .IP "\fB\-\-initramfs\fR none|live\-boot" 4
374357 sets the name of the package that contains the live system specific initramfs modification and defaults to live\-boot. Using 'none' is useful if the resulting system image should not be a live image (experimental).
375358 .IP "\fB\-\-initramfs\-compression\fR bzip2|gzip|lzma]
376 defines the compression program to be used to compress the initramfs. Defaults to gzip.
359 defines the compression program to be used to compress the initramfs. Defaults to 'gzip'.
377360 .IP "\fB\-\-initsystem\fR sysvinit|systemd|none]
378 defines the init system. Defaults to systemd.
379 .IP "\fB\-\-interactive\fR shell" 4
380 defines if after the chroot stage and before the beginning of the binary stage, a interactive shell login should be spawned in the chroot in order to allow you to do manual customizations. Once you close the shell with logout or exit, the build will continue as usual. Note that it's strongly discouraged to use this for anything else than testing. Modifications that should be present in all builds of a live system should be properly made through hooks. Everything else destroys the beauty of being able to completely automatise the build process and making it non interactive. By default, this is of course false.
361 defines the init system. Defaults to 'systemd'.
362 .IP "\fB\-\-interactive\fR true|shell|x11|xnest|false" 4
363 defines if after the chroot stage and before the beginning of the binary stage, an interactive shell login should be spawned in the chroot in order to allow you to do manual customizations, or as an alternative to 'true' and 'false' a specific shell to use (note that 'true' corresponds to a value of 'shell'). Once you close the shell with logout or exit, the build will continue as usual. Note that it's strongly discouraged to use this for anything else than testing. Modifications that should be present in all builds of a live system should be properly made through hooks. Everything else destroys the beauty of being able to completely automate the build process and making it non-interactive. By default, this is of course 'false'.
381364 .IP "\fB\-\-iso\-application\fR \fINAME\fR" 4
382 sets the APPLICATION field in the header of a resulting CD/DVD image and defaults to "Debian Live" in debian mode, and "Ubuntu Live" in ubuntu mode.
365 sets the APPLICATION field in the header of a resulting CD/DVD image and defaults to "Debian Live".
383366 .IP "\fB\-\-iso\-preparer\fR \fINAME\fR" 4
384367 sets the PREPARER field in the header of a resulting CD/DVD image. By default this is set to "live\-build \fIVERSION\fR; https://salsa.debian.org/live-team/live-build", where VERSION is expanded to the version of live\-build that was used to build the image.
385368 .IP "\fB\-\-iso\-publisher\fR \fINAME\fR" 4
386 sets the PUBLISHED field in the header of a resulting CD/DVD image. By default, this is set to 'Live Systems project; https://wiki.debian.org/DebianLive; debian\[email protected]'. Remember to change this to the appropriate values at latest when you distributing custom and unofficial images.
369 sets the PUBLISHED field in the header of a resulting CD/DVD image. By default, this is set to 'Debian Live project; https://wiki.debian.org/DebianLive; debian\[email protected]'. Remember to change this to the appropriate value when distributing custom and unofficial images.
387370 .IP "\fB\-\-iso\-volume\fR \fINAME\fR" 4
388 sets the VOLUME field in the header of a resulting CD/DVD and defaults to '(\fIMODE\fR) (\fIDISTRIBUTION\fR) (\fIDATE\fR)' whereas MODE is expanded to the name of the mode in use, DISTRIBUTION the distribution name, and DATE with the current date and time of the generation.
389 .IP "\fB\-\-isohybrid\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
390 defines options to pass to isohybrid.
371 sets the VOLUME field in the header of a resulting CD/DVD and defaults to 'Debian (\fIDISTRIBUTION\fR) (\fIDATE\fR)' where DISTRIBUTION is replaced with the distribution name, and DATE with the current date and time of the generation.
391372 .IP "\fB\-\-jffs2\-eraseblock\fR \fISIZE\fR" 4
392373 sets the eraseblock size for a JFFS2 (Second Journaling Flash File System) filesystem. The default is 64 KiB. If you use an erase block size different than the erase block size of the target MTD device, JFFS2 may not perform optimally. If the SIZE specified is below 4096, the units are assumed to be KiB.
393 .IP "\fB\-\-keyring\-packages\fR \fIPACKAGE\fI|""\fIPACKAGES\fR""" 4
394 sets the keyring package or additional keyring packages. By default this is set to debian\-archive\-keyring.
395 .IP "\-k|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|""\fIFLAVOURS\fR""" 4
396 sets the kernel flavours to be installed. Note that in case you specify more than that the first will be configured the default kernel that gets booted. Optionally you can use an architecture qualifier, e.g. amd64:amd64. Given an i386 system you can enable amd64 foreign architecture thanks to the commands: "dpkg \-\-add\-architecture amd64 ; apt\-get update". This enables you to use "686 amd64:amd64" as a linux flavour. The amd64 kernel will be installed alongside the i386's 686 kernel.
397 .IP "\fB\-\-linux\-packages\fR ""\fIPACKAGES\fR""" 4
398 sets the internal name of the kernel packages naming scheme. If you use debian kernel packages, you will not have to adjust it. If you decide to use custom kernel packages that do not follow the debian naming scheme, remember to set this option to the stub of the packages only (for debian this is linux\-image\-2.6), so that \fISTUB\fR-\fIFLAVOUR\fR results in a valid package name (for debian e.g. linux\-image\-686\-pae). Preferably you use the meta package name, if any, for the stub, so that your configuration is ABI independent. Also don't forget that you have to include stubs of the binary modules packages for unionfs or aufs, and squashfs if you built them out-of-tree.
374 .IP "\fB\-\-keyring\-packages\fR \fIPACKAGE\fR|""\fIPACKAGES\fR""" 4
375 sets the keyring package or additional keyring packages (a space separated list). By default this is set to 'debian\-archive\-keyring'.
376 .IP "\fB\-k\fR|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|""\fIFLAVOURS\fR""" 4
377 sets the kernel flavours to be installed (a space separated list). Note that in case you specify more than one the first will be configured as the default kernel that gets booted. Optionally you can use an architecture qualifier, e.g. amd64:amd64. Given an i386 system you can enable amd64 foreign architecture thanks to the commands: "dpkg \-\-add\-architecture amd64 ; apt\-get update". This enables you to use "686 amd64:amd64" as a linux flavour. The amd64 kernel will be installed alongside the i386's 686 kernel.
378 .IP "\fB\-\-linux\-packages\fR \fIPACKAGE\fR|""\fIPACKAGES\fR""" 4
379 defines a space separated list of partial kernel package names. For each name given and for each flavour in \fBLB_LINUX_FLAVOURS_WITH_ARCH\fR (\fB\-\-linux-flavours\fR), '\-FLAVOUR' will be appended to the name to get the names of kernel packages to be included. By default this is 'linux\-image'. So for instance if this is set to "linux\-image linux\-headers" and \fBLB_LINUX_FLAVOURS_WITH_ARCH\fR is "i386 amd64:amd64" then you will get the four packages "linux\-image\-i386", "linux\-image\-amd64:amd64", "linux\-headers\-i386" and "linux\-headers\-amd64:amd64". You can specify "none" to disable the kernel installation step.
399380 .IP "\fB\-\-loadlin\fR true|false" 4
400381 sets loadlin. Defaults to false, except when the debian-installer is included for x86_64 or i386.
401 .IP "\fB\-\-losetup\fR losetup|losetup.orig" 4
402 sets the filename of the losetup binary from the host system that should be used. This is autodetected and does generally not need any customization.
403382 .IP "\fB\-\-memtest\fR memtest86+|memtest86|none" 4
404 defines if memtest, memtest86+ or no memory tester at all should be included as secondary bootloader configuration. This is only available on amd64 and i386 and defaults to memtest86+.
383 defines if memtest, memtest86+ or no memory tester at all should be included (available as a bootloader menu entry). This is only available on amd64 and i386 and defaults to memtest86+.
405384 .IP "\fB\-\-mirror\-binary\fR \fIURL\fR" 4
406 sets the location of the derivative package mirror that should end up configured in the final image and which is the one a user would see and use. This has not necessarily to be the same that is used to build the image, e.g. if you use a local mirror but want to have an official mirror in the image. This defaults to http://deb.debian.org/debian/.
385 sets the location of the derivative package mirror that should end up configured in the final image and which is the one a user would see and use. This has not necessarily to be the same that is used to build the image, e.g. if you use a local mirror but want to have an official mirror in the image. This defaults to 'http://deb.debian.org/debian/'.
407386 .IP "\fB\-\-mirror\-binary\-security\fR \fIURL\fR" 4
408 sets the location of the derivatives security package mirror that should end up configured in the final image. This defaults to http://security.debian.org/.
387 sets the location of the derivatives security package mirror that should end up configured in the final image. This defaults to 'http://security.debian.org/'.
409388 .IP "\fB\-\-mirror\-bootstrap\fR \fIURL\fR" 4
410 sets the location of the debian package mirror that should be used to bootstrap the derivative from. This defaults to http://deb.debian.org/debian/.
389 sets the location of the debian package mirror that should be used to bootstrap the derivative from. This defaults to 'http://deb.debian.org/debian/'.
411390 .IP "\fB\-\-mirror\-chroot\fR \fIURL\fR" 4
412 sets the location of the debian package mirror that will be used to fetch the packages of the derivative in order to build the live system. By default, this is set to the value of \-\-mirror\-bootstrap.
391 sets the location of the debian package mirror that will be used to fetch the packages of the derivative in order to build the live system. By default, this is set to the value of \fB\-\-mirror\-bootstrap\fR.
413392 .IP "\fB\-\-mirror\-chroot\-security\fR \fIURL\fR" 4
414 sets the location of the debian security package mirror that will be used to fetch the packages of the derivative in order to build the live system. By default, this points to http://security.debian.org/.
393 sets the location of the debian security package mirror that will be used to fetch the packages of the derivative in order to build the live system. By default, this points to 'http://security.debian.org/'.
415394 .IP "\fB\-\-mirror\-debian\-installer\fR \fIURL\fR" 4
416 sets the location of the mirror that will be used to fetch the debian installer images of the derivative. By default, this points to the same mirror used to build the live system, i.e. the value of \-\-mirror\-chroot.
417 .IP "\fB\-\-mode\fR debian|progress-linux" 4
395 sets the location of the mirror that will be used to fetch the debian installer images of the derivative. By default, this points to the same mirror used to build the live system, i.e. the value of \fB\-\-mirror\-chroot\fR.
396 .IP "\fB\-\-mode\fR debian" 4
418397 defines a global mode to load project specific defaults. By default this is set to debian.
419 .IP "\fB\-\-net\-cow\-filesystem\fR nfs|cfs" 4
420 defines the filesystem type for the copy\-on\-write layer and defaults to nfs.
421 .IP "\fB\-\-net\-cow\-mountoptions\fR \fIOPTIONS\fR" 4
422 sets additional options for mounting the copy\-on\-write layer in netboot images and is by default empty.
423 .IP "\fB\-\-net\-cow\-path\fR \fIPATH\fR" 4
424 defines the path to client writable filesystem. Anywhere that \fIclient_mac_address\fR is specified in the path live\-boot will substitute the MAC address of the client delimited with hyphens.
425 .PP
426 .IP "" 4
427 Example:
428 .br
429 /export/hosts/client_mac_address
430 .br
431 /export/hosts/00\-16\-D3\-33\-92\-E8
432 .IP "\fB\-\-net\-cow\-server\fR \fIIP\fR|\fIHOSTNAME\fR" 4
433 sets the IP or hostname that will be configured in the bootloader configuration for the copy\-on\-write filesystem of your netboot image and is by default empty.
434 .IP "\fB\-\-net\-root\-filesystem\fR nfs|cfs" 4
435 defines the filesystem that will be configured in the bootloader configuration for your netboot image. This defaults to nfs.
436 .IP "\fB\-\-net\-root\-mountoptions\fR \fIOPTIONS\fR" 4
437 sets additional options for mounting the root filesystem in netboot images and is by default empty.
438 .IP "\fB\-\-net\-root\-path\fR \fIPATH\fR" 4
439 sets the file path that will be configured in the bootloader configuration for your netboot image. This defaults to /srv/debian\-live in debian mode, and /srv/ubuntu-live when in ubuntu mode.
440 .IP "\fB\-\-net\-root\-server\fR \fIIP\fR|\fIHOSTNAME\fR" 4
441 sets the IP or hostname that will be configured in the bootloader configuration for the root filesystem of your netboot image. This defaults to 192.168.1.1.
442398 .IP "\fB\-\-net\-tarball\fR true|false" 4
443 defines if a compressed tarball should be created. Disabling this options leads to no tarball at all, the plain binary directory is considered the output in this case. Default is true.
399 defines if a compressed tarball should be created. If disabled, the plain binary directory is considered the output. Default is true.
400 .IP "\fB\-\-no\-color\fR" 4
401 turns off color in the messages.
444402 .IP "\fB\-\-onie\fR true|false" 4
445 defines if an ONIE.bin image is generated. ONIE binaries can be loaded by supported systems, and will in turn boot the live image. Note that iso or hybrid-iso are the only formats supported. For more information visit <\fIhttp://onie.org/\fR>. Default is false.
446 .IP "\fB\-\-onie\-kernel\-cmdline\fR \fI""OPTION1 OPTION2""\fR" 4
403 defines if an ONIE.bin image is generated. ONIE binaries can be loaded by supported systems, and will in turn boot the live image. Note that ISO or hybrid-iso are the only formats supported. For more information visit <\fIhttp://onie.org/\fR>. Default is false.
404 .IP "\fB\-\-onie\-kernel\-cmdline\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
447405 defines additional kernel command line options that the ONIE system will use when booting the image. Default is empty string.
448406 .IP "\fB\-\-parent\-archive\-areas\fR \fIARCHIVE_AREA\fR|""\fIARCHIVE_AREAS\fR""" 4
449 defines the archive areas for derivatives of the resulting live system.
450 .IP "\fB\-\-parent\-debian\-installer\-distribution\fR \fICODENAME\fR" 4
407 defines the archive areas for derivatives of the resulting live system (a comma or space separated list).
408 .IP "\fB\-\-parent\-debian\-installer\-distribution\fR daily|\fICODENAME\fR" 4
451409 defines the parent debian\-installer distribution for derivatives of the resulting live system.
452410 .IP "\fB\-\-parent\-distribution\fR \fICODENAME\fR" 4
453411 defines the parent distribution for derivatives of the resulting live system.
456414 .IP "\fB\-\-parent\-distribution\-chroot\fR \fICODENAME\fR" 4
457415 defines the derivative's parent distribution used to build the live system.
458416 .IP "\fB\-\-parent\-mirror\-binary\fR \fIURL\fR" 4
459 sets the location of the debian package mirror that should end up configured in the final image and which is the one a user would see and use. This has not necessarily to be the same that is used to build the image, e.g. if you use a local mirror but want to have an official mirror in the image. This defaults to the value of \-\-mirror\-binary.
417 sets the location of the debian package mirror that should end up configured in the final image and which is the one a user would see and use. This has not necessarily to be the same that is used to build the image, e.g. if you use a local mirror but want to have an official mirror in the image. This defaults to the value of \fB\-\-mirror\-binary\fR.
460418 .IP "\fB\-\-parent\-mirror\-binary\-security\fR \fIURL\fR" 4
461 sets the location of the debian security package mirror that should end up configured in the final image. This defaults to the value of \-\-mirror\-binary\-security.
419 sets the location of the debian security package mirror that should end up configured in the final image. This defaults to the value of \fB\-\-mirror\-binary\-security\fR.
462420 .IP "\-m|\fB\-\-parent\-mirror\-bootstrap\fR \fIURL\fR" 4
463 sets the location of the debian package mirror that should be used to bootstrap from. This defaults to the value of \-\-mirror-\bootstrap.
421 sets the location of the debian package mirror that should be used to bootstrap from. This defaults to the value of \fB\-\-mirror\-bootstrap\fR.
464422 .IP "\fB\-\-parent\-mirror\-chroot\fR \fIURL\fR" 4
465 sets the location of the debian package mirror that will be used to fetch the packages in order to build the live system. This defaults to the value of \-\-parent\-mirror\-bootstrap.
423 sets the location of the debian package mirror that will be used to fetch the packages in order to build the live system. This defaults to the value of \fB\-\-parent\-mirror\-bootstrap\fR.
466424 .IP "\fB\-\-parent\-mirror\-chroot\-security\fR \fIURL\fR" 4
467 sets the location of the debian security package mirror that will be used to fetch the packages in order to build the live system. This defaults to the value of \-\-mirror\-chroot\-security.
425 sets the location of the debian security package mirror that will be used to fetch the packages in order to build the live system. This defaults to the value of \fB\-\-mirror\-chroot\-security\fR.
468426 .IP "\fB\-\-parent\-mirror\-debian\-installer\fR \fIURL\fR" 4
469 sets the location of the mirror that will be used to fetch the debian installer images. This defaults to the value of \-\-parent\-mirror\-chroot.
427 sets the location of the mirror that will be used to fetch the debian installer images. This defaults to the value of \fB\-\-parent\-mirror\-chroot\fR.
470428 .IP "\fB\-\-quiet\fR" 4
471429 reduces the verbosity of messages output by \fBlb build\fR.
472430 .IP "\fB\-\-security\fR true|false" 4
473431 defines if the security repositories specified in the security mirror options should be used or not.
474432 .IP "\fB\-\-source\fR true|false" 4
475 defines if a corresponding source image to the binary image should be build. By default this is false because most people do not require this and would require to download quite a few source packages. However, once you start distributing your live image, you should make sure you build it with a source image alongside.
476 .IP "\-s|\fB\-\-source\-images\fR iso|netboot|tar|hdd" 4
477 defines the image type for the source image. Default is tar.
433 defines if a corresponding source image to the binary image should be built. By default this is false because most people do not require this and it involves downloading quite a few source packages. However, if you distribute your live image to others, you should make sure you build it with a source image alongside to help enable you to comply with licensing terms.
434 .IP "\fB\-s\fR|\fB\-\-source\-images\fR iso|netboot|tar|hdd" 4
435 defines the image type for the source image. Default is tar. More than one can be specified (a comma or space separated list).
478436 .IP "\fB\-\-swap\-file\-path\fR \fIPATH\fR" 4
479437 defines the path to a swap file to create in the binary image. Default is not to create a swap file.
480438 .IP "\fB\-\-swap\-file\-size\fR \fIMB\fR" 4
481439 defines what size in megabytes the swap file should be, if one is to be created. Default is 512MB.
482440 .IP "\fB\-\-system\fR live|normal" 4
483 defines if the resulting system image should a live system or a normal, non-live system.
484 .IP "\fB\-\-tasksel\fR apt|aptitude|tasksel" 4
485 selects which program is used to install tasks. By default, this is set to tasksel.
486 .IP "\fB\-\-uefi\-secure\-boot\fR \fIauto|enable|disable\fR" 4
441 defines if the resulting system image should be a live system or a normal, non-live system. Defaults to live.
442 .IP "\fB\-\-uefi\-secure\-boot\fR auto|enable|disable" 4
487443 enables or disables Secure Boot support when using grub-efi, by installing signed shim and grub-efi packages. By default, this is set to auto, which means if the packages are available they will be installed, but if not only a warning will be printed and the normal non-signed grub-efi will be used.
488444 .IP "\fB\-\-updates\fR true|false" 4
489445 defines if debian updates package archives should be included in the image or not.
446 .IP "\fB\-\-utc\-time\fR true|false" 4
447 defines if timestamps should be UTC. Default is false, unless SOURCE_DATE_EPOCH is set. Note, this does not affect the build log which remains local time.
448 .IP "\fB\-\-validate\fR" 4
449 requests that the config be validated only, not changed, thus after the validation check the script ends rather than writing an updated config. Please note that at the time of writing, many options do not have corresponding validation checks.
490450 .IP "\fB\-\-verbose\fR" 4
491451 increases the verbosity of messages output by \fBlb build\fR.
492452 .IP "\fB\-\-win32\-loader\fR true|false" 4
493453 defines if win32\-loader should be included in the binary image or not.
494454 .IP "\fB\-\-zsync\fR true|false" 4
495455 defines whether a file for distributing the image in \fIzsync\fR(1) format will be generated. Defaults to true.
496 .\" FIXME
497456
498457 .SH ENVIRONMENT
499 .\" FIXME
500 Currently, command line switches can also be specified through the corresponding environment variable. However, this generally should not be relied upon, as it is an implementation detail that is subject to change in future releases. For options applying directly to live\-build, environment variables are named LB_FOO, meaning, e.g. \fB\-\-apt\-ftp\-proxy\fR becomes LB_APT_FTP_PROXY (the exception being internal options such as \fB\-\-debug\fR). For options passed to another program, as in APT_OPTIONS or GZIP_OPTIONS, no LB_ prefix is used.
501 \" FIXME
458 Currently, command line switches can also be specified through the corresponding environment variable. However, this generally should not be relied upon, as it is an implementation detail that is subject to change in future releases. For options applying directly to live\-build, environment variables are named LB_FOO, meaning, e.g. \fB\-\-apt\-ftp\-proxy\fR becomes \fBLB_APT_FTP_PROXY\fR (the exception being internal options such as \fB\-\-debug\fR). For options passed to another program, as in APT_OPTIONS or GZIP_OPTIONS, no LB_ prefix is used.
502459
503460 .SH FILES
504 .\" FIXME
505461 .IP "\fBauto/config\fR" 4
506462 .IP "\fB/etc/live/build.conf, /etc/live/build/*\fR" 4
507 An optional, global configuration file for \fBlb config\fR variables. It is useful to specify a few system wide defaults, like LB_PARENT_MIRROR_BOOTSTRAP. This feature can be false by specifying the \fB\-\-ignore\-system\-defaults\fR option.
508 .\" FIXME
463 An optional, global configuration file for \fBlb config\fR variables. It is useful to specify a few system wide defaults, like \fBLB_PARENT_MIRROR_BOOTSTRAP\fR. This feature can be disabled by using the \fB\-\-ignore\-system\-defaults\fR option.
509464
510465 .SH SEE ALSO
511466 \fIlive\-build\fR(7)
517472 This program is a part of live\-build.
518473
519474 .SH HOMEPAGE
520 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
475 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
521476
522477 .SH BUGS
523 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
478 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
524479
525480 .SH AUTHOR
526 live\-build was written by Daniel Baumann <\[email protected]\fR>.
481 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
0 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
11
22 .SH NAME
33 \fBlb_installer\fR \- Complete the installer stage
44
55 .SH SYNOPSIS
6 \fBlb installer\fR [\fIlive\-build options\fR]
6 \fBlb installer\fR [\fIOPTIONS\fR]
77
88 .SH DESCRIPTION
9 \fBlb installer\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
9 \fBlb installer\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
1010 .PP
1111 \fBlb installer\fR calls all necessary live\-build programs in the correct order to complete the installer stage.
1212
2222 This program is a part of live\-build.
2323
2424 .SH HOMEPAGE
25 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
25 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
2626
2727 .SH BUGS
28 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
28 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
2929
3030 .SH AUTHOR
31 live\-build was written by Daniel Baumann <\[email protected]\fR>.
31 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
0 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
11
22 .SH NAME
33 \fBlb_source\fR \- Complete the source stage
44
55 .SH SYNOPSIS
6 \fBlb source\fR [\fIlive\-build options\fR]
6 \fBlb source\fR [\fIOPTIONS\fR]
77
88 .SH DESCRIPTION
9 \fBlb source\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
9 \fBlb source\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
1010 .PP
1111 \fBlb source\fR calls all necessary live\-build programs in the correct order to complete the source stage.
1212
2222 This program is a part of live\-build.
2323
2424 .SH HOMEPAGE
25 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
25 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
2626
2727 .SH BUGS
28 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
28 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
2929
3030 .SH AUTHOR
31 live\-build was written by Daniel Baumann <\[email protected]\fR>.
31 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
0 .TH LIVE\-BUILD 7 2017\-08\-29 1:20170829 "Live Systems Project"
0 .TH LIVE\-BUILD 7 2020\-04\-27 1:20191222 "Debian Live Project"
11
22 .SH NAME
3 \fBlive\-build\fR \- the live systems tool suite
3 \fBlive\-build\fR \- the Debian Live tool suite
44
55 .SH SYNOPSIS
6 .\" FIXME
7 \fBlb \fR\fICOMMAND\fR [\fB\-h|\-\-help\fR] [\fB\-u|\-\-usage\fR] [\fB\-v|\-\-version\fR] [\fB\-\-breakpoints\fR] [\fB\-\-conffile\fR] [\fB\-\-debug\fR] [\fB\-\-force\fR] [\fB\-\-quiet\fR] [\fB\-\-verbose\fR]
8 .\" FIXME
6 \fBlb\fR {\fB\-h\fR|\fB\-\-help\fR|\fB\-u\fR|\fB\-\-usage\fR|\fB\-v\fR|\fB\-\-version\fR}
7 .PP
8 \fBlb\fR \fICOMMAND\fR [\fIOPTIONS\fR]
99
1010 .SH DESCRIPTION
11 .\" FIXME
1211 live\-build is a set of scripts to build live system images. The idea behind live\-build is a tool suite that uses a configuration directory to completely automate and customize all aspects of building a Live image.
1312 .PP
1413 The \fICOMMAND\fR is a name of a live\-build command (see below).
1514 .PP
1615 More documentation about how to use live\-build is available in the individual manpages for each helper and in the manual at <\fIhttps://live-team.pages.debian.net/live-manual/\fR>.
17 .\" FIXME
1816
1917 .SH OPTIONS
20 .\" FIXME
2118 .SS Shared live\-build options
2219 The following command line options are supported by all live\-build programs.
2320 .IP "\fB-h, \-\-help\fR" 4
3027 The following command line options are supported by most live\-build programs. See the man page of each program for a complete explanation of what each option does.
3128 .IP "\fB\-\-breakpoints\fR" 4
3229 run with breakpoints.
33 .IP "\fB\-\-conffile\fR" 4
34 use custom configuration file.
30 .IP "\fB\-\-color\fR" 4
31 enable color use in messages.
3532 .IP "\fB\-\-debug\fR" 4
3633 show debug information.
3734 .IP "\fB\-\-force\fR" 4
3835 force helper execution, even if stage file exists.
36 .IP "\fB\-\-no-color\fR" 4
37 disable color use in messages.
3938 .IP "\fB\-\-quiet\fR" 4
4039 be quiet.
4140 .IP "\fB\-\-verbose\fR" 4
4241 be verbose.
43 .\" FIXME
4442
4543 .SH LIVE\-BUILD COMMANDS
46 .\" FIXME
47 We divide live\-build into high level ("porcelain") commands and low level ("plumbing") commands.
44 We divide live\-build into high level ("porcelain") commands, secondary major build stage ("porcelain") commands, and low level ("plumbing") commands.
4845 .PP
4946 Here is the complete list of all available live\-build commands. See their man
5047 pages for additional documentation.
51 .\" FIXME
5248
5349 .SH HIGH\-LEVEL COMMANDS (PORCELAIN)
54 .\" FIXME
5550 We separate the porcelain commands into the main commands and some ancillary user utilities.
5651 .SS Main porcelain commands
5752 .IP "\fBlb config\fR(1)" 4
5853 creates configuration for live\-build
54 .IP "\fBlb build\fR(1)" 4
55 executes the build process (by executing all of the secondary level major build stages in sequence)
56 .IP "\fBlb clean\fR(1)" 4
57 cleans up system build directories
58 .SS Ancillary Commands
59 .IP "\fBlb\fR(1)" 4
60 generic live\-build script execution wrapper
61
62 .SH SECONDARY\-LEVEL BUILD COMMANDS (PORCELAIN)
63 The following are the commands that execute each major stage of the build process, in their necessary order of execution. Normally a user might just execute the higher level \fBlb build\fR(1) command rather than use these individually.
5964 .IP "\fBlb bootstrap\fR(1)" 4
6065 executes the first build stage, creating (bootstraping) a basic Debian root filesystem
6166 .IP "\fBlb chroot\fR(1)" 4
6368 .IP "\fBlb installer\fR(1)" 4
6469 executes the third build stage, obtaining installer components (optional)
6570 .IP "\fBlb binary\fR(1)" 4
66 executes the fourth build stage, generating a binary image
71 executes the fourth build stage, generating the binary (live) image
6772 .IP "\fBlb source\fR(1)" 4
68 executes the fifth build stage, generating a source image (optional)
69 .IP "\fBlb clean\fR(1)" 4
70 cleans up system build directories
71 .SS Ancillary Commands
72 .IP "\fBlb\fR(1)" 4
73 generic live\-build script execution wrapper
74 .IP "\fBlb build\fR(1)" 4
75 alias for all build stages
76 .\" FIXME
73 executes the fifth build stage, generating a corresponding source image (optional)
7774
7875 .SH LOW\-LEVEL COMMANDS (PLUMBING) - BUILD STAGE COMPONENTS
79 .\" FIXME
80 The actual work of live\-build is implemented in the low-level commands, called plumbing. They are not supposed to be used by end users, they should stick with porcelains as they ensure that all the different plumbing commands are executed in the right order. However, if you intend to reuse live\-build commands in your own scripts, then the plumbings might be of interest for you.
76 The actual work of live\-build is implemented in the low-level commands, called plumbing. They are not supposed to be used by end users, who should stick with porcelains as they ensure that all the different plumbing commands are executed in the right order. However, if you intend to reuse live\-build commands in your own scripts, then the plumbings might be of interest for you.
8177 .PP
8278 Note that the interface (set of options and the semantics) to these low\-level commands are meant to be a lot more stable than Porcelain level commands. The interface to Porcelain commands on the other hand are subject to change in order to improve the end user experience.
8379 .SS Bootstrap stage specific commands
8682 .IP "\fBlb bootstrap_cache\fR(1)" 4
8783 in save mode, saves to cache a copy of the generated bootstrap directory, and in restore mode, restores from cache a previously generated copy
8884 .IP "\fBlb bootstrap_debootstrap\fR(1)" 4
89 creates (bootstrap) a basic Debian root filesystem using debootstrap(8)
85 creates (bootstraps) a basic Debian root filesystem using debootstrap(8)
9086 .SS Chroot stage specific commands
9187 .PP
9288 Note: The following chroot_ prefixed commands are used in building the live OS filesystem. Another set of similarly prefixed files are listed separately (see further down).
106102 pauses the build process and starts an interactive shell from the live OS root filesystem, providing an oportunity for manual modifications or testing; note that this is (currently) usually executed with several chroot prep modifications applied (see description of these further down)
107103 .IP "\fBlb chroot_linux\-image\fR(1)" 4
108104 compiles a list of kernel images to be installed in the live OS root filesystem
109 .IP "\fBlb chroot_live\-packages\fR(1)" 4
110 installs a set of live system specific packages to the live OS root filesystem
111105 .IP "\fBlb chroot_package\-lists\fR(1)" 4
112106 compiles a list of packages provided in the user\' local config to be installed in the live OS root filesystem
113107 .IP "\fBlb chroot_preseed\fR(1)" 4
114108 installs pre-configured answers to certain install prompts into the live OS root filesystem
115109 .SS Installer stage specific commands
116110 .IP "\fBlb installer_debian\-installer\fR(1)" 4
117 obtains and sets up Debian installer(d-i) components
111 obtains and sets up Debian installer (d-i) components
118112 .IP "\fBlb installer_preseed\fR(1)" 4
119113 installs pre-configured answers to certain install prompts
120114 .SS Binary stage specific commands
121115 .IP "\fBlb binary_checksums\fR(1)" 4
122116 creates checksums (md5, sha1, and/or sha256) for live image content
123117 .IP "\fBlb binary_chroot\fR(1)" 4
124 duplicates the chroot directory, to place a copy of what whould be the completed live OS root filesystem to one side, allowing the original to continue to be used in executing certain parts of the remainder of the build process
118 duplicates the chroot directory, to place a copy of what would be the completed live OS root filesystem to one side, allowing the original to continue to be used in executing certain parts of the remainder of the build process
125119 .IP "\fBlb binary_disk\fR(1)" 4
126120 creates disk information files to be added to live image
127 .IP "\fBlb binary_grub\fR(1)" 4
121 .IP "\fBlb binary_grub_cfg\fR(1)" 4
122 creates the config for grub-pc and grub-efi, and also enables loopback support (which depends upon it) in the live image
123 .IP "\fBlb binary_grub-efi\fR(1)" 4
124 installs grub-efi (grub2 for EFI) into live image to provide image boot capability. It relies upon \fBlb binary_grub_cfg\fR to create the config.
125 .IP "\fBlb binary_grub-legacy\fR(1)" 4
128126 installs grub into live image to provide image boot capability
129 .IP "\fBlb binary_grub2\fR(1)" 4
130 installs grub2 into live image to provide image boot capability
127 .IP "\fBlb binary_grub-pc\fR(1)" 4
128 installs grub-pc (grub2 for BIOS) into live image to provide image boot capability. It relies upon \fBlb binary_grub_cfg\fR to create the config.
131129 .IP "\fBlb binary_hdd\fR(1)" 4
132 compiles the final live image into an hdd image file
130 compiles the final live image into an HDD image file
133131 .IP "\fBlb binary_hooks\fR(1)" 4
134132 executes local hooks against the live image, if any are provided
135133 .IP "\fBlb binary_includes\fR(1)" 4
136134 copies a set of local files from the config directory into the live image, if any are provided
137135 .IP "\fBlb binary_iso\fR(1)" 4
138 compiles the final live image into an iso file
136 compiles the final live image into an ISO file
139137 .IP "\fBlb binary_linux\-image\fR(1)" 4
140138 copies the linux\-image into the live image
141139 .IP "\fBlb binary_loadlin\fR(1)" 4
146144 bundles a copy of memtest into the live image
147145 .IP "\fBlb binary_netboot\fR(1)" 4
148146 compiles the final live image into a netboot tar archive
147 .IP "\fBlb binary_onie\fR(1)" 4
148 installs onie into the live image
149149 .IP "\fBlb binary_package\-lists\fR(1)" 4
150150 processes local lists of packages to obtain and bundle into image (from which they could later be installed if not already)
151151 .IP "\fBlb binary_rootfs\fR(1)" 4
166166 .IP "\fBlb source_disk\fR(1)" 4
167167 creates disk information files to be added to source image
168168 .IP "\fBlb source_hdd\fR(1)" 4
169 compiles the final source image into an hdd image file
169 compiles the final source image into an HDD image file
170170 .IP "\fBlb source_hooks\fR(1)" 4
171171 executes local hooks against the source image, if any are provided
172172 .IP "\fBlb source_iso\fR(1)" 4
173 compiles the final source image into an iso file
173 compiles the final source image into an ISO file
174174 .IP "\fBlb source_live\fR(1)" 4
175175 copies live-build config into source
176176 .IP "\fBlb source_tar\fR(1)" 4
177177 compiles the final source image into a tar archive
178 .\" FIXME
179178
180179 .SH LOW\-LEVEL COMMANDS (PLUMBING) - CHROOT PREP COMPONENTS
181 .\" FIXME
182180 The notes above under the section regarding build-stage specific low-level plumbing commands also apply here.
183181 .PP
184182 The following chroot_ prefixed commands are used throughout the various primary stages of the build process to apply and remove modifications to a chroot root filesystem. Generally these are used to apply modification that setup the chroot for use (execution of programs within it) during the build process, and later to remove those modification, unmounting things that were mounted, and making the chroot suitable for use as the root filesystem of the live OS to be bundled into the live image.
183 .PP
184 Note that the \fBlb chroot_prep\fR(1) command can be used to run these components in bulk.
185 .IP "\fBlb chroot_prep\fR(1)" 4
186 a helper to run the below components in bulk. The first parameter it takes is the execution mode - install or remove - to pass along. The second parameter is the set of helpers to run (they can be space or comma separated; remember to quote if space separated). Following this one or more of the special parameters 'mode-archives-chroot', 'mode-archives-binary', 'mode-archives-source' and 'mode-apt-install-binary' can optionally be used, to select the 'pass' parameter for \fBlb chroot_archives\fR(1) in the case of the first three (required if 'archives' is one of the helpers to be run), and to run \fBlb chroot_apt\fR(1) in 'install-binary' mode in the last case. Any remaining parameters (i.e. options like --force) are passed along to all scripts run. The second parameter can be simply 'all' in which case a default set of all components are used, or 'all-except-archives' which differs in skipping \fBlb chroot_archives\fR(1). Components can be specified without their filename 'chroot_' prefix for brevity. In remove mode the list of components are run in reverse order, so no need to provide them in reverse order yourself.
185187 .IP "\fBlb chroot_apt\fR(1)" 4
186188 manages apt configuration; in apply mode it applies configuration for use during build process, and in remove mode removes that configuration
187189 .IP "\fBlb chroot_archives\fR(1)" 4
208210 manages the /usr/sbin/policy\-rc.d file
209211 .IP "\fBlb chroot_tmpfs\fR(1)" 4
210212 manages configuration of dpkg to use a tmpfs filesystem
211 .IP "\fBlb chroot_upstart\fR(1)" 4
212 manages use of upstart /sbin/initctl program; in apply mode blocking execution through a dpkg diversion, and in remove mode enabling execution again
213 .\" FIXME
214213
215214 .SH CONFIG FILES
216 .\" FIXME
217 Many live\-build commands make use of files in the \fIconfig/\fR directory to control what they do. Besides the common \fIconfig/common\fR, which is used by all live\-build commands, some additional files can be used to configure the behavior of specific live\-build commands. These files are typically named config/stage or config/stage_helper (where "stage" of course, is replaced with the name of the stage that they belong to, and "helper" with the name of the helper).
218 .PP
219 For example, lb bootstrap_debootstrap uses files named config/bootstrap and config/bootstrap_debootstrap to read the options it will use. See the man pages of individual commands for details about the names and formats of the files they use. Generally, these files contain variables with values assigned, one variable per line. Some programs in live\-build use pairs of values or slightly more complicated variable assignments.
215 Many live\-build commands make use of files in the \fIconfig/\fR directory to control what they do. Besides the common \fIconfig/common\fR, which is used by all live\-build commands, some additional files can be used to configure the behavior of specific live\-build commands. These files are typically named config/stage (where "stage" of course, is replaced with the name of the stage that they belong to).
220216 .PP
221217 Note that live\-build will respect environment variables which are present in the context of the shell it is running. If variables can be read from config files, then they override environment variables, and if command line options are used, they override values from config files. If no value for a given variable can be found and thus is unset, live\-build will automatically set it to the default value.
222218 .PP
223 In some rare cases, you may want to have different versions of these files for different architectures or distributions. If files named config/stage.arch or config/stage_helper.arch, and config/stage.dist or config/stage_helper.dist exist, where "arch" is the same as the output of "dpkg \-\-print\-architecture" and "dist" is the same as the codename of the target distribution, then they will be used in preference to other, more general files.
219 In some rare cases, you may want to have different versions of these files for different architectures or distributions. If files named config/stage.arch and config/stage.dist exist, where "arch" is the same as the output of "dpkg \-\-print\-architecture" and "dist" is the same as the codename of the target distribution, then they will be used in preference to other, more general files.
224220 .PP
225221 All config files are shell scripts which are sourced by a live\-build program. That means they have to follow the normal shell syntax. You can also put comments in these files; lines beginning with "#" are ignored.
226 .\" FIXME
227222
228223 .SH FILES
229224 .IP "\fB/etc/live/build.conf\fR" 4
237232 This program is a part of live\-build.
238233
239234 .SH HOMEPAGE
240 More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
235 More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
241236
242237 .SH BUGS
243 Bugs can be reported by submitting a bugreport for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Live Systems mailing list at <\[email protected]\fR>.
238 Bugs can be reported by submitting a bug report for the live\-build package in the Bug Tracking System at <\fIhttp://bugs.debian.org/\fR> or by writing a mail to the Debian Live mailing list at <\[email protected]\fR>.
244239
245240 .SH AUTHOR
246 live\-build was written by Daniel Baumann <\[email protected]\fR>.
241 live\-build was originally written by Daniel Baumann <\[email protected]\fR>. Since 2016 development has been continued by the Debian Live team.
22 .\" This file was generated with po4a. Translate the source file.
33 .\"
44 .\"*******************************************************************
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Live Systems"
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Debian Live"
66
77 .SH NOM
88 \fBlb\fP \- emballage pour les programmes live\-build
1414
1515 .SH DESCRIPTION
1616 \fBlb\fP est une commande de haut\-niveau (porcelaine) de \fIlive\-build\fP(7), la
17 suite d'outils live systems.
17 suite d'outils Debian Live.
1818 .PP
1919
2020 .\" FIXME
3232 Ce programme est une partie de live\-build.
3333
3434 .SH "PAGE D'ACCUEIL"
35 More information about live\-build and the Live Systems project can be found
35 More information about live\-build and the Debian Live project can be found
3636 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3737
3838 .SH BOGUES
3939 Les bogues peuvent être signalés en soumettant un rapport de bogue pour le
4040 paquet live\-build dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par
41 l'écriture d'un courriel à la liste de diffusion Live Systems à
41 l'écriture d'un courriel à la liste de diffusion Debian Live à
4242 <\fIdebian\[email protected]\fP>.
4343
4444 .SH AUTEUR
22 .\" This file was generated with po4a. Translate the source file.
33 .\"
44 .\"*******************************************************************
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Live Systems"
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Debian Live"
66
77 .SH NOM
88 \fBlb_binary\fP \- Complete the binary stage
3131 Ce programme est une partie de live\-build.
3232
3333 .SH "PAGE D'ACCUEIL"
34 More information about live\-build and the Live Systems project can be found
34 More information about live\-build and the Debian Live project can be found
3535 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3636
3737 .SH BOGUES
3838 Les bogues peuvent être signalés en soumettant un rapport de bogue pour le
3939 paquet live\-build dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par
40 l'écriture d'un courriel à la liste de diffusion Live Systems à
40 l'écriture d'un courriel à la liste de diffusion Debian Live à
4141 <\fIdebian\[email protected]\fP>.
4242
4343 .SH AUTEUR
22 .\" This file was generated with po4a. Translate the source file.
33 .\"
44 .\"*******************************************************************
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Live Systems"
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Debian Live"
66
77 .SH NOM
88 \fBlb_bootstrap\fP \- Complete the bootstrap stage
3131 Ce programme est une partie de live\-build.
3232
3333 .SH "PAGE D'ACCUEIL"
34 More information about live\-build and the Live Systems project can be found
34 More information about live\-build and the Debian Live project can be found
3535 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3636
3737 .SH BOGUES
3838 Les bogues peuvent être signalés en soumettant un rapport de bogue pour le
3939 paquet live\-build dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par
40 l'écriture d'un courriel à la liste de diffusion Live Systems à
40 l'écriture d'un courriel à la liste de diffusion Debian Live à
4141 <\fIdebian\[email protected]\fP>.
4242
4343 .SH AUTEUR
22 .\" This file was generated with po4a. Translate the source file.
33 .\"
44 .\"*******************************************************************
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Live Systems"
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Debian Live"
66
77 .SH NOM
88 \fBlb_build\fP \- Complete the bootstrap, chroot, binary, and source stages
3333 Ce programme est une partie de live\-build.
3434
3535 .SH "PAGE D'ACCUEIL"
36 More information about live\-build and the Live Systems project can be found
36 More information about live\-build and the Debian Live project can be found
3737 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3838
3939 .SH BOGUES
4040 Les bogues peuvent être signalés en soumettant un rapport de bogue pour le
4141 paquet live\-build dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par
42 l'écriture d'un courriel à la liste de diffusion Live Systems à
42 l'écriture d'un courriel à la liste de diffusion Debian Live à
4343 <\fIdebian\[email protected]\fP>.
4444
4545 .SH AUTEUR
22 .\" This file was generated with po4a. Translate the source file.
33 .\"
44 .\"*******************************************************************
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Live Systems"
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Debian Live"
66
77 .SH NOM
88 \fBlb_chroot\fP \- Complete the chroot stage
3131 Ce programme est une partie de live\-build.
3232
3333 .SH "PAGE D'ACCUEIL"
34 More information about live\-build and the Live Systems project can be found
34 More information about live\-build and the Debian Live project can be found
3535 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3636
3737 .SH BOGUES
3838 Les bogues peuvent être signalés en soumettant un rapport de bogue pour le
3939 paquet live\-build dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par
40 l'écriture d'un courriel à la liste de diffusion Live Systems à
40 l'écriture d'un courriel à la liste de diffusion Debian Live à
4141 <\fIdebian\[email protected]\fP>.
4242
4343 .SH AUTEUR
22 .\" This file was generated with po4a. Translate the source file.
33 .\"
44 .\"*******************************************************************
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Live Systems"
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Debian Live"
66
77 .SH NOM
88 \fBlb_clean\fP \- Clean build directory
6262 Ce programme est une partie de live\-build.
6363
6464 .SH "PAGE D'ACCUEIL"
65 More information about live\-build and the Live Systems project can be found
65 More information about live\-build and the Debian Live project can be found
6666 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
6767
6868 .SH BOGUES
6969 Les bogues peuvent être signalés en soumettant un rapport de bogue pour le
7070 paquet live\-build dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par
71 l'écriture d'un courriel à la liste de diffusion Live Systems à
71 l'écriture d'un courriel à la liste de diffusion Debian Live à
7272 <\fIdebian\[email protected]\fP>.
7373
7474 .SH AUTEUR
22 .\" This file was generated with po4a. Translate the source file.
33 .\"
44 .\"*******************************************************************
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Live Systems"
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Debian Live"
66
77 .SH NOM
88 \fBlb_config\fP \- Create config directory
233233
234234 .SH DESCRIPTION
235235 \fBlb config\fP est une commande de haut\-niveau (porcelaine) de
236 \fIlive\-build\fP(7), la suite d'outils live systems.
236 \fIlive\-build\fP(7), la suite d'outils Debian Live.
237237 .PP
238238 .\" FIXME
239239 \fBlb config\fP rempli le répertoire de configuration pour live\-build. Par
520520 to the version of live\-build that was used to build the image.
521521 .IP "\fB\-\-iso\-publisher\fP \fINAME\fP" 4
522522 sets the PUBLISHED field in the header of a resulting CD/DVD image. By
523 default, this is set to 'Live Systems project; http:/live\-systems.org/;
523 default, this is set to 'Debian Live project; http:/live\-systems.org/;
524524 debian\[email protected]'. Remember to change this to the appropriate
525525 values at latest when you distributing custom and unofficial images.
526526 .IP "\fB\-\-iso\-volume\fP \fINAME\fP" 4
779779 Ce programme est une partie de live\-build.
780780
781781 .SH "PAGE D'ACCUEIL"
782 More information about live\-build and the Live Systems project can be found
782 More information about live\-build and the Debian Live project can be found
783783 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
784784
785785 .SH BOGUES
786786 Les bogues peuvent être signalés en soumettant un rapport de bogue pour le
787787 paquet live\-build dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par
788 l'écriture d'un courriel à la liste de diffusion Live Systems à
788 l'écriture d'un courriel à la liste de diffusion Debian Live à
789789 <\fIdebian\[email protected]\fP>.
790790
791791 .SH AUTEUR
22 .\" This file was generated with po4a. Translate the source file.
33 .\"
44 .\"*******************************************************************
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Live Systems"
5 .TH LIVE\-BUILD 1 2017\-08\-29 1:20170807kali1 "Projet Debian Live"
66
77 .SH NOM
88 \fBlb_source\fP \- Complete the source stage
3131 Ce programme est une partie de live\-build.
3232
3333 .SH "PAGE D'ACCUEIL"
34 More information about live\-build and the Live Systems project can be found
34 More information about live\-build and the Debian Live project can be found
3535 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3636
3737 .SH BOGUES
3838 Les bogues peuvent être signalés en soumettant un rapport de bogue pour le
3939 paquet live\-build dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par
40 l'écriture d'un courriel à la liste de diffusion Live Systems à
40 l'écriture d'un courriel à la liste de diffusion Debian Live à
4141 <\fIdebian\[email protected]\fP>.
4242
4343 .SH AUTEUR
22 .\" This file was generated with po4a. Translate the source file.
33 .\"
44 .\"*******************************************************************
5 .TH LIVE\-BUILD 7 2017\-08\-29 1:20170807kali1 "Projet Live Systems"
5 .TH LIVE\-BUILD 7 2017\-08\-29 1:20170807kali1 "Projet Debian Live"
66
77 .SH NOM
8 \fBlive\-build\fP \- la suite d'outils live systems
8 \fBlive\-build\fP \- la suite d'outils Debian Live
99
1010 .SH SYNOPSIS
1111 .\" FIXME
332332 Ce programme est une partie de live\-build.
333333
334334 .SH "PAGE D'ACCUEIL"
335 More information about live\-build and the Live Systems project can be found
335 More information about live\-build and the Debian Live project can be found
336336 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
337337
338338 .SH BOGUES
339339 Les bogues peuvent être signalés en soumettant un rapport de bogue pour le
340340 paquet live\-build dans le BTS à <\fIhttp://bugs.debian.org/\fP> ou par
341 l'écriture d'un courriel à la liste de diffusion Live Systems à
341 l'écriture d'un courriel à la liste de diffusion Debian Live à
342342 <\fIdebian\[email protected]\fP>.
343343
344344 .SH AUTEUR
3030 このプログラムは live\-build の一部です。
3131
3232 .SH ホームページ
33 More information about live\-build and the Live Systems project can be found
33 More information about live\-build and the Debian Live project can be found
3434 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3535
3636 .SH バグ
2828 このプログラムは live\-build の一部です。
2929
3030 .SH ホームページ
31 More information about live\-build and the Live Systems project can be found
31 More information about live\-build and the Debian Live project can be found
3232 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3333
3434 .SH バグ
2828 このプログラムは live\-build の一部です。
2929
3030 .SH ホームページ
31 More information about live\-build and the Live Systems project can be found
31 More information about live\-build and the Debian Live project can be found
3232 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3333
3434 .SH バグ
3131 このプログラムは live\-build の一部です。
3232
3333 .SH ホームページ
34 More information about live\-build and the Live Systems project can be found
34 More information about live\-build and the Debian Live project can be found
3535 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3636
3737 .SH バグ
2828 このプログラムは live\-build の一部です。
2929
3030 .SH ホームページ
31 More information about live\-build and the Live Systems project can be found
31 More information about live\-build and the Debian Live project can be found
3232 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3333
3434 .SH バグ
5252 このプログラムは live\-build の一部です。
5353
5454 .SH ホームページ
55 More information about live\-build and the Live Systems project can be found
55 More information about live\-build and the Debian Live project can be found
5656 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
5757
5858 .SH バグ
433433 http://debian\-live.alioth.debian.org/live\-build", where VERSION is expanded
434434 to the version of live\-build that was used to build the image.
435435 .IP "\fB\-\-iso\-publisher\fP \fI名前\fP" 4
436 出来上がる CD/DVD イメージのヘッダの PUBLISHED フィールドをセットします。デフォルトは「Live Systems project;
436 出来上がる CD/DVD イメージのヘッダの PUBLISHED フィールドをセットします。デフォルトは「Debian Live project;
437437 http:/live\-systems.org/;
438438 debian\[email protected]」となっています。独自の非公式イメージを配布する際はこれを忘れずに最新の適切な値に変更してください。
439439 .IP "\fB\-\-iso\-volume\fP \fI名前\fP" 4
625625 このプログラムは live\-build の一部です。
626626
627627 .SH ホームページ
628 More information about live\-build and the Live Systems project can be found
628 More information about live\-build and the Debian Live project can be found
629629 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
630630
631631 .SH バグ
2828 このプログラムは live\-build の一部です。
2929
3030 .SH ホームページ
31 More information about live\-build and the Live Systems project can be found
31 More information about live\-build and the Debian Live project can be found
3232 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
3333
3434 .SH バグ
304304 このプログラムは live\-build の一部です。
305305
306306 .SH ホームページ
307 More information about live\-build and the Live Systems project can be found
307 More information about live\-build and the Debian Live project can be found
308308 on the homepage at <\fIhttps://debian\-live.alioth.debian.org/\fP>.
309309
310310 .SH バグ
66 [type: man] en/lb_chroot.1 $lang:$lang/lb_chroot.$lang.1
77 [type: man] en/lb_clean.1 $lang:$lang/lb_clean.$lang.1
88 [type: man] en/lb_config.1 $lang:$lang/lb_config.$lang.1
9 [type: man] en/lb_installer.1 $lang:$lang/lb_installer.$lang.1
910 [type: man] en/lb_source.1 $lang:$lang/lb_source.$lang.1
1011 [type: man] en/live-build.7 $lang:$lang/live-build.$lang.7
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1213 # Including common functions
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
15 # Automatically populating config tree
16 if [ -x auto/config ] && [ ! -e .build/config ]
17 then
18 Echo_message "Automatically populating config tree."
19 lb config
20 fi
21
2216 # Setting static variables
23 DESCRIPTION="$(Echo 'build binary images')"
24 HELP=""
17 DESCRIPTION="Build binary images"
2518 USAGE="${PROGRAM} [--force]"
2619
27 Arguments "${@}"
20 # Automatically populating config tree
21 Auto_build_config
2822
29 # Reading configuration files
30 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
31 Set_defaults
23 # Processing arguments and configuration files
24 Init_config_data "${@}"
3225
33 # Setup cleanup function
34 Setup_cleanup
26 # Setting up cleanup function
27 Setup_clean_exit
3528
3629 # Preparing root filesystem
37 lb binary_chroot ${@}
30 lb binary_chroot "${@}"
3831
39 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]
40 then
32 # Chroot preparation component lists
33 # We deliberately exclude 'debianchroot'
34 CHROOT_PREP_MOUNTS="devpts proc selinuxfs sysfs"
35 CHROOT_PREP_OTHER="dpkg tmpfs sysv-rc hosts resolv hostname apt"
36
37 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then
4138 # Configuring chroot
42 lb chroot_devpts install ${@}
43 lb chroot_proc install ${@}
44 lb chroot_selinuxfs install ${@}
45 lb chroot_sysfs install ${@}
46 lb chroot_hosts install ${@}
47 lb chroot_resolv install ${@}
48 lb chroot_hostname install ${@}
49 lb chroot_sysv-rc install ${@}
50 lb chroot_apt install-binary ${@}
51 lb chroot_archives chroot install ${@}
39 # FIXME: cannot run in 'all' mode while excluding 'debianchroot', do we really need to exclude it?
40 #lb chroot_prep install all mode-apt-install-binary mode-archives-chroot "${@}"
41 lb chroot_prep install "${CHROOT_PREP_MOUNTS}" "${@}"
42 lb chroot_prep install "${CHROOT_PREP_OTHER}" mode-apt-install-binary mode-archives-chroot "${@}"
43 lb chroot_archives chroot install "${@}"
5244 fi
5345
5446 # Building root filesystem
55 lb binary_rootfs ${@}
56 lb binary_manifest ${@}
47 lb binary_rootfs "${@}"
48 lb binary_manifest "${@}"
5749
5850 # Prepare images
59 lb binary_package-lists ${@}
60 lb binary_linux-image ${@}
61 lb binary_memtest ${@}
62 lb binary_grub-legacy ${@}
63 lb binary_grub-pc ${@}
64 lb binary_loopback_cfg ${@}
65 lb binary_syslinux ${@}
66 lb binary_disk ${@}
67 lb binary_loadlin ${@}
68 lb binary_win32-loader ${@}
69 lb binary_includes ${@}
70 lb binary_grub-efi ${@}
71 lb binary_hooks ${@}
72 lb binary_checksums ${@}
51 lb binary_package-lists "${@}"
52 lb binary_linux-image "${@}"
53 lb binary_memtest "${@}"
54 lb binary_grub-legacy "${@}"
55 lb binary_grub-pc "${@}"
56 lb binary_grub_cfg "${@}"
57 lb binary_syslinux "${@}"
58 lb binary_disk "${@}"
59 lb binary_loadlin "${@}"
60 lb binary_win32-loader "${@}"
61 lb binary_includes "${@}"
62 lb binary_grub-efi "${@}"
63 lb binary_hooks "${@}"
64 lb binary_checksums "${@}"
7365
74 if [ "${LB_BUILD_WITH_CHROOT}" != "true" ]
75 then
76 lb chroot_devpts install ${@}
77 lb chroot_proc install ${@}
78 lb chroot_selinuxfs install ${@}
79 lb chroot_sysfs install ${@}
66 if [ "${LB_BUILD_WITH_CHROOT}" != "true" ]; then
67 lb chroot_prep install "${CHROOT_PREP_MOUNTS}" "${@}"
8068 fi
8169
70 # Apply SOURCE_DATE_EPOCH to all modified and created files
71 find binary -newermt "$(date -d@${SOURCE_DATE_EPOCH} '+%Y-%m-%d %H:%M:%S')" -printf "%y %p\n" -exec touch '{}' -d@${SOURCE_DATE_EPOCH} --no-dereference ';' > binary.modified_timestamps
72
8273 # Building images
83 lb binary_iso ${@}
84 lb binary_onie ${@}
85 lb binary_netboot ${@}
86 lb binary_tar ${@}
87 lb binary_hdd ${@}
74 lb binary_iso "${@}"
75 lb binary_onie "${@}"
76 lb binary_netboot "${@}"
77 lb binary_tar "${@}"
78 lb binary_hdd "${@}"
8879
89 lb binary_zsync ${@}
80 lb binary_zsync "${@}"
9081
91 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]
92 then
82 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then
9383 # Deconfiguring chroot
94 rm -f .build/chroot_archives
95 lb chroot_apt remove ${@}
96 lb chroot_hostname remove ${@}
97 lb chroot_resolv remove ${@}
98 lb chroot_hosts remove ${@}
99 lb chroot_sysv-rc remove ${@}
100 lb chroot_dpkg remove ${@}
101 lb chroot_debianchroot remove ${@}
84 Remove_stagefile chroot_archives
85
86 lb chroot_prep remove "${CHROOT_PREP_OTHER}" "${@}"
10287 fi
10388
104 lb chroot_sysfs remove ${@}
105 lb chroot_selinuxfs remove ${@}
106 lb chroot_proc remove ${@}
107 lb chroot_devpts remove ${@}
89 lb chroot_prep remove "${CHROOT_PREP_MOUNTS}" "${@}"
90
91 Echo_message "Binary stage completed"
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'create binary checksums')"
17 HELP=""
17 DESCRIPTION="Create binary checksums"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_CHECKSUMS}" = "none" ]
2724 then
2926 fi
3027
3128 # Requiring stage file
32 Require_stagefile .build/config .build/bootstrap
29 Require_stagefiles config bootstrap
3330
3431 # Checking stage file
35 Check_stagefile .build/binary_checksums
32 Check_stagefile
3633
37 # Checking lock file
38 Check_lockfile .lock
39
40 # Creating lock file
41 Create_lockfile .lock
34 # Acquire lock file
35 Acquire_lockfile
4236
4337 for CHECKSUM in ${LB_CHECKSUMS}
4438 do
45 case "${LB_MODE}" in
46 progress-linux)
47 CHECKSUMS="$(echo ${CHECKSUM} | tr [a-z] [A-Z])SUMS"
48 ;;
49
50 *)
51 CHECKSUMS="${CHECKSUM}sum.txt"
52 ;;
53 esac
39 CHECKSUMS="${CHECKSUM}sum.txt"
5440
5541 Echo_message "Begin creating binary ${CHECKSUMS}..."
5642
8874
8975 # File list
9076 cd binary
91 find . | sed -e 's|^.||g' | grep "^/" | sort > ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.contents
77 find . | sed -e 's|^.||g' | grep "^/" | sort > ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.contents
9278 cd "${OLDPWD}"
9379
9480 # Creating stage file
95 Create_stagefile .build/binary_checksums
81 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'copy chroot into chroot')"
17 HELP=""
17 DESCRIPTION="Copy chroot into chroot"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 Echo_message "Begin copying chroot..."
2724
2825 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap
26 Require_stagefiles config bootstrap
3027
3128 # Checking stage file
32 Check_stagefile .build/binary_chroot
29 Check_stagefile
3330
34 # Checking lock file
35 Check_lockfile .lock
36
37 # Creating lock file
38 Create_lockfile .lock
31 # Acquire lock file
32 Acquire_lockfile
3933
4034 # Normally, virtual filesystems are not mounted here, but people tend to be lazy
4135 if [ -f chroot/proc/version ]
9791 fi
9892
9993 # Creating stage file
100 Create_stagefile .build/binary_chroot
94 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'install disk information into binary')"
17 HELP=""
17 DESCRIPTION="Install disk information into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 case "${LIVE_IMAGE_TYPE}" in
27 iso*|hdd*)
28 ;;
29 *)
30 exit 0
31 ;;
32 esac
23 if ! In_list "${LB_IMAGE_TYPE}" iso iso-hybrid hdd; then
24 exit 0
25 fi
3326
3427 Echo_message "Begin installing disk information..."
3528
3629 # Requiring stage file
37 Require_stagefile .build/config .build/bootstrap
30 Require_stagefiles config bootstrap
3831
3932 # Checking stage file
40 Check_stagefile .build/binary_disk
33 Check_stagefile
4134
42 # Checking lock file
43 Check_lockfile .lock
44
45 # Creating lock file
46 Create_lockfile .lock
35 # Acquire lock file
36 Acquire_lockfile
4737
4838 mkdir -p binary/.disk
4939
50 ARCHITECTURE="$(echo ${LB_ARCHITECTURES} | sed -e 's| |/|g')"
40 ARCHITECTURE="$(echo ${LB_ARCHITECTURE} | sed -e 's| |/|g')"
5141 DISTRIBUTION="$(echo ${LB_DISTRIBUTION_BINARY} | cut -b 1 | tr '[a-z]' '[A-Z]')"
5242 DISTRIBUTION="${DISTRIBUTION}$(echo ${LB_DISTRIBUTION_BINARY} | cut -b 2-)"
5343
6353 TITLE="Debian GNU/Linux"
6454 STRING="Official Snapshot ${ARCHITECTURE}"
6555 TRACE="project/trace/ftp-master.debian.org"
66 ;;
67
68 progress-linux)
69 TITLE="Progress Linux"
70 STRING="${VERSION} (${DISTRIBUTION}) - ${ARCHITECTURE}"
71 TRACE="project/trace/archive-master.progress-linux.org"
7256 ;;
7357
7458 *)
9882
9983 case "${LB_DEBIAN_INSTALLER}" in
10084 cdrom)
101 echo "main" > binary/.disk/base_components
102
103 touch binary/.disk/base_installable
104
105 echo "full_cd" > binary/.disk/cd_type
106
107 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/CD Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
108
109 for LOCATION in "${LIVE_BUILD}/data/debian-cd" /usr/share/live/build/data/debian-cd
110 do
111 if [ -e "${LOCATION}" ]
112 then
113 cp "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES}_udeb_include" binary/.disk/udeb_include
114
115 continue
116 fi
117 done
85 DISK_LABEL="LIVE/CD"
86 DISK_TYPE="full_cd"
11887 ;;
119
120 true|netinst|live)
121 echo "main" > binary/.disk/base_components
122
123 touch binary/.disk/base_installable
124
125 if [ "${LB_DEBIAN_INSTALLER}" = "live" ]
126 then
127 echo "live" > binary/.disk/cd_type
128 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/INSTALL Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
129 else
130 echo "not_complete" > binary/.disk/cd_type
131 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETINST Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
132 fi
133
134 for LOCATION in "${LIVE_BUILD}/data/debian-cd" /usr/share/live/build/data/debian-cd
135 do
136 if [ -e "${LOCATION}" ]
137 then
138 cp "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES}_netinst_udeb_include" binary/.disk/udeb_include
139
140 continue
141 fi
142 done
143
144 if [ "${LB_DEBIAN_INSTALLER}" = "live" ]
145 then
146 echo "live-installer" >> binary/.disk/udeb_include
147 fi
88 netboot)
89 DISK_LABEL="LIVE/NETBOOT"
90 #FIXME: type?
91 DISK_TYPE=""
14892 ;;
149
93 netinst)
94 DISK_LABEL="LIVE/NETINST"
95 DISK_TYPE="not_complete"
96 ;;
97 live)
98 DISK_LABEL="LIVE/INSTALL"
99 DISK_TYPE="live"
100 ;;
150101 businesscard)
151 echo "main" > binary/.disk/base_components
152
153 echo "not_complete" > binary/.disk/cd_type
154
155 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/BC Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
156
157 for LOCATION in "${LIVE_BUILD}/data/debian-cd" /usr/share/live/build/data/debian-cd
158 do
159 if [ -e "${LOCATION}" ]
160 then
161 cp "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES}_businesscard_udeb_include" binary/.disk/udeb_include
162
163 continue
164 fi
165 done
102 DISK_LABEL="LIVE/BC"
103 DISK_TYPE="not_complete"
166104 ;;
167
168 false)
169 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE Binary $(date +%Y%m%d-%H:%M)" > binary/.disk/info
105 none)
106 DISK_LABEL="LIVE"
107 DISK_TYPE=""
170108 ;;
171109 esac
172110
111 _DATE="$(date $DATE_UTC_OPTION -d@${SOURCE_DATE_EPOCH} +%Y%m%d-%H:%M)"
112
113 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} ${DISK_LABEL} Binary ${_DATE}" > binary/.disk/info
114
115 if [ -n "${DISK_TYPE}" ]; then
116 echo "${DISK_TYPE}" > binary/.disk/cd_type
117 fi
118
119 #FIXME review the netboot case
120 case "${LB_DEBIAN_INSTALLER}" in
121 none|netboot)
122 ;;
123 businesscard)
124 echo "main" > binary/.disk/base_components
125 ;;
126 *)
127 echo "main" > binary/.disk/base_components
128 touch binary/.disk/base_installable
129 ;;
130 esac
131
132 #FIXME review the netboot case
133 for LOCATION in "${LIVE_BUILD}/data/debian-cd" /usr/share/live/build/data/debian-cd
134 do
135 if [ -e "${LOCATION}" ]
136 then
137 case "${LB_DEBIAN_INSTALLER}" in
138 cdrom)
139 cp -a "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_udeb_include" binary/.disk/udeb_include
140 ;;
141 netinst|live)
142 cp -a "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_netinst_udeb_include" binary/.disk/udeb_include
143 ;;
144 businesscard)
145 cp -a "${LOCATION}/${LB_PARENT_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE}_businesscard_udeb_include" binary/.disk/udeb_include
146 ;;
147 none|netboot)
148 ;;
149 esac
150 fi
151 done
152
153 if [ "${LB_DEBIAN_INSTALLER}" = "live" ]
154 then
155 echo "live-installer" >> binary/.disk/udeb_include
156 fi
157
173158 # Creating stage file
174 Create_stagefile .build/binary_disk
159 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2016 Adrian Gibanel Lopez <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'prepares and installs Grub based EFI support into binary')"
17 HELP=""
17 DESCRIPTION="Prepares and installs Grub based EFI support into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 Check_Any_Bootloader_Role "grub-efi"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 if [ "${LB_BOOTLOADER_EFI}" != "grub-efi" ]; then
24 exit 0
25 fi
26
27 if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
28 exit 0
29 fi
2730
2831 Echo_message "Begin preparing Grub based EFI support..."
2932
33 # NOTE: We rely on `binary_grub_cfg` to generate grub.cfg and other configuration files!
34
3035 # Requiring stage file
31 Require_stagefile .build/config .build/bootstrap
36 Require_stagefiles config bootstrap
3237
3338 # Checking stage file
34 Check_stagefile .build/binary_grub-efi
35
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
39 Check_stagefile
40
41 # Acquire lock file
42 Acquire_lockfile
4143
4244 # Check architecture
43 Check_architectures amd64 i386 arm64
45 Check_architectures amd64 i386 arm64 armhf
4446 Check_crossarchitectures
4547
4648 # Checking depends
47 case "${LB_ARCHITECTURES}" in
49 case "${LB_ARCHITECTURE}" in
4850 amd64|i386)
4951 Check_package chroot /usr/lib/grub/x86_64-efi/configfile.mod grub-efi-amd64-bin
5052 Check_package chroot /usr/lib/grub/i386-efi/configfile.mod grub-efi-ia32-bin
51 ;;
53 ;;
5254 arm64)
5355 Check_package chroot /usr/lib/grub/arm64-efi/configfile.mod grub-efi-arm64-bin
54 ;;
56 ;;
57 armhf)
58 Check_package chroot /usr/lib/grub/arm-efi/configfile.mod grub-efi-arm-bin
59 ;;
5560 esac
5661 Check_package chroot /usr/bin/grub-mkimage grub-common
5762 Check_package chroot /usr/bin/mcopy mtools
6065 # Check UEFI Secure Boot setting and depends
6166 # By default (auto) do a best-effort build: if the signed binaries are available use
6267 # them, but don't fail if they are not, just print a warning.
63 case "${LB_ARCHITECTURES}" in
64 amd64|i386)
68 case "${LB_ARCHITECTURE}" in
69 amd64)
6570 _SB_EFI_PLATFORM="x86_64"
6671 _SB_EFI_NAME="x64"
6772 _SB_EFI_DEB="amd64"
68 ;;
73 ;;
74 i386)
75 _SB_EFI_PLATFORM="i386"
76 _SB_EFI_NAME="ia32"
77 _SB_EFI_DEB="ia32"
78 ;;
6979 arm64)
7080 _SB_EFI_PLATFORM="arm64"
7181 _SB_EFI_NAME="aa64"
7282 _SB_EFI_DEB="arm64"
73 ;;
83 ;;
84 armhf)
85 _SB_EFI_PLATFORM="arm"
86 _SB_EFI_NAME="arm"
87 _SB_EFI_DEB="arm"
88 ;;
7489 esac
7590
7691 _PRE_SB_PACKAGES="${_LB_PACKAGES}"
7994 auto)
8095 # Use Check_installed, as Check_package will error out immediately
8196 set +e
82 Install_package
97 Install_packages
8398 set -e
8499 Check_installed chroot /usr/lib/grub/${_SB_EFI_PLATFORM}-efi-signed/gcd${_SB_EFI_NAME}.efi.signed \
85100 grub-efi-${_SB_EFI_DEB}-signed
93108 else
94109 Echo_message "UEFI Secure Boot support enabled."
95110 fi
96 ;;
111 ;;
97112 enable)
98113 Check_package chroot /usr/lib/grub/${_SB_EFI_PLATFORM}-efi-signed/gcd${_SB_EFI_NAME}.efi.signed \
99114 grub-efi-${_SB_EFI_DEB}-signed
100115 Check_package chroot /usr/lib/shim/shim${_SB_EFI_NAME}.efi.signed \
101116 shim-signed
102 Install_package
117 Install_packages
103118 Echo_message "UEFI Secure Boot support enabled."
104 ;;
119 ;;
105120 disable)
106121 Echo_message "UEFI Secure Boot support disabled."
107 ;;
122 ;;
108123 esac
109124 _LB_PACKAGES="${_PRE_SB_PACKAGES}"
110125
111 # Setting destination directory
112 case "${LIVE_IMAGE_TYPE}" in
113 hdd*|netboot)
114 Echo_warning "Bootloader in this image type not yet supported by live-build."
115 Echo_warning "This would produce a not bootable image, aborting (FIXME)."
116 exit 1
117 ;;
118 esac
119
120126 # Restoring cache
121 Restore_cache cache/packages.binary
127 Restore_package_cache binary
122128
123129 # Installing depends
124 Install_package
130 Install_packages
125131
126132 # Cleanup files that we generate
127 rm -rf binary/boot/efi.img binary/boot/grub/i386-efi/ binary/boot/grub/x86_64-efi binary/boot/grub/arm64-efi
133 rm -rf binary/boot/efi.img binary/boot/grub/i386-efi/ binary/boot/grub/x86_64-efi binary/boot/grub/arm64-efi binary/boot/grub/arm-efi
128134
129135 # This is workaround till both efi-image and grub-cpmodules are put into a binary package
130136 case "${LB_BUILD_WITH_CHROOT}" in
131 true)
137 true)
132138 if [ ! -e "${LIVE_BUILD}" ] ; then
133139 LIVE_BUILD_PATH="/usr/lib/live/build"
134140 else
139145 cp "${LIVE_BUILD_PATH}/grub-cpmodules" "chroot/${LIVE_BUILD_PATH}"
140146
141147 _CHROOT_DIR=""
142 ;;
148 ;;
149
143150 false)
144151 _CHROOT_DIR="chroot"
145 ;;
152 ;;
146153 esac
147154 #####
148155 cat >binary.sh <<END
157164 local outdir="grub-efi-temp-\${platform}"
158165 "\${LIVE_BUILD_PATH}/efi-image" "${_CHROOT_DIR}/\$outdir" "\$platform" "\$efi_name" "\$netboot_prefix"
159166 mkdir -p ${_CHROOT_DIR}/grub-efi-temp/EFI/boot
160 mcopy -n -i ${_CHROOT_DIR}/\$outdir/efi.img '::efi/boot/boot*.efi' ${_CHROOT_DIR}/grub-efi-temp/EFI/boot
161 cp -r "${_CHROOT_DIR}"/\$outdir/* "${_CHROOT_DIR}/grub-efi-temp/"
167 mcopy -m -n -i ${_CHROOT_DIR}/\$outdir/efi.img '::efi/boot/boot*.efi' ${_CHROOT_DIR}/grub-efi-temp/EFI/boot
168 cp -a "${_CHROOT_DIR}"/\$outdir/* "${_CHROOT_DIR}/grub-efi-temp/"
162169
163170 # Secure Boot support:
164171 # - create the EFI directory in the ESP with uppercase letters to make
173180 # and grub-efi-amd64-signed, currently in Ubuntu:
174181 # https://packages.ubuntu.com/xenial/amd64/grub-efi-amd64-signed/filelist
175182 # https://packages.ubuntu.com/bionic/arm64/grub-efi-arm64-signed/filelist
176 # E.g., gcdx64.efi.signed is the boot loader for removable device, like CD or
177 # USB flash drive, while grubx64.efi.signed is for hard drive.
178 # Therefore here gcdx64.efi.signed is used for amd64 and gcdaa64.efi.signed is
179 # for arm64.
183 # E.g., gcdx64.efi.signed is the boot loader for removable device, like CD or
184 # USB flash drive, while grubx64.efi.signed is for hard drive.
185 # Therefore here gcdx64.efi.signed is used for amd64 and gcdaa64.efi.signed is
186 # for arm64.
180187 if [ -r ${_CHROOT_DIR}/usr/lib/grub/\$platform-signed/gcd\$efi_name.efi.signed -a \
181188 -r ${_CHROOT_DIR}/usr/lib/shim/shim\$efi_name.efi.signed -a \
182189 "${LB_UEFI_SECURE_BOOT}" != "disable" ]; then
183 cp ${_CHROOT_DIR}/usr/lib/grub/\$platform-signed/gcd\$efi_name.efi.signed \
190 cp -a ${_CHROOT_DIR}/usr/lib/grub/\$platform-signed/gcd\$efi_name.efi.signed \
184191 ${_CHROOT_DIR}/grub-efi-temp/EFI/boot/grub\$efi_name.efi
185 cp ${_CHROOT_DIR}/usr/lib/shim/shim\$efi_name.efi.signed \
192 cp -a ${_CHROOT_DIR}/usr/lib/shim/shim\$efi_name.efi.signed \
186193 ${_CHROOT_DIR}/grub-efi-temp/EFI/boot/boot\$efi_name.efi
187194 fi
188195 }
196203
197204 PATH="${PATH}:\${LIVE_BUILD_PATH}" # Make sure grub-cpmodules is used as if it was installed in the system
198205
199 case "${LB_ARCHITECTURES}" in
206 case "${LB_ARCHITECTURE}" in
200207 amd64|i386)
201208 gen_efi_boot_img "x86_64-efi" "x64" "debian-live/amd64"
202209 gen_efi_boot_img "i386-efi" "ia32" "debian-live/i386"
203210 PATH="\${PRE_EFI_IMAGE_PATH}"
204 ;;
211 ;;
205212 arm64)
206213 gen_efi_boot_img "arm64-efi" "aa64" "debian-live/arm64"
207214 PATH="\${PRE_EFI_IMAGE_PATH}"
208 ;;
215 ;;
216 armhf)
217 gen_efi_boot_img "arm-efi" "arm" "debian-live/arm"
218 PATH="\${PRE_EFI_IMAGE_PATH}"
219 ;;
209220 esac
210221
211222
214225 # look in that partition for a grub.cfg file, and even if it finds it
215226 # it will not be able to find the vmlinuz and initrd.
216227 # Drop a minimal grub.cfg in the EFI partition that sets the root and prefix
217 # to whatever partition holds the /live/vmlinuz image, and load the grub
228 # to whatever partition holds the /.disk/info file, and load the grub
218229 # config from that same partition.
219 # This is what the Ubuntu livecd already does.
220230 mkdir -p ${_CHROOT_DIR}/grub-efi-temp-cfg
221231 cat >${_CHROOT_DIR}/grub-efi-temp-cfg/grub.cfg <<EOF
222 search --set=root --file /live/vmlinuz
232 search --set=root --file /.disk/info
223233 set prefix=(\\\$root)/boot/grub
224234 configfile (\\\$root)/boot/grub/grub.cfg
225235 EOF
236 # Set the timestamp within the efi.img file
237 touch ${_CHROOT_DIR}/grub-efi-temp-cfg/grub.cfg -d@${SOURCE_DATE_EPOCH}
226238
227239 # The code below is adapted from tools/boot/jessie/boot-x86
228240 # in debian-cd
245257 blocks=\$(((\$size / 1024 + 55) / 32 * 32 ))
246258
247259 rm -f ${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img
248 mkfs.msdos -C "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" \$blocks >/dev/null
260 mkfs.msdos -C "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" \$blocks -i ${SOURCE_DATE_EPOCH} >/dev/null
249261 mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::EFI
250262 mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::EFI/boot
251 mcopy -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp/EFI/boot/*.efi \
263 mcopy -m -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp/EFI/boot/*.efi \
252264 "::EFI/boot"
253265
254266 mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::boot
255267 mmd -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ::boot/grub
256 mcopy -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp-cfg/grub.cfg \
268 mcopy -m -o -i "${_CHROOT_DIR}/grub-efi-temp/boot/grub/efi.img" ${_CHROOT_DIR}/grub-efi-temp-cfg/grub.cfg \
257269 "::boot/grub"
258270 END
259271
260272 case "${LB_BUILD_WITH_CHROOT}" in
261 true)
273 true)
262274 mv binary.sh chroot/
263275 Chroot chroot "sh binary.sh"
264276 rm -f chroot/binary.sh
265277
266278 # Saving cache
267 Save_cache cache/packages.binary
279 Save_package_cache binary
268280
269281 # Removing depends
270 Remove_package
282 Remove_packages
271283 ;;
272284
273285 false)
280292 rm -f chroot/grub-efi-temp/bootnetia32.efi
281293 rm -f chroot/grub-efi-temp/bootnetx64.efi
282294 rm -f chroot/grub-efi-temp/bootnetaa64.efi
295 rm -f chroot/grub-efi-temp/bootnetarm.efi
283296
284297 mkdir -p binary
285 cp -r chroot/grub-efi-temp/* binary/
298 cp -a chroot/grub-efi-temp/* binary/
286299 rm -rf chroot/grub-efi-temp-x86_64-efi
287300 rm -rf chroot/grub-efi-temp-i386-efi
288301 rm -rf chroot/grub-efi-temp-arm64-efi
302 rm -rf chroot/grub-efi-temp-arm-efi
289303 rm -rf chroot/grub-efi-temp-cfg
290304 rm -rf chroot/grub-efi-temp
291305
292 # We rely on: binary_loopback_cfg to generate grub.cfg and other configuration files
293
294306 # Creating stage file
295 Create_stagefile .build/binary_grub-efi
307 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'installs grub-legacy into binary')"
17 HELP=""
17 DESCRIPTION="Installs grub-legacy into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 Check_First_Bootloader_Role "grub-legacy"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 if [ "${LB_BOOTLOADER_BIOS}" != "grub-legacy" ]; then
24 exit 0
25 fi
26
27 if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
28 exit 0
29 fi
2730
2831 Echo_message "Begin installing grub-legacy..."
2932
3033 # Requiring stage file
31 Require_stagefile .build/config .build/bootstrap
34 Require_stagefiles config bootstrap
3235
3336 # Checking stage file
34 Check_stagefile .build/binary_grub-legacy
35
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
37 Check_stagefile
38
39 # Acquire lock file
40 Acquire_lockfile
4141
4242 # Check architecture
4343 Check_architectures amd64 i386
4747 Check_package chroot /usr/sbin/grub grub-legacy
4848
4949 # Restoring cache
50 Restore_cache cache/packages.binary
50 Restore_package_cache binary
5151
5252 # Installing depends
53 Install_package
53 Install_packages
5454
5555 # Local functions
5656 Grub_live_entry ()
5757 {
58 LABEL="${1}"
59 KERNEL="${2}"
60 INITRD="${3}"
61 APPEND="${4}"
58 local LABEL="${1}"
59 local KERNEL="${2}"
60 local INITRD="${3}"
61 local APPEND="${4}"
6262
6363 LINUX_LIVE="${LINUX_LIVE}\ntitle\t\tDebian GNU/Linux - ${LABEL}"
6464 LINUX_LIVE="${LINUX_LIVE}\nkernel\t\t/${KERNEL} ${INITFS:+boot=${INITFS} }config LB_BOOTAPPEND_LIVE ${APPEND}"
6767
6868 Grub_install_entry ()
6969 {
70 LABEL="${1}"
71 KERNEL="${2}"
72 INITRD="${3}"
73 APPEND="${4}"
74
75 QAPPEND="quiet"
76
77 for TYPE in Install Expert Rescue Auto
78 do
79 case "${TYPE}" in
80 Install)
81 TAPPEND="${APPEND} ${QAPPEND}"
82 ;;
83
84 Expert)
85 TAPPEND="priority=low ${APPEND}"
86 ;;
87
88 Rescue)
89 TAPPEND="rescue/enable=true ${APPEND} ${QAPPEND}"
90 ;;
91
92 Auto)
93 TAPPEND="auto=true priority=critical ${APPEND} ${QAPPEND}"
94 ;;
95 esac
96
97 case "${LABEL}" in
98 Text)
99 TYPE_SUFFIX=""
100 ;;
101 GUI)
102 TYPE_SUFFIX="gui"
103 ;;
104 esac
105
106
107 LINUX_INSTALL="${LINUX_INSTALL}\ntitle\t\t${LABEL} ${TYPE}"
108 LINUX_INSTALL="${LINUX_INSTALL}\nkernel\t\t/${KERNEL} ${TAPPEND} ${LB_BOOTAPPEND_INSTALL}"
109 LINUX_INSTALL="${LINUX_INSTALL}\ninitrd\t\t/${INITRD}"
110 done
70 local LABEL="${1}"
71 local KERNEL="${2}"
72 local INITRD="${3}"
73 local APPEND="${4}"
74
75 local APPEND="${APPEND} LB_BOOTAPPEND_INSTALL"
76
77 if [ "${LABEL}" != "expert" ] && [ "${LABEL}" != "expertgui" ]; then
78 APPEND="${APPEND} --- quiet"
79 fi
80
81 LINUX_INSTALL="${LINUX_INSTALL}\ntitle\t\tDebian GNU/Linux - ${LABEL}"
82 LINUX_INSTALL="${LINUX_INSTALL}\nkernel\t\t/${KERNEL} ${APPEND}"
83 LINUX_INSTALL="${LINUX_INSTALL}\ninitrd\t\t/${INITRD}"
11184 }
11285
11386 if [ -e "config/bootloaders/grub-legacy" ]
135108 esac
136109
137110 # Setting destination directory
138 case "${LIVE_IMAGE_TYPE}" in
139 iso*|tar)
140 case "${LB_INITRAMFS}" in
141 live-boot)
142 DESTDIR_LIVE="binary/live"
143 ;;
144
145 *)
146 DESTDIR_LIVE="binary/boot"
147 ;;
148 esac
149
150 DESTDIR_INSTALL="binary/install"
151 ;;
152
153 hdd*|netboot)
154 Echo_warning "Bootloader in this image type not yet supported by live-build."
155 Echo_warning "This would produce a not bootable image, aborting (FIXME)."
156 exit 1
157 ;;
111 case "${LB_INITRAMFS}" in
112 live-boot)
113 DESTDIR_LIVE="binary/live"
114 ;;
115
116 *)
117 DESTDIR_LIVE="binary/boot"
118 ;;
158119 esac
159
160 Check_multiarchitectures
120 DESTDIR_INSTALL="binary/install"
161121
162122 # Creating directory
163123 mkdir -p "${DESTDIR_LIVE}"
166126 if [ "${LB_UNION_FILESYSTEM}" != "overlay" ]
167127 then
168128 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} union=${LB_UNION_FILESYSTEM}"
169 fi
170
171 if [ -n "${LB_NET_COW_PATH}" ]
172 then
173 Echo_error "Net cow not yet supported on grub-legacy"
174 exit 1
175129 fi
176130
177131 LB_BOOTAPPEND_LIVE="$(echo ${LB_BOOTAPPEND_LIVE} | sed -e 's| ||')"
183137 DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
184138 DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
185139
186 Grub_live_entry "live" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}"
187
188 if [ "${LB_BOOTAPPEND_FAILSAFE}" != "none" ]
189 then
190 Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_FAILSAFE}"
140 Grub_live_entry "live" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_LIVE}"
141
142 if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]
143 then
144 Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
191145 fi
192146
193147 for KERNEL in chroot/boot/vmlinuz-*
194148 do
195149 VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
196150
197 Grub_live_entry "live, kernel ${VERSION}" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}"
198 Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${LB_BOOTAPPEND_FAILSAFE}"
151 Grub_live_entry "live, kernel ${VERSION}" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${LB_BOOTAPPEND_LIVE}"
152 Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
199153 done
200154
201155 LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's|binary||g' -e 's|//|/|g')"
202156
203157 # Assembling debian-installer configuration
204 if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
158 if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
205159 then
206160 LINUX_LIVE="title\t\tLive:\nroot\n\n${LINUX_LIVE}"
207161 LINUX_INSTALL="title\t\tInstaller:\nroot"
212166
213167 VMLINUZ_GI="install/gtk/vmlinuz"
214168 INITRD_GI="install/gtk/initrd.gz"
215 APPEND_GI="video=vesa:ywrap,mtrr vga=788"
169 APPEND_GI="vga=788"
170
171 if [ -f "binary/${VMLINUZ_GI}" ] && [ -f "binary/${INITRD_GI}" ]
172 then
173 Grub_install_entry "GUI Install" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
174 Grub_install_entry "GUI Expert" "${VMLINUZ_GI}" "${INITRD_GI}" "priority=low ${APPEND_GI}"
175 Grub_install_entry "GUI Rescue" "${VMLINUZ_GI}" "${INITRD_GI}" "rescue/enable=true ${APPEND_GI}"
176 Grub_install_entry "GUI Auto" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
177 # Note, the following speech synthesis entry deliberately uses graphical kernel, but normal video params, copying the official Debian install disc
178 Grub_install_entry "GUI Install with speech synthesis" "${VMLINUZ_GI}" "${INITRD_GI}" "speakup.synth=soft ${APPEND_GI}"
179 fi
216180
217181 if [ -f "binary/${VMLINUZ_DI}" ] && [ -f "binary/${INITRD_DI}" ]
218182 then
219 Grub_install_entry "Text" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
220 fi
221
222 if [ -f "binary/${VMLINUZ_GI}" ] && [ -f "binary/${INITRD_GI}" ]
223 then
224 Grub_install_entry "GUI" "${VMLINUZ_GI}" "${INITRD_GI}" "${APPEND_GI}"
183 Grub_install_entry "Text Install" "${VMLINUZ_DI}" "${INITRD_DI}" "${APPEND_DI}"
184 Grub_install_entry "Text Expert" "${VMLINUZ_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}"
185 Grub_install_entry "Text Rescue" "${VMLINUZ_DI}" "${INITRD_DI}" "rescue/enable=true ${APPEND_DI}"
186 Grub_install_entry "Text Auto" "${VMLINUZ_DI}" "${INITRD_DI}" "auto=true priority=critical ${APPEND_DI}"
225187 fi
226188 fi
227189
239201 mkdir -p binary/boot/grub
240202 cp -r "${_SOURCE}"/* binary/boot/grub
241203
242 case ${LIVE_IMAGE_TYPE} in
243 iso*)
204 case ${LB_IMAGE_TYPE} in
205 iso|iso-hybrid)
244206 FILES="chroot/usr/lib/grub/*/stage2_eltorito"
245207 ;;
246208
247 hdd*|tar)
209 hdd|tar)
248210 FILES="chroot/usr/lib/grub/*/stage1 chroot/usr/lib/grub/*/e2fs_stage1_5 chroot/usr/lib/grub/*/stage2"
249211 ;;
250212 esac
258220 cp ${FILES} binary/boot/grub
259221
260222 sed -i -e "s|LINUX_LIVE|${LINUX_LIVE}|" -e "s|LINUX_INSTALL|${LINUX_INSTALL}|" -e "s|MEMTEST|${MEMTEST}|" binary/boot/grub/menu.lst
261 sed -i -e "s#LB_BOOTAPPEND_INSTALL#${LB_BOOTAPPEND_INSTALL}#" -e "s#LB_BOOTAPPEND_LIVE#${LB_BOOTAPPEND_LIVE}#" binary/boot/grub/menu.lst
223 sed -i -e "s#LB_BOOTAPPEND_INSTALL#${LB_BOOTAPPEND_INSTALL}#" binary/boot/grub/menu.lst
262224
263225 sed -i -e 's|\ $||g' binary/boot/grub/menu.lst
264226
265227 # Saving cache
266 Save_cache cache/packages.binary
228 Save_package_cache binary
267229
268230 # Removing depends
269 Remove_package
231 Remove_packages
270232
271233 # Creating stage file
272 Create_stagefile .build/binary_grub
234 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'installs grub-pc into binary')"
17 HELP=""
17 DESCRIPTION="Installs grub-pc into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 if [ "${LB_BOOTLOADER_BIOS}" != "grub-pc" ]; then
24 exit 0
25 fi
2526
26 Check_Any_Bootloader_Role "grub-pc"
27 if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
28 exit 0
29 fi
2730
2831 Echo_message "Begin installing grub-pc..."
2932
33 # NOTE: We rely on `binary_grub_cfg` to generate grub.cfg and other configuration files!
34
3035 # Requiring stage file
31 Require_stagefile .build/config .build/bootstrap
36 Require_stagefiles config bootstrap
3237
3338 # Checking stage file
34 Check_stagefile .build/binary_grub
39 Check_stagefile
3540
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
41 # Acquire lock file
42 Acquire_lockfile
4143
4244 # Check architecture
4345 Check_architectures amd64 i386
4749 Check_package chroot /usr/bin/grub-mkimage grub-pc
4850
4951 # Restoring cache
50 Restore_cache cache/packages.binary
52 Restore_package_cache binary
5153
5254 # Installing depends
53 Install_package
54
55 # Setting destination directory
56 case "${LIVE_IMAGE_TYPE}" in
57 hdd*|netboot)
58 Echo_warning "Bootloader in this image type not yet supported by live-build."
59 Echo_warning "This would produce a not bootable image, aborting (FIXME)."
60 exit 1
61 ;;
62 esac
63
64 Check_multiarchitectures
55 Install_packages
6556
6657 # Copying templates
6758 mkdir -p binary/boot/grub/i386-pc
6859
69 case ${LIVE_IMAGE_TYPE} in
70 iso*)
60 case ${LB_IMAGE_TYPE} in
61 iso|iso-hybrid)
7162 FILES="chroot/usr/lib/grub/i386-pc/*.mod chroot/usr/lib/grub/i386-pc/*.lst chroot/usr/lib/grub/i386-pc/efiemu??.o chroot/usr/share/grub/*.pf2"
7263 ;;
7364
74 hdd*|tar)
65 hdd|tar)
7566 FILES="chroot/usr/lib/grub/i386-pc/*"
7667 ;;
7768 esac
8172 FILES="$(echo ${FILES} | sed -e 's|chroot||g')"
8273 fi
8374
84 # We rely on: binary_loopback_cfg to generate grub.cfg and other configuration files
85
8675 # Copying grub
8776 cp ${FILES} binary/boot/grub/i386-pc
8877
78 # Create eltorito image for ISO cases
79 if [ "${LIVE_IMAGE_TYPE}" = "iso" ] || [ "${LIVE_IMAGE_TYPE}" = "iso-hybrid" ]; then
80
81 cat > binary.sh << EOF
82 #!/bin/sh
83
84 INPUT_DIR="/usr/lib/grub/i386-pc"
85
86 # build core.img
87 CORE_IMG=\$(mktemp)
88 grub-mkimage -d \${INPUT_DIR} -o \${CORE_IMG} -O i386-pc --prefix=/boot/grub biosdisk iso9660
89
90 # build grub_eltorito image
91 cat \${INPUT_DIR}/cdboot.img \${CORE_IMG} > grub_eltorito
92
93 rm -f \${CORE_IMG}
94 EOF
95
96 case "${LB_BUILD_WITH_CHROOT}" in
97 true)
98 mv binary.sh chroot
99 Chroot chroot "sh binary.sh"
100 mv chroot/grub_eltorito binary/boot/grub/grub_eltorito
101 rm -f chroot/binary.sh
102 ;;
103
104 false)
105 sh binary.sh
106 mv grub_eltorito binary/boot/grub/grub_eltorito
107 rm -f binary.sh
108 ;;
109 esac
110 fi
111
89112 # Saving cache
90 Save_cache cache/packages.binary
113 Save_package_cache binary
91114
92115 # Removing depends
93 Remove_package
116 Remove_packages
94117
95118 # Creating stage file
96 Create_stagefile .build/binary_grub
119 Create_stagefile
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
4 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
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.
9
10
11 set -e
12
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
15
16 # Setting static variables
17 DESCRIPTION="Generates config for grub-pc and grub-efi, and installs loopback support"
18 USAGE="${PROGRAM} [--force]"
19
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 # NOTE: This creates the config used for both grub-pc and grub-efi.
24 # It also installs loopback.cfg for looback support, which depends upon that
25 # config. Since loopback support is added unconditionally, this script is
26 # thus run unconditionally!
27 # TODO: Add an option to allow disabling loopback.cfg creation? (and thus conditionally run the script)
28
29 Echo_message "Begin installing config for grub-pc and/or grub-efi, and loopback support..."
30
31 # Requiring stage file
32 Require_stagefiles config bootstrap
33
34 # Checking stage file
35 Check_stagefile
36
37 # Acquire lock file
38 Acquire_lockfile
39
40 # Check architecture
41 Check_architectures amd64 i386 arm64
42 Check_crossarchitectures
43
44 _TARGET="binary/boot/grub"
45
46 # Local functions
47 Grub_live_menu_entry() {
48 local LABEL="$1"
49 local KERNEL="$2"
50 local INITRD="$3"
51 local APPEND="$4"
52 local HOTKEY="${5:+ --hotkey=$5}"
53
54 cat >> "${LIVE_ENTRIES_TMP}" <<END
55 menuentry "${LABEL}"${HOTKEY} {
56 linux $KERNEL $APPEND
57 initrd $INITRD
58 }
59 END
60 }
61
62 Grub_live_autodetect_menu_entry ()
63 {
64 local LABEL="${1}"
65 local AMD64_KERNEL="${2}"
66 local AMD64_INITRD="${3}"
67 local _686_KERNEL="${4}"
68 local _686_INITRD="${5}"
69 local APPEND="${6}"
70
71 cat >> "${LIVE_ENTRIES_TMP}" <<END
72 # Autodetect if amd64 is supported
73 menuentry "$LABEL" {
74 if cpuid -l; then
75 linux ${AMD64_KERNEL} ${APPEND}
76 initrd ${AMD64_INITRD}
77 else
78 linux ${_686_KERNEL} ${APPEND}
79 initrd ${_686_INITRD}
80 fi
81 }
82 END
83 }
84
85 # User config replacement/additional files
86 _SOURCE_USER="config/bootloaders/grub-pc"
87
88 # Copying templates
89 mkdir -p "${_TARGET}"
90 if [ -n "${LIVE_BUILD}" ]; then
91 cp -a "${LIVE_BUILD}/share/bootloaders/grub-pc"/* "${_TARGET}"/
92 else
93 cp -a "/usr/share/live/build/bootloaders/grub-pc"/* "${_TARGET}"/
94 fi
95 if [ -e "${_SOURCE_USER}" ]; then
96 cp -af "${_SOURCE_USER}"/* "${_TARGET}"/
97 fi
98
99 case "${LB_INITRAMFS}" in
100 live-boot)
101 INITFS="live"
102 ;;
103
104 *)
105 INITFS="boot"
106 ;;
107 esac
108
109 # Setting boot parameters
110 if [ "${LB_UNION_FILESYSTEM}" != "overlay" ]; then
111 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} union=${LB_UNION_FILESYSTEM}"
112 fi
113
114 # Default entries
115 DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
116 DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
117 DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
118
119 KERNEL_LIVE="/${INITFS}/${DEFAULT_KERNEL}"
120 INITRD_LIVE="/${INITFS}/${DEFAULT_INITRD}"
121 APPEND_LIVE="${LB_BOOTAPPEND_LIVE} findiso=\${iso_path}"
122
123 # Ensure fresh live entries
124 LIVE_ENTRIES_TMP="${_TARGET}/live.cfg.tmp"
125 rm -f "${LIVE_ENTRIES_TMP}"
126
127 # Assemble live menu entries
128 _AMD64_686_NUMBER="0"
129
130 for _FLAVOUR in ${LB_LINUX_FLAVOURS}; do
131 if [ "${_FLAVOUR}" = "amd64" -o "${_FLAVOUR}" = "686" ]; then
132 _AMD64_686_NUMBER="$((${_AMD64_686_NUMBER} + 1))"
133 fi
134 done
135
136 if [ "${_AMD64_686_NUMBER}" -ge 2 ] ; then
137 # Default entries
138 AMD64_KERNEL="$(basename chroot/boot/vmlinuz-*amd64)"
139 AMD64_INITRD="initrd.img-$(echo ${AMD64_KERNEL} | sed -e 's|vmlinuz-||')"
140 _686_KERNEL="$(basename chroot/boot/vmlinuz-*686)"
141 _686_INITRD="initrd.img-$(echo ${_686_KERNEL} | sed -e 's|vmlinuz-||')"
142
143 Grub_live_autodetect_menu_entry "Live system (autodetect)" \
144 "/${INITFS}/${AMD64_KERNEL}" \
145 "/${INITFS}/${AMD64_INITRD}" \
146 "/${INITFS}/${_686_KERNEL}" \
147 "/${INITFS}/${_686_INITRD}" \
148 "${APPEND_LIVE}"
149
150 if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]; then
151 Grub_live_autodetect_menu_entry "Live system (autodetect) (fail-safe mode)" \
152 "/${INITFS}/${AMD64_KERNEL}" \
153 "/${INITFS}/${AMD64_INITRD}" \
154 "/${INITFS}/${_686_KERNEL}" \
155 "/${INITFS}/${_686_INITRD}" \
156 "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
157 fi
158 else
159 Grub_live_menu_entry "Live system" \
160 "/${INITFS}/${DEFAULT_KERNEL}" \
161 "/${INITFS}/${DEFAULT_INITRD}" \
162 "${APPEND_LIVE}" \
163 "l"
164 if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]; then
165 Grub_live_menu_entry "Live system (fail-safe mode)" \
166 "/${INITFS}/${DEFAULT_KERNEL}" \
167 "/${INITFS}/${DEFAULT_INITRD}" \
168 "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
169 fi
170 fi
171
172 _COUNT=0
173 for KERNEL in chroot/boot/vmlinuz-*; do
174 _COUNT=$(( $_COUNT + 1 ))
175 done
176
177 if [ $_COUNT -gt 1 ]; then
178 for KERNEL in chroot/boot/vmlinuz-*; do
179 VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
180
181 Grub_live_menu_entry "Live system, kernel ${VERSION}" \
182 "/${INITFS}/$(basename ${KERNEL})" \
183 "/${INITFS}/initrd.img-${VERSION}" \
184 "${APPEND_LIVE}"
185
186 if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]; then
187 Grub_live_menu_entry "Live system, kernel ${VERSION} (fail-safe mode)" \
188 "/${INITFS}/$(basename ${KERNEL})" \
189 "/${INITFS}/initrd.img-${VERSION}" \
190 "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
191 fi
192 done
193 fi
194
195 # Replace placeholder with compiled live entries temporarily held in live.cfg.tmp
196 sed -i -e "/@LINUX_LIVE@/r ${LIVE_ENTRIES_TMP}" -e "/@LINUX_LIVE@/d" "${_TARGET}"/*.cfg
197 sed -i -e "/LINUX_LIVE/r ${LIVE_ENTRIES_TMP}" -e "/LINUX_LIVE/d" "${_TARGET}"/*.cfg #backwards compatibility
198 rm -f "${LIVE_ENTRIES_TMP}"
199
200 # Assembling debian-installer configuration
201 if [ "${LB_DEBIAN_INSTALLER}" != "none" ]; then
202 ENABLE_INSTALL_MENU="true"
203
204 KERNEL_DI="/install/vmlinuz"
205 INITRD_DI="/install/initrd.gz"
206 APPEND_DI="vga=normal ${LB_BOOTAPPEND_INSTALL} --- quiet"
207
208 KERNEL_GI="/install/gtk/vmlinuz"
209 INITRD_GI="/install/gtk/initrd.gz"
210 APPEND_GI="vga=788 ${LB_BOOTAPPEND_INSTALL} --- quiet"
211
212 if [ "${LB_DEBIAN_INSTALLER_GUI}" = "true" ]; then
213 rm ${_TARGET}/install_text.cfg
214 rm ${_TARGET}/install_start_text.cfg
215 mv ${_TARGET}/install_gui.cfg ${_TARGET}/install.cfg
216 mv ${_TARGET}/install_start_gui.cfg ${_TARGET}/install_start.cfg
217 else
218 rm ${_TARGET}/install_gui.cfg
219 rm ${_TARGET}/install_start_gui.cfg
220 mv ${_TARGET}/install_text.cfg ${_TARGET}/install.cfg
221 mv ${_TARGET}/install_start_text.cfg ${_TARGET}/install_start.cfg
222 fi
223 else
224 ENABLE_INSTALL_MENU="false"
225 rm "${_TARGET}"/install_text.cfg
226 rm "${_TARGET}"/install_gui.cfg
227 rm "${_TARGET}"/install_start_text.cfg
228 rm "${_TARGET}"/install_start_gui.cfg
229 fi
230
231 # Assembling memtest configuration
232 MEMTEST_BIN="/${INITFS}/memtest"
233 if [ -f "binary/${MEMTEST_BIN}" ]; then
234 ENABLE_MEMTEST="true"
235 MEMTEST="source /boot/grub/memtest.cfg" #for backwards compatibility
236 else
237 ENABLE_MEMTEST="false"
238 rm -f "${_TARGET}"/memtest.cfg
239 fi
240
241 # These must be held in variables to avoid mistake by checkbashisms
242 LINUX_INSTALL="source /boot/grub/install_start.cfg"
243 LINUX_ADVANCED_INSTALL="source /boot/grub/install.cfg"
244
245 # Those without '@' markers are for backwards compatibility
246 sed -i \
247 -e "s|@KERNEL_GI@|${KERNEL_GI}|" \
248 -e "s|@INITRD_GI@|${INITRD_GI}|" \
249 -e "s|@APPEND_GI@|${APPEND_GI}|" \
250 -e "s|@KERNEL_DI@|${KERNEL_DI}|" \
251 -e "s|@INITRD_DI@|${INITRD_DI}|" \
252 -e "s|@APPEND_DI@|${APPEND_DI}|" \
253 -e "s|@KERNEL_LIVE@|${KERNEL_LIVE}|" \
254 -e "s|@INITRD_LIVE@|${INITRD_LIVE}|" \
255 -e "s|@APPEND_LIVE@|${APPEND_LIVE}|" \
256 -e "s|@LB_BOOTAPPEND_INSTALL@|${LB_BOOTAPPEND_INSTALL}|" \
257 -e "s|@LB_BOOTAPPEND_LIVE_FAILSAFE@|${LB_BOOTAPPEND_LIVE_FAILSAFE}|" \
258 -e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|" \
259 -e "s|@APPEND_INSTALL@|${LB_BOOTAPPEND_INSTALL}|" \
260 -e "s|@ENABLE_INSTALL_MENU@|${ENABLE_INSTALL_MENU}|" \
261 -e "s|@ENABLE_MEMTEST@|${ENABLE_MEMTEST}|" \
262 -e "s|@MEMTEST_BIN@|${MEMTEST_BIN}|" \
263 -e "s|@MEMTEST_VERSION@|${LB_MEMTEST}|" \
264 -e "s|LINUX_INSTALL|${LINUX_INSTALL}|" \
265 -e "s|LINUX_ADVANCED_INSTALL|${LINUX_ADVANCED_INSTALL}|" \
266 -e "s|MEMTEST|${MEMTEST}|" \
267 -e "s|KERNEL_GI|${KERNEL_GI}|" \
268 -e "s|INITRD_GI|${INITRD_GI}|" \
269 -e "s|APPEND_GI|${APPEND_GI}|" \
270 -e "s|KERNEL_DI|${KERNEL_DI}|" \
271 -e "s|INITRD_DI|${INITRD_DI}|" \
272 -e "s|APPEND_DI|${APPEND_DI}|" \
273 -e "s|KERNEL_LIVE|${KERNEL_LIVE}|" \
274 -e "s|INITRD_LIVE|${INITRD_LIVE}|" \
275 -e "s|APPEND_LIVE|${APPEND_LIVE}|" \
276 -e "s|LB_BOOTAPPEND_INSTALL|${LB_BOOTAPPEND_INSTALL}|" \
277 -e "s|LB_BOOTAPPEND_LIVE_FAILSAFE|${LB_BOOTAPPEND_LIVE_FAILSAFE}|" \
278 -e "s|LB_BOOTAPPEND_LIVE|${LB_BOOTAPPEND_LIVE}|" \
279 "${_TARGET}"/*.cfg
280
281 sed -i -e 's|//|/|g' "${_TARGET}"/*.cfg
282 sed -i -e 's|\ $||g' "${_TARGET}"/*.cfg
283
284 # Add loopback support
285 echo "source /boot/grub/grub.cfg" > "${_TARGET}"/loopback.cfg
286
287 # Creating stage file
288 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'build binary image')"
17 HELP=""
17 DESCRIPTION="Build binary image"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 if ! In_list hdd "${LIVE_IMAGE_TYPE}"
27 then
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 if [ "${LB_IMAGE_TYPE}" != "hdd" ]; then
2824 exit 0
2925 fi
3026
3127 Echo_message "Begin building binary hdd image..."
3228
3329 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap .build/chroot_proc
30 Require_stagefiles config bootstrap chroot_proc
3531
3632 # Checking stage file
37 Check_stagefile .build/binary_hdd
38
39 # Checking lock file
40 Check_lockfile .lock
41
42 # Creating lock file
43 Create_lockfile .lock
33 Check_stagefile
34
35 # Acquire lock file
36 Acquire_lockfile
4437
4538 # Checking depends
4639 case "${LB_BINARY_FILESYSTEM}" in
5548
5649 Check_package chroot /usr/share/doc/mtools mtools
5750 Check_package chroot /sbin/parted parted
58
59 echo "${LB_BOOTLOADERS}" | \
60 while IFS="," read -r BOOTLOADER
61 do
62 case "${BOOTLOADER}" in
63 grub)
64 Check_package chroot /usr/sbin/grub grub
65 ;;
66 esac
67 done
68
69 case ${LB_FIRST_BOOTLOADER} in
70 syslinux)
71 case ${LB_BINARY_FILESYSTEM} in
72 fat*|ntfs)
73 _BOOTLOADER=syslinux
74 ;;
75 ext[234]|btrfs)
76 _BOOTLOADER=extlinux
77 ;;
78 *)
79 Echo_error "syslinux/extlinux doesn't support ${LB_BINARY_FILESYSTEM}"
80 exit 1
81 ;;
82 esac
83 Check_package chroot /usr/bin/${_BOOTLOADER} ${_BOOTLOADER}
84 ;;
51 Check_package host /sbin/fdisk fdisk
52 Check_package host /sbin/losetup mount
53
54 case "${LB_BOOTLOADER_BIOS}" in
55 grub-legacy)
56 Check_package chroot /usr/sbin/grub grub
57 ;;
58
59 syslinux)
60 case ${LB_BINARY_FILESYSTEM} in
61 fat*|ntfs)
62 _BOOTLOADER=syslinux
63 ;;
64 ext[234]|btrfs)
65 _BOOTLOADER=extlinux
66 ;;
67 *)
68 Echo_error "syslinux/extlinux doesn't support ${LB_BINARY_FILESYSTEM}"
69 exit 1
70 ;;
71 esac
72 Check_package chroot /usr/bin/${_BOOTLOADER} ${_BOOTLOADER}
73 ;;
8574 esac
8675
8776 # Restoring cache
88 Restore_cache cache/packages.binary
77 Restore_package_cache binary
8978
9079 # Installing depends
91 Install_package
80 Install_packages
9281
9382 # Remove old binary
94 if [ -f ${LIVE_iMAGE_NAME}.img ]
95 then
96 rm -f ${LIVE_iMAGE_NAME}.img
83 if [ -f ${LB_IMAGE_NAME}.img ]
84 then
85 rm -f ${LB_IMAGE_NAME}.img
9786 fi
9887
9988 case "${LB_BINARY_FILESYSTEM}" in
146135 fi
147136
148137 dd if=/dev/zero of=chroot/binary.img bs=1024k count=0 seek=${REAL_DIM}
149 FREELO="$(${LB_LOSETUP} -f)"
138 FREELO="$(losetup -f)"
139 MAKEDEV=false
150140 if [ ! -b chroot/${FREELO} ]
151141 then
152 MAKEDEV="true"
142 MAKEDEV=true
153143
154144 mv chroot/dev chroot/dev.tmp
155145 find /dev | cpio -dmpu chroot
194184 Chroot chroot "parted -s ${FREELO} set 1 boot on" || true
195185 Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
196186
197 if [ "${LB_FIRST_BOOTLOADER}" = "syslinux" ]
198 then
187 if [ "${LB_BOOTLOADER_BIOS}" = "syslinux" ]; then
199188 dd if=chroot/usr/lib/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z])/mbr.bin of=${FREELO} bs=440 count=1
200189 fi
201190 ;;
214203 parted -s "${FREELO}" set 1 boot on || true
215204 parted -s "${FREELO}" set 1 lba off || true
216205
217 if [ "${LB_FIRST_BOOTLOADER}" = "syslinux" ]
218 then
206 if [ "${LB_BOOTLOADER_BIOS}" = "syslinux" ]; then
219207 dd if=/usr/lib/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z])/mbr.bin of=${FREELO} bs=440 count=1
220208 fi
221209 ;;
223211
224212 Lodetach ${FREELO}
225213
226 FREELO="$(${LB_LOSETUP} -f)"
214 FREELO="$(losetup -f)"
227215 Losetup $FREELO chroot/binary.img 1
228216
229217 case "${LB_BINARY_FILESYSTEM}" in
280268
281269 FIXME()
282270 {
283 if [ "${LB_FIRST_BOOTLOADER}" = "grub" ]
284 then
271 if [ "${LB_BOOTLOADER_BIOS}" = "grub-legacy" ]; then
285272
286273 cat > chroot/grub.sh << EOF
274 #!/bin/sh
287275 cd binary.tmp
288276 grub --batch << EOM
289277 find /live/vmlinuz
297285 echo "WAITING..." && read WAIT
298286
299287 #cat > chroot/grub.sh << EOF
288 #!/bin/sh
300289 #grub --batch << EOM
301290 #root $rootpartition
302291 #setup $hdddev
340329
341330 echo "!!! The above error/warning messages can be ignored !!!"
342331
343 if [ -n "${MAKEDEV}" ]
344 then
332 if $MAKEDEV; then
345333 rm -rf chroot/dev
346334 mv chroot/dev.tmp chroot/dev
347335 fi
348336
349 mv chroot/binary.img ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.img
337 mv chroot/binary.img ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.img
350338
351339 # Saving cache
352 Save_cache cache/packages.binary
340 Save_package_cache binary
353341
354342 # Removing depends
355 Remove_package
343 Remove_packages
356344
357345 # Creating stage file
358 Create_stagefile .build/binary_hdd
346 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'execute hooks in binary')"
17 HELP=""
17 DESCRIPTION="Execute hooks in binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 Echo_message "Begin executing hooks..."
2724
2825 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap
26 Require_stagefiles config bootstrap
3027
3128 # Checking stage file
32 Check_stagefile .build/binary_hooks
29 Check_stagefile
3330
34 # Checking lock file
35 Check_lockfile .lock
36
37 # Creating lock file
38 Create_lockfile .lock
31 # Acquire lock file
32 Acquire_lockfile
3933
4034 ## Processing distribution hooks
4135
7771 done
7872
7973 # Creating stage file
80 Create_stagefile .build/binary_hooks
74 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'copy files into binary')"
17 HELP=""
17 DESCRIPTION="Copy files into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 Echo_message "Begin copying binary includes..."
2724
2825 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap
26 Require_stagefiles config bootstrap
3027
3128 # Checking stage file
32 Check_stagefile .build/includes.binary
29 Check_stagefile
3330
34 # Checking lock file
35 Check_lockfile .lock
36
37 # Creating lock file
38 Create_lockfile .lock
31 # Acquire lock file
32 Acquire_lockfile
3933
4034 if Find_files config/includes.binary/
4135 then
4539 cd "${OLDPWD}"
4640
4741 # Removing symlinks
48 case "${LIVE_IMAGE_TYPE}" in
49 hdd*)
50 find binary -type l | xargs rm -f
51 ;;
52 esac
42 if [ "${LB_IMAGE_TYPE}" = "hdd" ]; then
43 find binary -type l | xargs rm -f
44 fi
45 fi
5346
54 # Creating stage file
55 Create_stagefile .build/binary_includes
56 fi
47 # Creating stage file
48 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'build iso binary image')"
17 HELP=""
17 DESCRIPTION="Build iso binary image"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 case "${LIVE_IMAGE_TYPE}" in
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 case "${LB_IMAGE_TYPE}" in
2724 iso)
28 IMAGE="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.iso"
25 IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
2926 ;;
3027
3128 iso-hybrid)
32 IMAGE="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.hybrid.iso"
29 IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.hybrid.iso"
3330 ;;
3431
3532 *)
4037 Echo_message "Begin building binary iso image..."
4138
4239 # Requiring stage file
43 Require_stagefile .build/config .build/bootstrap
40 Require_stagefiles config bootstrap
4441
4542 # Checking stage file
46 Check_stagefile .build/binary_iso
47
48 # Checking lock file
49 Check_lockfile .lock
50
51 # Creating lock file
52 Create_lockfile .lock
43 Check_stagefile
44
45 # Acquire lock file
46 Acquire_lockfile
5347
5448 # Checking depends
5549 Check_package chroot /usr/bin/xorriso xorriso
5650 Check_package chroot /usr/lib/ISOLINUX/isohdpfx.bin isolinux
5751
5852 # Restoring cache
59 Restore_cache cache/packages.binary
53 Restore_package_cache binary
6054
6155 # Installing depends
62 Install_package
56 Install_packages
6357
6458 # Remove old iso image
6559 if [ -f ${IMAGE} ]
7165 XORRISO_OPTIONS="-R -r -J -joliet-long -l -cache-inodes -iso-level 3"
7266
7367 # Handle xorriso live-build specific options
74 if [ "${LIVE_IMAGE_TYPE}" = "iso-hybrid" ]
68 if [ "${LB_IMAGE_TYPE}" = "iso-hybrid" ]
7569 then
7670 XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -partition_offset 16"
7771 fi
9387
9488 if [ -n "${LB_ISO_PREPARER}" ] && [ "${LB_ISO_PREPARER}" != "none" ]
9589 then
90 LB_ISO_PREPARER="$(echo "${LB_ISO_PREPARER}" | sed "s|@LB_VERSION@|${VERSION}|")"
9691 XORRISO_OPTIONS="${XORRISO_OPTIONS} -p \"${LB_ISO_PREPARER}\""
9792 fi
9893
10398
10499 if [ -n "${LB_ISO_VOLUME}" ] && [ "${LB_ISO_VOLUME}" != "none" ]
105100 then
101 LB_ISO_VOLUME="$(echo "${LB_ISO_VOLUME}" | sed "s|@ISOVOLUME_TS@|$(date $DATE_UTC_OPTION -d@${SOURCE_DATE_EPOCH} +%Y%m%d-%H:%M)|")"
106102 XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\""
107103 fi
108104
109105 # Set an explicit modification date
110 XORRISO_OPTIONS="${XORRISO_OPTIONS} --modification-date=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d%H%m%S00)"
111
112 OLDIFS="$IFS"
113 IFS=","
114 BOOTLOADER_NUMBER=0
115 for BOOTLOADER in ${LB_BOOTLOADERS}
116 do
117 BOOTLOADER_NUMBER=$(expr ${BOOTLOADER_NUMBER} + 1)
118 # Handle xorriso architecture specific options
119
120 # If the bootloader number is greater or equal than 2 it means
121 # we are not the first bootloader and thus we need to tell
122 # mkisosfs to add an additional eltorito entry
123 if [ ${BOOTLOADER_NUMBER} -ge 2 ]
124 then
125 XORRISO_OPTIONS="${XORRISO_OPTIONS} -eltorito-alt-boot "
126 fi
127 case "${BOOTLOADER}" in
128 grub)
129 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
130 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/stage2_eltorito"
131 XORRISO_EXCLUDE="boot/grub/stage2_eltorito"
132 ;;
133
134 grub-pc)
135 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
136 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/grub_eltorito -J"
137 XORRISO_EXCLUDE="boot/grub/grub_eltorito"
138 ;;
139
140 syslinux)
141 case "${LB_MODE}" in
142 progress-linux)
143 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/boot.bin -c boot/boot.cat"
144 XORRISO_EXCLUDE="boot/boot.bin"
145 ;;
146
147 *)
148 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b isolinux/isolinux.bin -c isolinux/boot.cat"
149 XORRISO_EXCLUDE="isolinux/isolinux.bin"
150 ;;
151 esac
152
153 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
154 ;;
155
156 grub-efi)
157 if [ -e binary/boot/grub/efi.img ]
158 then
159 XORRISO_OPTIONS="${XORRISO_OPTIONS} -e boot/grub/efi.img -no-emul-boot"
160 XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-gpt-basdat -isohybrid-apm-hfsplus"
161 else
162 Echo "No EFI boot code to include in the ISO"
163 fi
164 ;;
165
166 *)
167 Echo_warning "Bootloader on your architecture not yet supported by live-build."
168 Echo_warning "This will produce a most likely not bootable image (Continuing in 5 seconds)."
169 sleep 5
170 ;;
171 esac
172
173 done
174 IFS="$OLDIFS"
106 XORRISO_OPTIONS="${XORRISO_OPTIONS} --modification-date=$(date --utc -d@${SOURCE_DATE_EPOCH} +%Y%m%d%H%M%S00)"
107
108 # Enable BIOS bootloader selection
109 case "${LB_BOOTLOADER_BIOS}" in
110 grub-legacy)
111 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
112 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/stage2_eltorito"
113 XORRISO_EXCLUDE="boot/grub/stage2_eltorito"
114 ;;
115
116 grub-pc)
117 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
118 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/grub_eltorito"
119 XORRISO_EXCLUDE="boot/grub/grub_eltorito"
120 ;;
121
122 syslinux)
123 XORRISO_OPTIONS="${XORRISO_OPTIONS} -b isolinux/isolinux.bin -c isolinux/boot.cat"
124 XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
125 XORRISO_EXCLUDE="isolinux/isolinux.bin"
126 ;;
127
128 "")
129 ;;
130
131 *)
132 Echo_error "Unhandled BIOS bootloader selection"
133 exit 1
134 ;;
135 esac
136
137 # If both BIOS and EFI bootloaders are in play, we need to tell mkisosfs to add
138 # an additional eltorito entry.
139 if [ -n "${LB_BOOTLOADER_BIOS}" ] && [ -n "${LB_BOOTLOADER_EFI}" ]; then
140 XORRISO_OPTIONS="${XORRISO_OPTIONS} -eltorito-alt-boot"
141 fi
142
143 # Enable EFI bootloader selection
144 case "${LB_BOOTLOADER_EFI}" in
145 grub-efi)
146 if [ -e binary/boot/grub/efi.img ]; then
147 XORRISO_OPTIONS="${XORRISO_OPTIONS} -e boot/grub/efi.img -no-emul-boot"
148 XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-gpt-basdat -isohybrid-apm-hfsplus"
149 else
150 Echo_message "No EFI boot code to include in the ISO"
151 fi
152 ;;
153
154 "")
155 ;;
156
157 *)
158 Echo_error "Unhandled EFI bootloader selection"
159 exit 1
160 ;;
161 esac
175162
176163 #if [ "${LB_DEBIAN_INSTALLER}" != "live" ]
177164 #then
178165 # XORRISO_OPTIONS="${XORRISO_OPTIONS} -m ${XORRISO_EXCLUDE}"
179166 #fi
180167
181 if [ "${LB_FIRST_BOOTLOADER}" = "grub-pc" ]
182 then
183
184168 cat > binary.sh << EOF
185169 #!/bin/sh
186
187 input_dir=/usr/lib/grub/i386-pc
188
189 # build core.img
190 core_img=\$(mktemp)
191 grub-mkimage -d \${input_dir} -o \${core_img} -O i386-pc biosdisk iso9660
192
193 # build grub_eltorito image
194 cat \${input_dir}/cdboot.img \${core_img} > binary/boot/grub/grub_eltorito
195
196 rm -f \${core_img}
197
198 for file in \${input_dir}/*.mod \${input_dir}/efiemu??.o \
199 \${input_dir}/command.lst \${input_dir}/moddep.lst \${input_dir}/fs.lst \
200 \${input_dir}/handler.lst \${input_dir}/parttool.lst
201 do
202 if test -f "\$file"
203 then
204 cp -f "\$file" binary/boot/grub/i386-pc
205 fi
206 done
207 EOF
208
209 else
210 echo "#!/bin/sh" > binary.sh
211 fi
212
213 cat >> binary.sh << EOF
214
215 mkdir -p binary/.disk
216170 xorriso -as mkisofs ${XORRISO_OPTIONS} -o ${IMAGE} binary
217171 EOF
218172
219173 # retain the xorriso command used to create the image in the image itself
174 mkdir -p binary/.disk
220175 cat <<-EOF >binary/.disk/mkisofs
221176 xorriso -as mkisofs ${XORRISO_OPTIONS} -o ${IMAGE} binary
222177 EOF
178 # Set the timestamp
179 find binary/.disk -newermt "$(date -d@${SOURCE_DATE_EPOCH} '+%Y-%m-%d %H:%M:%S')" -printf "%y %p\n" -exec touch '{}' -d@${SOURCE_DATE_EPOCH} ';' >> binary.modified_timestamps
223180
224181 case "${LB_BUILD_WITH_CHROOT}" in
225182 true)
241198 esac
242199
243200 # Saving cache
244 Save_cache cache/packages.binary
201 Save_package_cache binary
245202
246203 # Removing depends
247 Remove_package
204 Remove_packages
248205
249206 # Creating stage file
250 Create_stagefile .build/binary_iso
207 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'install linux-image into binary')"
17 HELP=""
17 DESCRIPTION="Install linux-image into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_LINUX_PACKAGES}" = "none" ]
2724 then
3128 Echo_message "Begin install linux-image..."
3229
3330 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3532
3633 # Checking stage file
37 Check_stagefile .build/binary_linux-image
34 Check_stagefile
3835
39 # Checking lock file
40 Check_lockfile .lock
41
42 # Creating lock file
43 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4438
4539 case "${LB_INITRAMFS}" in
4640 live-boot)
5246 ;;
5347 esac
5448
55 case "${LB_ARCHITECTURES}" in
56 powerpc)
49 case "${LB_ARCHITECTURE}" in
50 powerpc|ppc64el)
5751 LINUX="vmlinux"
5852 ;;
5953
6256 ;;
6357 esac
6458
65 Check_multiarchitectures
66
6759 # Creating directory
6860 mkdir -p "${DESTDIR}"
6961
7062 # Installing linux-image
71 cp chroot/boot/"${LINUX}"-* "${DESTDIR}"
72 cp chroot/boot/initrd.img-* "${DESTDIR}" 2>&1 || Echo_message "Skip installing missing initrd."
63 cp -a chroot/boot/"${LINUX}"-* "${DESTDIR}"
64 cp -a chroot/boot/initrd.img-* "${DESTDIR}" 2>&1 || Echo_message "Skip installing missing initrd."
7365
7466 case "${LB_INITRAMFS}" in
7567 live-boot)
8173 esac
8274
8375 # Creating stage file
84 Create_stagefile .build/binary_linux-image
76 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'copy loadlin into binary')"
17 HELP=""
17 DESCRIPTION="Copy loadlin into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_LOADLIN}" != "true" ] || [ "${LB_BINARY_IMAGES}" = "netboot" ]
2724 then
3128 Echo_message "Begin copying loadlin..."
3229
3330 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3532
3633 # Checking stage file
37 Check_stagefile .build/binary_loadlin
34 Check_stagefile
3835
39 # Checking lock file
40 Check_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
42 # Creating lock file
43 Create_lockfile .lock
44
45
46 case "${LB_ARCHITECTURES}" in
39 case "${LB_ARCHITECTURE}" in
4740 amd64|i386)
4841 # Checking depends
4942 Check_package chroot /usr/lib/loadlin/loadlin.exe.gz loadlin
5043
5144 # Restoring cache
52 Restore_cache cache/packages.binary
45 Restore_package_cache binary
5346
5447 # Installing depends
55 Install_package
48 Install_packages
5649
5750 case "${LB_BUILD_WITH_CHROOT}" in
5851 true)
6659
6760 # Copying loadlin
6861 mkdir -p binary/tools
69 gunzip -c "${_PREFIX}/usr/lib/loadlin/loadlin.exe.gz" > binary/tools/loadlin.exe
70 gunzip -c "${_PREFIX}/usr/share/doc/loadlin/manual.txt.gz" > binary/tools/loadlin.txt
62 cp -a "${_PREFIX}/usr/lib/loadlin/loadlin.exe.gz" binary/tools
63 cp -a "${_PREFIX}/usr/share/doc/loadlin/manual.txt.gz" binary/tools/loadlin.txt.gz
64 gunzip binary/tools/loadlin.exe.gz
65 gunzip binary/tools/loadlin.txt.gz
7166
7267 # Saving cache
73 Save_cache cache/packages.binary
68 Save_package_cache binary
7469
7570 # Removing depends
76 Remove_package
71 Remove_packages
72
73 mkdir -p binary/install
7774
7875 cat > binary/install/install.bat << EOF
7976 \tools\loadlin.exe vmlinuz initrd=initrd.gz
8077 EOF
8178
82 if [ -e binary/install/gtk ]
83 then
79 if [ "${LB_DEBIAN_INSTALLER_GUI}" = "true" ]; then
80
81 mkdir -p binary/install/gtk
8482
8583 cat > binary/install/gtk/install.bat << EOF
8684 \tools\loadlin.exe \install\vmlinuz initrd=initrd.gz vga=788
8785 EOF
8886
8987 fi
90
91 # Creating stage file
92 Create_stagefile .build/binary_loadlin
9388 ;;
94
9589 *)
9690 Echo_warning "loadlin inclusion is set to true but not compatible with your architecture, ignoring."
9791 ;;
9892 esac
93
94 # Creating stage file
95 Create_stagefile
+0
-301
scripts/build/binary_loopback_cfg less more
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 set -e
11
12 # Including common functions
13 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
14
15 # Setting static variables
16 DESCRIPTION="$(Echo 'installs loopback.cfg into binary')"
17 HELP=""
18 USAGE="${PROGRAM} [--force]"
19
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 # We avoid checking if we need to be running this bootloader
27 # on purpose. The reason: You will always want to have
28 # a loopback.cfg file
29 # TODO: Add an option to be able to disable this file creation
30 Echo_message "Begin installing loopback.cfg..."
31
32 # Requiring stage file
33 Require_stagefile .build/config .build/bootstrap
34
35 # Checking stage file
36 Check_stagefile .build/binary_loopback_cfg
37
38 # Checking lock file
39 Check_lockfile .lock
40
41 # Creating lock file
42 Create_lockfile .lock
43
44 # Check architecture
45 Check_architectures amd64 i386
46 Check_crossarchitectures
47
48 # Variable used to embed newlines
49 NL="
50 "
51
52 # Local functions
53 Grub_menu_entry() {
54 local LABEL="$1"
55 local KERNEL="$2"
56 local INITRD="$3"
57 local APPEND="$4"
58
59 cat <<END
60 menuentry "$LABEL" {
61 linux $KERNEL $APPEND
62 initrd $INITRD
63 }
64 END
65 }
66
67 Grub_live_entry ()
68 {
69 LINUX_LIVE="${LINUX_LIVE}$(Grub_menu_entry "$@")$NL"
70 }
71
72 Grub_install_entry ()
73 {
74 LABEL="${1}"
75 TYPE="${2}"
76 KERNEL="${3}"
77 INITRD="${4}"
78 APPEND="${5}"
79
80 # Drop "quiet" kernel parameter for rescue entries
81 case $TYPE in
82 rescue|rescuegui)
83 APPEND=$(echo "$APPEND" | sed -e 's/ quiet//')
84 ;;
85 esac
86
87 if [ -z "$LINUX_INSTALL" ]; then
88 # First entry recorded in LINUX_INSTALL
89 LINUX_INSTALL="$(Grub_menu_entry "$LABEL" "$KERNEL" "$INITRD" "$APPEND")$NL"
90 else
91 # Remaining entries recorded in LINUX_ADVANCED_INSTALL
92 LINUX_ADVANCED_INSTALL="$LINUX_ADVANCED_INSTALL$(Grub_menu_entry "$LABEL" "$KERNEL" "$INITRD" "$APPEND")$NL"
93 fi
94 }
95
96 Grub_live_autodetect_menu_entry ()
97 {
98 local LABEL="${1}"
99 local AMD64_KERNEL="${2}"
100 local AMD64_INITRD="${3}"
101 local _686_KERNEL="${4}"
102 local _686_INITRD="${5}"
103 local APPEND="${6}"
104 cat <<END
105 # Autodetect if amd64 is supported
106 menuentry "$LABEL" {
107 if cpuid -l; then
108 linux ${AMD64_KERNEL} ${APPEND}
109 initrd ${AMD64_INITRD}
110 else
111 linux ${_686_KERNEL} ${APPEND}
112 initrd ${_686_INITRD}
113 fi
114 }
115 END
116 }
117
118 Grub_live_autodetect_entry ()
119 {
120 LINUX_LIVE="${LINUX_LIVE}$(Grub_live_autodetect_menu_entry "$@")$NL"
121 }
122
123 Grub_memtest_menu_entry ()
124 {
125 cat <<END
126 menuentry "$LB_MEMTEST" {
127 linux16 /${INITFS}/memtest
128 }
129 END
130 }
131
132 if [ -e "config/bootloaders/grub-pc" ]
133 then
134 # Internal local copy
135 _SOURCE="config/bootloaders/grub-pc"
136 else
137 # Internal system copy
138 if [ -n "${LIVE_BUILD}" ]
139 then
140 _SOURCE="${LIVE_BUILD}/share/bootloaders/grub-pc"
141 else
142 _SOURCE="/usr/share/live/build/bootloaders/grub-pc"
143 fi
144 fi
145
146 case "${LB_INITRAMFS}" in
147 live-boot)
148 INITFS="live"
149 ;;
150
151 *)
152 INITFS=""
153 ;;
154 esac
155
156 Check_multiarchitectures
157
158 # Setting boot parameters
159 if [ "${LB_UNION_FILESYSTEM}" != "overlay" ]
160 then
161 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} union=${LB_UNION_FILESYSTEM}"
162 fi
163
164 if [ -n "${LB_NET_COW_PATH}" ]
165 then
166 Echo_error "Net cow not yet supported on grub"
167 exit 1
168 fi
169
170 # Default entries
171 DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
172 DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
173 DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
174
175 KERNEL_LIVE="/${INITFS}/${DEFAULT_KERNEL}"
176 INITRD_LIVE="/${INITFS}/${DEFAULT_INITRD}"
177 APPEND_LIVE="${LB_BOOTAPPEND_LIVE} findiso=\${iso_path}"
178
179 # Assembling kernel configuration
180 _AMD64_686_NUMBER="0"
181
182 for _FLAVOUR in ${LB_LINUX_FLAVOURS}
183 do
184 if [ "${_FLAVOUR}" = "amd64" -o "${_FLAVOUR}" = "686" ] ; then
185 _AMD64_686_NUMBER="$((${_AMD64_686_NUMBER} + 1))"
186 fi
187 done
188
189 if [ "${_AMD64_686_NUMBER}" -ge 2 ] ; then
190 # Default entries
191 AMD64_KERNEL="$(basename chroot/boot/vmlinuz-*amd64)"
192 AMD64_INITRD="initrd.img-$(echo ${AMD64_KERNEL} | sed -e 's|vmlinuz-||')"
193 _686_KERNEL="$(basename chroot/boot/vmlinuz-*686)"
194 _686_INITRD="initrd.img-$(echo ${_686_KERNEL} | sed -e 's|vmlinuz-||')"
195
196 Grub_live_autodetect_entry "Live system (autodetect)" \
197 "/${INITFS}/${AMD64_KERNEL}" \
198 "/${INITFS}/${AMD64_INITRD}" \
199 "/${INITFS}/${_686_KERNEL}" \
200 "/${INITFS}/${_686_INITRD}" \
201 "${APPEND_LIVE}"
202
203 if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]
204 then
205 Grub_live_autodetect_entry "Live system (autodetect) (fail-safe mode)" \
206 "/${INITFS}/${AMD64_KERNEL}" \
207 "/${INITFS}/${AMD64_INITRD}" \
208 "/${INITFS}/${_686_KERNEL}" \
209 "/${INITFS}/${_686_INITRD}" \
210 "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
211 fi
212 else
213 Grub_live_entry "Live system" "/${INITFS}/${DEFAULT_KERNEL}" "/${INITFS}/${DEFAULT_INITRD}" "${APPEND_LIVE}"
214 if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]
215 then
216 Grub_live_entry "Live system (fail-safe mode)" "/${INITFS}/${DEFAULT_KERNEL}" "/${INITFS}/${DEFAULT_INITRD}" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
217 fi
218 fi
219
220 _COUNT=0
221 for KERNEL in chroot/boot/vmlinuz-*; do
222 _COUNT=$(( $_COUNT + 1 ))
223 done
224
225 if [ $_COUNT -gt 1 ]; then
226 for KERNEL in chroot/boot/vmlinuz-*
227 do
228 VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
229
230 Grub_live_entry "Live system, kernel ${VERSION}" "/${INITFS}/$(basename ${KERNEL})" "/${INITFS}/initrd.img-${VERSION}" "${APPEND_LIVE}"
231
232 if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]; then
233 Grub_live_entry "Live system, kernel ${VERSION} (fail-safe mode)" "/${INITFS}/$(basename ${KERNEL})" "/${INITFS}/initrd.img-${VERSION}" "${LB_BOOTAPPEND_LIVE_FAILSAFE}"
234 fi
235 done
236 fi
237
238 # Assembling debian-installer configuration
239 if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
240 then
241 KERNEL_DI="/install/vmlinuz"
242 INITRD_DI="/install/initrd.gz"
243 APPEND_DI="vga=normal quiet ${LB_BOOTAPPEND_INSTALL}"
244
245 KERNEL_GI="/install/gtk/vmlinuz"
246 INITRD_GI="/install/gtk/initrd.gz"
247 APPEND_GI="video=vesa:ywrap,mtrr vga=788 quiet ${LB_BOOTAPPEND_INSTALL}"
248
249 Grub_install_entry "Start installer" "installgui" "${KERNEL_GI}" "${INITRD_GI}" "${APPEND_GI}"
250
251 Grub_install_entry "Install in graphical mode" "installgui" "${KERNEL_GI}" "${INITRD_GI}" "${APPEND_GI}"
252 Grub_install_entry "Install in text mode" "install" "${KERNEL_DI}" "${INITRD_DI}" "${APPEND_DI}"
253 Grub_install_entry "Expert install in graphical mode" "expertgui" "${KERNEL_GI}" "${INITRD_GI}" "priority=low ${APPEND_GI}"
254 Grub_install_entry "Expert install in text mode" "expert" "${KERNEL_DI}" "${INITRD_DI}" "priority=low ${APPEND_DI}"
255 Grub_install_entry "Automatic install in graphical mode" "autogui" "${KERNEL_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
256 Grub_install_entry "Automatic install in text mode" "auto" "${KERNEL_DI}" "${INITRD_DI}" "auto=true priority=critical ${APPEND_DI}"
257 Grub_install_entry "Rescue system in graphical mode" "rescuegui" "${KERNEL_GI}" "${INITRD_GI}" "rescue/enable=true ${APPEND_GI}"
258 Grub_install_entry "Rescue system in text mode" "rescue" "${KERNEL_DI}" "${INITRD_DI}" "rescue/enable=true ${APPEND_DI}"
259 fi
260
261 # Assembling memtest configuration
262 if [ -f "binary/${INITFS}/memtest" ]
263 then
264 MEMTEST="$(Grub_memtest_menu_entry)$NL"
265 fi
266
267 # Copying templates
268 mkdir -p binary/boot/grub
269 cp -a "${_SOURCE}"/* binary/boot/grub/
270
271 escape_for_sed() {
272 echo -n "$1" | perl -npe 's/\n/\\n/gm'
273 }
274
275 sed -i \
276 -e "s|LINUX_LIVE|$(escape_for_sed "${LINUX_LIVE}")|" \
277 -e "s|LINUX_ADVANCED_INSTALL|$(escape_for_sed "${LINUX_ADVANCED_INSTALL}")|" \
278 -e "s|LINUX_INSTALL|$(escape_for_sed "${LINUX_INSTALL}")|" \
279 -e "s|MEMTEST|$(escape_for_sed "${MEMTEST}")|" \
280 -e "s|KERNEL_GI|$(escape_for_sed "${KERNEL_GI}")|" \
281 -e "s|INITRD_GI|$(escape_for_sed "${INITRD_GI}")|" \
282 -e "s|APPEND_GI|$(escape_for_sed "${APPEND_GI}")|" \
283 -e "s|KERNEL_DI|$(escape_for_sed "${KERNEL_DI}")|" \
284 -e "s|INITRD_DI|$(escape_for_sed "${INITRD_DI}")|" \
285 -e "s|APPEND_DI|$(escape_for_sed "${APPEND_DI}")|" \
286 -e "s|KERNEL_LIVE|$(escape_for_sed "${KERNEL_LIVE}")|" \
287 -e "s|INITRD_LIVE|$(escape_for_sed "${INITRD_LIVE}")|" \
288 -e "s|APPEND_LIVE|$(escape_for_sed "${APPEND_LIVE}")|" \
289 -e "s|LB_BOOTAPPEND_INSTALL|$(escape_for_sed "${LB_BOOTAPPEND_INSTALL}")|" \
290 -e "s|LB_BOOTAPPEND_LIVE_FAILSAFE|$(escape_for_sed "${LB_BOOTAPPEND_LIVE_FAILSAFE}")|" \
291 -e "s|LB_BOOTAPPEND_LIVE|$(escape_for_sed "${LB_BOOTAPPEND_LIVE}")|" \
292 binary/boot/grub/*.cfg
293
294 sed -i -e 's|//|/|g' binary/boot/grub/*.cfg
295 sed -i -e 's|\ $||g' binary/boot/grub/*.cfg
296
297 echo "source /boot/grub/grub.cfg" > binary/boot/grub/loopback.cfg
298
299 # Creating stage file
300 Create_stagefile .build/binary_loopback_cfg
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'create manifest')"
17 HELP=""
17 DESCRIPTION="Create manifest"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_CHROOT_FILESYSTEM}" = "none" ]
2724 then
3128 Echo_message "Begin creating manifest..."
3229
3330 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3532
3633 # Checking stage file
37 Check_stagefile .build/binary_manifest
34 Check_stagefile
3835
39 # Checking lock file
40 Check_lockfile .lock
41
42 # Creating lock file
43 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4438
4539 case "${LB_INITRAMFS}" in
4640 live-boot)
5549 esac
5650
5751 # Add filesystem.packages
58 cp chroot.packages.live "binary/${INITFS}/filesystem.${SUFFIX}"
59 echo "$(diff chroot.packages.live chroot.packages.install | awk '/^< / { print $2 }')" \
52 cp -a chroot.packages.live "binary/${INITFS}/filesystem.${SUFFIX}"
53 diff chroot.packages.live chroot.packages.install | awk '/^< / { print $2 }' \
6054 > "binary/${INITFS}/filesystem.${SUFFIX}-remove"
55 if [ ! -s "binary/${INITFS}/filesystem.${SUFFIX}-remove" ]
56 then
57 rm "binary/${INITFS}/filesystem.${SUFFIX}-remove"
58 fi
6159
62 cp chroot.packages.live ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.packages
60 cp -a chroot.packages.live ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.packages
6361
64 cp chroot.files ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.files
62 cp -a chroot.files ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.files
6563
6664 # Creating stage file
67 Create_stagefile .build/binary_manifest
65 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'installs a memtest into binary')"
17 HELP=""
17 DESCRIPTION="Installs a memtest into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 if [ "${LB_MEMTEST}" = "false" ] || [ "${LB_MEMTEST}" = "none" ] || [ "${LB_CHROOT_FILESYSTEM}" = "none" ]
23 if [ "${LB_MEMTEST}" = "none" ] || [ "${LB_CHROOT_FILESYSTEM}" = "none" ]
2724 then
2825 exit 0
2926 fi
3128 Echo_message "Begin installing memtest..."
3229
3330 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3532
3633 # Checking stage file
37 Check_stagefile .build/binary_memtest
34 Check_stagefile
3835
39 # Checking lock file
40 Check_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
42 # Creating lock file
43 Create_lockfile .lock
44
45 if [ "${LB_ARCHITECTURES}" != "amd64" ] && [ "${LB_ARCHITECTURES}" != "i386" ]
39 if [ "${LB_ARCHITECTURE}" != "amd64" ] && [ "${LB_ARCHITECTURE}" != "i386" ]
4640 then
47 Echo_warning "skipping binary_memtest, foreign architecture."
41 Echo_warning "Skipping binary_memtest, foreign architecture."
4842 exit 0
4943 fi
5044
7266 esac
7367
7468 # Restoring cache
75 Restore_cache cache/packages.binary
69 Restore_package_cache binary
7670
7771 # Installing depends
78 Install_package
72 Install_packages
7973
8074 # Setting destination directory
8175 case "${LB_INITRAMFS}" in
8882 ;;
8983 esac
9084
91 Check_multiarchitectures
92
9385 # Creating directory
9486 mkdir -p "${DESTDIR}"
9587
9688 # Installing memtest
9789 case "${LB_BUILD_WITH_CHROOT}" in
9890 true)
99 cp chroot/boot/${LB_MEMTEST}.bin "${DESTDIR}"/memtest
91 cp -a chroot/boot/${LB_MEMTEST}.bin "${DESTDIR}"/memtest
10092 ;;
10193
10294 false)
103 cp /boot/${LB_MEMTEST}.bin "${DESTDIR}"/memtest
95 cp -a /boot/${LB_MEMTEST}.bin "${DESTDIR}"/memtest
10496 ;;
10597 esac
10698
10799 # Saving cache
108 Save_cache cache/packages.binary
100 Save_package_cache binary
109101
110102 # Removing depends
111 Remove_package
103 Remove_packages
112104
113105 if [ "${GRUB}" ]
114106 then
116108 fi
117109
118110 # Creating stage file
119 Create_stagefile .build/binary_memtest
111 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'build netboot binary image')"
17 HELP=""
17 DESCRIPTION="Build netboot binary image"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 if ! In_list netboot "${LIVE_IMAGE_TYPE}"
27 then
23 if [ "${LB_IMAGE_TYPE}" != "netboot" ]; then
2824 exit 0
2925 fi
3026
3632 Echo_message "Begin building binary netboot image..."
3733
3834 # Requiring stage file
39 Require_stagefile .build/config .build/bootstrap
35 Require_stagefiles config bootstrap
4036
4137 # Checking stage file
42 Check_stagefile .build/binary_netboot
38 Check_stagefile
4339
44 # Checking lock file
45 Check_lockfile .lock
46
47 # Creating lock file
48 Create_lockfile .lock
40 # Acquire lock file
41 Acquire_lockfile
4942
5043 # Remove old binary
51 rm -f ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.gz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.bz2 ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.xz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar.xz
44 rm -f ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.gz ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.bz2 ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.xz ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar.xz
5245
5346 # Creating image file
54 ROOT_DIR=$(basename ${LB_NET_ROOT_PATH})
47 ROOT_DIR=${LB_MODE}-live
5548
56 if [ "${ROOT_DIR}" = "chroot" ]
57 then
58 mv chroot chroot.tmp
59 fi
60
61 if [ "${ROOT_DIR}" != "binary" ]
62 then
63 mv binary ${ROOT_DIR}
64 fi
49 mv binary ${ROOT_DIR}
6550
6651 mkdir binary.tmp
6752 mv ${ROOT_DIR} tftpboot binary.tmp
7156 mkdir tftpboot/live
7257 mv */live/vmlinuz* */live/initrd* tftpboot/live
7358
74 tar cf ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar *
59 tar cf ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar *
7560
7661 case "${LB_COMPRESSION}" in
7762 bzip2)
78 bzip2 ${BZIP2_OPTIONS} ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar
63 bzip2 ${BZIP2_OPTIONS} ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar
7964 ;;
8065
8166 gzip)
82 gzip ${GZIP_OPTIONS} ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar
67 gzip ${GZIP_OPTIONS} ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar
8368 ;;
8469
8570 lzip)
86 lzip ${LZIP_OPTIONS} ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar
71 lzip ${LZIP_OPTIONS} ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar
8772 ;;
8873
8974 xz)
90 xz ${XZ_OPTIONS} ../${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar
75 xz ${XZ_OPTIONS} ../${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar
9176 ;;
9277
9378 none)
9883 cd "${OLDPWD}"
9984 rmdir binary.tmp
10085
101 if [ "${ROOT_DIR}" != "binary" ]
102 then
103 mv ${ROOT_DIR} binary
104 fi
105
106 if [ "${ROOT_DIR}" = "chroot" ]
107 then
108 mv chroot.tmp chroot
109 fi
86 mv ${ROOT_DIR} binary
11087
11188 # Creating stage file
112 Create_stagefile .build/binary_netboot
89 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2018-2020 The Debian Live team
4 ## Copyright (C) 2018 Luca Boccassi <[email protected]>
35 ## Copyright (C) 2017 Erik Ziegenbalg <[email protected]>
4 ## Copyright (C) 2018 Luca Boccassi <[email protected]>
56 ##
67 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
78 ## This is free software, and you are welcome to redistribute it
1415 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1516
1617 # Setting static variables
17 DESCRIPTION="$(Echo 'build ONIE binary image')"
18 HELP=""
18 DESCRIPTION="Build ONIE binary image"
1919 USAGE="${PROGRAM} [--force]"
2020
21 Arguments "${@}"
22
23 # Reading configuration files
24 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
25 Set_defaults
21 # Processing arguments and configuration files
22 Init_config_data "${@}"
2623
2724 if [ "${LB_ONIE}" != "true" ]
2825 then
2926 exit 0
3027 fi
3128
32 case "${LIVE_IMAGE_TYPE}" in
29 case "${LB_IMAGE_TYPE}" in
3330 iso)
34 IMAGE="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.iso"
31 IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
3532 ;;
3633 iso-hybrid)
37 IMAGE="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.hybrid.iso"
34 IMAGE="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.hybrid.iso"
3835 ;;
3936 *)
4037 exit 0
4441 Echo_message "Begin building onie binary..."
4542
4643 # Requiring stage file
47 Require_stagefile .build/config .build/binary_iso
44 Require_stagefiles config binary_iso
4845
4946 # Checking stage file
50 Check_stagefile .build/binary_onie
51
52 # Checking lock file
53 Check_lockfile .lock
54
55 # Creating lock file
56 Create_lockfile .lock
47 Check_stagefile
48
49 # Acquire lock file
50 Acquire_lockfile
5751
5852 Check_package host /bin/cpio cpio
5953 Check_package host /usr/bin/file file
8882 payload_sha1=%%IMAGE_SHA1%%
8983
9084 if [ "\$sha1" != "\$payload_sha1" ] ; then
91 echo
92 echo "ERROR: Unable to verify archive checksum"
93 echo "Expected: \$payload_sha1"
94 echo "Found : \$sha1"
95 exit 1
85 echo
86 echo "ERROR: Unable to verify archive checksum"
87 echo "Expected: \$payload_sha1"
88 echo "Found : \$sha1"
89 exit 1
9690 fi
9791
9892 echo " OK."
9993
10094 tmp_dir=
10195 clean_up() {
102 if [ "\$(id -u)" = "0" ] ; then
103 umount \$tmp_dir > /dev/null 2>&1
104 fi
105 rm -rf \$tmp_dir
106 exit \$1
96 if [ "\$(id -u)" = "0" ] ; then
97 umount \$tmp_dir > /dev/null 2>&1
98 fi
99 rm -rf \$tmp_dir
100 exit \$1
107101 }
108102
109103 # Untar and launch install script in a tmpfs
111105 archive_path=\$(realpath "\$0")
112106 tmp_dir=\$(mktemp -d)
113107 if [ "\$(id -u)" = "0" ] ; then
114 mount -t tmpfs tmpfs-installer \$tmp_dir || clean_up 1
108 mount -t tmpfs tmpfs-installer \$tmp_dir || clean_up 1
115109 fi
116110 cd \$tmp_dir
117111 echo -n "Preparing image archive ..."
122116 extract=no
123117 args=":x"
124118 while getopts "\$args" a ; do
125 case \$a in
126 x)
127 extract=yes
128 ;;
129 *)
130 ;;
131 esac
119 case \$a in
120 x)
121 extract=yes
122 ;;
123 *)
124 ;;
125 esac
132126 done
133127
134128 if [ "\$extract" = "yes" ] ; then
135 # stop here
136 echo "Image extracted to: \$tmp_dir"
137 if [ "\$(id -u)" = "0" ] ; then
138 echo "To un-mount the tmpfs when finished type: umount \$tmp_dir"
139 fi
140 exit 0
129 # stop here
130 echo "Image extracted to: \$tmp_dir"
131 if [ "\$(id -u)" = "0" ] ; then
132 echo "To un-mount the tmpfs when finished type: umount \$tmp_dir"
133 fi
134 exit 0
141135 fi
142136
143137 \$tmp_dir/installer/install.sh "\$@"
165159
166160 output_file="${OUT}/${IN_IMAGE}-ONIE.bin"
167161
168 echo "Creating $output_file:"
162 Echo_message "Creating $output_file:"
169163
170164 # prepare workspace
171165 [ -d $EXTRACTDIR ] && chmod +w -R $EXTRACTDIR
207201 COMPRESS="cat"
208202 ;;
209203 *)
210 echo "ERROR: Unable to detect initrd compression format."
204 echo "" #force newline
205 Echo_error "Unable to detect initrd compression format."
211206 exit 1
212207 ;;
213208 esac
226221 KERNEL='vmlinuz'
227222 IN_KERNEL=$EXTRACTDIR/live/$KERNEL
228223 [ -r $IN_KERNEL ] || {
229 echo "ERROR: Unable to find kernel in ISO: $IN_KERNEL"
230 exit 1
224 echo "" #force newline
225 Echo_error "Unable to find kernel in ISO: $IN_KERNEL"
226 exit 1
231227 }
232228 INITRD='initrd.img'
233229 IN_INITRD=$WORKDIR/$INITRD
234230 [ -r $IN_INITRD ] || {
235 echo "ERROR: Unable to find initrd in ISO: $IN_INITRD"
236 exit 1
231 echo "" #force newline
232 Echo_error "Unable to find initrd in ISO: $IN_INITRD"
233 exit 1
237234 }
238235
239236 # Note: specify kernel args you want the Debian installer to
264261
265262 # remove old partitions
266263 for p in \$(seq 3 9) ; do
267 sgdisk -d \$p /dev/vda > /dev/null 2&>1
264 sgdisk -d \$p /dev/vda > /dev/null 2&>1
268265 done
269266
270267 # bonk out on errors
278275
279276 con=''
280277 if [ -n "\$speed" ]; then
281 con="console=\$tty,\${speed}n\${bits}"
278 con="console=\$tty,\${speed}n\${bits}"
282279 else
283 con="console=\$tty"
280 con="console=\$tty"
284281 fi
285282
286283 echo "using \$con"
289286 kcmd_console=\$(echo \$kcmd_console | cut -d' ' -f2) # remove tty0
290287
291288 if [ \${kcmd_console}x != \${con}x ]; then
292 echo "WARNING: Detected console does not match boot console: \$kcmd_console != \$con"
289 echo "WARNING: Detected console does not match boot console: \$kcmd_console != \$con"
293290 fi
294291
295292 echo "Loading new kernel ..."
304301 # Repackage $INSTALLDIR into a self-extracting installer image
305302 sharch="$WORKDIR/sharch.tar"
306303 tar -C $WORKDIR -cf $sharch installer || {
307 echo "Error: Problems creating $sharch archive"
308 exit 1
304 echo "" #force newline
305 Echo_error "Problems creating $sharch archive"
306 exit 1
309307 }
310308
311309 [ -f "$sharch" ] || {
312 echo "Error: $sharch not found"
313 exit 1
310 echo "" #force newline
311 Echo_error "$sharch not found"
312 exit 1
314313 }
315314 echo -n "."
316315
318317 echo -n "."
319318
320319 cp sharch_body.sh $output_file || {
321 echo "Error: Problems copying sharch_body.sh"
322 exit 1
320 echo "" #force newline
321 Echo_error "Problems copying sharch_body.sh"
322 exit 1
323323 }
324324
325325 # Replace variables in the sharch template
334334 Echo_message "onie-installer created..."
335335
336336 # Creating stage file
337 Create_stagefile .build/binary_onie
337 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'install local packages into binary')"
17 HELP=""
17 DESCRIPTION="Install local packages into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 Echo_message "Begin installing local package lists..."
2724
2825 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap
26 Require_stagefiles config bootstrap
3027
3128 # Checking stage file
32 Check_stagefile .build/binary_package-lists
29 Check_stagefile
3330
34 # Checking lock file
35 Check_lockfile .lock
31 # Acquire lock file
32 Acquire_lockfile
3633
37 # Creating lock file
38 Create_lockfile .lock
39
40 case "${LB_MODE}" in
41 progress-linux)
42 DISTS="installer/dists"
43 POOL="installer/pool"
44 ;;
45
46 *)
47 DISTS="dists"
48 POOL="pool"
49 ;;
50 esac
34 DISTS="dists"
35 POOL="pool"
5136
5237 if ls config/package-lists/*.list > /dev/null 2>&1 || \
5338 ls config/package-lists/*.list.binary > /dev/null 2>&1
5742 Check_package chroot /usr/bin/grep-aptavail dctrl-tools
5843
5944 # Restoring cache
60 Restore_cache cache/packages.chroot
45 Restore_package_cache chroot
6146
6247 # Installing depends
63 Install_package
48 Install_packages
6449
6550 if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
6651 then
8065 Expand_packagelist "${LIST}" "config/package-lists" > chroot/root/"$(basename ${LIST})"
8166
8267 # Downloading additional packages
83 Chroot chroot "xargs --no-run-if-empty --arg-file=/root/$(basename ${LIST}) apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb -o Dir::State::status=/dev/null --download-only install"
68 Chroot chroot "xargs --no-run-if-empty --arg-file=/root/$(basename ${LIST}) apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb -o Dir::State::status=/dev/null -o Debug::NoLocking=true --download-only install"
8469
8570 # Remove package list
8671 rm chroot/root/"$(basename ${LIST})"
128113 mv "${FILE}" binary/${POOL}/${SECTION}/"${LETTER}"/"${SOURCE}"
129114 done
130115
131 if [ -e chroot/etc/os-release ]
132 then
133 _VERSION="$(. chroot/etc/os-release && echo ${VERSION_ID})"
134 fi
116 if [ -e chroot/etc/os-release ]; then
117 _VERSION="$(. chroot/etc/os-release && echo ${VERSION_ID})"
118 fi
135119
136 if [ -n "${_VERSION}" ]; then
137 _LB_APT_VERSION_OPT='-o APT::FTPArchive::Release::Version="'"${_VERSION}"'"'
138 fi
120 if [ -n "${_VERSION}" ]; then
121 _LB_APT_VERSION_OPT='-o APT::FTPArchive::Release::Version="'"${_VERSION}"'"'
122 fi
139123
140124 cd binary
141125
147131
148132 SECTION="$(basename ${SECTION})"
149133
150 mkdir -p ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}
151 apt-ftparchive packages ${POOL}/${SECTION} > ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages
152 gzip -9 -c ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages > ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURES}/Packages.gz
134 mkdir -p ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURE}
135 apt-ftparchive packages ${POOL}/${SECTION} > ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURE}/Packages
136 gzip -9 -c ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURE}/Packages > ${DISTS}/${LB_PARENT_DISTRIBUTION_BINARY}/${SECTION}/binary-${LB_ARCHITECTURE}/Packages.gz
153137 done
154138
155139 if [ -d dists/${LB_PARENT_DISTRIBUTION_BINARY} ]; then
160144 ${_LB_APT_VERSION_OPT} \
161145 -o APT::FTPArchive::Release::Codename="${LB_PARENT_DISTRIBUTION_BINARY}" \
162146 -o APT::FTPArchive::Release::Date="$(date -R)" \
163 -o APT::FTPArchive::Release::Architectures="${LB_ARCHITECTURES}" \
147 -o APT::FTPArchive::Release::Architectures="${LB_ARCHITECTURE}" \
164148 -o APT::FTPArchive::Release::Components="${LB_PARENT_ARCHIVE_AREAS}" \
165149 -o APT::FTPArchive::Release::Description="Last updated: $(date -R)" \
166150 release dists/${LB_PARENT_DISTRIBUTION_BINARY} \
174158 rm -rf chroot/binary.deb
175159
176160 # Removing depends
177 Remove_package
161 Remove_packages
178162
179163 # Saving cache
180 Save_cache cache/packages.chroot
164 Save_package_cache chroot
165 fi
181166
182 # Creating stage file
183 Create_stagefile .build/binary_package-lists
184 fi
167 # Creating stage file
168 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'build rootfs image')"
17 HELP=""
17 DESCRIPTION="Build rootfs image"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 Echo_message "Begin building root filesystem image..."
2724
2825 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap .build/binary_chroot
26 Require_stagefiles config bootstrap binary_chroot
3027
3128 # Checking stage file
32 Check_stagefile .build/binary_rootfs
33
34 # Checking lock file
35 Check_lockfile .lock
36
37 # Creating lock file
38 Create_lockfile .lock
39
40 case "${LB_ARCHITECTURES}" in
29 Check_stagefile
30
31 # Acquire lock file
32 Acquire_lockfile
33
34 case "${LB_ARCHITECTURE}" in
4135 amd64|i386)
4236 LINUX="vmlinuz"
4337 ;;
4438
45 powerpc)
39 powerpc|ppc64el)
4640 LINUX="vmlinux"
4741 ;;
4842 esac
6054 # Creating directory
6155 mkdir -p binary/${INITFS}
6256
63 for STAGE in ${LB_CACHE_STAGES}
64 do
65 if [ "${STAGE}" = "rootfs" ] && [ -d cache/binary_rootfs ]
66 then
67 # Removing old chroot
68 rm -rf binary/"${INITFS}"/filesystem.*
69
70 # Restoring old cache
71 mkdir -p binary/"${INITFS}"
72 cp -a cache/binary_rootfs/filesystem.* binary/"${INITFS}"
73
74 # Creating stage file
75 Create_stagefile .build/binary_rootfs
76 exit 0
77 fi
78 done
57 if In_list "rootfs" ${LB_CACHE_STAGES} && [ -d cache/binary_rootfs ]
58 then
59 # Removing old chroot
60 rm -rf binary/"${INITFS}"/filesystem.*
61
62 # Restoring old cache
63 mkdir -p binary/"${INITFS}"
64 cp -a cache/binary_rootfs/filesystem.* binary/"${INITFS}"
65
66 # Creating stage file
67 Create_stagefile
68 exit 0
69 fi
7970
8071 case "${LB_CHROOT_FILESYSTEM}" in
8172 ext2|ext3|ext4)
8374 Check_package chroot /sbin/mkfs.${LB_CHROOT_FILESYSTEM} e2fsprogs
8475
8576 # Restoring cache
86 Restore_cache cache/packages.binary
77 Restore_package_cache binary
8778
8879 # Installing depends
89 Install_package
80 Install_packages
9081
9182 # Remove old image
9283 if [ -f binary/${INITFS}/filesystem.${LB_CHROOT_FILESYSTEM} ]
113104 true)
114105 dd if=/dev/zero of=chroot/filesystem.${LB_CHROOT_FILESYSTEM} bs=1024k count=0 seek=${REAL_DIM}
115106
107 FAKE_MTAB=false
116108 if ! Chroot chroot "test -s /etc/mtab"
117109 then
118110 Chroot chroot "ln -s /proc/mounts/mtab /etc/mtab"
119 FAKE_MTAB="true"
111 FAKE_MTAB=true
120112 fi
121113
122114 Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -N ${REAL_INODES} -m 0 filesystem.${LB_CHROOT_FILESYSTEM}"
125117 mount -o loop chroot/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
126118 cp -a chroot/chroot/* filesystem.tmp
127119
128 if [ "${FAKE_MTAB}" = "true" ]
129 then
120 if $FAKE_MTAB; then
130121 Chroot chroot "rm -f /etc/mtab"
131122 fi
132123
140131
141132 if [ -e chroot/chroot.cache ]
142133 then
143 rm -f .lock
134 Remove_lockfile
144135 mv chroot/chroot chroot.tmp
145136
146 lb chroot_archives binary remove ${@}
147 lb chroot_apt remove ${@}
148 lb chroot_hostname remove ${@}
149 lb chroot_resolv remove ${@}
150 lb chroot_hosts remove ${@}
151 lb chroot_sysv-rc remove ${@}
152 lb chroot_dpkg remove ${@}
153 lb chroot_debianchroot remove ${@}
154 lb chroot_sysfs remove ${@}
155 lb chroot_selinuxfs remove ${@}
156 lb chroot_proc remove ${@}
157 lb chroot_devpts remove ${@}
137 lb chroot_prep remove all mode-archives-binary "${@}"
158138
159139 rm -rf chroot
160140 mv chroot.tmp chroot
161141
162 lb chroot_devpts install ${@}
163 lb chroot_proc install ${@}
164 lb chroot_selinuxfs install ${@}
165 lb chroot_sysfs install ${@}
166 lb chroot_debianchroot install ${@}
167 lb chroot_dpkg install ${@}
168 lb chroot_sysv-rc install ${@}
169 lb chroot_hosts install ${@}
170 lb chroot_resolv install ${@}
171 lb chroot_hostname install ${@}
172 lb chroot_apt install ${@}
173 lb chroot_archives binary install ${@}
142 lb chroot_prep install all mode-archives-binary "${@}"
174143
175144 touch .lock
176145 else
177146 rm -rf chroot/chroot
178147
179148 # Removing depends
180 Remove_package
149 Remove_packages
181150 fi
182151 ;;
183152
195164 esac
196165
197166 # Saving cache
198 Save_cache cache/packages.binary
167 Save_package_cache binary
199168 ;;
200169
201170 jffs2)
203172 Check_package chroot /usr/sbin/mkfs.jffs2 mtd-tools
204173
205174 # Restoring cache
206 Restore_cache cache/packages.binary
175 Restore_package_cache binary
207176
208177 # Installing depends
209 Install_package
178 Install_packages
210179
211180 # Remove old jffs2 image
212181 if [ -f binary/${INITFS}/filesystem.jffs2 ]
228197
229198 if [ -e chroot/chroot.cache ]
230199 then
231 rm -f .lock
200 Remove_lockfile
232201 mv chroot/chroot chroot.tmp
233202
234 lb chroot_archives binary remove ${@}
235 lb chroot_apt remove ${@}
236 lb chroot_hostname remove ${@}
237 lb chroot_resolv remove ${@}
238 lb chroot_hosts remove ${@}
239 lb chroot_sysv-rc remove ${@}
240 lb chroot_dpkg remove ${@}
241 lb chroot_debianchroot remove ${@}
242 lb chroot_sysfs remove ${@}
243 lb chroot_selinuxfs remove ${@}
244 lb chroot_proc remove ${@}
245 lb chroot_devpts remove ${@}
203 lb chroot_prep remove all mode-archives-binary "${@}"
246204
247205 rm -rf chroot
248206 mv chroot.tmp chroot
249207
250 lb chroot_devpts install ${@}
251 lb chroot_proc install ${@}
252 lb chroot_selinuxfs install ${@}
253 lb chroot_sysfs install ${@}
254 lb chroot_debianchroot install ${@}
255 lb chroot_dpkg install ${@}
256 lb chroot_sysv-rc install ${@}
257 lb chroot_hosts install ${@}
258 lb chroot_resolv install ${@}
259 lb chroot_hostname install ${@}
260 lb chroot_apt install ${@}
261 lb chroot_archives binary install ${@}
208 lb chroot_prep install all mode-archives-binary "${@}"
262209
263210 touch .lock
264211 else
265212 rm -rf chroot/chroot
266213
267214 # Removing depends
268 Remove_package
215 Remove_packages
269216 fi
270217 ;;
271218
275222 esac
276223
277224 # Saving cache
278 Save_cache cache/packages.binary
225 Save_package_cache binary
279226 ;;
280227
281228 plain)
300247 Check_package chroot /usr/share/doc/squashfs-tools squashfs-tools
301248
302249 # Restoring cache
303 Restore_cache cache/packages.binary
250 Restore_package_cache binary
304251
305252 # Installing depends
306 Install_package
253 Install_packages
307254
308255 Echo_message "Preparing squashfs image..."
309256 Echo_message "This may take a while."
317264 # Remove stale squashfs image
318265 rm -f chroot/filesystem.squashfs
319266
320 MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -no-progress"
267 if [ "${_QUIET}" = "true" ]
268 then
269 MKSQUASHFS_OPTIONS="-no-progress ${MKSQUASHFS_OPTIONS}"
270 fi
321271
322272 if [ "${_VERBOSE}" = "true" ]
323273 then
324 MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -info"
274 MKSQUASHFS_OPTIONS="-info ${MKSQUASHFS_OPTIONS}"
325275 fi
326276
327277 if [ -f config/rootfs/squashfs.sort ]
328278 then
329 MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -sort squashfs.sort"
279 MKSQUASHFS_OPTIONS="-sort squashfs.sort ${MKSQUASHFS_OPTIONS}"
330280
331281 case "${LB_BUILD_WITH_CHROOT}" in
332282 true)
333 cp config/rootfs/squashfs.sort chroot
283 cp -a config/rootfs/squashfs.sort chroot
334284 ;;
335285
336286 false)
337 cp config/rootfs/squashfs.sort .
287 cp -a config/rootfs/squashfs.sort .
338288 ;;
339289 esac
340290 fi
341291
342 MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -comp xz"
292 # Set squashfs compression type or default to xz
293 if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE}" ]
294 then
295 MKSQUASHFS_OPTIONS="-comp ${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE} ${MKSQUASHFS_OPTIONS}"
296 else
297 MKSQUASHFS_OPTIONS="-comp xz ${MKSQUASHFS_OPTIONS}"
298 fi
299
300 if [ -n "${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL}" ]
301 then
302 MKSQUASHFS_OPTIONS="-Xcompression-level ${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL} ${MKSQUASHFS_OPTIONS}"
303 fi
343304
344305 case "${LB_BUILD_WITH_CHROOT}" in
345306 true)
346307 if [ -e config/rootfs/excludes ]
347308 then
348 cp config/rootfs/excludes chroot/excludes
349
350 MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef /excludes"
309 cp -a config/rootfs/excludes chroot/excludes
310
311 MKSQUASHFS_OPTIONS="-wildcards -ef /excludes ${MKSQUASHFS_OPTIONS}"
351312 fi
352313
353314 # Create image
354 Chroot chroot "nice -n 19 mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}"
355
356 rm -f chroot/chroot/excludes
315 Chroot chroot "nice -n 17 mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}"
316
317 rm -f chroot/excludes
357318
358319 du -B 1 -s chroot/chroot | cut -f1 > binary/${INITFS}/filesystem.size
359320
363324
364325 if [ -e chroot/chroot.cache ]
365326 then
366 rm -f .lock
327 Remove_lockfile
367328 mv chroot/chroot chroot.tmp
368329
369 lb chroot_archives binary remove ${@}
370 lb chroot_apt remove ${@}
371 lb chroot_hostname remove ${@}
372 lb chroot_resolv remove ${@}
373 lb chroot_hosts remove ${@}
374 lb chroot_sysv-rc remove ${@}
375 lb chroot_dpkg remove ${@}
376 lb chroot_debianchroot remove ${@}
377 lb chroot_sysfs remove ${@}
378 lb chroot_selinuxfs remove ${@}
379 lb chroot_proc remove ${@}
380 lb chroot_devpts remove ${@}
330 lb chroot_prep remove all mode-archives-binary "${@}"
381331
382332 rm -rf chroot
383333 mv chroot.tmp chroot
384334
385 lb chroot_devpts install ${@}
386 lb chroot_proc install ${@}
387 lb chroot_selinuxfs install ${@}
388 lb chroot_sysfs install ${@}
389 lb chroot_debianchroot install ${@}
390 lb chroot_dpkg install ${@}
391 lb chroot_sysv-rc install ${@}
392 lb chroot_hosts install ${@}
393 lb chroot_resolv install ${@}
394 lb chroot_hostname install ${@}
395 lb chroot_apt install ${@}
396 lb chroot_archives binary install ${@}
335 lb chroot_prep install all mode-archives-binary "${@}"
397336
398337 touch .lock
399338 else
400339 rm -rf chroot/chroot
401340
402341 # Removing depends
403 Remove_package
404 fi
405
406 chmod 0644 binary/${INITFS}/filesystem.squashfs
342 Remove_packages
343 fi
407344 ;;
408345
409346 false)
410347 if [ -e config/rootfs/excludes ]
411348 then
412 MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef config/rootfs/excludes"
349 MKSQUASHFS_OPTIONS="-wildcards -ef config/rootfs/excludes ${MKSQUASHFS_OPTIONS}"
413350 fi
414351
415352 nice -n 19 mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS}
418355 ;;
419356 esac
420357
358 chmod 0644 binary/${INITFS}/filesystem.squashfs
359
421360 # Saving cache
422 Save_cache cache/packages.binary
361 Save_package_cache binary
423362 ;;
424363
425364 none)
442381
443382 esac
444383
445 for STAGE in ${LB_CACHE_STAGES}
446 do
447 if [ "${STAGE}" = "rootfs" ]
384 if In_list "rootfs" ${LB_CACHE_STAGES}
385 then
386 rm -rf cache/binary_rootfs
387
388 mkdir -p cache/binary_rootfs
389
390 if [ "${LB_CHROOT_FILESYSTEM}" != "none" ]
448391 then
449 rm -rf cache/binary_rootfs
450
451 mkdir -p cache/binary_rootfs
452
453 if [ "${LB_CHROOT_FILESYSTEM}" != "none" ]
454 then
455 cp -a binary/"${INITFS}"/filesystem.* cache/binary_rootfs
456 fi
392 cp -a binary/"${INITFS}"/filesystem.* cache/binary_rootfs
457393 fi
458 done
394 fi
459395
460396 # Creating stage file
461 Create_stagefile .build/binary_rootfs
397 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'installs syslinux into binary')"
17 HELP=""
17 DESCRIPTION="Installs syslinux into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 Check_Any_Bootloader_Role "syslinux"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 if [ "${LB_BOOTLOADER_BIOS}" != "syslinux" ]; then
24 exit 0
25 fi
2726
2827 Echo_message "Begin installing syslinux..."
2928
3029 # Requiring stage file
31 Require_stagefile .build/config .build/bootstrap
30 Require_stagefiles config bootstrap
3231
3332 # Checking stage file
34 Check_stagefile .build/binary_syslinux
35
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
33 Check_stagefile
34
35 # Acquire lock file
36 Acquire_lockfile
4137
4238 # Check architecture
4339 Check_architectures amd64 i386
4440 Check_crossarchitectures
4541
4642 case "${LB_INITRAMFS}" in
43 live-boot)
44 _INITRAMFS="live"
45 ;;
4746 *)
48 _INITRAMFS="live"
47 _INITRAMFS="boot"
4948 ;;
5049 esac
5150
5251 # Assembling image specifics
53 case "${LIVE_IMAGE_TYPE}" in
54 iso*)
52 case "${LB_IMAGE_TYPE}" in
53 iso|iso-hybrid)
5554 _BOOTLOADER="isolinux"
56
57 case "${LB_MODE}" in
58 progress-linux)
59 _TARGET="binary/boot"
60 ;;
61
62 *)
63 _TARGET="binary/isolinux"
64 ;;
65 esac
55 _TARGET="binary/isolinux"
6656 ;;
6757
6858 netboot)
7060 _TARGET="tftpboot"
7161 ;;
7262
73 hdd*|*)
63 hdd|tar)
7464 case ${LB_BINARY_FILESYSTEM} in
7565 fat*|ntfs)
76 _BOOTLOADER=syslinux
77
78 case "${LB_MODE}" in
79 progress-linux)
80 _TARGET="binary/boot"
81 ;;
82
83 *)
84 _TARGET="binary/syslinux"
85 ;;
86 esac
66 _BOOTLOADER="syslinux"
67 _TARGET="binary/syslinux"
8768 ;;
8869
8970 ext[234]|btrfs)
90 _BOOTLOADER=extlinux
71 _BOOTLOADER="extlinux"
9172 _TARGET="binary/boot/extlinux"
9273 ;;
9374 *)
9879 ;;
9980 esac
10081
101 if [ -e "config/bootloaders/${_BOOTLOADER}" ]
102 then
103 # Internal local copy
104 _SOURCE="config/bootloaders/${_BOOTLOADER}"
82 # User config replacement/additional files
83 _SOURCE_USER="config/bootloaders/${_BOOTLOADER}"
84 _SOURCE_USER_COMMON="config/bootloaders/syslinux_common"
85
86 if [ -n "${LIVE_BUILD}" ]; then
87 _SOURCE="${LIVE_BUILD}/share/bootloaders/${_BOOTLOADER}"
88 _SOURCE_COMMON="${LIVE_BUILD}/share/bootloaders/syslinux_common"
10589 else
106 # Internal system copy
107 if [ -n "${LIVE_BUILD}" ]
108 then
109 _SOURCE="${LIVE_BUILD}/share/bootloaders/${_BOOTLOADER}"
110 else
111 _SOURCE="/usr/share/live/build/bootloaders/${_BOOTLOADER}"
112 fi
90 _SOURCE="/usr/share/live/build/bootloaders/${_BOOTLOADER}"
91 _SOURCE_COMMON="/usr/share/live/build/bootloaders/syslinux_common"
11392 fi
11493
11594 # Checking depends
11695 Check_package chroot /usr/lib/$(echo ${_BOOTLOADER} | tr [a-z] [A-Z]) ${_BOOTLOADER}
11796 Check_package chroot /usr/lib/syslinux syslinux-common
118
119 if ls "${_SOURCE}"/*.svg* > /dev/null 2>&1
120 then
121 Check_package chroot /usr/bin/rsvg-convert librsvg2-bin
122 fi
97 Check_package chroot /usr/bin/rsvg-convert librsvg2-bin
12398
12499 # Restoring cache
125 Restore_cache cache/packages.binary
100 Restore_package_cache binary
126101
127102 # Installing depends
128 Install_package
103 Install_packages
104
105 # Ensure fresh
106 rm -rf ${_TARGET}
107 mkdir -p ${_TARGET}
129108
130109 # Copying files
131110 case "${LB_BUILD_WITH_CHROOT}" in
132111 true)
133 mkdir -p ${_TARGET}
112 # Ensure fresh
113 rm -rf chroot/root/${_BOOTLOADER}
114 rm -rf chroot/root/${_BOOTLOADER}.tmp
115 mkdir -p chroot/root/${_BOOTLOADER}
134116
135117 # Copy in two steps since the theme can have absolute symlinks and would therefore not be dereferenced correctly
136 cp -a ${_SOURCE} chroot/root
137 Chroot chroot cp -aL /root/$(basename ${_SOURCE}) /root/$(basename ${_SOURCE}).tmp > /dev/null 2>&1 || true
138 cp -a chroot/root/$(basename ${_SOURCE}).tmp/* ${_TARGET}
139 rm -rf chroot/root/$(basename ${_SOURCE}) chroot/root/$(basename ${_SOURCE}).tmp
118 cp -a ${_SOURCE_COMMON}/* chroot/root/${_BOOTLOADER}/
119 cp -af ${_SOURCE}/* chroot/root/${_BOOTLOADER}/
120 if [ -e "${_SOURCE_USER_COMMON}" ]; then
121 cp -af ${_SOURCE_USER_COMMON}/* chroot/root/${_BOOTLOADER}/
122 fi
123 if [ -e "${_SOURCE_USER}" ]; then
124 cp -af ${_SOURCE_USER}/* chroot/root/${_BOOTLOADER}/
125 fi
126 Chroot chroot cp -aL /root/${_BOOTLOADER} /root/${_BOOTLOADER}.tmp > /dev/null 2>&1 || true
127 cp -a chroot/root/${_BOOTLOADER}.tmp/* ${_TARGET}
128 rm -rf chroot/root/${_BOOTLOADER} chroot/root/${_BOOTLOADER}.tmp
140129 ;;
141130
142131 false)
143 mkdir -p ${_TARGET}
144
145 cp -aL ${_SOURCE}/* ${_TARGET} > /dev/null 2>&1 || true
132 cp -aL ${_SOURCE_COMMON}/* ${_TARGET} > /dev/null 2>&1 || true
133 cp -aLf ${_SOURCE}/* ${_TARGET} > /dev/null 2>&1 || true
134 if [ -e "${_SOURCE_USER_COMMON}" ]; then
135 cp -aLf ${_SOURCE_USER_COMMON}/* ${_TARGET} > /dev/null 2>&1 || true
136 fi
137 if [ -e "${_SOURCE_USER}" ]; then
138 cp -aLf ${_SOURCE_USER}/* ${_TARGET} > /dev/null 2>&1 || true
139 fi
146140 ;;
147141 esac
142
143 # Use correct install menu set
144 if [ "${LB_DEBIAN_INSTALLER_GUI}" = "true" ]; then
145 rm "${_TARGET}"/install_text.cfg
146 mv "${_TARGET}"/install_gui.cfg "${_TARGET}"/install.cfg
147 else
148 rm "${_TARGET}"/install_gui.cfg
149 mv "${_TARGET}"/install_text.cfg "${_TARGET}"/install.cfg
150 fi
151 # Move user advanced.cfg to utilities.cfg for backwards compatibility
152 if [ -e "${_TARGET}"/advanced.cfg ]; then
153 mv -f "${_TARGET}"/advanced.cfg "${_TARGET}"/utilities.cfg
154 fi
148155
149156 # Configuring files
150157 if [ -e "${_TARGET}/live.cfg.in" ]
154161
155162 case "${_FLAVOURS}" in
156163 1)
164 # Rename kernel files
157165 # If multiple initrd images are being generated (by DKMS packages, etc),
158166 # we likely only want the latest version.
159 ln $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-* | head -n 1) binary/${_INITRAMFS}/vmlinuz
160 ln $(ls -r1 --sort=version binary/${_INITRAMFS}/initrd.img-* | head -n 1) binary/${_INITRAMFS}/initrd.img
167 ln -f $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-* | head -n 1) binary/${_INITRAMFS}/vmlinuz
168 ln -f $(ls -r1 --sort=version binary/${_INITRAMFS}/initrd.img-* | head -n 1) binary/${_INITRAMFS}/initrd.img
161169
162170 sed -e "s|@FLAVOUR@|${LB_LINUX_FLAVOURS}|g" \
163171 -e "s|@LINUX@|/${_INITRAMFS}/vmlinuz|g" \
174182 do
175183 _NUMBER="$((${_NUMBER} + 1))"
176184
177 ln binary/${_INITRAMFS}/vmlinuz-*-${_FLAVOUR} binary/${_INITRAMFS}/vmlinuz${_NUMBER}
178 ln binary/${_INITRAMFS}/initrd.img-*-${_FLAVOUR} binary/${_INITRAMFS}/initrd${_NUMBER}.img
185 # Rename kernel files
186 # If multiple initrd images are being generated (by DKMS packages, etc),
187 # we likely only want the latest version.
188 ln -f $(ls -r1 --sort=version binary/${_INITRAMFS}/vmlinuz-*-${_FLAVOUR} | head -n 1) binary/${_INITRAMFS}/vmlinuz${_NUMBER}
189 ln -f $(ls -r1 --sort=version binary/${_INITRAMFS}/initrd.img-*-${_FLAVOUR} | head -n 1) binary/${_INITRAMFS}/initrd${_NUMBER}.img
179190
180191 if [ "${_NUMBER}" -gt 1 ]
181192 then
204215 _VERSION="${_VERSION:-none}"
205216
206217 _DISTRIBUTION="${LB_DISTRIBUTION_BINARY}"
207 _ARCHITECTURE="${LB_ARCHITECTURES}"
208
209 _DATE=$(date -R)
210 _YEAR="$(date +%Y)"
211 _MONTH="$(date +%m)"
212 _DAY="$(date +%d)"
213 _HOUR="$(date +%H)"
214 _MINUTE="$(date +%M)"
215 _SECOND="$(date +%S)"
218
219 _DATE="$(date $DATE_UTC_OPTION -R -d@${SOURCE_DATE_EPOCH})"
220 _YEAR="$(date $DATE_UTC_OPTION -d "${_DATE}" +%Y)"
221 _MONTH="$(date $DATE_UTC_OPTION -d "${_DATE}" +%m)"
222 _DAY="$(date $DATE_UTC_OPTION -d "${_DATE}" +%d)"
223 _HOUR="$(date $DATE_UTC_OPTION -d "${_DATE}" +%H)"
224 _MINUTE="$(date $DATE_UTC_OPTION -d "${_DATE}" +%M)"
225 _SECOND="$(date $DATE_UTC_OPTION -d "${_DATE}" +%S)"
226 _TIMEZONE="$(date $DATE_UTC_OPTION -d "${_DATE}" +%Z)"
227 _TIMEZONE_NUM="$(date $DATE_UTC_OPTION -d "${_DATE}" +%z)"
216228
217229 _LINUX_VERSIONS="$(for _LINUX in chroot/boot/vmlinuz-* ; do chroot chroot apt-cache policy $(basename ${_LINUX} | sed -e 's|vmlinuz-|linux-image-|') | awk '/Installed: / { print $2 }' ; done | sort -Vru | tr "\n" " ")"
218230
219 _LIVE_BUILD_VERSION="$(lb --version)"
220231 _LIVE_BOOT_VERSION="$(chroot chroot apt-cache policy live-boot | awk '/Installed: / { print $2 }')"
221232 _LIVE_CONFIG_VERSION="$(chroot chroot apt-cache policy live-config | awk '/Installed: / { print $2 }')"
222233 _LIVE_TOOLS_VERSION="$(chroot chroot apt-cache policy live-tools | awk '/Installed: / { print $2 }')"
223234
224 case "${LB_MODE}" in
225 progress-linux)
226 _PROJECT="Progress Linux"
227 ;;
228
229 *)
230 _PROJECT="Debian GNU/Linux"
231 ;;
232 esac
235 _PROJECT="Debian GNU/Linux"
233236
234237 for _FILE in "${_TARGET}"/*.cfg ${_TARGET}/*.svg
235238 do
238241 sed -i -e "s#@APPEND_LIVE@#${LB_BOOTAPPEND_LIVE}#g" \
239242 -e "s#@APPEND_LIVE_FAILSAFE@#${LB_BOOTAPPEND_LIVE_FAILSAFE}#g" \
240243 -e "s#@APPEND_INSTALL@#${LB_BOOTAPPEND_INSTALL}#g" \
241 -e "s#@APPEND_INSTALL_FAILSAFE@#${LB_BOOTAPPEND_INSTALL_FAILSAFE}#g" \
242244 -e "s|@PROJECT@|${_PROJECT}|g" \
243245 -e "s|@DISTRIBUTION@|${_DISTRIBUTION}|g" \
244246 -e "s|@PARENT_DISTRIBUTION@|${LB_PARENT_DISTRIBUTION_BINARY}|g" \
245247 -e "s|@VERSION@|${_VERSION}|g" \
246 -e "s|@ARCHITECTURE@|${_ARCHITECTURE}|g" \
248 -e "s|@ARCHITECTURE@|${LB_ARCHITECTURE}|g" \
247249 -e "s|@DATE@|${_DATE}|g" \
248250 -e "s|@YEAR@|${_YEAR}|g" \
249251 -e "s|@MONTH@|${_MONTH}|g" \
251253 -e "s|@HOUR@|${_HOUR}|g" \
252254 -e "s|@MINUTE@|${_MINUTE}|g" \
253255 -e "s|@SECOND@|${_SECOND}|g" \
256 -e "s|@TIMEZONE@|${_TIMEZONE}|g" \
257 -e "s|@TIMEZONE_NUM@|${_TIMEZONE_NUM}|g" \
254258 -e "s|@LINUX_VERSIONS@|${_LINUX_VERSIONS}|g" \
255 -e "s|@LIVE_BUILD_VERSION@|${_LIVE_BUILD_VERSION}|g" \
259 -e "s|@LIVE_BUILD_VERSION@|${LIVE_BUILD_VERSION}|g" \
256260 -e "s|@LIVE_BOOT_VERSION@|${_LIVE_BOOT_VERSION}|g" \
257261 -e "s|@LIVE_CONFIG_VERSION@|${_LIVE_CONFIG_VERSION}|g" \
258262 -e "s|@LIVE_TOOLS_VERSION@|${_LIVE_TOOLS_VERSION}|g" \
260264 fi
261265 done
262266
263 if [ -e "${_TARGET}/splash.svg" ]
267 KERNEL_DI="/install/vmlinuz"
268 INITRD_DI="/install/initrd.gz"
269 KERNEL_GI="/install/gtk/vmlinuz"
270 INITRD_GI="/install/gtk/initrd.gz"
271
272 sed -i \
273 -e "s|@KERNEL_GI@|${KERNEL_GI}|" \
274 -e "s|@INITRD_GI@|${INITRD_GI}|" \
275 -e "s|@KERNEL_DI@|${KERNEL_DI}|" \
276 -e "s|@INITRD_DI@|${INITRD_DI}|" \
277 "${_TARGET}"/install.cfg
278
279 MEMTEST_PATH="${_INITRAMFS}/memtest"
280 sed -i -e "s#@MEMTEST_VERSION@#${LB_MEMTEST}#g" -e "s#@MEMTEST@#/${MEMTEST_PATH}#g" "${_TARGET}"/memtest.cfg
281
282 # Replace placeholder for optional install menu entries include
283 if [ "${LB_DEBIAN_INSTALLER}" = "none" ]; then
284 rm -f "${_TARGET}"/install.cfg
285 sed -i "/@OPTIONAL_INSTALLER_INCLUDE@/d" "${_TARGET}"/menu.cfg
286 else
287 sed -i "s#@OPTIONAL_INSTALLER_INCLUDE@#include install.cfg#g" "${_TARGET}"/menu.cfg
288 fi
289
290 # Replace placeholder for optional memtest menu entry include
291 if [ ! -f "binary/${MEMTEST_PATH}" ]; then
292 rm -f "${_TARGET}"/memtest.cfg
293 sed -i -e "/@OPTIONAL_MEMTEST_INCLUDE@/d" "${_TARGET}"/utilities.cfg
294 else
295 sed -i -e "s#@OPTIONAL_MEMTEST_INCLUDE@#include memtest.cfg#g" "${_TARGET}"/utilities.cfg
296 fi
297
298 if [ -e "${_TARGET}/splash.svg" ] && [ ! -e "${_TARGET}/splash.png" ]
264299 then
265300 case "${LB_BUILD_WITH_CHROOT}" in
266301 true)
274309 rsvg-convert --format png --height 480 --width 640 "${_TARGET}/splash.svg" -o "${_TARGET}/splash.png"
275310 ;;
276311 esac
277
278 rm -f "${_TARGET}/splash.svg"
279 fi
312 fi
313 rm -f "${_TARGET}/splash.svg"
280314
281315 # Tweak the grub theme to reuse the syslinux background image
282316 if [ -e binary/boot/grub/live-theme/theme.txt ]; then
283 sed -i -e 's|^desktop-image:.*|desktop-image: "/isolinux/splash.png"|' \
317 sed -i -e 's|^desktop-image:.*|desktop-image: "/isolinux/splash.png"|' \
284318 -e 's|^title-text:.*|title-text: ""|' \
285319 binary/boot/grub/live-theme/theme.txt
286320 fi
287
288 case "${LB_MODE}" in
289 progress-linux)
290 for _FILE in "${_TARGET}/isolinux.bin" "${_TARGET}/isolinux.cfg" "${_TARGET}/syslinux.cfg"
291 do
292 if [ -e "${_FILE}" ]
293 then
294 mv "${_FILE}" "${_TARGET}/$(echo ${_FILE} | sed -e 's|.*linux|boot|')"
295 fi
296 done
297 ;;
298 esac
299321
300322 case "${LB_BUILD_WITH_CHROOT}" in
301323 true)
302324 # Saving cache
303 Save_cache cache/packages.binary
325 Save_package_cache binary
304326
305327 # Removing depends
306 Remove_package
328 Remove_packages
307329 ;;
308330 esac
309331
310332 # Creating stage file
311 Create_stagefile .build/binary_syslinux
333 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'build binary tarball')"
17 HELP=""
17 DESCRIPTION="Build binary tarball"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 if ! In_list tar "${LIVE_IMAGE_TYPE}"
27 then
23 if [ "${LB_IMAGE_TYPE}" != "tar" ]; then
2824 exit 0
2925 fi
3026
3127 Echo_message "Begin building binary tarball..."
3228
3329 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
30 Require_stagefiles config bootstrap
3531
3632 # Checking stage file
37 Check_stagefile .build/binary_tar
33 Check_stagefile
3834
39 # Checking lock file
40 Check_lockfile .lock
41
42 # Creating lock file
43 Create_lockfile .lock
35 # Acquire lock file
36 Acquire_lockfile
4437
4538 # Remove old binary
46 rm -f ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.bz2 ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.gz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.lz ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar
39 rm -f ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.bz2 ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.gz ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.lz ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar
4740
48 tar cf ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.tar binary
41 tar cf ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar binary
4942
5043 case "${LB_COMPRESSION}" in
5144 bzip2)
52 bzip2 ${BZIP2_OPTIONS} ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.tar
45 bzip2 ${BZIP2_OPTIONS} ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar
5346 ;;
5447
5548 gzip)
56 gzip ${GZIP_OPTIONS} ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.tar
49 gzip ${GZIP_OPTIONS} ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar
5750 ;;
5851
5952 lzip)
60 lzip ${LZIP_OPTIONS} ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.tar
53 lzip ${LZIP_OPTIONS} ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar
6154 ;;
6255
6356 xz)
64 xz ${XZ_OPTIONS} ${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar.tar
57 xz ${XZ_OPTIONS} ${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar.tar
6558 ;;
6659
6760 none)
6962 esac
7063
7164 # Creating stage file
72 Create_stagefile .build/binary_tar
65 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'copy win32-loader into binary')"
17 HELP=""
17 DESCRIPTION="Copy win32-loader into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_WIN32_LOADER}" != "true" ]
2724 then
3128 Echo_message "Begin copying win32-loader..."
3229
3330 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3532
3633 # Checking stage file
37 Check_stagefile .build/binary_win32-loader
34 Check_stagefile
3835
39 # Checking lock file
40 Check_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
42 # Creating lock file
43 Create_lockfile .lock
39 RUN_LABEL="Run Debian GNU/Linux"
4440
45 case "${LB_MODE}" in
46 progress-linux)
47 RUN_LABEL="Run Progress Linux"
48 ;;
49
50 *)
51 RUN_LABEL="Run Debian GNU/Linux"
52 ;;
53 esac
54
55 case "${LB_ARCHITECTURES}" in
41 case "${LB_ARCHITECTURE}" in
5642 amd64|i386)
5743 # Checking depends
5844 Check_package chroot /usr/share/win32/win32-loader.exe win32-loader
5945
6046 # Restoring cache
61 Restore_cache cache/packages.binary
47 Restore_package_cache binary
6248
6349 # Installing depends
64 Install_package
50 Install_packages
6551
6652 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]
6753 then
6854 # Copying win32-loader
69 cp -r chroot/usr/share/win32/* binary
55 cp -a chroot/usr/share/win32/* binary
7056 else
71 cp -r usr/share/win32/* binary
57 cp -a usr/share/win32/* binary
7258 fi
7359
7460 mv binary/win32-loader.exe binary/setup.exe
8773 VideoFiles=false
8874 EOF
8975
90 if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
76 if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
9177 then
9278
9379 cat > binary/win32-loader.ini << EOF
9480 [installer]
9581 kernel=linux
96 arch=${LB_ARCHITECTURES}
82 arch=${LB_ARCHITECTURE}
9783 default_desktop=gnome
98 ${LB_ARCHITECTURES}/linux=install/vmlinuz
99 ${LB_ARCHITECTURES}/initrd=install/initrd.gz
84 ${LB_ARCHITECTURE}/linux=install/vmlinuz
85 ${LB_ARCHITECTURE}/initrd=install/initrd.gz
10086 EOF
10187
10288 if [ -e binary/install/gtk ]
10389 then
10490
10591 cat >> binary/win32-loader.ini << EOF
106 ${LB_ARCHITECTURES}/gtk/linux=install/vmlinuz
107 ${LB_ARCHITECTURES}/gtk/initrd=install/gtk/initrd.gz
92 ${LB_ARCHITECTURE}/gtk/linux=install/vmlinuz
93 ${LB_ARCHITECTURE}/gtk/initrd=install/gtk/initrd.gz
10894 EOF
10995
11096 fi
119105 fi
120106
121107 # Saving cache
122 Save_cache cache/packages.binary
108 Save_package_cache binary
123109
124110 # Removing depends
125 Remove_package
111 Remove_packages
126112 ;;
127113
128114 *)
131117 esac
132118
133119 # Creating stage file
134 Create_stagefile .build/binary_win32-loader
120 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'build zsync control files')"
17 HELP=""
17 DESCRIPTION="Build zsync control files"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 if [ "${LIVE_IMAGE_TYPE}" != "iso" ] && [ "${LIVE_IMAGE_TYPE}" != "iso-hybrid" ]
23 if [ "${LB_IMAGE_TYPE}" != "iso" ] && [ "${LB_IMAGE_TYPE}" != "iso-hybrid" ]
2724 then
2825 exit 0
2926 fi
3633 Echo_message "Begin building zsync control files..."
3734
3835 # Requiring stage file
39 Require_stagefile .build/config .build/bootstrap
36 Require_stagefiles config bootstrap
4037
4138 # Checking stage file
42 Check_stagefile .build/binary_zsync
39 Check_stagefile
4340
44 # Checking lock file
45 Check_lockfile .lock
46
47 # Creating lock file
48 Create_lockfile .lock
41 # Acquire lock file
42 Acquire_lockfile
4943
5044 # Checking depends
5145 Check_package chroot /usr/bin/zsyncmake zsync
5246
5347 # Restoring cache
54 Restore_cache cache/packages.binary
48 Restore_package_cache binary
5549
5650 # Installing depends
57 Install_package
51 Install_packages
5852
59 case "${LIVE_IMAGE_TYPE}" in
53 case "${LB_IMAGE_TYPE}" in
6054 iso)
61 _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.iso"
55 _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.iso"
6256 ;;
6357
6458 iso-hybrid)
65 _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.hybrid.iso"
59 _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.hybrid.iso"
6660 ;;
6761
6862 hdd)
69 _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.img"
63 _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.img"
7064 ;;
7165
72 net)
73 _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.netboot.tar*"
66 netboot)
67 _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.netboot.tar*"
7468 ;;
7569
7670 tar)
77 _IMAGES="${LIVE_IMAGE_NAME}-${LB_ARCHITECTURES}.tar*"
71 _IMAGES="${LB_IMAGE_NAME}-${LB_ARCHITECTURE}.tar*"
7872 ;;
7973 esac
8074
120114 #CHECKSUMS
121115
122116 # Saving cache
123 Save_cache cache/packages.binary
117 Save_package_cache binary
124118
125119 # Removing depends
126 Remove_package
120 Remove_packages
127121
128122 # Creating stage file
129 Create_stagefile .build/binary_zsync
123 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1213 # Including common functions
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
15 # Automatically populating config tree
16 if [ -x auto/config ] && [ ! -e .build/config ]
17 then
18 Echo_message "Automatically populating config tree."
19 lb config
20 fi
21
2216 # Setting static variables
23 DESCRIPTION="$(Echo 'bootstrap a Debian system')"
24 HELP=""
17 DESCRIPTION="Bootstrap a Debian system"
2518 USAGE="${PROGRAM} [--force]"
2619
27 Arguments "${@}"
20 # Automatically populating config tree
21 Auto_build_config
2822
29 # Reading configuration files
30 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
31 Set_defaults
23 # Processing arguments and configuration files
24 Init_config_data "${@}"
3225
33 # Setup cleanup function
34 Setup_cleanup
26 # Setting up cleanup function
27 Setup_clean_exit
3528
3629 # Bootstrapping system
37 lb bootstrap_cache restore ${@}
38 lb bootstrap_debootstrap ${@}
39 lb bootstrap_cache save ${@}
30 lb bootstrap_cache restore "${@}"
31 lb bootstrap_debootstrap "${@}"
32 lb bootstrap_cache save "${@}"
4033
4134 # Configuring chroot
42 lb chroot_devpts install ${@}
43 lb chroot_proc install ${@}
44 lb chroot_selinuxfs install ${@}
45 lb chroot_sysfs install ${@}
46 lb chroot_debianchroot install ${@}
47 lb chroot_dpkg install ${@}
48 lb chroot_tmpfs install ${@}
49 lb chroot_sysv-rc install ${@}
50 lb chroot_hosts install ${@}
51 lb chroot_resolv install ${@}
52 lb chroot_hostname install ${@}
53 lb chroot_apt install ${@}
35 lb chroot_prep install all-except-archives "${@}"
5436
55 lb bootstrap_archives binary ${@}
37 lb bootstrap_archives "${@}"
5638
5739 # Deconfiguring chroot
58 lb chroot_apt remove ${@}
59 lb chroot_hostname remove ${@}
60 lb chroot_resolv remove ${@}
61 lb chroot_hosts remove ${@}
62 lb chroot_sysv-rc remove ${@}
63 lb chroot_tmpfs remove ${@}
64 lb chroot_dpkg remove ${@}
65 lb chroot_debianchroot remove ${@}
66 lb chroot_sysfs remove ${@}
67 lb chroot_selinuxfs remove ${@}
68 lb chroot_proc remove ${@}
69 lb chroot_devpts remove ${@}
40 lb chroot_prep remove all-except-archives "${@}"
41
42 Echo_message "Bootstrap stage completed"
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'manage /etc/apt/sources.list')"
17 HELP=""
17 DESCRIPTION="Manage /etc/apt/sources.list"
1818 USAGE="${PROGRAM} [--force]"
1919
20 _PASS="${1:-binary}"
21 if [ -n "${1}" ]
22 then
23 shift
24 fi
25
26 Arguments "${@}"
27
28 # Reading configuration files
29 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
30 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
3122
3223 # Requiring stage file
33 Require_stagefile .build/config .build/bootstrap
34
35 case "${LB_DERIVATIVE}" in
36 true)
37 _PARENT_FILE="sources.list.d/debian.list"
38 ;;
39
40 false)
41 _PARENT_FILE="sources.list"
42 ;;
43 esac
24 Require_stagefiles config bootstrap
4425
4526 Echo_message "Configuring file /etc/apt/sources.list"
4627
4728 # Checking stage file
48 Check_stagefile .build/chroot_archives
29 Check_stagefile
4930
50 # Checking lock file
51 Check_lockfile .lock
52
53 # Creating lock file
54 Create_lockfile .lock
31 # Acquire lock file
32 Acquire_lockfile
5533
5634 # Restoring cache
57 Restore_cache cache/packages.chroot
35 Restore_package_cache chroot
36
37 # Mount local repository
38 if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/'
39 then
40 Chroot_bind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')"
41 fi
5842
5943 # Configure custom sources.list
60
61 if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/'
62 then
63 Chroot_bind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')"
64 fi
65
66 cat > chroot/etc/apt/${_PARENT_FILE} << EOF
67 deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT} ${LB_PARENT_ARCHIVE_AREAS}
68 EOF
69
70 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
71 then
72 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
73 fi
74
75 if [ "${LB_DERIVATIVE}" = "true" ]
76 then
77 rm -f chroot/etc/apt/sources.list.d/${LB_MODE}.list
78
79 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION_CHROOT} | sed -e 's|-backports||')"
80
81 echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
82
83 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
84 then
85 echo "deb-src ${LB_MIRROR_CHROOT} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
86 fi
87 fi
88
89 if [ "${LB_SECURITY}" = "true" ]
90 then
91 case "${LB_MODE}" in
92 debian|progress-linux)
93 case "${LB_PARENT_DISTRIBUTION_CHROOT}" in
94 sid)
95
96 ;;
97
98 *)
99 echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION_CHROOT}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
100
101 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
102 then
103 echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION_CHROOT}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
104 fi
105 ;;
106 esac
107
108 if [ "${LB_MODE}" = progress-linux ]
109 then
110 echo "deb ${LB_MIRROR_CHROOT_SECURITY} ${_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
111
112 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
113 then
114 echo "deb-src ${LB_MIRROR_CHROOT_SECURITY} ${_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
115 fi
116 else
117 if [ "${LB_DERIVATIVE}" = "true" ]
118 then
119 echo "deb ${LB_MIRROR_CHROOT_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
120
121 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
122 then
123 echo "deb-src ${LB_MIRROR_CHROOT_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
124 fi
125 fi
126 fi
127 ;;
128 esac
129 fi
130
131 if [ "${LB_UPDATES}" = "true" ]
132 then
133 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
134
135 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
136 then
137 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
138 fi
139
140 if [ "${LB_DERIVATIVE}" = "true" ]
141 then
142 echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
143
144 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
145 then
146 echo "deb-src ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
147 fi
148 fi
149 fi
150
151 if [ "${LB_BACKPORTS}" = "true" ]
152 then
153 case "${LB_MODE}" in
154 debian)
155 if [ "${LB_PARENT_DISTRIBUTION_CHROOT}" != "sid" ]
156 then
157 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
158
159 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
160 then
161 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
162 fi
163 fi
164 ;;
165 esac
166
167 if [ "${LB_DERIVATIVE}" = "true" ]
168 then
169 echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
170
171 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
172 then
173 echo "deb-src ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
174 fi
175 fi
176 fi
44 Create_apt_sources_list chroot
17745
17846 # Adding local apt sources (chroot)
17947 for FILE in config/archives/*.list config/archives/*.list.chroot
18553 -e "s|@ARCHIVE_AREAS@|${LB_ARCHIVE_AREAS}|g" \
18654 -e "s|@PARENT_ARCHIVE_AREAS@|${LB_PARENT_ARCHIVE_AREAS}|g" \
18755 "${FILE}" > "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)"
188
189 if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" = "false" ]
190 then
191 # Strip out source archives
192 sed "/^deb-src /d" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)"
193 fi
19456 fi
19557 done
19658
276138 Apt chroot "dist-upgrade"
277139
278140 # Saving cache
279 Save_cache cache/packages.chroot
141 Save_package_cache chroot
280142
281143 # Creating stage file
282 Create_stagefile .build/bootstrap_archives
144 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'cache bootstrap stage')"
17 HELP=""
18 USAGE="${PROGRAM} [--force]"
17 DESCRIPTION="Cache bootstrap stage"
18 USAGE="${PROGRAM} {restore|save} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Check architecture
2727 Check_crossarchitectures
2828
29 for STAGE in ${LB_CACHE_STAGES}
30 do
31 if [ "${STAGE}" = "bootstrap" ]
32 then
33 case "${1}" in
34 restore)
35 Echo_message "Restoring bootstrap stage from cache..."
29 if ! In_list "bootstrap" ${LB_CACHE_STAGES}; then
30 exit 0
31 fi
3632
37 # Checking stage file
38 Check_stagefile .build/bootstrap_cache.restore
33 # Set non-default stage file name
34 # Note, this (plus the applicable extension added below) must match that used in `bootstrap_debootstrap`
35 STAGE_FILE="bootstrap_cache.${_ACTION}"
3936
40 if [ -d cache/bootstrap ]
41 then
42 # Checking lock file
43 Check_lockfile .lock
37 case "${_ACTION}" in
38 restore)
39 # Checking stage file
40 Check_stagefile "${STAGE_FILE}"
4441
45 # Creating lock file
46 Create_lockfile .lock
42 if [ -d cache/bootstrap ]
43 then
44 Echo_message "Restoring bootstrap stage from cache..."
4745
48 # Removing old chroot
49 rm -rf chroot
46 # Acquire lock file
47 Acquire_lockfile
5048
51 # Restoring old cache
52 cp -a cache/bootstrap chroot
49 # Removing old chroot
50 rm -rf chroot
5351
54 # Creating stage file
55 Create_stagefile .build/bootstrap_cache.restore
56 Create_stagefile .build/bootstrap
52 # Catch failure condition.
53 # The installer stage, if not 'none' or 'live' needs to copy cached
54 # bootstrap packages, and will error if these do not exist. This
55 # could be the case if bootstrap is cached but the packages were
56 # wiped from the cache. This detects this condition and if it is the
57 # case, ignores the cached bootstrap, forcing it to be rebuilt thus
58 # re-caching the packages.
59 if ! In_list "${LB_DEBIAN_INSTALLER}" live none &&
60 ! ls cache/packages.bootstrap/*.deb > /dev/null 2>&1
61 then
62 Echo_message "Cached bootstrap packages required but missing, ignoring cached bootstrap to force rebuild."
63 exit 0
64 fi
5765
58 exit 0
59 fi
60 ;;
66 # Restoring old cache
67 cp -a cache/bootstrap chroot
6168
62 save)
63 Echo_message "Saving bootstrap stage to cache..."
69 # Creating stage file
70 Create_stagefile "${STAGE_FILE}"
71 Create_stagefile "bootstrap"
6472
65 # Checking stage file
66 Check_stagefile .build/bootstrap_cache.save
73 exit 0
74 fi
75 ;;
6776
68 # Checking lock file
69 Check_lockfile .lock
77 save)
78 Echo_message "Saving bootstrap stage to cache..."
7079
71 # Creating lock file
72 Create_lockfile .lock
80 # Checking stage file
81 Check_stagefile "${STAGE_FILE}"
7382
74 rm -rf cache/bootstrap
83 # Acquire lock file
84 Acquire_lockfile
7585
76 mkdir -p cache
86 rm -rf cache/bootstrap
7787
78 cp -a chroot cache/bootstrap
88 mkdir -p cache
7989
80 # Creating stage file
81 Create_stagefile .build/bootstrap_cache.save
82 ;;
83 esac
84 fi
85 done
90 cp -a chroot cache/bootstrap
91
92 # Creating stage file
93 Create_stagefile "${STAGE_FILE}"
94 ;;
95
96 *)
97 Echo_error "Invalid action parameter: '${_ACTION}'"
98 Usage --fail
99 ;;
100 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'bootstrap a Debian system with debootstrap(8)')"
17 HELP=""
17 DESCRIPTION="Bootstrap a Debian system with debootstrap(8)"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 if [ ! -x "$(which debootstrap 2>/dev/null)" ]
23 if ! command -v debootstrap >/dev/null
2724 then
28 echo "E: debootstrap - command not found"
29 echo "I: debootstrap can be obtained from http://ftp.debian.org/debian/pool/main/d/debootstrap/"
30 echo "I: On Debian based systems, debootstrap can be installed with 'apt-get install debootstrap'."
25 Echo_error "debootstrap - command not found"
3126 exit 1
3227 fi
3328
3631
3732 Echo_message "Begin bootstrapping system..."
3833
39 Check_package chroot bin/debootstrap debootstrap
34 Check_package host /usr/sbin/debootstrap debootstrap
4035
4136 # Checking stage file
42 Check_stagefile .build/bootstrap
43 Check_stagefile .build/bootstrap_cache.restore
37 Check_stagefile "bootstrap"
38 # Note, this must match that used in `bootstrap_cache`
39 Check_stagefile "bootstrap_cache.restore"
4440
45 # Checking lock file
46 Check_lockfile .lock
41 # Acquire lock file
42 Acquire_lockfile
4743
48 # Creating lock file
49 Create_lockfile .lock
44 Print_breakage ()
45 {
46 Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy."
47 }
5048
5149 # Creating chroot directory
5250 mkdir -p chroot
5351
5452 # Setting debootstrap options
55 if [ -n "${LB_ARCHITECTURES}" ]
53 if [ -n "${LB_ARCHITECTURE}" ]
5654 then
57 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --arch=${LB_ARCHITECTURES}"
55 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --arch=${LB_ARCHITECTURE}"
5856 fi
5957
6058 if [ "${LB_ARCHIVE_AREAS}" != "main" ]
7068 fi
7169
7270 # If LB_APT_SECURE is false, do not check signatures of the Release file
73 # (requires debootstrap >= 1.0.30)
74 if [ "${LB_APT_SECURE}" = "false" ] && /usr/sbin/debootstrap --help | grep -qs '\-\-no-check-gpg'
71 if [ "${LB_APT_SECURE}" = "false" ]
7572 then
7673 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --no-check-gpg"
74 else
75 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --force-check-gpg"
7776 fi
7877
79 if [ -x "/usr/sbin/debootstrap" ]
78 if [ "${LB_CACHE_PACKAGES}" = "true" ]
8079 then
81 if [ "${LB_CACHE_PACKAGES}" = "true" ]
80 if ls cache/packages.bootstrap/*.deb > /dev/null 2>&1
8281 then
83 if ls cache/packages.bootstrap/*.deb > /dev/null 2>&1
84 then
85 mkdir -p chroot/var/cache/apt/archives
86 cp cache/packages.bootstrap/*.deb chroot/var/cache/apt/archives
87 fi
88
89 Echo_breakage "Running debootstrap (download-only)... "
90 debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
91
92 # Removing old cache
93 rm -f cache/packages.bootstrap/*.deb
94
95 # Saving new cache
96 mkdir -p cache/packages.bootstrap
97 cp chroot/var/cache/apt/archives/*.deb cache/packages.bootstrap
82 mkdir -p chroot/var/cache/apt/archives
83 cp cache/packages.bootstrap/*.deb chroot/var/cache/apt/archives
9884 fi
9985
100 Echo_breakage "Running debootstrap... "
86 Print_breakage
87 Echo_message "Running debootstrap (download-only)..."
88 debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
10189
102 # Run appropriate bootstrap, i.e. foreign or regular bootstrap
103 if [ "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" = "${LB_ARCHITECTURES}" ]; then
90 # Removing old cache
91 rm -f cache/packages.bootstrap/*.deb
10492
105 if [ -n "${LB_BOOTSTRAP_QEMU_EXCLUDE}" ]
106 then
107 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --exclude=$(echo ${LB_BOOTSTRAP_QEMU_EXCLUDE} | sed 's| *|,|g')"
108 fi
93 # Saving new cache
94 mkdir -p cache/packages.bootstrap
95 cp chroot/var/cache/apt/archives/*.deb cache/packages.bootstrap
96 fi
10997
110 Echo_message "Bootstrap will be foreign"
111 debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
98 Print_breakage
99 Echo_message "Running debootstrap..."
112100
113 Echo_message "Running debootstrap second stage under QEMU"
114 cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin
115 Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage ${FOREIGN_DEBOOTSTRAP_OPTIONS}
116 else
117 debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
101 # Run appropriate bootstrap, i.e. foreign or regular bootstrap
102 if [ "${LB_BOOTSTRAP_QEMU_ARCHITECTURE}" = "${LB_ARCHITECTURE}" ]; then
103
104 if [ -n "${LB_BOOTSTRAP_QEMU_EXCLUDE}" ]
105 then
106 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --exclude=$(echo ${LB_BOOTSTRAP_QEMU_EXCLUDE} | sed 's| *|,|g')"
118107 fi
119108
120 # Deconfiguring debootstrap configurations
121 rm -f chroot/etc/hosts
109 Echo_message "Bootstrap will be foreign"
110 debootstrap ${DEBOOTSTRAP_OPTIONS} --foreign "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
122111
123 # Removing bootstrap cache
124 rm -f chroot/var/cache/apt/archives/*.deb
112 Echo_message "Running debootstrap second stage under QEMU"
113 cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin
114 Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage ${FOREIGN_DEBOOTSTRAP_OPTIONS}
115 else
116 debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
117 fi
125118
126 # Creating stage file
127 Create_stagefile .build/bootstrap
128 else
129 Echo_error "Can't process file /usr/bin/debootstrap (FIXME)"
130 exit 1
131 fi
119 # Deconfiguring debootstrap configurations
120 rm -f chroot/etc/hosts
121
122 # Removing bootstrap cache
123 rm -f chroot/var/cache/apt/archives/*.deb
124
125 # Creating stage file
126 Create_stagefile "bootstrap"
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1213 # Including common functions
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
15 # Automatically populating config tree
16 if [ -x auto/config ] && [ ! -e .build/config ]
17 then
18 Echo_message "Automatically populating config tree."
19 lb config
20 fi
16 # Automatically building config
17 Auto_build_config
2118
22 # Read meta config
23 if [ "${1}" != "noauto" ] && [ -x auto/build ]
24 then
25 Echo_message "Executing auto/build script."
26 ./auto/build "${@}"
27 exit ${?}
28 fi
29
30 if [ "${1}" = "noauto" ]
31 then
19 # Redirecting to auto script if required
20 if [ "${1}" = "noauto" ]; then
3221 shift
22 else
23 Maybe_auto_redirect build "${@}"
3324 fi
3425
3526 # Setting static variables
36 DESCRIPTION="$(Echo 'build a Debian Live system')"
37 HELP=""
27 DESCRIPTION="Build a Debian Live system"
3828 USAGE="${PROGRAM} [--force]"
3929
40 Arguments "${@}"
30 # Checking build directory suitability
4131
42 if [ ! -d config ]
43 then
32 if [ ! -d config ]; then
4433 Echo_warning "No config/ directory; using defaults for all options"
4534 lb config
4635 fi
4736
48 if [ "$(pwd)" = "/" ]
49 then
37 if [ "$(pwd)" = "/" ]; then
5038 Echo_error "Cannot build live image from the root directory (/)"
5139 exit 1
5240 fi
5341
54 if echo $(pwd) | grep -qs " "
55 then
42 if echo $(pwd) | grep -qs " "; then
5643 Echo_error "Cannot build live image from a directory containing spaces"
5744 exit 1
5845 fi
5946
60 # Reading configuration files
61 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
62 Set_defaults
63
64 # Checking defaults
65 Check_defaults
47 # Processing arguments and configuration files
48 Init_config_data "${@}"
6649
6750 Echo_message "live-build ${LIVE_BUILD_VERSION}"
68 Echo_message "Building config tree for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES} system"
51 Echo_message "Building for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE} system"
6952
70 # Bootstrapping system
71 lb bootstrap ${@}
53 # Stage #1: Bootstrap new root filesystem
54 lb bootstrap "${@}"
7255
73 # Customizing chroot
74 lb chroot ${@}
56 # Stage #2: Build live OS file system
57 lb chroot "${@}"
7558
76 # Building installer images
77 lb installer ${@}
59 # Stage #3: Build installer components
60 lb installer "${@}"
7861
79 # Building binary images
80 lb binary ${@}
62 # Stage #4: Build binary (live disc) images
63 lb binary "${@}"
8164
82 # Building source images
83 lb source ${@}
65 # Stage #5: Build supplimentary source disc images
66 lb source "${@}"
67
68 if [ "${_COLOR_OUT}" = "false" ]; then
69 Echo_message "Build completed successfully"
70 else
71 Echo_message "%sBuild completed successfully%s" "$(echo ${GREEN})" "$(echo ${NO_COLOR})"
72 fi
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1213 # Including common functions
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
15 # Automatically populating config tree
16 if [ -x auto/config ] && [ ! -e .build/config ]
17 then
18 Echo_message "Automatically populating config tree."
19 lb config
20 fi
21
2216 # Setting static variables
23 DESCRIPTION="$(Echo 'customize the Debian system')"
24 HELP=""
17 DESCRIPTION="Customize the Debian system"
2518 USAGE="${PROGRAM} [--force]"
2619
27 Arguments "${@}"
20 # Automatically populating config tree
21 Auto_build_config
2822
29 # Reading configuration files
30 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
31 Set_defaults
23 # Processing arguments and configuration files
24 Init_config_data "${@}"
3225
33 # Setup cleanup function
34 Setup_cleanup
26 # Setting up cleanup function
27 Setup_clean_exit
28
29 # Restoring cached live OS chroot from cache
30 lb chroot_cache restore "${@}"
3531
3632 # Configuring chroot
37 lb chroot_cache restore ${@}
38 lb chroot_devpts install ${@}
39 lb chroot_proc install ${@}
40 lb chroot_selinuxfs install ${@}
41 lb chroot_sysfs install ${@}
42 lb chroot_debianchroot install ${@}
43 lb chroot_dpkg install ${@}
44 lb chroot_tmpfs install ${@}
45 lb chroot_sysv-rc install ${@}
46 lb chroot_hosts install ${@}
47 lb chroot_resolv install ${@}
48 lb chroot_hostname install ${@}
49 lb chroot_apt install ${@}
50 lb chroot_archives chroot install ${@}
33 lb chroot_prep install all mode-archives-chroot "${@}"
5134
5235 # Customizing chroot
53 lb chroot_linux-image ${@}
54 lb chroot_firmware ${@}
55 lb chroot_preseed ${@}
36 lb chroot_linux-image "${@}"
37 lb chroot_firmware "${@}"
38 lb chroot_preseed "${@}"
39 lb chroot_includes_before_packages "${@}"
5640
57 for _PASS in install live
58 do
59 lb chroot_package-lists ${_PASS} ${@}
60 lb chroot_install-packages ${_PASS} ${@}
41 for _PASS in install live; do
42 lb chroot_package-lists ${_PASS} "${@}"
43 lb chroot_install-packages ${_PASS} "${@}"
6144
62 if [ "${_PASS}" = install ]
63 then
45 if [ "${_PASS}" = install ]; then
6446 Chroot chroot "dpkg-query -W" > chroot.packages.install
6547 fi
6648 done
6749
68 lb chroot_includes ${@}
69 lb chroot_hooks ${@}
70 lb chroot_hacks ${@}
71 lb chroot_interactive ${@}
50 lb chroot_includes_after_packages "${@}"
51 lb chroot_hooks "${@}"
52 lb chroot_hacks "${@}"
53 lb chroot_interactive "${@}"
7254
7355 Chroot chroot "dpkg-query -W" > chroot.packages.live
7456
7557 # Deconfiguring chroot
76 lb chroot_archives chroot remove ${@}
77 lb chroot_apt remove ${@}
78 lb chroot_hostname remove ${@}
79 lb chroot_resolv remove ${@}
80 lb chroot_hosts remove ${@}
81 lb chroot_sysv-rc remove ${@}
82 lb chroot_tmpfs remove ${@}
83 lb chroot_dpkg remove ${@}
84 lb chroot_debianchroot remove ${@}
85 lb chroot_sysfs remove ${@}
86 lb chroot_selinuxfs remove ${@}
87 lb chroot_proc remove ${@}
88 lb chroot_devpts remove ${@}
89 lb chroot_cache save ${@}
58 lb chroot_prep remove all mode-archives-chroot "${@}"
59
60 # Saving live OS chroot to cache
61 lb chroot_cache save "${@}"
9062
9163 Chroot chroot "ls -lR" > chroot.files
64
65 Echo_message "Chroot stage completed"
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'manage /etc/apt/apt.conf')"
17 HELP=""
17 DESCRIPTION="Manage /etc/apt/apt.conf"
1818 USAGE="${PROGRAM} {install|install-binary|remove} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
28
29 case "${1}" in
27 Require_stagefiles config bootstrap
28
29 CONFD="chroot/etc/apt/apt.conf.d"
30
31 case "${_ACTION}" in
3032 install|install-binary)
3133 Echo_message "Configuring file /etc/apt/apt.conf"
3234
3335 # Checking stage file
34 Check_stagefile .build/chroot_apt
35
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
41
42 mkdir -p chroot/etc/apt/apt.conf.d
36 Check_stagefile
37
38 # Acquire lock file
39 Acquire_lockfile
40
41 mkdir -p ${CONFD}
4342
4443 # Configuring apt ftp proxy
4544 if [ -n "${LB_APT_FTP_PROXY}" ]
4645 then
47 echo "Acquire::ftp::Proxy \"${LB_APT_FTP_PROXY}\";" > chroot/etc/apt/apt.conf.d/00ftp-proxy
46 echo "Acquire::ftp::Proxy \"${LB_APT_FTP_PROXY}\";" > ${CONFD}/00ftp-proxy
4847 fi
4948
5049 # Configuring apt http proxy
5150 if [ -n "${LB_APT_HTTP_PROXY}" ]
5251 then
53 echo "Acquire::http::Proxy \"${LB_APT_HTTP_PROXY}\";" > chroot/etc/apt/apt.conf.d/00http-proxy
52 echo "Acquire::http::Proxy \"${LB_APT_HTTP_PROXY}\";" > ${CONFD}/00http-proxy
5453 fi
5554
5655 # Configuring apt pipeline
5756 if [ -n "${LB_APT_PIPELINE}" ]
5857 then
59 echo "Acquire::http::Pipeline-Depth \"${LB_APT_PIPELINE}\";" > chroot/etc/apt/apt.conf.d/00pipeline
58 echo "Acquire::http::Pipeline-Depth \"${LB_APT_PIPELINE}\";" > ${CONFD}/00pipeline
6059 fi
6160
6261 # Configuring apt recommends
6362 case "${LB_APT_RECOMMENDS}" in
6463 true)
65 echo "APT::Install-Recommends \"true\";" > chroot/etc/apt/apt.conf.d/00recommends
66 echo "Aptitude::Recommends-Important \"true\";" >> chroot/etc/apt/apt.conf.d/00recommends
64 echo "APT::Install-Recommends \"true\";" > ${CONFD}/00recommends
65 echo "Aptitude::Recommends-Important \"true\";" >> ${CONFD}/00recommends
6766 ;;
6867
6968 false)
70 echo "APT::Install-Recommends \"false\";" > chroot/etc/apt/apt.conf.d/00recommends
71 echo "Aptitude::Recommends-Important \"false\";" >> chroot/etc/apt/apt.conf.d/00recommends
69 echo "APT::Install-Recommends \"false\";" > ${CONFD}/00recommends
70 echo "Aptitude::Recommends-Important \"false\";" >> ${CONFD}/00recommends
7271 ;;
7372 esac
7473
7574 # Configuring apt secure
7675 case "${LB_APT_SECURE}" in
7776 true)
78 echo "APT::Get::AllowUnauthenticated \"false\";" > chroot/etc/apt/apt.conf.d/00secure
79 echo "Aptitude::CmdLine::Ignore-Trust-Violations \"false\";" >> chroot/etc/apt/apt.conf.d/00secure
80 echo "Acquire::AllowInsecureRepositories \"false\";" >> chroot/etc/apt/apt.conf.d/00secure
77 echo "APT::Get::AllowUnauthenticated \"false\";" > ${CONFD}/00secure
78 echo "Aptitude::CmdLine::Ignore-Trust-Violations \"false\";" >> ${CONFD}/00secure
79 echo "Acquire::AllowInsecureRepositories \"false\";" >> ${CONFD}/00secure
8180 ;;
8281
8382 false)
84 echo "APT::Get::AllowUnauthenticated \"true\";" > chroot/etc/apt/apt.conf.d/00secure
85 echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> chroot/etc/apt/apt.conf.d/00secure
86 echo "Acquire::AllowInsecureRepositories \"true\";" >> chroot/etc/apt/apt.conf.d/00secure
83 echo "APT::Get::AllowUnauthenticated \"true\";" > ${CONFD}/00secure
84 echo "Aptitude::CmdLine::Ignore-Trust-Violations \"true\";" >> ${CONFD}/00secure
85 echo "Acquire::AllowInsecureRepositories \"true\";" >> ${CONFD}/00secure
8786 ;;
8887 esac
8988
9089 # Configuring apt config
91 if [ -f config/apt/apt.conf ]
92 then
93 if [ -f chroot/etc/apt/apt.conf ]
94 then
95 mv chroot/etc/apt/apt.conf chroot/etc/apt/apt.conf.orig
96 fi
97
98 cp config/apt/apt.conf chroot/etc/apt/apt.conf
90 CONFIG_FILE="config/apt/apt.conf"
91 CHROOT_FILE="chroot/etc/apt/apt.conf"
92 if [ -f ${CONFIG_FILE} ]; then
93 if [ -f ${CHROOT_FILE} ]; then
94 mv ${CHROOT_FILE} ${CHROOT_FILE}.orig
95 fi
96 cp ${CONFIG_FILE} ${CHROOT_FILE}
9997 fi
10098
10199 # Configuring apt preferences
102 if [ -f config/apt/preferences ]
103 then
104 if [ -f chroot/etc/apt/preferences ]
105 then
106 mv chroot/etc/apt/preferences chroot/etc/apt/preferences.orig
107 fi
108
109 cp config/apt/preferences chroot/etc/apt/preferences
110 fi
111
112 if Find_files config/apt/*.pref
113 then
114 for _FILE in config/apt/*.pref
115 do
116 if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
117 then
118 mv chroot/etc/apt/preferences.d/$(basename ${_FILE}) chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig
100 CONFIG_FILE="config/apt/preferences"
101 CHROOT_FILE="chroot/etc/apt/preferences"
102 if [ -f ${CONFIG_FILE} ]; then
103 if [ -f ${CHROOT_FILE} ]; then
104 mv ${CHROOT_FILE} ${CHROOT_FILE}.orig
105 fi
106 cp ${CONFIG_FILE} ${CHROOT_FILE}
107 fi
108
109 if Find_files config/apt/*.pref; then
110 for CONFIG_FILE in config/apt/*.pref; do
111 CHROOT_FILE="chroot/etc/apt/preferences.d/$(basename ${CONFIG_FILE})"
112 if [ -f ${CHROOT_FILE} ]; then
113 mv ${CHROOT_FILE} ${CHROOT_FILE}.orig
119114 fi
120
121 cp -aL ${_FILE} chroot/etc/apt/preferences.d
115 cp -aL ${CONFIG_FILE} chroot/etc/apt/preferences.d
122116 done
123117 fi
124118
125119 if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb
126120 then
127 echo >> chroot/etc/apt/preferences
128 echo "# Added by lb_chroot_apt ${@}" >> chroot/etc/apt/preferences
129 echo "Package: *" >> chroot/etc/apt/preferences
130 echo "Pin: release o=config/packages.chroot" >> chroot/etc/apt/preferences
131
132 case "${1}" in
121 CHROOT_FILE="chroot/etc/apt/preferences"
122 echo >> ${CHROOT_FILE}
123 echo "# Added by lb_chroot_apt ${_ACTION} ${@}" >> ${CHROOT_FILE}
124 echo "Package: *" >> ${CHROOT_FILE}
125 echo "Pin: release o=config/packages.chroot" >> ${CHROOT_FILE}
126
127 case "${_ACTION}" in
133128 install)
134129 # Ensure local packages have priority
135 echo "Pin-Priority: 1001" >> chroot/etc/apt/preferences
130 echo "Pin-Priority: 1001" >> ${CHROOT_FILE}
136131 ;;
137132
138133 install-binary)
139134 # Ensure local packages are not re-installed during lb_binary
140 echo "Pin-Priority: 99" >> chroot/etc/apt/preferences
141
142 echo >> chroot/etc/apt/preferences
143 echo "Package: *" >> chroot/etc/apt/preferences
144 echo "Pin: release o=debian" >> chroot/etc/apt/preferences
145 echo "Pin-Priority: 99" >> chroot/etc/apt/preferences
135 echo "Pin-Priority: 99" >> ${CHROOT_FILE}
136
137 echo >> ${CHROOT_FILE}
138 echo "Package: *" >> ${CHROOT_FILE}
139 echo "Pin: release o=debian" >> ${CHROOT_FILE}
140 echo "Pin-Priority: 99" >> ${CHROOT_FILE}
146141 ;;
147142 esac
148143 fi
149144
150 case "${LB_MODE}" in
151 progress-linux)
152 if [ ! -e chroot/etc/apt/preferences.d/progress-linux.pref ]
153 then
154 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION_BINARY} | sed -e 's|-backports||')"
155
156 _ENABLE_DISTRIBUTIONS="${_DISTRIBUTION}"
157 _DISABLE_DISTRIBUTIONS=""
158
159 if [ "${LB_SECURITY}" = "true" ]
160 then
161 _ENABLE_DISTRIBUTIONS="${_ENABLE_DISTRIBUTIONS} ${_DISTRIBUTION}-security"
162 fi
163
164 if [ "${LB_UPDATES}" = "true" ]
165 then
166 _ENABLE_DISTRIBUTIONS="${_ENABLE_DISTRIBUTIONS} ${_DISTRIBUTION}-updates"
167 fi
168
169 case "${LB_DISTRIBUTION_BINARY}" in
170 *-backports)
171 if [ "${LB_BACKPORTS}" = "true" ]
172 then
173 _ENABLE_DISTRIBUTIONS="${_ENABLE_DISTRIBUTIONS} ${_DISTRIBUTION}-backports"
174 fi
175 ;;
176
177 *)
178 if [ "${LB_BACKPORTS}" = "true" ]
179 then
180 _DISABLE_DISTRIBUTIONS="${_DISABLE_DISTRIBUTIONS} ${_DISTRIBUTION}-backports"
181 fi
182 ;;
183 esac
184
185 for _DISTRIBUTION in ${_ENABLE_DISTRIBUTIONS}
186 do
187
188 cat >> chroot/etc/apt/preferences.d/progress-linux.pref << EOF
189
190 Package: *
191 Pin: release n=${_DISTRIBUTION}
192 Pin-Priority: 999
193 EOF
194
195 done
196
197 for _DISTRIBUTION in ${_DISABLE_DISTRIBUTIONS}
198 do
199
200 cat >> chroot/etc/apt/preferences.d/progress-linux.pref << EOF
201
202 #Package: *
203 #Pin: release n=${_DISTRIBUTION}
204 #Pin-Priority: 999
205 EOF
206
207 done
208 fi
209 ;;
210 esac
211
212145 # Creating stage file
213 Create_stagefile .build/chroot_apt
146 Create_stagefile
214147 ;;
215148
216149 remove)
217150 Echo_message "Deconfiguring file /etc/apt/apt.conf"
218151
219 # Checking lock file
220 Check_lockfile .lock
221
222 # Creating lock file
223 Create_lockfile .lock
152 # Checking stage file
153 Ensure_stagefile_exists
154
155 # Acquire lock file
156 Acquire_lockfile
224157
225158 # Deconfiguring aptitude ftp proxy
226 rm -f chroot/etc/apt/apt.conf.d/00ftp-proxy
159 rm -f ${CONFD}/00ftp-proxy
227160
228161 # Deconfiguring aptitude http proxy
229 rm -f chroot/etc/apt/apt.conf.d/00http-proxy
162 rm -f ${CONFD}/00http-proxy
230163
231164 # Deconfiguring aptitude pipeline
232 rm -f chroot/etc/apt/apt.conf.d/00pipeline
165 rm -f ${CONFD}/00pipeline
233166
234167 # Deconfiguring aptitude recommends
235 if [ "${LB_APT_RECOMMENDS}" = "true" ]
236 then
237 rm -f chroot/etc/apt/apt.conf.d/00recommends
168 if [ "${LB_APT_RECOMMENDS}" = "true" ]; then
169 rm -f ${CONFD}/00recommends
238170 fi
239171
240172 # Deconfiguring aptitude secure
241 if [ "${LB_APT_SECURE}" = "true" ]
242 then
243 rm -f chroot/etc/apt/apt.conf.d/00secure
173 if [ "${LB_APT_SECURE}" = "true" ]; then
174 rm -f ${CONFD}/00secure
244175 fi
245176
246177 # Configuring apt config
247 if [ -f config/apt/apt.conf ]
248 then
249 if [ -f chroot/etc/apt/apt.conf ]
250 then
251 mv chroot/etc/apt/apt.conf chroot/etc/apt/apt.conf.orig
252 fi
253
254 cp config/apt/apt.conf chroot/etc/apt/apt.conf
255
256 if [ -f chroot/etc/apt/apt.conf.orig ]
257 then
258 mv chroot/etc/apt/apt.conf.orig chroot/etc/apt/apt.conf
178 CONFIG_FILE="config/apt/apt.conf"
179 CHROOT_FILE="chroot/etc/apt/apt.conf"
180 if [ -f ${CONFIG_FILE} ]; then
181 rm -f ${CHROOT_FILE}
182
183 if [ -f ${CHROOT_FILE}.orig ]; then
184 mv ${CHROOT_FILE}.orig ${CHROOT_FILE}
259185 fi
260186 fi
261187
262188 # Deconfiguring apt preferences
263 if [ -f config/apt/preferences ]
264 then
265 if [ -f chroot/etc/apt/preferences ]
266 then
267 mv chroot/etc/apt/preferences chroot/etc/apt/preferences.orig
268 fi
269
270 cp config/apt/preferences chroot/etc/apt/preferences
271
272 if [ -f chroot/etc/apt/preferences.orig ]
273 then
274 mv chroot/etc/apt/preferences.orig chroot/etc/apt/preferences
275 fi
276 fi
277
278 if Find_files config/apt/*.pref
279 then
280 for _FILE in config/apt/*.pref
281 do
282 if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}) ]
283 then
284 mv chroot/etc/apt/preferences.d/$(basename ${_FILE}) chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig
285 fi
286
287 cp -aL ${_FILE} chroot/etc/apt/preferences.d
288
289 if [ -f chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig ]
290 then
291 mv chroot/etc/apt/preferences.d/$(basename ${_FILE}).orig chroot/etc/apt/preferences.d/$(basename ${_FILE})
189 CONFIG_FILE="config/apt/preferences"
190 CHROOT_FILE="chroot/etc/apt/preferences"
191 if [ -f ${CONFIG_FILE} ]; then
192 rm -f ${CHROOT_FILE}
193
194 if [ -f ${CHROOT_FILE}.orig ]; then
195 mv ${CHROOT_FILE}.orig ${CHROOT_FILE}
196 fi
197 elif [ -f ${CHROOT_FILE} ]; then
198 # delete additions from lb_chroot_apt install|install-binary to preferences
199 sed -i '/# Added by lb_chroot_apt/,$d' ${CHROOT_FILE}
200 # delete the last empty line
201 sed -i '${/^[[:blank:]]*$/d;}' ${CHROOT_FILE}
202 # if the resulting preferences file is empty, we must have created it, remove it
203 if [ ! -s ${CHROOT_FILE} ]; then
204 rm -f ${CHROOT_FILE}
205 fi
206 fi
207
208 if Find_files config/apt/*.pref; then
209 for CONFIG_FILE in config/apt/*.pref; do
210 CHROOT_FILE="chroot/etc/apt/preferences.d/$(basename ${CONFIG_FILE})"
211
212 rm -f ${CHROOT_FILE}
213
214 if [ -f ${CHROOT_FILE}.orig ]; then
215 mv ${CHROOT_FILE}.orig ${CHROOT_FILE}
292216 fi
293217 done
294218 fi
295219
296 if Find_files config/packages.chroot/*.deb || Find_files config/packages/*.deb
297 then
298 if [ -f chroot/etc/apt/preferences ]
299 then
300 # delete additions from lb_chroot_apt install|install-binary to preferences
301 sed -i '/# Added by lb_chroot_apt/,$d' chroot/etc/apt/preferences
302 # delete the last empty line
303 sed -i '${/^[[:blank:]]*$/d;}' chroot/etc/apt/preferences
304 # if the resulting preferences file is empty there was no user additions, remove it
305 if [ ! -s chroot/etc/apt/preferences ]
306 then
307 rm -rf chroot/etc/apt/preferences
308 fi
309 fi
310
311 fi
312
313220 # Removing stage file
314 rm -f .build/chroot_apt
221 Remove_stagefile
315222 ;;
316223
317224 *)
318 Usage
225 Echo_error "Invalid action parameter: '${_ACTION}'"
226 Usage --fail
319227 ;;
320228 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'manage /etc/apt/sources.list')"
17 HELP=""
18 USAGE="${PROGRAM} {install|remove} [--force]"
17 DESCRIPTION="Manage /etc/apt/sources.list"
18 USAGE="${PROGRAM} {source|binary|chroot} {install|remove} [--force]"
19
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
1922
2023 _PASS="${1}"
21 shift
22
23 Arguments "${@}"
24
25 # Reading configuration files
26 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
27 Set_defaults
24 _ACTION="${2}"
25 shift 2
26
27 if ! In_list "${_PASS}" "binary" "chroot" "source"; then
28 Echo_error "Invalid pass parameter: '${_PASS}'"
29 Usage --fail
30 fi
2831
2932 # Requiring stage file
30 Require_stagefile .build/config .build/bootstrap
31
32 case "${LB_DERIVATIVE}" in
33 true)
34 _PARENT_FILE="sources.list.d/debian.list"
35 ;;
36
37 false)
38 _PARENT_FILE="sources.list"
39 ;;
40 esac
41
42 case "${1}" in
33 Require_stagefiles config bootstrap
34
35 case "${_ACTION}" in
4336 install)
4437 Echo_message "Configuring file /etc/apt/sources.list"
4538
4639 # Checking stage file
47 Check_stagefile .build/chroot_archives
48
49 # Checking lock file
50 Check_lockfile .lock
51
52 # Creating lock file
53 Create_lockfile .lock
40 Check_stagefile
41
42 # Acquire lock file
43 Acquire_lockfile
5444
5545 # Restoring cache
56 Restore_cache cache/packages.chroot
46 Restore_package_cache chroot
47
48 # Mount local repository
49 if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/'
50 then
51 Chroot_bind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')"
52 fi
5753
5854 # Configure custom sources.list
59
60 if echo "${LB_PARENT_MIRROR_CHROOT}" | grep -q '^file:/'
61 then
62 Chroot_bind_path chroot "$(echo ${LB_PARENT_MIRROR_CHROOT} | sed -e 's|file:||')"
63 fi
64
65 cat > chroot/etc/apt/${_PARENT_FILE} << EOF
66 deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT} ${LB_PARENT_ARCHIVE_AREAS}
67 EOF
68
69 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
70 then
71 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
72 fi
73
74 if [ "${LB_DERIVATIVE}" = "true" ]
75 then
76 rm -f chroot/etc/apt/sources.list.d/${LB_MODE}.list
77
78 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION_CHROOT} | sed -e 's|-backports||')"
79
80 echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
81
82 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
83 then
84 echo "deb-src ${LB_MIRROR_CHROOT} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
85 fi
86 fi
87
88 if [ "${LB_SECURITY}" = "true" ]
89 then
90 case "${LB_MODE}" in
91 debian|progress-linux)
92 case "${LB_PARENT_DISTRIBUTION_CHROOT}" in
93 sid)
94
95 ;;
96
97 *)
98 echo "deb ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION_CHROOT}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
99
100 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
101 then
102 echo "deb-src ${LB_PARENT_MIRROR_CHROOT_SECURITY} ${LB_PARENT_DISTRIBUTION_CHROOT}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
103 fi
104 ;;
105 esac
106
107 if [ "${LB_MODE}" = progress-linux ]
108 then
109 echo "deb ${LB_MIRROR_CHROOT_SECURITY} ${_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
110
111 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
112 then
113 echo "deb-src ${LB_MIRROR_CHROOT_SECURITY} ${_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
114 fi
115 else
116 if [ "${LB_DERIVATIVE}" = "true" ]
117 then
118 echo "deb ${LB_MIRROR_CHROOT_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
119
120 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
121 then
122 echo "deb-src ${LB_MIRROR_CHROOT_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
123 fi
124 fi
125 fi
126 ;;
127 esac
128 fi
129
130 if [ "${LB_UPDATES}" = "true" ]
131 then
132 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
133
134 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
135 then
136 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
137 fi
138
139 if [ "${LB_DERIVATIVE}" = "true" ]
140 then
141 echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
142
143 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
144 then
145 echo "deb-src ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
146 fi
147 fi
148 fi
149
150 if [ "${LB_BACKPORTS}" = "true" ]
151 then
152 case "${LB_MODE}" in
153 debian)
154 if [ "${LB_PARENT_DISTRIBUTION_CHROOT}" != "sid" ]
155 then
156 echo "deb ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
157
158 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
159 then
160 echo "deb-src ${LB_PARENT_MIRROR_CHROOT} ${LB_PARENT_DISTRIBUTION_CHROOT}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
161 fi
162 fi
163 ;;
164 esac
165
166 if [ "${LB_DERIVATIVE}" = "true" ]
167 then
168 echo "deb ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
169
170 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
171 then
172 echo "deb-src ${LB_MIRROR_CHROOT} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
173 fi
174 fi
175 fi
55 Create_apt_sources_list chroot "${_PASS}"
17656
17757 # Adding local apt sources (chroot)
17858 for FILE in config/archives/*.list config/archives/*.list.chroot
18767
18868 if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" = "false" ]
18969 then
190 # Strip out source archives
191 sed "/^deb-src /d" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)"
70 # Disable source archives
71 sed -i "s/^deb-src/#deb-src/g" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .chroot)"
19272 fi
19373 fi
19474 done
243123 fi
244124
245125 # Copy packages
246 if Find_files config/packages.chroot/*_"${LB_ARCHITECTURES}".deb || Find_files config/packages/*_"${LB_ARCHITECTURES}".deb
247 then
248 for FILE in config/packages.chroot/*_"${LB_ARCHITECTURES}".deb config/packages/*_"${LB_ARCHITECTURES}".deb
126 if Find_files config/packages.chroot/*_"${LB_ARCHITECTURE}".deb || Find_files config/packages/*_"${LB_ARCHITECTURE}".deb
127 then
128 for FILE in config/packages.chroot/*_"${LB_ARCHITECTURE}".deb config/packages/*_"${LB_ARCHITECTURE}".deb
249129 do
250130 if [ -L "${FILE}" ]
251131 then
285165 Check_package chroot /usr/bin/apt-ftparchive apt-utils
286166
287167 # Installing depends
288 Install_package
168 Install_packages
289169
290170 # Generate Packages and Packages.gz
291171 echo "cd /root/packages && apt-ftparchive packages . > Packages" | Chroot chroot sh
306186 fi
307187
308188 # Removing depends
309 Remove_package
189 Remove_packages
310190 else
311191 Echo_warning "Local packages must be named with suffix '_all.deb' or '_\$architecture.deb'."
312192 fi
356236 cp -f cache/indices.bootstrap/*Release* chroot/var/lib/apt/lists
357237 fi
358238
359 if [ "${LB_APT}" = "aptitude" ] && [ ! -x /usr/bin/aptitude ]
239 if [ "${LB_APT}" = "aptitude" ] && ! command -v aptitude >/dev/null
360240 then
361241 Chroot chroot "apt-get ${APT_OPTIONS} update"
362242 Chroot chroot "apt-get ${APT_OPTIONS} install aptitude"
374254 fi
375255
376256 # Installing aptitude
377 if [ "${LB_APT}" = "aptitude" ] && [ ! -x /chroot/usr/bin/aptitude ]
257 if [ "${LB_APT}" = "aptitude" ] && [ ! $(Chroot chroot "which aptitude") ]
378258 then
379259 Chroot chroot "apt-get ${APT_OPTIONS} update"
380260 Chroot chroot "apt-get ${APT_OPTIONS} install aptitude"
430310 fi
431311
432312 # Saving cache
433 Save_cache cache/packages.chroot
313 Save_package_cache chroot
434314
435315 # Creating stage file
436 Create_stagefile .build/chroot_archives
316 Create_stagefile
437317 ;;
438318
439319 remove)
440320 Echo_message "Deconfiguring file /etc/apt/sources.list"
441321
442 # Checking lock file
443 Check_lockfile .lock
444
445 # Creating lock file
446 Create_lockfile .lock
322 # Acquire lock file
323 Acquire_lockfile
447324
448325 # Restore top-level sources
449326 if [ -e chroot/etc/apt/sources.list.d/zz-sources.list ]
457334 mkdir -p chroot/var/lib/apt/lists/partial
458335
459336 # Configure custom sources.list
460
461 cat > chroot/etc/apt/${_PARENT_FILE} << EOF
462 deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY} ${LB_PARENT_ARCHIVE_AREAS}
463 EOF
464
465 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
466 then
467 echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY} ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
468 fi
469
470 if [ "${LB_DERIVATIVE}" = "true" ]
471 then
472 rm -f chroot/etc/apt/sources.list.d/${LB_MODE}.list
473
474 _DISTRIBUTION="$(echo ${LB_DISTRIBUTION_BINARY} | sed -e 's|-backports||')"
475
476 echo "deb ${LB_MIRROR_BINARY} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
477
478 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
479 then
480 echo "deb-src ${LB_MIRROR_BINARY} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
481 fi
482 fi
483
484 if [ "${LB_SECURITY}" = "true" ]
485 then
486 case "${LB_MODE}" in
487 debian|progress-linux)
488 case "${LB_PARENT_DISTRIBUTION_BINARY}" in
489 sid)
490
491 ;;
492
493 *)
494 echo "deb ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION_BINARY}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
495
496 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
497 then
498 echo "deb-src ${LB_PARENT_MIRROR_BINARY_SECURITY} ${LB_PARENT_DISTRIBUTION_BINARY}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
499 fi
500 ;;
501 esac
502
503 if [ "${LB_MODE}" = progress-linux ]
504 then
505 echo "deb ${LB_MIRROR_BINARY_SECURITY} ${_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
506
507 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
508 then
509 echo "deb-src ${LB_MIRROR_BINARY_SECURITY} ${_DISTRIBUTION}-security ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
510 fi
511 else
512 if [ "${LB_DERIVATIVE}" = "true" ]
513 then
514 echo "deb ${LB_MIRROR_BINARY_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
515
516 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
517 then
518 echo "deb-src ${LB_MIRROR_BINARY_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
519 fi
520 fi
521 fi
522 ;;
523 esac
524 fi
525
526 if [ "${LB_UPDATES}" = "true" ]
527 then
528 echo "deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
529
530 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
531 then
532 echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
533 fi
534
535 if [ "${LB_DERIVATIVE}" = "true" ]
536 then
537 echo "deb ${LB_MIRROR_BINARY} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
538
539 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
540 then
541 echo "deb-src ${LB_MIRROR_BINARY} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
542 fi
543 fi
544 fi
545
546 if [ "${LB_BACKPORTS}" = "true" ]
547 then
548 case "${LB_MODE}" in
549 debian)
550 if [ "${LB_PARENT_DISTRIBUTION_BINARY}" != "sid" ]
551 then
552 echo "deb ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
553
554 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
555 then
556 echo "deb-src ${LB_PARENT_MIRROR_BINARY} ${LB_PARENT_DISTRIBUTION_BINARY}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> chroot/etc/apt/${_PARENT_FILE}
557 fi
558 fi
559 ;;
560 esac
561
562 if [ "${LB_DERIVATIVE}" = "true" ]
563 then
564 echo "deb ${LB_MIRROR_BINARY} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
565
566 if [ "${_PASS}" = "source" ] || [ "${LB_APT_SOURCE_ARCHIVES}" = "true" ]
567 then
568 echo "deb-src ${LB_MIRROR_BINARY} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> chroot/etc/apt/sources.list.d/${LB_MODE}.list
569 fi
570 fi
571 fi
337 Create_apt_sources_list binary "${_PASS}"
572338
573339 # Removing chroot-only apt sources
574340 for FILE in config/archives/*.list.chroot
610376
611377 if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" = "false" ]
612378 then
613 # Strip out source archives
614 sed "/^deb-src /d" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)"
379 # Disable source archives
380 sed -i "s/^deb-src/#deb-src/g" "chroot/etc/apt/sources.list.d/$(basename ${FILE} .binary)"
615381 fi
616382 fi
617383 done
667433 rm -f chroot/etc/apt/sources.list.d/packages.list
668434 rm -rf chroot/root/packages
669435
436 # Ensure package list is removed
437 rm -f chroot/root/packages.chroot
438
670439 # Removing stage file
671 rm -f .build/chroot_archives
440 Remove_stagefile
672441 ;;
673442
674443 *)
675 Usage
444 Echo_error "Invalid action parameter: '${_ACTION}'"
445 Usage --fail
676446 ;;
677447 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'cache chroot stage')"
17 HELP=""
18 USAGE="${PROGRAM} [--force]"
17 DESCRIPTION="Cache chroot stage"
18 USAGE="${PROGRAM} {restore|save} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
26 for STAGE in ${LB_CACHE_STAGES}
27 do
28 if [ "${STAGE}" = "chroot" ]
29 then
30 case "${1}" in
31 restore)
32 Echo_message "Restoring chroot stage from cache..."
26 if ! In_list "chroot" ${LB_CACHE_STAGES}
27 then
28 exit 0
29 fi
3330
34 # Checking stage file
35 Check_stagefile .build/chroot_cache.restore
31 # Set non-default stage file name
32 # Setting to default name with appended action name
33 STAGE_FILE="$(Stagefile_name "${_ACTION}")"
3634
37 if [ -d cache/chroot ]
38 then
39 # Checking lock file
40 Check_lockfile .lock
35 case "${_ACTION}" in
36 restore)
37 Echo_message "Restoring chroot stage from cache..."
4138
42 # Creating lock file
43 Create_lockfile .lock
39 # Checking stage file
40 Check_stagefile "${STAGE_FILE}"
4441
45 # Removing old chroot
46 rm -rf chroot
42 if [ -d cache/chroot ]
43 then
44 # Acquire lock file
45 Acquire_lockfile
4746
48 # Restoring old cache
49 cp -a cache/chroot chroot
47 # Removing old chroot
48 rm -rf chroot
5049
51 # Creating stage file
52 Create_stagefile .build/chroot_cache.restore
50 # Restoring old cache
51 cp -a cache/chroot chroot
5352
54 exit 0
55 fi
56 ;;
53 # Creating stage file
54 Create_stagefile "${STAGE_FILE}"
5755
58 save)
59 Echo_message "Saving chroot stage to cache..."
56 exit 0
57 fi
58 ;;
6059
61 # Checking stage file
62 Check_stagefile .build/chroot_cache.save
60 save)
61 Echo_message "Saving chroot stage to cache..."
6362
64 # Checking lock file
65 Check_lockfile .lock
63 # Checking stage file
64 Check_stagefile "${STAGE_FILE}"
6665
67 # Creating lock file
68 Create_lockfile .lock
66 # Acquire lock file
67 Acquire_lockfile
6968
70 rm -rf cache/chroot
69 rm -rf cache/chroot
7170
72 mkdir -p cache
71 mkdir -p cache
7372
74 cp -a chroot cache/chroot
73 cp -a chroot cache/chroot
7574
76 # Creating stage file
77 Create_stagefile .build/chroot_cache.save
78 ;;
79 esac
80 fi
81 done
75 # Creating stage file
76 Create_stagefile "${STAGE_FILE}"
77 ;;
78
79 *)
80 Echo_error "Invalid action parameter: '${_ACTION}'"
81 Usage --fail
82 ;;
83 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'manage /etc/debian_chroot')"
17 HELP=""
17 DESCRIPTION="Manage /etc/debian_chroot"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 case "${_ACTION}" in
3030 install)
3131 Echo_message "Configuring file /etc/debian_chroot"
3232
3333 # Checking stage file
34 Check_stagefile .build/chroot_debianchroot
34 Check_stagefile
3535
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
4239 if [ -f chroot/etc/debian_chroot ]
4340 then
4946 echo "live" > chroot/etc/debian_chroot
5047
5148 # Creating stage file
52 Create_stagefile .build/chroot_debianchroot
49 Create_stagefile
5350 ;;
5451
5552 remove)
5653 Echo_message "Deconfiguring file /etc/debian_chroot"
5754
58 # Checking lock file
59 Check_lockfile .lock
55 # Checking stage file
56 Ensure_stagefile_exists
6057
61 # Creating lock file
62 Create_lockfile .lock
58 # Acquire lock file
59 Acquire_lockfile
6360
6461 if [ -f chroot/etc/debian_chroot.orig ]
6562 then
7168 fi
7269
7370 # Removing stage file
74 rm -f .build/chroot_debianchroot
71 Remove_stagefile
7572 ;;
7673
7774 *)
78 Usage
75 Echo_error "Invalid action parameter: '${_ACTION}'"
76 Usage --fail
7977 ;;
8078 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'mount /dev/pts')"
17 HELP=""
17 DESCRIPTION="Mount /dev/pts"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 case "${_ACTION}" in
3030 install)
3131 Echo_message "Begin mounting /dev/pts..."
3232
3333 # Checking stage file
34 Check_stagefile .build/chroot_devpts
34 Check_stagefile
3535
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
4239 # Creating mountpoint
4340 mkdir -p chroot/dev/pts
4441
4542 # Mounting /dev/pts
46 mount devpts-live -t devpts -o gid=5,mode=620 chroot/dev/pts || true
43 mount -t devpts -o gid=5,mode=620,x-gvfs-hide devpts-live chroot/dev/pts || true
4744
4845 # Creating stage file
49 Create_stagefile .build/chroot_devpts
46 Create_stagefile
5047 ;;
5148
5249 remove)
5350 Echo_message "Begin unmounting /dev/pts..."
5451
55 # Checking lock file
56 Check_lockfile .lock
52 # Checking stage file
53 Ensure_stagefile_exists
5754
58 # Creating lock file
59 Create_lockfile .lock
55 # Acquire lock file
56 Acquire_lockfile
6057
6158 # Unmounting /dev/pts
6259 if grep -qs "$(pwd)/chroot/dev/pts" /proc/mounts || Find_files chroot/dev/pts/*
6764 fi
6865
6966 # Removing stage file
70 rm -f .build/chroot_devpts
67 Remove_stagefile
7168 ;;
7269
7370 *)
74 Usage
71 Echo_error "Invalid action parameter: '${_ACTION}'"
72 Usage --fail
7573 ;;
7674 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'manage /sbin/dpkg')"
17 HELP=""
17 DESCRIPTION="Manage /sbin/dpkg"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 case "${_ACTION}" in
3030 install)
3131 Echo_message "Configuring file /sbin/start-stop-daemon"
3232
3333 # Checking stage file
34 Check_stagefile .build/chroot_dpkg
34 Check_stagefile
3535
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
4239 # Create custom start-stop-daemon program
4340 Chroot chroot dpkg-divert --rename --quiet --add /sbin/start-stop-daemon
44
45 cat > chroot/sbin/start-stop-daemon << EOF
46 #!/bin/sh
47
48 exit 0
49 EOF
50
51 chmod 755 chroot/sbin/start-stop-daemon
41 ln -fs /bin/true chroot/sbin/start-stop-daemon
5242
5343 # Disable dpkg syncing
5444
6656 ln -fs /bin/true chroot/usr/sbin/flash-kernel
6757
6858 # Creating stage file
69 Create_stagefile .build/chroot_dpkg
59 Create_stagefile
7060 ;;
7161
7262 remove)
7363 Echo_message "Deconfiguring file /sbin/start-stop-daemon"
7464
75 # Checking lock file
76 Check_lockfile .lock
65 # Checking stage file
66 Ensure_stagefile_exists
7767
78 # Creating lock file
79 Create_lockfile .lock
68 # Acquire lock file
69 Acquire_lockfile
8070
8171 # Manual hacks for special packages
8272
9585 rm -f chroot/etc/dpkg/dpkg.cfg.d/live-build
9686
9787 # Removing stage file
98 rm -f .build/chroot_dpkg
88 Remove_stagefile
9989 ;;
10090
10191 *)
102 Usage
92 Echo_error "Invalid action parameter: '${_ACTION}'"
93 Usage --fail
10394 ;;
10495 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'schedule kernel packages for installation')"
17 HELP=""
17 DESCRIPTION="Schedule firmware packages for installation"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_FIRMWARE_CHROOT}" != "true" ]
2724 then
2825 exit 0
2926 fi
3027
28 Echo_message "Begin scheduling firmware installation..."
29
3130 # Requiring stage file
32 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3332
3433 # Checking stage file
35 Check_stagefile .build/chroot_firmware
34 Check_stagefile
3635
37 # Checking lock file
38 Check_lockfile .lock
39
40 # Creating lock file
41 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4238
4339 # Checking depends
4440 Check_package host /usr/bin/wget wget
5147 #esac
5248
5349 # Include firmware packages
54 # Assumption: firmware packages install files into /lib/firmware
5550
5651 # Get all firmware packages names
57 mkdir -p cache/contents.chroot
5852
5953 FIRMWARE_PACKAGES=""
6054
61 _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION_CHROOT}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
55 # Manually add firmware-linux/non-free meta package
56 if [ "${LB_DERIVATIVE}" = "false" ] && In_list "non-free" ${LB_PARENT_ARCHIVE_AREAS}; then
57 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
58 fi
6259
63 rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
64
65 for _CONTENT in ${_CONTENTS}
66 do
67 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
68
69 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)"
70 done
71
72 if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free"
73 then
74 # Manually add firmware-linux/non-free meta package
75 if [ "${LB_DERIVATIVE}" != "true" ]
76 then
77 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
78 else
79 case "${LB_DERIVATIVE_IS_BASED_ON}" in
80 debian)
81 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
82 ;;
83 *)
84 ;;
85 esac
86 fi
87 fi
60 Firmware_List_From_Contents "${LB_PARENT_MIRROR_CHROOT}" "${LB_PARENT_DISTRIBUTION_CHROOT}" "${LB_PARENT_ARCHIVE_AREAS}"
8861
8962 if [ "${LB_DERIVATIVE}" = "true" ]
9063 then
91 # FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents).
64 # Avoid downloading things twice if distributions are identical
65 DERIVATIVE_ARCHIVE_AREAS=""
66 if [ "${LB_DISTRIBUTION_CHROOT}" != "${LB_PARENT_DISTRIBUTION_CHROOT}" ]
67 then
68 DERIVATIVE_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS}"
69 else
70 for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}
71 do
72 if ! In_list ${_ARCHIVE_AREA} ${LB_PARENT_ARCHIVE_AREAS}
73 then
74 DERIVATIVE_ARCHIVE_AREAS="${DERIVATIVE_ARCHIVE_AREAS} ${_ARCHIVE_AREA}"
75 fi
76 done
77 fi
9278
93 _CONTENTS="$(for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}; do echo ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
94
95 rm -f cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
96
97 for _CONTENT in ${_CONTENTS}
98 do
99 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
100
101 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)"
102 done
79 if [ ! -z "${DERIVATIVE_ARCHIVE_AREAS}" ]
80 then
81 Firmware_List_From_Contents "${LB_MIRROR_CHROOT}" "${LB_DISTRIBUTION_CHROOT}" "${DERIVATIVE_ARCHIVE_AREAS}"
82 fi
10383 fi
10484
10585 # Drop section and keep package names only
10989 done
11090
11191 # Some known licenses required to be accepted
112 if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free"
113 then
92 if In_list "non-free" ${LB_PARENT_ARCHIVE_AREAS}; then
11493
11594 cat >> chroot/root/packages.chroot.cfg << EOF
11695 firmware-ivtv firmware-ivtv/license/accepted boolean true
12099 fi
121100
122101 # Creating stage file
123 Create_stagefile .build/chroot_firmware
102 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'execute hacks in chroot')"
17 HELP=""
17 DESCRIPTION="Execute hacks in chroot"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 Echo_message "Begin executing hacks..."
2724
2825 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap
26 Require_stagefiles config bootstrap
3027
3128 # Checking stage file
32 Check_stagefile .build/chroot_hacks
29 Check_stagefile
3330
34 # Checking lock file
35 Check_lockfile .lock
31 # Acquire lock file
32 Acquire_lockfile
3633
37 # Creating lock file
38 Create_lockfile .lock
39
40 case "${LIVE_IMAGE_TYPE}" in
34 case "${LB_IMAGE_TYPE}" in
4135 netboot)
4236 if [ ! -f chroot/sbin/mount.cifs ]
4337 then
124118 fi
125119
126120 # Creating stage file
127 Create_stagefile .build/chroot_hacks
121 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'execute hooks in chroot')"
17 HELP=""
17 DESCRIPTION="Execute hooks in chroot"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 Echo_message "Begin executing hooks..."
2724
2825 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap
26 Require_stagefiles config bootstrap
3027
3128 # Checking stage file
32 Check_stagefile .build/chroot_hooks
29 Check_stagefile
3330
34 # Checking lock file
35 Check_lockfile .lock
36
37 # Creating lock file
38 Create_lockfile .lock
31 # Acquire lock file
32 Acquire_lockfile
3933
4034 ## Processing distribution hooks
4135
4943 mount -o remount,ro,bind config chroot/live-build/config
5044
5145 # Copying hooks
46 mkdir -p chroot/root/lb_chroot_hooks
5247 for _HOOK in ${LB_CHROOT_HOOKS}
5348 do
5449 for LOCATION in "${LIVE_BUILD}/hooks" /usr/share/live/build/hooks
5752 do
5853 if [ -e "${FILE}" ]
5954 then
60 mkdir -p chroot/root/lb_chroot_hooks
6155 cp "${FILE}" chroot/root/lb_chroot_hooks
6256 fi
6357 done
7266 Chroot chroot "/root/lb_chroot_hooks/$(basename ${_HOOK})" || { Echo_error "${_HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
7367 rm -f chroot/root/lb_chroot_hooks/"$(basename ${_HOOK})"
7468 done
75
76 rmdir chroot/root/lb_chroot_hooks
7769 fi
70 rmdir chroot/root/lb_chroot_hooks
71 rmdir --ignore-fail-on-non-empty chroot/root
7872
7973 ## Processing local hooks
80 if ls config/hooks/normal/*.chroot config/hooks/live/*.chroot > /dev/null 2>&1
74 if ls config/hooks/normal/*.chroot > /dev/null 2>&1 && (
75 ls config/hooks/live/*.chroot > /dev/null 2>&1 ||
76 ls config/hooks/live/*.container > /dev/null 2>&1 )
8177 then
78 # If a systemd-nspawn hook exists check if package is installed
79 if ls config/hooks/live/*.container > /dev/null 2>&1
80 then
81 Check_package host /usr/bin/systemd-nspawn systemd-container
82 fi
83
8284 # Restoring cache
83 Restore_cache cache/packages.chroot
85 Restore_package_cache chroot
8486
85 for HOOK in config/hooks/normal/*.chroot config/hooks/live/*.chroot
87 for HOOK in config/hooks/normal/*.chroot config/hooks/live/*.chroot config/hooks/live/*.container
8688 do
8789 if [ ! -e "${HOOK}" ]
8890 then
99101 fi
100102
101103 # Executing hook
102 Chroot chroot "/root/$(basename ${HOOK})" || { Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
104 Echo_message "Executing hook ${HOOK}..."
105 case "${HOOK}" in
106 *.container)
107 umount chroot/proc
108 systemd-nspawn --capability=all -D chroot "/root/$(basename ${HOOK})" || { Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
109 mount proc-live -t proc chroot/proc
110 ;;
111 *)
112 Chroot chroot "/root/$(basename ${HOOK})" || { Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
113 ;;
114 esac
103115
104116 # Removing hook
105117 rm -f chroot/root/"$(basename ${HOOK})"
106118 done
107119
108120 # Saving cache
109 Save_cache cache/packages.chroot
110
111 # Creating stage file
112 Create_stagefile .build/chroot_hooks
121 Save_package_cache chroot
113122 fi
114123
115124 # Remove bind mount of build config inside chroot.
116125 umount chroot/live-build/config
117126 rmdir chroot/live-build/config
118127 rmdir chroot/live-build
128
129 # Creating stage file
130 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'manage /bin/hostname')"
17 HELP=""
17 DESCRIPTION="Manage /bin/hostname"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 case "${_ACTION}" in
3030 install)
3131 # Checking stage file
32 Check_stagefile .build/chroot_hostname
32 Check_stagefile
3333
34 # Checking lock file
35 Check_lockfile .lock
36
37 # Creating lock file
38 Create_lockfile .lock
34 # Acquire lock file
35 Acquire_lockfile
3936
4037 # Create hostname file
4138 Echo_message "Configuring file /etc/hostname"
5653 chmod 755 chroot/bin/hostname
5754
5855 # Creating stage file
59 Create_stagefile .build/chroot_hostname
56 Create_stagefile
6057 ;;
6158
6259 remove)
6360 Echo_message "Deconfiguring file /etc/hostname"
6461
65 # Checking lock file
66 Check_lockfile .lock
62 # Checking stage file
63 Ensure_stagefile_exists
6764
68 # Creating lock file
69 Create_lockfile .lock
65 # Acquire lock file
66 Acquire_lockfile
7067
7168 # Copying hostname from includes, if existing
72 if [ -e config/includes.chroot/etc/hostname ]
69 INCLUDE_DIR=$(select_includes_chroot)
70 # includes.chroot_before_packages takes the highest precedence
71 if [ -e config/includes.chroot_before_packages/etc/hostname ]
7372 then
74 cp -a config/includes.chroot/etc/hostname chroot/etc/hostname
73 INCLUDE_DIR="includes.chroot_before_packages"
74 fi
75 if [ -n "${INCLUDE_DIR}" ] && [ -e config/"${INCLUDE_DIR}"/etc/hostname ]
76 then
77 cp -a config/"${INCLUDE_DIR}"/etc/hostname chroot/etc/hostname
7578 fi
7679
7780 Echo_message "Deconfiguring file /bin/hostname"
8184 Chroot chroot dpkg-divert --rename --quiet --remove /bin/hostname
8285
8386 # Removing stage file
84 rm -f .build/chroot_hostname
87 Remove_stagefile
8588 ;;
8689
8790 *)
88 Usage
91 Echo_error "Invalid action parameter: '${_ACTION}'"
92 Usage --fail
8993 ;;
9094 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'manage /etc/hosts')"
17 HELP=""
17 DESCRIPTION="Manage /etc/hosts"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 case "${_ACTION}" in
3030 install)
3131 Echo_message "Configuring file /etc/hosts"
3232
3333 # Checking stage file
34 Check_stagefile .build/chroot_hosts
34 Check_stagefile
3535
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
4239 if [ -f chroot/etc/hosts ]
4340 then
6057 fi
6158
6259 # Creating stage file
63 Create_stagefile .build/chroot_hosts
60 Create_stagefile
6461 ;;
6562
6663 remove)
6764 Echo_message "Deconfiguring file /etc/hosts"
6865
69 # Checking lock file
70 Check_lockfile .lock
66 # Checking stage file
67 Ensure_stagefile_exists
7168
72 # Creating lock file
73 Create_lockfile .lock
69 # Acquire lock file
70 Acquire_lockfile
7471
7572 if [ -e config/includes.chroot/etc/hosts ]
7673 then
8784 fi
8885
8986 # Removing stage file
90 rm -f .build/chroot_hosts
87 Remove_stagefile
9188 ;;
9289
9390 *)
94 Usage
91 Echo_error "Invalid action parameter: '${_ACTION}'"
92 Usage --fail
9593 ;;
9694 esac
+0
-54
scripts/build/chroot_includes less more
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 set -e
11
12 # Including common functions
13 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
14
15 # Setting static variables
16 DESCRIPTION="$(Echo 'copy files into chroot')"
17 HELP=""
18 USAGE="${PROGRAM} [--force]"
19
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 Echo_message "Begin copying chroot includes..."
27
28 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap
30
31 # Checking stage file
32 Check_stagefile .build/includes.chroot
33
34 # Checking lock file
35 Check_lockfile .lock
36
37 # Creating lock file
38 Create_lockfile .lock
39
40 if Find_files config/includes.chroot/
41 then
42 # Copying includes
43 cd config/includes.chroot
44 Echo_message "Creating a tarball with files from includes.chroot..."
45 tar cf "${OLDPWD}"/chroot/includes.chroot.tar .
46 cd "${OLDPWD}"
47 Echo_message "Extracting the tarball in the chroot..."
48 Chroot chroot "tar -xvf includes.chroot.tar --no-same-owner --keep-directory-symlink --overwrite"
49 rm chroot/includes.chroot.tar
50
51 # Creating stage file
52 Create_stagefile .build/includes.chroot
53 fi
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
4 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
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.
9
10
11 set -e
12
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
15
16 # Setting static variables
17 DESCRIPTION="Copy files into chroot after packages have been installed"
18 USAGE="${PROGRAM} [--force]"
19
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 Echo_message "Begin copying chroot includes after packages have been installed..."
24
25 # Requiring stage file
26 Require_stagefiles config bootstrap
27
28 # Checking stage file
29 Check_stagefile
30
31 # Acquire lock file
32 Acquire_lockfile
33
34 # Handleling backwards compatibility
35 INCLUDE_DIR=$(select_includes_chroot)
36
37 if [ -n "${INCLUDE_DIR}" ]
38 then
39 # Copying includes into chroot
40 Chroot_copy_dir config/"${INCLUDE_DIR}"/
41 fi
42
43 # Creating stage file
44 Create_stagefile
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
4 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
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.
9
10
11 set -e
12
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
15
16 # Setting static variables
17 DESCRIPTION="Copy files into chroot before packages have been installed"
18 USAGE="${PROGRAM} [--force]"
19
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 Echo_message "Begin copying chroot includes before packages have been installed..."
24
25 # Requiring stage file
26 Require_stagefiles config bootstrap
27
28 # Checking stage file
29 Check_stagefile
30
31 # Acquire lock file
32 Acquire_lockfile
33
34 if Find_files config/includes.chroot_before_packages/
35 then
36 # Copying includes into chroot
37 Chroot_copy_dir config/includes.chroot_before_packages/
38 fi
39
40 # Creating stage file
41 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'install queued packages into chroot')"
17 HELP=""
18 USAGE="${PROGRAM} [--force]"
17 DESCRIPTION="Install queued packages into chroot"
1918 USAGE="${PROGRAM} {install|live} [--force]"
2019
2120 _PASS="${1}"
2221 shift
2322
24 Arguments "${@}"
25
26 # Reading configuration files
27 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
28 Set_defaults
23 # Processing arguments and configuration files
24 Init_config_data "${@}"
2925
3026 Echo_message "Begin installing packages (${_PASS} pass)..."
3127
3228 # Requiring stage file
33 Require_stagefile .build/config .build/bootstrap
29 Require_stagefiles config bootstrap
30
31 # Set non-default stage file name
32 # Setting to default name with appended action name
33 STAGE_FILE="$(Stagefile_name "${_PASS}")"
3434
3535 # Checking stage file
36 Check_stagefile .build/chroot_install-packages.${PASS}
36 Check_stagefile "${STAGE_FILE}"
3737
38 # Checking lock file
39 Check_lockfile .lock
40
41 # Creating lock file
42 Create_lockfile .lock
38 # Acquire lock file
39 Acquire_lockfile
4340
4441 # Check for packages specified with foreign architecture
4542 _FOREIGN_ARCHITECTURES_FILE="chroot/root/packages.foreign-architectures"
7673 if [ -e chroot/root/packages.chroot ] && [ -s chroot/root/packages.chroot ]
7774 then
7875 # Restoring cache
79 Restore_cache cache/packages.chroot
76 Restore_package_cache chroot
8077
8178 # Installing packages
8279 case "${LB_APT}" in
9390 rm -f chroot/root/packages.chroot
9491
9592 # Saving cache
96 Save_cache cache/packages.chroot
93 Save_package_cache chroot
9794
9895 fi
9996
10097 # Creating stage file
101 Create_stagefile .build/chroot_install-packages.${_PASS}
98 Create_stagefile "${STAGE_FILE}"
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'make build interactive')"
17 HELP=""
17 DESCRIPTION="Make build interactive"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_INTERACTIVE}" = "false" ]
2724 then
3128 Echo_message "Begin interactive build..."
3229
3330 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3532
3633 # Checking stage file
37 Check_stagefile .build/chroot_interactive
34 Check_stagefile
3835
39 # Checking lock file
40 Check_lockfile .lock
41
42 # Creating lock file
43 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4438
4539 case "${LB_INTERACTIVE}" in
4640 true|shell)
5852 esac
5953
6054 # Creating stage file
61 Create_stagefile .build/chroot_interactive
55 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'schedule kernel packages for installation')"
17 HELP=""
17 DESCRIPTION="Schedule kernel packages for installation"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_LINUX_PACKAGES}" = "none" ]
2724 then
2825 exit 0
2926 fi
3027
28 Echo_message "Begin scheduling kernel image installation..."
29
3130 # Requiring stage file
32 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3332
3433 # Checking stage file
35 Check_stagefile .build/chroot_linux-image
34 Check_stagefile
3635
37 # Checking lock file
38 Check_lockfile .lock
39
40 # Creating lock file
41 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4238
4339 # Diverting update-initramfs
4440 #case "${LB_INITRAMFS}" in
5652 done
5753
5854 # Creating stage file
59 Create_stagefile .build/chroot_linux-image
55 Create_stagefile
+0
-87
scripts/build/chroot_live-packages less more
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 set -e
11
12 # Including common functions
13 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
14
15 # Setting static variables
16 DESCRIPTION="$(Echo 'schedule live packages for installation')"
17 HELP=""
18 USAGE="${PROGRAM} [--force]"
19
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
28
29 # Checking stage file
30 Check_stagefile .build/chroot_live-packages
31
32 # Checking lock file
33 Check_lockfile .lock
34
35 # Creating lock file
36 Create_lockfile .lock
37
38 # Queue installation of live-boot
39 if [ -n "${LB_INITRAMFS}" ] && [ "${LB_INITRAMFS}" != "none" ]
40 then
41 _PACKAGES="${LB_INITRAMFS}"
42 fi
43
44 # Queue installation of live-config
45 if [ -n "${LB_INITSYSTEM}" ] && [ "${LB_INITSYSTEM}" != "none" ]
46 then
47 _PACKAGES="${_PACKAGES} live-config live-config-${LB_INITSYSTEM}"
48 fi
49
50 # Do initsystem specific hacks
51 case "${LB_INITSYSTEM}" in
52 systemd)
53 _PACKAGES="${_PACKAGES} systemd-sysv"
54
55 if Chroot_has_package sysvinit
56 then
57 Chroot chroot "dpkg --force-remove-essential --purge sysvinit"
58 fi
59 ;;
60
61 sysvinit)
62 _PACKAGES="${_PACKAGES} sysvinit"
63
64 if Chroot_has_package systemd-sysv
65 then
66 Chroot chroot "dpkg --force-remove-essential --purge systemd systemd-sysv"
67 fi
68 ;;
69 esac
70
71 # Install live packages
72 if [ -n "${_PACKAGES}" ]
73 then
74 case "${LB_APT}" in
75 apt|apt-get)
76 Chroot chroot "apt-get ${APT_OPTIONS} install ${_PACKAGES}"
77 ;;
78
79 aptitude)
80 Chroot chroot "aptitude ${APTITUDE_OPTIONS} install ${_PACKAGES}"
81 ;;
82 esac
83
84 # Creating stage file
85 Create_stagefile .build/chroot_live-packages
86 fi
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'queue install of package lists into chroot')"
17 HELP=""
17 DESCRIPTION="Queue install of package lists into chroot"
1818 USAGE="${PROGRAM} {install|live} [--force]"
1919
2020 _PASS="${1}"
2121 shift
2222
23 Arguments "${@}"
24
25 # Reading configuration files
26 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
27 Set_defaults
23 # Processing arguments and configuration files
24 Init_config_data "${@}"
2825
2926 Echo_message "Begin queueing installation of package lists (${_PASS} pass)..."
3027
3128 # Requiring stage file
32 Require_stagefile .build/config .build/bootstrap
29 Require_stagefiles config bootstrap
30
31 # Set non-default stage file name
32 # Setting to default name with appended action name
33 STAGE_FILE="$(Stagefile_name "${_PASS}")"
3334
3435 # Checking stage file
35 Check_stagefile .build/chroot_package-lists.${_PASS}
36 Check_stagefile "${STAGE_FILE}"
3637
37 # Checking lock file
38 Check_lockfile .lock
39
40 # Creating lock file
41 Create_lockfile .lock
38 # Acquire lock file
39 Acquire_lockfile
4240
4341 # Handling local package lists
4442 if ! ( ls config/package-lists/*.list > /dev/null 2>&1 || \
5250 Check_package chroot /usr/bin/grep-aptavail dctrl-tools
5351
5452 # Restoring cache
55 Restore_cache cache/packages.chroot
53 Restore_package_cache chroot
5654
5755 # Installing depends
58 Install_package
56 Install_packages
5957
6058 if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
6159 then
6563 fi
6664
6765 for LIST in config/package-lists/*.list \
68 config/package-lists/*.list.chroot \
69 config/package-lists/*.list.chroot_${_PASS}
66 config/package-lists/*.list.chroot \
67 config/package-lists/*.list.chroot_${_PASS}
7068 do
7169 if [ -e "${LIST}" ]
7270 then
7371 # Generating package list
7472 Expand_packagelist "$(basename ${LIST})" "config/package-lists" \
75 | grep -v '^#' >> chroot/root/packages.chroot
73 | grep -v '^#' >> chroot/root/packages.chroot || true
7674 fi
7775 done
7876
8078 for _PACKAGE_ARCHITECTURE in $(Discover_package_architectures "chroot/root/packages.chroot")
8179 do
8280 # If this is a foreign architecture, append to packages.foreign-architectures
83 if [ "${_PACKAGE_ARCHITECTURE}" != "${LB_ARCHITECTURES}" ]
81 if [ "${_PACKAGE_ARCHITECTURE}" != "${LB_ARCHITECTURE}" ]
8482 then
85 Echo_message "Accepting foreign architecture: ${_PACKAGE_ARCHITECTURE}, live image architecture is: ${LB_ARCHITECTURES}"
83 Echo_message "Accepting foreign architecture: ${_PACKAGE_ARCHITECTURE}, live image architecture is: ${LB_ARCHITECTURE}"
8684 echo "${_PACKAGE_ARCHITECTURE}" >> chroot/root/packages.foreign-architectures
8785 fi
8886 done
8987
9088 rm -f chroot/bin/Packages
9189
92 Remove_package
90 Remove_packages
9391
9492 # Saving cache
95 Save_cache cache/packages.chroot
93 Save_package_cache chroot
9694
9795 # Creating stage file
98 Create_stagefile .build/chroot_package-lists.${_PASS}
96 Create_stagefile "${STAGE_FILE}"
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2020 The Debian Live team
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 set -e
11
12 # Including common functions
13 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
14
15 # Setting static variables
16 DESCRIPTION="Prep chroot"
17 USAGE="${PROGRAM} {install|remove} {all|all-except-archives|\"HELPERS\"} [MODE[ MODE..]] [--force]"
18
19 # Processing arguments and configuration files
20 Init_config_data "${@}"
21
22 # Requiring stage file
23 Require_stagefiles config bootstrap
24
25 ACTION="${1}"
26 HELPERS="${2}"
27 shift 2
28
29 if ! In_list "${ACTION}" install remove; then
30 Echo_error "Invalid action parameter"
31 exit 1
32 fi
33
34 if [ -z "${HELPERS}" ]; then
35 Echo_error "You must specify which helpers to run"
36 exit 1
37 fi
38
39 ARCHIVES_PASS=""
40 APT_ACTION="${ACTION}"
41
42 MODES="mode-archives-chroot \
43 mode-archives-binary \
44 mode-archives-source \
45 mode-apt-install-binary"
46
47 while In_list "${1}" $MODES; do
48 case "${1}" in
49 mode-archives-chroot)
50 ARCHIVES_PASS="chroot"
51 ;;
52 mode-archives-binary)
53 ARCHIVES_PASS="binary"
54 ;;
55 mode-archives-source)
56 ARCHIVES_PASS="source"
57 ;;
58 mode-apt-install-binary)
59 APT_ACTION="install-binary"
60 ;;
61 *)
62 Echo_error "Internal failure, case not covered"
63 exit 1
64 ;;
65 esac
66 shift
67 done
68
69 # Default set, EXCLUDING 'archives'
70 DEFAULT_HELPERS="devpts proc selinuxfs sysfs debianchroot dpkg tmpfs sysv-rc hosts resolv hostname apt"
71
72 case "${HELPERS}" in
73 all)
74 HELPERS="${DEFAULT_HELPERS} archives"
75 ;;
76 all-except-archives)
77 HELPERS="${DEFAULT_HELPERS}"
78 ;;
79 *)
80 # Support both comma and space separation
81 # Support with and without 'chroot_' script filename prefix
82 HELPERS="$(echo "${HELPERS}" | sed -e 's|,| |g' -e 's|^chroot_||g')"
83 ;;
84 esac
85
86 if In_list "prep" ${HELPERS}; then
87 Echo_error "Recursive!"
88 exit 1
89 fi
90
91 if In_list "archives" ${HELPERS} && [ -z "${ARCHIVES_PASS}" ]; then
92 Echo_error "Use of the archives component through chroot_prep requires specifying a mode-archives-* mode"
93 exit 1
94 fi
95
96 if In_list "archives" ${HELPERS} && ! Stagefile_exists bootstrap; then
97 Echo_warning "The 'archives' helper is selected, but the bootstrap stage has not completed."
98 fi
99
100 if [ "${ACTION}" = "remove" ]; then
101 HELPERS_REVERSED=""
102 for HELPER in $HELPERS; do
103 HELPERS_REVERSED="${HELPER}${HELPERS_REVERSED:+ $HELPERS_REVERSED}"
104 done
105 HELPERS="${HELPERS_REVERSED}"
106 fi
107
108 for HELPER in $HELPERS; do
109 case "${HELPER}" in
110 archives)
111 lb "chroot_${HELPER}" "${ARCHIVES_PASS}" "${ACTION}" "${@}"
112 ;;
113 apt)
114 lb "chroot_${HELPER}" "${APT_ACTION}" "${@}"
115 ;;
116 *)
117 lb "chroot_${HELPER}" "${ACTION}" "${@}"
118 ;;
119 esac
120 done
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'execute local preseed in chroot')"
17 HELP=""
17 DESCRIPTION="Execute local preseed in chroot"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 Echo_message "Begin executing local preseeds..."
2724
2825 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap
26 Require_stagefiles config bootstrap
3027
3128 # Checking stage file
32 Check_stagefile .build/chroot_preseed
29 Check_stagefile
3330
34 # Checking lock file
35 Check_lockfile .lock
36
37 # Creating lock file
38 Create_lockfile .lock
31 # Acquire lock file
32 Acquire_lockfile
3933
4034 if ls config/preseed/*.cfg > /dev/null 2>&1 || \
4135 ls config/preseed/*.cfg.chroot > /dev/null 2>&1 || \
4539 Check_package chroot /usr/bin/debconf-set-selections debconf
4640
4741 # Install dependency
48 Install_package
42 Install_packages
4943
5044 for PRESEED in config/preseed/*.cfg config/preseed/*.cfg.chroot chroot/root/packages.chroot.cfg
5145 do
7973 rm -f chroot/root/packages.chroot.cfg
8074
8175 # Remove dependency
82 Remove_package
76 Remove_packages
77 fi
8378
84 # Creating stage file
85 Create_stagefile .build/chroot_preseed
86 fi
79 # Creating stage file
80 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'mount /proc')"
17 HELP=""
17 DESCRIPTION="Mount /proc"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 case "${_ACTION}" in
3030 install)
3131 Echo_message "Begin mounting /proc..."
3232
3333 # Checking stage file
34 Check_stagefile .build/chroot_proc
34 Check_stagefile
3535
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
4239 # Creating mountpoint
4340 mkdir -p chroot/proc
4441
4542 # Mounting /proc
46 mount proc-live -t proc chroot/proc
43 mount -t proc -o x-gvfs-hide proc-live chroot/proc
4744
4845 # Creating stage file
49 Create_stagefile .build/chroot_proc
46 Create_stagefile
5047 ;;
5148
5249 remove)
5350 Echo_message "Begin unmounting /proc..."
5451
55 # Checking lock file
56 Check_lockfile .lock
52 # Checking stage file
53 Ensure_stagefile_exists
5754
58 # Creating lock file
59 Create_lockfile .lock
55 # Acquire lock file
56 Acquire_lockfile
6057
6158 # Workaround binfmt-support /proc locking
6259 if [ -e chroot/proc/sys/fs/binfmt_misc/status ]
7168 fi
7269
7370 # Removing stage file
74 rm -f .build/chroot_proc
71 Remove_stagefile
7572 ;;
7673
7774 *)
78 Usage
75 Echo_error "Invalid action parameter: '${_ACTION}'"
76 Usage --fail
7977 ;;
8078 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'manage /etc/resolv.conf')"
17 HELP=""
17 DESCRIPTION="Manage /etc/resolv.conf"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 case "${_ACTION}" in
3030 install)
3131 Echo_message "Configuring file /etc/resolv.conf"
3232
3333 # Checking stage file
34 Check_stagefile .build/chroot_resolv
34 Check_stagefile
3535
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
4239 if [ -e chroot/etc/resolv.conf ]
4340 then
6057 then
6158 # Copy resolv file
6259 cp /etc/resolv.conf chroot/etc/resolv.conf
60 chmod 644 chroot/etc/resolv.conf
61 Chroot chroot "chown root:root /etc/resolv.conf"
6362 fi
6463
6564 # Creating stage file
66 Create_stagefile .build/chroot_resolv
65 Create_stagefile
6766 ;;
6867
6968 remove)
7069 Echo_message "Deconfiguring file /etc/resolv.conf"
7170
72 # Checking lock file
73 Check_lockfile .lock
71 # Checking stage file
72 Ensure_stagefile_exists
7473
75 # Creating lock file
76 Create_lockfile .lock
74 # Acquire lock file
75 Acquire_lockfile
7776
78 if [ -e config/includes.chroot/etc/resolv.conf ]
77 INCLUDE_DIR=$(select_includes_chroot)
78 # includes.chroot_before_packages takes the highest precedence
79 if [ -e config/includes.chroot_before_packages/etc/resolv.conf ]
80 then
81 INCLUDE_DIR="includes.chroot_before_packages"
82 fi
83 if [ -n "${INCLUDE_DIR}" ] && [ -e config/"${INCLUDE_DIR}"/etc/resolv.conf ]
7984 then
8085 # Copying local resolv.conf
81 cp -a config/includes.chroot/etc/resolv.conf chroot/etc/resolv.conf
86 cp config/"${INCLUDE_DIR}"/etc/resolv.conf chroot/etc/resolv.conf
87 chmod 644 chroot/etc/resolv.conf
88 Chroot chroot "chown root:root /etc/resolv.conf"
8289 rm -f chroot/etc/resolv.conf.orig
8390 elif [ -e chroot/etc/resolv.conf.orig ] || [ -L chroot/etc/resolv.conf.orig ]
8491 then
97104 fi
98105
99106 # Removing stage file
100 rm -f .build/chroot_resolv
107 Remove_stagefile
101108 ;;
102109
103110 *)
104 Usage
111 Echo_error "Invalid action parameter: '${_ACTION}'"
112 Usage --fail
105113 ;;
106114 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'mount /sys/fs/selinux')"
17 HELP=""
17 DESCRIPTION="Mount /sys/fs/selinux"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 # Skip if selinux is not enabled
30 if [ ! -e /sys/fs/selinux/enforce ] || [ "$(cat /sys/fs/selinux/enforce)" != "1" ]
31 then
32 Echo_debug "Skipping due to selinux being disabled..."
33 exit 0
34 fi
35
36 case "${_ACTION}" in
3037 install)
31 if [ -e /sys/fs/selinux/enforce ] && [ "$(cat /sys/fs/selinux/enforce)" = "1" ]
32 then
33 Echo_message "Begin mounting /sys/fs/selinux..."
38 Echo_message "Begin mounting /sys/fs/selinux..."
3439
35 # Checking stage file
36 Check_stagefile .build/chroot_selinuxfs
40 # Checking stage file
41 Check_stagefile
3742
38 # Checking lock file
39 Check_lockfile .lock
43 # Acquire lock file
44 Acquire_lockfile
4045
41 # Creating lock file
42 Create_lockfile .lock
46 # Create mountpoint
47 mkdir -p chroot/sys/fs/selinux
4348
44 # Create mountpoint
45 mkdir -p chroot/sys/fs/selinux
49 # Mounting /sys/fs/selinux
50 mount -t selinuxfs -o x-gvfs-hide selinuxfs-live chroot/sys/fs/selinux
4651
47 # Mounting /sys/fs/selinux
48 mount selinuxfs-live -t selinuxfs chroot/sys/fs/selinux
49
50 # Creating stage file
51 Create_stagefile .build/chroot_selinuxfs
52 fi
52 # Creating stage file
53 Create_stagefile
5354 ;;
5455
5556 remove)
5657 Echo_message "Begin unmounting /sys/fs/selinux..."
5758
58 # Checking lock file
59 Check_lockfile .lock
59 # Checking stage file
60 Ensure_stagefile_exists
6061
61 # Creating lock file
62 Create_lockfile .lock
62 # Acquire lock file
63 Acquire_lockfile
6364
6465 # Unmounting /sys/fs/selinux
6566 if [ -e chroot/sys/fs/selinux/enforce ]
6869 fi
6970
7071 # Removing stage file
71 rm -f .build/chroot_selinux
72 Remove_stagefile
7273 ;;
7374
7475 *)
75 Usage
76 Echo_error "Invalid action parameter: '${_ACTION}'"
77 Usage --fail
7678 ;;
7779 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'mount /sys')"
17 HELP=""
17 DESCRIPTION="Mount /sys"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 case "${_ACTION}" in
3030 install)
3131 Echo_message "Begin mounting /sys..."
3232
3333 # Checking stage file
34 Check_stagefile .build/chroot_sysfs
34 Check_stagefile
3535
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
4239 # Create mountpoint
4340 mkdir -p chroot/sys
4441
4542 # Mounting /sys
46 mount sysfs-live -t sysfs chroot/sys
43 mount -t sysfs -o x-gvfs-hide sysfs-live chroot/sys
4744
4845 # Creating stage file
49 Create_stagefile .build/chroot_sysfs
46 Create_stagefile
5047 ;;
5148
5249 remove)
5350 Echo_message "Begin unmounting /sys..."
5451
55 # Checking lock file
56 Check_lockfile .lock
52 # Checking stage file
53 Ensure_stagefile_exists
5754
58 # Creating lock file
59 Create_lockfile .lock
55 # Acquire lock file
56 Acquire_lockfile
6057
6158 # Unmounting /sys
6259 if [ -e chroot/sys/class ]
6562 fi
6663
6764 # Removing stage file
68 rm -f .build/chroot_sysfs
65 Remove_stagefile
6966 ;;
7067
7168 *)
72 Usage
69 Echo_error "Invalid action parameter: '${_ACTION}'"
70 Usage --fail
7371 ;;
7472 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'manage /usr/sbin/policy-rc.d')"
17 HELP=""
17 DESCRIPTION="Manage /usr/sbin/policy-rc.d"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 # Requiring stage file
27 Require_stagefile .build/config .build/bootstrap
27 Require_stagefiles config bootstrap
2828
29 case "${1}" in
29 case "${_ACTION}" in
3030 install)
3131 Echo_message "Configuring file /usr/sbin/policy-rc.d"
3232
3333 # Checking stage file
34 Check_stagefile .build/chroot_sysv-rc
34 Check_stagefile
3535
36 # Checking lock file
37 Check_lockfile .lock
38
39 # Creating lock file
40 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4138
4239 if [ -e chroot/usr/sbin/policy-rc.d ]
4340 then
5552 chmod 0755 chroot/usr/sbin/policy-rc.d
5653
5754 # Creating stage file
58 Create_stagefile .build/chroot_sysv-rc
55 Create_stagefile
5956 ;;
6057
6158 remove)
6259 Echo_message "Deconfiguring file /usr/sbin/policy-rc.d"
6360
64 # Checking lock file
65 Check_lockfile .lock
61 # Checking stage file
62 Ensure_stagefile_exists
6663
67 # Creating lock file
68 Create_lockfile .lock
64 # Acquire lock file
65 Acquire_lockfile
6966
7067 # Remove custom policy-rc.d file
7168 rm -f chroot/usr/sbin/policy-rc.d
7774 fi
7875
7976 # Removing stage file
80 rm -f .build/chroot_sysv-rc
77 Remove_stagefile
8178 ;;
8279
8380 *)
84 Usage
81 Echo_error "Invalid action parameter: '${_ACTION}'"
82 Usage --fail
8583 ;;
8684 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'use tmpfs to speedup the build')"
17 HELP=""
17 DESCRIPTION="Use tmpfs to speedup the build"
1818 USAGE="${PROGRAM} {install|remove} [--force]"
1919
20 Arguments "${@}"
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2122
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
23 _ACTION="${1}"
24 shift
2525
2626 if [ "${LB_BUILD_WITH_TMPFS}" != "true" ]
2727 then
2929 fi
3030
3131 # Requiring stage file
32 Require_stagefile .build/config .build/bootstrap
32 Require_stagefiles config bootstrap
3333
34 case "${1}" in
34 case "${_ACTION}" in
3535 install)
3636 Echo_message "Configuring tmpfs for /var/lib/dpkg"
3737
3838 # Checking stage file
39 Check_stagefile .build/chroot_tmpfs
39 Check_stagefile
4040
41 # Checking lock file
42 Check_lockfile .lock
43
44 # Creating lock file
45 Create_lockfile .lock
41 # Acquire lock file
42 Acquire_lockfile
4643
4744 mv chroot/var/lib/dpkg chroot/var/lib/dpkg.tmp
4845 mkdir chroot/var/lib/dpkg
49 mount -t tmpfs tmpfs chroot/var/lib/dpkg
46 mount -t tmpfs -o x-gvfs-hide tmpfs chroot/var/lib/dpkg
5047 mv chroot/var/lib/dpkg.tmp/* chroot/var/lib/dpkg
5148 rm -rf chroot/var/lib/dpkg.tmp
5249
5350 # Creating stage file
54 Create_stagefile .build/chroot_tmpfs
51 Create_stagefile
5552 ;;
5653
5754 remove)
5855 Echo_message "Deconfiguring tmpfs for /var/lib/dpkg"
5956
60 # Checking lock file
61 Check_lockfile .lock
57 # Checking stage file
58 Ensure_stagefile_exists
6259
63 # Creating lock file
64 Create_lockfile .lock
60 # Acquire lock file
61 Acquire_lockfile
6562
6663 mkdir -p chroot/var/lib/dpkg.tmp
6764 mv chroot/var/lib/dpkg/* chroot/var/lib/dpkg.tmp
7067 mv chroot/var/lib/dpkg.tmp chroot/var/lib/dpkg
7168
7269 # Removing stage file
73 rm -f .build/chroot_tmpfs
70 Remove_stagefile
7471 ;;
7572
7673 *)
77 Usage
74 Echo_error "Invalid action parameter: '${_ACTION}'"
75 Usage --fail
7876 ;;
7977 esac
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1213 # Including common functions
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
15 # Read meta config
16 if [ "${1}" != "noauto" ] && [ -x auto/clean ]
17 then
18 Echo_message "Executing auto/clean script."
19 ./auto/clean "${@}"
20 exit ${?}
21 fi
22
23 if [ "${1}" = "noauto" ]
24 then
16 # Redirecting to auto script if required
17 if [ "${1}" = "noauto" ]; then
2518 shift
19 else
20 Maybe_auto_redirect clean "${@}"
2621 fi
2722
2823 # Setting static variables
29 DESCRIPTION="$(Echo 'clean up system build directories')"
30 HELP=""
31 USAGE="${PROGRAM} [--all] [--cache] [--chroot] [--binary] [--purge] [--remove] [--stage] [--source]"
32
33 #Arguments "${@}"
34
35 # Reading configuration files
36 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
37 Set_defaults
38
39 # Avoid cases were users accidentally nuke their config/binary
24 DESCRIPTION="Clean up system build directories"
25 USAGE="${PROGRAM} [--all] [--cache] [--chroot] [--binary] [--purge] [--remove] [--stage] [--source] [COMMON_OPTIONS]"
26
27 # Reading, preparing and validating config
28 Read_conffiles $(Common_conffiles)
29 Prepare_config
30 #Validate_config
31
32 # Avoiding cases were users accidentally nuke their config/binary
4033 if [ ! -d config ] && [ "$(basename ${PWD})" = "config" ]
4134 then
4235 Echo_error "%s is not a good live-build working directory to clean." "${PWD}"
4336 exit 1
4437 fi
4538
46 rm -f .lock
47
48 if [ -z "${1}" ]
49 then
50 ARGUMENTS="--all"
51 else
52 ARGUMENTS="${@}"
53 fi
54
55 for ARGUMENT in ${ARGUMENTS}
56 do
39 Remove_lockfile
40
41 ACTION_SELECTED="false"
42
43 for ARGUMENT in "${@}"; do
44 IS_ACTION="true"
5745 case "${ARGUMENT}" in
5846 --all)
59 "${0}" noauto --chroot
60 "${0}" noauto --binary
61 "${0}" noauto --stage
62 "${0}" noauto --source
63
64 rmdir --ignore-fail-on-non-empty auto > /dev/null 2>&1 || true
65 rmdir --ignore-fail-on-non-empty local/bin > /dev/null 2>&1 || true
66 rmdir --ignore-fail-on-non-empty local > /dev/null 2>&1 || true
47 RM_ALL="true"
6748 ;;
6849
6950 --cache)
70 rm -rf cache
51 RM_CACHE="true"
7152 ;;
7253
7354 --chroot)
74 Echo_message "Cleaning chroot"
75 umount -f chroot/run > /dev/null 2>&1 || true
76 umount -f chroot/sys > /dev/null 2>&1 || true
77 umount -f chroot/proc/sys/fs/binfmt_misc > /dev/null 2>&1 || true
78 umount -f chroot/proc > /dev/null 2>&1 || true
79 umount -f chroot/lib/init/rw > /dev/null 2>&1 || true
80 umount -f chroot/dev/shm > /dev/null 2>&1 || true
81 umount -f chroot/dev/pts > /dev/null 2>&1 || true
82 umount -f chroot/dev > /dev/null 2>&1 || true
83 umount -f chroot/var/lib/dpkg > /dev/null 2>&1 || true
84 umount -f chroot/root/config > /dev/null 2>&1 || true
85
86 umount -f chroot/binary.tmp > /dev/null 2>&1 || true
87 umount -f chroot/dev.tmp/pts > /dev/null 2>&1 || true
88
89 rm -rf chroot chroot.tmp
90
91 rm -f chroot.packages.live chroot.packages.install
92 rm -f chroot.files
93
94 rm -f .build/chroot*
55 RM_CHROOT="true"
9556 ;;
9657
9758 --binary)
98 umount -f binary.tmp > /dev/null 2>&1 || true
99 rm -rf binary.tmp binary.deb binary.udeb
100 rm -f ${LIVE_IMAGE_NAME}*.iso
101 rm -f ${LIVE_IMAGE_NAME}*.img
102 rm -f ${LIVE_IMAGE_NAME}*.tar.gz
103 rm -f ${LIVE_IMAGE_NAME}*.zsync*
104 rm -f ${LIVE_IMAGE_NAME}.sh
105 rm -f ${LIVE_IMAGE_NAME}*.contents ${LIVE_IMAGE_NAME}*.packages ${LIVE_IMAGE_NAME}*.files
106 rm -f ${LIVE_IMAGE_NAME}*.iso-ONIE.bin
107 rm -f MD5SUMS SHA1SUMS SHA256SUMS SHA512SUMS
108 rm -f md5sum.txt sha1sum.txt sha256sum.txt sha512sum.txt
109
110 rm -rf binary
111 rm -rf tftpboot
112
113 rm -f .build/binary*
59 RM_BINARY="true"
11460 ;;
11561
11662 --remove)
117 "${0}" --all
118 rm -rf cache/packages.*
63 RM_REMOVE="true"
11964 ;;
12065
12166 --purge)
122 "${0}" --all
123 "${0}" --cache
124
125 if [ -e auto/config ]
126 then
127 rm -f .build/config
128 fi
67 RM_PURGE="true"
12968 ;;
13069
13170 --stage)
132 rm -rf .build/*
71 RM_STAGE="true"
13372 ;;
13473
13574 --source)
136 rm -f ${LIVE_IMAGE_NAME}-source*.iso
137 rm -f ${LIVE_IMAGE_NAME}-source*.img
138 rm -f ${LIVE_IMAGE_NAME}-source*.tar
139 rm -f ${LIVE_IMAGE_NAME}-source*.tar.gz
140 rm -f ${LIVE_IMAGE_NAME}-source*.list
141 rm -f ${LIVE_IMAGE_NAME}-source-selection.txt
142
143 rm -rf source
144
145 rm -f .build/source*
146 ;;
147
148 -h|--help)
149 Help
150 ;;
151
152 -u|--usage)
153 Usage
154 ;;
155
156 -v|--version)
157 echo "${VERSION}"
158 exit 0
75 RM_SOURCE="true"
15976 ;;
16077
16178 *)
162 Usage
163 exit 1
79 IS_ACTION="false"
80 ;;
81 esac
82 if [ "${IS_ACTION}" = "true" ]; then
83 ACTION_SELECTED="true"
84 continue
85 fi
86
87 case "${ARGUMENT}" in
88 --breakpoints|--color|--debug|--force|-h|--help|--no-color|--quiet|-u|--usage|--verbose|-v|--version)
89 Handle_common_option "${ARGUMENT}"
90 shift
91 ;;
92
93 *)
94 Echo_error "invalid arguments"
95 Usage --fail
16496 ;;
16597 esac
16698 done
99 if [ "${ACTION_SELECTED}" = "false" ]; then
100 RM_ALL="true"
101 fi
102
103 STAGEFILES_DIR="$(Stagefiles_dir)"
104
105 if [ "${RM_PURGE}" = "true" ]; then
106 Echo_debug "Initialising --purge cleaning"
107 RM_ALL="true"
108 RM_CACHE="true"
109 # Clear config stagefile
110 if [ -e auto/config ]; then
111 Remove_stagefile config
112 fi
113 fi
114
115 if [ "${RM_REMOVE}" = "true" ]; then
116 Echo_debug "Initialising --remove cleaning"
117 RM_ALL="true"
118 rm -rf cache/packages.*
119 fi
120
121 if [ "${RM_ALL}" = "true" ]; then
122 Echo_debug "Initialising --all cleaning"
123 RM_STAGE="true"
124 RM_CHROOT="true"
125 RM_BINARY="true"
126 RM_SOURCE="true"
127 rmdir --ignore-fail-on-non-empty auto > /dev/null 2>&1 || true
128 rmdir --ignore-fail-on-non-empty local/bin > /dev/null 2>&1 || true
129 rmdir --ignore-fail-on-non-empty local > /dev/null 2>&1 || true
130 fi
131
132 if [ "${RM_STAGE}" = "true" ]; then
133 Echo_debug "Cleaning stage files"
134 rm -rf "${STAGEFILES_DIR}"/*
135 fi
136
137 if [ "${RM_CACHE}" = "true" ]; then
138 Echo_debug "Cleaning cache"
139 rm -rf cache
140 fi
141
142 if [ "${RM_CHROOT}" = "true" ]; then
143 # This one is not debug because it can potentially take some time
144 Echo_message "Cleaning chroot"
145 umount -f chroot/run > /dev/null 2>&1 || true
146 umount -f chroot/sys > /dev/null 2>&1 || true
147 umount -f chroot/proc/sys/fs/binfmt_misc > /dev/null 2>&1 || true
148 umount -f chroot/proc > /dev/null 2>&1 || true
149 umount -f chroot/lib/init/rw > /dev/null 2>&1 || true
150 umount -f chroot/dev/shm > /dev/null 2>&1 || true
151 umount -f chroot/dev/pts > /dev/null 2>&1 || true
152 umount -f chroot/dev > /dev/null 2>&1 || true
153 umount -f chroot/var/lib/dpkg > /dev/null 2>&1 || true
154 umount -f chroot/root/config > /dev/null 2>&1 || true
155
156 umount -f chroot/binary.tmp > /dev/null 2>&1 || true
157 umount -f chroot/dev.tmp/pts > /dev/null 2>&1 || true
158
159 rm -rf chroot chroot.tmp
160
161 rm -f chroot.packages.live chroot.packages.install
162 rm -f chroot.files
163
164 rm -f "$(Installed_tmp_packages_file)"
165
166 rm -f "${STAGEFILES_DIR}"/chroot*
167 fi
168
169 if [ "${RM_BINARY}" = "true" ]; then
170 Echo_debug "Cleaning binary"
171 umount -f binary.tmp > /dev/null 2>&1 || true
172 rm -rf binary.tmp binary.deb binary.udeb
173 rm -f ${LB_IMAGE_NAME}*.iso
174 rm -f ${LB_IMAGE_NAME}*.img
175 rm -f ${LB_IMAGE_NAME}*.tar.gz
176 rm -f ${LB_IMAGE_NAME}*.zsync*
177 rm -f ${LB_IMAGE_NAME}.sh
178 rm -f ${LB_IMAGE_NAME}*.contents ${LB_IMAGE_NAME}*.packages ${LB_IMAGE_NAME}*.files
179 rm -f ${LB_IMAGE_NAME}*.iso-ONIE.bin
180 rm -f MD5SUMS SHA1SUMS SHA256SUMS SHA512SUMS
181 rm -f md5sum.txt sha1sum.txt sha256sum.txt sha512sum.txt
182 rm -f binary.modified_timestamps
183
184 rm -rf binary
185 rm -rf tftpboot
186
187 rm -f "${STAGEFILES_DIR}"/binary*
188 fi
189
190 if [ "${RM_SOURCE}" = "true" ]; then
191 Echo_debug "Cleaning source"
192 rm -f ${LB_IMAGE_NAME}-source*.iso
193 rm -f ${LB_IMAGE_NAME}-source*.img
194 rm -f ${LB_IMAGE_NAME}-source*.tar
195 rm -f ${LB_IMAGE_NAME}-source*.tar.gz
196 rm -f ${LB_IMAGE_NAME}-source*.list
197 rm -f ${LB_IMAGE_NAME}-source-selection.txt
198
199 rm -rf source
200
201 rm -f "${STAGEFILES_DIR}"/source*
202 fi
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 PROGRAM="lb config"
17 DESCRIPTION="$(Echo 'create configuration for live-build(7)')"
18 USAGE="${PROGRAM} [--apt apt|aptitude]\n\
17 DESCRIPTION="Create configuration for live-build(7)"
18 USAGE="${PROGRAM} [--apt apt|apt-get|aptitude]\n\
1919 \t [--apt-ftp-proxy URL]\n\
2020 \t [--apt-http-proxy URL]\n\
2121 \t [--apt-indices true|false]\n\
2525 \t [--apt-secure true|false]\n\
2626 \t [--apt-source-archives true|false]\n\
2727 \t [--aptitude-options OPTION|\"OPTIONS\"]\n\
28 \t [-a|--architectures ARCHITECTURE]\n\
28 \t [-a|--architecture ARCHITECTURE]\n\
2929 \t [--archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\
3030 \t [--backports true|false]\n\
3131 \t [--binary-filesystem fat16|fat32|ext2|ext3|ext4|ntfs]\n\
32 \t [-b|--binary-images iso|iso-hybrid|netboot|tar|hdd]\n\
32 \t [-b|--binary-image iso|iso-hybrid|netboot|tar|hdd]\n\
3333 \t [--bootappend-install PARAMETER|\"PARAMETERS\"]\n\
3434 \t [--bootappend-live PARAMETER|\"PARAMETERS\"]\n\
3535 \t [--bootappend-live-failsafe PARAMETER|\"PARAMETERS\"]\n\
36 \t [--bootloaders grub-legacy|grub-pc|syslinux|grub-efi]\n\
36 \t [--bootloaders grub-legacy|grub-pc|syslinux|grub-efi|\"BOOTLOADERS\"]\n\
3737 \t [--bootstrap-qemu-arch ARCH]\n\
38 \t [--bootstrap-qemu-exclude PACKAGES]\n\
38 \t [--bootstrap-qemu-exclude PACKAGE|\"PACKAGES\"]\n\
3939 \t [--bootstrap-qemu-static PATH]\n\
4040 \t [--breakpoints]\n\
4141 \t [--build-with-chroot true|false]\n\
4545 \t [--cache-stages STAGE|\"STAGES\"]\n\
4646 \t [--checksums md5|sha1|sha224|sha256|sha384|sha512|none]\n\
4747 \t [--chroot-filesystem ext2|ext3|ext4|squashfs|jffs2|none]\n\
48 \t [--chroot-squashfs-compression-level LEVEL]\n\
49 \t [--chroot-squashfs-compression-type gzip|lzma|lzo|lz4|xz|zstd]\n\
4850 \t [--clean]\n\
4951 \t [--color]\n\
5052 \t [--compression bzip2|gzip|lzip|xz|none]\n\
5254 \t [--config GIT_URL::GIT_BRANCH]\n\
5355 \t [--debconf-frontend dialog|editor|noninteractive|readline]\n\
5456 \t [--debconf-priority low|medium|high|critical]\n\
55 \t [--debian-installer true|cdrom|netinst|netboot|businesscard|live|false]\n\
57 \t [--debian-installer cdrom|netinst|netboot|businesscard|live|none]\n\
5658 \t [--debian-installer-distribution daily|CODENAME]\n\
5759 \t [--debian-installer-gui true|false]\n\
5860 \t [--debian-installer-preseedfile FILE|URL]\n\
59 \t [--debootstrap-options OPTIONS]\n\
61 \t [--debootstrap-options OPTION|\"OPTIONS\"]\n\
6062 \t [--debootstrap-script SCRIPT]\n\
6163 \t [--debug]\n\
6264 \t [-d|--distribution CODENAME]\n\
6365 \t [--distribution-binary CODENAME]\n\
6466 \t [--distribution-chroot CODENAME]\n\
6567 \t [--dump]\n\
66 \t [--fdisk fdisk|fdisk.dist]\n\
6768 \t [--firmware-binary true|false]\n\
6869 \t [--firmware-chroot true|false]\n\
6970 \t [--force]\n\
70 \t [--grub-splash FILE]\n\
7171 \t [--gzip-options OPTION|\"OPTIONS\"]\n\
7272 \t [--hdd-label LABEL]\n\
7373 \t [--hdd-partition-start START]\n\
7777 \t [--initramfs none|live-boot]\n\
7878 \t [--initramfs-compression bzip2|gzip|lzma]\n\
7979 \t [--initsystem sysvinit|systemd|none]\n\
80 \t [--interactive shell]\n\
80 \t [--interactive true|shell|x11|xnest|false]\n\
8181 \t [--iso-application NAME]\n\
8282 \t [--iso-preparer NAME]\n\
8383 \t [--iso-publisher NAME]\n\
8484 \t [--iso-volume NAME]\n\
85 \t [--isohybrid-options OPTION|\"OPTIONS\"]\n\
8685 \t [--jffs2-eraseblock SIZE]\n\
8786 \t [--keyring-packages PACKAGE|\"PACKAGES\"]\n\
8887 \t [-k|--linux-flavours FLAVOUR|\"FLAVOURS\"]\n\
89 \t [--linux-packages \"PACKAGES\"]\n\
88 \t [--linux-packages PACKAGE|\"PACKAGES\"]\n\
9089 \t [--loadlin true|false]\n\
91 \t [--losetup losetup|losetup.orig]\n\
9290 \t [--memtest memtest86+|memtest86|none]\n\
9391 \t [--mirror-binary URL]\n\
9492 \t [--mirror-binary-security URL]\n\
9694 \t [--mirror-chroot URL]\n\
9795 \t [--mirror-chroot-security URL]\n\
9896 \t [--mirror-debian-installer URL]\n\
99 \t [--mode debian|progress-linux]\n\
100 \t [--net-cow-filesystem nfs|cfs]\n\
101 \t [--net-cow-mountoptions OPTIONS]\n\
102 \t [--net-cow-path PATH]\n\
103 \t [--net-cow-server IP|HOSTNAME]\n\
104 \t [--net-root-filesystem nfs|cfs]\n\
105 \t [--net-root-mountoptions OPTIONS]\n\
97 \t [--mode debian]\n\
10698 \t [--net-root-path PATH]\n\
107 \t [--net-root-server IP|HOSTNAME]\n\
10899 \t [--net-tarball true|false]\n\
100 \t [--no-color]\n\
109101 \t [--onie true|false]\n\
110 \t [--onie-kernel-cmdline \"OPTION1 OPTION2\"]\n\
102 \t [--onie-kernel-cmdline OPTION|\"OPTIONS\"]\n\
111103 \t [--parent-archive-areas ARCHIVE_AREA|\"ARCHIVE_AREAS\"]\n\
112104 \t [--parent-debian-installer-distribution CODENAME]\n\
113105 \t [--parent-distribution CODENAME]\n\
126118 \t [--swap-file-path PATH]\n\
127119 \t [--swap-file-size MB]\n\
128120 \t [--system live|normal]\n\
129 \t [--tasksel apt|aptitude|tasksel]\n\
130121 \t [--uefi-secure-boot auto|enable|disable]\n\
131122 \t [--updates true|false]\n\
123 \t [--utc-time true|false]\n\
124 \t [--validate]\n\
132125 \t [--verbose]\n\
133126 \t [--win32-loader true|false]\n\
134127 \t [--zsync true|false]"
136129
137130 Local_arguments ()
138131 {
139 LONG_OPTIONS="apt:,apt-ftp-proxy:,apt-http-proxy:,apt-options:,aptitude-options:,debootstrap-options:,debootstrap-script:,
140 apt-pipeline:,apt-recommends:,apt-secure:,apt-source-archives:,cache:,cache-indices:,cache-packages:,
141 cache-stages:,debconf-frontend:,debconf-priority:,dump,
142 initramfs:,initramfs-compression:,initsystem:,fdisk:,losetup:,mode:,system:,tasksel:,
143 architectures:,clean,
144 distribution:,parent-distribution:,parent-debian-installer-distribution:,
145 distribution-chroot:,parent-distribution-chroot:,
146 distribution-binary:,parent-distribution-binary:,
147 parent-mirror-bootstrap:,parent-mirror-chroot:,parent-mirror-chroot-security:,parent-mirror-binary:,
148 parent-mirror-binary-security:,parent-mirror-debian-installer:,
149 mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,
150 mirror-binary-security:,mirror-debian-installer:,
151 archive-areas:,parent-archive-areas:,chroot-filesystem:,
152 gzip-options:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:,
153 security:,updates:,backports:,binary-filesystem:,binary-images:,
154 apt-indices:,bootappend-install:,bootappend-live:,bootappend-live-failsafe:,bootloader:,bootloaders:,checksums:,compression:,config:,zsync:,build-with-chroot:,
155 debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
156 grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,hdd-partition-start:,iso-application:,iso-preparer:,iso-publisher:,
157 iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
158 net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,
159 net-cow-server:,net-tarball:,onie:,onie-kernel-cmdline:,firmware-binary:,firmware-chroot:,swap-file-path:,swap-file-size:,
160 loadlin:,win32-loader:,source:,source-images:,breakpoints,conffile:,color,debug,force,
161 help,ignore-system-defaults,quiet,usage,verbose,version,bootstrap-qemu-static:,bootstrap-qemu-arch:,
162 uefi-secure-boot:,
163 bootstrap-qemu-exclude:"
132 local LONG_OPTIONS
133 LONG_OPTIONS="
134 apt:,apt-ftp-proxy:,apt-http-proxy:,apt-indices:,aptitude-options:,
135 apt-options:,apt-pipeline:,apt-recommends:,apt-secure:,
136 apt-source-archives:,architecture:,architectures:,archive-areas:,
137 backports:,binary-filesystem:,binary-image:,binary-images:,
138 bootappend-install:,bootappend-live:,bootappend-live-failsafe:,
139 bootloader:,bootloaders:,bootstrap-qemu-arch:,bootstrap-qemu-exclude:,
140 bootstrap-qemu-static:,breakpoints,build-with-chroot:,
141 cache:,cache-indices:,cache-packages:,cache-stages:,checksums:,
142 chroot-filesystem:,chroot-squashfs-compression-level:,
143 chroot-squashfs-compression-type:,clean,color,compression:,conffile:,
144 config:,debconf-frontend:,debconf-priority:,debian-installer:,
145 debian-installer-distribution:,debian-installer-gui:,
146 debian-installer-preseedfile:,debootstrap-options:,debootstrap-script:,
147 debug,distribution:,distribution-binary:,distribution-chroot:,dump,
148 fdisk:,firmware-binary:,firmware-chroot:,force,
149 grub-splash:,gzip-options:,
150 hdd-label:,hdd-partition-start:,hdd-size:,help,
151 ignore-system-defaults,image-name:,initramfs:,initramfs-compression:,
152 initsystem:,interactive:,iso-application:,isohybrid-options:,
153 iso-preparer:,iso-publisher:,iso-volume:,
154 jffs2-eraseblock:,
155 keyring-packages:,
156 linux-flavours:,linux-packages:,loadlin:,losetup:,
157 memtest:,mirror-binary:,mirror-binary-security:,mirror-bootstrap:,
158 mirror-chroot:,mirror-chroot-security:,mirror-debian-installer:,mode:,
159 net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,
160 net-cow-server:,net-root-filesystem:,net-root-mountoptions:,
161 net-root-path:,net-root-server:,net-tarball:,no-color,
162 onie:,onie-kernel-cmdline:,
163 parent-archive-areas:,parent-debian-installer-distribution:,
164 parent-distribution:,parent-distribution-binary:,
165 parent-distribution-chroot:,parent-mirror-binary:,
166 parent-mirror-binary-security:,parent-mirror-bootstrap:,
167 parent-mirror-chroot:,parent-mirror-chroot-security:,
168 parent-mirror-debian-installer:,
169 quiet,
170 security:,source:,source-images:,swap-file-path:,swap-file-size:,system:,
171 tasksel:,
172 uefi-secure-boot:,updates:,utc-time:,usage,
173 validate,verbose,version,
174 win32-loader:,
175 zsync:"
164176 # Remove spaces added by indentation
165177 LONG_OPTIONS="$(echo ${LONG_OPTIONS} | tr -d ' ')"
166 ARGUMENTS="$(getopt --longoptions ${LONG_OPTIONS} --name="${PROGRAM}" --options a:d:m:k:b:s:c:huv --shell sh -- "${@}")"
167
168 if [ "${?}" != "0" ]
169 then
170 Echo_error "terminating" >&2
178
179 local ARGUMENTS
180 local ERR=0
181 ARGUMENTS="$(getopt --longoptions ${LONG_OPTIONS} --name="${PROGRAM}" --options a:d:m:k:b:s:c:huv --shell sh -- "${@}")" || ERR=$?
182
183 if [ $ERR -eq 1 ]; then
184 Echo_error "invalid arguments"
185 exit 1
186 elif [ $ERR -ne 0 ]; then
187 Echo_error "getopt failure"
171188 exit 1
172189 fi
173190
176193 while true
177194 do
178195 case "${1}" in
196
197 # Config script specific options
198
199 --clean)
200 _CLEAN="true"
201 shift
202 ;;
203
204 --config)
205 _CONFIG="${2}"
206 shift 2
207 ;;
208
209 -c|--conffile)
210 _CONFFILE="${2}"
211 shift 2
212 ;;
213
179214 --dump)
180215 # Dump version
181 if [ -x "$(which dpkg-query 2>/dev/null)" ]
182 then
183 VERSION_DPKG="$(dpkg-query -f='${Version}' --show live-build)"
216 Echo "This is live-build version %s" "${VERSION}"
217 if command -v dpkg-query >/dev/null; then
218 Echo "Installed version reported by dpkg is %s" "$(dpkg-query -f='${Version}' --show live-build)"
184219 fi
185220
186 Echo "%s: This is live-build version %s" "${0}" "${VERSION_DPKG:-${VERSION}}"
187
188221 # Dump conffile contents
189 Print_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
222 Print_conffiles $(Common_conffiles)
190223
191224 # Dump contents of directories that contain text files
225 local DIRECTORY
192226 for DIRECTORY in config/package-lists config/apt config/preseed config/rootfs
193227 do
194228 if Find_files "${DIRECTORY}"
212246 exit 0
213247 ;;
214248
215 --clean)
216 _CLEAN="true"
249 --ignore-system-defaults)
250 _IGNORE_SYSTEM_DEFAULTS="true"
217251 shift
218252 ;;
219253
220 # config/common
221 --apt)
222 LB_APT="${2}"
223 shift 2
224 ;;
225
226 --apt-ftp-proxy)
227 LB_APT_FTP_PROXY="${2}"
228 shift 2
229 ;;
230
231 --apt-http-proxy)
232 LB_APT_HTTP_PROXY="${2}"
233 shift 2
234 ;;
235
236 --apt-indices)
237 LB_APT_INDICES="${2}"
238 shift 2
239 ;;
240
241 --apt-options)
242 APT_OPTIONS="${2}"
243 shift 2
244 ;;
245
246 --aptitude-options)
247 APTITUDE_OPTIONS="${2}"
248 shift 2
249 ;;
250
251 --apt-pipeline)
252 LB_APT_PIPELINE="${2}"
253 shift 2
254 ;;
255
256 --apt-recommends)
257 LB_APT_RECOMMENDS="${2}"
258 shift 2
259 ;;
260
261 --apt-secure)
262 LB_APT_SECURE="${2}"
263 shift 2
264 ;;
265
266 --apt-source-archives)
267 LB_APT_SOURCE_ARCHIVES="${2}"
268 shift 2
269 ;;
270
271 --debootstrap-options)
272 DEBOOTSTRAP_OPTIONS="${2}"
273 shift 2
274 ;;
275
276 --debootstrap-script)
277 DEBOOTSTRAP_SCRIPT="${2}"
278 shift 2
279 ;;
280
281 --cache)
282 LB_CACHE="${2}"
283 shift 2
284 ;;
285
286 --cache-indices)
287 LB_CACHE_INDICES="${2}"
288 shift 2
289 ;;
290
291 --cache-packages)
292 LB_CACHE_PACKAGES="${2}"
293 shift 2
294 ;;
295
296 --cache-stages)
297 LB_CACHE_STAGES="${2}"
298 shift 2
299 ;;
300
301 --debconf-frontend)
302 LB_DEBCONF_FRONTEND="${2}"
303 shift 2
304 ;;
305
306 --debconf-priority)
307 LB_DEBCONF_PRIORITY="${2}"
308 shift 2
309 ;;
310
311 --initramfs)
312 LB_INITRAMFS="${2}"
313 shift 2
314 ;;
315
316 --initramfs-compression)
317 LB_INITRAMFS_COMPRESSION="${2}"
318 shift 2
319 ;;
320
321 --initsystem)
322 LB_INITSYSTEM="${2}"
323 shift 2
324 ;;
325
326 --fdisk)
327 LB_FDISK="${2}"
328 shift 2
329 ;;
330
331 --losetup)
332 LB_LOSETUP="${2}"
333 shift 2
334 ;;
335
336 --mode)
337 LB_MODE="${2}"
338 shift 2
339 ;;
340
341 --system)
342 LB_SYSTEM="${2}"
343 shift 2
344 ;;
345
346 --tasksel)
347 LB_TASKSEL="${2}"
348 shift 2
349 ;;
350
351 # config/bootstrap
352 -a|--architectures)
353 LB_ARCHITECTURES="${2}"
354 shift 2
355 ;;
356
357 -d|--distribution)
358 LB_DISTRIBUTION="${2}"
359 shift 2
360 ;;
361
362 --parent-distribution)
363 LB_PARENT_DISTRIBUTION="${2}"
364 shift 2
365 ;;
366
367 --distribution-chroot)
368 LB_DISTRIBUTION_CHROOT="${2}"
369 shift 2
370 ;;
371
372 --parent-distribution-chroot)
373 LB_PARENT_DISTRIBUTION_CHROOT="${2}"
374 shift 2
375 ;;
376
377 --distribution-binary)
378 LB_DISTRIBUTION_BINARY="${2}"
379 shift 2
380 ;;
381
382 --parent-distribution-binary)
383 LB_PARENT_DISTRIBUTION_BINARY="${2}"
384 shift 2
385 ;;
386
387 -m|--parent-mirror-bootstrap)
388 LB_PARENT_MIRROR_BOOTSTRAP="${2}"
389 shift 2
390 ;;
391
392 --parent-mirror-chroot)
393 LB_PARENT_MIRROR_CHROOT="${2}"
394 shift 2
395 ;;
396
397 --parent-mirror-chroot-security)
398 LB_PARENT_MIRROR_CHROOT_SECURITY="${2}"
399 shift 2
400 ;;
401
402 --parent-mirror-binary)
403 LB_PARENT_MIRROR_BINARY="${2}"
404 shift 2
405 ;;
406
407 --parent-mirror-binary-security)
408 LB_PARENT_MIRROR_BINARY_SECURITY="${2}"
409 shift 2
410 ;;
411
412 --parent-mirror-debian-installer)
413 LB_PARENT_MIRROR_DEBIAN_INSTALLER="${2}"
414 shift 2
415 ;;
416
417 --mirror-bootstrap)
418 LB_MIRROR_BOOTSTRAP="${2}"
419 shift 2
420 ;;
421
422 --mirror-chroot)
423 LB_MIRROR_CHROOT="${2}"
424 shift 2
425 ;;
426
427 --mirror-chroot-security)
428 LB_MIRROR_CHROOT_SECURITY="${2}"
429 shift 2
430 ;;
431
432 --mirror-binary)
433 LB_MIRROR_BINARY="${2}"
434 shift 2
435 ;;
436
437 --mirror-binary-security)
438 LB_MIRROR_BINARY_SECURITY="${2}"
439 shift 2
440 ;;
441
442 --mirror-debian-installer)
443 LB_MIRROR_DEBIAN_INSTALLER="${2}"
444 shift 2
445 ;;
446
447 --archive-areas)
448 LB_ARCHIVE_AREAS="${2}"
449 shift 2
450 ;;
451
452 --parent-archive-areas)
453 LB_PARENT_ARCHIVE_AREAS="${2}"
454 shift 2
455 ;;
456
457 # config/chroot
458 --chroot-filesystem)
459 LB_CHROOT_FILESYSTEM="${2}"
460 shift 2
461 ;;
462
463 --gzip-options)
464 GZIP_OPTIONS="${2}"
465 shift 2
466 ;;
467
468 --image-name)
469 LIVE_IMAGE_NAME="${2}"
470 shift 2
471 ;;
472
473 --interactive)
474 LB_INTERACTIVE="${2}"
475 shift 2
476 ;;
477
478 --keyring-packages)
479 LB_KEYRING_PACKAGES="${2}"
480 shift 2
481 ;;
482
483 -k|--linux-flavours)
484 LB_LINUX_FLAVOURS_WITH_ARCH="${2}"
485 shift 2
486 ;;
487
488 --linux-packages)
489 LB_LINUX_PACKAGES="${2}"
490 shift 2
491 ;;
492
493 --security)
494 LB_SECURITY="${2}"
495 shift 2
496 ;;
497
498 --updates)
499 LB_UPDATES="${2}"
500 shift 2
501 ;;
502
503 --backports)
504 LB_BACKPORTS="${2}"
505 shift 2
506 ;;
507
508 # config/binary
509 --binary-filesystem)
510 LB_BINARY_FILESYSTEM="${2}"
511 shift 2
512 ;;
513
514 -b|--binary-images)
515 LIVE_IMAGE_TYPE="${2}"
516 shift 2
517 ;;
518
519 --bootappend-live)
520 LB_BOOTAPPEND_LIVE="${2}"
521 shift 2
522 ;;
523
524 --bootappend-live-failsafe)
525 LB_BOOTAPPEND_LIVE_FAILSAFE="${2}"
526 shift 2
527 ;;
528
529 --bootappend-install)
530 LB_BOOTAPPEND_INSTALL="${2}"
531 shift 2
532 ;;
533
534 --bootloaders|--bootloader)
535 LB_BOOTLOADERS="${2}"
536 shift 2
537 ;;
538
539 --checksums)
540 LB_CHECKSUMS="${2}"
541 shift 2
542 ;;
543
544 --compression)
545 LB_COMPRESSION="${2}"
546 shift 2
547 ;;
548
549 --config)
550 _CONFIG="${2}"
551 shift 2
552 ;;
553
554 --zsync)
555 LB_ZSYNC="${2}"
556 shift 2
557 ;;
558
559 --build-with-chroot)
560 LB_BUILD_WITH_CHROOT="${2}"
561 shift 2
562 ;;
563
564 --debian-installer)
565 LB_DEBIAN_INSTALLER="${2}"
566 shift 2
567 ;;
568
569 --debian-installer-distribution)
570 LB_DEBIAN_INSTALLER_DISTRIBUTION="${2}"
571 shift 2
572 ;;
573
574 --parent-debian-installer-distribution)
575 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${2}"
576 shift 2
577 ;;
578
579 --debian-installer-preseedfile)
580 LB_DEBIAN_INSTALLER_PRESEEDFILE="${2}"
581 shift 2
582 ;;
583
584 --debian-installer-gui)
585 LB_DEBIAN_INSTALLER_GUI="${2}"
586 shift 2
587 ;;
588
589 --grub-splash)
590 LB_GRUB_SPLASH="${2}"
591 shift 2
592 ;;
593
594 --isohybrid-options)
595 LB_ISOHYBRID_OPTIONS="${2}"
596 shift 2
597 ;;
598
599 --hdd-label)
600 LB_HDD_LABEL="${2}"
601 shift 2
602 ;;
603
604 --hdd-size)
605 LB_HDD_SIZE="${2}"
606 shift 2
607 ;;
608
609 --hdd-partition-start)
610 LB_HDD_PARTITION_START="${2}"
611 shift 2
612 ;;
613
614 --iso-application)
615 LB_ISO_APPLICATION="${2}"
616 shift 2
617 ;;
618
619 --iso-preparer)
620 LB_ISO_PREPARER="${2}"
621 shift 2
622 ;;
623
624 --iso-publisher)
625 LB_ISO_PUBLISHER="${2}"
626 shift 2
627 ;;
628
629 --iso-volume)
630 LB_ISO_VOLUME="${2}"
631 shift 2
632 ;;
633
634 --jffs2-eraseblock)
635 LB_JFFS2_ERASEBLOCK="${2}"
636 shift 2
637 ;;
638
639 --memtest)
640 LB_MEMTEST="${2}"
641 shift 2
642 ;;
643
644 --net-root-filesystem)
645 LB_NET_ROOT_FILESYSTEM="${2}"
646 shift 2
647 ;;
648
649 --net-root-mountoptions)
650 LB_NET_ROOT_MOUNTOPTIONS="${2}"
651 shift 2
652 ;;
653
654 --net-root-path)
655 LB_NET_ROOT_PATH="${2}"
656 shift 2
657 ;;
658
659 --net-root-server)
660 LB_NET_ROOT_SERVER="${2}"
661 shift 2
662 ;;
663
664 --net-cow-filesystem)
665 LB_NET_COW_FILESYSTEM="${2}"
666 shift 2
667 ;;
668
669 --net-cow-mountoptions)
670 LB_NET_COW_MOUNTOPTIONS="${2}"
671 shift 2
672 ;;
673
674 --net-cow-path)
675 LB_NET_COW_PATH="${2}"
676 shift 2
677 ;;
678
679 --net-cow-server)
680 LB_NET_COW_SERVER="${2}"
681 shift 2
682 ;;
683
684 --net-tarball)
685 LB_NET_TARBALL="${2}"
686 shift 2
687 ;;
688
689 --onie)
690 LB_ONIE="${2}"
691 shift 2
692 ;;
693
694 --onie-kernel-cmdline)
695 LB_ONIE_KERNEL_CMDLINE="${2}"
696 shift 2
697 ;;
698
699 --firmware-binary)
700 LB_FIRMWARE_BINARY="${2}"
701 shift 2
702 ;;
703
704 --firmware-chroot)
705 LB_FIRMWARE_CHROOT="${2}"
706 shift 2
707 ;;
708
709 --swap-file-path)
710 LB_SWAP_FILE_PATH="${2}"
711 shift 2
712 ;;
713
714 --swap-file-size)
715 LB_SWAP_FILE_SIZE="${2}"
716 shift 2
717 ;;
718
719 --uefi-secure-boot)
720 LB_UEFI_SECURE_BOOT="${2}"
721 shift 2
722 ;;
723
724 --loadlin)
725 LB_LOADLIN="${2}"
726 shift 2
727 ;;
728
729 --win32-loader)
730 LB_WIN32_LOADER="${2}"
731 shift 2
732 ;;
733
734 --bootstrap-qemu-arch)
735 LB_BOOTSTRAP_QEMU_ARCHITECTURES="${2}"
736 shift 2
737 ;;
738
739 --bootstrap-qemu-exclude)
740 LB_BOOTSTRAP_QEMU_EXCLUDE="${2}"
741 shift 2
742 ;;
743
744 --bootstrap-qemu-static)
745 LB_BOOTSTRAP_QEMU_STATIC="${2}"
746 shift 2
747 ;;
748
749 # config/source
750 --source)
751 LB_SOURCE="${2}"
752 shift 2
753 ;;
754
755 -s|--source-images)
756 LB_SOURCE_IMAGES="${2}"
757 shift 2
758 ;;
759
760 # other
761 --breakpoints)
762 _BREAKPOINTS="true"
254 --validate)
255 _VALIDATE_MODE="true"
763256 shift
764257 ;;
765258
766 -c|--conffile)
767 _CONFFILE="${2}"
768 shift 2
259 # General options
260
261 --breakpoints|--debug|--force|-h|--help|--quiet|-u|--usage|--verbose|-v|--version)
262 Handle_common_option "${1}"
263 shift
769264 ;;
770265
771266 --color)
773268 shift
774269 ;;
775270
776 --debug)
777 _DEBUG="true"
271 --no-color)
272 _COLOR="false"
778273 shift
779274 ;;
780275
781 --force)
782 _FORCE="true"
783 shift
784 ;;
785
786 -h|--help)
787 Help
788 shift
789 ;;
790
791 --ignore-system-defaults)
792 shift
793 ;;
794
795 --quiet)
796 _QUIET="true"
797 shift
798 ;;
799
800 -u|--usage)
801 Usage
802 shift
803 ;;
804
805 --verbose)
806 _VERBOSE="true"
807 shift
808 ;;
809
810 -v|--version)
811 echo "${VERSION}"
812 exit 0
813 ;;
276 # Build config options
277
278 --apt)
279 LB_APT="${2}"
280 shift 2
281 ;;
282
283 --apt-ftp-proxy)
284 LB_APT_FTP_PROXY="${2}"
285 shift 2
286 ;;
287
288 --apt-http-proxy)
289 LB_APT_HTTP_PROXY="${2}"
290 shift 2
291 ;;
292
293 --apt-indices)
294 LB_APT_INDICES="${2}"
295 shift 2
296 ;;
297
298 --apt-options)
299 APT_OPTIONS="${2}"
300 shift 2
301 ;;
302
303 --apt-pipeline)
304 LB_APT_PIPELINE="${2}"
305 shift 2
306 ;;
307
308 --apt-recommends)
309 LB_APT_RECOMMENDS="${2}"
310 shift 2
311 ;;
312
313 --apt-secure)
314 LB_APT_SECURE="${2}"
315 shift 2
316 ;;
317
318 --apt-source-archives)
319 LB_APT_SOURCE_ARCHIVES="${2}"
320 shift 2
321 ;;
322
323 --aptitude-options)
324 APTITUDE_OPTIONS="${2}"
325 shift 2
326 ;;
327
328 -a|--architecture|--architectures)
329 LB_ARCHITECTURE="${2}"
330 shift 2
331 ;;
332
333 --archive-areas)
334 LB_ARCHIVE_AREAS="${2}"
335 shift 2
336 ;;
337
338 --backports)
339 LB_BACKPORTS="${2}"
340 shift 2
341 ;;
342
343 --binary-filesystem)
344 LB_BINARY_FILESYSTEM="${2}"
345 shift 2
346 ;;
347
348 -b|--binary-image|--binary-images)
349 LB_IMAGE_TYPE="${2}"
350 shift 2
351 ;;
352
353 --bootappend-install)
354 LB_BOOTAPPEND_INSTALL="${2}"
355 shift 2
356 ;;
357
358 --bootappend-live)
359 LB_BOOTAPPEND_LIVE="${2}"
360 shift 2
361 ;;
362
363 --bootappend-live-failsafe)
364 LB_BOOTAPPEND_LIVE_FAILSAFE="${2}"
365 shift 2
366 ;;
367
368 --bootloaders|--bootloader)
369 # This will be split up into BIOS and EFI selections by `Prepare_config()`
370 LB_BOOTLOADERS="${2}"
371 shift 2
372 ;;
373
374 --bootstrap-qemu-arch)
375 LB_BOOTSTRAP_QEMU_ARCHITECTURE="${2}"
376 shift 2
377 ;;
378
379 --bootstrap-qemu-exclude)
380 LB_BOOTSTRAP_QEMU_EXCLUDE="${2}"
381 shift 2
382 ;;
383
384 --bootstrap-qemu-static)
385 LB_BOOTSTRAP_QEMU_STATIC="${2}"
386 shift 2
387 ;;
388
389 --build-with-chroot)
390 LB_BUILD_WITH_CHROOT="${2}"
391 shift 2
392 ;;
393
394 --cache)
395 LB_CACHE="${2}"
396 shift 2
397 ;;
398
399 --cache-indices)
400 LB_CACHE_INDICES="${2}"
401 shift 2
402 ;;
403
404 --cache-packages)
405 LB_CACHE_PACKAGES="${2}"
406 shift 2
407 ;;
408
409 --cache-stages)
410 LB_CACHE_STAGES="${2}"
411 shift 2
412 ;;
413
414 --checksums)
415 LB_CHECKSUMS="${2}"
416 shift 2
417 ;;
418
419 --chroot-filesystem)
420 LB_CHROOT_FILESYSTEM="${2}"
421 shift 2
422 ;;
423
424 --chroot-squashfs-compression-level)
425 LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL="${2}"
426 shift 2
427 ;;
428
429 --chroot-squashfs-compression-type)
430 LB_CHROOT_SQUASHFS_COMPRESSION_TYPE="${2}"
431 shift 2
432 ;;
433
434 --compression)
435 LB_COMPRESSION="${2}"
436 shift 2
437 ;;
438
439 --debconf-frontend)
440 LB_DEBCONF_FRONTEND="${2}"
441 shift 2
442 ;;
443
444 --debconf-priority)
445 LB_DEBCONF_PRIORITY="${2}"
446 shift 2
447 ;;
448
449 --debian-installer)
450 LB_DEBIAN_INSTALLER="${2}"
451 shift 2
452 ;;
453
454 --debian-installer-distribution)
455 LB_DEBIAN_INSTALLER_DISTRIBUTION="${2}"
456 shift 2
457 ;;
458
459 --debian-installer-gui)
460 LB_DEBIAN_INSTALLER_GUI="${2}"
461 shift 2
462 ;;
463
464 --debian-installer-preseedfile)
465 LB_DEBIAN_INSTALLER_PRESEEDFILE="${2}"
466 shift 2
467 ;;
468
469 --debootstrap-options)
470 DEBOOTSTRAP_OPTIONS="${2}"
471 shift 2
472 ;;
473
474 --debootstrap-script)
475 DEBOOTSTRAP_SCRIPT="${2}"
476 shift 2
477 ;;
478
479 -d|--distribution)
480 LB_DISTRIBUTION="${2}"
481 shift 2
482 ;;
483
484 --distribution-binary)
485 LB_DISTRIBUTION_BINARY="${2}"
486 shift 2
487 ;;
488
489 --distribution-chroot)
490 LB_DISTRIBUTION_CHROOT="${2}"
491 shift 2
492 ;;
493
494 --fdisk)
495 Echo_warning "--fdisk is an obsolete option"
496 shift 2
497 ;;
498
499 --firmware-binary)
500 LB_FIRMWARE_BINARY="${2}"
501 shift 2
502 ;;
503
504 --firmware-chroot)
505 LB_FIRMWARE_CHROOT="${2}"
506 shift 2
507 ;;
508
509 --grub-splash)
510 Echo_warning "--grub-splash is an obsolete option"
511 shift 2
512 ;;
513
514 --gzip-options)
515 GZIP_OPTIONS="${2}"
516 shift 2
517 ;;
518
519 --hdd-label)
520 LB_HDD_LABEL="${2}"
521 shift 2
522 ;;
523
524 --hdd-partition-start)
525 LB_HDD_PARTITION_START="${2}"
526 shift 2
527 ;;
528
529 --hdd-size)
530 LB_HDD_SIZE="${2}"
531 shift 2
532 ;;
533
534 --image-name)
535 LB_IMAGE_NAME="${2}"
536 shift 2
537 ;;
538
539 --initramfs)
540 LB_INITRAMFS="${2}"
541 shift 2
542 ;;
543
544 --initramfs-compression)
545 LB_INITRAMFS_COMPRESSION="${2}"
546 shift 2
547 ;;
548
549 --initsystem)
550 LB_INITSYSTEM="${2}"
551 shift 2
552 ;;
553
554 --interactive)
555 LB_INTERACTIVE="${2}"
556 shift 2
557 ;;
558
559 --iso-application)
560 LB_ISO_APPLICATION="${2}"
561 shift 2
562 ;;
563
564 --iso-preparer)
565 LB_ISO_PREPARER="${2}"
566 shift 2
567 ;;
568
569 --iso-publisher)
570 LB_ISO_PUBLISHER="${2}"
571 shift 2
572 ;;
573
574 --iso-volume)
575 LB_ISO_VOLUME="${2}"
576 shift 2
577 ;;
578
579 --isohybrid-options)
580 Echo_warning "--isohybrid-options is an obsolete option"
581 shift 2
582 ;;
583
584 --jffs2-eraseblock)
585 LB_JFFS2_ERASEBLOCK="${2}"
586 shift 2
587 ;;
588
589 --keyring-packages)
590 LB_KEYRING_PACKAGES="${2}"
591 shift 2
592 ;;
593
594 -k|--linux-flavours)
595 LB_LINUX_FLAVOURS_WITH_ARCH="${2}"
596 shift 2
597 ;;
598
599 --linux-packages)
600 LB_LINUX_PACKAGES="${2}"
601 shift 2
602 ;;
603
604 --loadlin)
605 LB_LOADLIN="${2}"
606 shift 2
607 ;;
608
609 --losetup)
610 Echo_warning "--losetup is an obsolete option"
611 shift 2
612 ;;
613
614 --memtest)
615 LB_MEMTEST="${2}"
616 shift 2
617 ;;
618
619 --mirror-binary)
620 LB_MIRROR_BINARY="${2}"
621 shift 2
622 ;;
623
624 --mirror-binary-security)
625 LB_MIRROR_BINARY_SECURITY="${2}"
626 shift 2
627 ;;
628
629 --mirror-bootstrap)
630 LB_MIRROR_BOOTSTRAP="${2}"
631 shift 2
632 ;;
633
634 --mirror-chroot)
635 LB_MIRROR_CHROOT="${2}"
636 shift 2
637 ;;
638
639 --mirror-chroot-security)
640 LB_MIRROR_CHROOT_SECURITY="${2}"
641 shift 2
642 ;;
643
644 --mirror-debian-installer)
645 LB_MIRROR_DEBIAN_INSTALLER="${2}"
646 shift 2
647 ;;
648
649 --mode)
650 LB_MODE="${2}"
651 shift 2
652 ;;
653
654 --net-cow-filesystem)
655 Echo_warning "--net-cow-filesystem is an obsolete option"
656 shift 2
657 ;;
658
659 --net-cow-mountoptions)
660 Echo_warning "--net-cow-mountoptions is an obsolete option"
661 shift 2
662 ;;
663
664 --net-cow-path)
665 Echo_warning "--net-cow-path is an obsolete option"
666 shift 2
667 ;;
668
669 --net-cow-server)
670 Echo_warning "--net-cow-server is an obsolete option"
671 shift 2
672 ;;
673
674 --net-root-filesystem)
675 Echo_warning "--net-root-filesystem is an obsolete option"
676 shift 2
677 ;;
678
679 --net-root-mountoptions)
680 Echo_warning "--net-root-mountoptions is an obsolete option"
681 shift 2
682 ;;
683
684 --net-root-path)
685 Echo_warning "--net-root-path is an obsolete option"
686 shift 2
687 ;;
688
689 --net-root-server)
690 Echo_warning "--net-root-server is an obsolete option"
691 shift 2
692 ;;
693
694 --net-tarball)
695 LB_NET_TARBALL="${2}"
696 shift 2
697 ;;
698
699 --onie)
700 LB_ONIE="${2}"
701 shift 2
702 ;;
703
704 --onie-kernel-cmdline)
705 LB_ONIE_KERNEL_CMDLINE="${2}"
706 shift 2
707 ;;
708
709 --parent-archive-areas)
710 LB_PARENT_ARCHIVE_AREAS="${2}"
711 shift 2
712 ;;
713
714 --parent-debian-installer-distribution)
715 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${2}"
716 shift 2
717 ;;
718
719 --parent-distribution)
720 LB_PARENT_DISTRIBUTION="${2}"
721 shift 2
722 ;;
723
724 --parent-distribution-binary)
725 LB_PARENT_DISTRIBUTION_BINARY="${2}"
726 shift 2
727 ;;
728
729 --parent-distribution-chroot)
730 LB_PARENT_DISTRIBUTION_CHROOT="${2}"
731 shift 2
732 ;;
733
734 --parent-mirror-binary)
735 LB_PARENT_MIRROR_BINARY="${2}"
736 shift 2
737 ;;
738
739 --parent-mirror-binary-security)
740 LB_PARENT_MIRROR_BINARY_SECURITY="${2}"
741 shift 2
742 ;;
743
744 -m|--parent-mirror-bootstrap)
745 LB_PARENT_MIRROR_BOOTSTRAP="${2}"
746 shift 2
747 ;;
748
749 --parent-mirror-chroot)
750 LB_PARENT_MIRROR_CHROOT="${2}"
751 shift 2
752 ;;
753
754 --parent-mirror-chroot-security)
755 LB_PARENT_MIRROR_CHROOT_SECURITY="${2}"
756 shift 2
757 ;;
758
759 --parent-mirror-debian-installer)
760 LB_PARENT_MIRROR_DEBIAN_INSTALLER="${2}"
761 shift 2
762 ;;
763
764 --security)
765 LB_SECURITY="${2}"
766 shift 2
767 ;;
768
769 --source)
770 LB_SOURCE="${2}"
771 shift 2
772 ;;
773
774 -s|--source-images)
775 LB_SOURCE_IMAGES="${2}"
776 shift 2
777 ;;
778
779 --swap-file-path)
780 LB_SWAP_FILE_PATH="${2}"
781 shift 2
782 ;;
783
784 --swap-file-size)
785 LB_SWAP_FILE_SIZE="${2}"
786 shift 2
787 ;;
788
789 --system)
790 LB_SYSTEM="${2}"
791 shift 2
792 ;;
793
794 --tasksel)
795 Echo_warning "--tasksel is an obsolete option"
796 shift 2
797 ;;
798
799 --uefi-secure-boot)
800 LB_UEFI_SECURE_BOOT="${2}"
801 shift 2
802 ;;
803
804 --updates)
805 LB_UPDATES="${2}"
806 shift 2
807 ;;
808
809 --utc-time)
810 LB_UTC_TIME="${2}"
811 shift 2
812 ;;
813
814 --win32-loader)
815 LB_WIN32_LOADER="${2}"
816 shift 2
817 ;;
818
819 --zsync)
820 LB_ZSYNC="${2}"
821 shift 2
822 ;;
823
824 # Other
814825
815826 --)
816827 shift
818829 ;;
819830
820831 *)
821 Echo_error "internal error %s" "${0}"
832 Echo_error "Internal error, unhandled option: %s" "${1}"
822833 exit 1
823834 ;;
824835 esac
825836 done
826837 }
827838
839 # Processing args such that we have a value for --config if given
840 # We can thus momentarily print an appropriate message that we are ignoring it under certain circumstances
828841 Local_arguments "${@}"
829842
843 # Ignoring --config if CWD is already a git repo
844 # Only print warning from direct execution, not when run from auto script redirection, to avoid repetition
830845 if [ -e .git ] && [ -n "${_CONFIG}" ]
831846 then
832847 if [ "${1}" != "noauto" ]
837852 _CONFIG=""
838853 fi
839854
840 if [ -e .build/config ] && [ -n "${_CONFIG}" ]
855 # Ignoring --config if CWD already has a config
856 # Only print warning from direct execution, not when run from auto script redirection, to avoid repetition
857 if Stagefile_exists && [ -n "${_CONFIG}" ]
841858 then
842859 if [ "${1}" != "noauto" ]
843860 then
847864 _CONFIG=""
848865 fi
849866
867 # Otherwise, handling --config request, copying specified config
850868 if [ -n "${_CONFIG}" ]
851869 then
852870 if [ -e "${_CONFIG}" ] || [ -e "/usr/share/live/images/${_CONFIG}" ]
882900 fi
883901 fi
884902
885 # Read meta config
886 if [ "${1}" != "noauto" ] && [ -x auto/config ]
887 then
888 Echo_message "Executing auto/config script."
889 ./auto/config "${@}"
890 exit ${?}
903 # "Auto" script redirection.
904 # Re-run via "auto" script to pick up saved command-line arguments, if not already redirected.
905 # See the documentation of the Maybe_auto_redirect function for more details.
906 if [ "${1}" = "noauto" ]; then
907 shift
908 else
909 Maybe_auto_redirect config "${@}"
891910 fi
892911
893 if [ "${1}" = "noauto" ]
894 then
895 shift
896 fi
897
898 # Reading system configuration
912 # Reading config defaults configured at system level
899913 if ls /etc/live/build.conf > /dev/null 2>&1 || ls /etc/live/build/* > /dev/null 2>&1
900914 then
901 if In_list "--ignore-system-defaults" "${@}"
902 then
915 if [ "${_IGNORE_SYSTEM_DEFAULTS}" = "true" ]; then
903916 Echo_message "Ignoring defaults in %s" "/etc/live/build.conf"
904917 else
905918 Echo_message "Using defaults in %s" "/etc/live/build.conf"
908921 fi
909922 fi
910923
911 # Reading existing configuration
912 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
913
924 # Reading existing saved configuration
925 Read_conffiles $(Common_conffiles)
926
927 # Processing arguments again to overwrite just-read previously saved settings as necessary
914928 Local_arguments "${@}"
915929
930 # Loading user specified saved config file if specified
916931 if [ -n "${_CONFFILE}" ]
917932 then
918933 Read_conffiles "${_CONFFILE}"
919934 fi
920935
921 # Setting defaults
922 Set_defaults
923
924 # Checking defaults
925 Check_defaults
936 # Setting and validating config
937 Prepare_config
938 Validate_config
939
940 if [ "${_VALIDATE_MODE}" = "true" ]; then
941 Echo_message "Validation check complete! Please address any problem notices given above."
942 exit 0
943 fi
944
945 # Creating or updating saved config
926946
927947 if [ ! -e config ]
928948 then
929 Echo_message "Creating config tree for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES} system"
949 Echo_message "Creating config tree for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE} system"
930950 mkdir config
931951 else
932 Echo_message "Updating config tree for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURES} system"
952 Echo_message "Updating config tree for a ${LB_MODE}/${LB_DISTRIBUTION_BINARY}/${LB_ARCHITECTURE} system"
933953 fi
934954
935955 # Creating live-build configuration
936956 cat > config/common << EOF
937957 # config/common - common options for live-build(7)
938958
939 # \$LB_APT: set package manager
940 # (Default: ${LB_APT})
959 # Version of live-build used to build config (config format version)
960 LB_CONFIGURATION_VERSION="${LB_CONFIGURATION_VERSION}"
961
962 # Set package manager
941963 LB_APT="${LB_APT}"
942964
943 # \$LB_APT_FTP_PROXY: set apt/aptitude ftp proxy
944 # (Default: autodetected or empty)
965 # Set apt/aptitude ftp proxy
945966 LB_APT_FTP_PROXY="${LB_APT_FTP_PROXY}"
946967
947 # \$LB_APT_HTTP_PROXY: set apt/aptitude http proxy
948 # (Default: autodetected or empty)
968 # Set apt/aptitude http proxy
949969 LB_APT_HTTP_PROXY="${LB_APT_HTTP_PROXY}"
950970
951 # \$LB_APT_PIPELINE: set apt/aptitude pipeline depth
952 # (Default: ${LB_APT_PIPELINE})
971 # Set apt/aptitude pipeline depth
953972 LB_APT_PIPELINE="${LB_APT_PIPELINE}"
954973
955 # \$LB_APT_RECOMMENDS: set apt/aptitude recommends
956 # (Default: ${LB_APT_RECOMMENDS})
974 # Set apt/aptitude recommends
957975 LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS}"
958976
959 # \$LB_APT_SECURE: set apt/aptitude security
960 # (Default: ${LB_APT_SECURE})
977 # Set apt/aptitude security
961978 LB_APT_SECURE="${LB_APT_SECURE}"
962979
963 # \$LB_APT_SOURCE_ARCHIVES: set apt/aptitude source entries in sources.list
964 # (Default: ${LB_APT_SOURCE_ARCHIVES})
980 # Set apt/aptitude source entries in sources.list
965981 LB_APT_SOURCE_ARCHIVES="${LB_APT_SOURCE_ARCHIVES}"
966982
967 # \$LB_CACHE: control cache
968 # (Default: ${LB_CACHE})
983 # Control cache
969984 LB_CACHE="${LB_CACHE}"
970985
971 # \$LB_CACHE_INDICES: control if downloaded package indices should be cached
972 # (Default: ${LB_CACHE_INDICES})
986 # Control if downloaded package indices should be cached
973987 LB_CACHE_INDICES="${LB_CACHE_INDICES}"
974988
975 # \$LB_CACHE_PACKAGES: control if downloaded packages files should be cached
976 # (Default: ${LB_CACHE_PACKAGES})
989 # Control if downloaded packages files should be cached
977990 LB_CACHE_PACKAGES="${LB_CACHE_PACKAGES}"
978991
979 # \$LB_CACHE_STAGES: control if completed stages should be cached
980 # (Default: ${LB_CACHE_STAGES})
992 # Control if completed stages should be cached
981993 LB_CACHE_STAGES="${LB_CACHE_STAGES}"
982994
983 # \$LB_DEBCONF_FRONTEND: set debconf(1) frontend to use
984 # (Default: ${LB_DEBCONF_FRONTEND})
995 # Set debconf(1) frontend to use
985996 LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND}"
986997
987 # \$LB_DEBCONF_PRIORITY: set debconf(1) priority to use
988 # (Default: ${LB_DEBCONF_PRIORITY})
998 # Set debconf(1) priority to use
989999 LB_DEBCONF_PRIORITY="${LB_DEBCONF_PRIORITY}"
9901000
991 # \$LB_INITRAMFS: set initramfs hook
992 # (Default: ${LB_INITRAMFS})
1001 # Set initramfs hook
9931002 LB_INITRAMFS="${LB_INITRAMFS}"
9941003
995 # \$LB_INITRAMFS_COMPRESSION: set initramfs compression
996 # (Default: ${LB_INITRAMFS_COMPRESSION})
1004 # Set initramfs compression
9971005 LB_INITRAMFS_COMPRESSION="${LB_INITRAMFS_COMPRESSION}"
9981006
999 # \$LB_INITSYSTEM: set init system
1000 # (Default: ${LB_INITSYSTEM})
1007 # Set init system
10011008 LB_INITSYSTEM="${LB_INITSYSTEM}"
10021009
1003 # \$LB_FDISK: set fdisk program
1004 # (Default: autodetected)
1005 LB_FDISK="${LB_FDISK}"
1006
1007 # \$LB_LOSETUP: set losetup program
1008 # (Default: autodetected)
1009 LB_LOSETUP="${LB_LOSETUP}"
1010
1011 # \$LB_MODE: set distribution mode
1012 # (Default: ${LB_MODE})
1010 # Set distribution mode
10131011 LB_MODE="${LB_MODE}"
10141012
1015 # \$LB_SYSTEM: set system type
1016 # (Default: ${LB_SYSTEM})
1013 # Set system type
10171014 LB_SYSTEM="${LB_SYSTEM}"
10181015
1019 # \$LB_TASKSEL: set tasksel program
1020 # (Default: ${LB_TASKSEL})
1021 LB_TASKSEL="${LB_TASKSEL}"
1016 # Set base name of the image
1017 LB_IMAGE_NAME="${LB_IMAGE_NAME}"
1018
1019 # Set options to use with apt
1020 APT_OPTIONS="${APT_OPTIONS}"
1021
1022 # Set options to use with aptitude
1023 APTITUDE_OPTIONS="${APTITUDE_OPTIONS}"
1024
1025 # Set options to use with debootstrap
1026 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS}"
1027
1028 # Set script to use with debootstrap
1029 DEBOOTSTRAP_SCRIPT="${DEBOOTSTRAP_SCRIPT}"
1030
1031 # Set options to use with gzip
1032 GZIP_OPTIONS="${GZIP_OPTIONS}"
1033
1034 # Enable UTC timestamps
1035 LB_UTC_TIME="${LB_UTC_TIME}"
10221036
10231037 # live-build options
10241038
1025 # \$_BREAKPOINTS: enable breakpoints
1039 # Enable breakpoints
10261040 # If set here, overrides the command line option
1027 # (Default: ${_BREAKPOINTS})
10281041 #_BREAKPOINTS="${_BREAKPOINTS}"
10291042
1030 # \$_DEBUG: enable debug
1043 # Enable debug
10311044 # If set here, overrides the command line option
1032 # (Default: ${_DEBUG})
10331045 #_DEBUG="${_DEBUG}"
10341046
1035 # \$_COLOR: enable color
1047 # Enable color
10361048 # If set here, overrides the command line option
1037 # (Default: ${_COLOR})
10381049 #_COLOR="${_COLOR}"
10391050
1040 # \$_FORCE: enable force
1051 # Enable force
10411052 # If set here, overrides the command line option
1042 # (Default: ${_FORCE})
10431053 #_FORCE="${_FORCE}"
10441054
1045 # \$_QUIET: enable quiet
1055 # Enable quiet
10461056 # If set here, overrides the command line option
1047 # (Default: ${_QUIET})
10481057 #_QUIET="${_QUIET}"
10491058
1050 # \$_VERBOSE: enable verbose
1059 # Enable verbose
10511060 # If set here, overrides the command line option
1052 # (Default: ${_VERBOSE})
10531061 #_VERBOSE="${_VERBOSE}"
1054
1055 # Internal stuff (FIXME)
1056 APT_OPTIONS="${APT_OPTIONS}"
1057 APTITUDE_OPTIONS="${APTITUDE_OPTIONS}"
1058 DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS}"
1059 DEBOOTSTRAP_SCRIPT="${DEBOOTSTRAP_SCRIPT}"
1060 GZIP_OPTIONS="${GZIP_OPTIONS}"
1061 ISOHYBRID_OPTIONS="${ISOHYBRID_OPTIONS}"
10621062 EOF
10631063
10641064 # Creating lb_bootstrap_* configuration
10651065 cat > config/bootstrap << EOF
10661066 # config/bootstrap - options for live-build(7), bootstrap stage
10671067
1068 # \$LB_DISTRIBUTION: select distribution to use
1069 # (Default: ${LB_DISTRIBUTION})
1068 # Select architecture to use
1069 LB_ARCHITECTURE="${LB_ARCHITECTURE}"
1070
1071 # Select distribution to use
10701072 LB_DISTRIBUTION="${LB_DISTRIBUTION}"
10711073
1072 # \$LB_PARENT_DISTRIBUTION: select parent distribution to use
1073 # (Default: ${LB_PARENT_DISTRIBUTION})
1074 # Select parent distribution to use
10741075 LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION}"
10751076
1076 # \$LB_DISTRIBUTION_CHROOT: select distribution to use in the chroot
1077 # (Default: ${LB_DISTRIBUTION_CHROOT})
1077 # Select distribution to use in the chroot
10781078 LB_DISTRIBUTION_CHROOT="${LB_DISTRIBUTION_CHROOT}"
10791079
1080 # \$LB_PARENT_DISTRIBUTION_CHROOT: select parent distribution to use in the chroot
1081 # (Default: ${LB_PARENT_DISTRIBUTION_CHROOT})
1080 # Select parent distribution to use in the chroot
10821081 LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT}"
10831082
1084 # \$LB_DISTRIBUTION_BINARY: select distribution to use in the final image
1085 # (Default: ${LB_DISTRIBUTION_BINARY})
1083 # Select distribution to use in the final image
10861084 LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY}"
10871085
1088 # \$LB_PARENT_DISTRIBUTION_BINARY: select parent distribution to use in the final image
1089 # (Default: ${LB_PARENT_DISTRIBUTION_BINARY})
1086 # Select parent distribution to use in the final image
10901087 LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY}"
10911088
1092 # \$LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION: select parent distribution for debian-installer to use
1093 # (Default: ${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION})
1089 # Select parent distribution for debian-installer to use
10941090 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"
10951091
1096 # \$LB_PARENT_MIRROR_BOOTSTRAP: set parent mirror to bootstrap from
1097 # (Default: ${LB_PARENT_MIRROR_BOOTSTRAP})
1092 # Select archive areas to use
1093 LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS}"
1094
1095 # Select parent archive areas to use
1096 LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS}"
1097
1098 # Set parent mirror to bootstrap from
10981099 LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP}"
10991100
1100 # \$LB_PARENT_MIRROR_CHROOT: set parent mirror to fetch packages from
1101 # (Default: ${LB_PARENT_MIRROR_CHROOT})
1101 # Set parent mirror to fetch packages from
11021102 LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIRROR_CHROOT}"
11031103
1104 # \$LB_PARENT_MIRROR_CHROOT_SECURITY: set security parent mirror to fetch packages from
1105 # (Default: ${LB_PARENT_MIRROR_CHROOT_SECURITY})
1104 # Set security parent mirror to fetch packages from
11061105 LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY}"
11071106
1108 # \$LB_PARENT_MIRROR_BINARY: set parent mirror which ends up in the image
1109 # (Default: ${LB_PARENT_MIRROR_BINARY})
1107 # Set parent mirror which ends up in the image
11101108 LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY}"
11111109
1112 # \$LB_PARENT_MIRROR_BINARY_SECURITY: set security parent mirror which ends up in the image
1113 # (Default: ${LB_PARENT_MIRROR_BINARY_SECURITY})
1110 # Set security parent mirror which ends up in the image
11141111 LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY}"
11151112
1116 # \$LB_PARENT_MIRROR_DEBIAN_INSTALLER: set debian-installer parent mirror
1117 # (Default: ${LB_PARENT_MIRROR_BOOTSTRAP})
1113 # Set debian-installer parent mirror
11181114 LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER}"
11191115
1120 # \$LB_MIRROR_BOOTSTRAP: set mirror to bootstrap from
1121 # (Default: ${LB_MIRROR_BOOTSTRAP})
1116 # Set mirror to bootstrap from
11221117 LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP}"
11231118
1124 # \$LB_MIRROR_CHROOT: set mirror to fetch packages from
1125 # (Default: ${LB_MIRROR_CHROOT})
1119 # Set mirror to fetch packages from
11261120 LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT}"
11271121
1128 # \$LB_MIRROR_CHROOT_SECURITY: set security mirror to fetch packages from
1129 # (Default: ${LB_MIRROR_CHROOT_SECURITY})
1122 # Set security mirror to fetch packages from
11301123 LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY}"
11311124
1132 # \$LB_MIRROR_BINARY: set mirror which ends up in the image
1133 # (Default: ${LB_MIRROR_BINARY})
1125 # Set mirror which ends up in the image
11341126 LB_MIRROR_BINARY="${LB_MIRROR_BINARY}"
11351127
1136 # \$LB_MIRROR_BINARY_SECURITY: set security mirror which ends up in the image
1137 # (Default: ${LB_MIRROR_BINARY_SECURITY})
1128 # Set security mirror which ends up in the image
11381129 LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY}"
11391130
1140 # \$LB_MIRROR_DEBIAN_INSTALLER: set debian-installer mirror
1141 # (Default: ${LB_MIRROR_BOOTSTRAP})
1131 # Set debian-installer mirror
11421132 LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER}"
11431133
1144 # \$LB_BOOTSTRAP_QEMU_ARCHITECTURES: architectures to use foreign bootstrap
1145 # (Default: ${LB_BOOTSTRAP_QEMU_ARCHITECTURES})
1146 LB_BOOTSTRAP_QEMU_ARCHITECTURES="${LB_BOOTSTRAP_QEMU_ARCHITECTURES}"
1147
1148 # \$LB_BOOTSTRAP_QEMU_EXCLUDE: packages to exclude during foreign bootstrap
1149 # (Default: ${LB_BOOTSTRAP_QEMU_EXCLUDE})
1134 # Set architectures to use foreign bootstrap
1135 LB_BOOTSTRAP_QEMU_ARCHITECTURE="${LB_BOOTSTRAP_QEMU_ARCHITECTURE}"
1136
1137 # Set packages to exclude during foreign bootstrap
11501138 LB_BOOTSTRAP_QEMU_EXCLUDE="${LB_BOOTSTRAP_QEMU_EXCLUDE}"
11511139
1152 # \$LB_BOOTSTRAP_QEMU_STATIC: static qemu binary for foreign bootstrap
1153 # (Default: ${LB_BOOTSTRAP_QEMU_STATIC})
1140 # Set static qemu binary for foreign bootstrap
11541141 LB_BOOTSTRAP_QEMU_STATIC="${LB_BOOTSTRAP_QEMU_STATIC}"
11551142 EOF
11561143
11571144 # Creating lb_chroot_* configuration
1158 mkdir -p config/archives
1159 mkdir -p config/apt
1160 mkdir -p config/packages
1161 mkdir -p config/packages.chroot
1162 mkdir -p config/package-lists
1163 mkdir -p config/preseed
1164
11651145 cat > config/chroot << EOF
11661146 # config/chroot - options for live-build(7), chroot stage
11671147
1168 # \$LB_CHROOT_FILESYSTEM: set chroot filesystem
1169 # (Default: ${LB_CHROOT_FILESYSTEM})
1148 # Set chroot filesystem
11701149 LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}"
11711150
1172 # \$LB_UNION_FILESYSTEM: set union filesystem
1173 # (Default: ${LB_UNION_FILESYSTEM})
1151 # Set chroot squashfs compression level
1152 LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL="${LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL}"
1153
1154 # Set chroot squashfs compression type
1155 LB_CHROOT_SQUASHFS_COMPRESSION_TYPE="${LB_CHROOT_SQUASHFS_COMPRESSION_TYPE}"
1156
1157 # Set union filesystem
11741158 LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM}"
11751159
1176 # \$LB_INTERACTIVE: set interactive build
1177 # (Default: ${LB_INTERACTIVE})
1160 # Set interactive build
11781161 LB_INTERACTIVE="${LB_INTERACTIVE}"
11791162
1180 # \$LB_KEYRING_PACKAGES: set keyring packages
1181 # (Default: empty)
1163 # Set keyring packages
11821164 LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES}"
11831165
1184 # \$LB_LINUX_FLAVOURS: set kernel flavour to use
1185 # This is kept for backwards compatibility
1186 # (Default: autodetected)
1187 if [ -n "${LB_LINUX_FLAVOURS}" ]
1188 then
1189 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS}"
1190 fi
1191
1192 # \$LB_LINUX_FLAVOURS_WITH_ARCH: set kernel flavour to use (with arch)
1193 # (Default: autodetected)
1166 # Set kernel flavour to use (with arch)
11941167 LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH}"
11951168
1196 # \$LB_LINUX_PACKAGES: set kernel packages to use
1197 # (Default: autodetected)
1169 # Set kernel packages to use
11981170 LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES}"
11991171
1200 # \$LB_SECURITY: enable security updates
1201 # (Default: ${LB_SECURITY})
1172 # Enable security updates
12021173 LB_SECURITY="${LB_SECURITY}"
12031174
1204 # \$LB_UPDATES: enable updates updates
1205 # (Default: ${LB_UPDATES})
1175 # Enable updates updates
12061176 LB_UPDATES="${LB_UPDATES}"
12071177
1208 # \$LB_BACKPORTS: enable backports updates
1209 # (Default: ${LB_BACKPORTS})
1178 # Enable backports updates
12101179 LB_BACKPORTS="${LB_BACKPORTS}"
12111180 EOF
12121181
12131182 # Creating lb_binary_* configuration
1214 mkdir -p config/debian-installer
1215 mkdir -p config/includes.installer
1216 mkdir -p config/packages.binary
1217 mkdir -p config/package-lists
1218 mkdir -p config/rootfs
1219
12201183 cat > config/binary << EOF
12211184 # config/binary - options for live-build(7), binary stage
12221185
1223 # \$LB_BINARY_FILESYSTEM: set image filesystem
1224 # (Default: ${LB_BINARY_FILESYSTEM})
1186 # Set image type
1187 LB_IMAGE_TYPE="${LB_IMAGE_TYPE}"
1188
1189 # Set image filesystem
12251190 LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM}"
12261191
1227 # \$LB_APT_INDICES: set apt/aptitude generic indices
1228 # (Default: ${LB_APT_INDICES})
1192 # Set apt/aptitude generic indices
12291193 LB_APT_INDICES="${LB_APT_INDICES}"
12301194
1231 # \$LB_BOOTAPPEND_LIVE: set boot parameters
1232 # (Default: empty)
1195 # Set boot parameters
12331196 LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE}"
12341197
1235 # \$LB_BOOTAPPEND_INSTALL: set boot parameters
1236 # (Default: empty)
1198 # Set boot parameters
12371199 LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL}"
12381200
1239 # \$LB_BOOTAPPEND_LIVE_FAILSAFE: set boot parameters
1240 # (Default: empty)
1201 # Set boot parameters
12411202 LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE}"
12421203
1243 # \$LB_BOOTLOADERS: set bootloaders
1244 # (Default: ${LB_BOOTLOADERS})
1245 LB_BOOTLOADERS="${LB_BOOTLOADERS}"
1246
1247 # \$LB_CHECKSUMS: set checksums
1248 # (Default: ${LB_CHECKSUMS})
1204 # Set BIOS bootloader
1205 LB_BOOTLOADER_BIOS="${LB_BOOTLOADER_BIOS}"
1206
1207 # Set EFI bootloader
1208 LB_BOOTLOADER_EFI="${LB_BOOTLOADER_EFI}"
1209
1210 # Set checksums
12491211 LB_CHECKSUMS="${LB_CHECKSUMS}"
12501212
1251 # \$LB_COMPRESSION: set compression
1252 # (Default: ${LB_COMPRESSION})
1213 # Set compression
12531214 LB_COMPRESSION="${LB_COMPRESSION}"
12541215
1255 # \$LB_ZSYNC: set zsync
1256 # (Default: ${LB_ZSYNC})
1216 # Set zsync
12571217 LB_ZSYNC="${LB_ZSYNC}"
12581218
1259 # \${LB_BUILD_WITH_CHROOT: control if we build binary images chrooted
1260 # (Default: ${LB_BUILD_WITH_CHROOT})
1261 # DO NEVER, *NEVER*, *N*E*V*E*R* SET THIS OPTION to false.
1219 # Control if we build binary images chrooted
1220 # NEVER, *EVER*, *E*V*E*R* SET THIS OPTION to false.
12621221 LB_BUILD_WITH_CHROOT="${LB_BUILD_WITH_CHROOT}"
12631222
1264 # \$LB_DEBIAN_INSTALLER: set debian-installer
1265 # (Default: ${LB_DEBIAN_INSTALLER})
1223 # Set debian-installer
12661224 LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER}"
12671225
1268 # \$LB_DEBIAN_INSTALLER_DISTRIBUTION: set debian-installer suite
1269 # (Default: empty)
1226 # Set debian-installer suite
12701227 LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION}"
12711228
1272 # \$LB_DEBIAN_INSTALLER_PRESEEDFILE: set debian-installer preseed filename/url
1273 # (Default: ${LB_DEBIAN_INSTALLER_PRESEEDFILE})
1229 # Set debian-installer preseed filename/url
12741230 LB_DEBIAN_INSTALLER_PRESEEDFILE="${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
12751231
1276 # \$LB_DEBIAN_INSTALLER_GUI: toggle use of GUI debian-installer
1277 # (Default: ${LB_DEBIAN_INSTALLER_GUI})
1232 # Toggle use of GUI debian-installer
12781233 LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI}"
12791234
1280 # \$LB_GRUB_SPLASH: set custom grub splash
1281 # (Default: empty)
1282 LB_GRUB_SPLASH="${LB_GRUB_SPLASH}"
1283
1284 # \$LB_HDD_LABEL: set hdd label
1285 # (Default: ${LB_HDD_LABEL})
1235 # Set hdd label
12861236 LB_HDD_LABEL="${LB_HDD_LABEL}"
12871237
1288 # \$LB_HDD_SIZE: set hdd filesystem size
1289 # (Default: ${LB_HDD_SIZE})
1238 # Set hdd filesystem size
12901239 LB_HDD_SIZE="${LB_HDD_SIZE}"
12911240
1292 # \$LB_HDD_PARTITION_START: set start of partition for the hdd target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout.
1293 # (Default: ${LB_HDD_PARTITION_START})
1241 # Set start of partition for the hdd target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout.
12941242 LB_HDD_PARTITION_START="${LB_HDD_PARTITION_START}"
12951243
1296 # \$LB_ISO_APPLICATION: set iso author
1297 # (Default: ${LB_ISO_APPLICATION})
1244 # Set iso author
12981245 LB_ISO_APPLICATION="${LB_ISO_APPLICATION}"
12991246
1300 # \$LB_ISO_PREPARER: set iso preparer
1301 # (Default: ${LB_ISO_PREPARER})
1247 # Set iso preparer
13021248 LB_ISO_PREPARER="${LB_ISO_PREPARER}"
13031249
1304 # \$LB_ISO_PUBLISHER: set iso publisher
1305 # (Default: ${LB_ISO_PUBLISHER})
1250 # Set iso publisher
13061251 LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER}"
13071252
1308 # \$LB_ISO_VOLUME: set iso volume (max 32 chars)
1309 # (Default: ${LB_ISO_VOLUME})
1253 # Set iso volume (max 32 chars)
13101254 LB_ISO_VOLUME="${LB_ISO_VOLUME}"
13111255
1312 # \$LB_JFFS2_ERASEBLOCK: set jffs2 eraseblock size
1313 # (Default: unset)
1314 LB_JFFS2_ERASEBLOCK=""
1315
1316 # \$LB_MEMTEST: set memtest
1317 # (Default: ${LB_MEMTEST})
1256 # Set jffs2 eraseblock size
1257 LB_JFFS2_ERASEBLOCK="${LB_JFFS2_ERASEBLOCK}"
1258
1259 # Set memtest
13181260 LB_MEMTEST="${LB_MEMTEST}"
13191261
1320 # \$LB_LOADLIN: set loadlin
1321 # (Default: ${LB_LOADLIN})
1262 # Set loadlin
13221263 LB_LOADLIN="${LB_LOADLIN}"
13231264
1324 # \$LB_WIN32_LOADER: set win32-loader
1325 # (Default: ${LB_WIN32_LOADER})
1265 # Set win32-loader
13261266 LB_WIN32_LOADER="${LB_WIN32_LOADER}"
13271267
1328 # \$LB_NET_ROOT_FILESYSTEM: set netboot filesystem
1329 # (Default: ${LB_NET_ROOT_FILESYSTEM})
1330 LB_NET_ROOT_FILESYSTEM="${LB_NET_ROOT_FILESYSTEM}"
1331
1332 # \$LB_NET_ROOT_MOUNTOPTIONS: set nfsopts
1333 # (Default: empty)
1334 LB_NET_ROOT_MOUNTOPTIONS="${LB_NET_ROOT_MOUNTOPTIONS}"
1335
1336 # \$LB_NET_ROOT_PATH: set netboot server directory
1337 # (Default: ${LB_NET_ROOT_PATH})
1338 LB_NET_ROOT_PATH="${LB_NET_ROOT_PATH}"
1339
1340 # \$LB_NET_ROOT_SERVER: set netboot server address
1341 # (Default: ${LB_NET_ROOT_SERVER})
1342 LB_NET_ROOT_SERVER="${LB_NET_ROOT_SERVER}"
1343
1344 # \$LB_NET_COW_FILESYSTEM: set net client cow filesystem
1345 # (Default: ${LB_NET_COW_FILESYSTEM})
1346 LB_NET_COW_FILESYSTEM="${LB_NET_COW_FILESYSTEM}"
1347
1348 # \$LB_NET_COW_MOUNTOPTIONS: set cow mount options
1349 # (Default: empty)
1350 LB_NET_COW_MOUNTOPTIONS="${LB_NET_COW_MOUNTOPTIONS}"
1351
1352 # \$LB_NET_COW_PATH: set cow directory
1353 # (Default: ${LB_NET_COW_PATH})
1354 LB_NET_COW_PATH="${LB_NET_COW_PATH}"
1355
1356 # \$LB_NET_COW_SERVER: set cow server
1357 # (Default: ${LB_NET_COW_SERVER})
1358 LB_NET_COW_SERVER="${LB_NET_COW_SERVER}"
1359
1360 # \$LB_NET_TARBALL: set net tarball
1361 # (Default: ${LB_NET_TARBALL})
1268 # Set net tarball
13621269 LB_NET_TARBALL="${LB_NET_TARBALL}"
13631270
1364 # \$LB_ONIE: set onie
1365 # (Default: ${LB_ONIE})
1271 # Set onie
13661272 LB_ONIE="${LB_ONIE}"
13671273
1368 # \$LB_ONIE_KERNEL_CMDLINE: set onie additional kernel cmdline options
1369 # (Default: ${LB_ONIE_KERNEL_CMDLINE})
1274 # Set onie additional kernel cmdline options
13701275 LB_ONIE_KERNEL_CMDLINE="${LB_ONIE_KERNEL_CMDLINE}"
13711276
1372 # \$LB_FIRMWARE_BINARY: include firmware packages in debian-installer
1373 # (Default: ${LB_FIRMWARE_BINARY})
1277 # Set inclusion of firmware packages in debian-installer
13741278 LB_FIRMWARE_BINARY="${LB_FIRMWARE_BINARY}"
13751279
1376 # \$LB_FIRMWARE_CHROOT: include firmware packages in debian-installer
1377 # (Default: ${LB_FIRMWARE_CHROOT})
1280 # Set inclusion of firmware packages in the live image
13781281 LB_FIRMWARE_CHROOT="${LB_FIRMWARE_CHROOT}"
13791282
1380 # \$LB_SWAP_FILE_PATH: set swap file path
1381 # (Default: ${LB_SWAP_FILE_PATH})
1283 # Set swap file path
13821284 LB_SWAP_FILE_PATH="${LB_SWAP_FILE_PATH}"
13831285
1384 # \$LB_SWAP_FILE_SIZE: set swap file size
1385 # (Default: ${LB_SWAP_FILE_SIZE})
1286 # Set swap file size
13861287 LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE}"
13871288
1388 # \$LB_UEFI_SECURE_BOOT: enable/disable UEFI secure boot
1389 # (Default: ${LB_UEFI_SECURE_BOOT})
1289 # Enable/disable UEFI secure boot support
13901290 LB_UEFI_SECURE_BOOT="${LB_UEFI_SECURE_BOOT}"
13911291 EOF
13921292
13941294 cat > config/source << EOF
13951295 # config/source - options for live-build(7), source stage
13961296
1397 # \$LB_SOURCE: set source option
1398 # (Default: ${LB_SOURCE})
1297 # Set source option
13991298 LB_SOURCE="${LB_SOURCE}"
14001299
1401 # \$LB_SOURCE_IMAGES: set image type
1402 # (Default: ${LB_SOURCE_IMAGES})
1300 # Set image type
14031301 LB_SOURCE_IMAGES="${LB_SOURCE_IMAGES}"
14041302 EOF
14051303
14061304 mkdir -p auto
1305 mkdir -p config/apt
1306 mkdir -p config/archives
1307 mkdir -p config/bootloaders
1308 mkdir -p config/debian-installer
1309 mkdir -p config/hooks/live
1310 mkdir -p config/hooks/normal
1311 mkdir -p config/includes
1312 mkdir -p config/includes.binary
1313 mkdir -p config/includes.bootstrap
1314 mkdir -p config/includes.chroot_after_packages
1315 mkdir -p config/includes.chroot_before_packages
1316 mkdir -p config/includes.installer
1317 mkdir -p config/includes.source
1318 mkdir -p config/package-lists
1319 mkdir -p config/packages
1320 mkdir -p config/packages.binary
1321 mkdir -p config/packages.chroot
1322 mkdir -p config/preseed
1323 mkdir -p config/rootfs
14071324 mkdir -p local/bin
1408
1409 # Checking defaults again
1410 Check_defaults
1411
1412 if [ "${_CLEAN}" = "true" ]
1413 then
1414 # Remove empty directories in config tree
1415 rmdir --ignore-fail-on-non-empty auto > /dev/null 2>&1 || true
1416 rmdir --ignore-fail-on-non-empty config/*/ > /dev/null 2>&1 || true
1417 rmdir --ignore-fail-on-non-empty config > /dev/null 2>&1 || true
1418 rmdir --ignore-fail-on-non-empty local/*/ > /dev/null 2>&1 || true
1419 rmdir --ignore-fail-on-non-empty local > /dev/null 2>&1 || true
1420 fi
1421
1422 mkdir -p config/hooks/normal config/hooks/live
1423 mkdir -p config/includes config/includes.bootstrap config/includes.chroot config/includes.binary config/includes.source
14241325
14251326 Echo_message "Symlinking hooks..."
14261327
14401341 fi
14411342 done
14421343
1443 if [ ! -e config/package-lists/live.list.chroot ]
1444 then
1445 mkdir -p config/package-lists
1446
1447 case "${LB_INITRAMFS}" in
1448 live-boot)
1449 echo "live-boot" > config/package-lists/live.list.chroot
1450 echo "live-config" >> config/package-lists/live.list.chroot
1451
1452 case "${LB_INITSYSTEM}" in
1453 none)
1454 # do nothing
1455 ;;
1456
1457 systemd)
1458 echo "live-config-systemd" >> config/package-lists/live.list.chroot
1459 ;;
1460
1461 sysvinit)
1462 echo "live-config-${LB_INITSYSTEM}" >> config/package-lists/live.list.chroot
1463 echo "sysvinit-core" >> config/package-lists/live.list.chroot
1464 ;;
1465 esac
1466 ;;
1467
1468 *)
1469 ;;
1470 esac
1471
1344 LIVE_PKG_LIST="config/package-lists/live.list.chroot"
1345 if [ ! -e "${LIVE_PKG_LIST}" ]; then
1346 NEEDED_PACKAGES=""
1347 if [ "${LB_INITRAMFS}" = "live-boot" ]; then
1348 NEEDED_PACKAGES="live-boot live-config"
1349 case "${LB_INITSYSTEM}" in
1350 systemd)
1351 NEEDED_PACKAGES="${NEEDED_PACKAGES} live-config-systemd"
1352 ;;
1353
1354 sysvinit)
1355 NEEDED_PACKAGES="${NEEDED_PACKAGES} live-config-sysvinit sysvinit-core"
1356 ;;
1357 esac
1358 fi
1359 for PKG in $NEEDED_PACKAGES; do
1360 echo "${PKG}" >> "${LIVE_PKG_LIST}"
1361 done
14721362 fi
14731363
1474 cat > config/build << EOF
1475 [Image]
1476 Architecture: ${LB_ARCHITECTURES}
1477 Archive-Areas: ${LB_ARCHIVE_AREAS}
1478 Distribution-Chroot: ${LB_DISTRIBUTION_CHROOT}
1479 Distribution-Binary: ${LB_DISTRIBUTION_BINARY}
1480 Mirror-Bootstrap: ${LB_MIRROR_BOOTSTRAP}
1481 EOF
1482
1483 if [ "${LB_DERIVATIVE}" = "true" ]
1484 then
1485
1486 cat >> config/build << EOF
1487
1488 Parent-Archive-Areas: ${LB_ARCHIVE_AREAS}
1489 Parent-Distribution-Chroot: ${LB_PARENT_DISTRIBUTION_CHROOT}
1490 Parent-Distribution-Binary: ${LB_PARENT_DISTRIBUTION_BINARY}
1491 Parent-Mirror-Bootstrap: ${LB_PARENT_MIRROR_BOOTSTRAP}
1492 EOF
1493
1364 # Remove empty directories (if user has requested via --clean)
1365 if [ "${_CLEAN}" = "true" ]; then
1366 # Note, the point of the error handling here is for avoiding failure and messy output
1367 # should a permissions failure block deletion.
1368 rmdir --ignore-fail-on-non-empty auto >/dev/null 2>&1 || true
1369 rmdir --ignore-fail-on-non-empty config/*/ >/dev/null 2>&1 || true
1370 rmdir --ignore-fail-on-non-empty config >/dev/null 2>&1 || true
1371 rmdir --ignore-fail-on-non-empty local/*/ >/dev/null 2>&1 || true
1372 rmdir --ignore-fail-on-non-empty local >/dev/null 2>&1 || true
14941373 fi
14951374
1496 cat >> config/build << EOF
1497
1498 [FIXME]
1499 Configuration-Version: ${LIVE_CONFIGURATION_VERSION}
1500 Name: ${LIVE_IMAGE_NAME}
1501 Type: ${LIVE_IMAGE_TYPE}
1502 EOF
1503
15041375 # Creating stage file
1505 Create_stagefile .build/config
1376 Create_stagefile
00 #! /bin/sh
11 set -e
22
3 # Copyright (C) 2016-2020 The Debian Live team
34 # Copyright (C) 2010, 2011 Canonical Ltd.
45 # Author: Colin Watson <[email protected]>
56 #
5152 set prefix=(\$root)/boot/grub
5253 source \$prefix/$platform/grub.cfg
5354 EOF
55 # Set the timestamps
56 find $workdir -newermt "$(date -d@${SOURCE_DATE_EPOCH} '+%Y-%m-%d %H:%M:%S')" -exec touch '{}' -d@${SOURCE_DATE_EPOCH} ';'
5457
5558 mkdir -p "$outdir/boot/grub/$platform"
5659 (for i in /usr/lib/grub/$platform/part_*.mod; do
57 i=`echo $i | sed 's?^.*/??g;s?\.mod$??g;'`
60 i=`echo $i | sed 's?^.*/??g;s?\.mod$??g;'`
5861 echo "insmod $i"
5962 done; \
6063 echo "source /boot/grub/grub.cfg") >"$outdir/boot/grub/$platform/grub.cfg"
7376 # headroom seems to be enough; (x+31)/32*32 rounds up to multiple of 32.
7477 mkfs.msdos -C "$outdir/efi.img" \
7578 $(( ($(stat -c %s "$workdir/boot$efi_name.efi") / 1024 + 55) \
76 / 32 * 32 ))
79 / 32 * 32 )) -i ${SOURCE_DATE_EPOCH}
7780 mmd -i "$outdir/efi.img" ::efi
7881 mmd -i "$outdir/efi.img" ::efi/boot
79 mcopy -i "$outdir/efi.img" "$workdir/boot$efi_name.efi" \
82 # Set the timestamp of the .efi file
83 touch "$workdir/boot$efi_name.efi" -d@${SOURCE_DATE_EPOCH}
84 mcopy -m -i "$outdir/efi.img" "$workdir/boot$efi_name.efi" \
8085 "::efi/boot/boot$efi_name.efi"
8186
8287 grub-cpmodules "$outdir" "$platform"
83 cp /usr/share/grub/unicode.pf2 "$outdir/boot/grub/"
88 cp -a /usr/share/grub/unicode.pf2 "$outdir/boot/grub/"
8489
8590 exit 0
00 #! /bin/sh
11 set -e
22
3 # Copyright (C) 2016-2020 The Debian Live team
34 # Copyright (C) 2010, 2011 Canonical Ltd.
45 # Author: Colin Watson <[email protected]>
56 #
3637 # dependencies. It would be nice to have a way to read the module
3738 # list directly out of the image.
3839 case $(basename "$x" .mod) in
39 configfile|fshelp|iso9660|memdisk|search|search_fs_file|search_fs_uuid|search_label|tar)
40 # included in boot image
41 ;;
42 affs|afs|afs_be|befs|befs_be|minix|nilfs2|sfs|zfs|zfsinfo)
43 # unnecessary filesystem modules
44 ;;
45 example_functional_test|functional_test|hello)
46 # other cruft
47 ;;
48 *)
49 cp -a "$x" "$outdir/boot/grub/$platform/"
50 ;;
40 configfile|fshelp|iso9660|memdisk|search|search_fs_file|search_fs_uuid|search_label|tar)
41 # included in boot image
42 ;;
43 affs|afs|afs_be|befs|befs_be|minix|nilfs2|sfs|zfs|zfsinfo)
44 # unnecessary filesystem modules
45 ;;
46 example_functional_test|functional_test|hello)
47 # other cruft
48 ;;
49 *)
50 cp -a "$x" "$outdir/boot/grub/$platform/"
51 ;;
5152 esac
5253 done
5354
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1213 # Including common functions
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
15 # Automatically populating config tree
16 if [ -x auto/config ] && [ ! -e .build/config ]
17 then
18 Echo_message "Automatically populating config tree."
19 lb config
20 fi
21
2216 # Setting static variables
23 DESCRIPTION="$(Echo 'preparing installer images')"
24 HELP=""
17 DESCRIPTION="Preparing installer images"
2518 USAGE="${PROGRAM} [--force]"
2619
27 Arguments "${@}"
20 # Automatically populating config tree
21 Auto_build_config
2822
29 # Reading configuration files
30 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
31 Set_defaults
23 # Processing arguments and configuration files
24 Init_config_data "${@}"
3225
33 # Setup cleanup function
34 Setup_cleanup
26 # Setting up cleanup function
27 Setup_clean_exit
3528
36 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]
37 then
29 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then
3830 # Configuring chroot
39 lb chroot_devpts install ${@}
40 lb chroot_proc install ${@}
41 lb chroot_selinuxfs install ${@}
42 lb chroot_sysfs install ${@}
43 lb chroot_debianchroot install ${@}
44 lb chroot_dpkg install ${@}
45 lb chroot_tmpfs install ${@}
46 lb chroot_sysv-rc install ${@}
47 lb chroot_hosts install ${@}
48 lb chroot_resolv install ${@}
49 lb chroot_hostname install ${@}
50 lb chroot_apt install ${@}
51 lb chroot_archives chroot install ${@}
31 lb chroot_prep install all mode-archives-chroot "${@}"
5232 fi
5333
5434 # Building installer
55 lb installer_debian-installer ${@}
56 lb installer_preseed ${@}
35 lb installer_debian-installer "${@}"
36 lb installer_preseed "${@}"
5737
58 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]
59 then
38 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]; then
6039 # Deconfiguring chroot
61 lb chroot_archives chroot remove ${@}
62 lb chroot_apt remove ${@}
63 lb chroot_hostname remove ${@}
64 lb chroot_resolv remove ${@}
65 lb chroot_hosts remove ${@}
66 lb chroot_sysv-rc remove ${@}
67 lb chroot_tmpfs remove ${@}
68 lb chroot_dpkg remove ${@}
69 lb chroot_debianchroot remove ${@}
70 lb chroot_sysfs remove ${@}
71 lb chroot_selinuxfs remove ${@}
72 lb chroot_proc remove ${@}
73 lb chroot_devpts remove ${@}
40 lb chroot_prep remove all mode-archives-chroot "${@}"
7441 fi
42
43 Echo_message "Installer stage completed"
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'install debian-installer into binary')"
17 HELP=""
17 DESCRIPTION="Install debian-installer into binary"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
22
23 if ! In_list "${LB_DEBIAN_INSTALLER}" cdrom netinst netboot businesscard live; then
24 if [ "${LB_DEBIAN_INSTALLER}" = "none" ]; then
25 Echo_message "No installer wanted, skipping..."
26 fi
27 exit 0
28 fi
29
30 Echo_message "Begin installing debian-installer..."
31
32 # Requiring stage file
33 Require_stagefiles config bootstrap
34
35 # Checking stage file
36 Check_stagefile
37
38 # Acquire lock file
39 Acquire_lockfile
40
41 # Checking depends
42 Check_package host /usr/bin/wget wget
43 Check_package chroot /usr/bin/apt-ftparchive apt-utils
44
45 # Restoring cache
46 Restore_package_cache binary
47
48 # Installing depends
49 Install_packages
2550
2651 if [ "${_DEBUG}" = "true" ]
2752 then
3358 WGET_OPTIONS="${WGET_OPTIONS} --no-verbose"
3459 fi
3560
36 # Check d-i configuration
37 case "${LB_DEBIAN_INSTALLER}" in
38 true|cdrom|netinst|netboot|businesscard|live)
39 ;;
40
41 false)
42 exit 0
43 ;;
44
45 *)
46 Echo_error "debian-installer flavour %s not supported." "${LB_DEBIAN_INSTALLER}"
47 exit 1
48 ;;
49 esac
50
51 Echo_message "Begin installing debian-installer..."
52
53 # Requiring stage file
54 Require_stagefile .build/config .build/bootstrap
55
56 # Checking stage file
57 Check_stagefile .build/installer_debian-installer
58
59 # Checking lock file
60 Check_lockfile .lock
61
62 # Creating lock file
63 Create_lockfile .lock
64
65 # Checking depends
66 Check_package host /usr/bin/wget wget
67 Check_package chroot /usr/bin/apt-ftparchive apt-utils
68
69 # Restoring cache
70 Restore_cache cache/packages.binary
71
72 # Installing depends
73 Install_package
74
7561 # Setting destination directory
76 case "${LIVE_IMAGE_TYPE}" in
62 case "${LB_IMAGE_TYPE}" in
7763 netboot)
78 DESTDIR="tftpboot/debian-install/${LB_ARCHITECTURES}"
79 ;;
80
81 hdd*|tar)
82 DESTDIR="binary/install"
64 DESTDIR="tftpboot/debian-install/${LB_ARCHITECTURE}"
8365 ;;
8466
8567 *)
9375 DI_IMAGE_TYPE="netboot"
9476 ;;
9577 *)
96 case "${LIVE_IMAGE_TYPE}" in
78 case "${LB_IMAGE_TYPE}" in
9779 netboot)
9880 DI_IMAGE_TYPE="netboot"
9981 ;;
10688 esac
10789
10890 # Set architecture-specific variables
109 case "${LB_ARCHITECTURES}" in
91 case "${LB_ARCHITECTURE}" in
11092 armel)
11193 DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
11294 case "${DI_IMAGE_TYPE}" in
126108 powerpc)
127109 case "${DI_IMAGE_TYPE}" in
128110 cdrom)
129 DI_REMOTE_BASE="${LB_ARCHITECTURES}/cdrom"
111 DI_REMOTE_BASE="${LB_ARCHITECTURE}/cdrom"
130112 ;;
131113
132114 netboot)
133 DI_REMOTE_BASE="${LB_ARCHITECTURES}/netboot"
115 DI_REMOTE_BASE="${LB_ARCHITECTURE}/netboot"
134116 ;;
135117 esac
136118
141123 *)
142124 case "${DI_IMAGE_TYPE}" in
143125 netboot)
144 DI_REMOTE_BASE="netboot/debian-installer/${LB_ARCHITECTURES}"
145 DI_REMOTE_BASE_GTK="netboot/gtk/debian-installer/${LB_ARCHITECTURES}"
126 DI_REMOTE_BASE="netboot/debian-installer/${LB_ARCHITECTURE}"
127 DI_REMOTE_BASE_GTK="netboot/gtk/debian-installer/${LB_ARCHITECTURE}"
146128 DI_REMOTE_KERNEL="linux"
147129 ;;
148130
155137 ;;
156138 esac
157139
158 Check_multiarchitectures
159
160140 Install_file() {
161 local FILE
162 FILE="${1}"
141 local FILE="${1}"
142
143 Echo_debug "Installing file %s" "${FILE}"
163144
164145 local ARCHIVE_AREA
165146 ARCHIVE_AREA="$(dpkg -I ${FILE} | awk '/^.*Section: / { print $2 }')"
171152 ARCHIVE_AREA="main"
172153 fi
173154
174 local TARGET
175 TARGET="${2}/${ARCHIVE_AREA}"
176
155 local TARGET="${2}/${ARCHIVE_AREA}"
156
157 local SOURCE
177158 SOURCE="$(dpkg -f ${FILE} Source | awk '{ print $1 }')"
178159
179160 if [ -z "${SOURCE}" ]
181162 SOURCE="$(basename ${FILE} | awk -F_ '{ print $1 }')"
182163 fi
183164
165 local LETTER
184166 case "${SOURCE}" in
185167 lib?*)
186168 LETTER="$(echo ${SOURCE} | sed 's|\(....\).*|\1|')"
195177 mkdir -p "${TARGET}"/"${LETTER}"/"${SOURCE}"
196178
197179 # Move files
198 cp "${FILE}" "${TARGET}"/"${LETTER}"/"${SOURCE}"
180 cp -a "${FILE}" "${TARGET}"/"${LETTER}"/"${SOURCE}"
199181 }
200182
201183 # Set absolute directory for caching; we require it when we call Download_file
203185 _LB_CACHE_DIR="$(pwd)/cache/installer_debian-installer"
204186
205187 Download_file () {
206 local _LB_TARGET
207 _LB_TARGET="${1}"
208
209 local _LB_URL
210 _LB_URL="${2}"
211
188 local _LB_TARGET="${1}"
189 local _LB_URL="${2}"
190
191 Echo_debug "Downloading file \`%s\` from \`%s\`" "${_LB_TARGET}" "${_LB_URL}"
192
193 local _LB_CACHE_FILE
212194 _LB_CACHE_FILE="${_LB_CACHE_DIR}/$(echo "${_LB_URL}" | sed 's|/|_|g')"
213195
214196 if [ ! -f "${_LB_CACHE_FILE}" ]
215197 then
198 Echo_debug "Not cached, downloading fresh..."
216199 mkdir -p ${_LB_CACHE_DIR}
217200 if ! wget ${WGET_OPTIONS} -O "${_LB_CACHE_FILE}" "${_LB_URL}"
218201 then
221204 Echo_error "Could not download file: %s" "${_LB_URL}"
222205 exit 1
223206 fi
224 fi
225
207 else
208 Echo_debug "Using copy from cache..."
209 fi
210
211 # Use hardlink if same device
226212 if [ "$(stat --printf %d "${_LB_CACHE_DIR}/")" = "$(stat --printf %d ./)" ]
227213 then
228214 CP_OPTIONS="-l"
229215 fi
230216
231 cp -f ${CP_OPTIONS} -- "${_LB_CACHE_FILE}" "${_LB_TARGET}"
217 cp -a -f ${CP_OPTIONS} -- "${_LB_CACHE_FILE}" "${_LB_TARGET}"
232218 }
233219
234220 VMLINUZ_DI="vmlinuz"
239225 INITRD_GI="gtk/initrd.gz"
240226 DESTDIR_GI="${DESTDIR}/gtk"
241227
228 # Debian Installer daily builds
229 DAILY_DI_URL="https://d-i.debian.org/daily-images/${LB_ARCHITECTURE}/daily"
230
242231 case "${LB_DERIVATIVE}" in
243 false)
232 true)
244233 if [ "${LB_DEBIAN_INSTALLER_DISTRIBUTION}" = "daily" ]
245234 then
246 # FIXME: variable name should be decupled from derivatves
247 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="sid"
248
249 # Debian Installer daily builds
250 URL="https://d-i.debian.org/daily-images/${LB_ARCHITECTURES}/daily/"
235 # FIXME: variable name should be decoupled from derivatives
236 LB_DEBIAN_INSTALLER_DISTRIBUTION="sid"
237
238 URL="${DAILY_DI_URL}"
251239 else
252 URL="${LB_MIRROR_DEBIAN_INSTALLER}/dists/${LB_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURES}/current/images/"
240 URL="${LB_MIRROR_DEBIAN_INSTALLER}/dists/${LB_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURE}/current/images"
253241 fi
254242 ;;
255243
256 true)
244 false)
257245 if [ "${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}" = "daily" ]
258246 then
259247 LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="sid"
260248
261 # Debian Installer daily builds
262 URL="https://d-i.debian.org/daily-images/${LB_ARCHITECTURES}/daily/"
249 URL="${DAILY_DI_URL}"
263250 else
264 URL="${LB_PARENT_MIRROR_DEBIAN_INSTALLER}/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURES}/current/images/"
251 URL="${LB_PARENT_MIRROR_DEBIAN_INSTALLER}/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURE}/current/images"
265252 fi
266
267 if [ "${LB_MODE}" = "progress-linux" ]
268 then
269 # FIXME: normal derivatives probably don't rebuild d-i,
270 # but progress-linux does.
271 URL="${LB_MIRROR_DEBIAN_INSTALLER}/dists/${LB_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LB_ARCHITECTURES}/current/images/"
272 fi
273 ;;
274253 esac
275254
276255 mkdir -p "${DESTDIR_DI}"
280259 Download_file "${DESTDIR}"/"${INITRD_DI}" ${URL}/${DI_REMOTE_BASE}/initrd.gz
281260
282261 # Downloading graphical-installer
283 DOWNLOAD_GTK_INSTALLER=0
262 DOWNLOAD_GTK_INSTALLER=false
284263 if [ "${LB_DEBIAN_INSTALLER_GUI}" = "true" ]
285264 then
286 case "${LB_ARCHITECTURES}" in
265 case "${LB_ARCHITECTURE}" in
287266 amd64|i386)
288 DOWNLOAD_GTK_INSTALLER=1
267 DOWNLOAD_GTK_INSTALLER=true
289268 ;;
290269
291270 powerpc)
292271 if [ "${LB_DEBIAN_INSTALLER}" = "netboot" ]
293272 then
294 DOWNLOAD_GTK_INSTALLER=1
273 DOWNLOAD_GTK_INSTALLER=true
295274 fi
296275 ;;
297276 esac
298277 fi
299278
300 if [ ${DOWNLOAD_GTK_INSTALLER} -eq 1 ]
301 then
279 if $DOWNLOAD_GTK_INSTALLER; then
302280 mkdir -p "${DESTDIR_GI}"
303281 Download_file "${DESTDIR}"/"${VMLINUZ_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/${DI_REMOTE_KERNEL}
304282 Download_file "${DESTDIR}"/"${INITRD_GI}" ${URL}/${DI_REMOTE_BASE_GTK}/initrd.gz
310288 # Downloading additional packages
311289 mkdir -p chroot/binary.deb/archives/partial
312290
313 case "${LB_ARCHITECTURES}" in
291 case "${LB_ARCHITECTURE}" in
314292 amd64)
315293 DI_REQ_PACKAGES="lilo grub-pc"
316 DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-amd64"
294 DI_PACKAGES="linux-image-amd64"
317295 ;;
318296
319297 i386)
320298 DI_REQ_PACKAGES="lilo grub-pc"
321 DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-686-pae"
299 DI_PACKAGES="linux-image-686-pae"
322300 ;;
323301
324302 powerpc)
325303 DI_REQ_PACKAGES="yaboot"
326 DI_PACKAGES="${DI_REQ_PACKAGES} linux-image-powerpc linux-image-powerpc64 linux-image-powerpc-smp"
304 DI_PACKAGES="linux-image-powerpc linux-image-powerpc64 linux-image-powerpc-smp"
327305 ;;
328306 esac
329307
332310 case "${LB_MODE}" in
333311 debian)
334312 DI_REQ_PACKAGES="${DI_REQ_PACKAGES} console-setup keyboard-configuration kbd"
335 DI_PACKAGES="${DI_PACKAGES} console-setup keyboard-configuration kbd"
336313 ;;
337314 esac
315
316 Echo_debug "DI_REQ_PACKAGES: %s" "${DI_REQ_PACKAGES}"
317 Echo_debug "DI_PACKAGES: %s" "${DI_PACKAGES}"
318
338319 # Include firmware packages
339320 if [ "${LB_FIRMWARE_BINARY}" = "true" ]
340321 then
341 # Assumption: firmware packages install files into /lib/firmware
342
343322 # Get all firmware packages names
344323 mkdir -p cache/contents.binary
345324
346325 FIRMWARE_PACKAGES=""
347326
348 _CONTENTS="$(for _PARENT_ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS}; do echo ${LB_PARENT_MIRROR_CHROOT}/dists/${LB_PARENT_DISTRIBUTION_CHROOT}/${_PARENT_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
349
350 rm -f cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
351
352 for _CONTENT in ${_CONTENTS}
353 do
354 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
355
356 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_PARENT_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)"
357 done
358
359 if echo ${LB_PARENT_ARCHIVE_AREAS} | grep -qs "non-free"
360 then
361 # Manually add firmware-linux/non-free meta package
362 if [ "${LB_DERIVATIVE}" != "true" ]
363 then
364 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
365 else
366 case "${LB_DERIVATIVE_IS_BASED_ON}" in
367 debian)
368 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
369 ;;
370 *)
371 ;;
372 esac
373 fi
327 # Manually add firmware-linux/non-free meta package
328 if [ "${LB_DERIVATIVE}" = "false" ] && In_list "non-free" ${LB_PARENT_ARCHIVE_AREAS}; then
329 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} firmware-linux"
374330 fi
331
332 Firmware_List_From_Contents "${LB_PARENT_MIRROR_CHROOT}" "${LB_PARENT_DISTRIBUTION_CHROOT}" "${LB_PARENT_ARCHIVE_AREAS}"
375333
376334 if [ "${LB_DERIVATIVE}" = "true" ]
377335 then
378 # FIXME: account for the fact that PARENT_DISTRIBUTION and DISTRIBUTION might be the same (to not have overlapping cache files for contents).
379
380 _CONTENTS="$(for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}; do echo ${LB_MIRROR_CHROOT}/dists/${LB_DISTRIBUTION_CHROOT}/${_ARCHIVE_AREA}/Contents-${LB_ARCHITECTURES}.gz; done)"
381
382 rm -f cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
383
384 for _CONTENT in ${_CONTENTS}
385 do
386 wget ${WGET_OPTIONS} ${_CONTENT} -O - | gunzip -c >> cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES}
387
388 FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} $(awk '/^lib\/firmware/ { print $2 }' cache/contents.chroot/contents.${LB_DISTRIBUTION_CHROOT}.${LB_ARCHITECTURES} | sort -u)"
389 done
336 # Avoid downloading things twice if distributions are identical
337 DERIVATIVE_ARCHIVE_AREAS=""
338 if [ "${LB_DISTRIBUTION_CHROOT}" != "${LB_PARENT_DISTRIBUTION_CHROOT}" ]
339 then
340 DERIVATIVE_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS}"
341 else
342 for _ARCHIVE_AREA in ${LB_ARCHIVE_AREAS}
343 do
344 if ! In_list ${_ARCHIVE_AREA} ${LB_PARENT_ARCHIVE_AREAS}
345 then
346 DERIVATIVE_ARCHIVE_AREAS="${DERIVATIVE_ARCHIVE_AREAS} ${DERIVATIVE_ARCHIVE_AREAS}"
347 fi
348 done
349 fi
350
351 if [ ! -z "${DERIVATIVE_ARCHIVE_AREAS}" ]
352 then
353 Firmware_List_From_Contents "${LB_MIRROR_CHROOT}" "${LB_DISTRIBUTION_CHROOT}" "${DERIVATIVE_ARCHIVE_AREAS}"
354 fi
390355 fi
391356
392357 # Drop section and keep package names only
394359 do
395360 DI_FIRMWARE_PACKAGES="${DI_FIRMWARE_PACKAGES} $(echo ${_PACKAGE} | awk -F/ '{ print $NF }')"
396361 done
397 fi
362 FIRMWARE_PACKAGES=""
363 fi
364
365 Echo_debug "DI_FIRMWARE_PACKAGES: %s" "${DI_FIRMWARE_PACKAGES}"
398366
399367 # Set apt command prefix
400 _LB_APT_COMMAND="apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb -o Dir::State::status=/dev/null -o APT::Install-Recommends=false --download-only"
368 _LB_APT_COMMAND="apt-get ${APT_OPTIONS} -o Dir::Cache=/binary.deb -o Dir::State::status=/dev/null -o APT::Install-Recommends=false -o Debug::NoLocking=true --download-only"
401369
402370 if [ "${LB_DEBIAN_INSTALLER}" = "live" ]
403371 then
411379 # Download .debs of the required packages
412380 Chroot chroot ${_LB_APT_COMMAND} install ${DI_PACKAGES} ${DI_FIRMWARE_PACKAGES} ${DI_REQ_PACKAGES}
413381
414 # Drop the packages already installed that d-i doesn't explicitely need
382 # Drop the packages already installed that d-i doesn't explicitly need
415383 _REMAINING_PACKAGES="$(echo ${DI_FIRMWARE_PACKAGES} ${DI_REQ_PACKAGES} | sed -e 's# #|#g')"
416384 _REMAINING_PACKAGES="$(Chroot_package_list chroot | grep -E -v "^(${_REMAINING_PACKAGES})\$")"
417385
386 Echo_debug "'live' installer mode, dropping following unneeded debs: %s" "${_REMAINING_PACKAGES}"
418387 for _PACKAGE in ${_REMAINING_PACKAGES}
419388 do
420389 rm -f chroot/binary.deb/archives/${_PACKAGE}_*.deb
421390 done
422391 else
423392 # Download .debs of the required packages
424 Chroot chroot ${_LB_APT_COMMAND} install ${DI_PACKAGES} ${DI_FIRMWARE_PACKAGES}
393 Chroot chroot ${_LB_APT_COMMAND} install ${DI_PACKAGES} ${DI_FIRMWARE_PACKAGES} ${DI_REQ_PACKAGES}
425394 fi
426395
427396 mv chroot/binary.deb ./
428397
429 for _ARCHIVE_AREA in $(echo ${LB_PARENT_ARCHIVE_AREAS} ${LB_ARCHIVE_AREAS})
430 do
398 for _ARCHIVE_AREA in ${LB_PARENT_ARCHIVE_AREAS} ${LB_ARCHIVE_AREAS}; do
431399 mkdir -p binary/pool/${_ARCHIVE_AREA}
432400 done
433401
402 Echo_debug "Installing binary debs"
434403 if Find_files binary.deb/archives/*.deb
435404 then
436405 for FILE in binary.deb/archives/*.deb
444413 # Including base debian packages
445414 if ls cache/packages.bootstrap/*.deb > /dev/null 2>&1
446415 then
416 Echo_debug "Installing bootstrap debs"
447417 for FILE in cache/packages.bootstrap/*.deb
448418 do
449419 Install_file "${FILE}" "binary/pool"
455425 fi
456426 fi
457427
428 Echo_debug "Including local debs"
429
458430 # Including local debs
459 if Find_files config/packages.binary/*_"${LB_ARCHITECTURES}".deb || Find_files config/packages/*_"${LB_ARCHITECTURES}".deb
460 then
461 for FILE in config/packages.binary/*_"${LB_ARCHITECTURES}".deb config/packages/*_"${LB_ARCHITECTURES}".deb
431 if Find_files config/packages.binary/*_"${LB_ARCHITECTURE}".deb || Find_files config/packages/*_"${LB_ARCHITECTURE}".deb
432 then
433 for FILE in config/packages.binary/*_"${LB_ARCHITECTURE}".deb config/packages/*_"${LB_ARCHITECTURE}".deb
462434 do
463435 if [ -e "${FILE}" ]
464436 then
479451 fi
480452
481453 # Generating deb indices
482 for _ARCHIVE_AREA in $(cd binary/pool && ls)
483 do
484 mkdir -p binary/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/${_ARCHIVE_AREA}/binary-${LB_ARCHITECTURES}
454 Echo_debug "Generating deb indices"
455 for _ARCHIVE_AREA in $(cd binary/pool && ls); do
456 INDICE_DIR="dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/${_ARCHIVE_AREA}/binary-${LB_ARCHITECTURE}"
457 mkdir -p "binary/${INDICE_DIR}"
485458
486459 mv binary chroot/root
487 echo "cd /root/binary && apt-ftparchive packages pool/${_ARCHIVE_AREA} > dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/${_ARCHIVE_AREA}/binary-${LB_ARCHITECTURES}/Packages" > chroot/binary.sh
460 cat > chroot/binary.sh << EOF
461 #!/bin/sh
462 cd /root/binary
463 apt-ftparchive packages "pool/${_ARCHIVE_AREA}" > "${INDICE_DIR}/Packages"
464 EOF
488465 Chroot chroot "sh binary.sh"
489466 rm -f chroot/binary.sh
490467 mv chroot/root/binary ./
491468
492 gzip -9 -c binary/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/${_ARCHIVE_AREA}/binary-${LB_ARCHITECTURES}/Packages > binary/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/${_ARCHIVE_AREA}/binary-${LB_ARCHITECTURES}/Packages.gz
469 touch "binary/${INDICE_DIR}/Packages" -d@${SOURCE_DATE_EPOCH}
470 gzip -9 -c "binary/${INDICE_DIR}/Packages" > "binary/${INDICE_DIR}/Packages.gz"
493471
494472 # Fetching release
495 Download_file binary/dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/${_ARCHIVE_AREA}/binary-${LB_ARCHITECTURES}/Release "${LB_PARENT_MIRROR_CHROOT}"/dists/"${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"/${_ARCHIVE_AREA}/binary-"${LB_ARCHITECTURES}"/Release
473 Download_file "binary/${INDICE_DIR}/Release" "${LB_PARENT_MIRROR_CHROOT}/${INDICE_DIR}/Release"
496474 done
497475
498476 # Symlink firmware packages to /firmware
477 Echo_debug "Symlinking firmware packages"
499478 if [ -n "${DI_FIRMWARE_PACKAGES}" ]
500479 then
501480 mkdir -p binary/firmware
517496 cd binary.udeb
518497
519498 # Downloading udeb indices
520 Download_file Packages.gz "${LB_PARENT_MIRROR_CHROOT}"/dists/"${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LB_ARCHITECTURES}"/Packages.gz
499 Echo_debug "Downloading udeb indices"
500 Download_file Packages.gz "${LB_PARENT_MIRROR_CHROOT}"/dists/"${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LB_ARCHITECTURE}"/Packages.gz
521501 gunzip -c Packages.gz > Packages
522502
523503 if [ "${LB_DERIVATIVE}" = "true" ]
524504 then
525 Download_file Packages.derivative.gz "${LB_MIRROR_CHROOT}"/dists/"${LB_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LB_ARCHITECTURES}"/Packages.gz
505 Download_file Packages.derivative.gz "${LB_MIRROR_CHROOT}"/dists/"${LB_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LB_ARCHITECTURE}"/Packages.gz
526506 gunzip -c Packages.derivative.gz > Packages.derivative
527507 fi
528508
529 # Sorting udebs
530 if [ "${LB_DERIVATIVE}" = true ]
531 then
532 UDEBS="$(awk '/Filename: / { print $2 }' Packages.derivative)"
533 fi
534
535 UDEBS="${UDEBS} $(awk '/Filename: / { print $2 }' Packages)"
536
537 # Downloading udebs packages
509 Echo_debug "Extracting udeb package list"
510
511 UDEBS="$(awk '/Filename: / { print $2 }' Packages)"
512 UDEBS_DERIVED=""
513
514 if [ "${LB_DERIVATIVE}" = "true" ]
515 then
516 UDEBS_DERIVED="$(awk '/Filename: / { print $2 }' Packages.derivative)"
517
518 Echo_debug "Derivative mode, filtering replaced packages from parent list"
519 Echo_debug "Parent (orig): %s" "${UDEBS}"
520 Echo_debug "Derived: %s" "${UDEBS_DERIVED}"
521 # Filter parent packages to exclude those replaced by derivative
522 # We need to compare package names from lists of paths and filenames that include versions
523 _UDEBS_FILTERED=""
524 _UDEBS_DERIVED_NAMES=""
525 for _UDEB in ${UDEBS_DERIVED}
526 do
527 _UDEBS_DERIVED_NAMES="${_UDEBS_DERIVED_NAMES} $(basename ${_UDEB} | awk -F_ '{ print $1 }')"
528 done
529 for _UDEB in ${UDEBS}
530 do
531 if ! In_list "$(basename ${_UDEB} | awk -F_ '{ print $1 }')" ${_UDEBS_DERIVED_NAMES}
532 then
533 _UDEBS_FILTERED="${_UDEBS_FILTERED} ${_UDEB}"
534 fi
535 done
536 UDEBS="${_UDEBS_FILTERED}"
537 _UDEBS_FILTERED=""
538 _UDEBS_DERIVED_NAMES=""
539 Echo_debug "Parent (filtered): %s" "${UDEBS}"
540 fi
541
542 # Downloading udeb packages
538543 Echo_message "Downloading udebs..."
539544
540 if [ "${LB_DERIVATIVE}" = "true" ]
541 then
542 Echo_message "Building in derivative mode in debian+ layout.. a lot of 404 errors are ok here."
543 fi
545 UDEB_CACHE_DIR="../cache/packages.installer_debian-installer.udeb"
544546
545547 for UDEB in ${UDEBS}
546548 do
547 if [ -f ../cache/packages.installer_debian-installer.udeb/"$(basename ${UDEB})" ]
548 then
549 # Copying cached udebs
550 cp ../cache/packages.installer_debian-installer.udeb/"$(basename ${UDEB})" ./
549 _UDEB_FILENAME="$(basename ${UDEB})"
550 # Copy from cache if available, otherwise download
551 if [ -f "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ]; then
552 Echo_debug "Copying %s from cache" "${UDEB}"
553 cp -a "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ./
551554 else
552 # Downloading udebs
553 if ! ls "$(basename ${UDEB} | awk -F_ '{ print $1 }')"_* > /dev/null 2>&1
554 then
555 wget ${WGET_OPTIONS} "${LB_MIRROR_CHROOT}"/${UDEB} || wget ${WGET_OPTIONS} "${LB_PARENT_MIRROR_CHROOT}"/${UDEB}
556 fi
555 Echo_debug "Downloading %s" "${UDEB}"
556 wget ${WGET_OPTIONS} "${LB_PARENT_MIRROR_CHROOT}/${UDEB}"
557557 fi
558558 done
559559
560 if [ "${LB_DERIVATIVE}" = "true" ]
561 then
562 Echo_debug "Moving on to derivative set"
563 for UDEB in ${UDEBS_DERIVED}
564 do
565 _UDEB_FILENAME="$(basename ${UDEB})"
566 # Copy from cache if available, otherwise download
567 if [ -f "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ]; then
568 Echo_debug "Copying %s from cache" "${UDEB}"
569 cp -a "${UDEB_CACHE_DIR}/${_UDEB_FILENAME}" ./
570 else
571 Echo_debug "Downloading %s" "${UDEB}"
572 wget ${WGET_OPTIONS} "${LB_MIRROR_CHROOT}/${UDEB}"
573 fi
574 done
575 fi
576
560577 # Caching udebs
561 rm -rf ../cache/packages.installer_debian-installer.udeb
562 mkdir -p ../cache/packages.installer_debian-installer.udeb
563 cp *.udeb ../cache/packages.installer_debian-installer.udeb
578 Echo_debug "Refreshing udeb cache"
579 rm -rf "${UDEB_CACHE_DIR}"
580 mkdir -p "${UDEB_CACHE_DIR}"
581 cp -a *.udeb "${UDEB_CACHE_DIR}"
582
583 Echo_debug "Including local udebs"
564584
565585 # Including local udebs
566 if Find_files ../config/packages.binary/*_"${LB_ARCHITECTURES}".udeb || Find_files ../config/packages/*_"${LB_ARCHITECTURES}".udeb
567 then
568 for FILE in ../config/packages.binary/*_"${LB_ARCHITECTURES}".udeb ../config/packages/*_"${LB_ARCHITECTURES}".udeb
586 if Find_files ../config/packages.binary/*_"${LB_ARCHITECTURE}".udeb || Find_files ../config/packages/*_"${LB_ARCHITECTURE}".udeb
587 then
588 for FILE in ../config/packages.binary/*_"${LB_ARCHITECTURE}".udeb ../config/packages/*_"${LB_ARCHITECTURE}".udeb
569589 do
570590 if [ -e "${FILE}" ]
571591 then
590610 fi
591611 done
592612 fi
613
614 Echo_debug "Generating exclude list"
593615
594616 # Excluding udebs
595617 for LOCATION in "${LIVE_BUILD}/data/debian-cd" /usr/share/live/build/data/debian-cd
597619 if [ -e "${LOCATION}" ]
598620 then
599621 grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/udeb_exclude" > exclude || true
600 grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs" >> exclude || true
601 grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs-${LB_ARCHITECTURES}" >> exclude || true
622 grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs" >> exclude || true
623 grep -v "^#" "${LOCATION}/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/exclude-udebs-${LB_ARCHITECTURE}" >> exclude || true
602624
603625 continue
604626 fi
612634
613635 # Excluding udebs from excludes because we want them to be in the image on purpose
614636 sed -i -e 's|di-utils-exit-installer||' exclude # used for live-installer-launcher
615
616 while read EXCLUDE
617 do
618 if [ "${LB_DEBIAN_INSTALLER}" = "live" ] && [ "${EXCLUDE}" = "live-installer" ]
619 then
620 continue
621 fi
622
623 rm -f ${EXCLUDE}_*.udeb
637 if [ "${LB_DEBIAN_INSTALLER}" = "live" ]; then
638 sed -i -e 's|live-installer||' exclude
639 fi
640
641 # Remove all udebs to be excluded from inclusion
642 Echo_debug "Removing excluded udebs"
643 while read EXCLUDE; do
644 rm -f "${EXCLUDE}_*.udeb"
624645 done < exclude
625646
626 # Moving udebs
627 for UDEB in ${UDEBS}
628 do
629 if [ -f "$(basename ${UDEB})" ]
630 then
631 Install_file "$(basename ${UDEB})" "pool-udeb"
632 rm "$(basename ${UDEB})"
647 # Sort udebs into alphabetised pool structure
648 Echo_debug "Organising into pool structure"
649 for UDEB in ${UDEBS} ${UDEBS_DERIVED}; do
650 _UDEB_FILENAME="$(basename ${UDEB})"
651 if [ -f "${_UDEB_FILENAME}" ]; then
652 Install_file "${_UDEB_FILENAME}" "pool-udeb"
653 rm "${_UDEB_FILENAME}"
633654 fi
634655 done
635656
636657 # Creating udeb indices
637 mkdir -p dists/"${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}"/main/debian-installer/binary-"${LB_ARCHITECTURES}"
658 Echo_debug "Generating udeb indices"
659
660 UDEB_INDICE_DIR="dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LB_ARCHITECTURE}"
661
662 mkdir -p "${UDEB_INDICE_DIR}"
663
638664 cd "${OLDPWD}"
639665
640666 mv binary.udeb chroot/root
641 echo "cd /root/binary.udeb && apt-ftparchive packages pool-udeb/main > dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LB_ARCHITECTURES}/Packages" > chroot/binary.sh
667 cat > chroot/binary.sh << EOF
668 #!/bin/sh
669 cd /root/binary.udeb
670 apt-ftparchive packages "pool-udeb/main" > "${UDEB_INDICE_DIR}/Packages"
671 EOF
642672 Chroot chroot "sh binary.sh"
643673 rm -f chroot/binary.sh
644674 mv chroot/root/binary.udeb ./
645675
646676 cd binary.udeb
647 gzip -9 -c dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LB_ARCHITECTURES}/Packages > dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/main/debian-installer/binary-${LB_ARCHITECTURES}/Packages.gz
677 touch "${UDEB_INDICE_DIR}/Packages" -d@${SOURCE_DATE_EPOCH}
678 gzip -9 -c "${UDEB_INDICE_DIR}/Packages" > "${UDEB_INDICE_DIR}/Packages.gz"
648679
649680 rm -f Packages* exclude
650681 find . | cpio -dmpu "${OLDPWD}"/binary
654685 rm -rf binary.deb
655686
656687 # Generating release file
688 Echo_debug "Generating release file"
657689 mv binary chroot/root
658690
659691 if [ -e chroot/etc/os-release ]
676708 esac
677709
678710 cat > chroot/binary.sh << EOF
711 #!/bin/sh
679712 cd /root/binary && apt-ftparchive \
680713 -o APT::FTPArchive::Release::Origin="Debian" \
681714 -o APT::FTPArchive::Release::Label="Debian" \
682715 -o APT::FTPArchive::Release::Suite="${_SUITE}" \
683716 ${_LB_APT_VERSION_OPT} \
684717 -o APT::FTPArchive::Release::Codename="${LB_PARENT_DISTRIBUTION_BINARY}" \
685 -o APT::FTPArchive::Release::Date="$(date -R)" \
686 -o APT::FTPArchive::Release::Architectures="${LB_ARCHITECTURES}" \
718 -o APT::FTPArchive::Release::Date="$(date -R ${DATE_UTC_OPTION} -d@${SOURCE_DATE_EPOCH})" \
719 -o APT::FTPArchive::Release::Architectures="${LB_ARCHITECTURE}" \
687720 -o APT::FTPArchive::Release::Components="${LB_PARENT_ARCHIVE_AREAS}" \
688 -o APT::FTPArchive::Release::Description="Last updated: $(date -R)" \
721 -o APT::FTPArchive::Release::Description="Last updated: $(date -R ${DATE_UTC_OPTION} -d@${SOURCE_DATE_EPOCH})" \
689722 release dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION} > dists/${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}/Release
690723 EOF
691724
693726 rm -f chroot/binary.sh
694727 mv chroot/root/binary ./
695728
729 Echo_debug "Creating distribution directories/symlinks"
730
696731 DISTRIBUTIONS="stable testing unstable"
697732
698733 if [ "${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION}" != "${LB_PARENT_DISTRIBUTION_BINARY}" ]
700735 DISTRIBUTIONS="${DISTRIBUTIONS} ${LB_PARENT_DISTRIBUTION_BINARY}"
701736 fi
702737
703 case "${LIVE_IMAGE_TYPE}" in
738 case "${LB_IMAGE_TYPE}" in
704739 hdd)
705740 case "${LB_BINARY_FILESYSTEM}" in
706741 fat*|ntfs)
727762
728763 Repack_initrd()
729764 {
730 local TARGET_INITRD
731 local INCLUDE_PATH
732 TARGET_INITRD="${1}"
733 INCLUDE_PATH="${2}"
734 REPACK_TMPDIR="unpacked-initrd"
765 local TARGET_INITRD="${1}"
766 local INCLUDE_PATH="${2}"
767 local REPACK_TMPDIR="unpacked-initrd"
768
769 Echo_debug "Repacking initrd \`%s\`" "${TARGET_INITRD}"
735770
736771 if [ -d "${INCLUDE_PATH}" ]
737772 then
746781 if [ ! -d "${INCLUDE_PATH}" ]
747782 then
748783 # Invoked the old way, just copy the preseeds
784 local _FILE
749785 for _FILE in ../config/preseed/*.cfg ../config/preseed/*.cfg.installer
750786 do
751787 if [ -e "${_FILE}" ]
755791 done
756792 else
757793 # New way, include target directory content in the initrd
758 REPACK_TMPDIR_ABS="${PWD}"
794 local REPACK_TMPDIR_ABS="${PWD}"
759795 cd "${INCLUDE_PATH}"
760796 find -print0 | cpio -pumd0 --no-preserve-owner "${REPACK_TMPDIR_ABS}/"
761797 cd "${OLDPWD}"
765801 cd ..
766802 rm -rf ${REPACK_TMPDIR}
767803 }
804
805 Echo_debug "Repacking initrds where necessary"
768806
769807 # Preseed d-i by repacking the initrd in certain situations
770808 if [ "${DI_IMAGE_TYPE}" = "netboot" ] && ( ls config/preseed/*.cfg > /dev/null 2>&1 || ls config/preseed/*.cfg.installer > /dev/null 2>&1 )
788826 fi
789827 fi
790828
791 case "${LB_MODE}" in
792 progress-linux)
793 mv binary/install binary/installer
794
795 rm -f binary/debian
796
797 for _DIRECTORY in dists pool project firmware
798 do
799 if [ -e "binary/${_DIRECTORY}" ]
800 then
801 mv binary/"${_DIRECTORY}" binary/installer
802 fi
803 done
804 ;;
805 esac
806
807829 # Saving cache
808 Save_cache cache/packages.binary
830 Save_package_cache binary
809831
810832 # Removing depends
811 Remove_package
833 Remove_packages
812834
813835 # Creating stage file
814 Create_stagefile .build/installer_debian-installer
836 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'include local preseed in installer')"
17 HELP=""
17 DESCRIPTION="Include local preseed in installer"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2622
2723 # Check d-i configuration
2824 case "${LB_DEBIAN_INSTALLER}" in
29 false)
25 none)
3026 exit 0
3127 ;;
3228 esac
3430 Echo_message "Begin including local preseeds..."
3531
3632 # Checking stage file
37 Check_stagefile .build/installer_preseed
33 Check_stagefile
3834
39 # Checking lock file
40 Check_lockfile .lock
41
42 # Creating lock file
43 Create_lockfile .lock
35 # Acquire lock file
36 Acquire_lockfile
4437
4538 if ls config/preseed/*.cfg > /dev/null 2>&1 || \
4639 ls config/preseed/*.cfg.installer > /dev/null 2>&1 || \
4740 ls chroot/root/packages.installer > /dev/null 2>&1
4841 then
49 case "${LB_MODE}" in
50 progress-linux)
51 _DIRECTORY="binary/installer"
52 ;;
53
54 *)
55 _DIRECTORY="binary/install"
56 ;;
57 esac
42 _DIRECTORY="binary/install"
5843
5944 rm -f "${_DIRECTORY}/preseed.cfg"
6045
6550 cat "${_FILE}" >> "${_DIRECTORY}/preseed.cfg"
6651 fi
6752 done
53 fi
6854
69 # Creating stage file
70 Create_stagefile .build/installer_preseed
71 fi
55 # Creating stage file
56 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1213 # Including common functions
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
15 # Automatically populating config tree
16 if [ -x auto/config ] && [ ! -e .build/config ]
17 then
18 Echo_message "Automatically populating config tree."
19 lb config
20 fi
21
2216 # Setting static variables
23 DESCRIPTION="$(Echo 'build source images')"
24 HELP=""
17 DESCRIPTION="Build source images"
2518 USAGE="${PROGRAM} [--force]"
2619
27 Arguments "${@}"
20 # Automatically populating config tree
21 Auto_build_config
2822
29 # Reading configuration files
30 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
31 Set_defaults
23 # Processing arguments and configuration files
24 Init_config_data "${@}"
3225
33 if [ "${LB_SOURCE}" != "true" ]
34 then
26 if [ "${LB_SOURCE}" != "true" ]; then
27 Echo_message "Source stage disabled, skipping"
3528 exit 0
3629 fi
3730
38 #Require_stagefile
31 # Setting up cleanup function
32 Setup_clean_exit
3933
40 # Setup cleanup function
41 Setup_cleanup
34 CHROOT_PREP="hosts resolv hostname archives"
4235
43 # Enabling network in chroot
44 lb chroot_hosts install ${@}
45 lb chroot_resolv install ${@}
46 lb chroot_hostname install ${@}
47 lb chroot_archives source install ${@}
36 # Configuring chroot (enabling networking)
37 lb chroot_prep install "${CHROOT_PREP}" mode-archives-source "${@}"
4838
4939 # Preparing images
50 lb source_live ${@}
51 lb source_debian ${@}
52 lb source_disk ${@}
53 lb source_hooks ${@}
54 lb source_checksums ${@}
40 lb source_live "${@}"
41 lb source_debian "${@}"
42 lb source_disk "${@}"
43 lb source_hooks "${@}"
44 lb source_checksums "${@}"
5545
5646 # Building images
57 lb source_iso ${@}
58 lb source_tar ${@}
59 lb source_hdd ${@}
47 lb source_iso "${@}"
48 lb source_tar "${@}"
49 lb source_hdd "${@}"
6050
6151 # Deconfiguring chroot
62 lb chroot_archives chroot remove ${@}
63 lb chroot_hostname remove ${@}
64 lb chroot_resolv remove ${@}
65 lb chroot_hosts remove ${@}
52 lb chroot_prep remove "${CHROOT_PREP}" mode-archives-source "${@}"
53
54 Echo_message "Source stage completed"
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'create source checksums')"
17 HELP=""
17 DESCRIPTION="Create source checksums"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_CHECKSUMS}" = "none" ] || [ "${LB_SOURCE}" != "true" ]
2724 then
2926 fi
3027
3128 # Requiring stage file
32 Require_stagefile .build/config .build/source_debian
29 Require_stagefiles config source_debian
3330
3431 # Checking stage file
35 Check_stagefile .build/source_checksums
32 Check_stagefile
3633
37 # Checking lock file
38 Check_lockfile .lock
39
40 # Creating lock file
41 Create_lockfile .lock
34 # Acquire lock file
35 Acquire_lockfile
4236
4337 for DIRECTORY in source/debian source/live
4438 do
4943
5044 for CHECKSUM in ${LB_CHECKSUMS}
5145 do
52 case "${LB_MODE}" in
53 progress-linux)
54 CHECKSUMS="$(echo ${CHECKSUM} | tr [a-z] [A-Z])SUMS"
55 ;;
56
57 *)
58 CHECKSUMS="${CHECKSUM}sum.txt"
59 ;;
60 esac
46 CHECKSUMS="${CHECKSUM}sum.txt"
6147
6248 Echo_message "Begin creating source ${CHECKSUMS}..."
6349
9278
9379 # File list
9480 cd ${DIRECTORY}
95 find . | sed -e 's|^.||g' | grep "^/" | sort > ../../${LIVE_IMAGE_NAME}-source.$(basename ${DIRECTORY}).contents
81 find . | sed -e 's|^.||g' | grep "^/" | sort > ../../${LB_IMAGE_NAME}-source.$(basename ${DIRECTORY}).contents
9682 cd "${OLDPWD}"
9783 done
9884
9985 # Creating stage file
100 Create_stagefile .build/source_checksums
86 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'debian sources')"
17 HELP=""
17 DESCRIPTION="Debian sources"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_SOURCE}" != "true" ]
2724 then
3128 Echo_message "Begin downloading sources..."
3229
3330 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3532
3633 # Checking stage file
37 Check_stagefile .build/source_debian
34 Check_stagefile
3835
39 # Checking lock file
40 Check_lockfile .lock
41
42 # Creating lock file
43 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4438
4539 # Remove old sources
4640 if [ -d source/debian ]
4943 fi
5044
5145 # Download sources
52 Chroot chroot "dpkg --get-selections" | awk '{ print $1 }' > source-selection.txt
5346
54 echo "${LB_BOOTLOADERS}" | \
55 while IFS="," read -r BOOTLOADER
56 do
57 cat >> source-selection.txt << EOF
58 ${BOOTLOADER}
47 cat >> chroot/source-selection.sh << EOF
48 #!/bin/sh
49 dpkg-query -W -f='\${binary:Package}=\${Version}\n' > source-selection.txt
5950 EOF
60 done
6151
62 cat >> source-selection.txt << EOF
63 live-build
64 EOF
52 Chroot chroot "sh source-selection.sh"
53 rm -f chroot/source-selection.sh
54 mv chroot/source-selection.txt ./
55
56 if [ -n "${LB_BOOTLOADER_BIOS}" ]; then
57 echo "${LB_BOOTLOADER_BIOS}" >> source-selection.txt
58 fi
59 if [ -n "${LB_BOOTLOADER_EFI}" ]; then
60 echo "${LB_BOOTLOADER_EFI}" >> source-selection.txt
61 fi
62
63 echo "live-build" >> source-selection.txt
6564
6665 case "${LB_BINARY_IMAGES}" in
6766 iso*)
8988 ;;
9089 esac
9190
92 case "${LB_ARCHITECTURES}" in
91 case "${LB_ARCHITECTURE}" in
9392 amd64|i386)
93 echo "mtools" >> source-selection.txt
9494
95 cat >> source-selection.txt << EOF
96 mtools
97 syslinux
98 grub
99 EOF
100
101 if [ "${LB_MEMTEST}" != "false" ] && [ "${LB_MEMTEST}" != "none" ]
102 then
95 if [ "${LB_MEMTEST}" != "none" ]; then
10396 echo "${LB_MEMTEST}" >> source-selection.txt
10497 fi
10598 ;;
10699 esac
107100
108 if [ -n "${LB_TASKS}" ]
109 then
110 echo "${LB_TASKSEL}" >> source-selection.txt
111 fi
101 # Make a clean directory to download the packages to.
102 # We need to set the ownership to user `_apt` to give write access to the apt user,
103 # otherwise we get a lot of warnings from apt about downloading as root.
104 mkdir -p chroot/source.pkgs
105 Chroot chroot "chown _apt:root source.pkgs"
112106
113 # apt-get source does not respect pinning
114 # building images with backports included but not enabled
115 # will result in apt-get source download stuff from backports
116 # where available. workaround: disable backports
117 case "${LB_MODE}" in
118 progress-linux)
119 case "${LB_DISTRIBUTION_BINARY}" in
120 *-backports)
121
122 ;;
123
124 *)
125 if grep -qs "${LB_DISTRIBUTION_BINARY}-backports" chroot/etc/apt/sources.list.d/progress-linux.list
126 then
127 cp chroot/etc/apt/sources.list.d/progress-linux.list chroot/etc/apt/sources.list.d/progress-linux.list.orig
128
129 while read _LINE
130 do
131 if echo "${_LINE}" | grep -qs ${LB_DISTRIBUTION_BINARY}-backports
132 then
133 sed -i -e "s|${_LINE}|#${_LINE}|" chroot/etc/apt/sources.list.d/progress-linux.list
134 fi
135 done < chroot/etc/apt/sources.list.d/progress-linux.list.orig
136
137 Apt chroot update
138 fi
139 ;;
140 esac
141 ;;
142 esac
143
144 MISSING=""
145
146 grep . source-selection.txt | \
147 while read PACKAGE
148 do
149 if ! Chroot chroot "apt-get ${APT_OPTIONS} --download-only source ${PACKAGE}"
150 then
151 MISSING="${MISSING} ${PACKAGE}"
152 fi
153 done
154
155 if [ -n "${MISSING}" ]
156 then
157 cat > source/missing-source.txt << EOF
158 This file contains the list of binary packages that are installed on this live
159 system that do not have a corresponding source package.
107 cat > chroot/missing-source.txt << EOF
108 This file contains the list of binary packages that are installed on the "live"
109 system (to which this source disc is a companion) for which a corresponding
110 source package is not included on this disc. This may be because the binary
111 package does not have a corresponding source package, or because the version of
112 the source package available was not the same as that of the binary.
160113
161114 EOF
162115
163 for PACKAGE in ${MISSING}
164 do
165 Chroot chroot "dpkg -l ${PACKAGE}" | tail -n1 >> source/missing-source.txt
166 done
116 cat > chroot/source-download.sh << EOF
117 #!/bin/sh
118 cd source.pkgs
119 PACKAGE="\${1}"
120 if ! apt-get ${APT_OPTIONS} --download-only source \${PACKAGE}
121 then
122 dpkg -l \${PACKAGE} | tail -n1 >> ../missing-source.txt
123 touch ../missing-source-some
124 fi
125 EOF
126
127 while read -r PACKAGE
128 do
129 Chroot chroot "sh source-download.sh ${PACKAGE}" || true
130 done < source-selection.txt
131 rm -f source-selection.txt
132 rm -f chroot/source-download.sh
133
134 if [ -e chroot/missing-source-some ]
135 then
136 mv chroot/missing-source.txt source/missing-source.txt
137 rm -f chroot/missing-source-some
138 else
139 rm -f chroot/missing-source.txt
167140 fi
168141
169 rm -f source-selection.txt
170
171142 # Sort sources
172 for DSC in chroot/*.dsc
143 for DSC in chroot/source.pkgs/*.dsc
173144 do
174145 SOURCE="$(sed -n 's|^Source: ||p' ${DSC} 2>/dev/null || :)"
175146 # The sed may fail if multiple dsc files exist for same source, as the
190161 mkdir -p source/debian/"${LETTER}"/"${SOURCE}"
191162
192163 # Move files
193 mv chroot/"${SOURCE}"_* source/debian/"${LETTER}"/"${SOURCE}"
164 mv chroot/source.pkgs/"${SOURCE}"_* source/debian/"${LETTER}"/"${SOURCE}"
194165 done
195166
196 # Reverting apt sources again
197 if [ -e chroot/etc/apt/sources.list.d/progress-linux.list.orig ]
198 then
199 mv chroot/etc/apt/sources.list.d/progress-linux.list.orig chroot/etc/apt/sources.list.d/progress-linux.list
200
201 Apt chroot update
202 fi
167 rmdir --ignore-fail-on-non-empty chroot/source.pkgs
203168
204169 # Creating stage file
205 Create_stagefile .build/source_debian
206 Create_stagefile .build/source
170 Create_stagefile
171 Create_stagefile "source"
+0
-62
scripts/build/source_debian-live less more
0 #!/bin/sh
1
2 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
4 ##
5 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
6 ## This is free software, and you are welcome to redistribute it
7 ## under certain conditions; see COPYING for details.
8
9
10 set -e
11
12 # Including common functions
13 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
14
15 # Setting static variables
16 DESCRIPTION="$(Echo 'copy debian-live config into source')"
17 HELP=""
18 USAGE="${PROGRAM} [--force]"
19
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
25
26 if [ "${LB_SOURCE}" != "true" ]
27 then
28 exit 0
29 fi
30
31 Echo_message "Begin copying live-build configuration..."
32
33 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
35
36 # Checking stage file
37 Check_stagefile .build/source_debian-live
38
39 # Checking lock file
40 Check_lockfile .lock
41
42 # Creating lock file
43 Create_lockfile .lock
44
45 # Remove old sources
46 if [ -d source/debian-live ]
47 then
48 rm -rf source/debian-live
49 fi
50
51 # Copy system configuration
52 mkdir -p source/debian-live
53 cp -a config source/debian-live
54
55 if Find_files auto/*
56 then
57 cp -a auto source/debian-live
58 fi
59
60 # Creating stage file
61 Create_stagefile .build/source_debian-live
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'install disk information into source')"
17 HELP=""
17 DESCRIPTION="Install disk information into source"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 case "${LB_SOURCE_IMAGES}" in
2724 iso*|hdd*)
3532 Echo_message "Begin installing disk information..."
3633
3734 # Requiring stage file
38 Require_stagefile .build/config .build/bootstrap
35 Require_stagefiles config bootstrap
3936
4037 # Checking stage file
41 Check_stagefile .build/source_disk
38 Check_stagefile
4239
43 # Checking lock file
44 Check_lockfile .lock
45
46 # Creating lock file
47 Create_lockfile .lock
40 # Acquire lock file
41 Acquire_lockfile
4842
4943 mkdir -p source/.disk
5044
6357 TITLE="Debian GNU/Linux"
6458 STRING="Official Snapshot ${ARCHITECTURE}"
6559 TRACE="project/trace/ftp-master.debian.org"
66 ;;
67
68 progress-linux)
69 TITLE="Progress Linux"
70 STRING="${VERSION} (${DISTRIBUTION}) - ${ARCHITECTURE}"
71 TRACE="project/trace/archive-master.progress-linux.org"
7260 ;;
7361
7462 *)
9684 esac
9785 fi
9886
87 _DATE="$(date $DATE_UTC_OPTION -d@${SOURCE_DATE_EPOCH} +%Y%m%d-%H:%M)"
88
9989 case "${LB_DEBIAN_INSTALLER}" in
10090 cdrom)
101 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/CD Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
91 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/CD Source ${_DATE}" > source/.disk/info
10292 ;;
10393
104 true|netinst)
105 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETINST Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
94 netinst)
95 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETINST Source ${_DATE}" > source/.disk/info
96 ;;
97
98 netboot)
99 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/NETBOOT Source ${_DATE}" > source/.disk/info
106100 ;;
107101
108102 live)
109 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/INSTALL Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
103 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/INSTALL Source ${_DATE}" > source/.disk/info
110104 ;;
111105
112106 businesscard)
113 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/BC Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
107 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE/BC Source ${_DATE}" > source/.disk/info
114108 ;;
115109
116 false)
117 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE Source $(date +%Y%m%d-%H:%M)" > source/.disk/info
110 none)
111 echo "${TITLE} ${VERSION} \"${DISTRIBUTION}\" - ${STRING} LIVE Source ${_DATE}" > source/.disk/info
118112 ;;
119113 esac
120114
121115 # Creating stage file
122 Create_stagefile .build/source_disk
116 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'build source image')"
17 HELP=""
17 DESCRIPTION="Build source image"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_SOURCE}" != "true" ]
2724 then
2825 exit 0
2926 fi
3027
31 if ! In_list hdd "${LB_SOURCE_IMAGES}"
32 then
28 if ! In_list hdd ${LB_SOURCE_IMAGES}; then
3329 exit 0
3430 fi
3531
3632 Echo_message "Begin building source hdd image..."
3733
3834 # Requiring stage file
39 Require_stagefile .build/config .build/source_debian
35 Require_stagefiles config source_debian
4036
4137 # Checking stage file
42 Check_stagefile .build/source_hdd
38 Check_stagefile
4339
44 # Checking lock file
45 Check_lockfile .lock
46
47 # Creating lock file
48 Create_lockfile .lock
40 # Acquire lock file
41 Acquire_lockfile
4942
5043 # Checking depends
5144 Check_package chroot /sbin/mkdosfs dosfstools
5245 Check_package chroot /sbin/parted parted
46 Check_package host /sbin/fdisk fdisk
47 Check_package host /sbin/losetup mount
5348
5449 # Installing depends
55 Install_package
50 Install_packages
5651
5752 # Remove old source
58 if [ -f ${LIVE_IMAGE_NAME}-source.img ]
53 if [ -f ${LB_IMAGE_NAME}-source.img ]
5954 then
60 rm -f ${LIVE_IMAGE_NAME}-source.img
55 rm -f ${LB_IMAGE_NAME}-source.img
6156 fi
6257
6358 # Everything which comes here needs to be cleaned up,
6459 DU_DIM="$(du -ms source | cut -f1)"
6560 REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_BINARY_FILESYSTEM})"
66 dd if=/dev/zero of=${LIVE_IMAGE_NAME}-source.img bs=1024k count=0 seek=${REAL_DIM}
67 FREELO="$(${LB_LOSETUP} -f)"
61 dd if=/dev/zero of=${LB_IMAGE_NAME}-source.img bs=1024k count=0 seek=${REAL_DIM}
62 MAKEDEV=false
63 FREELO="$(losetup -f)"
6864 if [ ! -b chroot/${FREELO} ]
6965 then
70 MAKEDEV="true"
66 MAKEDEV=true
7167
7268 mv chroot/dev chroot/dev.tmp
7369 find /dev | cpio -dmpu chroot
9389 esac
9490
9591 Echo_warning "!!! The following error/warning messages can be ignored !!!"
96 Losetup $FREELO ${LIVE_IMAGE_NAME}-source.img 0
92 Losetup $FREELO ${LB_IMAGE_NAME}-source.img 0
9793 Chroot chroot "parted -s ${FREELO} mklabel msdos" || true
9894 Chroot chroot "parted -a optimal -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true
9995 Lodetach ${FREELO}
10096
101 Losetup $FREELO ${LIVE_IMAGE_NAME}-source.img 1
97 Losetup $FREELO ${LB_IMAGE_NAME}-source.img 1
10298
10399 case "${LB_BINARY_FILESYSTEM}" in
104100 ext2|ext3|ext4)
136132 Lodetach ${FREELO}
137133 Echo_warning "!!! The above error/warning messages can be ignored !!!"
138134
139 FREELO="$(${LB_LOSETUP} -f)"
140 Losetup "$FREELO" ${LIVE_IMAGE_NAME}-source.img 0
135 FREELO="$(losetup -f)"
136 Losetup "$FREELO" ${LB_IMAGE_NAME}-source.img 0
141137 Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
142138 Lodetach ${FREELO}
143139
144 if [ -n "${MAKEDEV}" ]
145 then
140 if $MAKEDEV; then
146141 rm -rf chroot/dev
147142 mv chroot/dev.tmp chroot/dev
148143 fi
149144
150145 # Removing depends
151 Remove_package
146 Remove_packages
152147
153148 # Creating stage file
154 Create_stagefile .build/source_hdd
149 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'execute hooks in source')"
17 HELP=""
17 DESCRIPTION="Execute hooks in source"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/source config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 Echo_message "Begin executing hooks..."
2724
2825 # Requiring stage file
29 Require_stagefile .build/config .build/bootstrap
26 Require_stagefiles config bootstrap
3027
3128 # Checking stage file
32 Check_stagefile .build/source_hooks
29 Check_stagefile
3330
34 # Checking lock file
35 Check_lockfile .lock
36
37 # Creating lock file
38 Create_lockfile .lock
31 # Acquire lock file
32 Acquire_lockfile
3933
4034 ## Processing distribution hooks
4135
7771 done
7872
7973 # Creating stage file
80 Create_stagefile .build/source_hooks
74 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'build iso source image')"
17 HELP=""
17 DESCRIPTION="Build iso source image"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_SOURCE}" != "true" ]
2724 then
4037 Echo_message "Begin building source iso image..."
4138
4239 # Requiring stage file
43 Require_stagefile .build/config .build/source_debian
40 Require_stagefiles config source_debian
4441
4542 # Checking stage file
46 Check_stagefile .build/source_iso
43 Check_stagefile
4744
48 # Checking lock file
49 Check_lockfile .lock
50
51 # Creating lock file
52 Create_lockfile .lock
45 # Acquire lock file
46 Acquire_lockfile
5347
5448 # Checking depends
5549 Check_package chroot /usr/bin/xorriso xorriso
5650
5751 # Installing depends
58 Install_package
52 Install_packages
5953
6054 # Remove old iso image
61 if [ -f ${LIVE_IMAGE_NAME}-source.iso ]
55 if [ -f ${LB_IMAGE_NAME}-source.iso ]
6256 then
63 rm -f ${LIVE_IMAGE_NAME}-source.iso
57 rm -f ${LB_IMAGE_NAME}-source.iso
6458 fi
6559
6660 # Handle xorriso generic options
8478
8579 if [ -n "${LB_ISO_PREPARER}" ] && [ "${LB_ISO_PREPARER}" != "none" ]
8680 then
81 LB_ISO_PREPARER="$(echo "${LB_ISO_PREPARER}" | sed "s|@LB_VERSION@|${VERSION}|")"
8782 XORRISO_OPTIONS="${XORRISO_OPTIONS} -p \"${LB_ISO_PREPARER}\""
8883 fi
8984
9489
9590 if [ -n "${LB_ISO_VOLUME}" ] && [ "${LB_ISO_VOLUME}" != "none" ]
9691 then
92 LB_ISO_VOLUME="$(echo "${LB_ISO_VOLUME}" | sed "s|@ISOVOLUME_TS@|$(date $DATE_UTC_OPTION -d@${SOURCE_DATE_EPOCH} +%Y%m%d-%H:%M)|")"
9793 XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\""
9894 fi
9995
10096 # Set an explicit modification date
101 XORRISO_OPTIONS="${XORRISO_OPTIONS} --modification-date=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m%d%H%m%S00)"
97 XORRISO_OPTIONS="${XORRISO_OPTIONS} --modification-date=$(date --utc -d@${SOURCE_DATE_EPOCH} +%Y%m%d%H%M%S00)"
10298
10399 # Moving image
104100 mv source chroot
105101
106 cat >> chroot/source.sh << EOF
102 cat > chroot/source.sh << EOF
103 #!/bin/sh
107104 xorriso ${XORRISO_OPTIONS} -o source.iso source
108105 EOF
109106
111108
112109 # Move image
113110 mv chroot/source ./
114 mv chroot/source.iso ${LIVE_IMAGE_NAME}-source.iso
111 mv chroot/source.iso ${LB_IMAGE_NAME}-source.iso
115112 rm -f chroot/source.sh
116113
117114 # Removing depends
118 Remove_package
115 Remove_packages
119116
120117 # Creating stage file
121 Create_stagefile .build/source_iso
118 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'copy live config into source')"
17 HELP=""
17 DESCRIPTION="Copy live config into source"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_SOURCE}" != "true" ]
2724 then
3128 Echo_message "Begin copying live-build configuration..."
3229
3330 # Requiring stage file
34 Require_stagefile .build/config .build/bootstrap
31 Require_stagefiles config bootstrap
3532
3633 # Checking stage file
37 Check_stagefile .build/source_live
34 Check_stagefile
3835
39 # Checking lock file
40 Check_lockfile .lock
41
42 # Creating lock file
43 Create_lockfile .lock
36 # Acquire lock file
37 Acquire_lockfile
4438
4539 # Remove old sources
4640 if [ -d source/live ]
5751 cp -a auto source/live
5852 fi
5953
54 # Creating readme file
55 cat > source/live/README.txt << EOF
56 The config files in this directory are a copy of those that were used by the
57 live-build tool to build this disc and the "live" disc for which this "source"
58 disc is a companion. (This disc contains the source code corresponding to the
59 packages used in the "live" disc).
60 EOF
61
6062 # Creating stage file
61 Create_stagefile .build/source_live
63 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
1314 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
1415
1516 # Setting static variables
16 DESCRIPTION="$(Echo 'build source tarball')"
17 HELP=""
17 DESCRIPTION="Build source tarball"
1818 USAGE="${PROGRAM} [--force]"
1919
20 Arguments "${@}"
21
22 # Reading configuration files
23 Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
24 Set_defaults
20 # Processing arguments and configuration files
21 Init_config_data "${@}"
2522
2623 if [ "${LB_SOURCE}" != "true" ]
2724 then
2825 exit 0
2926 fi
3027
31 if ! In_list tar "${LB_SOURCE_IMAGES}"
32 then
28 if ! In_list tar ${LB_SOURCE_IMAGES}; then
3329 exit 0
3430 fi
3531
3733 Echo_message "This may take a while."
3834
3935 # Requiring stage file
40 Require_stagefile .build/config .build/source_debian
36 Require_stagefiles config source_debian
4137
4238 # Checking stage file
43 Check_stagefile .build/source_tar
39 Check_stagefile
4440
45 # Checking lock file
46 Check_lockfile .lock
47
48 # Creating lock file
49 Create_lockfile .lock
41 # Acquire lock file
42 Acquire_lockfile
5043
5144 # Remove old source
52 rm -f ${LIVE_IMAGE_NAME}-source.debian.tar.bz2 ${LIVE_IMAGE_NAME}-source.debian.tar.gz ${LIVE_IMAGE_NAME}-source.debian.tar.lz ${LIVE_IMAGE_NAME}-source.debian.tar
53 rm -f ${LIVE_IMAGE_NAME}-source.live.tar.bz2 ${LIVE_IMAGE_NAME}-source.live.tar.gz ${LIVE_IMAGE_NAME}-source.live.tar.lz ${LIVE_IMAGE_NAME}-source.live.tar
45 rm -f ${LB_IMAGE_NAME}-source.debian.tar.bz2 ${LB_IMAGE_NAME}-source.debian.tar.gz ${LB_IMAGE_NAME}-source.debian.tar.lz ${LB_IMAGE_NAME}-source.debian.tar
46 rm -f ${LB_IMAGE_NAME}-source.live.tar.bz2 ${LB_IMAGE_NAME}-source.live.tar.gz ${LB_IMAGE_NAME}-source.live.tar.lz ${LB_IMAGE_NAME}-source.live.tar
5447
55 tar cf ${LIVE_IMAGE_NAME}-source.debian.tar source/debian
56 tar cf ${LIVE_IMAGE_NAME}-source.live.tar source/live
48 tar cf ${LB_IMAGE_NAME}-source.debian.tar source/debian
49 tar cf ${LB_IMAGE_NAME}-source.live.tar source/live
5750
5851 case "${LB_COMPRESSION}" in
5952 bzip2)
60 bzip2 ${BZIP2_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar
61 bzip2 ${BZIP2_OPTIONS} ${LIVE_IMAGE_NAME}-source.live.tar
53 bzip2 ${BZIP2_OPTIONS} ${LB_IMAGE_NAME}-source.debian.tar
54 bzip2 ${BZIP2_OPTIONS} ${LB_IMAGE_NAME}-source.live.tar
6255 ;;
6356
6457 gzip)
65 gzip ${GZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar
66 gzip ${GZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.live.tar
58 gzip ${GZIP_OPTIONS} ${LB_IMAGE_NAME}-source.debian.tar
59 gzip ${GZIP_OPTIONS} ${LB_IMAGE_NAME}-source.live.tar
6760 ;;
6861
6962 lzip)
70 lzip ${LZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar
71 lzip ${LZIP_OPTIONS} ${LIVE_IMAGE_NAME}-source.live.tar
63 lzip ${LZIP_OPTIONS} ${LB_IMAGE_NAME}-source.debian.tar
64 lzip ${LZIP_OPTIONS} ${LB_IMAGE_NAME}-source.live.tar
7265 ;;
7366
7467 xz)
75 xz ${XZ_OPTIONS} ${LIVE_IMAGE_NAME}-source.debian.tar
76 xz ${XZ_OPTIONS} ${LIVE_IMAGE_NAME}-source.live.tar
68 xz ${XZ_OPTIONS} ${LB_IMAGE_NAME}-source.debian.tar
69 xz ${XZ_OPTIONS} ${LB_IMAGE_NAME}-source.live.tar
7770 ;;
7871
7972 none)
8174 esac
8275
8376 # Creating stage file
84 Create_stagefile .build/source_tar
77 Create_stagefile
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program is free software: you can redistribute it and/or modify
2021
2122
2223 set -e
24
25 if [ -z "${_COLOR}" ]; then
26 _COLOR="auto"
27 _COLOR_OUT="true"
28 _COLOR_ERR="true"
29 if [ ! -t 1 ]; then
30 _COLOR_OUT="false"
31 fi
32 if [ ! -t 2 ]; then
33 _COLOR_ERR="false"
34 fi
35 else
36 _COLOR_OUT="${_COLOR}"
37 _COLOR_ERR="${_COLOR}"
38 fi
2339
2440 if [ -e local/live-build ]
2541 then
00 #!/bin/sh
11
22 ## live-build(7) - System Build Scripts
3 ## Copyright (C) 2016-2020 The Debian Live team
34 ## Copyright (C) 2006-2015 Daniel Baumann <[email protected]>
45 ##
56 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
910
1011 set -e
1112
12 if [ ! -e /usr/bin/grep-aptavail ]
13 if ! command -v grep-aptavail >/dev/null
1314 then
14 echo "E: /usr/bin/grep-aptavail: No such file."
15 echo "E: program grep-aptavail not found!"
1516
1617 exit 1
1718 fi
+0
-7
share/bootloaders/extlinux/advanced.cfg less more
0 label hdt
1 menu label ^Hardware Detection Tool (HDT)
2 com32 hdt.c32
3
4 label memtest
5 menu label ^Memory Diagnostic Tool (memtest86+)
6 linux /live/memtest
+0
-1
share/bootloaders/extlinux/hdt.c32 less more
0 /usr/lib/syslinux/modules/bios/hdt.c32
+0
-11
share/bootloaders/extlinux/install.cfg less more
0 label install
1 menu label ^Install
2 linux /install/vmlinuz
3 initrd /install/initrd.gz
4 append vga=788 @APPEND_INSTALL@ --- quiet
5
6 label installgui
7 menu label ^Graphical install
8 linux /install/gtk/vmlinuz
9 initrd /install/gtk/initrd.gz
10 append video=vesa:ywrap,mtrr vga=788 @APPEND_INSTALL@ --- quiet
+0
-1
share/bootloaders/extlinux/libcom32.c32 less more
0 /usr/lib/syslinux/modules/bios/libcom32.c32
+0
-1
share/bootloaders/extlinux/libgpl.c32 less more
0 /usr/lib/syslinux/modules/bios/libgpl.c32
+0
-1
share/bootloaders/extlinux/libmenu.c32 less more
0 /usr/lib/syslinux/modules/bios/libmenu.c32
+0
-1
share/bootloaders/extlinux/libutil.c32 less more
0 /usr/lib/syslinux/modules/bios/libutil.c32
+0
-12
share/bootloaders/extlinux/live.cfg.in less more
0 label live-@FLAVOUR@
1 menu label ^Live (@FLAVOUR@)
2 menu default
3 linux @LINUX@
4 initrd @INITRD@
5 append @APPEND_LIVE@
6
7 label live-@FLAVOUR@-failsafe
8 menu label ^Live (@FLAVOUR@ failsafe)
9 linux @LINUX@
10 initrd @INITRD@
11 append @APPEND_LIVE_FAILSAFE@
+0
-17
share/bootloaders/extlinux/menu.cfg less more
0 menu hshift 0
1 menu width 82
2
3 menu title Boot menu
4 include stdmenu.cfg
5 include live.cfg
6 include install.cfg
7 menu begin advanced
8 menu title ^Advanced options
9 include stdmenu.cfg
10 label mainmenu
11 menu label ^Back..
12 menu exit
13 include advanced.cfg
14 menu end
15
16 menu clear
+0
-388
share/bootloaders/extlinux/splash.svg less more
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!-- Created with Inkscape (http://www.inkscape.org/) -->
2
3 <svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:xlink="http://www.w3.org/1999/xlink"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="640"
13 height="480"
14 id="svg3320"
15 version="1.1"
16 inkscape:version="0.48.3.1 r9886"
17 sodipodi:docname="splash.svg.in">
18 <defs
19 id="defs3322">
20 <radialGradient
21 gradientUnits="userSpaceOnUse"
22 gradientTransform="matrix(1.402663,0,0,1.115648,-6.237984,0.0533075)"
23 r="18.370251"
24 fy="10.943316"
25 fx="15.491823"
26 cy="10.943316"
27 cx="15.491823"
28 id="radialGradient2813"
29 xlink:href="#linearGradient2807"
30 inkscape:collect="always" />
31 <radialGradient
32 r="35.934704"
33 fy="424.15677"
34 fx="131.23691"
35 cy="424.15677"
36 cx="131.23691"
37 gradientTransform="matrix(0.101953,-0.04272301,0.09621296,0.229599,-48.67227,-64.24148)"
38 gradientUnits="userSpaceOnUse"
39 id="radialGradient2798"
40 xlink:href="#linearGradient8543"
41 inkscape:collect="always" />
42 <radialGradient
43 gradientUnits="userSpaceOnUse"
44 gradientTransform="matrix(1,0,0,0.415385,0,26.70146)"
45 r="30.365856"
46 fy="45.673546"
47 fx="29.898689"
48 cy="45.673546"
49 cx="29.898689"
50 id="radialGradient18290"
51 xlink:href="#linearGradient18284"
52 inkscape:collect="always" />
53 <radialGradient
54 gradientUnits="userSpaceOnUse"
55 gradientTransform="matrix(0.105628,-0.04514018,0.06692574,0.156607,-46.01605,-24.35485)"
56 r="103.26014"
57 fy="409.83737"
58 fx="340.35886"
59 cy="409.83737"
60 cx="340.35886"
61 id="radialGradient13895"
62 xlink:href="#linearGradient8543"
63 inkscape:collect="always" />
64 <radialGradient
65 gradientUnits="userSpaceOnUse"
66 gradientTransform="matrix(0.08174351,0.01024998,-0.04335971,0.345793,6.123413,-84.50421)"
67 r="38.451698"
68 fy="270.67969"
69 fx="424.99243"
70 cy="270.67969"
71 cx="424.99243"
72 id="radialGradient11208"
73 xlink:href="#linearGradient11202"
74 inkscape:collect="always" />
75 <radialGradient
76 gradientUnits="userSpaceOnUse"
77 gradientTransform="matrix(0.272962,-0.071724,0.05616202,0.213737,-78.54657,-24.30491)"
78 r="48.782982"
79 fy="243.06874"
80 fx="293.81989"
81 cy="243.06874"
82 cx="293.81989"
83 id="radialGradient10317"
84 xlink:href="#linearGradient8543"
85 inkscape:collect="always" />
86 <radialGradient
87 gradientUnits="userSpaceOnUse"
88 gradientTransform="matrix(0.224796,0.01017229,-0.00975947,0.215674,-73.87964,-54.89804)"
89 r="40.975471"
90 fy="286.46918"
91 fx="500.97794"
92 cy="286.46918"
93 cx="500.97794"
94 id="radialGradient9434"
95 xlink:href="#linearGradient8543"
96 inkscape:collect="always" />
97 <radialGradient
98 gradientUnits="userSpaceOnUse"
99 gradientTransform="matrix(0.163532,-0.01065754,0.01078108,0.165425,-46.18187,-65.65506)"
100 r="235.88632"
101 fy="685.99139"
102 fx="420.87839"
103 cy="685.99139"
104 cx="420.87839"
105 id="radialGradient8549"
106 xlink:href="#linearGradient8543"
107 inkscape:collect="always" />
108 <radialGradient
109 r="297.21338"
110 fy="-72.420044"
111 fx="336.73767"
112 cy="-72.420044"
113 cx="336.73767"
114 gradientTransform="matrix(0.136507,0,-4.484926e-5,0.07137743,-23.39816,12.31028)"
115 gradientUnits="userSpaceOnUse"
116 id="radialGradient7666"
117 xlink:href="#linearGradient5012"
118 inkscape:collect="always" />
119 <linearGradient
120 id="linearGradient5012">
121 <stop
122 id="stop5014"
123 offset="0"
124 style="stop-color:#fdf188;stop-opacity:1;" />
125 <stop
126 id="stop5016"
127 offset="1"
128 style="stop-color:#d3bc00;stop-opacity:1;" />
129 </linearGradient>
130 <linearGradient
131 id="linearGradient8543">
132 <stop
133 id="stop8545"
134 offset="0"
135 style="stop-color:#fffef5;stop-opacity:0.94117647;" />
136 <stop
137 id="stop8547"
138 offset="1"
139 style="stop-color:#fce94f;stop-opacity:0;" />
140 </linearGradient>
141 <linearGradient
142 id="linearGradient11202">
143 <stop
144 id="stop11204"
145 offset="0"
146 style="stop-color:#c4a000;stop-opacity:1;" />
147 <stop
148 id="stop11206"
149 offset="1"
150 style="stop-color:#c4a000;stop-opacity:0;" />
151 </linearGradient>
152 <linearGradient
153 id="linearGradient18284">
154 <stop
155 id="stop18286"
156 offset="0"
157 style="stop-color:#000000;stop-opacity:1;" />
158 <stop
159 style="stop-color:#000000;stop-opacity:1;"
160 offset="0.5"
161 id="stop20913" />
162 <stop
163 style="stop-color:#000000;stop-opacity:0;"
164 offset="1"
165 id="stop19165" />
166 </linearGradient>
167 <linearGradient
168 id="linearGradient2807"
169 inkscape:collect="always">
170 <stop
171 id="stop2809"
172 offset="0"
173 style="stop-color:#ffffff;stop-opacity:1;" />
174 <stop
175 id="stop2811"
176 offset="1"
177 style="stop-color:#ffffff;stop-opacity:0;" />
178 </linearGradient>
179 <inkscape:perspective
180 id="perspective47"
181 inkscape:persp3d-origin="24 : 16 : 1"
182 inkscape:vp_z="48 : 24 : 1"
183 inkscape:vp_y="0 : 1000 : 0"
184 inkscape:vp_x="0 : 24 : 1"
185 sodipodi:type="inkscape:persp3d" />
186 </defs>
187 <sodipodi:namedview
188 id="base"
189 pagecolor="#ffffff"
190 bordercolor="#666666"
191 borderopacity="1.0"
192 inkscape:pageopacity="0.0"
193 inkscape:pageshadow="2"
194 inkscape:zoom="0.775"
195 inkscape:cx="574.36733"
196 inkscape:cy="250.84337"
197 inkscape:document-units="px"
198 inkscape:current-layer="layer1"
199 showgrid="false"
200 inkscape:window-width="1016"
201 inkscape:window-height="570"
202 inkscape:window-x="0"
203 inkscape:window-y="1"
204 inkscape:window-maximized="0" />
205 <metadata
206 id="metadata3325">
207 <rdf:RDF>
208 <cc:Work
209 rdf:about="">
210 <dc:format>image/svg+xml</dc:format>
211 <dc:type
212 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
213 <dc:title></dc:title>
214 </cc:Work>
215 </rdf:RDF>
216 </metadata>
217 <g
218 inkscape:label="Layer 1"
219 inkscape:groupmode="layer"
220 id="layer1"
221 transform="translate(0,-572.3622)">
222 <rect
223 style="fill:#000000;fill-opacity:1;stroke:none"
224 id="rect3328"
225 width="640"
226 height="480"
227 x="0"
228 y="572.36218" />
229 <text
230 transform="scale(1.0000015,0.99999849)"
231 sodipodi:linespacing="100%"
232 id="text3002"
233 y="619.20685"
234 x="190.68135"
235 style="font-size:35.65467453px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
236 xml:space="preserve"><tspan
237 y="619.20685"
238 x="190.68135"
239 sodipodi:role="line"
240 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
241 id="tspan3045">@PROJECT@ @VERSION@ (@DISTRIBUTION@)</tspan><tspan
242 y="639.20679"
243 x="190.68135"
244 sodipodi:role="line"
245 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
246 id="tspan3041">@ARCHITECTURE@</tspan><tspan
247 y="659.20679"
248 x="190.68135"
249 sodipodi:role="line"
250 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
251 id="tspan3037" /><tspan
252 y="679.20679"
253 x="190.68135"
254 sodipodi:role="line"
255 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
256 id="tspan3039">Build: @YEAR@-@MONTH@-@DAY@ @HOUR@:@MINUTE@:@SECOND@</tspan><tspan
257 y="699.20673"
258 x="190.68135"
259 sodipodi:role="line"
260 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
261 id="tspan3098" /><tspan
262 y="719.20667"
263 x="190.68135"
264 sodipodi:role="line"
265 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
266 id="tspan3102">linux: @LINUX_VERSIONS@</tspan><tspan
267 y="739.20667"
268 x="190.68135"
269 sodipodi:role="line"
270 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
271 id="tspan3076">live-build: @LIVE_BUILD_VERSION@</tspan><tspan
272 y="759.20667"
273 x="190.68135"
274 sodipodi:role="line"
275 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
276 id="tspan3068">live-boot: @LIVE_BOOT_VERSION@</tspan><tspan
277 y="779.2066"
278 x="190.68135"
279 sodipodi:role="line"
280 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
281 id="tspan3070">live-config: @LIVE_CONFIG_VERSION@</tspan><tspan
282 y="799.20654"
283 x="190.68135"
284 sodipodi:role="line"
285 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
286 id="tspan3012">live-tools: @LIVE_TOOLS_VERSION@</tspan><tspan
287 y="819.20654"
288 x="190.68135"
289 sodipodi:role="line"
290 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
291 id="tspan3066" /></text>
292 <text
293 xml:space="preserve"
294 style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
295 x="200"
296 y="336.7742"
297 id="text3114"
298 sodipodi:linespacing="125%"
299 transform="translate(0,572.3622)"><tspan
300 sodipodi:role="line"
301 id="tspan3116" /></text>
302 <g
303 id="layer1-9"
304 inkscape:label="Layer 1"
305 transform="matrix(2.8369273,0,0,2.8369235,27.782921,602.43406)">
306 <path
307 transform="matrix(0.742527,0,-0.05812964,1.428611,4.500517,-36.68345)"
308 d="m 60.264545,45.673546 c 0,6.966249 -13.595256,12.613509 -30.365856,12.613509 -16.770599,0 -30.3658559,-5.64726 -30.3658559,-12.613509 0,-6.966249 13.5952569,-12.613509 30.3658559,-12.613509 16.7706,0 30.365856,5.64726 30.365856,12.613509 z"
309 sodipodi:ry="12.613509"
310 sodipodi:rx="30.365856"
311 sodipodi:cy="45.673546"
312 sodipodi:cx="29.898689"
313 id="path17409"
314 style="fill:url(#radialGradient18290);fill-opacity:1;stroke:none"
315 sodipodi:type="arc" />
316 <path
317 sodipodi:nodetypes="cccscsssscsccsc"
318 id="path3120"
319 d="M 23.152758,1.1801876 C 20.380218,1.2190783 17.86582,1.8908769 15.634281,3.0196314 14.541531,5.1714614 10.9437,7.7293655 9.4689484,8.0015561 6.5691703,11.460832 4.6887193,15.805035 3.9754523,19.98162 c -4.375e-4,0.0026 4.366e-4,0.0052 0,0.0077 -1.1863594,1.549717 -1.6900108,3.396594 -1.3773472,5.53256 1.1211744,7.659314 3.2821678,14.888292 8.1850959,16.556275 7.154429,2.433946 21.871769,1.785847 25.129507,0.458258 7.13903,-2.909286 7.771453,-9.285098 8.891432,-16.780256 0.305554,-2.044832 -0.144835,-3.841202 -1.230601,-5.372942 -0.009,-0.0556 -0.01849,-0.111474 -0.02832,-0.167342 C 42.763966,15.777007 40.697859,11.326849 37.602582,7.8466935 35.508773,7.62926 31.462964,4.270333 30.483158,2.6229925 28.330506,1.7020155 25.961342,1.1801876 23.407632,1.1801876 c -0.08532,0 -0.170037,-0.00119 -0.254874,0 z"
320 style="fill:url(#radialGradient7666);fill-opacity:1;stroke:#c4a000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
321 inkscape:connector-curvature="0" />
322 <path
323 sodipodi:nodetypes="ccscc"
324 id="path7668"
325 d="M 43.629688,22.792984 C 39.033494,39.233217 10.438199,40.802737 3.7832765,23.04227 3.7410682,39.366403 10.103414,44.083889 28.189955,43.247454 c 3.061977,-0.140689 10.00982,0.04287 14.614484,-9.136776 2.238365,-11.5104 0.825249,-11.317694 0.825249,-11.317694 z"
326 style="opacity:0.66666667;fill:url(#radialGradient8549);fill-opacity:1;fill-rule:evenodd;stroke:none"
327 inkscape:connector-curvature="0" />
328 <path
329 sodipodi:nodetypes="cccc"
330 id="path8553"
331 d="m 34.691565,7.6783057 2.500881,1.1253976 c 0,0 -1.310404,10.1226397 -6.669016,16.4849717 1.771665,-6.455834 4.188975,-17.6103693 4.168135,-17.6103693 z"
332 style="fill:url(#radialGradient9434);fill-opacity:1;fill-rule:evenodd;stroke:none"
333 inkscape:connector-curvature="0" />
334 <path
335 sodipodi:nodetypes="cccc"
336 id="path9436"
337 d="m 15.872437,4.1562328 c 1.50053,9.0656942 6.50229,19.4860282 6.002115,20.0070452 -4.584948,-6.981624 -6.502291,-12.921217 -8.00282,-17.9229779 0,-0.083363 2.000705,-2.0632267 2.000705,-2.0840673 z"
338 style="fill:url(#radialGradient10317);fill-opacity:1;fill-rule:evenodd;stroke:none"
339 inkscape:connector-curvature="0" />
340 <path
341 sodipodi:nodetypes="ccsc"
342 id="path10319"
343 d="M 30.21082,3.8227818 C 26.126047,20.328594 25.959322,23.079563 25.959322,23.079563 c 0,0 6.335566,-16.7559003 6.335566,-17.1727135 0,-8e-7 -1.583891,-1.5005286 -2.084068,-2.0840677 z"
344 style="fill:url(#radialGradient11208);fill-opacity:1;fill-rule:evenodd;stroke:none"
345 inkscape:connector-curvature="0" />
346 <flowRoot
347 id="flowRoot12974"
348 xml:space="preserve"><flowRegion
349 id="flowRegion12976"><rect
350 y="412.80496"
351 x="86.787514"
352 height="16.02231"
353 width="40.055775"
354 id="rect12978" /></flowRegion><flowPara
355 id="flowPara12980" /></flowRoot> <path
356 sodipodi:nodetypes="ccccccc"
357 id="path13014"
358 d="m 16.18209,34.476182 -0.04467,-9.569745 14.493727,0 1.642604,-1.263542 -16.931465,0 0.04467,10.640581 0.795134,0.192706 z"
359 style="fill:url(#radialGradient13895);fill-opacity:1;fill-rule:evenodd;stroke:none"
360 inkscape:connector-curvature="0" />
361 <path
362 sodipodi:nodetypes="ccccc"
363 id="path13897"
364 d="m 31.043495,24.81709 0.08168,9.804611 0.686144,-0.214742 0.01198,-10.85341 -0.779803,1.263541 z"
365 style="fill:#958401;fill-opacity:1;fill-rule:evenodd;stroke:none"
366 inkscape:connector-curvature="0" />
367 <path
368 sodipodi:nodetypes="ccccscc"
369 id="path16526"
370 d="m 4.2551267,24.106065 c 0,0 2.3166503,8.115689 10.2209413,8.766037 1.105608,2.490418 -1.13497,4.124601 -1.13497,4.124601 L 9.7315781,36.745641 c 0,0 -6.2387745,-7.992942 -6.4882087,-9.900882 -0.2494325,-1.907937 0.1632835,-3.407793 0.1632835,-3.407793 l 0.8484738,0.669099 z"
371 style="fill:url(#radialGradient2798);fill-opacity:1;fill-rule:evenodd;stroke:none"
372 inkscape:connector-curvature="0" />
373 <path
374 style="opacity:0.74444442;fill:none;stroke:#ffffff;stroke-width:0.99999976;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
375 d="M 23.184204,2.3889904 C 20.570275,2.4256563 18.199721,3.0590226 16.095844,4.1232033 15.065608,6.1519314 11.673602,8.563503 10.283218,8.8201221 7.5493302,12.0815 5.776456,16.17718 5.1039936,20.11483 c -4.124e-4,0.0024 4.116e-4,0.0049 0,0.0073 -1.1184901,1.46106 -1.8584936,3.246475 -1.5637169,5.260247 1.0570343,7.22114 2.9276025,13.709677 7.3279793,15.639454 5.923141,2.597582 21.539722,1.785935 24.611092,0.534295 6.73062,-2.742852 7.061699,-8.930694 8.117606,-15.997069 0.288074,-1.927851 -0.13655,-3.621454 -1.160201,-5.065566 -0.0084,-0.05242 -0.01743,-0.105097 -0.0267,-0.157769 C 41.673494,16.150755 39.725585,11.955182 36.807382,8.6741189 34.833356,8.4691243 31.019,5.3023548 30.095246,3.7492553 28.065743,2.8809656 25.832115,2.3889904 23.424497,2.3889904 c -0.08044,0 -0.160309,-0.00112 -0.240293,0 z"
376 id="path2703"
377 sodipodi:nodetypes="cccscsssscsccsc"
378 inkscape:connector-curvature="0" />
379 <path
380 sodipodi:nodetypes="cccssccscccssc"
381 id="path2800"
382 d="m 22.59375,2.78125 c -2.329557,0.1165682 -4.440971,0.7250384 -6.34375,1.6875 -1.010725,1.9903059 -4.354698,4.373241 -5.71875,4.625 -2.6821095,3.199611 -4.4027734,7.199424 -5.0625,11.0625 -4.046e-4,0.0024 4.038e-4,0.02888 0,0.03125 -1.0973069,1.43339 -1.4580267,3.591148 -1.4580267,3.591148 4.685267,3.605062 7.6416117,0.213892 14.3188727,-2.01722 12.59928,1.923141 18.748338,-0.995945 22.514154,-5.667678 0.0069,-0.0085 -0.0035,-0.02088 0,-0.03125 C 39.852567,13.479666 38.411479,11.016387 36.5625,8.9375 34.62586,8.7363873 30.875008,5.6486852 29.96875,4.125 27.977684,3.2731547 25.79952,2.78125 23.4375,2.78125 c -0.07892,10e-8 -0.171531,-0.0011 -0.25,0 -0.200346,0.00281 -0.39633,-0.00988 -0.59375,0 z"
383 style="opacity:0.59444424;fill:url(#radialGradient2813);fill-opacity:1;stroke:none"
384 inkscape:connector-curvature="0" />
385 </g>
386 </g>
387 </svg>
+0
-15
share/bootloaders/extlinux/stdmenu.cfg less more
0 menu background splash.png
1 menu color title * #FFFFFFFF *
2 menu color border * #00000000 #00000000 none
3 menu color sel * #ffffffff #76a1d0ff *
4 menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *
5 menu color tabmsg * #ffffffff #00000000 *
6 menu color help 37;40 #ffdddd00 #00000000 none
7 menu vshift 12
8 menu rows 10
9 menu helpmsgrow 15
10 # The command line must be at least one line from the bottom.
11 menu cmdlinerow 16
12 menu timeoutrow 16
13 menu tabmsgrow 18
14 menu tabmsg Press ENTER to boot or TAB to edit a menu entry
+0
-1
share/bootloaders/extlinux/vesamenu.c32 less more
0 /usr/lib/syslinux/modules/bios/vesamenu.c32
0 set default=0
1
2 loadfont $prefix/dejavu-bold-16.pf2
3 loadfont $prefix/dejavu-bold-14.pf2
4 loadfont $prefix/unicode.pf2
5 set gfxmode=auto
6 insmod all_video
7 insmod gfxterm
8 insmod png
9
10 source /boot/grub/theme.cfg
11
12 terminal_output gfxterm
13
14 insmod play
15 play 960 440 1 0 4 440 1
0 set default=0
1
2 loadfont $prefix/dejavu-bold-16.pf2
3 loadfont $prefix/dejavu-bold-14.pf2
4 loadfont $prefix/unicode.pf2
5 set gfxmode=auto
6 insmod all_video
7 insmod gfxterm
8 insmod png
9
10 set color_normal=light-gray/black
11 set color_highlight=white/black
12
13 if [ -e /isolinux/splash.png ]; then
14 # binary_syslinux modifies the theme file to point to the correct
15 # background picture
16 set theme=/boot/grub/live-theme/theme.txt
17 elif [ -e /boot/grub/splash.png ]; then
18 set theme=/boot/grub/live-theme/theme.txt
19 else
20 set menu_color_normal=cyan/blue
21 set menu_color_highlight=white/blue
22 fi
23
24 terminal_output gfxterm
25
26 insmod play
27 play 960 440 1 0 4 440 1
0 source /boot/grub/config.cfg
281
292 # Live boot
30 LINUX_LIVE
3 @LINUX_LIVE@
314
325 # You can add more entries like this
336 # menuentry "Alternate live boot" {
34 # linux KERNEL_LIVE APPEND_LIVE custom options here
35 # initrd INITRD_LIVE
7 # linux @KERNEL_LIVE@ @APPEND_LIVE@ custom options here
8 # initrd @INITRD_LIVE@
369 # }
3710 # menuentry "Alternate graphical installer" {
38 # linux KERNEL_GI APPEND_GI custom options here
39 # initrd INITRD_GI
11 # linux @KERNEL_GI@ @APPEND_GI@ custom options here
12 # initrd @INITRD_GI@
4013 # }
4114 # menuentry "Alternate textual installer" {
42 # linux KERNEL_DI APPEND_DI custom options here
43 # initrd INITRD_DI
15 # linux @KERNEL_DI@ @APPEND_DI@ custom options here
16 # initrd @INITRD_DI@
4417 # }
4518
4619 # Installer (if any)
47 LINUX_INSTALL
20 if @ENABLE_INSTALL_MENU@; then
4821
49 submenu 'Advanced options...' {
22 source /boot/grub/install_start.cfg
5023
51 # More installer entries (if any)
52 LINUX_ADVANCED_INSTALL
24 submenu 'Advanced install options ...' --hotkey=a {
5325
54 # Memtest (if any)
55 MEMTEST
26 source /boot/grub/theme.cfg
27
28 source /boot/grub/install.cfg
5629
5730 }
31 fi
32
33 submenu 'Utilities...' --hotkey=u {
34
35 source /boot/grub/theme.cfg
36
37 # Memtest (if any)
38 if [ "${grub_platform}" = "pc" ] -a @ENABLE_MEMTEST@; then
39 source /boot/grub/memtest.cfg
40 fi
41
42 # Firmware setup (UEFI)
43 if [ "${grub_platform}" = "efi" ]; then
44 menuentry "UEFI Firmware Settings" {
45 fwsetup
46 }
47 fi
48
49 }
0 submenu 'Graphical installer ...' --hotkey=g {
1
2 source /boot/grub/theme.cfg
3
4 menuentry 'Install' --hotkey=i {
5 linux @KERNEL_GI@ vga=788 @APPEND_INSTALL@ --- quiet
6 initrd @INITRD_GI@
7 }
8
9 menuentry 'Expert install' --hotkey=x {
10 linux @KERNEL_GI@ priority=low vga=788 @APPEND_INSTALL@
11 initrd @INITRD_GI@
12 }
13
14 menuentry 'Automated install' --hotkey=a {
15 linux @KERNEL_GI@ auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
16 initrd @INITRD_GI@
17 }
18
19 menuentry 'Rescue mode' --hotkey=r {
20 linux @KERNEL_GI@ rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
21 initrd @INITRD_GI@
22 }
23 }
24
25 submenu 'Text installer ...' --hotkey=t {
26
27 source /boot/grub/theme.cfg
28
29 menuentry 'Install' --hotkey=i {
30 linux @KERNEL_DI@ vga=788 @APPEND_INSTALL@ --- quiet
31 initrd @INITRD_DI@
32 }
33
34 menuentry 'Expert install' --hotkey=x {
35 linux @KERNEL_DI@ priority=low vga=788 @APPEND_INSTALL@
36 initrd @INITRD_DI@
37 }
38
39 menuentry 'Automated install' --hotkey=a {
40 linux @KERNEL_DI@ auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
41 initrd @INITRD_DI@
42 }
43
44 menuentry 'Rescue mode' --hotkey=r {
45 linux @KERNEL_DI@ rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
46 initrd @INITRD_DI@
47 }
48 }
49
50 submenu 'Graphical installer with dark theme ...' --hotkey=d {
51
52 source /boot/grub/theme.cfg
53
54 menuentry 'Install' --hotkey=i {
55 linux @KERNEL_GI@ vga=788 theme=dark @APPEND_INSTALL@ --- quiet
56 initrd @INITRD_GI@
57 }
58
59 menuentry 'Expert install' --hotkey=x {
60 linux @KERNEL_GI@ priority=low vga=788 theme=dark @APPEND_INSTALL@
61 initrd @INITRD_GI@
62 }
63
64 menuentry 'Automated install' --hotkey=a {
65 linux @KERNEL_GI@ auto=true priority=critical vga=788 theme=dark @APPEND_INSTALL@ --- quiet
66 initrd @INITRD_GI@
67 }
68
69 menuentry 'Rescue mode' --hotkey=r {
70 linux @KERNEL_GI@ rescue/enable=true vga=788 theme=dark @APPEND_INSTALL@ --- quiet
71 initrd @INITRD_GI@
72 }
73 }
74
75 submenu 'Text installer with dark theme ...' --hotkey=k {
76
77 source /boot/grub/theme.cfg
78
79 menuentry 'Install' --hotkey=i {
80 linux @KERNEL_DI@ vga=788 theme=dark @APPEND_INSTALL@ --- quiet
81 initrd @INITRD_DI@
82 }
83
84 menuentry 'Expert install' --hotkey=x {
85 linux @KERNEL_DI@ priority=low vga=788 theme=dark @APPEND_INSTALL@
86 initrd @INITRD_DI@
87 }
88
89 menuentry 'Automated install' --hotkey=a {
90 linux @KERNEL_DI@ auto=true priority=critical vga=788 theme=dark @APPEND_INSTALL@ --- quiet
91 initrd @INITRD_DI@
92 }
93
94 menuentry 'Rescue mode' --hotkey=r {
95 linux @KERNEL_DI@ rescue/enable=true vga=788 theme=dark @APPEND_INSTALL@ --- quiet
96 initrd @INITRD_DI@
97 }
98 }
99
100 submenu 'Installer with speech synthesis ...' --hotkey=s {
101
102 source /boot/grub/theme.cfg
103
104 menuentry 'Install' --hotkey=i {
105 linux @KERNEL_GI@ speakup.synth=soft vga=788 @APPEND_INSTALL@ --- quiet
106 initrd @INITRD_GI@
107 }
108
109 menuentry 'Expert install' --hotkey=x {
110 linux @KERNEL_GI@ speakup.synth=soft priority=low vga=788 @APPEND_INSTALL@
111 initrd @INITRD_GI@
112 }
113
114 menuentry 'Automated install' --hotkey=a {
115 linux @KERNEL_GI@ speakup.synth=soft auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
116 initrd @INITRD_GI@
117 }
118
119 menuentry 'Rescue mode' --hotkey=r {
120 linux @KERNEL_GI@ speakup.synth=soft rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
121 initrd @INITRD_GI@
122 }
123 }
0 menuentry 'Start installer' --hotkey=i {
1 linux @KERNEL_GI@ vga=788 @APPEND_INSTALL@ --- quiet
2 initrd @INITRD_GI@
3 }
4
5 menuentry 'Start installer with speech synthesis' --hotkey=s {
6 linux @KERNEL_GI@ speakup.synth=soft vga=788 @APPEND_INSTALL@ --- quiet
7 initrd @INITRD_GI@
8 }
0 menuentry 'Start installer' --hotkey=i {
1 linux @KERNEL_DI@ vga=788 @APPEND_INSTALL@ --- quiet
2 initrd @INITRD_DI@
3 }
0 submenu 'Text installer ...' --hotkey=t {
1
2 source /boot/grub/theme.cfg
3
4 menuentry 'Install' --hotkey=i {
5 linux @KERNEL_DI@ vga=788 @APPEND_INSTALL@ --- quiet
6 initrd @INITRD_DI@
7 }
8
9 menuentry 'Expert install' --hotkey=x {
10 linux @KERNEL_DI@ priority=low vga=788 @APPEND_INSTALL@
11 initrd @INITRD_DI@
12 }
13
14 menuentry 'Automated install' --hotkey=a {
15 linux @KERNEL_DI@ auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
16 initrd @INITRD_DI@
17 }
18
19 menuentry 'Rescue mode' --hotkey=r {
20 linux @KERNEL_DI@ rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
21 initrd @INITRD_DI@
22 }
23 }
24
25 submenu 'Text installer with dark theme ...' --hotkey=k {
26
27 source /boot/grub/theme.cfg
28
29 menuentry 'Install' --hotkey=i {
30 linux @KERNEL_DI@ vga=788 theme=dark @APPEND_INSTALL@ --- quiet
31 initrd @INITRD_DI@
32 }
33
34 menuentry 'Expert install' --hotkey=x {
35 linux @KERNEL_DI@ priority=low vga=788 theme=dark @APPEND_INSTALL@
36 initrd @INITRD_DI@
37 }
38
39 menuentry 'Automated install' --hotkey=a {
40 linux @KERNEL_DI@ auto=true priority=critical vga=788 theme=dark @APPEND_INSTALL@ --- quiet
41 initrd @INITRD_DI@
42 }
43
44 menuentry 'Rescue mode' --hotkey=r {
45 linux @KERNEL_DI@ rescue/enable=true vga=788 theme=dark @APPEND_INSTALL@ --- quiet
46 initrd @INITRD_DI@
47 }
48 }
0 menuentry "Memory Diagnostic Tool (@MEMTEST_VERSION@)" --hotkey=m {
1 linux16 @MEMTEST_BIN@
2 }
0 set color_normal=light-gray/black
1 set color_highlight=white/dark-gray
2
3 if [ -e /isolinux/splash.png ]; then
4 # binary_syslinux modifies the theme file to point to the correct
5 # background picture
6 set theme=/boot/grub/live-theme/theme.txt
7 elif [ -e /boot/grub/splash.png ]; then
8 set theme=/boot/grub/live-theme/theme.txt
9 else
10 set menu_color_normal=cyan/blue
11 set menu_color_highlight=white/blue
12 fi
+0
-7
share/bootloaders/isolinux/advanced.cfg less more
0 label hdt
1 menu label ^Hardware Detection Tool (HDT)
2 com32 hdt.c32
3
4 label memtest
5 menu label ^Memory Diagnostic Tool (memtest86+)
6 linux /live/memtest
+0
-1
share/bootloaders/isolinux/hdt.c32 less more
0 /usr/lib/syslinux/modules/bios/hdt.c32
+0
-11
share/bootloaders/isolinux/install.cfg less more
0 label install
1 menu label ^Install
2 linux /install/vmlinuz
3 initrd /install/initrd.gz
4 append vga=788 @APPEND_INSTALL@ --- quiet
5
6 label installgui
7 menu label ^Graphical install
8 linux /install/gtk/vmlinuz
9 initrd /install/gtk/initrd.gz
10 append video=vesa:ywrap,mtrr vga=788 @APPEND_INSTALL@ --- quiet
+0
-1
share/bootloaders/isolinux/libcom32.c32 less more
0 /usr/lib/syslinux/modules/bios/libcom32.c32
+0
-1
share/bootloaders/isolinux/libgpl.c32 less more
0 /usr/lib/syslinux/modules/bios/libgpl.c32
+0
-1
share/bootloaders/isolinux/libmenu.c32 less more
0 /usr/lib/syslinux/modules/bios/libmenu.c32
+0
-1
share/bootloaders/isolinux/libutil.c32 less more
0 /usr/lib/syslinux/modules/bios/libutil.c32
+0
-12
share/bootloaders/isolinux/live.cfg.in less more
0 label live-@FLAVOUR@
1 menu label ^Live (@FLAVOUR@)
2 menu default
3 linux @LINUX@
4 initrd @INITRD@
5 append @APPEND_LIVE@
6
7 label live-@FLAVOUR@-failsafe
8 menu label ^Live (@FLAVOUR@ failsafe)
9 linux @LINUX@
10 initrd @INITRD@
11 append @APPEND_LIVE_FAILSAFE@
+0
-17
share/bootloaders/isolinux/menu.cfg less more
0 menu hshift 0
1 menu width 82
2
3 menu title Boot menu
4 include stdmenu.cfg
5 include live.cfg
6 include install.cfg
7 menu begin advanced
8 menu title ^Advanced options
9 include stdmenu.cfg
10 label mainmenu
11 menu label ^Back..
12 menu exit
13 include advanced.cfg
14 menu end
15
16 menu clear
+0
-388
share/bootloaders/isolinux/splash.svg less more
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!-- Created with Inkscape (http://www.inkscape.org/) -->
2
3 <svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:xlink="http://www.w3.org/1999/xlink"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="640"
13 height="480"
14 id="svg3320"
15 version="1.1"
16 inkscape:version="0.48.3.1 r9886"
17 sodipodi:docname="splash.svg.in">
18 <defs
19 id="defs3322">
20 <radialGradient
21 gradientUnits="userSpaceOnUse"
22 gradientTransform="matrix(1.402663,0,0,1.115648,-6.237984,0.0533075)"
23 r="18.370251"
24 fy="10.943316"
25 fx="15.491823"
26 cy="10.943316"
27 cx="15.491823"
28 id="radialGradient2813"
29 xlink:href="#linearGradient2807"
30 inkscape:collect="always" />
31 <radialGradient
32 r="35.934704"
33 fy="424.15677"
34 fx="131.23691"
35 cy="424.15677"
36 cx="131.23691"
37 gradientTransform="matrix(0.101953,-0.04272301,0.09621296,0.229599,-48.67227,-64.24148)"
38 gradientUnits="userSpaceOnUse"
39 id="radialGradient2798"
40 xlink:href="#linearGradient8543"
41 inkscape:collect="always" />
42 <radialGradient
43 gradientUnits="userSpaceOnUse"
44 gradientTransform="matrix(1,0,0,0.415385,0,26.70146)"
45 r="30.365856"
46 fy="45.673546"
47 fx="29.898689"
48 cy="45.673546"
49 cx="29.898689"
50 id="radialGradient18290"
51 xlink:href="#linearGradient18284"
52 inkscape:collect="always" />
53 <radialGradient
54 gradientUnits="userSpaceOnUse"
55 gradientTransform="matrix(0.105628,-0.04514018,0.06692574,0.156607,-46.01605,-24.35485)"
56 r="103.26014"
57 fy="409.83737"
58 fx="340.35886"
59 cy="409.83737"
60 cx="340.35886"
61 id="radialGradient13895"
62 xlink:href="#linearGradient8543"
63 inkscape:collect="always" />
64 <radialGradient
65 gradientUnits="userSpaceOnUse"
66 gradientTransform="matrix(0.08174351,0.01024998,-0.04335971,0.345793,6.123413,-84.50421)"
67 r="38.451698"
68 fy="270.67969"
69 fx="424.99243"
70 cy="270.67969"
71 cx="424.99243"
72 id="radialGradient11208"
73 xlink:href="#linearGradient11202"
74 inkscape:collect="always" />
75 <radialGradient
76 gradientUnits="userSpaceOnUse"
77 gradientTransform="matrix(0.272962,-0.071724,0.05616202,0.213737,-78.54657,-24.30491)"
78 r="48.782982"
79 fy="243.06874"
80 fx="293.81989"
81 cy="243.06874"
82 cx="293.81989"
83 id="radialGradient10317"
84 xlink:href="#linearGradient8543"
85 inkscape:collect="always" />
86 <radialGradient
87 gradientUnits="userSpaceOnUse"
88 gradientTransform="matrix(0.224796,0.01017229,-0.00975947,0.215674,-73.87964,-54.89804)"
89 r="40.975471"
90 fy="286.46918"
91 fx="500.97794"
92 cy="286.46918"
93 cx="500.97794"
94 id="radialGradient9434"
95 xlink:href="#linearGradient8543"
96 inkscape:collect="always" />
97 <radialGradient
98 gradientUnits="userSpaceOnUse"
99 gradientTransform="matrix(0.163532,-0.01065754,0.01078108,0.165425,-46.18187,-65.65506)"
100 r="235.88632"
101 fy="685.99139"
102 fx="420.87839"
103 cy="685.99139"
104 cx="420.87839"
105 id="radialGradient8549"
106 xlink:href="#linearGradient8543"
107 inkscape:collect="always" />
108 <radialGradient
109 r="297.21338"
110 fy="-72.420044"
111 fx="336.73767"
112 cy="-72.420044"
113 cx="336.73767"
114 gradientTransform="matrix(0.136507,0,-4.484926e-5,0.07137743,-23.39816,12.31028)"
115 gradientUnits="userSpaceOnUse"
116 id="radialGradient7666"
117 xlink:href="#linearGradient5012"
118 inkscape:collect="always" />
119 <linearGradient
120 id="linearGradient5012">
121 <stop
122 id="stop5014"
123 offset="0"
124 style="stop-color:#fdf188;stop-opacity:1;" />
125 <stop
126 id="stop5016"
127 offset="1"
128 style="stop-color:#d3bc00;stop-opacity:1;" />
129 </linearGradient>
130 <linearGradient
131 id="linearGradient8543">
132 <stop
133 id="stop8545"
134 offset="0"
135 style="stop-color:#fffef5;stop-opacity:0.94117647;" />
136 <stop
137 id="stop8547"
138 offset="1"
139 style="stop-color:#fce94f;stop-opacity:0;" />
140 </linearGradient>
141 <linearGradient
142 id="linearGradient11202">
143 <stop
144 id="stop11204"
145 offset="0"
146 style="stop-color:#c4a000;stop-opacity:1;" />
147 <stop
148 id="stop11206"
149 offset="1"
150 style="stop-color:#c4a000;stop-opacity:0;" />
151 </linearGradient>
152 <linearGradient
153 id="linearGradient18284">
154 <stop
155 id="stop18286"
156 offset="0"
157 style="stop-color:#000000;stop-opacity:1;" />
158 <stop
159 style="stop-color:#000000;stop-opacity:1;"
160 offset="0.5"
161 id="stop20913" />
162 <stop
163 style="stop-color:#000000;stop-opacity:0;"
164 offset="1"
165 id="stop19165" />
166 </linearGradient>
167 <linearGradient
168 id="linearGradient2807"
169 inkscape:collect="always">
170 <stop
171 id="stop2809"
172 offset="0"
173 style="stop-color:#ffffff;stop-opacity:1;" />
174 <stop
175 id="stop2811"
176 offset="1"
177 style="stop-color:#ffffff;stop-opacity:0;" />
178 </linearGradient>
179 <inkscape:perspective
180 id="perspective47"
181 inkscape:persp3d-origin="24 : 16 : 1"
182 inkscape:vp_z="48 : 24 : 1"
183 inkscape:vp_y="0 : 1000 : 0"
184 inkscape:vp_x="0 : 24 : 1"
185 sodipodi:type="inkscape:persp3d" />
186 </defs>
187 <sodipodi:namedview
188 id="base"
189 pagecolor="#ffffff"
190 bordercolor="#666666"
191 borderopacity="1.0"
192 inkscape:pageopacity="0.0"
193 inkscape:pageshadow="2"
194 inkscape:zoom="0.775"
195 inkscape:cx="574.36733"
196 inkscape:cy="250.84337"
197 inkscape:document-units="px"
198 inkscape:current-layer="layer1"
199 showgrid="false"
200 inkscape:window-width="1016"
201 inkscape:window-height="570"
202 inkscape:window-x="0"
203 inkscape:window-y="1"
204 inkscape:window-maximized="0" />
205 <metadata
206 id="metadata3325">
207 <rdf:RDF>
208 <cc:Work
209 rdf:about="">
210 <dc:format>image/svg+xml</dc:format>
211 <dc:type
212 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
213 <dc:title></dc:title>
214 </cc:Work>
215 </rdf:RDF>
216 </metadata>
217 <g
218 inkscape:label="Layer 1"
219 inkscape:groupmode="layer"
220 id="layer1"
221 transform="translate(0,-572.3622)">
222 <rect
223 style="fill:#000000;fill-opacity:1;stroke:none"
224 id="rect3328"
225 width="640"
226 height="480"
227 x="0"
228 y="572.36218" />
229 <text
230 transform="scale(1.0000015,0.99999849)"
231 sodipodi:linespacing="100%"
232 id="text3002"
233 y="619.20685"
234 x="190.68135"
235 style="font-size:35.65467453px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
236 xml:space="preserve"><tspan
237 y="619.20685"
238 x="190.68135"
239 sodipodi:role="line"
240 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
241 id="tspan3045">@PROJECT@ @VERSION@ (@DISTRIBUTION@)</tspan><tspan
242 y="639.20679"
243 x="190.68135"
244 sodipodi:role="line"
245 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
246 id="tspan3041">@ARCHITECTURE@</tspan><tspan
247 y="659.20679"
248 x="190.68135"
249 sodipodi:role="line"
250 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
251 id="tspan3037" /><tspan
252 y="679.20679"
253 x="190.68135"
254 sodipodi:role="line"
255 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
256 id="tspan3039">Build: @YEAR@-@MONTH@-@DAY@ @HOUR@:@MINUTE@:@SECOND@</tspan><tspan
257 y="699.20673"
258 x="190.68135"
259 sodipodi:role="line"
260 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
261 id="tspan3098" /><tspan
262 y="719.20667"
263 x="190.68135"
264 sodipodi:role="line"
265 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
266 id="tspan3102">linux: @LINUX_VERSIONS@</tspan><tspan
267 y="739.20667"
268 x="190.68135"
269 sodipodi:role="line"
270 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
271 id="tspan3076">live-build: @LIVE_BUILD_VERSION@</tspan><tspan
272 y="759.20667"
273 x="190.68135"
274 sodipodi:role="line"
275 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
276 id="tspan3068">live-boot: @LIVE_BOOT_VERSION@</tspan><tspan
277 y="779.2066"
278 x="190.68135"
279 sodipodi:role="line"
280 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
281 id="tspan3070">live-config: @LIVE_CONFIG_VERSION@</tspan><tspan
282 y="799.20654"
283 x="190.68135"
284 sodipodi:role="line"
285 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
286 id="tspan3012">live-tools: @LIVE_TOOLS_VERSION@</tspan><tspan
287 y="819.20654"
288 x="190.68135"
289 sodipodi:role="line"
290 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
291 id="tspan3066" /></text>
292 <text
293 xml:space="preserve"
294 style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
295 x="200"
296 y="336.7742"
297 id="text3114"
298 sodipodi:linespacing="125%"
299 transform="translate(0,572.3622)"><tspan
300 sodipodi:role="line"
301 id="tspan3116" /></text>
302 <g
303 id="layer1-9"
304 inkscape:label="Layer 1"
305 transform="matrix(2.8369273,0,0,2.8369235,27.782921,602.43406)">
306 <path
307 transform="matrix(0.742527,0,-0.05812964,1.428611,4.500517,-36.68345)"
308 d="m 60.264545,45.673546 c 0,6.966249 -13.595256,12.613509 -30.365856,12.613509 -16.770599,0 -30.3658559,-5.64726 -30.3658559,-12.613509 0,-6.966249 13.5952569,-12.613509 30.3658559,-12.613509 16.7706,0 30.365856,5.64726 30.365856,12.613509 z"
309 sodipodi:ry="12.613509"
310 sodipodi:rx="30.365856"
311 sodipodi:cy="45.673546"
312 sodipodi:cx="29.898689"
313 id="path17409"
314 style="fill:url(#radialGradient18290);fill-opacity:1;stroke:none"
315 sodipodi:type="arc" />
316 <path
317 sodipodi:nodetypes="cccscsssscsccsc"
318 id="path3120"
319 d="M 23.152758,1.1801876 C 20.380218,1.2190783 17.86582,1.8908769 15.634281,3.0196314 14.541531,5.1714614 10.9437,7.7293655 9.4689484,8.0015561 6.5691703,11.460832 4.6887193,15.805035 3.9754523,19.98162 c -4.375e-4,0.0026 4.366e-4,0.0052 0,0.0077 -1.1863594,1.549717 -1.6900108,3.396594 -1.3773472,5.53256 1.1211744,7.659314 3.2821678,14.888292 8.1850959,16.556275 7.154429,2.433946 21.871769,1.785847 25.129507,0.458258 7.13903,-2.909286 7.771453,-9.285098 8.891432,-16.780256 0.305554,-2.044832 -0.144835,-3.841202 -1.230601,-5.372942 -0.009,-0.0556 -0.01849,-0.111474 -0.02832,-0.167342 C 42.763966,15.777007 40.697859,11.326849 37.602582,7.8466935 35.508773,7.62926 31.462964,4.270333 30.483158,2.6229925 28.330506,1.7020155 25.961342,1.1801876 23.407632,1.1801876 c -0.08532,0 -0.170037,-0.00119 -0.254874,0 z"
320 style="fill:url(#radialGradient7666);fill-opacity:1;stroke:#c4a000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
321 inkscape:connector-curvature="0" />
322 <path
323 sodipodi:nodetypes="ccscc"
324 id="path7668"
325 d="M 43.629688,22.792984 C 39.033494,39.233217 10.438199,40.802737 3.7832765,23.04227 3.7410682,39.366403 10.103414,44.083889 28.189955,43.247454 c 3.061977,-0.140689 10.00982,0.04287 14.614484,-9.136776 2.238365,-11.5104 0.825249,-11.317694 0.825249,-11.317694 z"
326 style="opacity:0.66666667;fill:url(#radialGradient8549);fill-opacity:1;fill-rule:evenodd;stroke:none"
327 inkscape:connector-curvature="0" />
328 <path
329 sodipodi:nodetypes="cccc"
330 id="path8553"
331 d="m 34.691565,7.6783057 2.500881,1.1253976 c 0,0 -1.310404,10.1226397 -6.669016,16.4849717 1.771665,-6.455834 4.188975,-17.6103693 4.168135,-17.6103693 z"
332 style="fill:url(#radialGradient9434);fill-opacity:1;fill-rule:evenodd;stroke:none"
333 inkscape:connector-curvature="0" />
334 <path
335 sodipodi:nodetypes="cccc"
336 id="path9436"
337 d="m 15.872437,4.1562328 c 1.50053,9.0656942 6.50229,19.4860282 6.002115,20.0070452 -4.584948,-6.981624 -6.502291,-12.921217 -8.00282,-17.9229779 0,-0.083363 2.000705,-2.0632267 2.000705,-2.0840673 z"
338 style="fill:url(#radialGradient10317);fill-opacity:1;fill-rule:evenodd;stroke:none"
339 inkscape:connector-curvature="0" />
340 <path
341 sodipodi:nodetypes="ccsc"
342 id="path10319"
343 d="M 30.21082,3.8227818 C 26.126047,20.328594 25.959322,23.079563 25.959322,23.079563 c 0,0 6.335566,-16.7559003 6.335566,-17.1727135 0,-8e-7 -1.583891,-1.5005286 -2.084068,-2.0840677 z"
344 style="fill:url(#radialGradient11208);fill-opacity:1;fill-rule:evenodd;stroke:none"
345 inkscape:connector-curvature="0" />
346 <flowRoot
347 id="flowRoot12974"
348 xml:space="preserve"><flowRegion
349 id="flowRegion12976"><rect
350 y="412.80496"
351 x="86.787514"
352 height="16.02231"
353 width="40.055775"
354 id="rect12978" /></flowRegion><flowPara
355 id="flowPara12980" /></flowRoot> <path
356 sodipodi:nodetypes="ccccccc"
357 id="path13014"
358 d="m 16.18209,34.476182 -0.04467,-9.569745 14.493727,0 1.642604,-1.263542 -16.931465,0 0.04467,10.640581 0.795134,0.192706 z"
359 style="fill:url(#radialGradient13895);fill-opacity:1;fill-rule:evenodd;stroke:none"
360 inkscape:connector-curvature="0" />
361 <path
362 sodipodi:nodetypes="ccccc"
363 id="path13897"
364 d="m 31.043495,24.81709 0.08168,9.804611 0.686144,-0.214742 0.01198,-10.85341 -0.779803,1.263541 z"
365 style="fill:#958401;fill-opacity:1;fill-rule:evenodd;stroke:none"
366 inkscape:connector-curvature="0" />
367 <path
368 sodipodi:nodetypes="ccccscc"
369 id="path16526"
370 d="m 4.2551267,24.106065 c 0,0 2.3166503,8.115689 10.2209413,8.766037 1.105608,2.490418 -1.13497,4.124601 -1.13497,4.124601 L 9.7315781,36.745641 c 0,0 -6.2387745,-7.992942 -6.4882087,-9.900882 -0.2494325,-1.907937 0.1632835,-3.407793 0.1632835,-3.407793 l 0.8484738,0.669099 z"
371 style="fill:url(#radialGradient2798);fill-opacity:1;fill-rule:evenodd;stroke:none"
372 inkscape:connector-curvature="0" />
373 <path
374 style="opacity:0.74444442;fill:none;stroke:#ffffff;stroke-width:0.99999976;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
375 d="M 23.184204,2.3889904 C 20.570275,2.4256563 18.199721,3.0590226 16.095844,4.1232033 15.065608,6.1519314 11.673602,8.563503 10.283218,8.8201221 7.5493302,12.0815 5.776456,16.17718 5.1039936,20.11483 c -4.124e-4,0.0024 4.116e-4,0.0049 0,0.0073 -1.1184901,1.46106 -1.8584936,3.246475 -1.5637169,5.260247 1.0570343,7.22114 2.9276025,13.709677 7.3279793,15.639454 5.923141,2.597582 21.539722,1.785935 24.611092,0.534295 6.73062,-2.742852 7.061699,-8.930694 8.117606,-15.997069 0.288074,-1.927851 -0.13655,-3.621454 -1.160201,-5.065566 -0.0084,-0.05242 -0.01743,-0.105097 -0.0267,-0.157769 C 41.673494,16.150755 39.725585,11.955182 36.807382,8.6741189 34.833356,8.4691243 31.019,5.3023548 30.095246,3.7492553 28.065743,2.8809656 25.832115,2.3889904 23.424497,2.3889904 c -0.08044,0 -0.160309,-0.00112 -0.240293,0 z"
376 id="path2703"
377 sodipodi:nodetypes="cccscsssscsccsc"
378 inkscape:connector-curvature="0" />
379 <path
380 sodipodi:nodetypes="cccssccscccssc"
381 id="path2800"
382 d="m 22.59375,2.78125 c -2.329557,0.1165682 -4.440971,0.7250384 -6.34375,1.6875 -1.010725,1.9903059 -4.354698,4.373241 -5.71875,4.625 -2.6821095,3.199611 -4.4027734,7.199424 -5.0625,11.0625 -4.046e-4,0.0024 4.038e-4,0.02888 0,0.03125 -1.0973069,1.43339 -1.4580267,3.591148 -1.4580267,3.591148 4.685267,3.605062 7.6416117,0.213892 14.3188727,-2.01722 12.59928,1.923141 18.748338,-0.995945 22.514154,-5.667678 0.0069,-0.0085 -0.0035,-0.02088 0,-0.03125 C 39.852567,13.479666 38.411479,11.016387 36.5625,8.9375 34.62586,8.7363873 30.875008,5.6486852 29.96875,4.125 27.977684,3.2731547 25.79952,2.78125 23.4375,2.78125 c -0.07892,10e-8 -0.171531,-0.0011 -0.25,0 -0.200346,0.00281 -0.39633,-0.00988 -0.59375,0 z"
383 style="opacity:0.59444424;fill:url(#radialGradient2813);fill-opacity:1;stroke:none"
384 inkscape:connector-curvature="0" />
385 </g>
386 </g>
387 </svg>
+0
-15
share/bootloaders/isolinux/stdmenu.cfg less more
0 menu background splash.png
1 menu color title * #FFFFFFFF *
2 menu color border * #00000000 #00000000 none
3 menu color sel * #ffffffff #76a1d0ff *
4 menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *
5 menu color tabmsg * #ffffffff #00000000 *
6 menu color help 37;40 #ffdddd00 #00000000 none
7 menu vshift 12
8 menu rows 10
9 menu helpmsgrow 15
10 # The command line must be at least one line from the bottom.
11 menu cmdlinerow 16
12 menu timeoutrow 16
13 menu tabmsgrow 18
14 menu tabmsg Press ENTER to boot or TAB to edit a menu entry
+0
-1
share/bootloaders/isolinux/vesamenu.c32 less more
0 /usr/lib/syslinux/modules/bios/vesamenu.c32
+0
-7
share/bootloaders/pxelinux/advanced.cfg less more
0 label hdt
1 menu label ^Hardware Detection Tool (HDT)
2 com32 hdt.c32
3
4 label memtest
5 menu label ^Memory Diagnostic Tool (memtest86+)
6 linux /live/memtest
+0
-1
share/bootloaders/pxelinux/hdt.c32 less more
0 /usr/lib/syslinux/modules/bios/hdt.c32
+0
-11
share/bootloaders/pxelinux/install.cfg less more
0 label install
1 menu label ^Install
2 linux /install/vmlinuz
3 initrd /install/initrd.gz
4 append vga=788 @APPEND_INSTALL@ --- quiet
5
6 label installgui
7 menu label ^Graphical install
8 linux /install/gtk/vmlinuz
9 initrd /install/gtk/initrd.gz
10 append video=vesa:ywrap,mtrr vga=788 @APPEND_INSTALL@ --- quiet
+0
-1
share/bootloaders/pxelinux/libcom32.c32 less more
0 /usr/lib/syslinux/modules/bios/libcom32.c32
+0
-1
share/bootloaders/pxelinux/libgpl.c32 less more
0 /usr/lib/syslinux/modules/bios/libgpl.c32
+0
-1
share/bootloaders/pxelinux/libmenu.c32 less more
0 /usr/lib/syslinux/modules/bios/libmenu.c32
+0
-1
share/bootloaders/pxelinux/libutil.c32 less more
0 /usr/lib/syslinux/modules/bios/libutil.c32
+0
-12
share/bootloaders/pxelinux/live.cfg.in less more
0 label live-@FLAVOUR@
1 menu label ^Live (@FLAVOUR@)
2 menu default
3 linux @LINUX@
4 initrd @INITRD@
5 append @APPEND_LIVE@
6
7 label live-@FLAVOUR@-failsafe
8 menu label ^Live (@FLAVOUR@ failsafe)
9 linux @LINUX@
10 initrd @INITRD@
11 append @APPEND_LIVE_FAILSAFE@
+0
-17
share/bootloaders/pxelinux/menu.cfg less more
0 menu hshift 0
1 menu width 82
2
3 menu title Boot menu
4 include stdmenu.cfg
5 include live.cfg
6 include install.cfg
7 menu begin advanced
8 menu title ^Advanced options
9 include stdmenu.cfg
10 label mainmenu
11 menu label ^Back..
12 menu exit
13 include advanced.cfg
14 menu end
15
16 menu clear
+0
-388
share/bootloaders/pxelinux/splash.svg less more
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!-- Created with Inkscape (http://www.inkscape.org/) -->
2
3 <svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:xlink="http://www.w3.org/1999/xlink"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="640"
13 height="480"
14 id="svg3320"
15 version="1.1"
16 inkscape:version="0.48.3.1 r9886"
17 sodipodi:docname="splash.svg.in">
18 <defs
19 id="defs3322">
20 <radialGradient
21 gradientUnits="userSpaceOnUse"
22 gradientTransform="matrix(1.402663,0,0,1.115648,-6.237984,0.0533075)"
23 r="18.370251"
24 fy="10.943316"
25 fx="15.491823"
26 cy="10.943316"
27 cx="15.491823"
28 id="radialGradient2813"
29 xlink:href="#linearGradient2807"
30 inkscape:collect="always" />
31 <radialGradient
32 r="35.934704"
33 fy="424.15677"
34 fx="131.23691"
35 cy="424.15677"
36 cx="131.23691"
37 gradientTransform="matrix(0.101953,-0.04272301,0.09621296,0.229599,-48.67227,-64.24148)"
38 gradientUnits="userSpaceOnUse"
39 id="radialGradient2798"
40 xlink:href="#linearGradient8543"
41 inkscape:collect="always" />
42 <radialGradient
43 gradientUnits="userSpaceOnUse"
44 gradientTransform="matrix(1,0,0,0.415385,0,26.70146)"
45 r="30.365856"
46 fy="45.673546"
47 fx="29.898689"
48 cy="45.673546"
49 cx="29.898689"
50 id="radialGradient18290"
51 xlink:href="#linearGradient18284"
52 inkscape:collect="always" />
53 <radialGradient
54 gradientUnits="userSpaceOnUse"
55 gradientTransform="matrix(0.105628,-0.04514018,0.06692574,0.156607,-46.01605,-24.35485)"
56 r="103.26014"
57 fy="409.83737"
58 fx="340.35886"
59 cy="409.83737"
60 cx="340.35886"
61 id="radialGradient13895"
62 xlink:href="#linearGradient8543"
63 inkscape:collect="always" />
64 <radialGradient
65 gradientUnits="userSpaceOnUse"
66 gradientTransform="matrix(0.08174351,0.01024998,-0.04335971,0.345793,6.123413,-84.50421)"
67 r="38.451698"
68 fy="270.67969"
69 fx="424.99243"
70 cy="270.67969"
71 cx="424.99243"
72 id="radialGradient11208"
73 xlink:href="#linearGradient11202"
74 inkscape:collect="always" />
75 <radialGradient
76 gradientUnits="userSpaceOnUse"
77 gradientTransform="matrix(0.272962,-0.071724,0.05616202,0.213737,-78.54657,-24.30491)"
78 r="48.782982"
79 fy="243.06874"
80 fx="293.81989"
81 cy="243.06874"
82 cx="293.81989"
83 id="radialGradient10317"
84 xlink:href="#linearGradient8543"
85 inkscape:collect="always" />
86 <radialGradient
87 gradientUnits="userSpaceOnUse"
88 gradientTransform="matrix(0.224796,0.01017229,-0.00975947,0.215674,-73.87964,-54.89804)"
89 r="40.975471"
90 fy="286.46918"
91 fx="500.97794"
92 cy="286.46918"
93 cx="500.97794"
94 id="radialGradient9434"
95 xlink:href="#linearGradient8543"
96 inkscape:collect="always" />
97 <radialGradient
98 gradientUnits="userSpaceOnUse"
99 gradientTransform="matrix(0.163532,-0.01065754,0.01078108,0.165425,-46.18187,-65.65506)"
100 r="235.88632"
101 fy="685.99139"
102 fx="420.87839"
103 cy="685.99139"
104 cx="420.87839"
105 id="radialGradient8549"
106 xlink:href="#linearGradient8543"
107 inkscape:collect="always" />
108 <radialGradient
109 r="297.21338"
110 fy="-72.420044"
111 fx="336.73767"
112 cy="-72.420044"
113 cx="336.73767"
114 gradientTransform="matrix(0.136507,0,-4.484926e-5,0.07137743,-23.39816,12.31028)"
115 gradientUnits="userSpaceOnUse"
116 id="radialGradient7666"
117 xlink:href="#linearGradient5012"
118 inkscape:collect="always" />
119 <linearGradient
120 id="linearGradient5012">
121 <stop
122 id="stop5014"
123 offset="0"
124 style="stop-color:#fdf188;stop-opacity:1;" />
125 <stop
126 id="stop5016"
127 offset="1"
128 style="stop-color:#d3bc00;stop-opacity:1;" />
129 </linearGradient>
130 <linearGradient
131 id="linearGradient8543">
132 <stop
133 id="stop8545"
134 offset="0"
135 style="stop-color:#fffef5;stop-opacity:0.94117647;" />
136 <stop
137 id="stop8547"
138 offset="1"
139 style="stop-color:#fce94f;stop-opacity:0;" />
140 </linearGradient>
141 <linearGradient
142 id="linearGradient11202">
143 <stop
144 id="stop11204"
145 offset="0"
146 style="stop-color:#c4a000;stop-opacity:1;" />
147 <stop
148 id="stop11206"
149 offset="1"
150 style="stop-color:#c4a000;stop-opacity:0;" />
151 </linearGradient>
152 <linearGradient
153 id="linearGradient18284">
154 <stop
155 id="stop18286"
156 offset="0"
157 style="stop-color:#000000;stop-opacity:1;" />
158 <stop
159 style="stop-color:#000000;stop-opacity:1;"
160 offset="0.5"
161 id="stop20913" />
162 <stop
163 style="stop-color:#000000;stop-opacity:0;"
164 offset="1"
165 id="stop19165" />
166 </linearGradient>
167 <linearGradient
168 id="linearGradient2807"
169 inkscape:collect="always">
170 <stop
171 id="stop2809"
172 offset="0"
173 style="stop-color:#ffffff;stop-opacity:1;" />
174 <stop
175 id="stop2811"
176 offset="1"
177 style="stop-color:#ffffff;stop-opacity:0;" />
178 </linearGradient>
179 <inkscape:perspective
180 id="perspective47"
181 inkscape:persp3d-origin="24 : 16 : 1"
182 inkscape:vp_z="48 : 24 : 1"
183 inkscape:vp_y="0 : 1000 : 0"
184 inkscape:vp_x="0 : 24 : 1"
185 sodipodi:type="inkscape:persp3d" />
186 </defs>
187 <sodipodi:namedview
188 id="base"
189 pagecolor="#ffffff"
190 bordercolor="#666666"
191 borderopacity="1.0"
192 inkscape:pageopacity="0.0"
193 inkscape:pageshadow="2"
194 inkscape:zoom="0.775"
195 inkscape:cx="574.36733"
196 inkscape:cy="250.84337"
197 inkscape:document-units="px"
198 inkscape:current-layer="layer1"
199 showgrid="false"
200 inkscape:window-width="1016"
201 inkscape:window-height="570"
202 inkscape:window-x="0"
203 inkscape:window-y="1"
204 inkscape:window-maximized="0" />
205 <metadata
206 id="metadata3325">
207 <rdf:RDF>
208 <cc:Work
209 rdf:about="">
210 <dc:format>image/svg+xml</dc:format>
211 <dc:type
212 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
213 <dc:title></dc:title>
214 </cc:Work>
215 </rdf:RDF>
216 </metadata>
217 <g
218 inkscape:label="Layer 1"
219 inkscape:groupmode="layer"
220 id="layer1"
221 transform="translate(0,-572.3622)">
222 <rect
223 style="fill:#000000;fill-opacity:1;stroke:none"
224 id="rect3328"
225 width="640"
226 height="480"
227 x="0"
228 y="572.36218" />
229 <text
230 transform="scale(1.0000015,0.99999849)"
231 sodipodi:linespacing="100%"
232 id="text3002"
233 y="619.20685"
234 x="190.68135"
235 style="font-size:35.65467453px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
236 xml:space="preserve"><tspan
237 y="619.20685"
238 x="190.68135"
239 sodipodi:role="line"
240 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
241 id="tspan3045">@PROJECT@ @VERSION@ (@DISTRIBUTION@)</tspan><tspan
242 y="639.20679"
243 x="190.68135"
244 sodipodi:role="line"
245 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
246 id="tspan3041">@ARCHITECTURE@</tspan><tspan
247 y="659.20679"
248 x="190.68135"
249 sodipodi:role="line"
250 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
251 id="tspan3037" /><tspan
252 y="679.20679"
253 x="190.68135"
254 sodipodi:role="line"
255 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
256 id="tspan3039">Build: @YEAR@-@MONTH@-@DAY@ @HOUR@:@MINUTE@:@SECOND@</tspan><tspan
257 y="699.20673"
258 x="190.68135"
259 sodipodi:role="line"
260 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
261 id="tspan3098" /><tspan
262 y="719.20667"
263 x="190.68135"
264 sodipodi:role="line"
265 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
266 id="tspan3102">linux: @LINUX_VERSIONS@</tspan><tspan
267 y="739.20667"
268 x="190.68135"
269 sodipodi:role="line"
270 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
271 id="tspan3076">live-build: @LIVE_BUILD_VERSION@</tspan><tspan
272 y="759.20667"
273 x="190.68135"
274 sodipodi:role="line"
275 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
276 id="tspan3068">live-boot: @LIVE_BOOT_VERSION@</tspan><tspan
277 y="779.2066"
278 x="190.68135"
279 sodipodi:role="line"
280 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
281 id="tspan3070">live-config: @LIVE_CONFIG_VERSION@</tspan><tspan
282 y="799.20654"
283 x="190.68135"
284 sodipodi:role="line"
285 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
286 id="tspan3012">live-tools: @LIVE_TOOLS_VERSION@</tspan><tspan
287 y="819.20654"
288 x="190.68135"
289 sodipodi:role="line"
290 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
291 id="tspan3066" /></text>
292 <text
293 xml:space="preserve"
294 style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
295 x="200"
296 y="336.7742"
297 id="text3114"
298 sodipodi:linespacing="125%"
299 transform="translate(0,572.3622)"><tspan
300 sodipodi:role="line"
301 id="tspan3116" /></text>
302 <g
303 id="layer1-9"
304 inkscape:label="Layer 1"
305 transform="matrix(2.8369273,0,0,2.8369235,27.782921,602.43406)">
306 <path
307 transform="matrix(0.742527,0,-0.05812964,1.428611,4.500517,-36.68345)"
308 d="m 60.264545,45.673546 c 0,6.966249 -13.595256,12.613509 -30.365856,12.613509 -16.770599,0 -30.3658559,-5.64726 -30.3658559,-12.613509 0,-6.966249 13.5952569,-12.613509 30.3658559,-12.613509 16.7706,0 30.365856,5.64726 30.365856,12.613509 z"
309 sodipodi:ry="12.613509"
310 sodipodi:rx="30.365856"
311 sodipodi:cy="45.673546"
312 sodipodi:cx="29.898689"
313 id="path17409"
314 style="fill:url(#radialGradient18290);fill-opacity:1;stroke:none"
315 sodipodi:type="arc" />
316 <path
317 sodipodi:nodetypes="cccscsssscsccsc"
318 id="path3120"
319 d="M 23.152758,1.1801876 C 20.380218,1.2190783 17.86582,1.8908769 15.634281,3.0196314 14.541531,5.1714614 10.9437,7.7293655 9.4689484,8.0015561 6.5691703,11.460832 4.6887193,15.805035 3.9754523,19.98162 c -4.375e-4,0.0026 4.366e-4,0.0052 0,0.0077 -1.1863594,1.549717 -1.6900108,3.396594 -1.3773472,5.53256 1.1211744,7.659314 3.2821678,14.888292 8.1850959,16.556275 7.154429,2.433946 21.871769,1.785847 25.129507,0.458258 7.13903,-2.909286 7.771453,-9.285098 8.891432,-16.780256 0.305554,-2.044832 -0.144835,-3.841202 -1.230601,-5.372942 -0.009,-0.0556 -0.01849,-0.111474 -0.02832,-0.167342 C 42.763966,15.777007 40.697859,11.326849 37.602582,7.8466935 35.508773,7.62926 31.462964,4.270333 30.483158,2.6229925 28.330506,1.7020155 25.961342,1.1801876 23.407632,1.1801876 c -0.08532,0 -0.170037,-0.00119 -0.254874,0 z"
320 style="fill:url(#radialGradient7666);fill-opacity:1;stroke:#c4a000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
321 inkscape:connector-curvature="0" />
322 <path
323 sodipodi:nodetypes="ccscc"
324 id="path7668"
325 d="M 43.629688,22.792984 C 39.033494,39.233217 10.438199,40.802737 3.7832765,23.04227 3.7410682,39.366403 10.103414,44.083889 28.189955,43.247454 c 3.061977,-0.140689 10.00982,0.04287 14.614484,-9.136776 2.238365,-11.5104 0.825249,-11.317694 0.825249,-11.317694 z"
326 style="opacity:0.66666667;fill:url(#radialGradient8549);fill-opacity:1;fill-rule:evenodd;stroke:none"
327 inkscape:connector-curvature="0" />
328 <path
329 sodipodi:nodetypes="cccc"
330 id="path8553"
331 d="m 34.691565,7.6783057 2.500881,1.1253976 c 0,0 -1.310404,10.1226397 -6.669016,16.4849717 1.771665,-6.455834 4.188975,-17.6103693 4.168135,-17.6103693 z"
332 style="fill:url(#radialGradient9434);fill-opacity:1;fill-rule:evenodd;stroke:none"
333 inkscape:connector-curvature="0" />
334 <path
335 sodipodi:nodetypes="cccc"
336 id="path9436"
337 d="m 15.872437,4.1562328 c 1.50053,9.0656942 6.50229,19.4860282 6.002115,20.0070452 -4.584948,-6.981624 -6.502291,-12.921217 -8.00282,-17.9229779 0,-0.083363 2.000705,-2.0632267 2.000705,-2.0840673 z"
338 style="fill:url(#radialGradient10317);fill-opacity:1;fill-rule:evenodd;stroke:none"
339 inkscape:connector-curvature="0" />
340 <path
341 sodipodi:nodetypes="ccsc"
342 id="path10319"
343 d="M 30.21082,3.8227818 C 26.126047,20.328594 25.959322,23.079563 25.959322,23.079563 c 0,0 6.335566,-16.7559003 6.335566,-17.1727135 0,-8e-7 -1.583891,-1.5005286 -2.084068,-2.0840677 z"
344 style="fill:url(#radialGradient11208);fill-opacity:1;fill-rule:evenodd;stroke:none"
345 inkscape:connector-curvature="0" />
346 <flowRoot
347 id="flowRoot12974"
348 xml:space="preserve"><flowRegion
349 id="flowRegion12976"><rect
350 y="412.80496"
351 x="86.787514"
352 height="16.02231"
353 width="40.055775"
354 id="rect12978" /></flowRegion><flowPara
355 id="flowPara12980" /></flowRoot> <path
356 sodipodi:nodetypes="ccccccc"
357 id="path13014"
358 d="m 16.18209,34.476182 -0.04467,-9.569745 14.493727,0 1.642604,-1.263542 -16.931465,0 0.04467,10.640581 0.795134,0.192706 z"
359 style="fill:url(#radialGradient13895);fill-opacity:1;fill-rule:evenodd;stroke:none"
360 inkscape:connector-curvature="0" />
361 <path
362 sodipodi:nodetypes="ccccc"
363 id="path13897"
364 d="m 31.043495,24.81709 0.08168,9.804611 0.686144,-0.214742 0.01198,-10.85341 -0.779803,1.263541 z"
365 style="fill:#958401;fill-opacity:1;fill-rule:evenodd;stroke:none"
366 inkscape:connector-curvature="0" />
367 <path
368 sodipodi:nodetypes="ccccscc"
369 id="path16526"
370 d="m 4.2551267,24.106065 c 0,0 2.3166503,8.115689 10.2209413,8.766037 1.105608,2.490418 -1.13497,4.124601 -1.13497,4.124601 L 9.7315781,36.745641 c 0,0 -6.2387745,-7.992942 -6.4882087,-9.900882 -0.2494325,-1.907937 0.1632835,-3.407793 0.1632835,-3.407793 l 0.8484738,0.669099 z"
371 style="fill:url(#radialGradient2798);fill-opacity:1;fill-rule:evenodd;stroke:none"
372 inkscape:connector-curvature="0" />
373 <path
374 style="opacity:0.74444442;fill:none;stroke:#ffffff;stroke-width:0.99999976;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
375 d="M 23.184204,2.3889904 C 20.570275,2.4256563 18.199721,3.0590226 16.095844,4.1232033 15.065608,6.1519314 11.673602,8.563503 10.283218,8.8201221 7.5493302,12.0815 5.776456,16.17718 5.1039936,20.11483 c -4.124e-4,0.0024 4.116e-4,0.0049 0,0.0073 -1.1184901,1.46106 -1.8584936,3.246475 -1.5637169,5.260247 1.0570343,7.22114 2.9276025,13.709677 7.3279793,15.639454 5.923141,2.597582 21.539722,1.785935 24.611092,0.534295 6.73062,-2.742852 7.061699,-8.930694 8.117606,-15.997069 0.288074,-1.927851 -0.13655,-3.621454 -1.160201,-5.065566 -0.0084,-0.05242 -0.01743,-0.105097 -0.0267,-0.157769 C 41.673494,16.150755 39.725585,11.955182 36.807382,8.6741189 34.833356,8.4691243 31.019,5.3023548 30.095246,3.7492553 28.065743,2.8809656 25.832115,2.3889904 23.424497,2.3889904 c -0.08044,0 -0.160309,-0.00112 -0.240293,0 z"
376 id="path2703"
377 sodipodi:nodetypes="cccscsssscsccsc"
378 inkscape:connector-curvature="0" />
379 <path
380 sodipodi:nodetypes="cccssccscccssc"
381 id="path2800"
382 d="m 22.59375,2.78125 c -2.329557,0.1165682 -4.440971,0.7250384 -6.34375,1.6875 -1.010725,1.9903059 -4.354698,4.373241 -5.71875,4.625 -2.6821095,3.199611 -4.4027734,7.199424 -5.0625,11.0625 -4.046e-4,0.0024 4.038e-4,0.02888 0,0.03125 -1.0973069,1.43339 -1.4580267,3.591148 -1.4580267,3.591148 4.685267,3.605062 7.6416117,0.213892 14.3188727,-2.01722 12.59928,1.923141 18.748338,-0.995945 22.514154,-5.667678 0.0069,-0.0085 -0.0035,-0.02088 0,-0.03125 C 39.852567,13.479666 38.411479,11.016387 36.5625,8.9375 34.62586,8.7363873 30.875008,5.6486852 29.96875,4.125 27.977684,3.2731547 25.79952,2.78125 23.4375,2.78125 c -0.07892,10e-8 -0.171531,-0.0011 -0.25,0 -0.200346,0.00281 -0.39633,-0.00988 -0.59375,0 z"
383 style="opacity:0.59444424;fill:url(#radialGradient2813);fill-opacity:1;stroke:none"
384 inkscape:connector-curvature="0" />
385 </g>
386 </g>
387 </svg>
+0
-15
share/bootloaders/pxelinux/stdmenu.cfg less more
0 menu background splash.png
1 menu color title * #FFFFFFFF *
2 menu color border * #00000000 #00000000 none
3 menu color sel * #ffffffff #76a1d0ff *
4 menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *
5 menu color tabmsg * #ffffffff #00000000 *
6 menu color help 37;40 #ffdddd00 #00000000 none
7 menu vshift 12
8 menu rows 10
9 menu helpmsgrow 15
10 # The command line must be at least one line from the bottom.
11 menu cmdlinerow 16
12 menu timeoutrow 16
13 menu tabmsgrow 18
14 menu tabmsg Press ENTER to boot or TAB to edit a menu entry
+0
-1
share/bootloaders/pxelinux/vesamenu.c32 less more
0 /usr/lib/syslinux/modules/bios/vesamenu.c32
+0
-7
share/bootloaders/syslinux/advanced.cfg less more
0 label hdt
1 menu label ^Hardware Detection Tool (HDT)
2 com32 hdt.c32
3
4 label memtest
5 menu label ^Memory Diagnostic Tool (memtest86+)
6 linux /live/memtest
+0
-1
share/bootloaders/syslinux/hdt.c32 less more
0 /usr/lib/syslinux/modules/bios/hdt.c32
+0
-11
share/bootloaders/syslinux/install.cfg less more
0 label install
1 menu label ^Install
2 linux /install/vmlinuz
3 initrd /install/initrd.gz
4 append vga=788 @APPEND_INSTALL@ --- quiet
5
6 label installgui
7 menu label ^Graphical install
8 linux /install/gtk/vmlinuz
9 initrd /install/gtk/initrd.gz
10 append video=vesa:ywrap,mtrr vga=788 @APPEND_INSTALL@ --- quiet
+0
-1
share/bootloaders/syslinux/libcom32.c32 less more
0 /usr/lib/syslinux/modules/bios/libcom32.c32
+0
-1
share/bootloaders/syslinux/libgpl.c32 less more
0 /usr/lib/syslinux/modules/bios/libgpl.c32
+0
-1
share/bootloaders/syslinux/libmenu.c32 less more
0 /usr/lib/syslinux/modules/bios/libmenu.c32
+0
-1
share/bootloaders/syslinux/libutil.c32 less more
0 /usr/lib/syslinux/modules/bios/libutil.c32
+0
-12
share/bootloaders/syslinux/live.cfg.in less more
0 label live-@FLAVOUR@
1 menu label ^Live (@FLAVOUR@)
2 menu default
3 linux @LINUX@
4 initrd @INITRD@
5 append @APPEND_LIVE@
6
7 label live-@FLAVOUR@-failsafe
8 menu label ^Live (@FLAVOUR@ failsafe)
9 linux @LINUX@
10 initrd @INITRD@
11 append @APPEND_LIVE_FAILSAFE@
+0
-17
share/bootloaders/syslinux/menu.cfg less more
0 menu hshift 0
1 menu width 82
2
3 menu title Boot menu
4 include stdmenu.cfg
5 include live.cfg
6 include install.cfg
7 menu begin advanced
8 menu title ^Advanced options
9 include stdmenu.cfg
10 label mainmenu
11 menu label ^Back..
12 menu exit
13 include advanced.cfg
14 menu end
15
16 menu clear
+0
-388
share/bootloaders/syslinux/splash.svg less more
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!-- Created with Inkscape (http://www.inkscape.org/) -->
2
3 <svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:xlink="http://www.w3.org/1999/xlink"
10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12 width="640"
13 height="480"
14 id="svg3320"
15 version="1.1"
16 inkscape:version="0.48.3.1 r9886"
17 sodipodi:docname="splash.svg.in">
18 <defs
19 id="defs3322">
20 <radialGradient
21 gradientUnits="userSpaceOnUse"
22 gradientTransform="matrix(1.402663,0,0,1.115648,-6.237984,0.0533075)"
23 r="18.370251"
24 fy="10.943316"
25 fx="15.491823"
26 cy="10.943316"
27 cx="15.491823"
28 id="radialGradient2813"
29 xlink:href="#linearGradient2807"
30 inkscape:collect="always" />
31 <radialGradient
32 r="35.934704"
33 fy="424.15677"
34 fx="131.23691"
35 cy="424.15677"
36 cx="131.23691"
37 gradientTransform="matrix(0.101953,-0.04272301,0.09621296,0.229599,-48.67227,-64.24148)"
38 gradientUnits="userSpaceOnUse"
39 id="radialGradient2798"
40 xlink:href="#linearGradient8543"
41 inkscape:collect="always" />
42 <radialGradient
43 gradientUnits="userSpaceOnUse"
44 gradientTransform="matrix(1,0,0,0.415385,0,26.70146)"
45 r="30.365856"
46 fy="45.673546"
47 fx="29.898689"
48 cy="45.673546"
49 cx="29.898689"
50 id="radialGradient18290"
51 xlink:href="#linearGradient18284"
52 inkscape:collect="always" />
53 <radialGradient
54 gradientUnits="userSpaceOnUse"
55 gradientTransform="matrix(0.105628,-0.04514018,0.06692574,0.156607,-46.01605,-24.35485)"
56 r="103.26014"
57 fy="409.83737"
58 fx="340.35886"
59 cy="409.83737"
60 cx="340.35886"
61 id="radialGradient13895"
62 xlink:href="#linearGradient8543"
63 inkscape:collect="always" />
64 <radialGradient
65 gradientUnits="userSpaceOnUse"
66 gradientTransform="matrix(0.08174351,0.01024998,-0.04335971,0.345793,6.123413,-84.50421)"
67 r="38.451698"
68 fy="270.67969"
69 fx="424.99243"
70 cy="270.67969"
71 cx="424.99243"
72 id="radialGradient11208"
73 xlink:href="#linearGradient11202"
74 inkscape:collect="always" />
75 <radialGradient
76 gradientUnits="userSpaceOnUse"
77 gradientTransform="matrix(0.272962,-0.071724,0.05616202,0.213737,-78.54657,-24.30491)"
78 r="48.782982"
79 fy="243.06874"
80 fx="293.81989"
81 cy="243.06874"
82 cx="293.81989"
83 id="radialGradient10317"
84 xlink:href="#linearGradient8543"
85 inkscape:collect="always" />
86 <radialGradient
87 gradientUnits="userSpaceOnUse"
88 gradientTransform="matrix(0.224796,0.01017229,-0.00975947,0.215674,-73.87964,-54.89804)"
89 r="40.975471"
90 fy="286.46918"
91 fx="500.97794"
92 cy="286.46918"
93 cx="500.97794"
94 id="radialGradient9434"
95 xlink:href="#linearGradient8543"
96 inkscape:collect="always" />
97 <radialGradient
98 gradientUnits="userSpaceOnUse"
99 gradientTransform="matrix(0.163532,-0.01065754,0.01078108,0.165425,-46.18187,-65.65506)"
100 r="235.88632"
101 fy="685.99139"
102 fx="420.87839"
103 cy="685.99139"
104 cx="420.87839"
105 id="radialGradient8549"
106 xlink:href="#linearGradient8543"
107 inkscape:collect="always" />
108 <radialGradient
109 r="297.21338"
110 fy="-72.420044"
111 fx="336.73767"
112 cy="-72.420044"
113 cx="336.73767"
114 gradientTransform="matrix(0.136507,0,-4.484926e-5,0.07137743,-23.39816,12.31028)"
115 gradientUnits="userSpaceOnUse"
116 id="radialGradient7666"
117 xlink:href="#linearGradient5012"
118 inkscape:collect="always" />
119 <linearGradient
120 id="linearGradient5012">
121 <stop
122 id="stop5014"
123 offset="0"
124 style="stop-color:#fdf188;stop-opacity:1;" />
125 <stop
126 id="stop5016"
127 offset="1"
128 style="stop-color:#d3bc00;stop-opacity:1;" />
129 </linearGradient>
130 <linearGradient
131 id="linearGradient8543">
132 <stop
133 id="stop8545"
134 offset="0"
135 style="stop-color:#fffef5;stop-opacity:0.94117647;" />
136 <stop
137 id="stop8547"
138 offset="1"
139 style="stop-color:#fce94f;stop-opacity:0;" />
140 </linearGradient>
141 <linearGradient
142 id="linearGradient11202">
143 <stop
144 id="stop11204"
145 offset="0"
146 style="stop-color:#c4a000;stop-opacity:1;" />
147 <stop
148 id="stop11206"
149 offset="1"
150 style="stop-color:#c4a000;stop-opacity:0;" />
151 </linearGradient>
152 <linearGradient
153 id="linearGradient18284">
154 <stop
155 id="stop18286"
156 offset="0"
157 style="stop-color:#000000;stop-opacity:1;" />
158 <stop
159 style="stop-color:#000000;stop-opacity:1;"
160 offset="0.5"
161 id="stop20913" />
162 <stop
163 style="stop-color:#000000;stop-opacity:0;"
164 offset="1"
165 id="stop19165" />
166 </linearGradient>
167 <linearGradient
168 id="linearGradient2807"
169 inkscape:collect="always">
170 <stop
171 id="stop2809"
172 offset="0"
173 style="stop-color:#ffffff;stop-opacity:1;" />
174 <stop
175 id="stop2811"
176 offset="1"
177 style="stop-color:#ffffff;stop-opacity:0;" />
178 </linearGradient>
179 <inkscape:perspective
180 id="perspective47"
181 inkscape:persp3d-origin="24 : 16 : 1"
182 inkscape:vp_z="48 : 24 : 1"
183 inkscape:vp_y="0 : 1000 : 0"
184 inkscape:vp_x="0 : 24 : 1"
185 sodipodi:type="inkscape:persp3d" />
186 </defs>
187 <sodipodi:namedview
188 id="base"
189 pagecolor="#ffffff"
190 bordercolor="#666666"
191 borderopacity="1.0"
192 inkscape:pageopacity="0.0"
193 inkscape:pageshadow="2"
194 inkscape:zoom="0.775"
195 inkscape:cx="574.36733"
196 inkscape:cy="250.84337"
197 inkscape:document-units="px"
198 inkscape:current-layer="layer1"
199 showgrid="false"
200 inkscape:window-width="1016"
201 inkscape:window-height="570"
202 inkscape:window-x="0"
203 inkscape:window-y="1"
204 inkscape:window-maximized="0" />
205 <metadata
206 id="metadata3325">
207 <rdf:RDF>
208 <cc:Work
209 rdf:about="">
210 <dc:format>image/svg+xml</dc:format>
211 <dc:type
212 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
213 <dc:title></dc:title>
214 </cc:Work>
215 </rdf:RDF>
216 </metadata>
217 <g
218 inkscape:label="Layer 1"
219 inkscape:groupmode="layer"
220 id="layer1"
221 transform="translate(0,-572.3622)">
222 <rect
223 style="fill:#000000;fill-opacity:1;stroke:none"
224 id="rect3328"
225 width="640"
226 height="480"
227 x="0"
228 y="572.36218" />
229 <text
230 transform="scale(1.0000015,0.99999849)"
231 sodipodi:linespacing="100%"
232 id="text3002"
233 y="619.20685"
234 x="190.68135"
235 style="font-size:35.65467453px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans Bold"
236 xml:space="preserve"><tspan
237 y="619.20685"
238 x="190.68135"
239 sodipodi:role="line"
240 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
241 id="tspan3045">@PROJECT@ @VERSION@ (@DISTRIBUTION@)</tspan><tspan
242 y="639.20679"
243 x="190.68135"
244 sodipodi:role="line"
245 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
246 id="tspan3041">@ARCHITECTURE@</tspan><tspan
247 y="659.20679"
248 x="190.68135"
249 sodipodi:role="line"
250 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
251 id="tspan3037" /><tspan
252 y="679.20679"
253 x="190.68135"
254 sodipodi:role="line"
255 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
256 id="tspan3039">Build: @YEAR@-@MONTH@-@DAY@ @HOUR@:@MINUTE@:@SECOND@</tspan><tspan
257 y="699.20673"
258 x="190.68135"
259 sodipodi:role="line"
260 style="font-size:19.99996948px;font-style:normal;font-weight:bold;-inkscape-font-specification:DejaVu Sans Bold"
261 id="tspan3098" /><tspan
262 y="719.20667"
263 x="190.68135"
264 sodipodi:role="line"
265 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
266 id="tspan3102">linux: @LINUX_VERSIONS@</tspan><tspan
267 y="739.20667"
268 x="190.68135"
269 sodipodi:role="line"
270 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
271 id="tspan3076">live-build: @LIVE_BUILD_VERSION@</tspan><tspan
272 y="759.20667"
273 x="190.68135"
274 sodipodi:role="line"
275 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
276 id="tspan3068">live-boot: @LIVE_BOOT_VERSION@</tspan><tspan
277 y="779.2066"
278 x="190.68135"
279 sodipodi:role="line"
280 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
281 id="tspan3070">live-config: @LIVE_CONFIG_VERSION@</tspan><tspan
282 y="799.20654"
283 x="190.68135"
284 sodipodi:role="line"
285 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
286 id="tspan3012">live-tools: @LIVE_TOOLS_VERSION@</tspan><tspan
287 y="819.20654"
288 x="190.68135"
289 sodipodi:role="line"
290 style="font-size:19.99996948px;font-style:normal;font-weight:normal;-inkscape-font-specification:DejaVu Sans"
291 id="tspan3066" /></text>
292 <text
293 xml:space="preserve"
294 style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
295 x="200"
296 y="336.7742"
297 id="text3114"
298 sodipodi:linespacing="125%"
299 transform="translate(0,572.3622)"><tspan
300 sodipodi:role="line"
301 id="tspan3116" /></text>
302 <g
303 id="layer1-9"
304 inkscape:label="Layer 1"
305 transform="matrix(2.8369273,0,0,2.8369235,27.782921,602.43406)">
306 <path
307 transform="matrix(0.742527,0,-0.05812964,1.428611,4.500517,-36.68345)"
308 d="m 60.264545,45.673546 c 0,6.966249 -13.595256,12.613509 -30.365856,12.613509 -16.770599,0 -30.3658559,-5.64726 -30.3658559,-12.613509 0,-6.966249 13.5952569,-12.613509 30.3658559,-12.613509 16.7706,0 30.365856,5.64726 30.365856,12.613509 z"
309 sodipodi:ry="12.613509"
310 sodipodi:rx="30.365856"
311 sodipodi:cy="45.673546"
312 sodipodi:cx="29.898689"
313 id="path17409"
314 style="fill:url(#radialGradient18290);fill-opacity:1;stroke:none"
315 sodipodi:type="arc" />
316 <path
317 sodipodi:nodetypes="cccscsssscsccsc"
318 id="path3120"
319 d="M 23.152758,1.1801876 C 20.380218,1.2190783 17.86582,1.8908769 15.634281,3.0196314 14.541531,5.1714614 10.9437,7.7293655 9.4689484,8.0015561 6.5691703,11.460832 4.6887193,15.805035 3.9754523,19.98162 c -4.375e-4,0.0026 4.366e-4,0.0052 0,0.0077 -1.1863594,1.549717 -1.6900108,3.396594 -1.3773472,5.53256 1.1211744,7.659314 3.2821678,14.888292 8.1850959,16.556275 7.154429,2.433946 21.871769,1.785847 25.129507,0.458258 7.13903,-2.909286 7.771453,-9.285098 8.891432,-16.780256 0.305554,-2.044832 -0.144835,-3.841202 -1.230601,-5.372942 -0.009,-0.0556 -0.01849,-0.111474 -0.02832,-0.167342 C 42.763966,15.777007 40.697859,11.326849 37.602582,7.8466935 35.508773,7.62926 31.462964,4.270333 30.483158,2.6229925 28.330506,1.7020155 25.961342,1.1801876 23.407632,1.1801876 c -0.08532,0 -0.170037,-0.00119 -0.254874,0 z"
320 style="fill:url(#radialGradient7666);fill-opacity:1;stroke:#c4a000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
321 inkscape:connector-curvature="0" />
322 <path
323 sodipodi:nodetypes="ccscc"
324 id="path7668"
325 d="M 43.629688,22.792984 C 39.033494,39.233217 10.438199,40.802737 3.7832765,23.04227 3.7410682,39.366403 10.103414,44.083889 28.189955,43.247454 c 3.061977,-0.140689 10.00982,0.04287 14.614484,-9.136776 2.238365,-11.5104 0.825249,-11.317694 0.825249,-11.317694 z"
326 style="opacity:0.66666667;fill:url(#radialGradient8549);fill-opacity:1;fill-rule:evenodd;stroke:none"
327 inkscape:connector-curvature="0" />
328 <path
329 sodipodi:nodetypes="cccc"
330 id="path8553"
331 d="m 34.691565,7.6783057 2.500881,1.1253976 c 0,0 -1.310404,10.1226397 -6.669016,16.4849717 1.771665,-6.455834 4.188975,-17.6103693 4.168135,-17.6103693 z"
332 style="fill:url(#radialGradient9434);fill-opacity:1;fill-rule:evenodd;stroke:none"
333 inkscape:connector-curvature="0" />
334 <path
335 sodipodi:nodetypes="cccc"
336 id="path9436"
337 d="m 15.872437,4.1562328 c 1.50053,9.0656942 6.50229,19.4860282 6.002115,20.0070452 -4.584948,-6.981624 -6.502291,-12.921217 -8.00282,-17.9229779 0,-0.083363 2.000705,-2.0632267 2.000705,-2.0840673 z"
338 style="fill:url(#radialGradient10317);fill-opacity:1;fill-rule:evenodd;stroke:none"
339 inkscape:connector-curvature="0" />
340 <path
341 sodipodi:nodetypes="ccsc"
342 id="path10319"
343 d="M 30.21082,3.8227818 C 26.126047,20.328594 25.959322,23.079563 25.959322,23.079563 c 0,0 6.335566,-16.7559003 6.335566,-17.1727135 0,-8e-7 -1.583891,-1.5005286 -2.084068,-2.0840677 z"
344 style="fill:url(#radialGradient11208);fill-opacity:1;fill-rule:evenodd;stroke:none"
345 inkscape:connector-curvature="0" />
346 <flowRoot
347 id="flowRoot12974"
348 xml:space="preserve"><flowRegion
349 id="flowRegion12976"><rect
350 y="412.80496"
351 x="86.787514"
352 height="16.02231"
353 width="40.055775"
354 id="rect12978" /></flowRegion><flowPara
355 id="flowPara12980" /></flowRoot> <path
356 sodipodi:nodetypes="ccccccc"
357 id="path13014"
358 d="m 16.18209,34.476182 -0.04467,-9.569745 14.493727,0 1.642604,-1.263542 -16.931465,0 0.04467,10.640581 0.795134,0.192706 z"
359 style="fill:url(#radialGradient13895);fill-opacity:1;fill-rule:evenodd;stroke:none"
360 inkscape:connector-curvature="0" />
361 <path
362 sodipodi:nodetypes="ccccc"
363 id="path13897"
364 d="m 31.043495,24.81709 0.08168,9.804611 0.686144,-0.214742 0.01198,-10.85341 -0.779803,1.263541 z"
365 style="fill:#958401;fill-opacity:1;fill-rule:evenodd;stroke:none"
366 inkscape:connector-curvature="0" />
367 <path
368 sodipodi:nodetypes="ccccscc"
369 id="path16526"
370 d="m 4.2551267,24.106065 c 0,0 2.3166503,8.115689 10.2209413,8.766037 1.105608,2.490418 -1.13497,4.124601 -1.13497,4.124601 L 9.7315781,36.745641 c 0,0 -6.2387745,-7.992942 -6.4882087,-9.900882 -0.2494325,-1.907937 0.1632835,-3.407793 0.1632835,-3.407793 l 0.8484738,0.669099 z"
371 style="fill:url(#radialGradient2798);fill-opacity:1;fill-rule:evenodd;stroke:none"
372 inkscape:connector-curvature="0" />
373 <path
374 style="opacity:0.74444442;fill:none;stroke:#ffffff;stroke-width:0.99999976;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
375 d="M 23.184204,2.3889904 C 20.570275,2.4256563 18.199721,3.0590226 16.095844,4.1232033 15.065608,6.1519314 11.673602,8.563503 10.283218,8.8201221 7.5493302,12.0815 5.776456,16.17718 5.1039936,20.11483 c -4.124e-4,0.0024 4.116e-4,0.0049 0,0.0073 -1.1184901,1.46106 -1.8584936,3.246475 -1.5637169,5.260247 1.0570343,7.22114 2.9276025,13.709677 7.3279793,15.639454 5.923141,2.597582 21.539722,1.785935 24.611092,0.534295 6.73062,-2.742852 7.061699,-8.930694 8.117606,-15.997069 0.288074,-1.927851 -0.13655,-3.621454 -1.160201,-5.065566 -0.0084,-0.05242 -0.01743,-0.105097 -0.0267,-0.157769 C 41.673494,16.150755 39.725585,11.955182 36.807382,8.6741189 34.833356,8.4691243 31.019,5.3023548 30.095246,3.7492553 28.065743,2.8809656 25.832115,2.3889904 23.424497,2.3889904 c -0.08044,0 -0.160309,-0.00112 -0.240293,0 z"
376 id="path2703"
377 sodipodi:nodetypes="cccscsssscsccsc"
378 inkscape:connector-curvature="0" />
379 <path
380 sodipodi:nodetypes="cccssccscccssc"
381 id="path2800"
382 d="m 22.59375,2.78125 c -2.329557,0.1165682 -4.440971,0.7250384 -6.34375,1.6875 -1.010725,1.9903059 -4.354698,4.373241 -5.71875,4.625 -2.6821095,3.199611 -4.4027734,7.199424 -5.0625,11.0625 -4.046e-4,0.0024 4.038e-4,0.02888 0,0.03125 -1.0973069,1.43339 -1.4580267,3.591148 -1.4580267,3.591148 4.685267,3.605062 7.6416117,0.213892 14.3188727,-2.01722 12.59928,1.923141 18.748338,-0.995945 22.514154,-5.667678 0.0069,-0.0085 -0.0035,-0.02088 0,-0.03125 C 39.852567,13.479666 38.411479,11.016387 36.5625,8.9375 34.62586,8.7363873 30.875008,5.6486852 29.96875,4.125 27.977684,3.2731547 25.79952,2.78125 23.4375,2.78125 c -0.07892,10e-8 -0.171531,-0.0011 -0.25,0 -0.200346,0.00281 -0.39633,-0.00988 -0.59375,0 z"
383 style="opacity:0.59444424;fill:url(#radialGradient2813);fill-opacity:1;stroke:none"
384 inkscape:connector-curvature="0" />
385 </g>
386 </g>
387 </svg>
+0
-15
share/bootloaders/syslinux/stdmenu.cfg less more
0 menu background splash.png
1 menu color title * #FFFFFFFF *
2 menu color border * #00000000 #00000000 none
3 menu color sel * #ffffffff #76a1d0ff *
4 menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *
5 menu color tabmsg * #ffffffff #00000000 *
6 menu color help 37;40 #ffdddd00 #00000000 none
7 menu vshift 12
8 menu rows 10
9 menu helpmsgrow 15
10 # The command line must be at least one line from the bottom.
11 menu cmdlinerow 16
12 menu timeoutrow 16
13 menu tabmsgrow 18
14 menu tabmsg Press ENTER to boot or TAB to edit a menu entry
+0
-1
share/bootloaders/syslinux/vesamenu.c32 less more
0 /usr/lib/syslinux/modules/bios/vesamenu.c32
0 /usr/lib/syslinux/modules/bios/hdt.c32
0 label installstart
1 menu label Start ^installer
2 linux @KERNEL_GI@
3 initrd @INITRD_GI@
4 append vga=788 @APPEND_INSTALL@ --- quiet
5
6 label installstartspeech
7 menu label Start installer with ^speech synthesis
8 linux @KERNEL_GI@
9 initrd @INITRD_GI@
10 append speakup.synth=soft vga=788 @APPEND_INSTALL@ --- quiet
11
12 menu begin install
13 menu label ^Advanced install options
14 menu title Advanced install options
15 include stdmenu.cfg
16 label mainmenu
17 menu label ^Back..
18 menu exit
19
20 menu begin graphicalinstall
21 menu label ^Graphical installer
22 menu title Graphical installer
23 include stdmenu.cfg
24 label mainmenu
25 menu label ^Back..
26 menu exit
27
28 label installgui
29 menu label ^Install
30 linux @KERNEL_GI@
31 initrd @INITRD_GI@
32 append vga=788 @APPEND_INSTALL@ --- quiet
33
34 label expertgui
35 menu label E^xpert install
36 linux @KERNEL_GI@
37 initrd @INITRD_GI@
38 append priority=low vga=788 @APPEND_INSTALL@
39
40 label autogui
41 menu label ^Automated install
42 linux @KERNEL_GI@
43 initrd @INITRD_GI@
44 append auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
45
46 label rescuegui
47 menu label ^Rescue mode
48 linux @KERNEL_GI@
49 initrd @INITRD_GI@
50 append rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
51 menu end
52
53 menu begin textinstall
54 menu label ^Text installer
55 menu title Text installer
56 include stdmenu.cfg
57 label mainmenu
58 menu label ^Back..
59 menu exit
60
61 label install
62 menu label ^Install
63 linux @KERNEL_DI@
64 initrd @INITRD_DI@
65 append vga=788 @APPEND_INSTALL@ --- quiet
66
67 label expert
68 menu label E^xpert install
69 linux @KERNEL_DI@
70 initrd @INITRD_DI@
71 append priority=low vga=788 @APPEND_INSTALL@
72
73 label auto
74 menu label ^Automated install
75 linux @KERNEL_DI@
76 initrd @INITRD_DI@
77 append auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
78
79 label rescue
80 menu label ^Rescue mode
81 linux @KERNEL_DI@
82 initrd @INITRD_DI@
83 append rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
84 menu end
85
86 menu begin graphicalinstalldark
87 menu label Graphical installer with ^dark theme
88 menu title Graphical installer with dark theme
89 include stdmenu.cfg
90 label mainmenu
91 menu label ^Back..
92 menu exit
93
94 label darkinstallgui
95 menu label ^Install
96 linux @KERNEL_GI@
97 initrd @INITRD_GI@
98 append vga=788 theme=dark @APPEND_INSTALL@ --- quiet
99
100 label darkexpertgui
101 menu label E^xpert install
102 linux @KERNEL_GI@
103 initrd @INITRD_GI@
104 append priority=low vga=788 theme=dark @APPEND_INSTALL@
105
106 label darkautogui
107 menu label ^Automated install
108 linux @KERNEL_GI@
109 initrd @INITRD_GI@
110 append auto=true priority=critical vga=788 theme=dark @APPEND_INSTALL@ --- quiet
111
112 label darkrescuegui
113 menu label ^Rescue mode
114 linux @KERNEL_GI@
115 initrd @INITRD_GI@
116 append rescue/enable=true vga=788 theme=dark @APPEND_INSTALL@ --- quiet
117 menu end
118
119 menu begin textinstalldark
120 menu label Text installer with dar^k theme
121 menu title Text installer with dark theme
122 include stdmenu.cfg
123 label mainmenu
124 menu label ^Back..
125 menu exit
126
127 label darkinstall
128 menu label ^Install
129 linux @KERNEL_DI@
130 initrd @INITRD_DI@
131 append vga=788 theme=dark @APPEND_INSTALL@ --- quiet
132
133 label darkexpert
134 menu label E^xpert install
135 linux @KERNEL_DI@
136 initrd @INITRD_DI@
137 append priority=low vga=788 theme=dark @APPEND_INSTALL@
138
139 label darkauto
140 menu label ^Automated install
141 linux @KERNEL_DI@
142 initrd @INITRD_DI@
143 append auto=true priority=critical vga=788 theme=dark @APPEND_INSTALL@ --- quiet
144
145 label darkrescue
146 menu label ^Rescue mode
147 linux @KERNEL_DI@
148 initrd @INITRD_DI@
149 append rescue/enable=true vga=788 theme=dark @APPEND_INSTALL@ --- quiet
150 menu end
151
152 menu begin speechinstall
153 menu label Installer with ^speech synthesis
154 menu title Installer with speech synthesis
155 include stdmenu.cfg
156 label mainmenu
157 menu label ^Back..
158 menu exit
159
160 label installspeechsynth
161 menu label ^Install
162 linux @KERNEL_GI@
163 initrd @INITRD_GI@
164 append speakup.synth=soft vga=788 @APPEND_INSTALL@ --- quiet
165
166 label expertguispeech
167 menu label E^xpert install
168 linux @KERNEL_GI@
169 initrd @INITRD_GI@
170 append speakup.synth=soft priority=low vga=788 @APPEND_INSTALL@
171
172 label autoguispeech
173 menu label ^Automated install
174 linux @KERNEL_GI@
175 initrd @INITRD_GI@
176 append speakup.synth=soft auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
177
178 label rescueguispeech
179 menu label ^Rescue mode
180 linux @KERNEL_GI@
181 initrd @INITRD_GI@
182 append speakup.synth=soft rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
183 menu end
184 menu end
0 label installstart
1 menu label Start ^installer
2 linux @KERNEL_DI@
3 initrd @INITRD_DI@
4 append vga=788 @APPEND_INSTALL@ --- quiet
5
6 menu begin install
7 menu label ^Advanced install options
8 menu title Advanced install options
9 include stdmenu.cfg
10 label mainmenu
11 menu label ^Back..
12 menu exit
13
14 menu begin textinstall
15 menu label ^Text installer
16 menu title Text installer
17 include stdmenu.cfg
18 label mainmenu
19 menu label ^Back..
20 menu exit
21
22 label install
23 menu label ^Install
24 linux @KERNEL_DI@
25 initrd @INITRD_DI@
26 append vga=788 @APPEND_INSTALL@ --- quiet
27
28 label expert
29 menu label E^xpert install
30 linux @KERNEL_DI@
31 initrd @INITRD_DI@
32 append priority=low vga=788 @APPEND_INSTALL@
33
34 label auto
35 menu label ^Automated install
36 linux @KERNEL_DI@
37 initrd @INITRD_DI@
38 append auto=true priority=critical vga=788 @APPEND_INSTALL@ --- quiet
39
40 label rescue
41 menu label ^Rescue mode
42 linux @KERNEL_DI@
43 initrd @INITRD_DI@
44 append rescue/enable=true vga=788 @APPEND_INSTALL@ --- quiet
45 menu end
46
47 menu begin textinstalldark
48 menu label Text installer with dar^k theme
49 menu title Text installer with dark theme
50 include stdmenu.cfg
51 label mainmenu
52 menu label ^Back..
53 menu exit
54
55 label darkinstall
56 menu label ^Install
57 linux @KERNEL_DI@
58 initrd @INITRD_DI@
59 append vga=788 theme=dark @APPEND_INSTALL@ --- quiet
60
61 label darkexpert
62 menu label E^xpert install
63 linux @KERNEL_DI@
64 initrd @INITRD_DI@
65 append priority=low vga=788 theme=dark @APPEND_INSTALL@
66
67 label darkauto
68 menu label ^Automated install
69 linux @KERNEL_DI@
70 initrd @INITRD_DI@
71 append auto=true priority=critical vga=788 theme=dark @APPEND_INSTALL@ --- quiet
72
73 label darkrescue
74 menu label ^Rescue mode
75 linux @KERNEL_DI@
76 initrd @INITRD_DI@
77 append rescue/enable=true vga=788 theme=dark @APPEND_INSTALL@ --- quiet
78 menu end
79 menu end
0 /usr/lib/syslinux/modules/bios/libcom32.c32
0 /usr/lib/syslinux/modules/bios/libgpl.c32
0 /usr/lib/syslinux/modules/bios/libmenu.c32
0 /usr/lib/syslinux/modules/bios/libutil.c32
0 label live-@FLAVOUR@
1 menu label ^Live (@FLAVOUR@)
2 menu default
3 linux @LINUX@
4 initrd @INITRD@
5 append @APPEND_LIVE@
6
7 label live-@FLAVOUR@-failsafe
8 menu label Live (@FLAVOUR@ failsafe)
9 linux @LINUX@
10 initrd @INITRD@
11 append @APPEND_LIVE_FAILSAFE@
0 label memtest
1 menu label ^Memory Diagnostic Tool (@MEMTEST_VERSION@)
2 linux @MEMTEST@
0 menu hshift 0
1 menu width 82
2
3 menu title Boot menu
4 include stdmenu.cfg
5 include live.cfg
6 @OPTIONAL_INSTALLER_INCLUDE@
7 menu begin utilities
8 menu label ^Utilities
9 menu title Utilities
10 include stdmenu.cfg
11 label mainmenu
12 menu label ^Back..
13 menu exit
14 include utilities.cfg
15 menu end
16
17 menu clear
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <svg
2 xmlns:dc="http://purl.org/dc/elements/1.1/"
3 xmlns:cc="http://creativecommons.org/ns#"
4 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
5 xmlns:svg="http://www.w3.org/2000/svg"
6 xmlns="http://www.w3.org/2000/svg"
7 xmlns:xlink="http://www.w3.org/1999/xlink"
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10 sodipodi:docname="splash.svg"
11 inkscape:version="1.0rc1 (09960d6f05, 2020-04-09)"
12 version="1.1"
13 id="svg3320"
14 height="480"
15 width="640">
16 <defs
17 id="defs3322">
18 <radialGradient
19 inkscape:collect="always"
20 xlink:href="#linearGradient2807"
21 id="radialGradient2813"
22 cx="15.491823"
23 cy="10.943316"
24 fx="15.491823"
25 fy="10.943316"
26 r="18.370251"
27 gradientTransform="matrix(1.402663,0,0,1.115648,-6.237984,0.0533075)"
28 gradientUnits="userSpaceOnUse" />
29 <radialGradient
30 inkscape:collect="always"
31 xlink:href="#linearGradient8543"
32 id="radialGradient2798"
33 gradientUnits="userSpaceOnUse"
34 gradientTransform="matrix(0.101953,-0.04272301,0.09621296,0.229599,-48.67227,-64.24148)"
35 cx="131.23691"
36 cy="424.15677"
37 fx="131.23691"
38 fy="424.15677"
39 r="35.934704" />
40 <radialGradient
41 inkscape:collect="always"
42 xlink:href="#linearGradient18284"
43 id="radialGradient18290"
44 cx="29.898689"
45 cy="45.673546"
46 fx="29.898689"
47 fy="45.673546"
48 r="30.365856"
49 gradientTransform="matrix(1,0,0,0.415385,0,26.70146)"
50 gradientUnits="userSpaceOnUse" />
51 <radialGradient
52 inkscape:collect="always"
53 xlink:href="#linearGradient8543"
54 id="radialGradient13895"
55 cx="340.35886"
56 cy="409.83737"
57 fx="340.35886"
58 fy="409.83737"
59 r="103.26014"
60 gradientTransform="matrix(0.105628,-0.04514018,0.06692574,0.156607,-46.01605,-24.35485)"
61 gradientUnits="userSpaceOnUse" />
62 <radialGradient
63 inkscape:collect="always"
64 xlink:href="#linearGradient11202"
65 id="radialGradient11208"
66 cx="424.99243"
67 cy="270.67969"
68 fx="424.99243"
69 fy="270.67969"
70 r="38.451698"
71 gradientTransform="matrix(0.08174351,0.01024998,-0.04335971,0.345793,6.123413,-84.50421)"
72 gradientUnits="userSpaceOnUse" />
73 <radialGradient
74 inkscape:collect="always"
75 xlink:href="#linearGradient8543"
76 id="radialGradient10317"
77 cx="293.81989"
78 cy="243.06874"
79 fx="293.81989"
80 fy="243.06874"
81 r="48.782982"
82 gradientTransform="matrix(0.272962,-0.071724,0.05616202,0.213737,-78.54657,-24.30491)"
83 gradientUnits="userSpaceOnUse" />
84 <radialGradient
85 inkscape:collect="always"
86 xlink:href="#linearGradient8543"
87 id="radialGradient9434"
88 cx="500.97794"
89 cy="286.46918"
90 fx="500.97794"
91 fy="286.46918"
92 r="40.975471"
93 gradientTransform="matrix(0.224796,0.01017229,-0.00975947,0.215674,-73.87964,-54.89804)"
94 gradientUnits="userSpaceOnUse" />
95 <radialGradient
96 inkscape:collect="always"
97 xlink:href="#linearGradient8543"
98 id="radialGradient8549"
99 cx="420.87839"
100 cy="685.99139"
101 fx="420.87839"
102 fy="685.99139"
103 r="235.88632"
104 gradientTransform="matrix(0.163532,-0.01065754,0.01078108,0.165425,-46.18187,-65.65506)"
105 gradientUnits="userSpaceOnUse" />
106 <radialGradient
107 inkscape:collect="always"
108 xlink:href="#linearGradient5012"
109 id="radialGradient7666"
110 gradientUnits="userSpaceOnUse"
111 gradientTransform="matrix(0.136507,0,-4.484926e-5,0.07137743,-23.39816,12.31028)"
112 cx="336.73767"
113 cy="-72.420044"
114 fx="336.73767"
115 fy="-72.420044"
116 r="297.21338" />
117 <linearGradient
118 id="linearGradient5012">
119 <stop
120 style="stop-color:#fdf188;stop-opacity:1;"
121 offset="0"
122 id="stop5014" />
123 <stop
124 style="stop-color:#d3bc00;stop-opacity:1;"
125 offset="1"
126 id="stop5016" />
127 </linearGradient>
128 <linearGradient
129 id="linearGradient8543">
130 <stop
131 style="stop-color:#fffef5;stop-opacity:0.94117647;"
132 offset="0"
133 id="stop8545" />
134 <stop
135 style="stop-color:#fce94f;stop-opacity:0;"
136 offset="1"
137 id="stop8547" />
138 </linearGradient>
139 <linearGradient
140 id="linearGradient11202">
141 <stop
142 style="stop-color:#c4a000;stop-opacity:1;"
143 offset="0"
144 id="stop11204" />
145 <stop
146 style="stop-color:#c4a000;stop-opacity:0;"
147 offset="1"
148 id="stop11206" />
149 </linearGradient>
150 <linearGradient
151 id="linearGradient18284">
152 <stop
153 style="stop-color:#000000;stop-opacity:1;"
154 offset="0"
155 id="stop18286" />
156 <stop
157 id="stop20913"
158 offset="0.5"
159 style="stop-color:#000000;stop-opacity:1;" />
160 <stop
161 id="stop19165"
162 offset="1"
163 style="stop-color:#000000;stop-opacity:0;" />
164 </linearGradient>
165 <linearGradient
166 inkscape:collect="always"
167 id="linearGradient2807">
168 <stop
169 style="stop-color:#ffffff;stop-opacity:1;"
170 offset="0"
171 id="stop2809" />
172 <stop
173 style="stop-color:#ffffff;stop-opacity:0;"
174 offset="1"
175 id="stop2811" />
176 </linearGradient>
177 <inkscape:perspective
178 sodipodi:type="inkscape:persp3d"
179 inkscape:vp_x="0 : 24 : 1"
180 inkscape:vp_y="0 : 1000 : 0"
181 inkscape:vp_z="48 : 24 : 1"
182 inkscape:persp3d-origin="24 : 16 : 1"
183 id="perspective47" />
184 </defs>
185 <sodipodi:namedview
186 inkscape:document-rotation="0"
187 inkscape:window-maximized="1"
188 inkscape:window-y="0"
189 inkscape:window-x="0"
190 inkscape:window-height="845"
191 inkscape:window-width="1600"
192 showgrid="false"
193 inkscape:current-layer="layer1"
194 inkscape:document-units="px"
195 inkscape:cy="249.55305"
196 inkscape:cx="574.36733"
197 inkscape:zoom="0.775"
198 inkscape:pageshadow="2"
199 inkscape:pageopacity="0.0"
200 borderopacity="1.0"
201 bordercolor="#666666"
202 pagecolor="#ffffff"
203 id="base" />
204 <metadata
205 id="metadata3325">
206 <rdf:RDF>
207 <cc:Work
208 rdf:about="">
209 <dc:format>image/svg+xml</dc:format>
210 <dc:type
211 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
212 <dc:title />
213 </cc:Work>
214 </rdf:RDF>
215 </metadata>
216 <g
217 transform="translate(0,-572.3622)"
218 id="layer1"
219 inkscape:groupmode="layer"
220 inkscape:label="Layer 1">
221 <rect
222 y="572.36218"
223 x="0"
224 height="480"
225 width="640"
226 id="rect3328"
227 style="fill:#000000;fill-opacity:1;stroke:none" />
228 <text
229 xml:space="preserve"
230 style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:0;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
231 x="190.68135"
232 y="619.20685"
233 id="text3002"
234 transform="scale(1.0000015)"><tspan
235 id="tspan3045"
236 style="font-style:normal;font-weight:bold;font-size:20px;line-height:1;-inkscape-font-specification:'DejaVu Sans Bold'"
237 sodipodi:role="line"
238 x="190.68135"
239 y="619.20685">@PROJECT@ @VERSION@ (@DISTRIBUTION@)</tspan><tspan
240 id="tspan3041"
241 style="font-style:normal;font-weight:bold;font-size:20px;line-height:1;-inkscape-font-specification:'DejaVu Sans Bold'"
242 sodipodi:role="line"
243 x="190.68135"
244 y="639.20685">@ARCHITECTURE@</tspan><tspan
245 id="tspan3037"
246 style="font-style:normal;font-weight:bold;font-size:20px;line-height:1.2;-inkscape-font-specification:'DejaVu Sans Bold'"
247 sodipodi:role="line"
248 x="190.68135"
249 y="661.20685"> </tspan><tspan
250 id="tspan3039"
251 style="font-style:normal;font-weight:bold;font-size:13.3333px;line-height:1.2;-inkscape-font-specification:'DejaVu Sans Bold'"
252 sodipodi:role="line"
253 x="190.68135"
254 y="679.47504">Built: @YEAR@-@MONTH@-@DAY@ @HOUR@:@MINUTE@:@SECOND@ @TIMEZONE@</tspan><tspan
255 id="tspan3098"
256 style="font-style:normal;font-weight:bold;font-size:13.3333px;line-height:1.2;-inkscape-font-specification:'DejaVu Sans Bold'"
257 sodipodi:role="line"
258 x="190.68135"
259 y="695.47504"> </tspan><tspan
260 id="tspan3102"
261 style="font-style:normal;font-weight:normal;font-size:13.3333px;line-height:1.2;-inkscape-font-specification:'DejaVu Sans'"
262 sodipodi:role="line"
263 x="190.68135"
264 y="711.47498">linux: @LINUX_VERSIONS@</tspan><tspan
265 id="tspan3076"
266 style="font-style:normal;font-weight:normal;font-size:13.3333px;line-height:1.2;-inkscape-font-specification:'DejaVu Sans'"
267 sodipodi:role="line"
268 x="190.68135"
269 y="727.47491">live-build: @LIVE_BUILD_VERSION@</tspan><tspan
270 id="tspan3068"
271 style="font-style:normal;font-weight:normal;font-size:13.3333px;line-height:1.2;-inkscape-font-specification:'DejaVu Sans'"
272 sodipodi:role="line"
273 x="190.68135"
274 y="743.47491">live-boot: @LIVE_BOOT_VERSION@</tspan><tspan
275 id="tspan3070"
276 style="font-style:normal;font-weight:normal;font-size:13.3333px;line-height:1.2;-inkscape-font-specification:'DejaVu Sans'"
277 sodipodi:role="line"
278 x="190.68135"
279 y="759.47485">live-config: @LIVE_CONFIG_VERSION@</tspan><tspan
280 id="tspan3012"
281 style="font-style:normal;font-weight:normal;font-size:13.3333px;line-height:1.2;-inkscape-font-specification:'DejaVu Sans'"
282 sodipodi:role="line"
283 x="190.68135"
284 y="775.47479">live-tools: @LIVE_TOOLS_VERSION@</tspan><tspan
285 id="tspan3066"
286 style="font-style:normal;font-weight:normal;font-size:13.3333px;line-height:1.2;-inkscape-font-specification:'DejaVu Sans'"
287 sodipodi:role="line"
288 x="190.68135"
289 y="791.47479"> </tspan></text>
290 <text
291 transform="translate(0,572.3622)"
292 id="text3114"
293 y="336.7742"
294 x="200"
295 style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
296 xml:space="preserve"><tspan
297 style="font-size:40px;line-height:1.25;font-family:sans-serif"
298 y="336.7742"
299 x="200"
300 id="tspan3116"
301 sodipodi:role="line"> </tspan></text>
302 <g
303 transform="matrix(2.8369273,0,0,2.8369235,27.782921,602.43406)"
304 inkscape:label="Layer 1"
305 id="layer1-9">
306 <ellipse
307 ry="12.613509"
308 rx="30.365856"
309 cy="45.673546"
310 cx="29.898689"
311 style="fill:url(#radialGradient18290);fill-opacity:1;stroke:none"
312 id="path17409"
313 transform="matrix(0.742527,0,-0.05812964,1.428611,4.500517,-36.68345)" />
314 <path
315 inkscape:connector-curvature="0"
316 style="fill:url(#radialGradient7666);fill-opacity:1;stroke:#c4a000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
317 d="M 23.152758,1.1801876 C 20.380218,1.2190783 17.86582,1.8908769 15.634281,3.0196314 14.541531,5.1714614 10.9437,7.7293655 9.4689484,8.0015561 6.5691703,11.460832 4.6887193,15.805035 3.9754523,19.98162 c -4.375e-4,0.0026 4.366e-4,0.0052 0,0.0077 -1.1863594,1.549717 -1.6900108,3.396594 -1.3773472,5.53256 1.1211744,7.659314 3.2821678,14.888292 8.1850959,16.556275 7.154429,2.433946 21.871769,1.785847 25.129507,0.458258 7.13903,-2.909286 7.771453,-9.285098 8.891432,-16.780256 0.305554,-2.044832 -0.144835,-3.841202 -1.230601,-5.372942 -0.009,-0.0556 -0.01849,-0.111474 -0.02832,-0.167342 C 42.763966,15.777007 40.697859,11.326849 37.602582,7.8466935 35.508773,7.62926 31.462964,4.270333 30.483158,2.6229925 28.330506,1.7020155 25.961342,1.1801876 23.407632,1.1801876 c -0.08532,0 -0.170037,-0.00119 -0.254874,0 z"
318 id="path3120"
319 sodipodi:nodetypes="cccscsssscsccsc" />
320 <path
321 inkscape:connector-curvature="0"
322 style="opacity:0.666667;fill:url(#radialGradient8549);fill-opacity:1;fill-rule:evenodd;stroke:none"
323 d="M 43.629688,22.792984 C 39.033494,39.233217 10.438199,40.802737 3.7832765,23.04227 3.7410682,39.366403 10.103414,44.083889 28.189955,43.247454 c 3.061977,-0.140689 10.00982,0.04287 14.614484,-9.136776 2.238365,-11.5104 0.825249,-11.317694 0.825249,-11.317694 z"
324 id="path7668"
325 sodipodi:nodetypes="ccscc" />
326 <path
327 inkscape:connector-curvature="0"
328 style="fill:url(#radialGradient9434);fill-opacity:1;fill-rule:evenodd;stroke:none"
329 d="m 34.691565,7.6783057 2.500881,1.1253976 c 0,0 -1.310404,10.1226397 -6.669016,16.4849717 1.771665,-6.455834 4.188975,-17.6103693 4.168135,-17.6103693 z"
330 id="path8553"
331 sodipodi:nodetypes="cccc" />
332 <path
333 inkscape:connector-curvature="0"
334 style="fill:url(#radialGradient10317);fill-opacity:1;fill-rule:evenodd;stroke:none"
335 d="m 15.872437,4.1562328 c 1.50053,9.0656942 6.50229,19.4860282 6.002115,20.0070452 -4.584948,-6.981624 -6.502291,-12.921217 -8.00282,-17.9229779 0,-0.083363 2.000705,-2.0632267 2.000705,-2.0840673 z"
336 id="path9436"
337 sodipodi:nodetypes="cccc" />
338 <path
339 inkscape:connector-curvature="0"
340 style="fill:url(#radialGradient11208);fill-opacity:1;fill-rule:evenodd;stroke:none"
341 d="M 30.21082,3.8227818 C 26.126047,20.328594 25.959322,23.079563 25.959322,23.079563 c 0,0 6.335566,-16.7559003 6.335566,-17.1727135 0,-8e-7 -1.583891,-1.5005286 -2.084068,-2.0840677 z"
342 id="path10319"
343 sodipodi:nodetypes="ccsc" />
344 <flowRoot
345 style="line-height:0.01%"
346 xml:space="preserve"
347 id="flowRoot12974"><flowRegion
348 id="flowRegion12976"><rect
349 id="rect12978"
350 width="40.055775"
351 height="16.02231"
352 x="86.787514"
353 y="412.80496" /></flowRegion><flowPara
354 style="font-size:12px;line-height:1.25"
355 id="flowPara12980"> </flowPara></flowRoot>
356 <path
357 inkscape:connector-curvature="0"
358 style="fill:url(#radialGradient13895);fill-opacity:1;fill-rule:evenodd;stroke:none"
359 d="m 16.18209,34.476182 -0.04467,-9.569745 h 14.493727 l 1.642604,-1.263542 H 15.342286 l 0.04467,10.640581 z"
360 id="path13014"
361 sodipodi:nodetypes="ccccccc" />
362 <path
363 inkscape:connector-curvature="0"
364 style="fill:#958401;fill-opacity:1;fill-rule:evenodd;stroke:none"
365 d="m 31.043495,24.81709 0.08168,9.804611 0.686144,-0.214742 0.01198,-10.85341 z"
366 id="path13897"
367 sodipodi:nodetypes="ccccc" />
368 <path
369 inkscape:connector-curvature="0"
370 style="fill:url(#radialGradient2798);fill-opacity:1;fill-rule:evenodd;stroke:none"
371 d="m 4.2551267,24.106065 c 0,0 2.3166503,8.115689 10.2209413,8.766037 1.105608,2.490418 -1.13497,4.124601 -1.13497,4.124601 L 9.7315781,36.745641 c 0,0 -6.2387745,-7.992942 -6.4882087,-9.900882 -0.2494325,-1.907937 0.1632835,-3.407793 0.1632835,-3.407793 z"
372 id="path16526"
373 sodipodi:nodetypes="ccccscc" />
374 <path
375 inkscape:connector-curvature="0"
376 sodipodi:nodetypes="cccscsssscsccsc"
377 id="path2703"
378 d="M 23.184204,2.3889904 C 20.570275,2.4256563 18.199721,3.0590226 16.095844,4.1232033 15.065608,6.1519314 11.673602,8.563503 10.283218,8.8201221 7.5493302,12.0815 5.776456,16.17718 5.1039936,20.11483 c -4.124e-4,0.0024 4.116e-4,0.0049 0,0.0073 -1.1184901,1.46106 -1.8584936,3.246475 -1.5637169,5.260247 1.0570343,7.22114 2.9276025,13.709677 7.3279793,15.639454 5.923141,2.597582 21.539722,1.785935 24.611092,0.534295 6.73062,-2.742852 7.061699,-8.930694 8.117606,-15.997069 0.288074,-1.927851 -0.13655,-3.621454 -1.160201,-5.065566 -0.0084,-0.05242 -0.01743,-0.105097 -0.0267,-0.157769 C 41.673494,16.150755 39.725585,11.955182 36.807382,8.6741189 34.833356,8.4691243 31.019,5.3023548 30.095246,3.7492553 28.065743,2.8809656 25.832115,2.3889904 23.424497,2.3889904 c -0.08044,0 -0.160309,-0.00112 -0.240293,0 z"
379 style="opacity:0.744444;fill:none;stroke:#ffffff;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
380 <path
381 inkscape:connector-curvature="0"
382 style="opacity:0.594444;fill:url(#radialGradient2813);fill-opacity:1;stroke:none"
383 d="m 22.59375,2.78125 c -2.329557,0.1165682 -4.440971,0.7250384 -6.34375,1.6875 -1.010725,1.9903059 -4.354698,4.373241 -5.71875,4.625 -2.6821095,3.199611 -4.4027734,7.199424 -5.0625,11.0625 -4.046e-4,0.0024 4.038e-4,0.02888 0,0.03125 -1.0973069,1.43339 -1.4580267,3.591148 -1.4580267,3.591148 4.685267,3.605062 7.6416117,0.213892 14.3188727,-2.01722 12.59928,1.923141 18.748338,-0.995945 22.514154,-5.667678 0.0069,-0.0085 -0.0035,-0.02088 0,-0.03125 C 39.852567,13.479666 38.411479,11.016387 36.5625,8.9375 34.62586,8.7363873 30.875008,5.6486852 29.96875,4.125 27.977684,3.2731547 25.79952,2.78125 23.4375,2.78125 c -0.07892,10e-8 -0.171531,-0.0011 -0.25,0 -0.200346,0.00281 -0.39633,-0.00988 -0.59375,0 z"
384 id="path2800"
385 sodipodi:nodetypes="cccssccscccssc" />
386 </g>
387 </g>
388 </svg>
0 menu background splash.png
1 menu color title * #FFFFFFFF *
2 menu color border * #00000000 #00000000 none
3 menu color sel * #ffffffff #76a1d0ff *
4 menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *
5 menu color tabmsg * #ffffffff #00000000 *
6 menu color help 37;40 #ffdddd00 #00000000 none
7 menu vshift 12
8 menu rows 10
9 menu helpmsgrow 15
10 # The command line must be at least one line from the bottom.
11 menu cmdlinerow 16
12 menu timeoutrow 16
13 menu tabmsgrow 18
14 menu tabmsg Press ENTER to boot or TAB to edit a menu entry
0 label hdt
1 menu label ^Hardware Detection Tool (HDT)
2 com32 hdt.c32
3
4 @OPTIONAL_MEMTEST_INCLUDE@
0 /usr/lib/syslinux/modules/bios/vesamenu.c32
99 then
1010 mkdir -p /etc/initramfs-tools/conf.d
1111
12 cat > /etc/initramfs-tools/conf.d/cryptsetup << EOF
13 # /etc/initramfs-tools/conf.d/cryptsetup
12 cat > /etc/initramfs-tools/conf.d/cryptsetup <<-EOF
13 # /etc/initramfs-tools/conf.d/cryptsetup
1414
15 CRYPTSETUP=yes
16 export CRYPTSETUP
17 EOF
15 CRYPTSETUP=yes
16 export CRYPTSETUP
17 EOF
1818
1919 fi
20
21 if [ -e /etc/cryptsetup-initramfs/conf-hook ]; then
22 if grep -q '^#CRYPTSETUP=' /etc/cryptsetup-initramfs/conf-hook; then
23 sed -i -e 's/^#CRYPTSETUP=.*/CRYPTSETUP=y/' \
24 /etc/cryptsetup-initramfs/conf-hook
25 else
26 echo "CRYPTSETUP=y" >>/etc/cryptsetup-initramfs/conf-hook
27 fi
28 fi
2029 fi
44 # Truncate log files
55 for _FILE in $(find /var/log/ -type f)
66 do
7 : > ${_FILE}
7 truncate --no-create --size=0 ${_FILE}
88 done
77
88 . /live-build/config/binary
99
10 if [ -x /usr/bin/apt-file ] && [ "${LB_APT_INDICES}" = "true" ]
10 if command -v apt-file >/dev/null && [ "${LB_APT_INDICES}" = "true" ]
1111 then
1212 apt-file update
1313 fi
77 # is not allowed to, and (b) it wants to build the index in the background which
88 # will be racy in the context of live-build.
99
10 if [ -x /usr/sbin/update-apt-xapian-index ]
10 if command -v update-apt-xapian-index >/dev/null
1111 then
12 PYTHONDONTWRITEBYTECODE=1 /usr/sbin/update-apt-xapian-index --force --quiet
12 PYTHONDONTWRITEBYTECODE=1 update-apt-xapian-index --force --quiet
1313 fi
77 # means that if the live system is later installed to a hard disk then less
88 # work will be required after installation.
99
10 if [ -x /usr/bin/updatedb.mlocate ]
10 if command -v updatedb.mlocate >/dev/null
1111 then
1212 updatedb.mlocate
1313 fi