Compare commits

...

996 Commits

Author SHA1 Message Date
Roland Clobus 3fb606fa75
Apply 'wrap-and-sort' on the debian directory
Contains only whitespace changes
2025-01-10 11:55:11 +01:00
Roland Clobus d5bd2259be
debootstrap: Optionally use 'eatmydata'
If 'eatmydata' is found, use it.
On a CI system calling 'sync' influences the other processes that are
running on the shared host. 'debootstrap' calls 'sync' in its second
stage. For live-build, the synchronisation is not required.
2025-01-10 11:51:25 +01:00
Roland Clobus ddf289332c
test: pre-existing packages 2025-01-08 10:53:14 +01:00
Roland Clobus 64fa84a96b
test: Support reproducible images 2025-01-08 10:52:52 +01:00
Roland Clobus 9d0ed5e5cb
snapshot builds: Add check-valid-until=no in sources.list
When building against the snapshot server, adjust the sources.list entry
such that 'apt-get update' (in the live environment) will not complain
about the expired release file
2025-01-08 10:36:34 +01:00
Roland Clobus 937e5379f2
rebuild.sh: Re-enable snapshot.debian.org 2025-01-07 10:42:56 +01:00
Roland Clobus 3114e202fd
Support for qemu: Use spice-vdagent (Closes: 869569) 2025-01-07 09:59:00 +01:00
Roland Clobus 4b13a602bb
rebuild.sh: Add theme for Trixie
The theme for Trixie is Ceratopsian
https://wiki.debian.org/DebianArt/Themes/Ceratopsian
2025-01-07 09:53:48 +01:00
Roland Clobus 687c6d04e8
Packaging: Add devscripts as build dependency
'make test' calls 'checkbashisms'
2025-01-07 09:52:21 +01:00
Roland Clobus 3542536942
Fix FTBFS for 'make test'
See https://tests.reproducible-builds.org/debian/rb-pkg/bookworm/amd64/live-build.html
2025-01-07 09:43:57 +01:00
Roland Clobus a99e8c3d97
Reproducible: fixes unstable output in dictionaries-common
See #1090981: dictionaries-common: Randomness in emacsen-ispell-dicts.el
(now due to enchant)

This applies the same patch as proposed in the bug report and makes the
output of 'update-dictcommon-aspell' reproducible again.
2024-12-22 15:45:40 +01:00
Roland Clobus 246556b123
Firmwarelist: use POSIX commandline option for awk
Use `-v` instead of `--assign`, which is only supported by gawk
2024-12-16 13:53:21 +01:00
Roland Clobus 137b8e2eed Generate /firmware/Contents-firmware
This file is also present in the netinst image and is used by hw-detect
for efficient lookup of firmware files
2024-12-14 14:32:16 +00:00
Aaron Rainbolt 2bc716193d
Fix memtest support when using dracut-live 2024-12-10 19:34:33 -06:00
Roland Clobus 61d2eb3f30
Installer: fix for arm64 for builds before trixie
The package 'grub-efi-arm64-unsigned' was introduced in trixie
(Closes: #108850)
2024-11-30 21:31:36 +01:00
Roland Clobus 4a8b01df80 Fixes error message for local .deb files in config/packages.chroot.
The error message:
N: Download is performed unsandboxed as root as file '/root/packages/./InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

The _apt user cannot access files in /root/packages, instead /packages
will be used.
2024-11-24 22:41:35 +00:00
Roland Clobus 3e7f5dd851
test: Cached apt indices for local pool is implemented 2024-11-24 17:44:35 +01:00
Roland Clobus 6f6376dd3b
installer: Cached apt indices for local pool
Add the apt indices for the additional source of packages on the live
medium. It allows for installing packages from that source without
running 'apt-get update' first
2024-11-24 17:44:24 +01:00
Roland Clobus f4b19cd8bf
installer: Use UTC timestamps in the Release file
Fixes the "Invalid 'Date' entry in Release File
/var/lib/apt/lists/partial/_run_live_medium_dists_bookworm_Release"
message when running 'apt-get update'
2024-11-24 16:15:08 +01:00
Roland Clobus 5004fe3a15 Reproducible: Regenerate Java cacerts differently
The previous version with faketime can hang Java on some machines. This
solution adds a tiny startup delay when required, but effectively keeps
the image reproducible (because the offending file is not present in the
image, but will be generated on startup)
2024-11-23 16:00:11 +00:00
Roland Clobus f35d546933
test: New test for external deb sources
There are many ways to provide additional .deb packages in the live
images. This regression test helps to ensure that these stay functional.
2024-11-23 15:59:12 +01:00
Roland Clobus cd7b870995
Reproducible: ca-certificates-java
This makes the postinst file from ca-certificates-java
(/etc/ssl/certs/java/cacerts) reproducible.
It contains embedded timestamps for 'now'.
Debian-Junior includes ca-certificates-java and is now reproducible.
2024-11-12 12:26:06 +01:00
Roland Clobus 6374459ad3
Workaround for #1084791 removed.
Source package `rtl8723bt-firmware` was removed from trixie 2024-11-12.
The workaround is no longer required.
2024-11-12 09:34:02 +01:00
Roland Clobus e6efd799fc
Workaround for #1084791 part 3
Package realtek-firmware 20240909-2 migrated to testing/trixie. The
removal of firmware-realtek-rtl8723cs-bt in #1085075 has not taken place
yet, so the workaround needs to be applied to trixie too.
2024-11-06 19:51:10 +01:00
Roland Clobus 0bf71641ef
man: Use $LIVE_BUILD if set
The '--help' option will show the updated manpage if LIVE_BUILD is set
2024-11-06 11:32:23 +01:00
Roland Clobus e4168673d1
autopkgtest: Use 'stable' and 'testing'
Use the stable names instead of the codenames to reduce maintenance of
the autopkgtests.
2024-11-06 11:30:53 +01:00
Roland Clobus 30d39f812e
lb config: --distribution defaults to testing 2024-11-06 11:30:41 +01:00
Roland Clobus 0959dda89f
dracut: Support diverted configuration files of Calamares
When a configuration file for Calamares is diverted by e.g.
`config-package-dev`, it becomes a symlink. The in-place modifications
must be applied on the symlinked file, not on a newly created copy.
After removal of the package, no remainders are left.

See https://salsa.debian.org/live-team/live-build/-/merge_requests/353#note_540394
2024-11-01 17:39:22 +01:00
Roland Clobus 111a6c2c65
Installer: use the http proxy 2024-10-31 17:59:15 +01:00
Aaron Rainbolt 7349ab156f
Handle loopback booting with dracut-live properly
dracut uses the `iso-scan/filename` kernel parameter for loopback
booting with tools like Super Grub Disk, whereas live-boot uses the
`findiso` parameter for this purpose. Conditionally set which one is
used depending on the selected initramfs.
2024-10-31 00:23:01 -05:00
Roland Clobus 399393565c
Workaround for #1084791 part 2
The previous commit did not work properly.
Now output is generated that shows whether the workaround has been
applied or needs to be removed again.
2024-10-28 11:36:06 +01:00
Roland Clobus bb7e9e6368 Workaround for #1084791
There is a file conflict in the non-free-firmware realtek packages,
which prevent the sid live images from being built.

This workaround will be removed a soon as the bug is resolved.
2024-10-26 10:21:55 +00:00
Roland Clobus 48e4864fde
Pipeline: turn off the arm64 pipeline for non-DDs
The default arm64 (and riscv64) runners on Salsa are only available for
DDs. Instead of enabling the runners for the main namespace, they are
only turned off for non-DDs.

See the documentation at
https://salsa.debian.org/salsa-ci-team/pipeline#enable-building-on-arm-and-risc-v
2024-10-26 10:42:57 +02:00
Roland Clobus 5b7e7f5432
Typo: fixed layout for some commandline options 2024-10-25 11:39:41 +02:00
Roland Clobus 567e03034b
Add support for dracut
Mini case:
`lb config --distribution sid --debian-installer none --cache-packages false --archive-areas "main" --initramfs dracut-live`

Support includes debian-installer and Calamares

Closes: #1031903
2024-10-25 11:39:28 +02:00
Nick Brown 9ae2c0105c Add support for proposed-update archives
Can be selected in much the same vain as backports, updates and security
archive sources. Defaults to false like backports.

Closes: #1069045
2024-10-11 14:30:16 +00:00
Emanuele Rocca 719441e744 Add git to Suggests
The git command is needed in a few places, including when using
'--debian-installer-distribution git' and '--config GIT_URL'.
2024-10-11 14:28:40 +00:00
Emanuele Rocca c02973d21a Test ISO building on Salsa
Add two test stage CI jobs that build minimal ISOs on amd64 and arm64 runners
called 'ISO amd64' and 'ISO arm64' respectively.
2024-09-04 16:58:40 +02:00
Emanuele Rocca ccf1f49bb9 lb source: fetch source packages once
Iterate over source package names and call `apt-get source $srcpkg`, instead of
looping over binary package names and calling `apt-get source $binpkg`.

Taking libreoffice as an example, this means calling `apt-get source
libreoffice` once instead of hundreds of times.

Specify --only-source in `apt-get source` to make explicit the fact that the
argument is a source package name. This is necessary to make ambiguous cases
work, such as `libftdi1` which is both a source package name and a binary
package provided by a different source, `libftdi`.

The checksums in source/{live,debian}/sha256sum.txt are identical with and
without this patch.
2024-09-02 16:49:14 +02:00
Roland Clobus 7f28a6dea5
rebuild.sh: Support Debian-Junior 2024-09-02 09:26:11 +02:00
Emanuele Rocca a8cceda195 Add arm64 packages for post-installation 2024-08-30 18:05:11 +00:00
Emanuele Rocca 08d7ddba8b Always add live-installer to udeb_include
We need to ensure that anna always auto-loads live-installer when running d-i
to install a live system, regardless of the presence of a udeb_include to copy.
2024-08-29 18:13:10 +02:00
Roland Clobus 7a094b296d
Fix for #1057853: Missing Calamares icon for KDE on bookworm 2024-08-28 22:43:53 +02:00
Roland Clobus 86078425e2
Installer: fix for bookworm and bullseye
The package 'grub-efi-amd64-unsigned' was introduce in trixie
2024-08-28 22:43:06 +02:00
Roland Clobus c7bc5f311c
Installer: Calamares also needs the unsigned GRUB packages for offline installation 2024-08-23 12:23:50 +02:00
Roland Clobus 2ceebabfa4
Change default for zsync to false
* zsync was orphaned 2021-09-19 #994648
* zsync FTBFS with GCC-14 #1075710
* zsync was only available for iso and iso-hybrid
* zsync output is ignored by the live-setup package which generates the
  official live images
2024-08-14 10:35:04 +02:00
Luca Boccassi ebbb6e0c2c Update changelog for 1:20240810 release 2024-08-10 00:08:48 +01:00
Helmut Grohne 0eb97d9c36 duplicate aliased diversions for DEP17
/bin/hostname and /sbin/start-stop-daemon are being moved from / to /usr
in trixie. Hence, these diversions become ineffective. Temporarily add
both diversions to handle both variants.

Closes: #1064408
2024-08-10 00:07:25 +01:00
Luca Boccassi 24bfe093f8 Create local /etc/os-release with metadata about the live image
Add IMAGE_ID=live and BUILD_ID set to a human-readable SOURCE_DATE_EPOCH.
If building sid, also fix the broken VERSION_CODENAME so that it matches
reality.
2024-08-09 23:48:37 +01:00
Roland Clobus 89556fb77e
arm64: Only add .disk/udeb_include when the source file exists 2024-08-02 10:31:55 +02:00
Roland Clobus a05946d32c
Fix git installer build for arm64 2024-08-02 10:31:42 +02:00
Roland Clobus 22c48e92be
Fixed: select the package name for firmware packages
When the firmware package contains file names with spaces (e.g.
firmware-brcm80211, 20240610-1), pick the correct column for the package
section
2024-07-17 20:31:48 +02:00
Roland Clobus f2e750e6f7
installer: offline installation with calamares
After MR https://salsa.debian.org/live-team/calamares-settings-debian/-/merge_requests/5
was fixed for Calamares, the live installer now needs grub-efi as well
when running the installer in offline mode.
2024-06-24 08:23:40 +02:00
Roland Clobus 06d178aac0
Restore support for bullseye and bookworm
Bullseye and bookworm don't have the t64 packages, so the script checks
the availability of the suitable packages
2024-06-20 22:36:30 +02:00
Luca Boccassi b1247f717c d/control: bump Standards-Version to 4.7.0, no changes 2024-05-25 12:23:13 +01:00
Roland Clobus cf963c36b1
binary_includes: Activate when the directory exists (Closes: #1069349) 2024-05-03 08:16:27 +02:00
Roland Clobus 4f7f59f9e5 installer: Also add the t64 versions of the libraries
Fixes the installer for the standard image on BIOS boot
2024-05-01 05:47:31 +00:00
Roland Clobus a5bd0ed8ce Architecture checking is not required any more
The qemu-static binary on the host runs the foreign binaries
2024-04-29 16:27:41 +00:00
Roland Clobus f290d31960 hooks: Remove /etc/.pwd.lock and /run/mount/utab
When the zero-byte file /etc/.pwd.lock is present in the ISO image,
diffoscope will abort
(https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/367)

This file will be generated when needed, so it can be removed from the
image.

Cleanup /run/mount/utab (and its directory)
2024-04-29 16:27:41 +00:00
Roland Clobus 724f449e0d binary_bootloader_splash: New script
Allows for scenarios without syslinux (e.g. arm64)
Breaking change: custom splash.svg images must be placed in
config/bootloaders
2024-04-29 16:27:41 +00:00
Roland Clobus 2f1acabc41 Cross-build: arm64 support
Work together with Emanuele Rocca during MiniDebCamp Hamburg 2024
* rebuild: New command line option: --architecture
* installer: Enable the GTK installer
* bootloader: Set a default bootloader
* no qemu-binary in chroot
2024-04-29 16:27:41 +00:00
Roland Clobus 4a35ad2954 Rebuild: Always show the active settings 2024-04-29 16:27:41 +00:00
Roland Clobus 39b343fe0c
Remove 'nolapic' from the safe boot options.
This is a work around for #1068515
2024-04-28 22:28:26 +02:00
Roland Clobus 605868e21d
Allow for shim-only secure UEFI boot
When grub-efi-amd64-signed and grub-common have mismatched
dependencies (e.g. due to binNMUs), allow a shim-only secure boot.
The user has to enroll the hash of the EFI/boot/grub*.efi file and then
secure booting can continue.
Shim-only is supported only for '--uefi-secure-boot=auto'
2024-03-24 11:04:02 +01:00
Marcel Partap 518534d352 container hooks: make nspawn work inside nspawn
https://bugs.archlinux.org/task/55082 :
> This is probably caused by the fact that `systemd-nspawn` now registers
> a scope when `--register=no` is specified, unless `--keep-unit` is also
> specified [1].
[1] https://github.com/systemd/systemd/pull/6166
2024-02-23 22:36:50 +01:00
Roland Clobus 0845468303 Reproducible install-info
This fixes the last non-reproducible file for KDE (bookworm):
* install-info has an unstable sort when a new section is started
  Newer versions (not yet released) have been fixed
* The backup file (dir.old) does not need to be in the live image
2024-02-23 16:54:07 +00:00
Roland Clobus 0c3b3905b5 Fixed udeb handling 2024-02-23 16:53:17 +00:00
Roland Clobus 516e8ded70
Reproducible: Fix for vlc (used by the Bookworm KDE image) 2024-02-07 22:40:51 +01:00
Patrick Schleizer 59f8a67094 reproducible builds: use cp -a when copying binary/boot/grub/i386-pc 2024-01-21 18:02:18 +00:00
Patrick Schleizer 759adc68eb also check if grub-pc-bin dependency is available 2024-01-21 18:02:18 +00:00
Patrick Schleizer a54872f2c2 fix: check correct dependency package grub-common instead of grub-pc 2024-01-21 18:02:18 +00:00
Roland Clobus 77db32f0fb
Installer: fix for previous commit
A tab symbol in the vmlinuz-detection patch was missing
2024-01-01 11:43:53 +01:00
Roland Clobus 3d38418ebc
Installer: Support trixie
Trixie uses a kernel < 6.6.8 which still generates an unversioned
vmlinuz file
Additionally the installer for trixie requires libfuse2 instead of 3-3
2023-12-31 12:42:41 +01:00
Roland Clobus ba8ec44a3b
The installer now requires grub-common and dependencies 2023-12-28 17:22:33 +01:00
Roland Clobus 2d0e537bdb
installer: The kernel version does not need to have a Debian-version 2023-12-27 15:47:55 +01:00
Roland Clobus 3dbcbab578
Workaround for #1058994
fakeroot is not required for building the debian-installer
2023-12-27 15:46:14 +01:00
Unit 193 e9dd83edf8 firmwarelists.sh: Account for usrmerged firmware packages. 2023-12-22 00:04:31 +00:00
Roland Clobus 35defd5bb2
rebuild: Don't use a symlink for the splash screen
This is a first step for supporting File System Transposition
2023-12-03 13:06:38 +01:00
Roland Clobus 95a05b045d
Apply policykit fix when needed.
For bookworm, live-config does not contain the fix for #1037295
With the patched policykit file, many password prompts will not show up
any more, e.g. with Calamares
2023-12-02 14:59:19 +01:00
Emanuele Rocca 75d43b3394 chroot_sysfs: umount efivarfs if mounted
Trying to umount /sys currently fails if efivarfs is mounted under it. Umount
it first.

Bug: #1053457
2023-11-28 14:47:59 +01:00
Roland Clobus 4832b6215d
Reproducible: fixes the last two issues for Debian 12.3
* source_tar: The order of the files in the tarball are now predictable.
This has been verified with 'disorderfs'
* rebuild.sh: The timestamp of the directory of theme.txt must also be
adjusted.
2023-10-29 08:30:11 +01:00
Roland Clobus d70a84f2e9 Remove unneeded cached files from appstream
These files cause an untracable difference for the reproducible Bookworm
images, but because they are not needed, they can be removed.
2023-09-27 16:06:23 +00:00
Arnaud Rebillout 6dbb8d2598 efi-image: Fix <platform>/grub.cfg, variables must NOT be expanded
The test 'if [ x$grub_platform == xefi -a x$lockdown != xy ]' is meant
to be done by GRUB at runtime, so this line should appear verbatim in
the grub.cfg file.

However the variables are expanded at build-time by the script, because
the dollar symbol is not escaped.

Here's the result on a 12.1.0 live image:

    $ cat <<debian-live-12.1.0>>/boot/grub/x86_64-efi/grub.cfg
    if [ x == xefi -a x != xy ] ; then
    insmod part_acorn
    insmod part_amiga
    insmod part_apple
    insmod part_bsd
    insmod part_dfly
    insmod part_dvh
    insmod part_gpt
    insmod part_msdos
    insmod part_plan
    insmod part_sun
    insmod part_sunpc
    fi
    source /boot/grub/grub.cfg

Note that this mistake would have been caught if only the nounset option
had been used (ie. 'set -u').

Fixes commit: 7b36f5b0ad
2023-09-18 08:39:38 +07:00
Arnaud Rebillout a3f7a33f95 efi-image: Fix missing part_* modules in boot<platform>.efi
Setting the value of PARTITIONLIST in a sub-shell is scoped to the
sub-shell, it will not change the value of the variable in the parent
shell.

In other words:

    #!/bin/sh
    FOOBAR=
    (FOOBAR=foo)
    echo FOOBAR=$FOOBAR

gives the output:

    FOOBAR=

As a consequence, PARTITIONLIST being empty, there are no part_*
modules embedded in the boot<platform>.efi binary. This is clearly a
regression, introduced in 7b36f5b0ad.

Somehow, Debian doesn't seem to be impacted. Kali Linux is impacted, but
only under very special conditions, leading to this bug report:
<https://bugs.kali.org/view.php?id=8441>

This commit fixes it, by setting the PARTITIONLIST variable first, and
then using it where needs be. As a consequence it greatly simplifies the
next part of the code, as we can just use a heredoc to create the grub
config.
2023-09-18 08:38:52 +07:00
Roland Clobus 6f0f8952f9
rebuild.sh: Consistent timestamp of theme.txt
As noted in https://lists.debian.org/debian-live/2023/08/msg00008.html,
the timestamp of theme.txt for bookworm images is not reproducible.
Additionally the splash image is now matching the resolution of the boot
menu, which makes it more crisp.
2023-08-20 13:16:40 +02:00
Roland Clobus 15e620207f
binary_disk: Don't create .disk/archive_trace any more
As proposed in
https://lists.debian.org/debian-live/2023/08/msg00008.html
The information that is required for rebuilding the image is already
found in .disk/generator, .disk/info and .disk/mkisofs
2023-08-20 11:36:37 +02:00
Roland Clobus d54ba390dd
binary_rootfs: Fixed test for /etc/mtab (Closes: #1032408) 2023-08-20 10:57:43 +02:00
Roland Clobus d25826212a
binary_syslinux: Ensure the availability of the font of splash.svg
If the font is not installed in the binary chroot, a substitute font
will silently be used instead
2023-08-20 10:53:45 +02:00
Roland Clobus d6e7b80ea0 Apply predictable timestamps in the source image 2023-08-06 20:46:30 +00:00
Roland Clobus ff950cbeee
Fix and correctly suppress lintian warnings
Fix: debian-news-entry-has-unknown-version UNRELEASED
Suppress: mismatched-override absolute-symbolic-link-target-in-source
2023-08-06 21:31:15 +02:00
Roland Clobus f38a906715
Use LC_ALL=C for sort
This ensures that irrespective of the environment of the host, the
sorting order will be consistent and reproducible
2023-08-04 17:20:43 +02:00
jfliu e663ec5b0e binary_iso: fix iso-hybrid images with EFI bootloader 2023-07-19 14:46:06 +00:00
Marcel Partap 95fc0dfdaf Remove ancient hook 9030-remove-apt-sources-lists that was never run
because it doesn't end on ".hook.chroot", so it wouldn't be linked from
the `lb config` stage. Probably to the better, as it does not seem very
useful to indiscriminately raze all apt sources lists.
2023-07-18 13:12:29 +02:00
Marcel Partap 4146699d37 Create binary_chroot stagefiles when skipping, too 2023-07-18 12:23:57 +02:00
Roland Clobus 0d58c4287c
rebuild: update --disk-info 2023-07-15 19:28:22 +02:00
David Hewitt 5bff71fea2 Follow symlinks while copying shim files
The shim EFI file on Ubuntu can be a symlink, as it may be in the alternatives system, so
previously, when calculating the size of the FAT32 partition, we would measure the size of the
symlink instead of the actual file and get "Disk full" errors when trying to copy the files into
the new FAT32 partition.

If we dereference the file on copy, we get the actual file and can calculate the size accurately.

```
lrwxrwxrwx. 1 root root   36 Jul 12 20:04 bootx64.efi -> /etc/alternatives/shimx64.efi.signed
```
2023-07-15 12:59:39 +00:00
Roland Clobus d14306a799
Set additional meta information
* The ISO volume is constructed similar to Debian 11
* The file .disk/info can be overridden
* The file .disk/info does not contain 'Official' per default
* Overrides that are required for live-setup are now explicit in
  rebuild.sh
* New .disk/generator contains tracable information to the rebuild.sh
  script
* The ISO volume is unique for each desktop environment
2023-07-15 14:01:23 +02:00
Roland Clobus 8eaf20daf1
Filter the firmware list (Closes: 1035382)
The firmware packages that do not match the requested architecture(s)
are filtered out.
2023-07-09 11:59:00 +02:00
Roland Clobus 4086f078d9
Installer: ignore the configured kernel version
When building the Debian installer from git, ignore any configured
kernel version, and use the kernel version that is present in the chroot
environment.

This fixes a build error on Trixie/testing, which occurred after a new
kernel became available when the freeze was lifted.
2023-07-08 08:01:19 +02:00
Roland Clobus 29e26d11f8 If there is more than one kernel for the installer, use the newest 2023-06-21 10:13:51 +00:00
Roland Clobus ba34bfbfd0
non-free firmware detection: in chroot, not on host
Follow-up for 18ad612b72.
The availability of 'firmware-linux' must be checked inside the chroot
instead of on the host.
This fixes building Bullseye without 'non-free' available (as discovered
by autopkgtest)
2023-06-21 09:04:08 +02:00
Thore Sommer dd916ac5be ISO generation: add support for hybrid ISOs with grub-pc 2023-06-06 18:31:51 +03:00
Roland Clobus b064f27dcb
Revert previous commit to test/rebuild.sh
Bug #1023472 got fixed by tasksel 3.73
2023-06-04 12:25:50 +02:00
Roland Clobus e38192fa70
Workaround for #1023472
This avoids having more desktop managers, only xfwm4 will be installed
in the live image.
2023-05-13 10:15:37 +02:00
Jonathan Carter d5b3a21031 Add cryptsetup-initramfs to package pool 2023-05-02 14:33:08 +02:00
Roland Clobus 7b36f5b0ad
UEFI-secure: Don't attempt to load unsigned modules
The part_*.mod modules are not inside the signed .efi-file, so they must
not be 'insmod'ed in secure boot mode.
2023-04-30 12:59:36 +02:00
Roland Clobus 2944c4652a
UEFI-secure: Use the signed font
In secure boot mode, only the unifont.pf2 is inside the signed
.efi-file. To make secure and non-secure boot identical, use only the
unifont.
2023-04-30 12:53:32 +02:00
Roland Clobus 809346bc1e
Update splash image
The font size was reduced to fully capture the long live-build version.
Exported without Inkscape information.
Manually adjusted the coordinates to use integers instead of fractional
coordinates (for sharper conversion to png).
2023-04-30 10:02:19 +02:00
Roland Clobus 7690fb206f
Share the splash screen from isolinux in grub
This adds the version information on the grub splash screen and offers
the image at 800x600 instead of 640x480, which looks less unsharp.
2023-04-30 09:15:44 +02:00
Roland Clobus 87dd4404e7
Rebuild: use the same splash screen as d-i in the boot menus 2023-03-25 14:42:55 +01:00
Roland Clobus 3044245e65
Fix detection of fonts in initrd
When (intel|amd64)-microcode is present, the structure of the ramdisk is
more complex. `lsinitramfs` can see all files.
2023-03-19 08:40:46 +01:00
Roland Clobus 8473e8a792
Renumber reproducible hooks 2023-03-19 08:27:19 +01:00
Roland Clobus 69252aef8f
Bulleye needs contrib too for the non-free packages 2023-03-14 20:28:32 +01:00
Roland Clobus 18ad612b72
Detect firmware-linux, without references for Debian versions 2023-03-14 20:28:00 +01:00
Roland Clobus 50c7e1a8b7
Add support for non-free-firmware 2023-03-12 00:16:04 +01:00
Roland Clobus efa9ed8b59
Update for Lintian warnings 2023-03-05 09:59:49 +01:00
Roland Clobus 045de9bf64
Renumber hooks and update where needed
See https://lists.debian.org/debian-live/2022/04/msg00014.html
2023-03-04 17:08:44 +01:00
Roland Clobus 27f50aef9a
Use either ${LIVE_BUILD}/share/hooks or /usr/share/live/build/hooks, not both 2023-03-04 17:08:33 +01:00
Patrice Duroux 2bd841f835 replace 2&>1 by 2>&1 2023-03-01 17:19:44 +00:00
Raphaël Hertzog 7b5fce3fa6
Fix binary_memtest for x32 -> ia32 renaming made in memtest86+ >= 6.10-3
memtest86+ switched to /boot/memtest86+ia32.{bin,efi} for 32bits to be
coherent with the usual EFI naming.
2023-02-22 08:43:20 +01:00
Luca Boccassi c8fe85038f Update changelog for 1:20230131 release 2023-01-31 16:28:45 +00:00
Roland Clobus 8c50c9c0ed installer: Mark the local repository as trusted
apt-secure will now accept the local repository and Calamares can be run
without network connections.
2023-01-31 15:27:59 +00:00
Roland Clobus 61ae406dd7 installer: add grub packages for d-i and Calamares
d-i and Calamares select the needed grub packages based on how the
computer is started (BIOS vs UEFI). Because the packages for each
variant conflict, they must be provided as .deb files.
2023-01-31 15:27:59 +00:00
Roland Clobus 947f6aafe8 installer: No error if the udeb-exclusion list is empty 2023-01-31 15:27:59 +00:00
Roland Clobus 2acfbee5fd installer: Remove the udeb files
Without the quotes, the * inside the exclusion lists will be treated as
a will card, instead of the literal star.
2023-01-31 15:27:59 +00:00
Roland Clobus 196ee7b096 installer: Skip rebuilding the debian installer if it is found in the cache 2023-01-31 15:27:59 +00:00
Roland Clobus 7e7544c446 If the same file exists in multiple locations, take the version from the
first.

The LIVE_BUILD location will only be added if LIVE_BUILD is set.
2023-01-31 15:27:59 +00:00
Roland Clobus 8dd3579278
Rebuild: Pass only a few environment variables to sub shells 2023-01-28 21:52:52 +01:00
Roland Clobus 417bb5a81f
Rebuild: allow execution by sudo-users and root 2023-01-28 18:08:13 +01:00
snip 58f7a9e379 Use same naming scheme for archive keys in chroot and binary stages
Commit 8403487d introduced in the chroot stage a naming scheme for local
archive keys which distinguishes between ASCII-armored keys and binary
ones, and then adds the appropriate extension (either `.asc` or `.gpg`,
respectively) when copying them to `/etc/apt/trusted.gpg.d`.

However, this change was not applied to the binary stage: ASCII-armored
and binary keys are still both copied with the `.asc` extension, which
introduces a discrepancy between the two stages. This, in turn,
may prevent using the same `.list` file for both stages, as entries
such as

    deb [signed-by=/etc/apt/trusted.gpg.d/my-repository.key.asc] ...

will fail in the chroot stage if `config/archives/my-repository.key`
is in binary format (as it will be copied with the `.gpg` extension),
while entries such as

    deb [signed-by=/etc/apt/trusted.gpg.d/my-repository.key.gpg] ...

will fail in the binary stage (as the key will this time be copied
with the `.asc` extension).
2023-01-05 09:52:48 +01:00
Ryan Finnie 5e01a0c09f
Memtest GRUB fixes
Previous commits to support Memtest86+ 6.00+ split the files into
"memtest" (backwards compatible / new BIOS name) and "memtest.efi"
(new EFI name).  However, the 6.00 non-EFI binaries are now
32/64-bit, and will not work with GRUB's linux16 boot when using GRUB
for BIOS boot.

- Legacy Memtest86+ pre-6.00 will continue to be "memtest", linux16
  (continue to support builds on current Debian stable bullseye)
- Change 6.00+ filename to "memtest.bin"
- GRUB memtest.cfg contains logic for legacy / new bios / new EFI
- Change EFI boot from "chainloader" to "linux", which allows for
  passing command line options to Memtest86+
- syslinux @MEMTEST@ will conditionally be memtest.bin or memtest
- @MEMTEST_BIN@ will conditionally be memtest.bin or memtest, but is
  completely legacy at this point (all internal code paths now check
  for @MEMTEST_DIR@/memtest or @MEMTEST_DIR@/memtest.bin)

Getting complicated, but this logic can be simplified again once we
no longer need to support current Debian stable.
2023-01-02 09:40:17 -08:00
Roland Clobus dcbbfed463 installer: fail early
If e.g. the required packages for the git build cannot be installed,
abort early instead of attempting to build the installer.
2022-11-14 10:38:18 +00:00
Roland Clobus 7cdb395dd9 rebuild: New option to specify the origin of the d-i binaries 2022-11-14 10:38:18 +00:00
Ryan Finnie 1d6f6dd178
memtest: Support arch-specific and EFI memtest86+ 6.00
- BIOS: Final filename doesn't change (memtest), but now uses a
  64-bit version on amd64.
- EFI: Now included as memtest.efi; 32-bit on i386, 64-bit on amd64.
  As it's GRUB-only, we can test for the existence of memtest.efi
  (6.00+ only) in GRUB itself.
- Add @MEMTEST_DIR@ to facilitate directory-based testing in GRUB.

This expands upon the previous MVP commit
15e78a3eec .
2022-10-31 21:55:14 -07:00
Ryan Finnie 15e78a3eec Fix build with memtest86+ 6.00
memtest86+ 6.00-1 (in testing as of this date) adds and changes its
available binaries:

  - /boot/memtest86+x32.bin
  - /boot/memtest86+x32.efi
  - /boot/memtest86+x64.bin
  - /boot/memtest86+x64.efi

Future live-build functionality would ideally incorporate these new
binaries (x64 for amd64 builds, efi for grub-efi), but in the meantime,
this is an MVP update which supports either old memtest86.bin or new
memtest86+x32.bin.
2022-10-31 15:19:27 +00:00
Luca Boccassi a8884af9b9 salsa-ci: drop aptly pages publishing, errors out
"jobs:pages config key may not be used with 'rules': except"
2022-10-31 15:11:49 +00:00
Ryan Finnie ec73f2bab1
chroot_hostname: Fix reference to chroot inside chroot
Fixes: d2722e8f (Fix permissions and ownership of chroot_hosts and chroot_hostname copied files)
2022-08-23 10:41:25 -07:00
Roland Clobus 10b968e891 Add more variables for the splash.svg image (Closes: 1015782)
The request asked for 5 additional variables to be resolved for the SVG
images:
Added: LB_ISO_APPLICATION, LB_ISO_PUBLISHER and LB_LINUX_PACKAGES
Not added: LB_ISO_PREPARER: xorriso recommends not changing this
variable
Not added: LB_ISO_VOLUME: is can contain '@ISOVOLUME_TS@' which resolves
to a timestamp and would need additional handling
2022-08-10 08:10:07 +00:00
Roland Clobus 6908dfd6df
Drop win32-loader for the images with an installer.
See https://lists.debian.org/debian-boot/2022/08/msg00035.html
2022-08-10 08:00:08 +02:00
Roland Clobus fe9b32e7cd
Build from deb.debian.org
For reproducibly building live-images, it turns out that the initial
build does not necessarily have to use a snapshot server.
Within a time slot of 6 hours (the interval between synchronisations of
the Debian archive) the reproducibility of a live image can be checked
by running the rebuild.sh script twice. The resulting ISO files should
be identical.
2022-07-24 21:26:08 +02:00
Nick Brown 4a0350bdaf Allow APT_AUTH.CONF(5) config files to be used with archives during bootstrap.
Currently it's only supported in the chroot/binary phases. Omitting
bootstrap was an oversight.

Note that config/archives/*.conf are assumed to be apt.conf files,
so the apt_auth files are required to end with .auth and will be renamed
to .conf when copied into the chroot.
2022-06-28 21:05:12 +01:00
Olivier BLIN d2722e8f19 Fix permissions and ownership of chroot_hosts and chroot_hostname copied files
Ensure that /etc/hosts and /etc/hostname have safe permissions and the right
ownership when copied from include directory.

Gbp-Dch: Ignore
2022-06-10 12:08:58 +02:00
Roland Clobus 5b7d86686c
Reproducible hooks: fix version check for libxmlb2 2022-06-06 11:26:02 +02:00
Roland Clobus 17cb77ab82
Removes 'nomodeset' from fail-safe boot.
After more tests on openQA, it was shown that 'nomodeset' not only for
UEFI makes the image non-bootable (see
8c65231ad1), but for BIOS as well.
2022-06-01 09:12:01 +02:00
Roland Clobus 8c65231ad1
Rebuild: Use the new settings '--debian-installer-distribution git'. 2022-05-17 08:48:44 +02:00
Roland Clobus fa8ebd2469
Introduce '--debian-installer-distribution git'.
With this 'distribution', the installer is built from its git
repository, matching the date in SOURCE_DATE_EPOCH.
Additionally the kernel version is matched to the kernel version in the
chroot (to ensure that the installer can be run).
Rationale: The 'daily' installers are not archived, and therefore cannot
be used for a reproducible build.
2022-05-17 08:48:44 +02:00
Roland Clobus 26845abebc
Create a clean chroot for the installer.
The installer stage has a clean chroot for its own usage. The chroot
from the chroot stage is available in chroot/chroot (implemented similar
to the binary stage).
2022-05-17 08:48:35 +02:00
Roland Clobus ac0cde14e6
Synchronise all --parent-distribution options.
This makes the default value of --parent-debian-installer-distribution
the same as --debian-installer-distribution, like the other
--parent-distribution-* options.
2022-05-16 11:32:36 +02:00
Luca Boccassi e04368914b Update changelog for 1:20220505 release 2022-05-05 11:14:12 +01:00
Olivier BLIN 36e019c38d Add support for the new includes.chroot system to /etc/hosts file
The new includes.chroot system implemented in !214 adds the option
to include files in the chroot before and after package installation.

chroot_hostname and chroot_resolv have been updated but not chroot_hosts.

Gbp-Dch: Short
2022-04-22 08:58:06 +00:00
Roland Clobus f1a98e4da6
Reproducible hooks: texlive-base and texlive-binaries 2022-04-21 11:16:15 +02:00
Roland Clobus 5b44eb3bf5
Remove a left-over file when using a package in config/packages.chroot. 2022-04-20 10:26:24 +02:00
Roland Clobus ba5c0c37d1
Use a shorter suffix for modified development versions.
The default --iso-preparer value will fit into 128 bytes for a git
checkout with local modifications (the longest version variant).
2022-04-20 10:25:05 +02:00
Roland Clobus 2a7bb73bf7
Check the actual length of the ISO fields. 2022-04-20 10:24:51 +02:00
Roland Clobus a9d367d406
Rebuild a reproducible ISO image.
The steps were initially published at https://wiki.debian.org/ReproducibleInstalls/LiveImages
2022-04-20 10:19:30 +02:00
Roland Clobus c2263f1748
UEFI doesn't like nomodeset in safe mode 2022-03-25 15:15:29 +01:00
Roland Clobus 66d47f32f9
Reproducible hooks: appstream and libxmlb2
appstream >= 0.15.2 uses a new cache directory
libxmlb2 >= 0.3.7 contains a fix for the reproducible issue
2022-02-24 14:56:15 +01:00
Rob Shearman 3b0d8263d2 config: respect --bootloaders option again on amd64/i386
Persist LB_BOOTLOADERS in lb_binary_* configuration, since
Init_config_data called from lb_binary_* calls Prepare_config which
then overrides LB_BOOTLOADER_BIOS and LB_BOOTLOADER_EFI if
LB_ARCHITECTURE is amd64 or i386, and these can only be restored to
their proper values by the presence of LB_BOOTLOADERS.

This therefore ensures that the value of the "--bootloaders" parameter
to lb_config is respected by the lb_binary_* steps.
2022-02-18 13:00:01 +00:00
Nick Brown f04dc6dc49 Add auth.conf.d support to archives
Allow APT_AUTH.CONF(5) config files to be used with archives.

Note that config/archives/*.conf are assumed to be apt.conf files,
so the apt_auth files are required to end with .auth and will be renamed
to .conf when copied into the chroot.

Closes: #991065
2022-02-18 10:47:45 +00:00
Nick Brown 70994cd304 Echo executing source/binary hooks
The chroot hooks already do this.
2022-02-11 10:51:39 +00:00
Roland Clobus 9ee1a1671f
Show git hash as version number, when a local git repo is used. 2022-02-10 21:46:27 +01:00
Philip Hands d9fcae7dd8
get the aptly/pages stage to work 2022-02-07 15:02:26 +01:00
Roland Clobus 0fe681c10c
Reproducible hooks: fontconfig got fixed in 2.13.1-4.4.
Do not activate the hook if fontconfig is sufficiently new.
2022-01-31 11:40:57 +01:00
Michał Prochera e420c83e4c Unconditional Remove_packages calls in binary_rootfs (Closes: #994982)
That prevents potential errors during future Remove_packages calls without APT indices available. In such cases, APT tries to remove packages with unrecognized names, which results in an error and fails the script execution. An example of this would be installing apt-utils in chroot_archives with --apt-indices option set to false.
2022-01-26 17:55:42 +00:00
Sophie Brun b9b32ad41f
Harmonize menu entries (uefi / bios) and add a variable for the templates 2022-01-26 11:13:30 +01:00
Roland Clobus 43ef78bb34
Reproducible hooks: Regenerate initrd.img in chroot_hacks only when chroot_hooks did not regenerate it already.
Hook 1003 is replaced by 8000, which is more generic and does not need
to modify original files.
2022-01-26 08:14:26 +01:00
Roland Clobus 5a08cc71a0
Add hook for libxmlb2 (used by appstream)
Caused by appstreamcli refresh-cache in package appstream (the
apt-conf/50appstream file)
Fixed upstream in libxmlb in 0652ec042c
2022-01-24 12:28:12 +01:00
Roland Clobus a599f50e48
Add hooks for building reproducible images 2022-01-24 12:28:08 +01:00
Roland Clobus 0183c73aba
Set the timestamp inside hdd images.
Similar to iso images, the timestamp of a file/folder inside the binary
image cannot be newer than SOURCE_DATE_EPOCH.
Also set the timestamp of the hdd image.
2022-01-22 18:16:58 +01:00
Roland Clobus 62f3d7bf55
Set the timestamp of the generated iso image. 2022-01-22 18:16:54 +01:00
Roland Clobus 2e5e565367
When update-initramfs is called, clean up the backup files.
This removes the unnecessary vmlinuz.old and initrd.img.old files in the
root folder of the generated image.
2022-01-22 17:58:09 +01:00
Roland Clobus fd1505414b
Clean up the cache directory, if no files are present.
The folder 'cache/contents.chroot' in the build directory can be removed
if no firmware is installed.
2022-01-22 17:56:39 +01:00
Roland Clobus cb912308c7
Bugfix: The values for '--cache-stages' were not matching the implementation. 2022-01-22 17:56:29 +01:00
Roland Clobus 06ee64b16a
Reactivate '--chroot-filesystem plain'.
This previously undocumented value for '--chroot-filesystem' creates the
uncompressed folder 'live/filesystem.dir'.
This will speed up the generation of live images a lot, because the
squashfs compression is skipped.

Example command line:
  lb config -b hdd --chroot-filesystem plain --binary-filesystem ext4
2022-01-22 17:53:38 +01:00
Roland Clobus 2bfdb3cb44
Bugfix: The arguments to the 'tr' command must be quoted. 2022-01-08 13:39:48 +01:00
Roland Clobus eed8d293b1
Bugfix: Do not copy the content of e.g. /dev/shm when creating hdd
images

Discovered when building with '--binary-image hdd' on /dev/shm
2022-01-08 10:33:55 +01:00
Roland Clobus 8f763ee8b1
Bugfix: Add missing package when systemd is active
The package might be missing when building with a minimal configuration,
as recommended in the Live Manual, the example 'Base image' scenario:
'lb config --apt-recommends false --debootstrap-options "--variant=minbase"'
2022-01-08 10:27:50 +01:00
Roland Clobus 63399dab6e
Use the release date from the changelog as the date for the last modification of each manpage 2022-01-07 10:13:52 +01:00
Roland Clobus d7316bcec9
Remove generated translation files
These files are regenerated by 'make rebuild'
2022-01-07 10:13:52 +01:00
Roland Clobus dbb5e6143d
Add file with translatable text (lb_installer.1.pot) 2022-01-07 10:13:24 +01:00
Roland Clobus a7ce0710d4
Mark the phony targets in the Makefile 2022-01-07 10:12:28 +01:00
Roland Clobus bf0349c38e
Fix Lintian warning about malformed NEWS file 2022-01-07 10:12:26 +01:00
Roland Clobus 7185058425
Adding symlink for udeb data for bookworm 2021-12-03 19:57:33 +01:00
Ryan Finnie 7944adc6a5
Fix missing variable quoting in proxy handling
Fixes:
[2021-11-14 11:08:03] lb config noauto --apt-http-proxy http://proxy.example.com:8000
scripts/build/config: 868: local: Acquire::http::Proxy-Auto-Detect: bad variable name
2021-11-14 11:12:25 -08:00
Ryan Finnie 5da4ff53be
Add initial riscv64 support
Notes:
- No bootloader is configured; images must be booted via direct kernel
  - Tested via qemu + opensbi fw_jump.elf + kernel/initrd
- As riscv64 is currently in ports, the following options are required:
    --distribution unstable
    --mirror-bootstrap http://ftp.ports.debian.org/debian-ports/
    --security false
    --debootstrap-options --keyring=/usr/share/keyrings/debian-ports-archive-keyring.gpg
- Normally ports require stacking two dists, unstable and unreleased.
  debootstrap does not support doing this, but as of this writing, there
  is nothing in riscv64 unreleased which is required to bootstrap.
  However, this would not have been possible a year ago.
2021-11-14 09:22:41 -08:00
Roland Clobus bcc4ab97c6
Code coverage test (for the proxy) 2021-09-23 13:53:53 +02:00
Roland Clobus d6a5a1f3cf
Simpler handling of http proxies
There are two main scenarios:
1) The host with live-build is configured to use a proxy
   This proxy will automatically be used by live-build
2) The user of live-build explicitly specifies a proxy
2A) With the environment variable 'http_proxy' (preferred)
2B) With the command line option --apt-http-proxy

Any inconsistency in the setting of a proxy results in an error message of 'lb config'
All internal tools (apt/apt-get/aptitude, wget and debootstrap) use the environment variables 'http_proxy' and 'no_proxy', which are passed along to the chroot where needed.

Test scenario:
- A virtual machine with all out-going traffic blocked, except for the proxy.
2021-09-23 13:53:49 +02:00
Luca Boccassi da16d81ed3 Merge commit 'e93e2b4b9dde3059935daa61cabeab663fc0838b'
Latest PR was automerged before latest changelog commits were
pushed, moving tree back in sync
2021-09-15 12:25:01 +01:00
Roland Clobus 7264a752bb
The support for FTP proxies has ended 2021-09-08 13:40:53 +02:00
Luca Boccassi e93e2b4b9d Update changelog for 1:20210902 release 2021-09-02 13:56:07 +01:00
Luca Boccassi 6fec0e45c4 Bump Standards-Version to 4.6.0, no changes 2021-09-02 13:54:28 +01:00
Luca Boccassi 012377e261 Bump debhelper-compat to 13, no changes 2021-09-02 13:54:16 +01:00
Nick Brown df79eeafaf Export variables for hooks
MR !173 removed the export of several variables moving/renaming them.
Continue to export both the new name and older compatibility name.

Closes: #992572
2021-08-24 20:14:03 +01:00
David Hewitt bd2a0e971b
binary_grub-efi: Allow removal of protected packages 2021-08-04 16:02:06 +01:00
Thore Sommer 1cd901cfa2 Enable dm-verity support also for ext filesystems
Those need a block size of 4k to work.
2021-07-19 11:52:09 +02:00
Thore Sommer e02e2df4b9 docs: documentation for dm-verity feature 2021-07-11 10:33:56 +02:00
Thore Sommer 0f53b8ed20 Adding dm-verity support for rootfs
This adds support for dm-vertiy on the root filesystem.
Currently only squashfs is supported.

Three new flags are introduced.
 * --dm-verity: Enable basic dm-verity support
 * --dm-verity-fec NB_ROOTS: Enable forward error correction. Optional
 * --dm-verity-sign SCRIPT: Specify signing script for the root hash. Optional
2021-07-11 10:33:48 +02:00
Luca Boccassi 873b2d4d73 Update changelog for 1:20210407 release 2021-04-07 18:53:28 +01:00
Luca Boccassi 5e15d0b0b0 Update changelog for 1:20210405 release 2021-04-05 13:04:26 +01:00
Luca Boccassi e51ea0ae92 Autopkgtest: remove architecture restriction
Let's see if everything works now.
2021-04-02 19:02:55 +01:00
Luca Boccassi 43afff005a Autopkgtest: build a stable image 2021-04-02 19:02:55 +01:00
Luca Boccassi 93ab49f927 Firmware download: skip architecture if not found
Contents-all.gz does not seem to exist on Buster, so don't fail if
wget doesn't find the file.

Closes: #986278
2021-04-02 16:57:33 +01:00
Luca Boccassi 57f2cc1cd6 Update changelog for 1:20210330 release 2021-03-30 16:18:31 +01:00
Luca Boccassi 305a145282 security: do not append /updates from bullseye onward
No longer required.

Closes: #986148
2021-03-30 15:30:32 +01:00
Luca Boccassi 80711a7542 Fix typo in changelog
E: live-build: possible-missing-colon-in-closes

Gbp-Dch: ignore
2021-03-29 18:37:29 +01:00
Luca Boccassi d17a64ad74 Update changelog for 1:20210329 release 2021-03-29 10:52:31 +01:00
Luca Boccassi 4735da6f52 Add NEWS entry to notify about filesystemd.size removal 2021-03-29 10:52:31 +01:00
Roland Clobus 3cc60e4f64 Removed filesystem.size for squashfs images.
See for more details https://lists.debian.org/debian-live/2021/03/msg00008.html
2021-03-29 09:08:35 +00:00
Roland Clobus 745b2be876
Fixed handling of checksums in combination with the d-i installer.
1) lb config rejected multiple checksum types
2) When using the installer, cdrom-checker requires a md5 checksum file,
   use 'Check the integrity of the installation media' in the installer
3) The comments in the first lines of the checksum files caused
   cdrom-checker to fail the integrity of the image
2021-03-21 12:32:54 +01:00
Roland Clobus 9524705c34
Support security for bullseye. See https://wiki.debian.org/NewInBullseye. Closes #964914 2021-03-11 12:55:44 +01:00
Unit 193 21eff20ea3 firmwarelists.sh: Search Contents-all for firmware too. 2021-02-22 20:25:55 -05:00
Ryan Finnie 8a8e11e5d1 No mksquashfs progress bar if stdin is not a terminal
Explicitly documented updated conditional, as "-t" is not a
commonly seen shell test.
2021-02-18 08:48:27 +00:00
Ryan Finnie a0400b2499
Use --apt-http-proxy/--apt-ftp-proxy for debootstrap 2021-02-17 22:02:47 -08:00
Luca Boccassi 965d75053d Update changelog for 1:20210216 release 2021-02-16 21:25:49 +00:00
Roland Clobus 2c7c90487a
mkfs.msdos needs at most 32 bits for the -i argument.
Use the hexadecimal version of SOURCE_DATE_EPOCH, limited to the lower 32 bits
2021-02-16 21:22:12 +01:00
Luca Boccassi d7b2d55c8f autopkgtest: restrict to amd64 and i386 for now
After Bullseye we can re-enable other architectures, but for now
disable them so that we can get bug fixes in Bullseye.
2021-02-16 18:47:21 +00:00
Luca Boccassi b968e2c0f7 Fix build on architecture without syslinux
Don't run xorriso with -isohybrid-mbr if LB_BOOTLOADER_BIOS is
not set to syslinux

Closes: #982746
2021-02-14 21:38:19 +00:00
Roland Clobus b13c4b1583
Adding symlink for udeb data for bullseye 2021-02-10 22:14:36 +01:00
Roland Clobus a37cbcb574
lilo is not available any more in Bullseye (and newer), see #973850 2021-02-10 21:47:22 +01:00
Roland Clobus c9cf409e83
The local LIVE_BUILD wins over the system live-build for the list of udeb exclusions 2021-02-10 21:47:22 +01:00
Roland Clobus 01dc99e528
The local LIVE_BUILD wins over the system live-build for the list of udeb inclusions. Only copy when the distribution is known 2021-02-10 21:47:20 +01:00
Ryan Finnie d6b7a54831
Restore_package_cache: Handle existing but empty packages directory 2021-02-04 12:37:46 -08:00
Ryan Finnie 5c838744d6
binary_syslinux: Do not modify grub theme.txt if grub/splash.png exists
If grub/splash.png exists, assume the configuration editor intends
to have a grub-specific splash.png, and do not modify theme.txt.
But if syslinux has the only known splash.png, use it for both
syslinux and grub.

(This allows for a hybrid image where the grub side can have e.g. a
16:9 1920x1080 splash.png which gets grub is capable of automatically
scaling, while the syslinux side has a 640x480 splash.png which
effectively must be this fixed size.)
2021-01-30 21:58:09 -08:00
Roland Clobus dc1a03d053
Reproducible fix for glibc 2021-01-23 21:26:09 +01:00
Raphaël Hertzog 259fd73558
Add symlinks to support kali releases 2021-01-22 22:30:54 +01:00
Raphaël Hertzog 903579e741
Bump Standards-Version to 4.5.1
Gbp-Dch: Ignore
2021-01-22 17:59:41 +01:00
Raphaël Hertzog 94b5541e14
Update changelog 2021-01-22 17:58:14 +01:00
Raphaël Hertzog ce033fed19
Get rid of deprecated needs-recommends feature
Instead embed the recommended packages in the Depends field following
the advice from autopkgtest maintainers (and the nagging from lintian).
2021-01-22 17:55:59 +01:00
Raphaël Hertzog 0f799a634e
Update lintian override
Gbp-Dch: Ignore
2021-01-22 17:07:54 +01:00
Raphaël Hertzog 36f5cd96fa
Update changelog for 1:20210122 release 2021-01-22 16:25:16 +01:00
Raphaël Hertzog 4111df43bd
Fix a small info message 2021-01-21 08:28:38 +01:00
Steev Klimaszewski 113d159b0b Add arm64 udeb include files
Signed-off-by: Steev Klimaszewski <steev@kali.org>
2021-01-20 10:28:33 -06:00
Roland Clobus d145b0c9ec Bugfix: do not create /dev/lock and /dev/lock-frontend 2021-01-17 14:06:11 +00:00
Marcel Partap fdcdab72dc binary_rootfs stage: slightly lower mksquashfs nice levels (19 -> 17)
.. so its priority is low, but above BOINC grid computing (19).
2021-01-16 17:14:17 +01:00
Marcel Partap 0252065950 binary_rootfs stage: disable mksquashfs progress bar only in quiet mode 2021-01-16 17:09:52 +01:00
Marcel Partap 63c1a5997d binary_rootfs stage: give custom MKSQUASHFS_OPTIONS precedence
courtesy of
sed -i -r '/MKSQUASHFS_OPTIONS/ s/"(\$\{.*\}) ([^"]+)"/"\2 \1"/' scripts/build/binary_rootfs
2021-01-15 22:32:14 +01:00
Roland Clobus 91e1e65c87 Apply SOURCE_DATE_EPOCH to newly generated files and create a log 2021-01-15 09:22:29 +00:00
Roland Clobus 5636820be5 Set timestamp in embedded files of the installer 2021-01-15 09:22:29 +00:00
Roland Clobus 15fab34ea2 Set timestamp embedded in EFI files 2021-01-15 09:22:29 +00:00
Roland Clobus 2b0559fd11 Use SOURCE_DATE_EPOCH for the partition-id of /boot/grub/efi.img 2021-01-15 09:22:29 +00:00
Roland Clobus 760684b1e2 Use SOURCE_DATE_EPOCH for the partition-id of /efi.img 2021-01-15 09:22:29 +00:00
Roland Clobus 9712c46cff Use SOURCE_DATE_EPOCH for 'now' in .disk/info 2021-01-15 09:22:29 +00:00
Roland Clobus 0202f17cad Use SOURCE_DATE_EPOCH for 'now' in the boot splash image 2021-01-15 09:22:29 +00:00
Roland Clobus 9d24051669 SOURCE_DATE_EPOCH is always set 2021-01-15 09:22:29 +00:00
Roland Clobus 95cd662f4e 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.
2021-01-15 09:22:29 +00:00
Jan Kot 4d7c8c35e3 exit.sh: fix selinux mountpoint 2021-01-14 01:44:30 +01:00
Jan Kot 96fe9e7ca9 packages.sh: check for /etc/debian_version existance rather than dpkg-query aviability 2021-01-13 12:39:07 +00:00
Jan Kot 954d9c7c31 bootstrap_debootstrap: change debootstrap path to /usr/sbin/debootstrap
As we're checking if debootstrap is present on the host machine, we should look for it in /usr/sbin and not ./bin
2021-01-13 12:39:07 +00:00
Roland Clobus 576b4a70ae Add new manpage to the list of translatable files 2021-01-13 10:48:51 +00:00
Raphaël Hertzog 7ff772f298
Update changelog 2021-01-12 15:15:38 +01:00
Raphaël Hertzog e050d4c994 Update renamed lintian tag names in lintian overrides.
Changes-By: lintian-brush
Fixes: lintian: renamed-tag
See-also: https://lintian.debian.org/tags/renamed-tag.html
2021-01-12 14:53:48 +01:00
Raphaël Hertzog f13273368a
Don't fail if one of the package lists expands to an empty list
When a package lists contains only packages protected by a test
that doesn't match for the current run, then Expand_package_list
outputs nothing and the following "grep -v" fails because it
has not filtered anything. Avoid this by protecting the "grep -v"
call with "|| true".
2021-01-12 14:48:27 +01:00
Roland Clobus 831da55c01
Preserve timestamps 2021-01-11 14:34:11 +01:00
Unit 193 f943fa9209 Add 'unstable' as a valid distribution and link to sid. 2021-01-08 04:32:01 -05:00
Ryan Finnie b8279ed4a1
Bugfix: Fix grub.cfg pc/ENABLE_MEMTEST check
Grub [ uses "-a", not "&&".
2021-01-01 22:54:47 -08:00
Roland Clobus 037e93fe37 Preserve timestamps 2021-01-01 16:51:02 +00:00
Roland Clobus 3f7dd00fcb Delay resolving the timestamp for the ISO volume to the moment the ISO-image is created 2020-12-13 20:33:24 +00:00
Roland Clobus fac389a51b
A second invocation of 'lb config' will result in an identical settings file 2020-12-13 19:23:20 +01:00
Roland Clobus edb12253eb
Bugfix: use minutes instead of month in the time of the modification date field 2020-12-13 11:11:55 +01:00
Roland Clobus 4eae44d13d
Bugfix: use minutes instead of month in the time of the modification date field 2020-12-07 08:36:42 +01:00
Matthijs Kooijman e772dfd6d2 binary_iso: Execute mkdir binary/.disk before writing to it
Before commit 9f3e5fe8d (Fix the way the .disk/mkisofs file is created)
all these commands (`mkdir`, write to `binary/.disk/mkisofs` and
`xorriso`) were in the same `binary.sh` script. Since that commit, the
write was extracted, to prevent issues with quoting, but the related
mkdir was left in `binary.sh`. This means that the write is now executed
first, and the `mkdir` only afterwards, making the `mkdir` quite pointless.

In practice, this did not break becaue binary_disk also does the same
`mkdir` and runs before `binary_iso`, but if one runs commands manually
and skips `binary_iso`, then this does break.

Even though this is not really a supported usecase, just move the mkdir
outside of `binary.sh`, so it runs *before* the write again as intended.
2020-11-24 12:24:14 +01:00
Roland Clobus c4b239caf5 Bugfix: Live installer can run without LB_CACHE_PACKAGES 2020-11-18 16:37:43 +00:00
Roland Clobus 6e4e10f071 Bugfix: LB_DERIVATIVE was used the wrong way around 2020-11-18 17:11:59 +01:00
Thore Sommer 7360d50fa6 Added the option to include files before and after package installation
Moved includes.chroot to includes.chroot_after_packages and added
includes.chroot_before_packages. includes.chroot does still work as before.

We also now use rsync for copying files if it is installed.
This improves runtime and space consumption for large includes.

Gbp-Dch: Short
Closes: #927128
2020-10-27 15:07:11 +00:00
Thore Sommer 7b19209aae Option for using systemd-nspawn instead of chroot for hooks.
Installation of flatpaks doesn't work with normal chroots.
This patch enables support for using systemd-nspawn in hooks.

Gbp-Dch: Short
Closes: #965953
2020-10-12 18:26:16 +00:00
Luca Boccassi 59380dddf0 Autopkgtest: disable updates/security repositories, not available for Bullseye 2020-10-12 16:13:59 +01:00
Thore Sommer 9a26533a06 Add option to change compression algorithm and level for squashfs. 2020-10-12 13:35:16 +00:00
Marcel Partap ce39f3e507 For 32bit UEFI secure boot, the package name is grub-efi-ia32-signed
avoids spitting out warning
> [2020-06-07 22:30:32] lb binary_grub-efi
> P: Begin preparing Grub based EFI support...
> Reading package lists...
> Building dependency tree...
> Reading state information...
> Package grub-efi-amd64-signed is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
>
> E: Package 'grub-efi-amd64-signed' has no installation candidate
> W: UEFI Secure Boot disabled due to missing signed Grub/Shim.
2020-10-12 12:41:58 +00:00
Ryan Finnie 169645b478 grub-efi: Show fwsetup, do not show incompatible memtest even if enabled 2020-10-12 11:34:52 +00:00
Roland Clobus 9536a37af0 The sed -e ‘d’ commands with ‘#’ will not work, a slash is needed, fix for 7ffd2288d9 (2015-01-15) and 578dbee516 (2015-01-29) 2020-10-08 19:21:33 +00:00
Raphaël Hertzog f323c93b73 Update renamed lintian tag names in lintian overrides.
Changes-By: lintian-brush
Fixes: lintian: renamed-tag
See-also: https://lintian.debian.org/tags/renamed-tag.html
2020-09-25 12:04:05 +02:00
Raphaël Hertzog 4977733e98
Document our autopkgtest tests as needing internet access 2020-09-25 11:49:13 +02:00
Raphaël Hertzog c3968cf1c6
Use truncate --no-create --size=0 to truncate files
This avoids the permission error due to /proc/sys/fs/protected_regular = 2
setting which is now enabled by default in bullseye.
2020-09-25 11:49:03 +02:00
Raphaël Hertzog d2bc6e278d
Another try to fix the CI 2020-09-25 11:40:06 +02:00
Raphaël Hertzog 9ebddbe9f7
Use bullseye as default release in preparation of the next stable release 2020-09-25 11:32:34 +02:00
Raphaël Hertzog e1c3990648
Try to fix CI to cope with latest salsa-ci changes 2020-09-25 11:28:39 +02:00
Raphaël Hertzog b14a9e5c79
Tell APT to retry downloads a few times before giving up
We want to be resilient to small network hiccups and when you download
a large number of packages, the probability of a network hiccup are
increasing... as are the chances of hitting one of the apt bugs
(cf "Undetermined error"...).
2020-09-25 11:08:40 +02:00
Victor Gavro 990dcf2eed chroot_apt: fixed adding Pin-Priority (broken in da1fab11)
Fixes !201
2020-09-14 11:02:51 +02:00
Ryan Finnie 56186add3c
architectures.sh: armhf/armel can be built on arm64 2020-06-01 07:49:56 -07:00
Ryan Finnie 6b0cc5529b Enable arm64 for binary_grub_cfg
Without modification, this produces a usable config for arm64
grub-efi iso-hybrid. Tested on qemu arm64 + serial console.
2020-06-01 08:02:28 +00:00
Ryan Finnie 13cf0e9ebe
Add initial ppc64el support
Note that this does not include grub-ieee1275 support so the images will
not be bootable, but it's a first step and produces ISOs without error.
2020-05-30 14:11:45 -07:00
Lyndon Brown 263f84fe80 clean: handle all common options
support for options like `--debug` was missing.

Gbp-Dch: Short
2020-05-15 19:36:51 +00:00
Lyndon Brown fca1283147 clean: refactor
this simplifies things to avoid the messy recursion.

it is also a necessary step to implementing handling of common options
like --debug. we need to process all options to decide how to approach
doing things (e.g. with debug messages to be output or not) before actually
performing any work, in order for options like --debug to be reacted to
properly.

also, as things were, options like `--debug` were not being passed along
in the recursive executions, while now that is no longer an issue.

the order of file/folder deletions for `--all`|`--purge`|`--remove`
actions is slightly changed here, but i don't see any issue with that and
it's cleaner to not preserve that.

Gbp-Dch: Short
2020-05-15 19:36:51 +00:00
Lyndon Brown 0afd3625ed bootloaders: reorganise installer menu entries
per layout from MR #199 discussion.

under "Advanced install options" we have:
  - Graphical installer
  - Text installer
  - Graphical installer with dark theme
  - Text installer with dark theme
  - Installer with speech synthesis

under each of these we have a set of:
  - Install
  - Expert install
  - Automated install
  - Rescue mode

note that the 'automated' entries are moved up before the 'rescue' entries.

for hotkeys, the four entries above have hotkeys of 'i', 'x', 'a', and 'r'
respectively. ('x' is used instead of 'e' to avoid clash with standard
grub hotkey). this means that some entries that previous had no hotkeys
due to the flat list now have them. the other big difference is the main
graphical install entry going from 'g' to 'i' for consistency and the main
speech synth entry going from 's' to 'i' for the same reason.

furthermore, in the level above we have 'g' for normal graphical, 't' for
normal text install, 's' for speech synth, 'd' for graphical dark mode,
and 'k' for text dark mode.

the text-only sets are identical to the graphical ones except only for
dropping the graphical groups, simplifying maintenance, bringing clarity
to users of images (who may not have even made the image) that the set is
text-only, and keeping consistent hotkeys between graphical and text-only.

a 'start installer with speech synthesis' entry shortcut has been placed
at the top menu level alongside the 'start installer' shortcut.

Gbp-Dch: Short
2020-05-15 19:35:09 +00:00
Lyndon Brown ab2e8a91f5 bootloaders: add accessible dark contrast installer menu options
following official install discs.

i've not bothered to update grub-legacy this time.

Gbp-Dch: Short
2020-05-15 19:35:09 +00:00
Lyndon Brown 9b2564a3ff bootloaders: add advanced speech synth install entries
following the presence of them in the official install discs.

also drops unnecessary word "graphical" from existing speech
synth entry, following official Debian install discs.

i've not bothered to update grub-legacy this time.

Gbp-Dch: Short
2020-05-15 19:35:09 +00:00
Lyndon Brown 180207d711 Revert "config: catch and report unexpected arguments"
This reverts commit 665372c19d.

the kali test failed due to their script using a hack of passing along a
custom option after an early terminator through to their auto/config file.
the change implemented here was valuable, but i'll have to look into
revising things to work with what Kali is doing.

Gbp-Dch: Ignore
2020-05-05 21:57:57 +01:00
Lyndon Brown 18eefdd6f3 s/Remove_package/Remove_packages/
it removes one or more, so should be plural for clarity

Gbp-Dch: Short
2020-05-05 19:55:28 +01:00
Lyndon Brown 919a464b64 s/Install_package/Install_packages/
it installs one or more, so should be plural for clarity

Gbp-Dch: Short
2020-05-05 19:55:28 +01:00
Lyndon Brown 9c8d26c97f packages: avoid unnecessary nesting
Gbp-Dch: Ignore
2020-05-05 19:55:28 +01:00
Lyndon Brown f27d13de08 make temporary state of installed tools recoverable
some scripts temporarily install packages to accomplish some work before
then removing them. the list of packages installed is kept in memory in a
variable.

a weakness of this design is that if a failure occurs or the user cancels,
and then following this the user re-runs `lb build`, letting it try to
pick up and recover from where it left off, that list of packages that had
been installed is lost, resulting in those packages that were installed
then being a permanent part of the chroot.

here we fix this weakness by backing up the list to a file, which is always
read from on removal. thus in a recovery situation, any packages still
installed from a situation like that just described, will be removed upon
the next use of `Remove_package()`.

this is not perfect, since we are having to wait for opportunistic
execution of the remove function. we need to find a suitable place for the
`Cleanup_temp_packages()` function to be used.

 - doing so in `Init_config_data()` would not be suitable because we don't
   hold the lock when that's run, even if we ignored the hijacking of that
   function for taking such action...
 - doing it in `Exit()` doesn't seem a good fit either.
 - putting it explicitly in every build script just seems a little messy...

perhaps a local exit trap like for removing the lock...?

note that `binary_rootfs` skips running the remove function after installing
tooling, since it just throws the wrapper chroot away, which then leaves the
file around with stale data for the next remove instance to pick up, which
then does not actually remove it because it's not installed. this is not
ideal either... perhaps the optimisation should be removed from that script?

Gbp-Dch: Short
2020-05-05 19:43:15 +01:00
Lyndon Brown a065e60043 manpages: clarify UTC timestamps wrt. build log
Gbp-Dch: Ignore
2020-05-05 19:04:35 +01:00
Lyndon Brown 665372c19d config: catch and report unexpected arguments
after handling arguments, catch and report any remaining "non-option"
arguments.

for instance users could make the basic mistake of using
`lb config --bootloaders syslinux grub-efi`, i.e. failing to quote the
multiple bootloaders (i actually encountered a user doing this who swore
that "it just worked"). catching and reporting such mistakes could be
valuable to users.

previous behaviour:
```
$ lb config --bootloaders syslinux grub-efi
P: Updating config tree for a debian/buster/amd64 system
P: Symlinking hooks...
```

new behaviour:
```
$ lb config --bootloaders syslinux grub-efi
[2020-05-05 18:56:07] lb config --bootloaders syslinux grub-efi
E: Unexpected argument found: grub-efi
```

Gbp-Dch: Short
2020-05-05 19:02:35 +01:00
Lyndon Brown d68290058e debootstrap: fix wrong param for Check_package call
debootstrap must obviously exist in the host. we thus must pass 'host'
not 'chroot' such that a warning about needing to install it on your host
system is output, rather than it being added to a list of packages to be
installed, which never occurs in this script.

Gbp-Dch: Ignore
2020-05-05 00:52:13 +01:00
Lyndon Brown 7cf7f74bc0 arches: fix Check_crossarchitectures param passing
Gbp-Dch: Ignore
2020-05-04 23:22:10 +01:00
Lyndon Brown 8a1bbe0841 arches: tidy
Gbp-Dch: Ignore
2020-05-04 23:22:10 +01:00
Lyndon Brown 08c86dc8ac arches: fix some Check_architectures() mess
- the comparison with LB_ARCHITECTURE seems to be based upon an old idea
   of it potentially being intended in the past to hold more than one
   arch (when it's name as also plural), but it in fact only holds one.
 - similarly LB_BOOTSTRAP_QEMU_ARCHITECTURE is singular, so the comparison
   with the set of params is bad.
 - storing $@ in a variable before then looping is not a good idea
 - script name was not being passed to the warnings
 - can simplify by just returning in the valid case

i'm very suspicious about the correctness of the qemu bits, but that
can wait for now.

Gbp-Dch: Short
2020-05-04 23:21:44 +01:00
Lyndon Brown a542d52141 rename binary_loopback_cfg to binary_grub_cfg
when loopback support was introduced, it initially duplicated the code
for generating a grub2 config, before the duplicated code was removed from
the grub-pc script, effectively thus moving grub config generation to the
loopback feature script.

grub-efi support was added after this.

this results in a misleading filename, since the `binary_loopback_cfg`
script is essential for use of grub-pc|grub-efi, and actually only has a
single line of code on top that's needed for adding actual loopback
support on top. (when grub-pc and grub-efi are not used, the entire script
is still needed for loopback support to work).

so here we rename it to make better sense, and correct/clarify bits of
documentation.

Gbp-Dch: Short
2020-05-04 22:15:09 +01:00
Lyndon Brown 3a523c3fc1 binary_iso: properly handle multiple bootloaders
with LB_BOOTLOADER_BIOS and LB_BOOTLOADER_EFI introduced, we can simplify
and correct things here.

previously it was possible for more than one of each type to be added.

Gbp-Dch: Short
2020-05-04 21:48:03 +01:00
Lyndon Brown d7883ec32b config: improve BIOS/EFI bootloader selection handling
the design choice from when EFI support was introduced was to change
`--bootloader` to `--bootloaders`, with users specifying their selection
of BIOS and EFI bootloaders together. at this time there were not even any
decent validation checks being performed, and invalid combinations could
cause some chaos.

since then proper validation was put in place, including checking that
only a single instance of each of BIOS and EFI bootloaders exists in the
selection.

here we tweak things such that we stick with the same option, but we split
the selection up such that we store the BIOS and EFI selections separately
within the saved config file, and offer it up to scripts to help simplify
those scripts.

we must however retain support for splitting from the combined option,
both because we still use it in the combined option, and for backwards
compatibility with older saved configs.

Gbp-Dch: Short
2020-05-04 21:40:13 +01:00
Lyndon Brown 3f840aeeba fully validate BIOS/EFI bootloader combinations
thus far, config bootloader validation only did the basic check that each
bootloader specified was a known and supported bootloader, it did not check
combinations.

it now checks combinations, and strips out the previous "bootloader role"
stuff.

the no-bootloaders warning is duplicated, covering two slightly different
situations (empty string, and whitespace string). this is anticipated to
be just temporary, with this just being the first step in better handling
bootloader selections.

Gbp-Dch: Short
2020-05-04 21:40:13 +01:00
Lyndon Brown f3a818da9a binary_hdd: remove incorrect local scope
the "FIXME" function wrapper is just to temporarily disable the code.

Gbp-Dch: Ignore
2020-05-04 21:40:08 +01:00
Lyndon Brown 976be9f44b indentation fix
Gbp-Dch: Ignore
2020-05-04 17:40:23 +01:00
Lyndon Brown 7ad96bd644 fix redundant and incorrect source selections
"grub" presumably was what is now called "grub-legacy"

removed both because there is already a proper piece of code adding
bootloader packages.

Gbp-Dch: Ignore
2020-05-04 17:38:53 +01:00
Lyndon Brown cb2d9a0fe4 fix another overlooked "grub" -> "grub-legacy" instance
Gbp-Dch: Ignore
2020-05-04 17:37:14 +01:00
Lyndon Brown 9d7393bbdb config: add note
The core purpose of `Prepare_config()` is to prepare the config by setting
defaults where not specified. It should not be involved itself in
validation of user options.

This can be an important distinction, for instance in `clean` where we
use this function, but avoid validation to potentially allow for an option
that deletes the config, that should work even in the face of an invalid
config.

Gbp-Dch: Ignore
2020-05-04 16:16:00 +01:00
Lyndon Brown 89ed6a54a1 config: fix inadequate validation check
Gbp-Dch: Ignore
2020-05-04 14:39:55 +01:00
Lyndon Brown 943c8fb5fe extend config validation to all build components
while `lb build` ran the config validation check, spotting invalid configs
and stopping with an error, the major build stages if executed directly did
not, nor did the component stages.

here we move execution of the validation function into the common init
function, with an exported variable used to indicate that validation has
been performed. thus validation is performed no matter what part of the
build system you execute, but only once.

Gbp-Dch: Short
2020-05-04 13:26:19 +01:00
Lyndon Brown 7acd1f488f get rid of a couple of useless variables
Gbp-Dch: Ignore
2020-05-04 13:21:12 +01:00
Lyndon Brown 76459a39cd clean: tweak init
`Init_config_data` is more suited to build scripts than here. note that
it's not used in `config` either. this deliberately does not pass along
arguments to it because `Arguments()` can only handle the basic common
options, not the `clean` set. this is somewhat confusing and causes a
pointless execution of `getopt`. furthermore the function is expanding
slightly further beyond it's original scope, with yet more change coming
that's unsuitable for `clean`, so it makes sense to avoid using the
function here just for the couple of function calls needed.

validation of the config is disabled, as it is not performed currently.
it is not clear if it should be enabled or not for `clean`. it may be
useful to not validate, if we wish to be able to provide users with an
option to be able to delete the config.

Gbp-Dch: Ignore
2020-05-04 13:14:57 +01:00
Lyndon Brown 21c697617d bootloaders: add timezone to splash timestamp 2020-05-03 23:20:39 +01:00
Lyndon Brown 9bc35759aa config: fix stale live-build version in iso-preparer
using `$VERSION` as part of the default `$LB_ISO_PREPARER` means that when
you simply run `lb config` once, this variable is stored as a part of the
string, and replaced on use, but if you run `lb config` twice, it gets
replaced with a fixed version, that is then used in all subsequent builds.

let's replace with a placeholder (`@LB_VERSION@`) that can be used both in
the default, or in user strings, and will be replaced on use only.

this means that subsequent builds will always reflect the actual version
of live-build used.

Gbp-Dch: Ignore
2020-05-03 23:20:39 +01:00
Lyndon Brown 26a89a45e5 disk_info: obey new UTC timestamp control 2020-05-03 23:20:39 +01:00
Lyndon Brown ebf4b04b7f source_disk: de-duplicate date construction
Gbp-Dch: Ignore
2020-05-03 23:20:39 +01:00
Lyndon Brown 558942eccb syslinux: obey new UTC timestamp control 2020-05-03 23:20:39 +01:00
Lyndon Brown 31cc121c3d config: obey new UTC timestamp control for default ISO volume label 2020-05-03 22:19:49 +01:00
Lyndon Brown 6cf3321d84 config: provide UTC timestamp control
`DATE_UTC_OPTION` is set in `Prepare_config()` for use by scripts, even
though only a few scripts will actually use it, since it allows those
scripts to be cleaner. we may want to possibly extend this as a
`DATE_OPTIONS` variable perhaps as part of enabling proper reproduciblity.

Gbp-Dch: Short
2020-05-03 22:19:43 +01:00
Lyndon Brown 23f02ec7ee syslinux: support timezone date component
since date is not obtained as UTC, timezone is an important detail of
understanding the given time, which users may want to make use of.

Gbp-Dch: Short
2020-05-03 20:31:45 +01:00
Lyndon Brown dc64d8235d syslinux: fix date construction accuracy issue
don't construct each part from a fresh "now", which can result in
inaccuracies in the overall date due to "now" drifting over the individual
date calls. instead feed the full date that was obtained back into it when
extracting the component parts.

Gbp-Dch: Ignore
2020-05-03 20:31:43 +01:00
Lyndon Brown 7ad69658b2 config: fix storage of --jffs2-eraseblock value
broken since it's introduction in 9ffb223d70

Gbp-Dch: Short
2020-05-03 15:08:28 +01:00
Lyndon Brown 918fe8ce25 config: small output alignment fix
Gbp-Dch: Ignore
2020-05-03 12:39:42 +01:00
Lyndon Brown 7276d0213f fix usage/help/man bugs
- the definition of $PROGRAM as used in $USAGE strings defined in each
   script has been broken for a long time, being simply "lb" when it needs
   to be "lb COMMAND".
 - `config` changed $PROGRAM to "lb config" thus its output was correct in
   this regard unlike everything else, but with the switch to a more
   "intelligent" `Man()` function recently, it means that instead of
   `man lb config`, what was actually run was `man lb config config`,
   which displayed the manpage, then on exiting with `q`, it showed some
   sort of index line todo with a "config" search (no exact manpage
   match?), for which you had to enter `ctrl+c` to get rid of.

this revises things to fix the issues, minimising change by changing
$PROGRAM to "lb COMMAND", with the frontend overriding this.

Gbp-Dch: Ignore
2020-05-03 01:38:17 +01:00
Lyndon Brown 96c7977732 archives: output actual error for bad pass param
Gbp-Dch: Ignore
2020-05-03 01:31:47 +01:00
Lyndon Brown 43b4f9cdf6 adjust action arg consumption order
did not properly consider all usage cases properly in deciding placement.

this captured `--usage` in `$PROGRAM --usage` as the action for instance.

Gbp-Dch: Ignore
2020-05-03 01:31:47 +01:00
Lyndon Brown 372a8fd91a args: restore a little tidying
lost in a reversion

Gbp-Dch: Ignore
2020-05-03 01:31:47 +01:00
Lyndon Brown 82700d010b manpages: formatting fix
Gbp-Dch: Ignore
2020-05-03 01:31:47 +01:00
Lyndon Brown 23ed83e730 config: tweak config file loading order
load the base set of files first, then any user arch/dist specific override
files second.

this is important since whenever config items get moved in the base files,
this can break the override files, if an option specified in one was moved
to a different common file that it loaded after.

Gbp-Dch: Ignore
2020-05-02 20:44:02 +01:00
Lyndon Brown 640a25f78d clean: output error on invalid argument 2020-05-02 18:44:12 +01:00
Lyndon Brown 22d8ac15db options: de-duplicate common option handling 2020-05-02 18:18:49 +01:00
Lyndon Brown 55e17b1e25 config: refactor basic package list construction
Gbp-Dch: Ignore
2020-05-02 17:07:32 +01:00
Lyndon Brown b2b2602429 clean: expand debugging
Gbp-Dch: Ignore
2020-05-02 17:07:29 +01:00
Lyndon Brown f20b5b4d0d clean: fix missing 'noauto' param for substage execution
these should be bypassing the possibility of running the auto script
surely, just like how this is done for `--all`, otherwise you pass through
the auto file twice.

Gbp-Dch: Ignore
2020-05-02 14:59:19 +01:00
Lyndon Brown 2d4b2c9e76 clean: improve arg handling
- detect lack of options using actual arg count rather than first arg
   being an empty string.
 - fix string splitting issues by looping properly on "${@}"
 - tidier

Gbp-Dch: Ignore
2020-05-02 14:59:12 +01:00
Lyndon Brown 2d7ff4934d improve stagefiles encapsulation
- added and used Stagefiles_dir()
 - added and used Stagefile_exists()

pretty self explanatory.

Gbp-Dch: Short
2020-05-02 14:49:45 +01:00
Lyndon Brown b20979334c caching: output error on invalid action param
for bootstrap, the check is moved to the case statement for greater
robustness, and for consistency with other scripts.

Gbp-Dch: Ignore
2020-05-02 14:04:12 +01:00
Lyndon Brown da1fab1161 output error for incorrect action in chroot prep scripts
...alongside printing usage (which is perhaps unnecessary), so that it is
actually clear to users that a problem occurred, and what.

and capture it before option processing of remaining args.

Gbp-Dch: Ignore
2020-05-02 13:46:41 +01:00
Lyndon Brown 5f318c5a44 tidy up Echo_breakage()
- it's only used by the debootstrap script after alternatives were dropped
   long ago, so let's move it, avoiding it being loaded for everything
   else.
 - there's no need to pass printing another message through it.
 - there's little point in making the sid distinction if you happen to
   decide to build sid, it's a given that it's less stable than stable.

really, is there any need for this at all?

Gbp-Dch: Ignore
2020-05-02 13:06:17 +01:00
Lyndon Brown d7d0798e46 debootstrap: remove useless obtaining debootstrap verbose help strings
Gbp-Dch: Ignore
2020-05-02 12:54:22 +01:00
Lyndon Brown 1c74927fe5 config: simplify mode default
all roads lead to debian

i was waiting to get to the work on properly tackling the mode stuff, but
let's just tidy this now...

Gbp-Dch: Ignore
2020-05-02 12:41:35 +01:00
Lyndon Brown f78001144b move and rename Common_config_files()
for better encapsulation, and for consistency with other config file
handling functions in the new location.

Gbp-Dch: Ignore
2020-05-02 02:38:26 +01:00
Lyndon Brown 69dc8c21cb bootloaders: tweak default splash text to avoid overlap
the default grub config has a quirk of using the syslinux splash when
present, which as a sidenote i believe is because only the syslinux script
has the code for converting an SVG (i've not researched to confirm).

the problem is that the default splash is such, with the text listing
package versions used, that this overlaps with the menu title in grub.

i've tweaked the "built on" and package details text to reduce its size
(bumped the line-height up slightly though) to avoid the overlap.

this was a pain in the *** to get done. inkscape likes to crash at the
slightest little thing like clicking on interface controls; each time it
saves it seems to swap a bunch of stuff in the file which can make a
hugely messy diff, i had to save, close, open, change, undo, and save
again, just to get a sain diff; and numerous times testing different sizes
and such in actual builds (rather than separate conversions) some of the
package detail lines would for some unknown reason decide to end up on the
same line as another, wth...

anyway, i've finally managed to get a new revision successfully created
and it seems bug free wrt. that same line issue to me, both converting
outside of live-build (in my sid host), and within a buster build. the size
of the text changed seems closer to the size of the actual menu entries
(there's no need for it to be bigger), and now is nicely clear of the menu
title.

Gbp-Dch: Short
2020-05-02 02:09:38 +01:00
Lyndon Brown d4a1e110ed syslinux: updated SVG for splash
opening the file in inkscape resulted in a dialog explaining that inkscape
used to work on a 90 DPI basis but switched to 96 DPI for better
compatibility reasons, and wanted to convert the file.

this is simply the result of it having done the conversion.

it advised that for documents not intended to be printed that there should
be no noticeable difference. i checked the output and it seems identical
to before. i tried to look at the actual diff, but it's a lot of noise,
most of which is just reordering, and i gave up, since the output looks
identical i'm not going to worry.

Gbp-Dch: Ignore
2020-05-02 00:02:31 +01:00
Lyndon Brown 1892f97ce6 grub2: fix missed vga= consistency adjustment
Gbp-Dch: Ignore
2020-05-01 22:36:10 +01:00
Lyndon Brown 6ebac9cc5b grub2: fix duplicate live entries
in tweaking a previous commit to remove some excessive change before
submission, i mistakenly identified the part of the sed replacement
restored here as being unnecessary to its functionality, but in fact it is.
without it the placeholder is not actually removed.

the lack of removal of the placeholder meant that you ended up with
duplicate copies of the live menu entries.

Gbp-Dch: Ignore
2020-05-01 22:02:31 +01:00
Lyndon Brown 578dbee516 bootloaders: change 'Advanced options' to 'Utilities'
more fitting now that we've moved the advanced installer entries
out to a different submenu, leaving just memtest (and HDT on
syslinux).

the advanced.cfg file is also renamed to utilities.cfg in the syslinux
case, but in a backwards compatible way of moving the user advanced.cfg
file over the new one, if the user provides a file with the old name.
alternatively we could just leave the old name in place, but that would be
a little odd.

Gbp-Dch: Short
2020-05-01 12:38:04 +02:00
Lyndon Brown d22c1f177d grub2: fix vga= consistency
- most entries used vga=788 rather than vga=normal (which are equivalent)
 - the syslinux menu uses 788 exclusively
 - so do the official install discs

Gbp-Dch: Short
2020-05-01 12:37:36 +02:00
Lyndon Brown 375ff465e5 grub2: tiny label consistency tweak
as per style in official Debian install discs

Gbp-Dch: Ignore
2020-05-01 12:05:35 +02:00
johnraff 0e5d0483e5 Replace 'which' with 'command -v' to test for the existance of an executable
This is considered to be more robust.

Two instances remain:

scripts/build/chroot_archives, line 257:
if [ "${LB_APT}" = "aptitude" ] && [ ! $(Chroot chroot "which aptitude") ]
The command is run inside a chroot where the environment might be special,
and would need further testing.

manpages/Makefile, line 42:
@if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
I am insufficiently familiar with makefile syntax to edit this.
2020-05-01 09:59:11 +00:00
Lyndon Brown fd18d46e0e grub2|loopback: avoid perl for live entry creation, use temp file
instead of cramming the live entries into a string via a layer of functions
for terminating entries with newlines, which we then have to run through
perl to tweak the newlines for correct use with sed... let's write the
entries to a temp file, then use that file in the sed replacement.

the helper functions injecting newlines to the end of entries as they were
built into a long string have obviously become unnecessary and so were
removed. one function was renamed for reasons of consistency and clarity.

the file is initially deleted before use for reasons of wanting to bullet
proof the codebase to work properly under conditions of recovering from
failure/cancellation, `--force` re-running and such.

this removes the last use of perl.

Gbp-Dch: Short
2020-05-01 09:40:40 +00:00
Lyndon Brown 2c1af527fd config: fix wrong variable name
Gbp-Dch: Ignore
2020-05-01 08:57:44 +00:00
Lyndon Brown a72e7daaf7 config: only try to load FILE.ARCH and FILE.DIST if non-empty strings
to thus avoid trying to load `FILE.`

Gbp-Dch: Ignore
2020-05-01 08:57:44 +00:00
Lyndon Brown 61aa3239c5 config: remove junk config loading code
support for this has not existed since v2.0~a24-1 !!

until 4d22ca948a (v2.0~a24-1), `PROGRAM` was
defined as `PROGRAM="$(basename ${0})"`. then this commit simply got rid
of the definition.

it then flipped back and forth a bit in a few ways, but always sticking
to a simple fixed "live-build" type string after that commit, as it has
been ever since.

the code removed here has thus been junk since then, and the documentation
corrected here out of date since then.

the checking of `LB_CONFIG` is also possibly junk, but i know too little
about it. it was introduced in v1.0~a43-1 in commit
705a4178e7 with a changelog entry of
"Centraly evaluate LH_CONFIG for custom configuration file."

Gbp-Dch: Short
2020-05-01 08:57:44 +00:00
Lyndon Brown 72321c2b9b config: optimise --ignore-system-defaults
Gbp-Dch: Ignore
2020-04-30 19:37:51 +01:00
Lyndon Brown b4156e146f workaround checkbashisms mistake
it reported: "possible bashism in scripts/build/binary_loopback_cfg line 284 (should be '.', not 'source')"

which is clearly a misidentification.

Gbp-Dch: Ignore
2020-04-30 11:57:47 +01:00
Lyndon Brown 9d5665c627 syslinux: fix errors re-running under `--force`
robustification is required to not just `--force` but recovery from failure
or user cancellation.

Gbp-Dch: Short
2020-04-30 07:52:37 +01:00
Lyndon Brown 82f0acb091 grub2|loopback: fix theme issues for submenus
also enables greater flexibility for users to override more aspects of
theme separate from menu entries, and similarly the initial config details
separate from the menu entries. (with the recent change to merge user files
with the defaults rather than replace them, users can pick which of these
individual components they wish to customise.

identical to change as sent in to Kali and accepted by Raphaël.

Gbp-Dch: Short
2020-04-30 07:36:51 +01:00
Lyndon Brown 96ade65e65 grub2: fix lost pre-prepared files detail
partly lost in some adjustments that were made to the submitted work,
which was focused on restoring the 'start installer' entry.

there is no need for dynamic setting of these two `source` imports in the
default file, in fact user modifications should also use the fixed import
commands in future.

note that the old placeholders however remain replaced, which inject
precisely this string, for backwards compatibility.

Gbp-Dch: Ignore
2020-04-30 07:10:08 +01:00
Lyndon Brown 647dcb7aed bootstrap_cache: fix failure condition
during testing i encountered an unexpected error resulting from the
following condition:
 - bootstrap was cached
 - cache of bootstrap packages was empty (from playing with `lb clean`)
 - installer was not none|live

everything works fine up until the main installer script, which comes to
an abrupt halt with an error due to the missing cached bootstrap packages
that it wants to copy.

this situation is easy to unintentionally create, as i managed to do.

here we catch the failure condition, correcting for it.

this is done by checking for the missing cached packages when restoring
the bootstrap from the cache, and skipping this if the packages were
missing, thus forcing the bootstrap to be rebuilt. the packages should
then be found within the cache, allowing the installer stage to complete
successfully.

of course the bootstrap stage will only cache the packages if caching is
enabled, but if caching is disabled and installer enabled, the config
validation will catch that, reporting that problem.

Gbp-Dch: Short
2020-04-30 06:20:52 +01:00
Lyndon Brown 51903da073 init: warn if auto script exists but is not executable 2020-04-30 05:07:02 +00:00
Lyndon Brown a8a6addaf5 loopback: tidy formatting
Gbp-Dch: Ignore
2020-04-29 20:08:39 +01:00
Lyndon Brown 1374e82e24 frontend: fix passing along global args
trying to use `lb --debug config` for instance did not output debug info
unlike `lb config --debug`.

Gbp-Dch: Ignore
2020-04-29 19:03:58 +01:00
Lyndon Brown 80d9c93de9 selinux: fix output consistency
install mode was silent when selinux was not enabled, whilst remove mode
always output a "Begin unmounting..." message. this makes both modes silent
when selinux is not enabled.

this also happens to fix an unintended side effect of
d79c96232b whereby a warning subsequently
was always emitted in remove mode when selinux was not in use, which was
not ideal.

Gbp-Dch: Short
2020-04-29 13:17:50 +00:00
Lyndon Brown 931f42fa39 manpages: more formatting fixes
make variables and options in descriptions bold

Gbp-Dch: Ignore
2020-04-29 10:34:54 +01:00
Lyndon Brown 4f765f3fc0 manpages: fix outdated --distribution description
it does not depend upon --mode, it simply defaults to 'buster'.

Gbp-Dch: Ignore
2020-04-29 10:34:54 +01:00
Lyndon Brown 7149307e07 manpages: clarify --breakpoints
Gbp-Dch: Ignore
2020-04-29 10:34:54 +01:00
Lyndon Brown a0c7db9759 manpages: clarify and correct --binary-images description
including correction of default for all architectures being fat32 not fat16
and the sparc difference no longer being relevant.

Gbp-Dch: Ignore
2020-04-29 10:34:54 +01:00
Lyndon Brown 4f82210d11 manpages: tiny clarifications and tweaks
not worth listing the specifics

mostly the following though:
 - "(comma or space separated)" -> "(a comma or space separated list)"
 - quoting values

Gbp-Dch: Ignore
2020-04-29 10:34:42 +01:00
Lyndon Brown 9c7e8dec72 manpages: fix formatting mistakes
shortoptions also emboldened

Gbp-Dch: Ignore
2020-04-29 10:31:40 +01:00
Lyndon Brown e9a88e5201 manpages: tiny correction
"all (applicable)" -> "all"

this needed adjusting after 38a5aed0dc

don't want to confuse users

Gbp-Dch: Ignore
2020-04-29 10:31:40 +01:00
Lyndon Brown 20c43a0eb8 manpages: fix typos
"whould" -> "would"
"build" -> "built"

Gbp-Dch: Ignore
2020-04-29 10:31:40 +01:00
Lyndon Brown d2f9344b66 manpages: fix typo
"bugreport" -> "bug report"

i won't bother changing the dates just for this one.

Gbp-Dch: Ignore
2020-04-29 10:31:25 +01:00
Lyndon Brown 29ab2459c8 a couple tiny doc fixes
Gbp-Dch: Ignore
2020-04-29 10:27:16 +01:00
Lyndon Brown 6a5d42d569 fix auto file handling regression
b4598b234c mistakenly stopped passing along
options to auto files.

Gbp-Dch: Ignore
2020-04-28 15:12:35 +01:00
Lyndon Brown 997a7f73f9 config: remove redundant validation check
this is already covered by the check above it

Gbp-Dch: Ignore
2020-04-26 12:55:18 +00:00
Lyndon Brown 70c0aa4075 manpages: fix typo
"Sor" -> "So"

Gbp-Dch: Ignore
2020-04-25 12:03:49 +02:00
Raphaël Hertzog 624e79eb8f Do not overwrite splash.png if the user has provided it
The unconditional SVG to PNG conversion could overwrite a splash.png
provided by the user. Ensure we don't overwrite such a file. But we
still remove the SVG file as syslinux is not able to make use of it.
2020-04-25 10:49:35 +02:00
Raphaël Hertzog 103daf9f7c Make librsvg2-bin dependency unconditional for syslinux
We do provide a splash.svg by default so the check will always return
true unless the user has forked live-build... thus the check is
pointless.
2020-04-25 10:46:26 +02:00
jnqnfe 24c2b3e119 syslinux: deduplicate common files
there are several files of which identical duplicate copies are held in:
 - share/bootloaders/extlinux
 - share/bootloaders/pxelinux
 - share/bootloaders/isolinux
 - share/bootloaders/syslinux

it is a pain to maintain this from a development standpoint, having to
copy modified config files into the other directories each time changes
are made and mistakes have been made before due to this.

this creates a new folder share/bootloaders/syslinux_common and moves them
to this new directory.

it also expands the binary_syslinux stage to use it, with it now
constructing the installed set of bootloader files as follows:
 1. copy {LB_DIR}/bootloaders/syslinux_common
 2. copy {LB_DIR}/bootloaders/{syslinux|isolinux|extlinux|pxelinux} on top
 3. copy config/bootloaders/syslinux_common on top
 4. copy config/bootloaders/{syslinux|isolinux|extlinux|pxelinux} on top

note, to explain part of the binary_syslinux change, instead of just
copying the correct bootloader folder full of the files, we now make the
target bootloader specific directory, then copy the contents of source
directories into it.

Gbp-Dch: Short
2020-04-24 18:50:37 +01:00
Raphaël Hertzog 34a72caf49 Synchronize syslinux menu structure with the grub-pc one
* Use same menu labels
* Use same hotkeys
* Get rid of a nested menu that is not present in grub
* Add "menu title" statement to hide the caret of the hotkey (^)
2020-04-24 18:57:03 +02:00
Lyndon Brown 47b0a623dd syslinux: fix lack of top level install option
0bf9d2d390 expanded the set of install
options, whilst also moving them all to a submenu.

it has since been raised that this is not actually what is wanted, that
having an entry for the most common install option is wanted at the top
level, like currently with grub2.

this adds such an entry.

Gbp-Dch: Short
2020-04-24 15:38:55 +00:00
Raphaël Hertzog c6428f44e3 Use correct variable name to detect removal step
Due to this mistake, the helpers were not called in reverse order
during the removal step. This lead to things like "apt update" failing
because a broken /etc/resolv.conf has been restored before the call
to "chroot_archives remove".

Gbp-Dch: Ignore
2020-04-24 17:09:10 +02:00
Lyndon Brown 41ca745b6c syslinux: fix missing hotkeys
for some reason the syslinux folder one had these but not the others.
probably a result of having four separate copies of the files and this
part of the past change to expand the install menus failed to be
duplicated.

Gbp-Dch: Short
2020-04-24 14:43:20 +00:00
Raphaël Hertzog e7df05cd29 Replace "Help" calls with "Man" and get rid of Help 2020-04-24 16:39:10 +02:00
Raphaël Hertzog fac2d8d903 Make "Man" function smarter to also work for "lb --help" 2020-04-24 16:38:45 +02:00
Raphaël Hertzog 55d9b213cf Improve handling of options allowed for "lb" before the sub-command 2020-04-24 16:24:01 +02:00
Raphaël Hertzog 104fa20399 Revert "frontend: properly handle option processing"
This reverts commit 6b7c8ed4bf as it's
breaking multi-value space-separated parameters.
2020-04-24 15:37:13 +02:00
Lyndon Brown 58e0efedc9 config: tidy directory construction and empty directory cleaning 2020-04-24 14:01:47 +01:00
Lyndon Brown 879a9c54ff config: tidy config files 2020-04-24 14:01:41 +01:00
Raphaël Hertzog 440c0b7738 frontend: do no try to look for sub-commands in the PATH
This is a recipe for disaster and it actually already fails when
you pass something that looks like a long option as first argument
because $(which --long-option) will produce an "Illegal option"
string on its standard output.

$ lb --debug config --archive-areas "main contrib non-free"
Illegal option --
/usr/bin/lb: 54: [: Usage:: unexpected operator
E: Unknown command: --debug
2020-04-23 22:30:43 +02:00
Lyndon Brown 10bbb095a8 chroot_resolve: fix broken network connectivity
introduced by an issue with the implementation of
91d446d93e

the introduced of that commit caused builds to fail doing `apt-get update`
or downloading packages and such.

this tweak fixes the problem.

Gbp-Dch: Ignore
2020-04-23 19:53:31 +00:00
Lyndon Brown d79c96232b stagefiles: guard unnecessary chroot removal
just as most scripts are skipped if their stagefile exists (indicating
that they have already been run to completion), including chroot
preparation scripts in install mode, this implements the same guard for
chroot prep remove mode, such that they exit early if their stagefile
does not exist, indicating that the modification has already been removed.
(also override-able by --force in the same way).

this basically just uses a tweaked copy of Check_stagefile().

Gbp-Dch: Short
2020-04-23 18:26:15 +01:00
Lyndon Brown 500f205073 config: s/LIVE_IMAGE_TYPE/LB_IMAGE_TYPE/
no backwards compatibility hack for reading the old var from existing
saved config used because this was previously stored in the alternate
format config/build file.

Gbp-Dch: Short
2020-04-23 16:54:31 +00:00
Lyndon Brown 83d9145257 config: s/LIVE_IMAGE_NAME/LB_IMAGE_NAME/
no backwards compatibility hack for reading the old var from existing
saved config used because this was previously stored in the alternate
format config/build file.

Gbp-Dch: Short
2020-04-23 16:54:31 +00:00
Lyndon Brown 41738b1932 config: s/LIVE_CONFIGURATION_VERSION/LB_CONFIGURATION_VERSION/ 2020-04-23 16:54:31 +00:00
Lyndon Brown cb44c128e0 config: address fixme
these options are not internal, they are user controllable

Gbp-Dch: Short
2020-04-23 16:54:31 +00:00
Lyndon Brown 05b9d4c9ea config: remove obsolete variable 2020-04-23 16:54:31 +00:00
Lyndon Brown c441c39efe config: revert partial format conversion
back in v4.0~a6-1 a transition process was started to move the live-build
config to a new format. the new format was INI style, and required
parsing functions to read/write values, compared to the existing format
which was just shell script code setting variables.

this partial transition is the explanation for the existence of the
`New_configuration()` function, and understanding this is important to
understanding the purpose of it - it is not in fact intended for creating
a new configuration, it is just related to the new config format
transition.

the positives of the new format were that it was somewhat cleaner looking,
while the negative was the terrible relative efficiency.

the file `config/build` was created to hold options in this new format.

the transition was only ever completed for a handful of config options:
 - architecture
 - archive areas and parent archive areas
 - live image name
 - live image type

a 'configuration version' attribute was also saved, which is not used by
anything.

the bootstrap-mirror and parent-bootstrap-mirror attributes are pointlessly
stored in it seemingly resulting from work done in v4.0~a17-1. (they are
also stored in another config file from which the value is actually used).

it in fact seems to have been a source of confusion for Raphaël in
authoring 44b9b0a650, since the new
`[parent]-distribution-{chroot|binary}` options it introduced were stored
both in `config/bootstrap` and in `config/build`, while only used from the
former. i expect, understandably, that he thought that `config/build` was
just an information file.

Gbp-Dch: Short
2020-04-23 16:54:31 +00:00
Lyndon Brown bf63762721 move grub-pc specific code to actual grub-pc script
the grub-pc image creation code has no business being in binary_iso, it
should be in binary_grub-pc.

it should be noted that the binary_iso script did not even have the
necessary package check for grub-mkimage, while binary_grub-pc did have
it, pointlessly.

Gbp-Dch: Short
2020-04-23 15:59:39 +00:00
Lyndon Brown 49794f118f syslinux: use linux/initrd placeholders
enabling improved flexibility for any possible future
path changes.

Gbp-Dch: Ignore
2020-04-23 15:51:57 +00:00
Raphaël Hertzog c3a6e65438 Add updated directives to enable cryptsetup support in initrd
This fixes cryptsetup modules not being installed into initrd with warning:
> cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
>     nor crypto modules. If that's on purpose, you may want to uninstall the
>     'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
>     integration and avoid this warning.

Thanks-to: Marcel Partap
2020-04-23 17:47:12 +02:00
Raphaël Hertzog aa8f8323f7 Fix indentation 2020-04-23 17:46:47 +02:00
Lyndon Brown 6051ce1697 config: create config/bootloaders directory
to help users know that this is where they can put custom bootloader
configs, just as other directories are created for them.

Gbp-Dch: Short
2020-04-23 16:18:47 +01:00
Raphaël Hertzog e2243dbacb binary_syslinux: rely on $LIVE_BUILD_VERSION instead of lb --version 2020-04-23 17:10:25 +02:00
Lyndon Brown fb41c19009 tidy version reported in `lb config --dump`
live-build might be run from a local folder rather than the system
installation, so the dpkg version number should not override the version
picked up from VERSION

if we care about the possibility of the installed package version
potentially differing from the version of the git checkout, or
whatever, then this should be printed alongside it, as now done.

Gbp-Dch: Ignore

[Raphaël Hertzog: tweak to apply on top of my changes]
2020-04-23 17:05:38 +02:00
Raphaël Hertzog e71db2bd58 Fix version computing when LIVE_BUILD is set
It used to rely on the $LIVE_BUILD/VERSION file which is now gone.
Instead we now rely on the debian/changelog file just like we do in the
Makefile.
2020-04-23 17:00:19 +02:00
Raphaël Hertzog 6f7446fa89 Drop the epoch in /usr/share/live/build/VERSION 2020-04-23 16:51:58 +02:00
Raphaël Hertzog 4c75f80e67 Use descriptive parameter names for Usage() 2020-04-23 16:38:59 +02:00
Lyndon Brown b3bba232ac usage: take exit code as param
thus it can correctly indicate success/fail status instead of always
indicating failure. when a user asks for usage with -u|--usage then we
should exit in success mode rather than failure as when usage in printed
in response to incorrect usage.

Gbp-Dch: Short
2020-04-23 16:32:26 +02:00
Lyndon Brown 6b7c8ed4bf frontend: properly handle option processing
this means that the usage goes from:
 lb {-h|--help|-u|--usage|-v|--version}
 lb COMMAND [OPTIONS]

to:
 lb {-h|--help|-u|--usage|-v|--version}
 lb [FRONTEND_OPTIONS] COMMAND [COMMAND_OPTIONS]

though it is probably not worth is to update the description in the
manpages...? hmm...

so for instance this matters for color control with --color|--no-color
(you already had full control via environment vars). previously you could
do `lb COMMAND --no-color` to turn off colour, only to find that output
at the frontend level was still coloured (the option is processed at the
command context level, not the frontend), so you might try to instead use
`lb --no-color COMMAND`, only to find that this was not supported. Well
now it is, and used at the frontend level will fully control colour output
(after the command is processed anyway).

the full set of common options are thus available (except --force) at the
frontend level, and thus for instance all Echo_*() helpers used in the
frontend will work correctly after args are processed.

furthermore usage like `lb --color --help` will actually work. (not that
color is used there, but this previously would have failed with the
frontend treating the `--color` argument as the command; that's the point!)

Gbp-Dch: Short
2020-04-23 16:29:00 +02:00
Lyndon Brown 89e965ccae frontend: change "no such script" to "unknown command"
as far as the user is concerned, 'foo' in `lb foo` is a command; they do
not know or need to know that the commands also correspond to actual
scripts.

Gbp-Dch: Short
2020-04-23 16:09:21 +02:00
Lyndon Brown b28095bd56 frontend: reorder checks
perform the check that the script exists before sorting out the environment
to give it, or checking root privileges.

Gbp-Dch: Short
2020-04-23 16:09:00 +02:00
Lyndon Brown 8ffe48d8f3 rename LB_BOOTSTRAP_QEMU_ARCHITECTURES to LB_BOOTSTRAP_QEMU_ARCHITECTURE 2020-04-23 16:00:34 +02:00
Raphaël Hertzog 047885bf7e Keep LB_ARCHITECTURES environment variable for backwards compatibility
Custom hook scripts may use the variable. And conditional package lists
can also rely on this variable.
2020-04-23 15:58:59 +02:00
Lyndon Brown 6cc7250954 rename LB_ARCHITECTURES to LB_ARCHITECTURE
this was previously not done in 8b109ffb96
to keep the renaming simple, but leaving the variable plural is a cause
for confusion.

since this property is stored in the INI style config/build config file
rather than a shell script based one, at the property there is already
singular, there was no need for a backwards compatibility hack.

Gbp-Dch: Short
2020-04-23 15:54:19 +02:00
Lyndon Brown 6def2c27be fix usage
Gbp-Dch: Ignore
2020-04-23 15:53:30 +02:00
Lyndon Brown 430c48640c move script param capture to before arg processing
makes them consistent with other similar script-specific param handling;
saves the arg processing from dealing with it.

Gbp-Dch: Short
2020-04-23 15:53:12 +02:00
Lyndon Brown f4c8a28a21 config: move control of apt colour
being done in Prepare_config() meant that it would get saved into the
config stored on disk which is not what was intended.

being saved on disk is not a big problem, since the injection of the
dynamically determined option is always done on top of the value read
from the saved config anyway, so you'd always end up with two copies of
the option given to apt, the first being from the saved config, the second
being the more correct dynamically determined one, overriding the first.

so there is no functional change here, just better achieving what was
intended.

Gbp-Dch: Ignore
2020-04-23 15:52:32 +02:00
Lyndon Brown faa51b83c5 config: fix mistake in mirror url tidying
Gbp-Dch: Ignore
2020-04-23 15:51:53 +02:00
Lyndon Brown ba05247438 chroot: make var local
Gbp-Dch: Short
2020-04-23 15:47:00 +02:00
Lyndon Brown 3d2b280c8f firmware: robustify and simplify archive area checking 2020-04-23 15:46:43 +02:00
Lyndon Brown 9a91ca9fde config: obsolete old --tasksel option
note that the bit of code removed from source_debian relies upon a
variable LB_TASKS which itself is an old leftover artefact from before
v4.0.

Gbp-Dch: Short
2020-04-23 15:46:06 +02:00
Lyndon Brown c1dd191a53 manpage: fix typo and simplify --net-tarball option description 2020-04-23 15:45:00 +02:00
Raphaël Hertzog d414b8fcdb config: obsolete --net-root-path 2020-04-23 15:44:17 +02:00
Lyndon Brown 1ca53bff52 config: obsolete --net-root-* options (except one)
--net-root-path probably needs to go too, but it is being used for
something i don't fully understand currently.

Gbp-Dch: Short
2020-04-23 15:30:41 +02:00
Lyndon Brown 1eee15e852 config: obsolete unused --net-cow-* options 2020-04-23 15:24:50 +02:00
Lyndon Brown 87b995597c config: obsolete unused --isohybrid-options option 2020-04-23 15:24:10 +02:00
Lyndon Brown c3f0d39675 config: apt-get should probably be an allowed and documented --apt value
since everywhere where 'apt' is a permitted value, 'apt-get' is also, it
just wasn't listed in the option's documentation and thus was also not
listed in the new validation check.

Gbp-Dch: Short
2020-04-23 15:23:30 +02:00
Lyndon Brown c57b8679a4 config: fix broken backwards compatibility hack
80aa5ab611 implemented a hack to handle
replacement of LB_LINUX_FLAVOURS with LB_LINUX_FLAVOURS_WITH_ARCH in
config files, but implemented it in the wrong place.

adding a conditional conversion within the config file meant that the old
value would only be read from **new** config files that are created
obviously without it, including re-saved configs if `lb config` were
re-run with additional options (not recommended). any existing value in an
existing config file would actually be ignored.

the right place to read the old value was in the Set_defaults() function
(since renamed).

a second issue also existed with the hack, it failed to excape the `$`
and thus printed the existing value of $LB_LINUX_FLAVOURS into the
conditional check being constructed in the config file, instead of
printing the name of the variable. the check embedded into the config
file thus became this on an amd64 machine:
```
if [ -n "amd64" ]
then
	LB_LINUX_FLAVOURS_WITH_ARCH="amd64"
fi
```
which is clearly not what was intended.

Gbp-Dch: Short
2020-04-23 15:23:15 +02:00
Lyndon Brown 3645719f22 config: stop writing 'default: <foo>' lines to config files
while helpful for users to know the defaults, the values printed as the
supposed defaults for most are actually the same values as being
configured, or in some cases a piece of text "autodetected or empty", and
thus the information is completely wrong and actually unhelpful since it
misinforms the user.

fixing this to give the real defaults is very much non-trivial.

as a workaround users wanting to know the default for an option can always:
 a. use `lb config` wit no options (or auto) in a clean directory and thus
    get a config with all defaults.
 b. look at the live-build code.

if they just want to reset an option, they can also just comment it out.

Gbp-Dch: Short
Closes: #904614
2020-04-23 15:16:46 +02:00
Lyndon Brown eb2eb9b51e installer: rework validation check for installer type
(and move the wget options setting down where it should be while at it)

the value of LB_DEBIAN_INSTALLER is now properly checked in the main
validation routine, so we can just directly exit here as a simple safety
check should validation be bypassed.

Gbp-Dch: Short
2020-04-23 15:16:26 +02:00
Lyndon Brown 9ab7a100da config: add missing deprecation warning
Gbp-Dch: Ignore
2020-04-23 15:14:16 +02:00
Lyndon Brown 780ce25288 config: minor reorganisation
Gbp-Dch: Ignore
2020-04-23 15:13:33 +02:00
Lyndon Brown cd68a4f61f config: strip unhelpful comments
Gbp-Dch: Ignore
2020-04-23 15:12:17 +02:00
Lyndon Brown 2d272fff5c config: expand validation coverage
to cover checking available value choices

Gbp-Dch: Short
2020-04-23 15:11:50 +02:00
Lyndon Brown 46bce5a6d1 config: reorganise validation checks
splitting into two parts will make things much tidier

Gbp-Dch: Short
2020-04-23 15:09:56 +02:00
Lyndon Brown 554a8d1108 tidy up grub bootloader compatibility checking
- add a validation check where an error will be printed
 - replace the check done in the grub scripts with one that simple exits
   if executed bypassing the validation check

Gbp-Dch: Short
2020-04-23 15:08:07 +02:00
Lyndon Brown 9b70092f25 config: tidy validation 2020-04-23 15:04:51 +02:00
Lyndon Brown 39572ccf3f config: merge defaults.sh and configuration.sh, part 2
...and second we then change the filename

Gbp-Dch: Short
2020-04-23 15:02:43 +02:00
Lyndon Brown 2d877a2cb9 config: merge defaults.sh and configuration.sh, part 1
the stuff in defaults.sh is only partially to do with setting default
config values, it also does other prep work like centralised comma
separated value to space separated conversion, and validation.

this is split into two parts to keep the diff simple, first we move the
two small functions from configuration.sh into default.sh...

Gbp-Dch: Short
2020-04-23 15:02:38 +02:00
Lyndon Brown 34c3f79be4 config: better handle error condition
Gbp-Dch: Ignore
2020-04-23 15:02:14 +02:00
Lyndon Brown 576ec6165a config: reorganise the option case block
move away from the somewhat config file grouping based organisation to
an alphabetised list, after grouping into script-specific; general;
build-specific and other.

the config file based organisation was a bad choice, making it hard to
find the right place to insert options for instance.

Gbp-Dch: Short
2020-04-23 15:01:48 +02:00
Lyndon Brown 6c51a80e99 config: organise getopt longoption set
alphabetised per line lists, broken up into multiple lines where exceeding
80 chars.

Gbp-Dch: Short
2020-04-23 15:00:18 +02:00
Lyndon Brown 51f6f2e41d config: remove spurious secondary validation check
it is already done just before writing the config to disk; this check is
happening just after doing so and is thus pointless.

Gbp-Dch: Short
2020-04-23 14:59:47 +02:00
Lyndon Brown f8a401f068 config: add --validate option
running `lb config --validate` causes the script to stop after running
the validation check on the config compiled at that point, prior to
writing the config to disk.

this gives users the ability to check the validity of a config without
modifying or rewriting the saved config.

note that if users provide new config options alongside --validate, these
are taken into account in the check performed.

the 'check complete' message will not be seen if an error is reported by
the check function, while it will be seen if only warnings are given, but
it would require a redesign of the validation check function to make any
improvement in that area, and it's perhaps not worth it.

Gbp-Dch: Short
2020-04-23 14:53:06 +02:00
Lyndon Brown 5fb790e43e config: rename Set_config_defaults() to Prepare_config()
it mostly applies defaults where a value does not exist, but does more in
some cases. the new name better reflects its usage and functionality.

Gbp-Dch: Short
2020-04-23 14:52:20 +02:00
Lyndon Brown 7de8a0faa7 config: rename Check_config_defaults() to Validate_config()
this is used after applying user settings on top of the defaults,
so is not specific to checking defaults; it's a validation checker.

Gbp-Dch: Short
2020-04-23 14:51:58 +02:00
Lyndon Brown 430fdc3040 config: move defaults set in wrong function
Gbp-Dch: Ignore
2020-04-23 14:51:28 +02:00
Lyndon Brown 39e4d3e3cb --binary-images can support only a single type
whilst some parts of the codebase were set up to work with multiple types
specified, others did not work with it and would not necessarily be easy
to adjust. this thus makes some tweaks to adjust things accordingly.

 - option renamed to singular form (maintaining backwards compatibility)
 - a validation check has been added
 - unnecessary glob style type references fixed
 - checks with In_list changed to a direct singular comparison
 - typo of type "netboot" written as just "net" fixed (though unreachable
   so of no consequence; really the code could be removed but it's trivial)

Gbp-Dch: Short
2020-04-23 14:51:09 +02:00
Lyndon Brown cede584a5c manpages: fix typo
Closes: #926238
2020-04-23 11:52:13 +01:00
Lyndon Brown 920ec1605b manpages: fix typo
bad escape, '-\' should have been '\-'

resulted in test showing "--mirror-tstrap" instead of "--mirror-bootstrap"

Gbp-Dch: Ignore
2020-04-23 11:52:13 +01:00
Lyndon Brown 4dc91c4007 manpages: remove unhelpful and largely obsolete fixme notices 2020-04-23 11:52:13 +01:00
Lyndon Brown 6b734df9f3 fix incorrect handling of -c|--conffile
this option actually only has an impact when used for `lb config`; it thus
was incorrectly accepted and captured by Arguments() and the documentation
was wrong.

going back through git history, this has been incorrect since the v0.99 days.

also, reorganised the list alphabetically (no-color was inserted in the
wrong place).

Gbp-Dch: Short
2020-04-23 11:52:13 +01:00
Lyndon Brown e4134e1583 manpages: fixup synopsis
live-build page: list of individual commands outdated (color options not
added); incorrect (conffile is `lb config` specific as to be addressed
otherwise separately); is unnecessary here; and the synopsis suggests
usage without a command (e.g. `lb --help` is wrong when it is not).

lb: consistensy fix in formatting.

all: placeholders should be in capitals for consistency; "OPTIONS" is
better the "live-build options" as a placeholder.

config: unlike the others where "live-build options" is replaced with
"OPTIONS", it makes more sense to specifically list the info (help; usage;
version} options, since below the full list of other options including
other generic options are given.

Gbp-Dch: Short
2020-04-23 11:52:13 +01:00
Lyndon Brown 3547c66669 manpages: fix mistake
Gbp-Dch: Ignore
2020-04-23 11:52:13 +01:00
Lyndon Brown db5188aa99 config: support comma and space separated list of source image types 2020-04-23 11:52:13 +01:00
Lyndon Brown 19eccf0108 manpages: document that multiple source image types can be requested
the same is not the case for binary images since although some parts
of the codebase support it, others do not.

Gbp-Dch: Short
2020-04-23 11:52:13 +01:00
Lyndon Brown 3428cb36a7 manpages: revise documentation of --linux-packages
including documenting use of the value "none"

Gbp-Dch: Short
2020-04-23 11:52:13 +01:00
Lyndon Brown 233be38de4 manpages: document that --linux-flavours is space separated 2020-04-23 11:52:13 +01:00
Lyndon Brown b77c3f3b0b manpages: fix typo
"more than that" -> "more than one"

Gbp-Dch: Ignore
2020-04-23 11:52:13 +01:00
Lyndon Brown fcdb3e8eea manpages: document space separation for --keyring-packages 2020-04-23 11:52:13 +01:00
Lyndon Brown 997c978c0e manpages: document all values for --interactive 2020-04-23 11:52:13 +01:00
Lyndon Brown d38a097809 config: support comma or space separated archive area lists 2020-04-23 11:52:13 +01:00
Lyndon Brown 673b811627 config: support both comma and space separated to-cache stages 2020-04-23 11:52:13 +01:00
Lyndon Brown 9abdf31d9f manpage: document that multiple stages to cache should be space separated 2020-04-23 11:52:13 +01:00
Lyndon Brown 9b61541ef1 manpage: fix consistency issues
- in underlining option parameters
 - in some cases of single or multiple (quoted + space separated) values

Gbp-Dch: Ignore
2020-04-23 11:52:13 +01:00
Lyndon Brown b833eb3650 manpages: indicate in usage that multiple bootloaders can be given
Gbp-Dch: Ignore
2020-04-23 11:52:13 +01:00
Lyndon Brown f73797158e bootloaders: improve bootloader list handling
two parts of the code worked with both comma and space separated lists,
while two others only worked with comma separated.

swapping out commas with spaces when we setup the var in
Set_config_defaults() means that individual scripts no longer need to worry
about it and everything supports both; and that we can avoid the
IFS/OLDIFS mess.

Gbp-Dch: Short
2020-04-23 11:52:04 +01:00
Lyndon Brown ae9143141d manpages: fix mistake
the bootloader list should be comma separated not space. i do not know
what possessed me to write space based in
aed4e0fef2.

fix "booloader" typo while at it.

Gbp-Dch: Ignore
2020-04-23 11:46:36 +01:00
Lyndon Brown 286caf03be fix outdated grub-legacy bootloader name references 2020-04-23 11:46:36 +01:00
Lyndon Brown da57ad77b9 manpage: document that multiple archive areas should be space separated 2020-04-23 11:46:36 +01:00
Lyndon Brown 91d446d93e Fix permissions & ownership of copied /etc/resolv.conf
Closes: #857740

[tweaked by Raphaël Hertzog to fix the chown root:root call]
2020-04-23 12:20:35 +02:00
Lyndon Brown 6fa4b5bae9 binary_hdd: fix variable name typo 2020-04-23 10:14:55 +00:00
Lyndon Brown 9fb3d69046 config: fix wrong saved value for parent archive areas 2020-04-23 10:13:21 +00:00
Lyndon Brown 1a0c813c46 chroot_apt: fix broken removal 2020-04-23 10:05:51 +00:00
Lyndon Brown affcbb95d1 chroot_apt: improve readability 2020-04-23 10:05:51 +00:00
Lyndon Brown 7d46dd81fc chroot_dpkg: remove redundant chmod
left over from before using `ln` to setup the diversion

Gbp-Dch: Ignore
2020-04-23 09:57:25 +00:00
Lyndon Brown 8b1f9f0131 frontend: fix use of config/environment[.binary]
the environment variables when held in a variable need to be used via
`env` otherwise you get command not found errors.

example:
```
$ echo "AA=aa" > config/environment
$ lb config
/usr/bin/lb: 83: AA=aa: not found
$ ENV="AA=aa"
$ ${ENV} true
bash: AA=aa: command not found
$ "${ENV}" true
bash: AA=aa: command not found
$ env ${ENV} true
```

Gbp-Dch: Short
2020-04-23 09:56:13 +00:00
Lyndon Brown 04c5aae0a9 chroot_prep: warn if running archives helper for bootstrap stage
to protect against simple mistake of using 'all' instead of
'all-except-archives' when manually executing scripts (e.g. during
development) at the bootstrap stage level. (the bootstrap stage does not
and should not use the archives helper).

Gbp-Dch: Ignore
2020-04-23 09:38:02 +00:00
Lyndon Brown d171426ae4 binary_rootfs: use new chroot_prep helper 2020-04-23 09:38:02 +00:00
Lyndon Brown f24ed6ba3e binary_rootfs: fix missing handling of chroot_tmpfs 2020-04-23 09:38:02 +00:00
Lyndon Brown 78b03ce8a3 bootstrap_archives: remove useless param 2020-04-23 09:38:02 +00:00
Lyndon Brown 38a5aed0dc chroot_prep: expand coverage
it now covers:
 - `lb chroot_apt install-binary`
 - `lb chroot_archives {chroot|binary|source} {install|remove}`

by expanding usage from:
`lb chroot_prep {install|remove} HELPERS [ARGS]`
to:
`lb chroot_prep {install|remove} HELPERS [MODE[ MODE..]] [ARGS]`

where `[MODE[ MODE..]]` is an optional set of one or more of:
 - archives-chroot, which specifies to use 'chroot' as the first param to
   the chroot_archives script
 - archives-binary, which specifies to use 'binary'
 - archives-source, which specifies to use 'source'
 - apt-install-binary, which specified to pass 'install-binary' instead of
   'install' to chroot_apt

thus _all_ chroot prep scripts can be run through this helper now!

note, in the case of the binary stage, 'archives' is deliberately not added
to CHROOT_PREP_OTHER, this is not a mistake!

Gbp-Dch: Short
2020-04-23 09:38:02 +00:00
Lyndon Brown 1f63c620f0 binary: add missing use of chroot_tmpfs 2020-04-23 09:38:02 +00:00
Lyndon Brown e22bd27170 add bulk chroot preparation script execution helper
rather than explicitly running one helper after another in the major
build stages, or by hand (e.g. while testing things during development),
they can be run in bulk via this new helper. it essentially just takes a
list of helpers to run and runs them one by one.

it supports running all helpers except chroot_archives because that one
has different parameter requirements to the rest and supporting it would
make things messier.

helper scripts can either be named by their full script name or without
the 'chroot_' prefix for brevity. you can also just specify 'all' to
refer to all helpers (except chroot_archives, per above).

it automatically reverses the order of the list when run in remove mode.

Gbp-Dch: Short
2020-04-23 09:38:02 +00:00
Lyndon Brown fc88358b29 binary: remove useless execution of `lb chroot_debianchroot remove`
it was not run in install mode so should not be run in remove mode.

(whether it should in fact be run in install mode is another question; as
is whether chroot_tmpfs should be being used)

Gbp-Dch: Short
2020-04-23 09:38:02 +00:00
Lyndon Brown 8c0e802d13 remove some unwanted quoting of list parameters
there are additional instances in binary_* scripts that are left here
because they are covered by changes in MR #157

Gbp-Dch: Short
2020-04-23 09:38:01 +00:00
Lyndon Brown 11836c0c18 fix $@ parameter expansion issues
$@ when unquoted is subject to further word splitting. this fixes a bunch
of instances where it was incorrectly being used unquoted.

Gbp-Dch: Short
2020-04-23 09:38:01 +00:00
Lyndon Brown f6a50b6db2 packages: remove auto-installed on removal
i've been noticing that in the binary_syslinux stage a wholebunch of
packages get installed whilst installing isolinux, and then upon removing
the installed packages at the end of the script, apt is listing a large
number of those that were auto installed as no longer in use and can be
removed via `apt autoremove`. this then persists through package
installation and removal steps throughout remaining scripts.

adding `--auto-remove` to `apt-get remove --purge` and similarly
`--purge-unused` to `aptitude purge` instructs apt to get rid of the unused
auto-installed packages at the same time as removing specific package that
brought them in in the first place, and thus resolves the problem.

Gbp-Dch: Short
2020-04-23 09:25:17 +00:00
jnqnfe 958251da67 binary_iso: remove duplicate copying of grub binaries
these files are already copied into place in the binary_grub-pc script.

Gbp-Dch: Short
2020-04-23 10:56:51 +02:00
Lyndon Brown 1517861c3e grub-pc: fix broken boot capability
Closes: #956131
2020-04-23 10:56:51 +02:00
adrian15 9220bde3df grub-efi: fix partial broken boot capability
when used alongside syslinux and when a single kernel flavour is used,
things work correctly. otherwise booting from EFI is broken.

the problem comes from the fact that syslinux, for a single kernel flavour
creates the file /live/vmlinuz, which is used by the minimal EFI grub.cfg
to locate the device and partition containing the live image. when multiple
kernel flavours are used, it instead creates /live/vmlinuz1, /live/vmlinuz2,
etc. which thus is a problem. similarly when syslinux is not used, you are
left only with long filenames for the kernel files, for example
/live/vmlinuz-4.19.0-8-amd64. in these situations grub cannot find the
device containing the image and thus fails to display the boot menu.

the solution here, instead of dynamically changing the filename searched
for depending upon bootloader configuration, switches to doing a search for
the file /.disk/info instead. this file is generated by binary_disk, and
is present for iso, iso-hybrid and hdd images types, though grub-efi cannot
be used for the hdd type. it is not created for the netboot type, but again,
grub-efi is not compatible with that anyway. it is not created for the tar
type, which the grub-efi script does not block as incompatible, but is this
not a mistake?

furthermore, switching to searching for /.disk/info helps avoid issues for
systems that happen to actually include a real /live/vmlinuz path other
than on a removable live disk or CD/DVD, as is the case with a HP system
discussed in #924053.

this patch was written by adrian15sgd@gmail.com, as per the authorship,
who attached it to the #924053 bug discussion. this commit message however
has been re-written by jnqnfe@gmail.com, prior to submission via an MR,
as part of the fix towards the issues reported in #956131.

Gbp-Dch: Short
Closes: #924053
2020-04-23 10:56:51 +02:00
Lyndon Brown 46b0d85021 grub2|loopback: avoid empty submenu
don't include the advanced menu at all if it's only entry - memtest - is
not included (you just get a menu entry that does nothing, which may
confused users into thinking that something is broken, as opposed to
showing an empty submenu as i expected).

Gbp-Dch: Short
2020-04-23 10:18:43 +02:00
Lyndon Brown 5ac625e3e1 grub2|loopback: define common target
Gbp-Dch: Ignore
2020-04-23 10:18:41 +02:00
Lyndon Brown 077d005a84 grub2|loopback: extract memtest menu entry creation to config file
backwards compatibility:

 1. the new file will be included alongside any user custom config
 2. rather than replace MEMTEST with an actual config entry, we replace it
    with a line to import the content of the new file, and thus will work
    just as before.

thus no backwards compatible breakage

Gbp-Dch: Short
2020-04-23 09:59:56 +02:00
Lyndon Brown 69093d9e3b grub2|loopback: extract install menu entries to config files
backwards compatibility:

 1. the new install.cfg and install_start.cfg files (chosen
    automatically from the install_*gui.cfg and install_*test.cfg
    files) will be included alongside any user custom config.
 2. the placeholders are now replaced with lines importing these files

thus everything will work just as before, i.e. no backwards
compatibility breakage.

Gbp-Dch: Short
2020-04-23 09:59:56 +02:00
Lyndon Brown 1f1b156697 grub2|loopback: move copying of files earlier
necessary for changes in followup commits.

Gbp-Dch: Short
2020-04-23 09:59:56 +02:00
Lyndon Brown 24658ce542 syslinux: overwrite default files with user ones
as just done for grub2|loopback

the primary benefit here is that it means that user configs do not
have to carry copies of all files; they just carry the ones they
want to replace (or add).

Gbp-Dch: Short
2020-04-23 09:59:56 +02:00
Lyndon Brown 81adab8555 syslinux: simplification
`$_SOURCE` is always composed of `<foo>/${_BOOTLOADER}`, so we can just use
`${_BOOTLOADER}` as the basename, without calling `basename ${_SOURCE}`

Gbp-Dch: Ignore
2020-04-23 09:59:56 +02:00
Lyndon Brown e5b2b56c7c grub2|loopback: overwrite default files with user ones
...rather than choosing between the default set and a user provided set

 1. ensures backwards compatibility after we switch from generation of
    certain content to that content being in pre-prepared config files,
    and thus no longer writing that config out to existing files.
 2. means that user configs do not have to carry copies of all files; they
    just carry the ones they want to replace (or add).

Gbp-Dch: Short
2020-04-23 09:59:56 +02:00
Lyndon Brown 457e800c94 grub2|loopback: move advanced installer entries under own submenu
this takes a step forward in moving towards the same updated layout as
with syslinux; here we get:

 - <live entries>
 - Start installer
 - Advanced install options...
    - <full set of install options>
 - Advanced options...
    - Memory Diagnostic Tool (memtest86[+])

note that this only affects the default menu. custom configs are not
affected by this change.

further steps to complete the move to the updated layout will follow
later.

"Advanced options..." should perhaps be renamed later.

Gbp-Dch: Short
2020-04-23 09:59:51 +02:00
Lyndon Brown 33af87e047 grub2|loopback: improve memtest label
make it consistent with syslinux

Gbp-Dch: Short
2020-04-23 09:12:52 +02:00
Lyndon Brown 96285a0e70 grub2|loopback: add hotkeys for some installer entries
an official current debian install disc was compared with to achieve
better consistency.

main menu:
 - i: for the single "start" entry

advanced submenu:
 - g: for the main graphical entry
 - i: for the main text-based entry
 - x: for the main expert entry
 - a: for the main auto entry
 - r: for the main rescue entry
 - s: for the synth entry

for expert, auto and rescue, the hotkey is given to the graphical entry
where present, otherwise to the text entry.

Gbp-Dch: Short
2020-04-23 09:12:52 +02:00
Lyndon Brown 04a0ffb2f4 grub2|loopback: add hotkey for advanced options submenu (a) 2020-04-23 09:12:52 +02:00
Lyndon Brown c2eb40d9b1 grub2|loopback: add hotkey for memtest (m) 2020-04-23 09:12:52 +02:00
Lyndon Brown 89d72410c4 grub2|loopback: add hotkey for single kernel live entry (l) 2020-04-23 09:12:52 +02:00
Lyndon Brown 6e86a6480c grub2|loopback: allow providing hotkey to menu entry creation helpers 2020-04-23 09:12:52 +02:00
Lyndon Brown 40a076bf35 grub2|loopback: use '@' bookended placeholders
...for consistency with syslinux config placeholders and improved
clarity of what text is a placeholder.

the old placeholders without the bookends are still replaced for
user configs for backwards compatibility.

the new ones are little used just at the moment but are expected to
become used much more in later commits.

Gbp-Dch: Short
2020-04-23 09:12:24 +02:00
Lyndon Brown d5d1e35f22 grub2|loopback: remove unnecessary perl based newline escaping for sed
none of the stuff changed here is multi-line so had no reason to use it.

Gbp-Dch: Short
2020-04-22 18:36:47 +02:00
Lyndon Brown bbeed4cb60 build: fix misleading message 2020-04-20 10:16:14 +00:00
Lyndon Brown f0588be19a loadlin: fix missing directory error
fixes an error I experienced in a test build

Gbp-Dch: Short
2020-04-01 19:04:14 +00:00
Lyndon Brown 1716958a8d bootstrap_cache: validate action param 2020-04-01 18:03:20 +00:00
jnqnfe 314ca3d56a bootloaders: replace use of vga=normal with vga=788 in live menu entries
For consistency with install entries (both in live-build and
official Debian install discs).

Comparing with live-build created installer entries, grub-legacy
and grub2 both favour vga-788 for GUI entries and vga=normal for
test entries, whilst syslinux uses vga-788 for everything.

Gbp-Dch: Short
2020-04-01 15:25:32 +00:00
Lyndon Brown a32519a84a manpages: fix missing mention of stage
Gbp-Dch: Ignore
2020-03-28 01:11:09 +00:00
Lyndon Brown 3c4d07ff18 apt: use its new colour support
apt v2.0.1 introduced support for coloured E:/W:/N: labels. this adds
support to control it based upon our own colour control.

note that with utilities like dpkg we do not do this, but apt only uses
its new colour support automatically when `apt` is used directly, it is
not automatically enabled (per isatty()) for `apt-get`/`aptitude` (the
`apt` developer responsible for adding colour support in response to my
request for it told me that it was deliberately done like this per being
customary to not change behaviour of those tools for compatibility
reasons). colour errors/warnings are useful, so we want to turn it on for
our use of these tools where we can.

Gbp-Dch: Short
2020-03-27 21:05:52 +00:00
Lyndon Brown 8775c8075c syslinux: properly fix shortcut caret appearing in menu entries
this reverts commit 0cef87ffca though
retaining the 'advanced options' menu entry using a label rather than a
title.

despite having done a lot of testing back in 2015 with my bootloader
improvements, i notice now that in fact the syslinux caret fix has an
undesired side effect of modifying the title displayed above the menus. it
does not help that the text embedded into the splash overlaps with this
menu title; perhaps this explains why i missed this problem back in 2015.

purely reverting the implemented fix solves this title problem, but
restores the caret problem to the advanced options menu (in menu.cfg);
however that menu was using a caret in a title entry, unlike everywhere
else where they are only used with labels, which must have been the
original source of the problem all along. ensuring that this menu uses a
label instead of a title in this reversion leaves everything working
correctly afaict.

Gbp-Dch: Ignore
2020-03-25 01:25:50 +00:00
Lyndon Brown 36092f1cb8 highlight commands in script execution
makes reviewing logs in terminal output MUCH more pleasant and efficient

Gbp-Dch: Short
2020-03-23 08:06:51 +00:00
Lyndon Brown 39dae8cdc7 move auto colouring decision
...from the `Set_config_defaults` function, to being done directly
in `build.sh` (the component which is also responsible for loading
functions, loaded at the start of every script, including the front
end).

thus the colouring decision will now correctly...
 - apply to the frontend, such as to the 'root privileges needed'
   error, the 'no such script' error, and the command name
   colouring that I want to add (the most significant issue).
 - apply to error messages generated by the `Arguments` and
   `Read_conffiles` functions, which are called before
   `Set_config_defaults` by scripts.

as things were, due to the comparison with "false", colour would
_always_ be used in these places (unless _COLOR_ERR=false or
_COLOR_OUT=false wrt. the new command highlight, were set in the
environment when executing a script throught the frontend).

this would not be a problem for normal terminal use of course,
besides being inconsistent where color were turned off, but would
be a bit of a problem if redirected to a file.

a re-evaluation of _COLOR is performed in `Set_config_defaults` to
adjust _COLOR_OUT and _COLOR_ERR where necessary, to correctly
respond to _COLOR being set in saved config files (disabled by
default but a user could always enable), after the point of config
files being loaded.

_COLOR can still be controlled from the environment just as before,
overriding both _COLOR_OUT and _COLOR_ERR.

note that this does not address the fact that --color|--no-color
do not work in the frontend and thus will not impact the colouring
of to-be-introduced command highlighting. this needs to be
addressed separately.

Gbp-Dch: Short
2020-03-23 08:06:51 +00:00
Lyndon Brown 85e0681ee8 args: fix a typo
Gbp-Dch: Ignore
2020-03-23 08:06:51 +00:00
jnqnfe a25b77e099 bootloaders: remove old "video=vesa:ywrap,mtrr" kernel param, as done in d-i
d-i removed this in commit 0917b2dde3ff73a204d27dd2f2fffc8a41175ddd

Note: There was inconsistency between grub and syslinux in use of this, with
syslinux not having it on graphical rescue and auto modes while grub entries
did. The patch to fix that has been dropped since we're removing it everywhere
anyway.

(#395040)

Gbp-Dch: Short
2020-03-22 19:43:56 +00:00
Lyndon Brown 49047f0563 manpages: stage clarifications
Gbp-Dch: Ignore
2020-03-20 17:25:09 +00:00
Lyndon Brown 35e622651d manpages: clarify `lb config` notes 2020-03-20 17:25:09 +00:00
Lyndon Brown a56fe5e40b manpages: grammar
"each" -> "each time"

Gbp-Dch: Ignore
2020-03-20 17:25:09 +00:00
Lyndon Brown e1de6bcbf5 manpages: add missing mention of --color|---no-color 2020-03-20 17:25:09 +00:00
Lyndon Brown 757d1e6b48 binary_iso: remove duplicate xorriso param
-J is already in the generic set defined at the start

Gbp-Dch: Short
2020-03-20 16:17:16 +00:00
Luca Boccassi c1f630ca9f autopkgtest: build kali image 2020-03-20 15:36:52 +00:00
Lyndon Brown 92425bd99c archives: param is required
Gbp-Dch: Ignore
2020-03-20 11:43:01 +00:00
Lyndon Brown 7c4de2f20d archives: clarify var
Gbp-Dch: Ignore
2020-03-20 11:43:01 +00:00
Lyndon Brown 94a3e184c2 archives: explicitly pass along _PASS to Create_apt_sources_list
Gbp-Dch: Ignore
2020-03-20 11:43:01 +00:00
Lyndon Brown 29d9c23cd2 defaults: enable d-i GUI for all 2020-03-20 10:19:33 +00:00
Lyndon Brown c534ff52a4 defaults: ensure labels have defaults for derivatives 2020-03-20 10:19:33 +00:00
Lyndon Brown 2c14566c69 defaults: tidy mirrors 2020-03-20 10:19:33 +00:00
Lyndon Brown 945a166f75 strip progress-linux distro hacks
progress-linux, as discussed in MR #142 ([1]) is a little known distro,
which appears to be little more than a personal project of the original
author of live-build.

given that, the expense of maintaining all of these old hacks for it
cannot be justified. it is not known whether or not live-build is even
used with respect to it since the author abandoned live-build some
years ago.

also, at least one past change in live-build possibly broke progress-linux
compatibility anyway, which would have required progress-linux users of
live-build to use a custom progress-linux config, or a progress-linux
fork of live-build, and there is no knowing how much of the hacks in this
"upstream" codebase any user of progress-linux currently relies upon.
and again, progress-linux appears to just be a personal project of
Daniel's, with afaik very little userbase. (Daniel seems to be the only
developer working on the project which speaks to how small it is).

[1]: https://salsa.debian.org/live-team/live-build/-/merge_requests/142

Gbp-Dch: Short
2020-03-20 10:19:33 +00:00
Lyndon Brown d6a80d3d4d defaults: purge long unused LB_ROOT
seems to have been obsolete since all the way back at v1.0~a22-1.

history:
 - in 0d0de885e3 it was renamed from
   LIVE_ROOT to LH_ROOT, but also seems to have become completely
   obsolete at this point, and thus mistakenly not actually removed.
   before this it seems to have been used to hold the base directory of
   live-build from which paths were constructed, but then this use was
   removed making it redundant, but it remained in the code.
 - 83bc63f725 renamed to LB_ROOT.
 - a79a5bea10 dropped setting the variable
   only if not already set, in favour of always setting it depending upon
   LB_MODE. but still it remained unused.

Gbp-Dch: Short
2020-03-20 10:19:33 +00:00
jnqnfe 4fa83598a3 grub: remove old and unused splash code
The LB_GRUB_SPLASH variable is populated by the --grub-splash param
but is not actually used for anything.

Gbp-Dch: Short
2020-03-20 10:02:52 +00:00
Lyndon Brown 01a6de2f4c config: fix backwards compatibility break
when the --fdisk and --losetup options were removed, the entries in the
getopt option list should have remained for backwards compatibility such
that the usage warnings can kick in instead of unknown option errors.

Gbp-Dch: Ignore
2020-03-20 09:28:58 +00:00
Lyndon Brown 561f2dcc3a config: fix incomplete rename of --architectures
missed the getopt data update in 8b109ffb96

Gbp-Dch: Ignore
2020-03-20 09:28:58 +00:00
Lyndon Brown d1fcfa339e frontend: just directly call Usage on missing `man` 2020-03-20 09:04:41 +00:00
Lyndon Brown 3d30597e93 frontend: avoid trying to load /scripts/build.sh
unless `LIVE_BUILD` is set in the environment when running live-build,
this var will be empty. this will result in the frontend trying to load
the file '/scripts/build.sh', which is doubtful the file intended to be
loaded, if it exists. the intention of checking the path
"${LIVE_BUILD}/scripts/build.sh" is really only to do so if the var is
actually used, so let's only do so if it's non-empty.

since we use `set -e`, if build.sh is not found in either location then
failure will occur. if it is found, presuming it is the real file that we
expect to be found, this file sets the var to a default if it was an empty
string, thus we need not worry about use of the var later in the frontend
script.

also, the var is exported prior to exec'ing the command script, so we know
that in the command scripts it is not going to be empty, and those in
themselves loading build.sh which again exports the var ensures that it
will be set for subsequent loads of component scripts (which happens to
go through the frontend again, not that that matters. so except for at the
start of execution, it should never be found to be empty.

Gbp-Dch: Short
2020-03-20 08:36:17 +00:00
Lyndon Brown 0e090a65e3 fix -h|--help component script man page redirection
the frontend handles -h|--help directly and correctly redirects to the
man page.

component scripts however fail to load the correct manpage because they
are being directed to `man <script>` instead of `man lb script`.

(affects the top level commands and major build stages which actually have
man pages; the low level components don't and so will always fail anyway).
2020-03-19 22:42:01 +00:00
Lyndon Brown 406accfab9 defaults: remove redundant setting of LIVE_BUILD
this is handled for every script in build.sh. this is not stored in the
saved config or anything, so no need to re-evaluate in
`Set_config_defaults`. this just seems to completely pointless.

Gbp-Dch: Short
2020-03-19 16:33:25 +00:00
Lyndon Brown b7896564c5 defaults: bump checksums to stronger form
md5 & sha1 are not considered secure anymore and thus are of questionable
value here if checksums are wanted.

Gbp-Dch: Short
2020-03-18 14:47:22 +00:00
Raphaël Hertzog bdffaebe12 Minor cleanups in Require_stagefiles 2020-03-18 09:37:22 +01:00
Lyndon Brown fb0790cc43 stagefiles: s/Require_stagefile/Require_stagefiles/
this function takes one or more required stage fileS _plural_, and exits
if any are missing (or at least it does now after the refactor).

let's rename it to make things more clear

Gbp-Dch: Short
2020-03-17 22:59:37 +00:00
Lyndon Brown fe0d2358b9 stagefiles: only list missing stages 2020-03-17 22:59:34 +00:00
Lyndon Brown 3bed138fda stagefiles: avoid stagename in required error
the name of the stage is already printed earlier in the output prior to
the error here being printed. so the error really does not need to include
the script name itself.
2020-03-17 22:57:09 +00:00
Lyndon Brown ea0f6b7810 stagefiles: fix completely wrong require-stages logic
now having investigated my suspicions of the functionality and use of
Require_stagefile(), i conclude that it has been fundamentally broken
all the way back to v1.0~a8-1 (or at least usage of it since v1.0.1-2).

gah. (╯°□°)╯︵ ┻━┻

----

very early on in the history of live-build this function took the name of
a _single_ stage file only and did `exit 1` should the file not be found.
this was simple and clearly accomplished "what was on the tin", so to
speak.

in bd1a5ddc82 (2007, 1.0~a8-1) things got
weird. it was modified to support a list of multiple files. but instead of
being written to cause failure if _any_ of the listed files were missing
as perhaps one might expect, it was instead written to fail only if all
files were missing!

if you jump to the conclusion that i'm talking about a simple flipped
logic from a lack or otherwise of a `!` here, you'd be mistaken; there is
a comment inside the function that could not be more clear about what was
intended by the author - "Find at least one of the required stages"! this
makes me thoroughly confused about what they were thinking.

as we'll get to, this was fundamentally flawed (or at least its later use
was), but furthermore there were other notable issues introduced at this
point (but don't worry too much about these, they've all been addressed):
 - `NAME` was modified in the loop, using the existing value, but nothing
   initially set it...
 - the setting of `NAME` seems related to its use in the subsequent error
   output, yet they are logically separated; it is only set if a file
   exists, while the error is only printed if none exist.
 - it is pointlessly using a messy `CONTINUE="true"` based mechanism,
   when it could just `return 0`.
 - it did not handle correctly the bad use case of no params having been
   supplied.

it doesn't seem to have been entirely thought through, despite its
pervasive use throughout the build system.

note that no change was made in that commit to make actual use of the
new multi-param support. it would not be used until about a year later.

the function has remained largely untouched since then. in
c68c0a2708 a notable change was made to add
an initial setting of `NAME`, which partially addressed one of the above
issues. but it did not really address the issue the change was meant to
solve, since the `NAME` as printed in the error was now the name of the
script when what was really wanted was the name of the stagefile. this was
finally fixed properly in d54990695f.
however the weirdly pointless setting of `NAME` persisted in the loop.

finally i personally just refactored the function in the commit prior to
this one, retaining the same functionality but addressing the remaining
of the above minor implementation issues.

looking at usage of the new functionality introduced in
bd1a5ddc82, it does not seem to have been
until 0cbbde2b96 (2008, almost a year after
it was made possible) that changes were made to finally start making use
of the ability to pass more than one filename at a time to the function,
and it would appear that perhaps the author forgot what it actually was
that the function accomplished when used with multiple params, and failed
to double check.

in this first use of multiple parameters, this commit went from passing
single file names to individual calls to the function to passing the files
in one single call, in a commit the purpose of which was described as
simply tidying things up. it was most certainly not intended to change
stage requirements.

unfortunately, a change in requirements did occur as a result since the
new usage of the function was not accomplishing the same as before. this
change completely broke the stage requirements protection mechanism such
that only a single one of the listed stages needed to have completed for
the check to pass, rather than all as expected.

this flaw made it into release v1.0.1-2 and it has existed every since.

in the very next commit from that one,
6204dc0e6d things got even worse. here we
see the config stage being specified commonly as the first stage listed,
which is still the case today. this means that ever since this commit,
if you've already got a config before building (which you inevitably do,
especially after some later commits introduced automatically creating it
if missing), then all other stage requirements are simply ignored.

so it seems pretty damn clear that this function is accomplishing
completely the wrong objective. it _should_ be checking that _all_ files
given to it exist, not just one or more. ¯\_(ツ)_/¯

this FINALLY addresses this mistake.

(not that i wish to berate the author; i've made silly mistakes of my own
before)
2020-03-17 22:57:09 +00:00
Lyndon Brown 1b09b15277 stagefiles: refactor Require_stagefile()
- count of params is available as $#, we don't need the pipe-to-wc logic.
 - the whole 'CONTINUE' based logic is silly, we can just return once one
   of the files is found.
 - setting of 'NAME' in the loop was completely pointless.
 - the error message for multiple files was not very clear just injecting
   a sequence of words into a sentence.
 - it did not work correctly if no arguments were given (bad usage)

note, you might question whether the functionality of this function is
correct, as did I; this is tackled in a followup commit whilst this
commit retains the existing functionality!

Gbp-Dch: Short
2020-03-17 22:57:04 +00:00
Lyndon Brown dadeec9d39 stagefiles: fix doc mistake
missed in final revision of fe9195b59c

Gbp-Dch: Ignore
2020-03-17 22:09:51 +00:00
Lyndon Brown fe9195b59c stagefiles: further robustify with auto filenames
as suggested by Raphaël

rather than have fixed stagefile filename strings at all in the scripts,
use `$(basename $0)` to use the name of the script (which is the same for
almost all cases anyway, and the stage files are supposed to be almost
exclusively unique per-script). we can thus simplify things by determining
the filename for most use cases within the functions themselves.

this does change the file used by a couple of scripts, affecting backwards
compatibility of executing live-build upon an existing partially or fully
completed build:
 - binary_grub-pc used "binary_grub"
 - chroot_includes used "includes.chroot"

care had to be taken for the following cases:
 - there are some cases like bootstrap_cache, source_debian and
   bootstrap_debootstrap which are dealing with more than one file, and/or
   otherwise a filename that is not specific to the script itself exactly,
   or should not be based upon its name.
 - some cases like chroot_cache, bootstrap_cache and
   chroot_install-packages need to append something to the end of the name
   depending upon which pass/action mode the script is being executed with.
 - furthermore in the bootstrap_cache case one of the filenames is used
   within the bootstrap_debootstrap and thus needs very careful handling
   to be certain that a change in filename of bootstrap_cache does not
   break bootstrap_debootstrap.

Gbp-Dch: Short
2020-03-17 18:57:02 +00:00
Lyndon Brown 04d9ee0211 stagefiles: simplify & robustify
- avoid all need to pass ".build/" path in stage file names into the
   functions
 - add a helper to remove a stage file (required to complete the above
   properly)
 - avoid duplicating filenames within scripts which makes them prone to
   mistakes (some instances of which I've actually encountered and had
   to fix)

Gbp-Dch: Short
2020-03-17 18:57:02 +00:00
Lyndon Brown bea349c822 exit: fix missing local scope
missed in c55eb8a0c3

Gbp-Dch: Ignore
2020-03-17 17:33:31 +00:00
Lyndon Brown d5dfe38bfb manpages: correct date & version
Gbp-Dch: Ignore
2020-03-17 02:46:13 +00:00
jnqnfe a773edb813 syslinux: apply kernel version filtering logic to multi-flavour kernel scenarios 2020-03-16 23:08:26 +00:00
jnqnfe 38af959aa5 syslinux: use more dynamic memtest menu config file
Fixes the following
 - Correct version (memtest86/memtest86+) shown instead of fixed 'memtest86+' text
 - Ensure correct directory path always used by using replaceable placeholder

Gbp-Dch: Short
2020-03-16 23:08:26 +00:00
jnqnfe 31fa6abd36 syslinux: add memtest menu entry only if including memtest 2020-03-16 23:08:26 +00:00
jnqnfe 7ffd2288d9 syslinux: add install menu entries only if including installer 2020-03-16 23:08:26 +00:00
jnqnfe 0bf9d2d390 syslinux: expand list of install options 2020-03-16 23:08:26 +00:00
Lyndon Brown 7e41b1267c fix another wrong stage file filename 2020-03-16 22:40:23 +00:00
Lyndon Brown c55eb8a0c3 use local scope for private function vars
all vars affected have been carefully checked to be quite certain
that they are definitely local

where variable is assigned the return value of a function/command, the
local "declaration" is deliberately done on a separate line, since
`local FOO` is actually treated itself as a command rather than a
declaration; will thus always cause $? to be zero, and thus if done on
the same line as such an assignment can not only clobber $? but in doing
so unintentionally blocks failure of a command from triggering the
expected exit from having `set -e`.

also, from testing, i have found that when assigning "${@}" this must be
done on a separate line confusingly as otherwise an error occurs.

Gbp-Dch: Short
2020-03-16 22:10:03 +00:00
Lyndon Brown af040d7803 add build & build stage success messages 2020-03-16 21:42:49 +00:00
jnqnfe 24aab15d2a bootloaders: add install with speech synthesis menu entries
Following the official Debian install disks

Gbp-Dch: Short
2020-03-16 20:33:18 +00:00
jnqnfe efbe50233e grub1: refactor install menu creation
This is necessary as the simplest solution to allow a single
speech-synth entry to be added.

Gbp-Dch: Short
2020-03-16 20:33:18 +00:00
Lyndon Brown eeedf10de5 syslinux: fix duplicate shortcut use 2020-03-16 17:49:43 +00:00
jnqnfe 396b1727ad syslinux: changed 'build' to 'built' in splash
Appears before a timestamp which reflects when the image was built, so 'built' is more correct than 'build' here.

Gbp-Dch: Short
2020-03-16 17:48:59 +00:00
jnqnfe 0cef87ffca syslinux: fix shortcut caret appearing in menu entries
also fixes the mistaken assignment of the same shortcut for both
entries in live.cfg.in

Gbp-Dch: Short
2020-03-16 17:48:51 +00:00
jnqnfe 2fc60a1151 syslinux: remove replacement of unused label in menu configs 2020-03-16 16:29:00 +00:00
jnqnfe 8a7bc408e5 grub1: fix consistency
Use the normal appended-params directly in `Grub_live_entry` calls
like the failsafe ones.

Gbp-Dch: Short
2020-03-16 16:29:00 +00:00
jnqnfe aadf8c4cac grub1/grub2/loopback: fix missing delimiter in menu kernel parameter lists
The '---' delimiter should appear before the final 'quiet' parameter
(which is used by the debian installer I believe).

This delimiter is added by live-build in syslinux configs, and is present
in both grub2 and syslinux configs in an official debian 7.7 disc image,
suggesting strongly that live-build grub/grub2 menu creation code is in
the wrong here by missing it.

update: this commit previously used -- as was correct at the time, and has
since been updated to use --- per #775128; which was previously tackled in
a separate later commit. the switch to --- was already done for syslinux
(which was not missing the delimiter unlike grub) in
ba6b9adeff

Gbp-Dch: Short
Closes: #775143
2020-03-16 16:29:00 +00:00
jnqnfe a33938f8d4 grub1/grub2/loopback: fix order of quiet kernel parameters in menus
I believe that the `quiet` parameter is meant for d-i not the kernel and
thus should be given on the end after a delimiter, as done with syslinux.

Here we switch the order to move it to the end. The addition of the missing
delimiter will be done in a followup commit.

(See #775143)

Gbp-Dch: Short
2020-03-16 16:29:00 +00:00
jnqnfe 7d4fc93205 grub2/loopback: fix highlight readability
Current splash makes it very difficult to read menu entries.
Black as a background color is actually interpreted as transparent,
so switching to something else so the highlighted menu entry can be
read more easily.

Gbp-Dch: Short
2020-03-16 16:29:00 +00:00
jnqnfe 636e52c36e grub2/loopback: fix misapplication of quiet kernel parameter
When building grub2 menu entries the quiet param (meant for d-i)
was excluded from the rescue menu entries instead of expert.

This is the opposite to what is done in the following:
 - Menu entries seen in official debian 7.7 disc images (grub2 and syslinux configs)
 - Menu entries created for grub (legacy)
 - Menu entries created for syslinux

The evidence strongly suggests that the grub2 menu creation was in the wrong!

(See #775143)

Gbp-Dch: Short
2020-03-16 16:29:00 +00:00
jnqnfe 464c7a6946 grub1: fix wrong variable name 2020-03-16 16:29:00 +00:00
Lyndon Brown ca520eb5f0 split stdout & stderr auto colouring
thus for some reason if one is connected to a tty and the other a file,
we still get colour in the tty by default.

in terms of options, --color and --no-color override both, no granular
ones added since it's not worth it imo.

this is backwards compatible with custom configs setting `_COLOR`.

it could be argued that setting $_COLOR to "false" for the auto non-tty
cases is redundant, which it is, but it doesn't hurt to do so; it ensures
that if anything (inc. 3rd-party hooks and such) rely on it that it
remains correct; and ensures that if anything in the future mistakenly
uses $_COLOR instead of $_COLOR_OUT|$_COLOR_ERR that at least that will
only be broken for the use case of only one of stdout|sdterr being a tty.

Gbp-Dch: Ignore
2020-03-16 13:32:16 +00:00
Lyndon Brown 09b279b7bc turn on colour by default
...when stdout+stderr connected to a tty (as opposed for example to being
piped to a log file)

very helpful to have colour such that the red/yellow of errors/warnings
can draw the eye to problems.

Gbp-Dch: Short
2020-03-16 13:32:16 +00:00
Lyndon Brown 49e68da5ee allow turning off colour
necessary to give control when colour is default enabled

Gbp-Dch: Short
2020-03-16 13:32:16 +00:00
Lyndon Brown 2cf397df66 installer: fix double slash in urls 2020-03-16 01:36:53 +00:00
Lyndon Brown b326c37f92 installer: expand debugging output 2020-03-16 01:36:53 +00:00
Lyndon Brown 2ea6eeefa2 installer: move an exclude removal outside of loop 2020-03-16 01:36:53 +00:00
Lyndon Brown 19e1a5b9c2 installer: tweak temp shell script construction
Gbp-Dch: Ignore
2020-03-16 01:36:53 +00:00
Lyndon Brown 47e136df6f installer: dedup long paths 2020-03-16 01:36:53 +00:00
Lyndon Brown 3fb0bb235d installer: tidy package lists
`DI_PACKAGES` does not need to include `DI_REQ_PACKAGES` so long as
we pass the latter to apt in the one case where it was not already
being given it.

in fact with it including that sub-list meant that in the other
case where it was being given to apt, it actually just resulted in
duplication.

Gbp-Dch: Short
2020-03-16 01:36:53 +00:00
Lyndon Brown 9a878350d3 installer: misc small tweaks
Gbp-Dch: Ignore
2020-03-16 01:36:53 +00:00
Lyndon Brown 2abf7bc65b installer: clear large string once done with
Gbp-Dch: Ignore
2020-03-16 01:36:53 +00:00
Lyndon Brown 1a9a1585ad installer: restore udeb existence check
this was removed as part of b54bdd7fb1
but is actually still needed.

Gbp-Dch: Ignore
2020-03-16 01:36:53 +00:00
Lyndon Brown 7891188557 installer: fix broken loop
Gbp-Dch: Ignore
2020-03-16 01:36:53 +00:00
Lyndon Brown 00a2fabcdf fix wrong description
Gbp-Dch: Ignore
2020-03-15 21:54:37 +00:00
Lyndon Brown a67febdd82 fix missing stage descriptions
Gbp-Dch: Ignore
2020-03-15 21:54:37 +00:00
Lyndon Brown b25db0a4bf source: properly fix _apt permissions warning
the chown command needed running within the chroot, since apt-get is being
run within the chroot and _apt might have a different UID there than on
the host.

Gbp-Dch: Short
Closes: #953957
2020-03-15 21:38:35 +00:00
Luca Boccassi c0ff2e6dbd CI: deploy from the build stage, rather than rebuilding from scratch
No point in doing everything twice

Gbp-Dch: ignore
2020-03-15 21:13:31 +00:00
Luca Boccassi 9decfc38b8 Add autopkgtest: default image build 2020-03-15 11:38:03 +00:00
Steven Shiau 0a353a7b46 Add grub EFI support for armhf arch. 2020-03-15 11:35:19 +00:00
Lyndon Brown 34ceb67718 hide mountpoints from nautilus
when building within a home directory, as /proc, /sys, etc are mounted
and unmounted into the chroot at various points in the build, corresponding
entries appear and disappear within the side panel of nautilus.

this is obviously undesirable.

use of `-o x-gvfs-hide` resolves this for the most part. i still see items
occasionally pop up and having spent some time experimenting, i'm putting
it down to buggy behaviour on the part of nautilus. (aside from those
appearing when debootstrap is running - debootstrap also needs this fix).

Gbp-Dch: Short
2020-03-13 20:28:15 +00:00
Lyndon Brown a46985b08a fix comment typo
Gbp-Dch: Ignore
2020-03-13 16:19:59 +00:00
Lyndon Brown 24c3582b2c exit: don't convert numeric exit code to string 2020-03-13 16:06:20 +00:00
Lyndon Brown 1cbe8f8aac functions/bootloaders: tidy and simplify 2020-03-13 16:03:48 +00:00
jnqnfe b27927724a locks: tidy lock acquisition
Combine the check+create done in each script. (The original functions
are still callable as before, but a new combined `Aquire_lockfile`
function can be called instead, as now used).

Note, a further simplification could be done in removing the passing of
the lock filename in as a parameter since every use of the functions is
with ".lock". The lock functions already have a fallback to ".build/lock"
though. Checking the history, the fallback used to be for a system wide
lock, which was then replaced with this config-tree specific one. As long
as that is not used implicitly by 3rd-party hooks then surely we are free
to change the fallback to ".lock" and further remove passing in a name as
a param...?

history:
db5d2b0dcd
0aa8289a37

Gbp-Dch: Short
Closes: #952918
2020-03-13 15:37:38 +00:00
Lyndon Brown 346e3e1c36 fix colouring of notice type message prefixes
previously this was white+bold. the white aspect was dropped since this
would not be sensible for users with a white background for their terminal.
bold however does not have any effect for me at least so effectively there
is no highlighting at all.

here we reintroduce a colour, one that will work for both black and white
backgrounds of course. purple looks good to me - significantly different
to that used for errors and warnings, and works well with command
highlighting (as enabled separately).
2020-03-13 15:23:13 +00:00
Lyndon Brown 5a1c875cb8 exit: ensure an appropriate message is printed on unexpected exit
if a script exits due to a failure and `set -e`, we should ensure that an
error message is printed to be clear to the user that something actually
went wrong.

similarly it would be good to print a suitable message should the user
cancel with ctrl+c for instance.

Gbp-Dch: Short
2020-03-13 15:10:29 +00:00
Lyndon Brown 5e423d0851 fix instances of bad stagefile creation circumstances
theres no point in creation of stagefiles being kept within a
conditional block of work. if the script completes with success
then it should create its stagefile to thus avoid repeating any
work that it might have done should it get re-run without being
forced.

Gbp-Dch: Short
2020-03-13 14:42:34 +00:00
Lyndon Brown 3e3e8c2c64 fix instances of broken stagefile handling
mismatches in filenames between check and create

Gbp-Dch: Short
2020-03-13 14:42:34 +00:00
Lyndon Brown 67930f3e6e frontend: tidy
no need to have exit in both conditions

no need to have most of the script within a case branch when all other
cases result in an exit.

Gbp-Dch: Short
2020-03-13 14:20:12 +00:00
Lyndon Brown 9f42bc1bdc fix splitting bootloader string
the existing solution simply did not work
2020-03-13 14:17:45 +00:00
jnqnfe a6cc72bf6d strip useless multi-arch separate directory stuff
(part of never completed side-by-side multi archi support)

Several scripts make a call to a function called Check_multiarchitectures,
the purpose of which is to adjust the target directory that certain 'live'
and 'install' files are located in. The idea is that a script sets up
'DESTDIR', 'DESTDIR_LIVE' and 'DESTDIR_INSTALL' as appropriate and then
the script appends a suitable arch dependant postfix to the directory
name, depending upon the arch currently being targetted. This would allow
the script to be run multiple times, each for a different architecture.

This is a part of an implementation of allowing multiple architectures to
sit side by side within the same live image, selectable from the
bootloader menus. (As opposed to multiple architectures mixed within the
same userland).

This is evidently the case both from the fact that:
  1) The arch specific postfix chosen in that function depends on a var
     called LB_CURRENT_ARCHITECTURE, which is never set. In fact going
     back through the git history to the introduction of the function in
     0d5ff4ca75, the var (even considering
     var name changes) has never been set by anything. So effectively the
     call to the function has been entirely redundant all this time.
  2) The major build stages do not perform multiple executions of substages
     per arch. Thus from this perspective it seems that the support was
     never fully implemented.
  3) If any doubt remained, there is an old branch called 'tmp-multiarch'
     which has a couple of commits making progress with completing support,
     such as implementing the above missing pieces.

The above mentioned branch is 10 years old and can be considered abandoned.

It is not clear whether the original author ever intended to complete and
merge this; nor is it at all clear at what stage of completion it was at.

At any rate, imo it is not at all particularly useful to have extra code
and complexity in order to be able to cram multiple environments side by
side in one image, not when CDs/DVDs and even to some extent USB pen drives
are so cheap. And who really needs more than one environment so
desperately on just one such medium.

If this was not enough to justify removal, then there is also the fact that
the support that was implemented has become completely broken over the
years with scripts diverging in terms of the variable names the function
modifies such that they are incompatible with it.

A quick assessment of the state of this latter aspect:

  good:
   - grub-legacy uses the correct var names so is fine
   - memtest similarly good
   - installer_debian-installer looks okay

  questionable:
   - binary_linux-image uses the correct vars but might not select the
     right kernel and initrd files to copy (seems to copy all)

  bad:
   - grub-pc is making a redundant call, after functionality was moved
     to the loopback script
   - loopback is using the wrong vars (INITFS instead of DESTDIR +
     DESTDIR_INSTALL + DESTDIR_LIVE), plus is doing its own amd64+i686
     thing anyway, so the function call would achieve nothing anyway.
   - syslinux is also using the wrong var names so would not work with
     it and is not even making the necessary function call. Also the
     install paths are fixed in the hard coded cfg files anyway so this
     would need addressing with placeholders and sed replacement, but
     then it is not entirely clear how things should work with respect
     to install entries and multi-arch anyway, are we having multiple
     copies of the installer, one for each target arch and then multiple
     copies of the install menus, perhaps under different submenus?

So, this removes the artefacts of this never completed feature.

Gbp-Dch: Short
2020-03-13 13:56:21 +00:00
Lyndon Brown c54cc2c497 echo: really ensure log messages go to stdout
all echo helpers are used as logging functions with output to go to the
terminal. when used in functions that are designed to return a string
though the message printed would get incorrectly captured.

the previous fix done in e3a987d977 was
stupidly flawed; somehow my testing led me to mistakenly believe that
was adequate, but retesting proves that it was not.

here we create a new FD #3 linked to stdout to output the messages on,
which testing shows works as I had actually intended it.

e.g. here:
```
Foo () { if [ "$1" = "a" ]; then printf "foo\n"; else printf "error\n"; fi; }
```

we get:
```
~$ Foo a
foo
~$ Foo b
error
~$ XX="$(Foo a)"
~$ echo "${XX}"
foo
~$ XX="$(Foo b)"
~$ echo "${XX}"
error
```

and as demonstrated, "error" got incorrectly captured by in the variable

whereas here:
```
exec 3>&1
Foo () { if [ "$1" = "a" ]; then printf "foo\n"; else printf "error\n" >&3; fi; }
```

it is different in the last case:
```
~$ XX="$(Foo b)"
error
~$ echo "${XX}"

```

the error successfully makes it to the terminal, and the variable is an
empty string (with a newline automatically printed).

Gbp-Dch: Short
2020-03-13 13:50:35 +00:00
Lyndon Brown 1edc3af346 debootstrap: use --force-check-gpg
I asked for such a switch to be added in debootstrap back at the start of
2015 in #775454 as part of a review I undertook of its security. A slightly
modified patch was merged a few months later and made it into version
1.0.69.

A patch was never merged into live-build to make use of it however. Let's
do that now.

The benefit of this, as explained in #775454, is that if we want strong
security (LB_APT_SECURE=true) then should debootstrap not be able to find
the GPG key to verify things with, it will abort with an error instead of
falling back to just https downloads with a warning. Such a warning would
be easy to miss in the log output, and security could potentially be
compromised if this were to happen.

Gbp-Dch: Short
2020-03-12 14:44:49 +00:00
Luca Boccassi cb68fb3e0a CI: fix deploy stage
Clean the build tree before running, and list all the stages as the
CI implementation does not merge them from multiple includes

Gbp-Dch: ignore
2020-03-12 14:23:56 +00:00
Luca Boccassi 10999bbdcf Fix typo in changelog
Gbp-Dch: ignore
2020-03-12 12:50:13 +00:00
Luca Boccassi 161e7c8223 Fix typo in lb_config.1 manpage
Gbp-Dch: ignore
2020-03-12 12:49:28 +00:00
Luca Boccassi d320f19bde Bump Standards-Version to 4.5.0, no changes. 2020-03-12 12:48:48 +00:00
Luca Boccassi e6279af102 Add CI on commits/PRs
Gbp-Dch: ignore
2020-03-12 12:32:26 +00:00
Luca Boccassi 015e6b65f3 Revert "Test for executables: replace 'which' with more robust 'command -v'"
This reverts commit 2d9ab1f7f8.

Causes test failure due to bashism.
2020-03-12 12:32:26 +00:00
Lyndon Brown c2e73627db grub: fix incorrect error handling 2020-03-12 12:08:33 +00:00
johnraff 2d9ab1f7f8 Test for executables: replace 'which' with more robust 'command -v'
Instances of:
if [ $(which <command> ]
have been replaced with:
if command -v <command> >/dev/null
which is considered to be more robust in a range of environments.

scripts/build/chroot_archives: line 259:
	if [ "${LB_APT}" = "aptitude" ] && [ ! $(Chroot chroot "which aptitude") ]
has been left untouched because the chroot might require a more complex command
which would need more testing.

manpages/Makefile: line 42:
	@if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
has been left untouched because I am not sufficiently familiar with makefiles.
2020-03-12 10:35:57 +00:00
Lyndon Brown 72a87fb70d fix error for default hdd|netboot images
commit f811656150 enabled the grub-efi
bootloader by default for amd64|i386 architectures, but failed to
recognise the this bootloader is not supported for hdd|netboot images.

this meants that if a user tried to build such an image without explicitly
specifying the bootloader, excluding grub-efi, their build would fail
with an error in the binary_grub-efi stage.

this fixes the problem by only enabling grub-efi by default on supported
image builds.
2020-03-12 10:33:13 +00:00
Lyndon Brown 1e0339a4e3 remove obsolete loop-aes-utils related losetup hack
677415f6d7 (2007) in v1.0~a2-1 added a hack
relating to the loop-aes-utils package and losetup. this commit bundled
a bunch of changes, it was not specific to the hack, and so info about the
hack is limited to a brief comment included within the related change in
defaults:
```
# Workaround for loop-aes-utils divertion
# (loop-aes-utils' losetup lacks features).
```
though it is very similar to the removed fdisk hack in that it seems that
one package may replace a binary from another, moving the original to a
new location, and this hack gives the user the opportunity to select the
original instead of the one put in its place, for use in LB.

the comment mentions a package called loop-aes-utils as being the package
that performs such a diversion, and that the need for the hack was that
losetup itself lacked features, presumably encryption support, and it is
clear that it is the losetup binary that is the focus of the diversion.

looking into the history of loop-aes-utils a little, this package was
dropped from debian back in 2012 (#680748), favouring encrytion support of
dm-crypt/cryptsetup.

double checking file contents of packages, only the mount package carries
an /sbin/losetup file, so presumably this means that dm-setup/cryptsetup
do not perform such a diversion of losetup (i.e. their use is exclusively
done directly).

since the possible diversion is simply gone, that completely removes any
point in having the hack of giving users choice between losetup and the
diverted one. so let's remove this obsolete hack...
2020-03-12 10:31:39 +00:00
Lyndon Brown 9930ce1ea5 grub-efi: fix image type check ordering
this should take place before working on efi related stuff

Gbp-Dch: Short
2020-03-12 09:59:44 +00:00
Lyndon Brown a9d8aac959 grub-efi: fix incorrect error handling 2020-03-12 09:59:44 +00:00
Lyndon Brown d9f353c737 remove obsolete fdisk hack
8321653cb3 (from 2007) introduced a hack to
work around bug #445304 in gnu-fdisk for users who may have replaced fdisk
with the classic gnu version. the hack allowed users to select an alternate
fdisk binary to use to work around the buggy binary.

bug #445304 is marked as found in v1.0-1 and fixed in v1.2-1, though may
have been fixe din v1.1. it was marked fixed in 2009.

checking the package archive, gnu-fdisk does not actually exist anymore
in debian, with one exception - it is available for arm64 on sid via
debports, and that version is 1.3 so thus includes the necessary fix
anyway.

it is thus pointless now that we still carry this hack.

Gbp-Dch: Short
2020-03-11 19:06:54 +00:00
Lyndon Brown dab716e079 "Live Systems" -> "Debian Live" 2020-03-11 15:23:31 +00:00
Lyndon Brown fe02946472 copyright: add missing "The Debian Live team" entry
I'd mistook the copyright here to apply to the apt package, but did not
look close enough, it's clearly referring to copyright of the files which
we've just amended to have a "The Debian Live team" notice, which this
should thus surely also have.

Gbp-Dch: Short
2020-03-11 15:15:46 +00:00
Lyndon Brown 7a4a9f94b8 amend copyright & licensing blocks
Current versions of the project files are built upon versions published
and licensed by Daniel Baumann, but are modified copies of those files and
thus need to be marked as such per licensing requirements (afaik he did
not pass along ownership / licensing rights to anyone when he left the
project). We should also be careful to not be misrepresenting such
modified copies as being attributed to Daniel.

Adding a new copyright line referring to "The Debian Live team" should
suffice for this.

The authorship block in man pages has also similarly been updated.

Notes:
 - tweaked a copy of daniel copyright lines stating 2014 instead of 2015.
   both of these cases were in files that i had personally introduced in
   some of my past merged commits that moved some code around. i don't know
   why they stated 2014.
 - binary_onie was introduced in 2018, so that has a 2018 date instead of
   2016 unlike the rest.
 - 'efi-image' is a 3rd-party (Canonical Ltd) work that we bundle, but it
   has been modified by 674794a8f4 and
   36a3ba7634 so I similarly added a
   debian live copyright line.
 - 'grub-cpmodules' is similar. it was only changed by the indentation fix
   of 36a3ba7634 but modification is
   modification, and this does help cover any possible future changes that
   might be made.
2020-03-11 13:51:19 +00:00
jnqnfe 87e9543c98 source: target downloads with corresponding version
Prefer downloading the version of the source package that actually
corresponds to the version of the binary. Should apt-update be
run and a package updated, we do not really want to fetch a newer
copy of the source than that of the binary, we want the exact
corresponding version (kinda the whole point of compiling a source
disc that they correspond). If the exact version is no longer
available then it is surely preferable to list it in the missing
list than end up with a newer version.

Gbp-Dch: Short
Closes: #952932
2020-03-11 11:45:27 +00:00
Lyndon Brown f1647f0dac functions: consistency fix
missed in 7ee59d408e

Gbp-Dch: Ignore
2020-03-11 09:56:53 +00:00
Lyndon Brown 6cec4a7a74 exit: fix no /usr/bin/env error
if you execute the bootstrap stage with no internet connection, you get
the following output:

```
[2020-03-10 19:18:46] lb bootstrap
P: Setting up clean exit handler
[2020-03-10 19:18:46] lb bootstrap_cache restore
[2020-03-10 19:18:46] lb bootstrap_debootstrap
P: Begin bootstrapping system...
P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
P: Running debootstrap (download-only)...
I: Retrieving InRelease
I: Retrieving Release
E: Failed getting release file http://deb.debian.org/debian/dists/buster/Release
P: Begin unmounting filesystems...
P: Saving caches...
chroot: failed to run command ‘/usr/bin/env’: No such file or directory
```

the last line looked suspicious. investigating it turns out that there was
a deficiency in the exit handler.

when debootstrap fails to download what it needs due to lack of a
connection, that failure due to `set -e` causes the Exit() handler to kick
in. Part of this includes outputting the "Saving caches..." line, before
then making a call to Save_package_cache(). That in turn runs the following
command:
```
Chroot chroot "apt-get autoclean" || true
```
The Chroot() function includes a line starting with:
```
${_LINUX32} chroot "${CHROOT}" /usr/bin/env
```
which is the source of the last output line.

the reason we see this unexpected output is that with bootstrapping having
failed, there is no /usr/bin/env within the chroot so it is bound to fail.

the fact is, the exit handler has no business trying to pretty much
anything that it does if the bootstrap_debootstrap stage has not
completed.

this implements such a restriction and thus resolves the problem of this
unexpected and confusing output in the described situation.

we will now see:
```
[2020-03-10 19:18:46] lb bootstrap
P: Setting up clean exit handler
[2020-03-10 19:18:46] lb bootstrap_cache restore
[2020-03-10 19:18:46] lb bootstrap_debootstrap
P: Begin bootstrapping system...
P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
P: Running debootstrap (download-only)...
I: Retrieving InRelease
I: Retrieving Release
E: Failed getting release file http://deb.debian.org/debian/dists/buster/Release
```
2020-03-11 09:55:37 +00:00
Lyndon Brown 744141c60f source: fix apt warnings
the source stage emitted the following output for each packages downloaded.
note the troubling warning at the end.

```
Reading package lists... Done
NOTICE: 'grep' packaging is maintained in the 'Git' version control system at:
https://salsa.debian.org/debian/grep.git
Please use:
git clone https://salsa.debian.org/debian/grep.git
to retrieve the latest (possibly unreleased) updates to the package.
Need to get 1579 kB of source archives.
Get:1 http://deb.debian.org/debian buster/main grep 3.3-1 (dsc) [2038 B]
Get:2 http://deb.debian.org/debian buster/main grep 3.3-1 (tar) [1473 kB]
Get:3 http://deb.debian.org/debian buster/main grep 3.3-1 (diff) [104 kB]
Fetched 1579 kB in 1s (1293 kB/s)
Download complete and in download only mode
W: Download is performed unsandboxed as root as file 'grep_3.3-1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
```

this occurred because the '_apt' user did not have permission to write to
the destination directory and so was falling back to downloading as root
in order to do its work.

prior to 158950b873 all source packages were
downloaded directly to the root of the chroot. that commit changed this to
save them into a new clean directory within it instead. thus to fix the
problem we can simply set the ownership of this new directory to '_apt'.

Gbp-Dch: Short
2020-03-10 18:11:21 +00:00
Lyndon Brown e3da1b6f8d debootstrap: remove redundant check
the check for existence of debootstrap here was completely redundant since
there is a check at the beginning of the file which already outputs an
appropriate error and exists if missing.
2020-03-10 17:47:41 +00:00
Lyndon Brown d79fd1e760 archives: fix typo
introduced in ee2bbe4578

Gbp-Dch: Ignore
2020-03-10 17:36:10 +00:00
Lyndon Brown 48df750411 config: improve documentation 2020-03-10 14:12:45 +00:00
Lyndon Brown 9faf9bcbed hooks: run bin without explicit path
this got lost in reworking 7ee59d408e

Gbp-Dch: Short
2020-03-10 13:59:01 +00:00
Lyndon Brown 24f04a924b chroot: clarify stages
the cache restore/save script is not a chroot modification script unlike
the rest of the scripts that it was bunched up with. It is an actual
component part of the chroot build stage.

let's bring clarity to this with improved documentation.

Gbp-Dch: Short
2020-03-10 12:51:55 +00:00
Lyndon Brown 9f2b7b40e8 archives: always include enabled/disabled deb-src apt entries
LB_APT_SOURCE_ARCHIVES determines whether or not deb-src entries are
desired to be included in apt's sources.list. here, instead of excuding
them we always include them but commented out where they would previously
have been excluded. this means that if a user later changes their mind and
wants to make use of them all they have to do is uncomment them rather
than add the necessary lines.

Gbp-Dch: Short
Closes: #952929
2020-03-10 12:50:39 +00:00
Lyndon Brown ee2bbe4578 archives: simplification
as suggested by Raphaël

Gbp-Dch: Short
2020-03-10 12:49:36 +00:00
Lyndon Brown cf2a9b951c arguments: fix unreachable and poor argument error handling
all scripts use `set -e` which means that if getop fails, the subsequent
error check that would print an error in addition to any printed by getopt
itself would never actually be reached.

the first though here would be to remove the pointless error check, but
getopt does not include the word "error" with an unrecognised option
failure, nor does it use colour to highlight problems, both of which mean
that it is a little lacking in terms of highlighting problems to users.

thus we properly capture and use the exit code here and output an
appropriate message per invalid argument vs getopt internal error.

also, removed the redundant stderr redirection which is already done
by Echo_error().

Gbp-Dch: Short
2020-03-10 12:45:23 +00:00
Lyndon Brown d6096622f9 help/usage: remove pointless vars
build scripts never call Help() and so the empty HELP strings are pointless.
(when called with --help they call Man()).

Closes: #952859
Gbp-Dch: Short
2020-03-10 12:45:23 +00:00
Lyndon Brown 9f1fdac303 help/usage: simplify
Gbp-Dch: Ignore
2020-03-10 12:45:23 +00:00
Lyndon Brown bc199a73b6 help/usage: fix output of `lb config --usage`
broken by d0eb72a5ef

also, needed spaces before per-script output

Gbp-Dch: Ignore
2020-03-10 12:45:23 +00:00
Lyndon Brown 4e45586daf help/usage: fix too many empty lines
Gbp-Dch: Ignore
2020-03-10 12:45:23 +00:00
jnqnfe 158950b873 source: downloaded pkgs to a clean directory rather than chroot root
Closes: #952931
2020-03-10 12:44:11 +00:00
jnqnfe feec626274 source: minor tweaks
Gbp-Dch: Ignore
2020-03-10 12:44:11 +00:00
jnqnfe 532144ce66 chroot: improve directory creation/destruction efficiency
Closes: #952924
2020-03-10 12:41:15 +00:00
jnqnfe 0dee07f122 config: rename the config set/check functions for clarity
Gbp-Dch: Short
Closes: #952920
2020-03-10 12:39:37 +00:00
Lyndon Brown b4598b234c tidy script init (4/4) - top level cmd "auto redirect" handling
Partial fix for #952919

Gbp-Dch: Short
Closes: #952919
2020-03-10 12:39:37 +00:00
jnqnfe dff08fa3f7 tidy script init (3/4) - top level commands
Partialfix for #952919

Gbp-Dch: Short
2020-03-10 12:39:37 +00:00
jnqnfe 061d7cb340 tidy script init (2/4) - build stage scripts
Partial fix for #952919

Gbp-Dch: Short
2020-03-10 12:39:37 +00:00
jnqnfe b49abcc1a8 tidy script init (1/4) - arg and config processing
Partial fix for #952919

Gbp-Dch: Short
2020-03-10 12:39:37 +00:00
jnqnfe ed2d70bde1 simplify STAGE checks - use In_List
Closes: #952917
2020-03-10 00:02:43 +00:00
Lyndon Brown 62b3efa686 echo: fix bad colour choice
white is not going to work well on a terminal with a white background,
obviously. We should keep the standard colour and just try applying the
bold.

or do we want to consider a non black/white colour? like blue...?

Gbp-Dch: Short
2020-03-09 12:52:08 +00:00
Lyndon Brown a6c4094cf0 echo: don't mangle backslashes for file printing 2020-03-09 12:47:08 +00:00
Lyndon Brown 8545c048c6 use actual boolean state for some simple vars
Gbp-Dch: Ignore
2020-03-09 11:21:24 +00:00
Lyndon Brown 2c78d36bd5 use actual bool state where applicable within functions 2020-03-09 11:17:53 +00:00
Lyndon Brown 093a5ea99c installer: use boolean for clarity
Closes: #952930
2020-03-09 10:58:53 +00:00
Lyndon Brown e5d006cbc0 archives: tidy deb-src exclusion
instead of conditionally writing deb-src lines, it is **much** neater if
we use sed to optionally removed them at the end.

Gbp-Dch: Short
Closes: #952928
2020-03-09 10:54:23 +00:00
Lyndon Brown 7ee59d408e fix consistency in binary execution and existance checking
- prefer using `which` over hard coded paths
 - it is redundant to check that the bin pointed to the return of
   `which` exists and is executable, `which` already gives us
   assurance of that if it returns true!
 - the redirection of output (`2>/dev/null`) seems to be
   unnecessary from my testing.

the instances relatnig to fdisk and losetup in functions/defaults.sh have
been left as they are since they get executed by `lb config` which can run
without sudo elevation unlike `lb build` and in that case `which` would
fail to find these binaries resulting in error.

this also fixes a bug showing an error for missing debootstrap - this tool
requires sudo privileges to run and thus is not found via a none elevated
which search.

Gbp-Dch: Short
Closes: #952927
2020-03-09 10:51:11 +00:00
Lyndon Brown 37f0432e98 fix inadequate chroot_archives validation
commit d74f2102a0 added a validation check
to chroot_archives for its 'pass' parameter. this was based upon finding
an instance where the wrong value was being submitted to the script and
wanting to ensure such mistakes would be caught.

unfortunately it seems that I made a mistake in misremembering the facts
surrounding the latter issue when constructing the validation check and
failed to double check with testing until it was already merged. a
correction is needed. the set of valid values is not limited to only
'source|binary' but actually 'source|binary|chroot'. I'd misremembered
'chroot' as being a completely invalid value.
2020-03-09 10:51:11 +00:00
jnqnfe 7624527d77 defaults: ensure global caching param overrides specific caching params if disabled
Closes: #952923
2020-03-09 10:38:09 +00:00
jnqnfe 8008b57fc2 source: add output of config readme file to source image
To provide an explanation

Gbp-Dch: Short
Closes: #952921
2020-03-05 22:35:52 +00:00
Lyndon Brown 4d0c3a1169 firmware: enable caching for archive content file with firmware lists
the existing logic for obtaining a list of firmware packages always
downloaded a fresh copy of the archive content file, deleting the file
already in the cache. here we move to actually making use of the cache.

this helps when building multiple times, at least for the same distro. the
package list obtained is rarely going to change after all. it could of
course differ between distros, but the cache is per-distro, as it has
always been.

we of course here switch to caching each of the archive-area files
individually rather than having one file that gets overwritten (or
appended to in the case of when we kept the decompressed file).

Gbp-Dch: Short
Closes: #952911
2020-03-05 22:13:57 +00:00
Lyndon Brown 7867641fd0 firmware: save the compressed contents file to disk instead of decompressed
the existing logic was to decompress the contents file from the downloaded
archive to disk, then process it to obtain a package list. the largest
one by far is for 'main'; 'non-free' and 'contrib' are tiny in comparison.
for sid-amd64 currently, the archive file is 37 MB, while the decompressed
file it contains is 592.3 MB.

we always delete the files and download afresh (currently), and a previous
commit optimised by deleting the files once we're done with them to avoid
wasting disk space leaving them behind.

here we switch to storing the downloaded compressed file to disk instead,
reducing disk space usage (and IO) by hundreds of megabytes; piping the
decompression directly into awk instead of having awk read from the stored
file.

this moves the appending of new items into the list back within the archive
area loop, which is fine since we're replacing the file for each loop now
so the previous issue relating to appending is of no concern.

Gbp-Dch: Short
Closes: #952910
2020-03-05 22:13:57 +00:00
Lyndon Brown a120bc5445 firmware: avoid potentially duplicate work
addressing an old fixme, should distro and parent-distro be identical (in
a derivative build) we want to avoid wasting effort downloading and
processing the same content files twice.

since parent and non-parent have separate archive-area lists though we
should perhaps not just assume that they are identical or ignore any
differences; thus here in such a situation we ensure that we handle any
archive areas not already done for parent-distro handling in such a case,
while skipping those already done.

i notice that the fixme actually also refers to avoiding actual
overlapping of the cached files, however the cached files are (currently)
always ignored anyway, so this is of no concern. reusing the cached files
is an entirely separate issue.

Gbp-Dch: Short
Closes: #952909
2020-03-05 22:13:57 +00:00
Lyndon Brown 94d126c043 firmware: reorder firmware list construction
the 'manually add firmware-linux package' bit was stuck inbetween the
parent and non-parent logic, which was especially unhelpful before we
de-duplicated the logic into a common function.

Gbp-Dch: Short
2020-03-05 22:13:57 +00:00
Lyndon Brown aa745de0bb firmware: de-dup firmware list parsing
Edit: There were four copies of the same logic to keep in sync;
Originally this patch deduplicated each file, but leaving a copy of
the new function in each, thus reducing the duplication but not
eliminating it. A later patch moved it into a shared function file
following further enhancements to the code in question. This has
since been revised to have the function moved to a shared file here,
which simplifies and gives a cleaner diff.

Gbp-Dch: Short
Closes: #952908
2020-03-05 22:13:57 +00:00
Lyndon Brown 4933beffce firmware: delete pointlessly cached (large) file after use
the archive content file downloaded to obtain a list of firmware packages
is always deleted and downloaded afresh currently. it may not be ideal that
we do not make use of the cache here, however while that remains
unaddressed, we might as well delete the file after we've used it in order
to not pointlessly waste disk space.

note that this file is ~613 MB for sid-amd64 currently.

Gbp-Dch: Short
Closes: #952907
2020-03-05 22:13:57 +00:00
Lyndon Brown c53a949325 firmware: fix possible duplication in firmware package lists (inefficiency)
where multiple archive areas are used, the code here on each loop is:
  1) fetching the archive area contents file (compressed)
  2) **appending** the output to that of the previous loop
  3) searching the file for firmware references, adding to the list

since it appends rather than replaces, entries found in each loop get
re-added on each subsequent loop, resulting in duplication in the
resulting list

below I evaluate the possible solutions to explain why I chose the one
I chose, however the reader should not waste too much time worrying about
whether one of the other solution would have actually been better because
things are changed significantly in further commits shortly!

possible solutions:
  a) switching to output (>) rather than append (>>), but this might fail
     against an existing file
  b) removing the file on each loop, but this will complicate any future
     caching improvements that might be made here (currently the files are
     always deleted and thus downloaded fresh)
  c) allow the appending, evaluating the complete file after the loop

solution C warrants consideration of disk space consumption; currently the
compressed 'main' archive (for sid on amd64) expands to 592.3 MB (feb-2020),
'contrib' is 3.1 MB, and 'non-free' is 18.5 MB.

solution C was chosen here; the difference of accumulated file size vs.
max-single was minor enough to not be of particular concern (~613 vs.
~592 MB).

Gbp-Dch: Short
Closes: #952906
2020-03-05 22:13:57 +00:00
Lyndon Brown a951fe7ba6 firmware: construct file location once and reuse 2020-03-05 22:13:57 +00:00
Lyndon Brown c140efe41e firmware: avoid building unnecessary lists 2020-03-05 22:13:57 +00:00
jnqnfe 055907592c cache: clarify and simplify package cache save/restore
These functions are specific to handling packages stored in the
cache, not other files. They are also always used with the same
`cache/packages.` prefix to the path.

Gbp-Dch: Short
Closes: #952916
2020-03-05 22:09:20 +00:00
jnqnfe c1dcc4dd89 aliases: simplify excessively complex In_list function
This function is never used to find multiple needles at one time.

Gbp-Dch: Short
Closes: #952915
2020-03-05 22:07:50 +00:00
Lyndon Brown 0869a890ae installer: download udebs directly from correct mirror
instead of trying all from derived mirror then falling back to parent upon
failure, which as pointed out by a message printed out can result in a
load of spurious 404 errors; actually get each udeb from the mirror it is
supposed to be retrieved from.

Partial fix for #952914, this is the last commit for it so closes it

Gbp-Dch: Short
Closes: #952914
2020-03-05 21:34:38 +00:00
Lyndon Brown b54bdd7fb1 installer: filter derived udebs from parent list
the existing logic just bundled the entire parent and derived udeb lists
together, ignoring the fact that there might thus be two instances of some
packages, and relying upon getting derived ones first and checking file
existence to avoid handling the overridden parent instances.

here we now actually filter the list of parent udebs to exclude packages
that are to be obtained from the derivative.

this enables avoiding the file existence checking

Partial fix for #952914

Gbp-Dch: Short
2020-03-05 21:34:38 +00:00
Lyndon Brown 2e3f195c38 installer: robustify udeb inclusion
move the code that checks whether a version of a given package has already
been obtained (to account for parent and derived both listing the same
package) to guard the copy from cache action also, not just the download
action.

in rare but possible scenarios it would have been possible to end up with
both the parent and derived copies of a package included.

Partial fix for #952914

Gbp-Dch: Short
2020-03-05 21:34:38 +00:00
Lyndon Brown 6997f99c9f installer: improve documentation a little
Gbp-Dch: Ignore
2020-03-05 21:34:38 +00:00
Luca Boccassi b13a61d519 Fix Lintian Warnings about changelog: day-of-week, trailing whitespace 2020-03-05 21:23:54 +00:00
jnqnfe ac4ba405df archives: deduplicate apt sourcelist file construction
Geez :O

Gbp-Dch: Short
Closes: #952889
2020-03-05 21:08:53 +00:00
Lyndon Brown cac44b28d5 echo: tidy
Gbp-Dch: Ignore
2020-03-05 21:04:23 +00:00
Lyndon Brown 450fb25fbd binary_onie: fix lack of newline on error
this script outputs a series of progressive dots as progress is made,
finally terminated with ' done.'. however if an error occurs then the
error would end up being printed directly on the end of this instead of
on a new line since newlines are not printed after each dot. this fixes
this oversight.

Gbp-Dch: Short
Closes: #952883
2020-03-05 21:04:23 +00:00
Lyndon Brown f3209fead2 binarie_onie: fix missing use of echo helpers
the '.' progress stuff has been left as is. perhaps that should be removed
since its use is inconsistent compared to other scripts?

Gbp-Dch: Short
Closes: #952882
2020-03-05 21:04:23 +00:00
Lyndon Brown c90749056f binary_iso: fix wrong echo helper
Closes: #952881
2020-03-05 21:04:23 +00:00
Lyndon Brown e13713c18e cursor: purge unused cursor functions
only a couple were in use and only by unused echo helpers which have now
themselves been removed, so nothing in this file is needed.

Partial fix for #952880

Gbp-Dch: Short
Closes: #952880
2020-03-05 21:04:23 +00:00
Lyndon Brown 73c1100c01 echo: purge unused *_running echo helpers
Partial fix for #952880

Gbp-Dch: Short
2020-03-05 21:04:23 +00:00
Lyndon Brown 06f632efdf echo: purge some unused echo helpers
Partial fix for #952880

Gbp-Dch: Short
2020-03-05 21:04:23 +00:00
Lyndon Brown 57a9428080 echo: direct warnings via echo helper to stderr 2020-03-05 21:04:23 +00:00
Lyndon Brown e3a987d977 echo: ensure output goes to stdout/stderr
all of these echo helpers are essentially 'logging' functions with output
always intended for stdout/stderr. lack of explicit stdout/stderr direction
means that their output could be captured unintentionally should they be
used within a function designed to construct a string.

Gbp-Dch: Short
Closes: #952879
2020-03-05 21:04:22 +00:00
Lyndon Brown b8e3a27324 echo: fix problem with error printing
lack of stderr directed output for the `E:` prefix meant that it would
not appear alongside the message in some use cases

Gbp-Dch: Short
Closes: #952878
2020-03-05 21:04:22 +00:00
jnqnfe a45dcf46f6 fix missing use of echo helpers
Closes: #952876
2020-03-05 21:04:22 +00:00
jnqnfe a67e01638f help/usage: fix overly complex script description handling
Closes: #952887
2020-03-05 20:48:49 +00:00
jnqnfe aa858eb2c8 binary_disk: refactor
Avoid all of the duplication for each installer case

Note, what is done for the netboot case (which was previously missing)
still needs addressing

Gbp-Dch: Short
Closes: #952865
2020-03-05 20:42:31 +00:00
Lyndon Brown 8b109ffb96 config: rename --architectures to --architecture
this has only ever supported specifying a single arch, thus was confusing
being plural

Gbp-Dch: Short
Closes: #952892
2020-03-05 20:39:53 +00:00
jnqnfe 49e4608cff chroot: fix redundant usage line
Closes: #952885
2020-03-05 20:38:36 +00:00
Lyndon Brown 0fc28da947 help/usage: fix incorrect program command
Closes: #952884
2020-03-05 20:37:57 +00:00
jnqnfe d0eb72a5ef help/usage: avoid unnecessary use of echo helpers
Closes: #952877
2020-03-05 20:37:57 +00:00
jnqnfe 5a00487872 fix capitalisation of some output messages
Closes: #952875
2020-03-05 20:36:54 +00:00
jnqnfe 512dd58240 archives: fix mount local repo comments
Closes: #952873
2020-03-05 20:36:21 +00:00
Lyndon Brown 5c3679c882 add missing shebangs to temp generated shell code files
Closes: #952863
2020-03-05 19:25:13 +00:00
Lyndon Brown 7fb46c464b chroot_dpkg: start-stop-daemon simplification
inspired by what it does for `/usr/sbin/flash-kernel`

Gbp-Dch: Short
Closes: #952891
2020-03-05 11:52:01 +00:00
Lyndon Brown 2f5ae873b0 bootloaders: fix ignoring LB_DEBIAN_INSTALLER_GUI in menu creation
LB_DEBIAN_INSTALLER_GUI defines whether or not to provide the graphical
installer. the installer_debian-installer script pays attention to it and
does not download it if not wanted. the actual bootloaders however
(both grub2/loopback and syslinux) ignore it, which leaves broken and
unwanted menu entries. this fixes that.

Gbp-Dch: Short
Closes: #952890
2020-03-05 11:48:04 +00:00
jnqnfe 3897aac77a defaults: fix pointlessly split line error
inconsistent with all other output

Gbp-Dch: Ignore
Closes: #952874
2020-03-05 11:41:53 +00:00
Lyndon Brown 3840ac2005 memtest: better handle obsolete LB_MEMTEST value
available values currently are memtest86+|memtest86|none; "false" is
presumably handled for backwards compatibility

there is no need to handle this in individual scripts. the right place
to handle it is in Set_Defaults as now done

Gbp-Dch: Short
Closes: #952866
2020-03-05 11:39:57 +00:00
jnqnfe fcafaede19 simplify --debian-installer choices
`false` and `none` make no sense as choices for this option. Here we
replace `false` with `none`, and remove `true`.

Note that `true` was treated as an alias for netinst (see the changes to
source_disk and and binary_disk).

For backwards compatibility we still allow `true` and `false` by converting
them to `netinst` and `none` respectively, whilst printing a warning to
encourage users to move to `netinst`/`none`.

Gbp-Dch: Short
Closes: #952864
2020-03-05 11:36:55 +00:00
Lyndon Brown 6002f89b67 source: fix mistaken append instead of overwrite
Closes: #952862
2020-03-05 11:34:17 +00:00
Lyndon Brown 2511fff259 don't unnecessarily convert exit codes to strings
Closes: #952861
2020-03-05 11:33:12 +00:00
Lyndon Brown f3544ff68e installer: de-dup daily DI url
Closes: #952860
2020-03-05 11:32:14 +00:00
Lyndon Brown 95fedc81c1 help/usage: fix usage string of top level script
Gbp-Dch: Ignore
Closes: #952858
2020-03-05 11:31:09 +00:00
Lyndon Brown 36a3ba7634 fix indentation
including:
 - spaces replaced with tabs for consistency
 - alignment of `;;` in some case statements changed for consistency

Gbp-Dch: Short
Closes: #952857
2020-03-05 11:29:01 +00:00
Lyndon Brown a96107a3f1 manpage: fix missing mention of a config file
this is the last commit for the set reported as #952856 and thus closes it

Gbp-Dch: Ignore
Closes: #952856
2020-03-05 11:28:19 +00:00
Lyndon Brown cb0f943c43 manpage: better explain --distribution
some might think "distribution" refers to "debian"/"ubuntu"/"redhat"/etc

Gbp-Dch: Short
2020-03-05 11:28:19 +00:00
Lyndon Brown 09b24a5dd6 manpage: add non-free firmware note 2020-03-05 11:28:19 +00:00
Lyndon Brown ba08531da3 manpage: fix wrong description for --firmware-binary
--firmware-binary adds firmware to d-i, --firmware-chroot adds to live

Gbp-Dch: Short
2020-03-05 11:28:19 +00:00
Lyndon Brown 6b1f616824 manpage: fix typo
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown ace111863d manpage: clarification
"they" -> "who" (two uses of "they" referring to different things)

Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 569d256162 manpage: clarification
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 54f19a3efe manpage: ubuntu support was dropped
...so remove obsolete mentions

Gbp-Dch: Short
2020-03-05 11:28:19 +00:00
Lyndon Brown b3f9580da2 manpage: fix missing stage mention
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 54f77db4f1 manpage: document --system default
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 78f361a571 manpage: clarify
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 887bb3ccd5 manpage: grammar
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown f15d1af0ea manpage: fix typo
"automatise" -> "automate"

Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 888f63eb86 manpage: actually explain the purpose of the option in the description
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 1a8377de7d manpage: better explain --debian-installer-gui
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 3c5b687aed manpage: clarity
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 0d86c79880 manpage: clarity
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 3cb4608d2b manpage: fix package cache explanation
"from the local mirror" suggested that live-build is always used with a
local mirror, which is not the case.

Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown bc4fc322b5 manpage: clarity
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 23bd035708 manpage: fix typo
"the their"

Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown cdb44f4bcc manpage: fix typo
"of each packages" -> "of each package"

Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 09c4f89263 manpage: fix typo
"to be build" -> "to be built"

Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown c2fb7516ee manpage: source archives clarification
Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown 14a56deb0e manpage: use upper case acronyms
not sure that ISO is an acronym, but included anyway

Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown aed4e0fef2 manpage: explain specifying multiple bootloaders 2020-03-05 11:28:19 +00:00
Lyndon Brown 009ddccaed manpage: fix poor bootloaders description 2020-03-05 11:28:19 +00:00
Lyndon Brown 28d2e88ba8 manpage: separate first and secondary build commands
`lb build` is a top level command and the one most users will want. listing
the secondary component build stages alongside it just confuses things.

here we clarify things by moving the second-level build stages to a
separate list.

Gbp-Dch: Short
2020-03-05 11:28:19 +00:00
Lyndon Brown 4037226376 manpage: fix typo
"know" -> "known"

Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown a150e0573d manpage: fix typo
"some times" -> "sometimes"

Gbp-Dch: Ignore
2020-03-05 11:28:19 +00:00
Lyndon Brown d8ad687c36 manpage: fix outdated component list 2020-03-05 11:28:19 +00:00
Lyndon Brown 513befa3f5 manpage: fix possible parent installer values
the parent one allows "daily" also

Gbp-Dch: Short
2020-03-05 11:28:19 +00:00
jnqnfe c48caf36fd binary: fix missing handling of disk info for netboot case
The specifics of what whould be done for it, beyond the disk info
label, needs addressing. (fixme comment left). (#952854).

Partial fix for #952846

Gbp-Dch: Short
Closes: #952846
2020-03-05 11:22:20 +00:00
jnqnfe 42a9deb871 source: fix missing handling of disk info for netboot case
Partial fix for #952846

Gbp-Dch: Short
2020-03-05 11:22:20 +00:00
Lyndon Brown fde401a9ac installer: fix unquoted string
Gbp-Dch: Ignore
Closes: #952851
2020-03-05 11:18:20 +00:00
jnqnfe 63f374b861 binary_rootfs: fix chmod of squashfs image only being applied when using chroot
Perhaps it is unnecessary in the other case, but not harm applying
in both to be certain.

Gbp-Dch: Short
Closes: #952850
2020-03-05 11:17:04 +00:00
jnqnfe eac4757a89 binary_rootfs: fix deletion of excludes file from wrong location in squashfs after use
Closes: #952849
2020-03-05 11:12:56 +00:00
jnqnfe 769cf6e7b7 bootstrap: only output message where actually applicable
Gbp-Dch: Ignore
Closes: #952848
2020-03-05 11:10:45 +00:00
jnqnfe 849873daca bootstrap: drop obsolete check for `--no-check-gpg` support in debootstrap
This has been present in debootstrap since version 1.0.30.

Gbp-Dch: Short
Closes: #952847
2020-03-05 11:09:41 +00:00
jnqnfe 0d4b464370 binary: fix missing use of chroot_dpkg in binary stage
update feb-2020: the bug report is marked as fixed in version 5.0-a7-1,
however there is no such patch merged for that tagged release, nor at all
in master, so this properly closes it.

Gbp-Dch: Short
Closes: #776532
2020-03-05 11:07:28 +00:00
jnqnfe 2791a0d1e4 grub2: fix using wrong directory in certain cases
Update feb-2020:
Both grub2 and syslinux were affected by this issue. Someone else's
patch fixing syslinux only just recently got merged in
2735f3bd38 but grub2 was still
affected. I had made patches for both in 2015 which never got
merged. This is the grub2 one.

Gbp-Dch: Short
Closes: #952843
2020-03-05 11:06:30 +00:00
Raphaël Hertzog f60b0a2747 Add some initial changelog
I do this to manually add the bug closure for #952834 and #952834
since they were merged with an invalid bug closure syntax. Same
for #952839 which also was tagged with "Gbp-Dch: Ignore" thus not
generating any changelog entry... a changelog entry is required
to be able to close a bug!
2020-03-05 11:13:18 +01:00
Lyndon Brown 9c062e1f8b archives: fix deb-src entry exclusion
the sed commands were missing '-i' to actually modify the file (rather
than output to stdout)

Gbp-Dch: Short
Closes: #952842
2020-03-05 09:46:56 +00:00
Lyndon Brown 666dc9f6f2 bootstrap_archives: remove unnecessary param default
all uses of this script pass in a suitable 'pass' param, and a previous
commit added a validation check. Having a fallback to 'binary' should a
param not be supplied is completely unnecessary.

fyi, this script is only ever called from the bootstrap stage and with
'binary' as the param, thus supporting being called with 'source' and
indeed having a 'pass' param at all is surely utterly pointless in itself.

Gbp-Dch: Ignore
2020-03-05 02:41:48 +00:00
Lyndon Brown d74f2102a0 archives: add 'pass' param validation check
if this had already been in place then it would have caught
bug #952837.

Gbp-Dch: Short
Closes: #952841
2020-03-05 02:41:26 +00:00
Lyndon Brown ae2012953b archives: fix incorrect usage string
Gbp-Dch: Ignore
Closes #952839
2020-03-05 02:40:59 +00:00
jnqnfe f3ebc44e13 archives: fix removal of chroot/root/packages.chroot package list
Gbp-Dch: Short
Closes: #952838
2020-03-05 02:40:42 +00:00
jnqnfe 25b44ac8df source: fix wrong action value for script execution
valid values are binary|source, and source should have been
used here.

Gbp-Dch: Short
Closes: #952837
2020-03-05 02:39:52 +00:00
jnqnfe 6adb5976b6 remove another redundant file
Originally removed in 42fb1e1976
Accidentally restored in bc50443cf0

(Closes #952835)
2020-03-01 08:38:05 +00:00
jnqnfe 1efc6d5adf remove redundant file
18e0a2f325 "rebranded live sources" which
included renaming `source_debian-live` to `source_live` but accidentally
left the old file in place.

(Closes #952834)
2020-03-01 08:37:22 +00:00
David Hewitt 2735f3bd38 binary_syslinux: Acommodate LB_INITRAMFS not live-boot 2020-02-17 10:37:27 +00:00
Raphaël Hertzog 2127283494 Standardize on having the GUI installation first in boot menus
debian-cd changed it that way, we already have it that way in EFI
boot, let's be consistent.
2020-01-23 16:47:04 +01:00
Raphaël Hertzog be5aaa0c51 Get rid of extraneous whitespace showing up in syslinux menu
The leading space ends up in the FLAVOUR substitution in live.cfg.
2020-01-22 15:00:06 +01:00
Raphaël Hertzog 1e7f3d53df Update changelog for 1:20191221 release 2019-12-19 21:08:17 +01:00
Raphaël Hertzog f64b73a718 Revert some Kali-specific change
That change was erroneously committed as part of
44b9b0a650
2019-12-19 21:05:54 +01:00
Raphaël Hertzog f828238417 Update changelog for 1:20191220 release 2019-12-19 19:16:27 +01:00
Raphaël Hertzog 34fa2dc5c2 Switch to debhelper compat level 12 2019-12-19 19:13:28 +01:00
Raphaël Hertzog 311348983b Bump Standards-Version to 4.4.1 2019-12-19 19:13:24 +01:00
Raphaël Hertzog 30b9a391ac Fix "--debian-installer cdrom" and its interaction with binary_package-lists
apt-ftparchive is not able to differentiate between .deb and .udeb so
we have to install them in different pool directories so that we can
regenerate the Packages files without having the .udeb show up
unexpectedly.

Since binary_package-lists can overwrite the Packages files generated
in installer_debian-installer we have to ensure that it also updates
the Release file created formerly.

Ideally we should find a way to avoid the duplication of this logic.

Gbp-Dch: Full
2019-12-19 19:07:59 +01:00
Raphaël Hertzog cba349e5d0 Update my email in the Maintainer field
The work I do on live-build is done as part of the work I do for Kali.
2019-12-19 19:02:30 +01:00
Raphaël Hertzog ab70d2b636 Update changelog for 1:20191219 release 2019-12-19 18:58:43 +01:00
John Estabrook b6ad08c270 Add local archive keys before configuring local package repository
In the binary stage, chroot is restored from cache/bootstrap, which contains
neither custom repo lists, nor keys. If local packages are present,
chroot_archives will call 'Apt chroot update' after adding custom repo lists
without adding keys. apt-get will then fail instead of warn as of apt version
1.5.

Closes: #941691
2019-12-19 18:52:05 +01:00
Ronny Standtke 97e8070b72 Run binary_hooks after binary_grub-efi
That way it becomes possible to customize grub-efi files.

Closes: #940846
2019-12-19 18:24:55 +01:00
Raphaël Hertzog 44b9b0a650 Support --distribution-binary and --distribution-chroot
This makes it possible to build an image against a first distribution
(--distribution-chroot) and have the resulting image point to another
distribution (--distribution-binary). We can use this to build against a
snapshot and have the result use the original distribution that was
snapshotted.

Closes: #888507
2019-12-19 18:18:44 +01:00
Raphaël Hertzog e7221c02f3 Tweak lintian overrides 2019-12-19 17:33:52 +01:00
Raphaël Hertzog bca7af4ecb installer_debian-installer: don't mess with /var/lib/dpkg/status
Use a similar trick as for chroot_live-packages.

Relates to #944983.
2019-12-19 16:53:30 +01:00
Raphaël Hertzog 15c46fa152 Set default distribution to buster
Closes: #934495
Thanks: Алексей Шилин
2019-12-19 16:43:51 +01:00
Raphaël Hertzog 0647e985fa chroot_live-packages: use dpkg-query to see if a package is installed
Closes: #944983
2019-12-19 16:21:58 +01:00
Raphaël Hertzog 04ea46d07b binary_package-lists: avoid messing with dpkg's status file
Instead of emptying the file temporarily, just tell APT to use /dev/null
instead of /var/lib/dpkg/status. Relates to #944983
2019-12-19 15:54:54 +01:00
Roland Clobus 1682c5c8d1
Manpage: Update the default values of --mirror-* and --parent-mirror-* 2019-06-22 13:58:54 +02:00
Roland Clobus 14d82a8065
Manpage: use 3rd person form when describing an option 2019-06-22 13:08:57 +02:00
Roland Clobus 137ec1559c
Manpage: simplify the description 2019-06-22 13:05:59 +02:00
Roland Clobus 6ed2715e23
Manpage: the configuration directory (config) cannot be modified 2019-06-19 13:26:16 +02:00
Roland Clobus a9dba166ad
Manpage: removed FIXME for the SYNOPSIS section, all options are now listed 2019-06-19 13:20:15 +02:00
Roland Clobus a2d2065dec
Manpage: removed incorrect mentioning of the -d command line option 2019-06-19 13:11:11 +02:00
Roland Clobus 5aaf2181b8
--mirror-binary* was not properly sorted 2019-06-19 13:07:10 +02:00
Roland Clobus e7a629fb02
Manpage: Use alphabetical order for the description of the command line options 2019-06-19 13:05:24 +02:00
Roland Clobus a50dbe2567
Manpage: typo 2019-06-19 12:27:06 +02:00
Roland Clobus 0a97e7c069
Manpage: consistent use of whitespace in the command line option list 2019-06-19 12:26:07 +02:00
Roland Clobus a957982203
Manpage: added missing \fR tags 2019-06-19 12:25:13 +02:00
Roland Clobus 1837f6a40b
Reordered the command line options to make them in alphabetical order 2019-06-16 13:12:06 +02:00
Roland Clobus a844199e30
Manpage: Added documentation for --bootstrap-qemu-[arch|exclude|static] 2019-06-16 12:47:29 +02:00
Roland Clobus 58a82854a4
Manpage: Added documentation for --loadlin 2019-06-16 12:47:29 +02:00
Roland Clobus aef1b75233
Manpage: Added documentation for --swap-file-path and --swap-file-size 2019-06-16 12:47:29 +02:00
Roland Clobus c8fddcd702
Manpage: Added documentation for --firmware-binary and --firmware-chroot 2019-06-16 12:47:29 +02:00
Roland Clobus 554c37fd9e
Manpage: --parent-archive-areas uses the same argument name as 'lb config --help' 2019-06-16 12:47:29 +02:00
Roland Clobus 7c02640b62
Manpage: --mode explicitly supports debian and progress-linux. Special handling for ubuntu was dropped 2015-05-03 2019-06-16 12:47:29 +02:00
Roland Clobus 05ed83a2b6
Manpage: Added documentation for --hdd-label, --hdd-size and --hdd-partition-start 2019-06-16 12:47:28 +02:00
Roland Clobus 6c6151d0c9
Manpage: Added documentation for --image-name 2019-06-16 12:47:28 +02:00
Roland Clobus c54aa22bf6
Manpage: Added documentation for --initsystem 2019-06-16 12:47:28 +02:00
Roland Clobus ab8c09eca1
--initramfs support none and live-boot 2019-06-16 12:47:28 +02:00
Roland Clobus e9af6d559f
Manpage: Removed references to command line options that are no longer
in the code:
--firmware-binary
--firmware-chroot
--hooks
--parent-mirror-chroot-updates
--parent-mirror-chroot-backports
--parent-mirror-binary-updates
--parent-mirror-binary-backports
--mirror-chroot-updates
--mirror-chroot-backports
--mirror-binary-updates
--mirror-binary-backports
--templates
2019-06-16 12:47:28 +02:00
Roland Clobus f8f09c77c7
Manpage: Added documentation for --zsync 2019-06-16 12:47:28 +02:00
Roland Clobus ae5a77aedb
Manpage: --config synchronised to 'lb config --help' 2019-06-16 12:47:28 +02:00
Roland Clobus 9a4c334a55
Manpage: --compression also accepts xz. The default is none 2019-06-16 12:47:27 +02:00
Roland Clobus 75733ac554
Manpage: Added documentation for --breakpoints 2019-06-16 12:47:12 +02:00
Roland Clobus 45e45a8a22
Matched the documentation of --checksums to the implementation in live-boot 2019-06-16 12:44:13 +02:00
Roland Clobus d9961a8a54
Manpage: --binary-filesystem also accepts ntfs 2019-06-04 08:04:42 +02:00
Roland Clobus a5f69d0d73 Fixed a typo for --clean in 'lb config --help' 2019-06-03 10:48:58 +00:00
Roland Clobus 8466086428 Mention --breakpoints in 'lb config --help' 2019-06-03 10:48:58 +00:00
Roland Clobus 3c88667c2d Removed option --bootstrap, which is not implemented. 2019-06-03 10:48:58 +00:00
Roland Clobus c166c87497 Removed option none for --apt-indices, which was removed in 3.0.2-1. 2019-06-03 10:48:58 +00:00
Roland Clobus 3607219f69 Do not store _QUIET in the configuration file, otherwise the overrides
in the command line get ignored. Adds a documentation line for the other
command line options as well.
2019-06-03 10:48:58 +00:00
Roland Clobus 0e03c34edb Removed obsolete short command line options.
-f was --filesystem
-l was --language
-p was --package-list
-e was --encryption
2019-06-03 10:48:58 +00:00
Roland Clobus 56784ca1c0 Reenabled the command line option for colored messages for all scripts. The functionality was added 2008-11-01, but was not really active. 2019-06-03 10:48:58 +00:00
Roland Clobus c4abbbcc7e Reenabled the command line option for colored messages for lb_config. The functionality was added 2008-11-01, but was not really active. 2019-06-03 10:48:58 +00:00
Matthijs Kooijman f62a6f9dea Remove ldlinux.c32 for extlinux and syslinux
Since syslinux 5.00, this file is installed into the disk root by the
extlinux and syslinux installer commands. For pxelinux and isolinux,
these files still need to be added manually. This is documented at:

https://wiki.syslinux.org/wiki/index.php?title=Library_modules#All_Syslinux_variants_need_an_additional_ldlinux_module

Keeping these unused files around is probably only confusing, so better
to remove them.
2019-05-30 16:14:51 +02:00
adrian15 39038173a8 Readd findiso parametre to loopback.cfg generation. 2019-04-21 18:59:29 +02:00
Roland Clobus e4a4d4ae8d Run the pipeline only for master 2019-04-18 11:59:40 +00:00
Roland Clobus a93539e8e8 Added pipeline definition 2019-04-18 11:59:40 +00:00
Roland Clobus c035b3f106
Updated URL in the LB_ISO_PUBLISHER field. 2019-04-17 21:29:34 +02:00
Roland Clobus f460533ca1
Updated URL in the LB_ISO_PREPARER field. 2019-04-17 21:27:04 +02:00
Roland Clobus 599ef4892e
Updated URL for po4a. 2019-04-17 21:06:58 +02:00
Roland Clobus 91da0772fc
Updated URL for reporting bugs. 2019-04-17 21:05:30 +02:00
Roland Clobus 4503eddbed
Updated URL to the manual. 2019-04-17 21:03:23 +02:00
Roland Clobus afbf61be5a
Updated URL to the manual. 2019-04-17 21:02:34 +02:00
Roland Clobus 9726058c41
Update homepage URL. 2019-04-17 21:00:52 +02:00
Roland Clobus d8eb2d4d1b
Updated homepage URL. 2019-04-17 21:00:02 +02:00
Matthijs Kooijman 3227d34966 Remove --templates from lb_config manpage
This option was removed in commit 7e633e77f (Moving grub and grub2
templates into shared bootloader config directory.), but the
documentation stayed around.
2019-04-16 17:25:12 +02:00
Luca Boccassi bd7c900d3e Open changelog for 1:20190315, close 884553 2019-03-15 14:35:36 +00:00
Adrian Gibanel Lopez 80aa5ab611 Fixed foreign architecture package support to linux kernel flavours
Before Stretch there was an special amd64 kernel in the i386 arch repo.
So if you wanted to install an amd64 kernel alongside an i386 system
you did not need an additional arch repo.

Debian added multiarch support. That way you can install library packages
from multiple architectures on the same machine.

So there is no longer a need for having an amd64 kernel in i386 arch repo.
You can add an amd64 arch repo to an i386 arch system and fetch the amd64
kernel from the am64 arch repo.

live-build can be setup to use several linux kernel flavours in a single
image.

So in the days previous to this patch you could issue:
lb config --linux-flavours "486 amd64"
to use both 486 and amd64 kernel flavours.

Adding additional arch support to linux flavours poses two problems:

* Packages need to have its arch suffix (e.g. amd64:amd64).
If the suffix is not there apt-get insists on search amd64 kernel
package on i386 arch repo and, of course, fails to find it.

* The rest of the code which handles labels (bootloader config files)
or installed filenames (kernel images themselves) do not use the arch suffix.

This patch adds foreign architecture package support to
linux kernel flavours having taken those problems into account.

Practical example usage: i386 system and extra amd64 kernel.

First add amd64 foreign architecture in your i386 system
thanks to:

dpkg --add-architecture amd64
apt-get update

.

Finally enable amd64 kernel from amd64 arch alongside the
i386 system's 686 kernel thanks to:

lb config --architectures i386 --linux-flavours "686 amd64:amd64"
2019-03-14 23:06:31 +01:00
Luca Boccassi a410b8345d Close 924293 in d/changelog 2019-03-11 10:53:44 +00:00
Luca Boccassi 613f20d368 Update changelog for 1:20190311 release 2019-03-11 10:08:40 +00:00
Luca Boccassi e06d0f4c2a Bump Standards-Version to 4.3.0, no changes. 2019-03-11 10:08:29 +00:00
Hideki Yamane f242323fa2 We should add buster for release
Building image will fail without this directory for buster
2019-02-17 14:51:24 +00:00
Hideki Yamane 2fa258cca2 use deb.debian.org as default
replace deprecated httpredir.debian.org to deb.debian.org and use
it as default mirror since it is appropriate for users
2018-10-13 12:39:42 +09:00
Luca Boccassi 069d0d7b5a Update changelog for 1:20180925 release 2018-09-25 14:28:21 +01:00
Luca Boccassi cc1341ab4a lintian: override error on dependency on e2fsprogs
It's an error on Stretch, which causes annoyances when backporting.
2018-09-20 13:00:18 +01:00
Luca Boccassi 66839c4346 Bump Standards-Version to 4.2.1. 2018-09-20 12:02:50 +01:00
Luca Boccassi b2a760de57 Add Rules-Requires-Root: no. 2018-09-20 12:02:50 +01:00
Luca Boccassi 4db6471248 Build-Depend on debhelper >= 10~ to facilitate backports.
Not used at the moment, but it will be in the future when we bump it,
so that we don't forget
2018-09-20 12:02:45 +01:00
Luca Boccassi f108fdfa71 UEFI: remove the EFI/debian/grub.cfg, not necessary anymore
Turns out gcd works fine after adding /boot/grub/grub.cfg in the img,
as that's the path that gets hardcoded, and adding the EFI/debian/
grub.cfg was not necessary, so remove it.
2018-09-19 11:35:17 +01:00
Steven Shiau c22f1f5b71 Use gcd{x64.aa64}.efi.signed for amd64/arm64 arch.
For secured boot in binary_grub-efi, the gcdx64.efi.signed is
the boot loader for removable device, like CD or USB flash drive,
while grubx64.efi.signed is for hard drive. Therefore for live system,
use gcdx64.efi.signed for amd64 and gcdaa64.efi.signed for arm64.
2018-09-19 11:34:22 +01:00
Marcel Partap 8403487d4e copy keys to /etc/apt/trusted.gpg.d with appropriate extension for them to not be ignored. 2018-09-13 16:25:09 +01:00
Raphaël Hertzog 5290842288 Handle includes.chroot files installed over symlinked directories
With the merged /usr feature now enabled in debootstrap, we have
/bin and /lib which are symlinks to /usr/bin and /usr/lib. If
the live-build configuration provides files in
config/includes.chroot/lib/ or config/includes.chroot/bin/ then
lb chroot_includes will replace the /lib or /bin symlink with real
directories having only the content provided in chroot.includes and
problems will follow... the build will usually fail later with a
cryptic error message (for example a hook failing to execute
/usr/bin/env).

Work around the issue by creating a tarball of the files to install
and by unpacking that tarball from within the chroot with appropriate
options.
2018-07-27 10:51:49 +02:00
Luca Boccassi 332c170c3b Update changelog for 1:20180618 release 2018-06-18 12:03:14 +01:00
Luca Boccassi be7bc0a9ff Bump Standards-Version to 4.1.4, no changes. 2018-06-18 12:02:40 +01:00
Luca Boccassi 316b128158 UEFI: parse vendor from Grub package metadata
When using Secure Boot, grub2 as built by Debian will now load a config
file from EFI/$VENDOR instead of having EFI/debian hardcoded.
$VENDOR comes from dpkg-vendor or from the user building grub2.
The vendor string is stored in the control metadata as Efi-Vendor, so
retrieve it when building the EFI image.
2018-06-07 11:34:26 +01:00
Luca Boccassi e5492b1c70 Avoid apt-key add and just drop the key in /etc/apt/trusted.gpg.d
Only gnupgv is part of the deboostrap set these days, but apt-key needs
the full gpg (with gpg-agent) which is just a recommends.
Instead just drop the key with an .asc suffix in /etc/apt/trusted.gpg.d
which is supported since apt version 1.4
2018-06-03 22:06:36 +01:00
Luca Boccassi 186765e3fd lb clean: remove ONIE image 2018-04-17 11:39:26 +01:00
Luca Boccassi b3ec8d5978 Update changelog for 1:20180411 release 2018-04-11 16:13:10 +01:00
Luca Boccassi b062ede56c Fix debian/NEWS date to match an actual release
The NEWS file had a temporary version so it was never shown to users.
Fix it.

Gbp-Dch: Ignore
2018-04-11 16:13:10 +01:00
Luca Boccassi 277f0cec71 Reconfigure bootstrapped packages after preseeding.
live-build supports preseeding configuration, but the configuration has
to be installed after bootstrapping since it needs the debconf tools to
be applied. But packages that have already been installed and configured
in the bootstrap step will then ignore those preseeded configs.

After applying each preseed file, parse the package list and manually
reconfigure the relevant package(s) so that the configuration will be
applied.
2018-04-10 21:58:00 +01:00
Luca Boccassi da01193965 Don't recommend gzip, it's essential
Fixes Lintian Error.

Gbp-Dch: Ignore
2018-04-10 18:46:17 +01:00
Luca Boccassi 08dd0b90db Print an error and exit if a host package (dependency) is missing.
Check_package will just add a missing dependency to the LB_PACKAGES
todo list if it doesn't find it, when build-with-chroot is true, even if
the check was not for the chroot.
Instead error out if the check is not done for the chroot, e.g.
Check_package host /bin/foo foo
2018-04-05 16:24:36 +01:00
Luca Boccassi 050e637b2c ONIE: do not use package cache, only runs on host
Gbp-Dch: Ignore
2018-04-05 16:24:36 +01:00
Luca Boccassi a0335ac4a4 ONIE: add Recommends for programs needed by binary_onie
The binary_onie script needs a few programs to run, and it uses them on
the host rather than in the chroot, so add them to the Recommends list.
2018-04-05 16:23:50 +01:00
Luca Boccassi e47652d841 ONIE: missing dependency on file
A very minimal build worker might not have it, so check for its
presence as well.
2018-04-04 19:57:49 +01:00
Luca Boccassi 2aff516e1f ONIE: Check_package in the host, not the chroot
The binary_onie script works on the host, not in the chroot (if used),
so don't check that the required packages for the script are installed
in the chroot (if present) as they won't be useful.
Check instead on the host.
2018-04-04 19:56:41 +01:00
Luca Boccassi 44e0d3520e Update changelog for 1:20180328 release
Set urgency to low to allow for more time in unstable
2018-03-28 20:22:01 +01:00
Luca Boccassi 919604643b Add myself to Uploaders. 2018-03-28 20:20:24 +01:00
Luca Boccassi 76a90f31b5 Bump Standards-Version to 4.1.3. 2018-03-28 18:42:53 +01:00
Luca Boccassi 7f5d8ef9e9 Use HTTPS in debian/copyright (policy 4.0.0). 2018-03-28 18:40:23 +01:00
Luca Boccassi c1948b4183 ONIE: detect initrd compression instead of hard-coding
Instead of hard-coding the decompression and compression formats,
detect them at runtime.
Install the required dependencies as well - they were mistakenly left
out.

Gbp-Dch: Ignore
2018-03-23 20:01:58 +00:00
Luca Boccassi 0e91aeea42 Add Acquire::AllowInsecureRepositories to fix apt-secure in sid
The apt-secure option does not work anymore when building a sid image,
as with apt 1.6 the existing options are no longer enough to get apt
to accept an unsigned repository, which is necessary when using a
local cached repository (offline build).

Pass Acquire::AllowInsecureRepositories "true"; together with the
other options when --apt-secure false is used to fix the issue.
2018-03-23 16:02:52 +00:00
Luca Boccassi 46c9596926 Add options to build ONIE images
Open Network Install Environment is an open image format used by
networking vendor to ship a standardised image for networking white
box switches.

ONIE hardware takes this image at boot and a script to chain load
into the final environment via kexec. We can support Debian and
derivatives on such systems by packing an ISO which then gets
unpacked, kexec'ed and live-booted.

A base ONIE system can be tested in QEMU by building a VM following
these instrunctions:

https://github.com/opencomputeproject/onie/blob/master/machine/kvm_x86_64/INSTALL

Once built, boot onie-recovery-x86_64-kvm_x86_64-r0.iso in QEMU/libvirt
and on the console there will be the terminal prompt. Check the IP
assigned by libvirt and then scp the live image (ssh access is enabled
as root without password...). Then the .bin can be booted with:
 ONIE-RECOVERY:/ # onie-nos-install /tmp/live.hybrid.iso-ONIE.bin

The implementation is inspired by ONIE's own scripts that can be found
at:
https://github.com/opencomputeproject/onie/blob/master/contrib/debian-iso/cook-bits.sh

A new option, --onie (false by default) can be set to true to enable
building this new format in addition to an ISO.
An additional option, --onie-kernel-cmdline can be used to specify
additional options that the ONIE system should use when kexec'ing the
final image.
Note that only iso or hybrid-iso formats are supported.

For more information about the ONIE ecosystem see:
http://onie.org

Signed-off-by: Erik Ziegenbalg <eziegenb@Brocade.com>
Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-03-22 16:14:01 +00:00
Luca Boccassi 8047c2425a Add NEWS file to warn users about change of live-boot mount paths 2018-03-22 14:46:40 +00:00
Luca Boccassi aa1ae83854 UEFI: use uppercase EFI directory name for Tianocore
The Tianocore reference UEFI implementation, used for example by Qemu,
wants the EFI directory name to be uppercase in the fat32 partition
when Secure Boot is enabled, and will fail to load otherwise.
2018-03-09 20:57:54 +00:00
Luca Boccassi 035518ff69 UEFI: add support for Secure Boot on amd64 and arm64
Support for UEFI Secure Boot is modelled after how it currently works
in Ubuntu and on how it is going to work on Debian.
A minimal bootloader, shim, is used as the first-stage and it then
loads grub. Both have to be signed.
shim-signed is already available in Debian so the filenames are
already established, and the grub2 repository and packaging is common
between the 2 distros so we can already be reasonably sure of what it
is going to be.
So if both are available, copy /usr/lib/shim/shim[x64|aa64].efi.signed
as boot[x64|aa64].efi so that UEFI loads it first, and copy
/usr/lib/grub/[x86_64|arm64]-efi-signed/grub[x64|aa64].efi.signed as
grub[x64|aa64].efi.
This grub2 EFI monolithic image is currently hard-coded in grub2's
repository to look for a config file in efi/debian, so make a copy
of the previously added minimal grub.cfg that loads the real one in
that directory in both the fat32 and ISO 9660 partitions.

The new option --uefi-secure-boot can be set to auto (default,
enable or disable.
In auto, the lack of the signed EFI binaries is intentionally left as a
soft failure - live-build will simply fallback to using the locally
generated non-signed grub2 monolithic EFI binary as the only
bootloader. Given the difficulties surrounding the Secure Boot
signing infrastructure this approach gives the most flexibility and
makes sure things will "just work" once the packages are available,
without the need to change anything in the configuration.
This will also greatly help downstream distributions and users who
want to do self-signing.
The enable or disable options work as expected.

Closes: #821084
2018-03-09 20:57:54 +00:00
Luca Boccassi ac3ed23638 UEFI: add minimal grub.cfg to fat32 partition
On some UEFI implementations, like the AMI found in the Supermicro
X10SDV-TP8F development board, the fat32 partition will be loaded
first and so Grub will set it the root, and then drop to the console
as it cannot find any config on it.
Add a minimal grub.cfg that allows Grub to find the main config on
the ISO 9660 partition and load it.
Closes: #892406
2018-03-09 10:43:39 +00:00
Steven Shiau 0effdbd8ef Add grub-based UEFI boot support for ARM64
Closes: #885692
Fixes: !2
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
2018-03-02 09:09:29 +01:00
Raphaël Hertzog 06d81b6710 Update changelog 2018-02-24 17:56:10 +01:00
Rohan Garg 952ac834e4 Simplify bootstrapping of foreign architectures with qemu-debootstrap
We already require qemu-user-static for this case, we might as well rely
on the qemu-debootstrap script that this package provides.

Closes: #847919
2018-02-24 17:52:44 +01:00
Raphaël Hertzog 842e971a65 Run mksquashfs with nice -n 19 to not overload the system
Machines tend to become unresponsive during the mksquashfs step.
Avoid this by lowering the priority of the process.

Thanks: Ronny Standtke for the patch.
Closes: #867539
2018-02-24 17:04:04 +01:00
Raphaël Hertzog ee8d06c46c Merge branch 'fix_offline_repo' into 'master'
Fix build with local offline mirrors

See merge request live-team/live-build!1
2018-02-23 16:39:38 +00:00
Luca Boccassi 9a0c6102fd Fix build with local offline mirrors
Commit a15b579652 (#775989) dropped an early exit from the
chroot_archives remove step in case the parent mirror chroot and binary
parameters are the same and introduced a regression, as with the
following live-build now fails when the parent mirror is using a file:/
local apt repository (for example when the build worker is offline and
uses a pre-built cache of packages).

Example config:

  lb config --mirror-bootstrap "file:/pkgs" \
    --mirror-chroot "file:/pkgs/" \
    --mirror-binary "file:/pkgs" \
    --parent-mirror-bootstrap "file:/pkgs" \
    --parent-mirror-chroot "file:/pkgs/" \
    --parent-mirror-binary "file:/pkgs" \
    ...

with /pkgs being a directory with the packages for the installation and
the apt metadata (Packages/Sources/Release).

The problem is that, with such a setup, the /pkgs directory is bind
mounted inside the chroot as an optimisation in the install step,
and umounted as one of the first actions in the remove step for
chroot_archives.

Before that fix, the script terminated immediately. But now it
progresses and at the end it tries to run apt update inside the chroot
which will fail since the repository directory has been umounted, and
thus the packages and the apt metadata are no longer available, while
still being listed in /etc/apt/sources.list.

The proposed solution is to umount the local directory at the end of
the remove step, rather than at the beginning.

Closes: #891206
2018-02-23 14:04:59 +00:00
Raphaël Hertzog 96e73960b3 Fix Check_package invocation in binary_hdd for ntfs-3g
/sbin/mkfs.nfts -> /sbin/mkfs.ntfs
2018-02-14 18:49:36 +01:00
Raphaël Hertzog bf73aede69 Add e2fsprogs to Suggests along with mtd-utils, parted
Closes: #887278
2018-02-14 15:44:54 +01:00
Steve McIntyre c221f10cc1 Repo moved to salsa 2018-02-09 20:04:42 +00:00
Adrian Gibanel Lopez acafe6618b Failsafe entries rework at binary_loopback_cfg
[hertzog@debian.org:
- Fix conflicts due to renamed variables
]

Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
2017-12-21 14:29:58 +01:00
Adrian Gibanel Lopez d3edb76ad4 Fix handling of multiple kernels in binary_loopback_cfg
Now grub.cfg shows all the kernel options. Before this patch when you
had more than two kernels it only showed the auto option.

Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
2017-12-21 14:22:36 +01:00
Adrian Gibanel Lopez f77034606e Updated binary_loopback_cfg so that it uses Stretch's 686 kernel instead of old 486 one.
[hertzog@debian.org:
Also rename the variables for consistency.
]

Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
2017-12-21 14:16:57 +01:00
Raphaël Hertzog d33943ea7a Prepare release to unstable 2017-12-07 20:30:12 +01:00
Raphaël Hertzog 9f3e5fe8d9 Fix the way the .disk/mkisofs file is created
Thanks to Daniel Reichelt <debian@nachtgeist.net> for the patch.

Closes: #881941
2017-11-20 22:20:53 +01:00
Balint Reczey dae94463e4 Don't fail when initramfs is not used
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
2017-11-20 22:09:49 +01:00
Raphaël Hertzog 1f1dce740e Use $SOURCE_DATE_EPOCH when updating timestamps of manual pages
This makes the package reproducible at build time.

Closes: #879169
2017-11-20 22:04:35 +01:00
Raphaël Hertzog ee3e8be5b7 Prepare for release 2017-09-20 10:02:01 +02:00
Raphaël Hertzog 2f54fcf3d7 Replace "kirkwood" and "orion5x" armel flavors with the new "marvell" one
As done by the linux source package since its version 4.4.
2017-09-18 18:00:20 +02:00
Matthijs Kooijman 72ca3bcb20 Handle hardlinks in binary_hdd
To generate an hdd image, binary_hdd first estimates the needed size of
the image using du. By default, when du finds multiple hardlinked copies
of a file, it counts them only once. However, when the target filesystem
is FAT, which does not support hardlinks, these files will take up more
space when finally copying the contents, breaking the build:

	P: Copying binary contents into image...
	cp: error writing 'chroot/binary.tmp/live/initrd.img-4.9.0-3-amd64': No space left on device
	cp: error writing 'chroot/binary.tmp/efi/boot/bootx64.efi': No space left on device
	cp: error writing 'chroot/binary.tmp/efi/boot/bootia32.efi': No space left on device
	cp: cannot create directory 'chroot/binary.tmp/boot/grub': No space left on device
	cp: cannot create directory 'chroot/binary.tmp/isolinux': No space left on device

To fix this, pass --count-links to du when the target is FAT, to make
the space estimation correct.

This problem is exposed by commit 9c974b26b (Instead of renaming kernel
for syslinux, create hardlinks), which might need to be separately fixed
(to not waste space on FAT targets), but binary_hdd should at least
handle hardlinks more gracefully.
2017-09-01 10:29:20 +02:00
Raphaël Hertzog fb2a525207 Add changelog entry 2017-09-01 10:25:58 +02:00
Matthijs Kooijman 036b6161f2 Check all dependencies independent of LB_BUILD_WITH_CHROOT
Since commit fdc9250bc (Changing package dependency checks within chroot
to work outside as well), Check_package automatically checks for
LB_BUILD_WITH_CHROOT and works inside as well as outside of the chroot,
so no need to check LB_BUILD_WITH_CHROOT before calling them.
Install_package and Remove_package are just a no-op when building
without chroot, so they can also be called unconditionally.
Restore_cache and Save_cache do not check LB_BUILD_WITH_CHROOT but it
it should not hurt to call them when not needed (which already happened
in some cases).

This commit makes all Check_package calls unconditional on
LB_BUILD_WITH_CHROOT.

For binary_syslinux, this fixes the check (which used outdated paths
outside the chroot since 7b6dfd9d1), for binary_grub-efi,
binary_package-lists and chroot_package-lists this simplifies the code
(but also causes the check to become package-based instead of file-based
on apt-based systems), and for binary_loadlin and binary_win32-loader
this adds the check outside the chroot which was previously missing.
2017-09-01 10:22:09 +02:00
Matthijs Kooijman 5ca1ded228 Error out when needed packages are missing on the host
Previously, Check_package would only show an error when host packages
are missing on a non-apt system. On apt system, the packages would be
added to _LB_PACKAGES, which causes them to be installed in the chroot,
not in the host (or not at all if Install_package is not called). This
behaviour could break the build.

This applies to either packages that must be present in the host (as
checked with `Check_package host ...`), as well as packages that can be
either in the chroot or host (as checked with `Check_package chroot`)
when LB_BUILD_WITH_CHROOT=false.
2017-09-01 10:22:02 +02:00
Matthijs Kooijman 4c229d9449 Pass --partscan to losetup
Recent versions of Linux, parted or some other bit of software cause
partition devices, like /dev/loop0p1 to be created when running parted
mkpart. However, these devices are not cleaned up when running
losetup -d to remove /dev/loop0 later, so they linger around and confuse
mkfs (which refuses to make a filesystem, thinking there are partitions):

	mkfs.fat 4.1 (2017-01-24)
	mkfs.vfat: Partitions or virtual mappings on device '/dev/loop0', not making filesystem (use -I to override)

To prevent this behaviour, pass --partscan to losetup when adding a new
partition, to clean up any lingering partitions. It seems losetup does not
accept --partscan when deleting a loop device, to clean up at that point, but
since binary_hdd mounts the partition last, there should not be any lingering
partition devices after live-build is done.

The --partscan option is available since util-linux 2.21 (released in 2012), so
it should be fairly safe to pass it unconditionally.
2017-09-01 10:07:00 +02:00
Raphaël Hertzog e8118e8e0a Update changelog 2017-08-29 15:16:28 +02:00
Raphaël Hertzog 0c7fbccc5c Auto-update version strings in manual pages. 2017-08-29 15:14:04 +02:00
Raphaël Hertzog 37840d9cb2 Fix version strings in manual pages 2017-08-29 15:07:32 +02:00
Raphaël Hertzog c5a334deb8 Update PREPARER data for consistency 2017-08-29 15:06:35 +02:00
Raphaël Hertzog 4bba8ebb11 Prepare release to unstable 2017-08-29 14:17:07 +02:00
Raphaël Hertzog 3f909bf486 Drop all references to live-systems.org and update copyright file
Also fix the version string in the manual pages.

Closes: #859290
2017-08-29 14:12:33 +02:00
Raphaël Hertzog 2fe6afe460 Initialize /etc/default/locale with LANG=C.UTF-8
That way we always have a valid UTF-8 locale even when we don't have
the "locales" (or "locales-all") package installed.
2017-08-29 12:26:33 +02:00
Raphaël Hertzog ff71712590 Add .disk/mkisofs file recording the xorriso command line
Thanks to Thomas Schmitt <scdbackup@gmx.net> for the suggestion.
2017-08-10 14:53:53 +02:00
Raphaël Hertzog 406dd06610 Prepare release to unstable 2017-08-07 17:30:07 +02:00
Raphaël Hertzog e38ad8ae66 Drop the --hardlinks option from xorriso command line call 2017-08-07 17:27:32 +02:00
Raphaël Hertzog d18d0dfe2a Add keyboard shortcut on the "Advanced options" syslinux menu entry
Thanks to Daniel Reichelt <debian@nachtgeist.net> for the patch.

Closes: #864386
2017-06-09 13:41:13 +02:00
Raphaël Hertzog dd7d4392c8 Prepare release to unstable 2017-02-13 16:58:06 +01:00
Raphaël Hertzog d98f95bbbe Drop the versatile kernel flavour on armel. It's no longer built since Linux 4.9. 2017-02-13 16:52:10 +01:00
Raphaël Hertzog eedcb4dce5 Prepare release to unstable 2016-12-16 10:05:54 +01:00
Raphaël Hertzog 10a5580c3a Fix english mistakes in lb_config(1) 2016-12-16 10:03:45 +01:00
Raphaël Hertzog 75aa6dec5b Minor updates to lb_config and its manual page
* Update the manual page with the missiong --bootappend-live-failsafe
  option.
* Keep supporting the former --bootloader (without s).
2016-12-16 10:00:36 +01:00
Raphaël Hertzog 50b6a29523 Cleanup binary_loopback_cfg and offer more freedom in overriding the default grub-pc configuration. 2016-12-14 12:33:07 +01:00
Raphaël Hertzog 92dfdd2a3f Prepare release to unstable 2016-12-02 23:34:10 +01:00
Raphaël Hertzog 61b92c654e Drop check on configuration version
The date based versioning scheme no longer allows such a check. And we
don't intend to break backwards compatibility for now.
2016-12-02 23:05:05 +01:00
Raphaël Hertzog f7bb86fd58 Clean up grub configuration code
* Use only long kernel names.
* Put advanced options in a submenu.
* Use distro-agnostic labels.
* Don't generate entries with kernel version when we have a single
  version.
2016-12-02 23:04:13 +01:00
Raphaël Hertzog 9c974b26bf Instead of renaming kernel for syslinux, create hardlinks 2016-12-02 15:42:59 +01:00
Raphaël Hertzog b8f7f19015 Fix version of live-build that is displayed by lb --version
Now we generate the VERSION file at install time or at package build time.
2016-12-02 15:23:20 +01:00
Raphaël Hertzog 7ad6c408e5 Default for LB_UNION_FILESYSTEM is now "overlay" just like in live-boot. 2016-12-02 15:10:19 +01:00
Raphaël Hertzog 58fd378005 Drop useless code in binary_grub-pc 2016-12-02 15:01:28 +01:00
Raphaël Hertzog 4204a74352 Drop useless code in binary_grub-efi 2016-12-02 14:57:45 +01:00
Raphaël Hertzog fb0d4e2a18 Use a grub theme that integrates reasonably well with the current background picture. 2016-12-02 14:50:21 +01:00
Raphaël Hertzog e1941f82ab Bump version to 20161128 2016-11-28 23:27:46 +01:00
Raphaël Hertzog 53eab12a24 Fix lintian warning about bad whatis entry 2016-11-28 23:23:24 +01:00
Raphaël Hertzog 69345cfd4d Bump Standards-Version to 3.9.8. 2016-11-28 23:16:18 +01:00
Raphaël Hertzog b91b7de87a Fix permission on functions/bootloaders.sh 2016-11-28 23:15:38 +01:00
Raphaël Hertzog 4457f912c3 Fix dh_link not working as expected 2016-11-28 23:09:54 +01:00
Raphaël Hertzog fb0137810c Bump debhelper compat level to 10. 2016-11-28 23:07:18 +01:00
Raphaël Hertzog db5b398a71 Small cleanup of debian/rules 2016-11-28 23:07:18 +01:00
Raphaël Hertzog 02d933fc17 Fix Check_installed function when checking against host
Thanks to jnqnfe for the report.

Closes: #774807
2016-11-28 22:50:46 +01:00
Raphaël Hertzog 5a169a6fe6 Drop gpgv and debian-keyring from Suggests 2016-11-28 21:54:18 +01:00
Raphaël Hertzog a15b579652 Drop an optimization in chroot_archives that has undesired side-effects
Thanks to jnqnfe for the patch.

Closes: #775989
2016-11-28 21:48:18 +01:00
Raphaël Hertzog d8ca2041ad Get rid of useless bootstrap_archive-keys script
Closes: #773775
2016-11-28 21:36:57 +01:00
Raphaël Hertzog 63af37b9c5 Copy sub-directories as well as files in grub config directory
This is to cover the case of a theme included in that directory.
2016-11-28 21:05:06 +01:00
Raphaël Hertzog 2ea1329746 Drop left-over translation files for removed lb_testroot command. 2016-11-28 20:58:19 +01:00
Raphaël Hertzog 6c6f34d92d Manual pages updates
Thanks to jnqnfe for the patch.

Closes: #774730
2016-11-28 20:58:19 +01:00
Raphaël Hertzog 164f23368e Support “lb config --debootstrap-script <script>”
This option lets you use an alternate bootstrap script when running
debootstrap. Thanks to Sjoerd Simons <sjoerd@debian.org> for the initial
patch.

Closes: #790033
2016-11-28 20:58:19 +01:00
Raphaël Hertzog 822459c7b2 Set xorriso's "modification time" to SOURCE_DATE_EPOCH
Thanks to Chris Lamb <lamby@debian.org> for the patch.

Closes: #831379
2016-11-28 20:58:19 +01:00
Raphaël Hertzog 4b28b409a6 Export SOURCE_DATE_EPOCH when running chroot commands
Thanks to Chris Lamb <lamby@debian.org> for the patch.

Closes: #832998
2016-11-28 20:58:19 +01:00
Raphaël Hertzog b8f55caa14 Fix behaviour of (undocumented) "#nif" conditional test
Thanks to Erik Cumps <erik.cumps@esaturnus.com> for the patch.

Closes: #801379
2016-11-28 20:58:19 +01:00
Raphaël Hertzog db1bc0a1b8 Ignore some lintian errors which are making debuild fail... 2016-11-28 20:58:19 +01:00
Raphaël Hertzog 23b3e729c5 Add changelog entries for changes committed by Kilian Krausen 2016-11-28 20:58:18 +01:00
Sjoerd Simons c12f7d715e Pass components to debootstrap --second-stage
Commit e24e4b in debootstrap fixed setup_available to work in the
--foreign case (iotw at the second stage). Unfortunately this breaks
things if components aren't passed to the second stage _and_ your main
component isn't called main.

To fix this, pass --components to both the first and second stage
debootstrap when needed.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2016-11-28 20:58:18 +01:00
Raphaël Hertzog f152f99599 Drop debian/source/{local-options,options} as they are no longer needed. 2016-11-28 20:58:18 +01:00
Raphaël Hertzog 674794a8f4 Try to reuse /isolinux/splash.png in default grub configuration. 2016-11-28 20:58:18 +01:00
Raphaël Hertzog 2f061569ac Officially adopt the package
Closes: #808048
2016-11-22 18:02:13 +01:00
Raphaël Hertzog 742e584ad4 Update changelog 2016-10-28 09:15:29 +02:00
Sophie Brun e92dbc3696 Handle packages.chroot with an explicitly trusted file:// repository
Up to now we created a temporary GPG key that we registered with apt-key
but with the switch to GnuPG 2 by default, this code broke. Now we stop
doing that but we add the “trusted=yes“ attribute in sources.list so
that APT knows that the repository can be trusted even if it's unsigned.

Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
2016-10-28 08:57:37 +02:00
Raphaël Hertzog 6e0b98ce05 Update Debian changelog 2016-09-02 16:14:17 +02:00
Adrian Gibanel Lopez 7667d5faa7 Readded Installation boot entries to grub configuration files. 2016-08-26 20:23:02 +02:00
Adrian Gibanel Lopez 2d61dcc53c Force the use of insmod all_video in grub.cfg so that we do not boot in blind mode in UEFI mode. 2016-07-31 15:09:13 +02:00
Adrian Gibanel Lopez f811656150 Make: syslinux,grub-efi the default bootloaders because
UEFI is getting widely adopted but BIOS support is still
needed.
2016-07-31 15:09:13 +02:00
Adrian Gibanel Lopez ee9a6de2cc defaults.sh LB_BOOTLOADER updated to be: LB_BOOTLOADERS in incompatible warning 2016-07-31 15:09:13 +02:00
Adrian Gibanel Lopez 7becd08e4d Added EFI support by the means of grub-efi
This work is based on debian-cd team work and uses,
as much as possible, the same mkisofs options
than the Debian Installation CD disk does.

It assumes that /boot/grub/grub.cfg (and other design items)
is generated by: binary_loopback_cfg .

It relies on efi-image and grub-cpmodules being setup
as build scripts on live-build package.
In the future event of these two files being moved
to a binary package (they are originally from:
src: live-installer) the binary_grub-efi script would have
to be rewritten to take the new paths into account.
2016-07-31 15:09:13 +02:00
Adrian Gibanel Lopez 9cebad25f9 Handle multiple bootloaders properly in binary_iso . Force mkisofs to add an additional eltorito entry if we have more than one bootloader. 2016-07-31 15:09:13 +02:00
Adrian Gibanel Lopez 58a97219c9 Stolen efi-image and grub-cpmodules from src:live-installer
These two scripts simplify the creation of efi images based on grub-efi.
I have decided to simply steal them. If I had to include them thanks to a source package that would have mean that an src repo would have to be defined by default.
TODO: Ask in a bug a RFE so that these two scripts are put into a binary that could be consumed by both live-installer and live-build packages.
2016-07-31 15:09:13 +02:00
Adrian Gibanel Lopez c4327f6138 binary_loopback_cfg now renders grub.cfg by default.
The binary parts of grub-pc are left for the original binary_grub-pc.
As a consequence both /boot/grub/grub.cfg and /boot/grub/loopback.cfg files will be present in any Debian Live CD.

This might be useful to be reused from binary_grub-* bootloaders.
2016-07-31 15:09:13 +02:00
Adrian Gibanel Lopez 9d1a983cc8 Added new multi bootloader helper functions
* Added: functions/bootloaders.sh . This file adds bootloader functions that are heavily used in efi scenarios where a bootloader can act as a first or an extra bootloader.

Since the introduction of the new switch:

--bootloaders

you can setup it like this:

--bootloaders=syslinux,grub-efi

.

This means that syslinux is the first bootloader and grub-efi is the extra bootloader.

* Added new bootloader functions: Check_Non_First_Bootloader and Check_Non_Extra_Bootloader.

These functions let each one of the bootloaders abort the build because
they cannot perform a role either as a first bootloader or as an extra bootloader.

* Added bootloader functions: Check_First_Bootloader_Role, Check_Extra_Bootloader_Role and Check_Any_Bootloader_Role

These functions let bootloaders to force their default role in a single line.

At the same time many binary bootloaders were rewritten to make use of the new bootloader role functions explained above.

These roles were enforced:

binary_grub-legacy : First bootloader
binary_grub-pc : Either first or extra bootloader
binary_syslinux : Either first or extra bootloader

If a bootloader is tried to be used in a role that it's not meant to be used then the build fails because that might lead to a non-bootable system.
2016-07-31 15:08:11 +02:00
Adrian Gibanel Lopez 0624064d44 Remove repeated LB_PRIMARY_BOOTLOADER definition 2016-07-31 14:59:33 +02:00
Adrian Gibanel Lopez 01a9df8ce3 functions/default.sh : Define LB_PRIMARY_BOOTLOADER at the Set_defaults function which it's the right place where to do it 2016-07-31 14:59:33 +02:00
Kristian Klausen 489a09ba92 Disable EXT4 64bit features
e2fsprogs 1.43 enabled ext4 "64bit" feature as default, which broke ext4
HDD images as EXTLINUX doesn't support it.
2016-06-18 19:36:16 +02:00
Kristian Klausen 5a981664ed Switch d-i.debian.org URIs from http to https.
Closes: #809699
2016-05-26 21:58:03 +02:00
Kristian Klausen 6b0777c53e Fix typo in binary_syslinux
Closes: #818916
2016-05-26 21:57:19 +02:00
Kristian Klausen a8cc708427 Correct syslinux/extlinux mbr.bin path (second try)
dash doesn't support parameter expansion it seems.
So implemented with "tr" as in binary_syslinus.
2016-05-26 21:26:36 +02:00
Kristian Klausen ddc6659002 Correct syslinux/extlinux mbr.bin path
Fix #773833
2016-05-26 17:34:22 +02:00
Kristian Klausen 090c6f3cea Revert "Correct syslinux mbr.bin path."
This reverts commit 5161dcdf3b.
2016-05-26 17:33:20 +02:00
Kristian Klausen 25b15bce09 Include ext{3,4} journal size when calculating image size
Fix #801712
2016-04-16 22:18:22 +02:00
Raphaël Hertzog 1ccb416230 Add symlinks for libgpl.c32 and libmenu.c32
They are required for the "Hardware Detection Tool (HDT)" menu entry that
live-build adds in the advanced menu.

Sponsored-by: Offensive Security
2016-01-08 09:18:35 +01:00
Raphaël Hertzog 7f4e2654e4 Drop ixp4xx from available armel flavors
It's gone from Debian unstable/testing since Linux 3.17.

Sponsored-By: Offensive Security
2016-01-05 18:10:00 +01:00
Raphaël Hertzog 4d67c64ba2 Better handle empty package lists.
The fix in a294a46fb9 was not enough.
This should finally resolve the problem when a package list ends
up empty (most notably due to #if evaluating to false).

Sponsored-By: Offensive Security
2016-01-05 18:05:12 +01:00
Iain R. Learmonth b8eb3ab144 Updated changelog for release 2015-12-15 14:23:52 +00:00
Iain R. Learmonth 1f5d81fb32 Change maintainer to QA Group; update Homepage and Vcs-* 2015-12-15 14:06:41 +00:00
Iain R. Learmonth c96c2bbb0c Changing to native source format 2015-12-15 14:02:43 +00:00
Ben Armstrong 1f8975cc60 Remove 586 flavour for i386 architecture. (Closes: #807972) 2015-12-15 14:01:29 +00:00
trebmuh 89040368a8 [l10n] Update French translation for manpages. 2015-12-15 14:00:26 +00:00
Carlos Zuferri 90a4410cf9 Using 'Live Systems Project' as default project in .pot files. 2015-12-15 14:00:25 +00:00
Maximilian Mehnert 2c118b384c scripts/build/binary_hdd: Fix code style 2015-12-15 13:59:49 +00:00
Maximilian Mehnert 46920d22bd Old BIOS: start partition at specific place
Some BIOSes dont't boot from partitions starting at sector 1024.
Some are even more peculiar and only start from sector 63.
This patch adds an option for the binary_hdd target to manually
configure the partition start.
2015-09-23 10:48:46 +02:00
Maximilian Mehnert 8a52e569f5 force link creation when diverting flash-kernel
"ln -s /bin/true chroot/usr/sbin/flash-kernel" fails if the target
already exists.
2015-09-23 10:44:11 +02:00
Adrian Gibanel Lopez b6771e7360 Loopback cfg support.
Development details
--------------------

* This patch has been based originally on: binary_grub2 . It has been
improved thanks to some binary_syslinux bits.

* This patch ensures that binary_loopback_cfg needs is run
before binary_syslinux is run.
The reason is that it reuses some code from binary_syslinux to avoid
problems when binary_syslinux renames the kernel filenames.

* This patch already supports CPU detection

* I haven't tested all the possible scenarios for the script (with the
latest version). When amd64 and 486 Gnu/Linux flavours is used and the
bootloader is syslinux it works ok.

* I have not implemented a disable switch for not generating it.
Usually you always want loopback.cfg to be there.

* Compared to binary_grub2 script I have removed the installation
entries because I did not see any of them in binary_syslinux.

How to test
-----------

These are some steps to easily test if Looback cfg support is working ok.

0) We assume you have generated an iso
1) Make sure you have a partition that Grub understands. Plain ext4 or
vfat should do it.
2) Create directory: /boot/boot-isos/
3) Put the iso file into that directory making sure it has an ISO or iso
extension.
4) Setup your computer to boot from cdrom and use: Super Grub2 Disk
2.00s2 (Hybrid version recommended)
5) Choose Boot manually...
6) Choose Bootable ISOs (in /boot- ... )
7) Choose (the detected) GRUB Loopback Config
(hdN,msodsN)/boot/boot-ios/name-of-the.iso
8) You will be presented your loopback.cfg. Choose anyone of the entries
(unless it does not match your cpu architecture of course).
9) You should boot into your Debian Live without problems (thanks to
findiso boot parametre).

If you ever wanted to test from your grub2 installation instead from
Super Grub2 Disk check: http://www.supergrubdisk.org/wiki/Loopback.cfg
for an example.
2015-08-30 00:04:04 +02:00
Adrian Gibanel Lopez d515ae5684 Multi bootloader support
Note: OLDIFS use makes IFS to be reset to "" instead to it being unset.
Either we need to detect if old IFS was unset to unset it
or we need a proper way of setting it as a local variable.
Even more IFS it's not currently used in
Check_package (which it's called from: binary_hdd).
we should have a clean way of resetting/unsetting IFS when calling Check_package.

The other approach it's to explicitly define IFS with its default value in the
places inside live-build code where we implicitly suppose that it's going to have
its default value.
2015-08-29 23:56:41 +02:00
Carlos Zuferri d43874c405 Adding missing file extension to hdd images. 2015-08-27 10:17:22 +02:00
Daniel Baumann 4789428101
Releasing debian version 5.0~a11-1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2015-08-23 10:58:02 +02:00
Daniel Baumann c0263ca760 Wrap and sort debian control file. 2015-08-14 14:06:43 +02:00
Maximilian Mehnert 5161dcdf3b Correct syslinux mbr.bin path. 2015-08-10 21:57:51 +02:00
Daniel Baumann 2dcb4dc06e Updating stat calls to also give the right result in container setups, thanks to Kristian Klausen <klausenbusk@hotmail.com> (Closes: #789300). 2015-08-10 21:45:00 +02:00
Daniel Baumann 421419c7fc Getting rid of hard-coded release numbers and using /etc/os-release instead (Closes: #790860).
Unfortunately VERSION_ID on testing/unstable is currently not included
in /etc/os-release, see #795124.
2015-08-10 21:31:21 +02:00
Daniel Baumann 44ab759038
Releasing debian version 5.0~a10-1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2015-08-10 19:36:25 +02:00
Daniel Baumann 708c454776 Simplify hooks pattern in Makefile. 2015-08-10 19:20:23 +02:00
Daniel Reichelt f2c1f07ee4 Fix hook scripts location in Makefile 2015-07-26 14:31:59 +02:00
Daniel Reichelt 2a400dc63e Fix check for presence of chroot hooks 2015-07-26 13:44:16 +02:00
Raphaël Hertzog 2792097208 Drop elilo from list of d-i required packages on i386.
It's gone from unstable/testing and has never been really useful
on non-ia64 systems.
2015-07-15 12:05:52 +02:00
Raphaël Hertzog b2dce51156 Do not pass an empty version in APT::FTPArchive::Release::Version (Closes: #789800).
This avoids live-build triggering an apt-ftparchive bug (#693092).
2015-06-24 20:13:34 +02:00
Daniel Baumann f7d2e5a84b Correcting typos in chroot_hooks. 2015-06-15 07:11:03 +02:00
Daniel Baumann 06fb96a10c
Releasing debian version 5.0~a9-1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2015-06-06 06:40:39 +02:00
Daniel Baumann c8ccfbc1b3 Removing parent-directory too when cleaning up the config tree bind mount in chroot. 2015-06-05 23:15:19 +02:00
Daniel Baumann 64a82a486c Correcting execution of local source hooks. 2015-06-05 22:29:47 +02:00
Daniel Baumann 3d422634df Correcting execution of local binary hooks. 2015-06-05 22:28:50 +02:00
Daniel Baumann 2fec43b68a Correcting symlinking of hooks in lb config. 2015-06-05 21:35:59 +02:00
Daniel Baumann ca1a31dec6 Installing apt and dpkg updates (if any) first in derivatives mode, then doing dist-upgrade. 2015-05-23 12:42:16 +02:00
Daniel Baumann 50794b1de1 Splitting non-live specific hooks into their own subdirectory within hooks. 2015-05-20 08:19:56 +02:00
Daniel Baumann 3c303e7f53
Releasing debian version 5.0~a8-1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2015-05-19 06:27:05 +02:00
Daniel Baumann 1c3891775b Correcting leftover reference to binary_grub in binary. 2015-05-18 12:38:46 +02:00
Daniel Baumann 15a7676863 Actually removing live-build-cgi from control. 2015-05-15 09:14:31 +02:00
Daniel Baumann 66d8b61303
Releasing debian version 5.0~a7-1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2015-05-14 13:16:48 +02:00
Daniel Baumann 095e999d0c Removing broken samhain handling (Closes: #785264). 2015-05-14 13:15:45 +02:00
Daniel Baumann 9280926b11 Switching from http.debian.net to httpredir.debian.org as default binary mirror. 2015-05-10 19:10:28 +02:00
311 changed files with 21295 additions and 12715 deletions

View File

@ -4,7 +4,7 @@ SHELL := sh -e
LANGUAGES = $(shell cd manpages/po && ls)
SCRIPTS = frontend/* functions/* examples/auto/* examples/hooks/* scripts/*.sh scripts/*/* share/bin/* share/hooks/*
SCRIPTS = frontend/* functions/* examples/auto/* examples/hooks/*.chroot examples/hooks/reproducible/*.chroot scripts/*.sh scripts/*/* share/bin/* share/hooks/*/*
all: build
@ -29,7 +29,7 @@ test:
echo -n "."; \
done; \
else \
echo "WARNING: skipping bashism test - you need to install devscripts."; \
echo "WARNING: Skipping bashism test - you need to install devscripts."; \
fi
@echo " done."
@ -40,7 +40,8 @@ build:
install:
# Installing shared data
mkdir -p $(DESTDIR)/usr/share/live/build
cp -r data functions VERSION $(DESTDIR)/usr/share/live/build
cp -r data functions $(DESTDIR)/usr/share/live/build
sed -e 's/.*(\(.*\)).*/\1/; s/^[0-9]://; q' debian/changelog >$(DESTDIR)/usr/share/live/build/VERSION
cp -r share/* $(DESTDIR)/usr/share/live/build
# Installing executables
@ -102,3 +103,5 @@ clean:
distclean:
reinstall: uninstall install
.PHONY: all test build install uninstall clean distclean reinstall

View File

@ -1 +0,0 @@
5.0~a6-1

1
data/debian-cd/bookworm Symbolic link
View File

@ -0,0 +1 @@
squeeze/

1
data/debian-cd/bullseye Symbolic link
View File

@ -0,0 +1 @@
squeeze/

1
data/debian-cd/buster Symbolic link
View File

@ -0,0 +1 @@
squeeze

1
data/debian-cd/kali-dev Symbolic link
View File

@ -0,0 +1 @@
sid

View File

@ -0,0 +1 @@
sid

1
data/debian-cd/kali-rolling Symbolic link
View File

@ -0,0 +1 @@
sid

View File

@ -1 +1 @@
squeeze
trixie

View File

@ -0,0 +1,3 @@
choose-mirror
netcfg
ethdetect

View File

@ -0,0 +1,2 @@
netcfg
ethdetect

View File

@ -0,0 +1,2 @@
netcfg
ethdetect

1
data/debian-cd/testing Symbolic link
View File

@ -0,0 +1 @@
trixie

View File

@ -0,0 +1,2 @@
This is a manual copy of the exclude lists is debian-cd/data
https://salsa.debian.org/images-team/debian-cd

View File

@ -0,0 +1,4 @@
choose-mirror
netcfg
ethdetect
pcmciautils-udeb

View File

@ -0,0 +1,3 @@
netcfg
ethdetect
pcmciautils-udeb

View File

@ -0,0 +1,3 @@
netcfg
ethdetect
pcmciautils-udeb

View File

@ -0,0 +1,143 @@
# These udebs build the d-i cdrom initrd. As such, there is no reason
# to keep another copy of them on the CD in udeb form.
#
# This duplicates data found in the file build/pkg-lists/kernel, in d-i svn
kernel-image-*
# build/pkg-lists/base in d-i svn
archdetect
rootskel
main-menu
cdebconf-udeb
udpkg
anna
di-utils
di-utils-shell
di-utils-reboot
lowmemcheck
# build/pkg-lists/cdrom/common, in d-i svn (also included in the
# root+cd-drivers floppies)
busybox-udeb
installation-locale
localechooser
iso-3166-udeb
hw-detect
cdrom-detect
cdrom-retriever
load-cdrom
cdrom-checker
bogl-bterm-udeb
di-utils-terminfo
cdebconf-priority
cdebconf-newt-udeb
usb-discover
preseed-common
initrd-preseed
file-preseed
nano-udeb
floppy-retriever
libfribidi0-udeb
# Already on the initrd as dependencies
libdebconfclient0-udeb
libdebian-installer4-udeb
libdebian-installer-extra4-udeb
# These udebs are only useful in building the boot floppy image
busybox-floppy-udeb
rootskel-bootfloppy
# Graphical installer: common udebs included in initrd
rootskel-gtk
cdebconf-gtk-udeb
fontconfig-udeb
gtk2-engines-udeb
libatk1.0-udeb
libexpat1-udeb
libfreetype6-udeb
libglib2.0-udeb
libgtk2-engines-udeb
libpango1.0-udeb
libpcre3-udeb
libpixman-1-0-udeb
libpng*-udeb
libsdl1.2debian-udeb
mouse-modules-*
ttf-*
fbset-udeb
# Graphical installer: udebs for directfb
libdirectfb-*-udeb
libcairo-directfb2-udeb
libgtk-directfb-2.0-0-udeb
# Graphical installer: udebs for X.Org
xserver-xorg-core-udeb
xserver-xorg-input-evdev-udeb
xserver-xorg-video-fbdev-udeb
x11-xkb-utils-udeb
xkb-data-udeb
libcairo2-udeb
libdrm2-udeb
libfontenc1-udeb
libgtk-x11-udeb
libpciaccess0-udeb
libx11-6-udeb
libxau6-udeb
libxcb1-udeb
libxcursor1-udeb
libxdmcp6-udeb
libxext6-udeb
libxfixes3-udeb
libxfont1-udeb
libxft2-udeb
libxi6-udeb
libxinerama1-udeb
libxkbfile1-udeb
libxrender1-udeb
# Graphical installer: terminal support is included in initrd
cdebconf-gtk-terminal
libvte9-udeb
# Not currently used
cdebootstrap-udeb
hdparm-udeb
dhcp-client-udeb
# This package is only useful in the d-i-demo
di-utils-exit-installer
# No need for these loaders.
download-installer
load-floppy
# Only useful in the hd-media initrd
iso-scan
load-iso
# These are not really needed, the regular netcfg subsumes them
netcfg-static
# skolelinux stuff, not for the stock CDs
debian-edu-install-udeb
debian-edu-profile-udeb
debian-edu-archive-keyring-udeb
ltsp-client-builder
autopartkit
# live CD stuff
live-installer
simple-cdd-profiles
# If needed, will be on the initrd already
module-init-tools-udeb
env-preseed
rescue-check
cdebconf-text-udeb
brltty-udeb
klibc-utils-udeb
libklibc-udeb
udev-udeb
udev-gtk-udeb
ai-choosers
auto-install
libslang2-udeb
kbd-chooser
kbd-udeb
console-setup-*
# Currently unused
debian-ports-archive-keyring-udeb
emdebian-archive-keyring-udeb
nbd-client-udeb
pwgen-udeb
# Eh?
gnumach-udeb
# We only support grub these days, drop lilo and elilo
lilo-installer
elilo-installer

View File

@ -0,0 +1,42 @@
# These udebs are in the d-i cdrom initrd and the hd-media initrd.
# As such, there is no reason to keep another copy of them on the CD
# in udeb form.
console-keymaps-at
console-keymaps-usb
kbd-chooser
acpi-modules-*
ata-modules-*
cdrom-core-modules-*
core-modules-*
fat-modules-*
fb-modules-*
ide-core-modules-*
ide-modules-*
input-modules-*
isofs-modules-*
mmc-modules-*
nls-core-modules-*
parport-modules-*
pcmcia-modules-*
sata-modules-*
scsi-common-modules-*
scsi-core-modules-*
scsi-modules-*
serial-modules-*
speakup-modules-*
usb-modules-*
usb-serial-modules-*
usb-storage-modules-*
# Not used on amd64
console-keymaps-acorn
console-keymaps-amiga
console-keymaps-atari
console-keymaps-dec
console-keymaps-sun
# Not needed with the 2.6 kernel on amd64.
userdevfs
# Only needed on arches that use partconf or autopartkit.
partconf-mkfstab
# Not needed on arches that use partman
mdcfg
lvmcfg

View File

@ -0,0 +1 @@
apt-mirror-setup

1
data/debian-cd/unstable Symbolic link
View File

@ -0,0 +1 @@
sid

27
debian/NEWS vendored Normal file
View File

@ -0,0 +1,27 @@
live-build (1:20220505) unstable; urgency=medium
The support for FTP proxies has ended. You are advised to use http or https
while configuring the debian package mirror, instead of ftp.
See https://salsa.debian.org/live-team/live-build/-/merge_requests/252#note_243114
-- Roland Clobus <rclobus@rclobus.nl> Wed, 8 Sep 2021 11:55:00 +0200
live-build (1:20210329) unstable; urgency=medium
The 'filesystem.size' file is no longer created and included in the image,
as it is often incorrect and variates depending on the build environment,
breaking reproducibility. For more information see the following thread:
https://lists.debian.org/debian-live/2021/03/msg00008.html
-- Luca Boccassi <bluca@debian.org> Mon, 29 Mar 2021 10:49:43 +0100
live-build (1:20180411) unstable; urgency=medium
The live-boot mount points have been moved from /lib/live/mount to
/run/live. Since this is a backward-incompatible change, a compat
recursive bind mount point is being provided in /lib/live/mount so
that existing scripts will not break in Debian 10 (Buster).
Please note that this will be removed in Debian 11 (Bullseye) so
plan accordingly and update any required scripts.
-- Luca Boccassi <bluca@debian.org> Wed, 11 Apr 2018 12:35:19 +0100

983
debian/changelog vendored
View File

@ -1,3 +1,984 @@
live-build (1:20240810) unstable; urgency=medium
[ Roland Clobus ]
* Workaround for #1023472
* Revert previous commit to test/rebuild.sh
[ Thore Sommer ]
* ISO generation: add support for hybrid ISOs with grub-pc
[ Roland Clobus ]
* non-free firmware detection: in chroot, not on host
* If there is more than one kernel for the installer, use the newest
* Installer: ignore the configured kernel version
* Filter the firmware list (Closes: 1035382)
* Set additional meta information
[ David Hewitt ]
* Follow symlinks while copying shim files
[ Roland Clobus ]
* rebuild: update --disk-info
[ Marcel Partap ]
* Create binary_chroot stagefiles when skipping, too
* Remove ancient hook 9030-remove-apt-sources-lists that was never run
[ jfliu ]
* binary_iso: fix iso-hybrid images with EFI bootloader
[ Roland Clobus ]
* Use LC_ALL=C for sort
* Fix and correctly suppress lintian warnings
* Apply predictable timestamps in the source image
* binary_syslinux: Ensure the availability of the font of splash.svg
* binary_rootfs: Fixed test for /etc/mtab (Closes: #1032408)
* binary_disk: Don't create .disk/archive_trace any more
* rebuild.sh: Consistent timestamp of theme.txt
[ Arnaud Rebillout ]
* efi-image: Fix missing part_* modules in boot<platform>.efi
* efi-image: Fix <platform>/grub.cfg, variables must NOT be expanded
[ Roland Clobus ]
* Remove unneeded cached files from appstream
* Reproducible: fixes the last two issues for Debian 12.3
[ Emanuele Rocca ]
* chroot_sysfs: umount efivarfs if mounted
[ Roland Clobus ]
* Apply policykit fix when needed.
* rebuild: Don't use a symlink for the splash screen
[ Unit 193 ]
* firmwarelists.sh: Account for usrmerged firmware packages.
[ Roland Clobus ]
* Workaround for #1058994
* installer: The kernel version does not need to have a Debian-version
* The installer now requires grub-common and dependencies
* Installer: Support trixie
* Installer: fix for previous commit
[ Patrick Schleizer ]
* fix: check correct dependency package grub-common instead of grub-pc
* also check if grub-pc-bin dependency is available
* reproducible builds: use cp -a when copying binary/boot/grub/i386-pc
[ Roland Clobus ]
* Reproducible: Fix for vlc (used by the Bookworm KDE image)
* Fixed udeb handling
* Reproducible install-info
[ Marcel Partap ]
* container hooks: make nspawn work inside nspawn
[ Roland Clobus ]
* Allow for shim-only secure UEFI boot
* Remove 'nolapic' from the safe boot options.
* Rebuild: Always show the active settings
* Cross-build: arm64 support
* binary_bootloader_splash: New script
* hooks: Remove /etc/.pwd.lock and /run/mount/utab
* Architecture checking is not required any more
* installer: Also add the t64 versions of the libraries
* binary_includes: Activate when the directory exists (Closes: #1069349)
[ Luca Boccassi ]
* d/control: bump Standards-Version to 4.7.0, no changes
[ Roland Clobus ]
* Restore support for bullseye and bookworm
* installer: offline installation with calamares
* Fixed: select the package name for firmware packages
* Fix git installer build for arm64
* arm64: Only add .disk/udeb_include when the source file exists
[ Luca Boccassi ]
* Create local /etc/os-release with metadata about the live image
[ Helmut Grohne ]
* duplicate aliased diversions for DEP17 (Closes: #1064408)
-- Luca Boccassi <bluca@debian.org> Sat, 10 Aug 2024 00:08:10 +0100
live-build (1:20230502) unstable; urgency=medium
* Team upload
* Add cryptsetup-initramfs to package pool (Closes: #1035360)
-- Jonathan Carter <jcc@debian.org> Tue, 02 May 2023 14:30:24 +0200
live-build (1:20230131) unstable; urgency=medium
[ Roland Clobus ]
* Synchronise all --parent-distribution options.
* Create a clean chroot for the installer.
* Introduce '--debian-installer-distribution git'.
* Rebuild: Use the new settings '--debian-installer-distribution git'.
* Removes 'nomodeset' from fail-safe boot.
* Reproducible hooks: fix version check for libxmlb2
* Build from deb.debian.org
* Drop win32-loader for the images with an installer.
* Add more variables for the splash.svg image (Closes: #1015782)
* rebuild: New option to specify the origin of the d-i binaries
* installer: fail early
* Rebuild: allow execution by sudo-users and root
* Rebuild: Pass only a few environment variables to sub shells
* If the same file exists in multiple locations, take the version from
the first.
* installer: Skip rebuilding the debian installer if it is found in the
cache
* installer: Remove the udeb files
* installer: No error if the udeb-exclusion list is empty
* installer: add grub packages for d-i and Calamares
* installer: Mark the local repository as trusted
[ Nick Brown ]
* Allow APT_AUTH.CONF(5) config files to be used with archives during
bootstrap.
[ Ryan Finnie ]
* chroot_hostname: Fix reference to chroot inside chroot
* Fix build with memtest86+ 6.00
* memtest: Support arch-specific and EFI memtest86+ 6.00
* Memtest GRUB fixes
[ Luca Boccassi ]
* salsa-ci: drop aptly pages publishing, errors out
[ snip ]
* Use same naming scheme for archive keys in chroot and binary stages
-- Luca Boccassi <bluca@debian.org> Tue, 31 Jan 2023 16:27:27 +0000
live-build (1:20220505) unstable; urgency=medium
[ Roland Clobus ]
* The support for FTP proxies has ended
* Simpler handling of http proxies
* Code coverage test (for the proxy)
[ Ryan Finnie ]
* Add initial riscv64 support
* Fix missing variable quoting in proxy handling
[ Roland Clobus ]
* Adding symlink for udeb data for bookworm
* Fix Lintian warning about malformed NEWS file
* Mark the phony targets in the Makefile
* Add file with translatable text (lb_installer.1.pot)
* Remove generated translation files
* Use the release date from the changelog as the date for the last
modification of each manpage
* Bugfix: Add missing package when systemd is active
* Bugfix: Do not copy the content of e.g. /dev/shm when creating hdd
images
* Bugfix: The arguments to the 'tr' command must be quoted.
* Reactivate '--chroot-filesystem plain'.
* Bugfix: The values for '--cache-stages' were not matching the
implementation.
* Clean up the cache directory, if no files are present.
* When update-initramfs is called, clean up the backup files.
* Set the timestamp of the generated iso image.
* Set the timestamp inside hdd images.
* Add hooks for building reproducible images
* Add hook for libxmlb2 (used by appstream)
* Reproducible hooks: Regenerate initrd.img in chroot_hacks only when
chroot_hooks did not regenerate it already.
[ Sophie Brun ]
* Harmonize menu entries (uefi / bios) and add a variable for the
templates
[ Michał Prochera ]
* Unconditional Remove_packages calls in binary_rootfs (Closes: #994982)
[ Roland Clobus ]
* Reproducible hooks: fontconfig got fixed in 2.13.1-4.4.
[ Philip Hands ]
* get the aptly/pages stage to work
[ Roland Clobus ]
* Show git hash as version number, when a local git repo is used.
[ Nick Brown ]
* Echo executing source/binary hooks
* Add auth.conf.d support to archives (Closes: #991065)
[ Rob Shearman ]
* config: respect --bootloaders option again on amd64/i386
[ Roland Clobus ]
* Reproducible hooks: appstream and libxmlb2
* UEFI doesn't like nomodeset in safe mode
* Rebuild a reproducible ISO image.
* Check the actual length of the ISO fields.
* Use a shorter suffix for modified development versions.
* Remove a left-over file when using a package in
config/packages.chroot.
* Reproducible hooks: texlive-base and texlive-binaries
[ Olivier BLIN ]
* Add support for the new includes.chroot system to /etc/hosts file
-- Luca Boccassi <bluca@debian.org> Thu, 05 May 2022 11:13:27 +0100
live-build (1:20210902) unstable; urgency=medium
[ Thore Sommer ]
* Adding dm-verity support for rootfs
* docs: documentation for dm-verity feature
* Enable dm-verity support also for ext filesystems
[ David Hewitt ]
* binary_grub-efi: Allow removal of protected packages
[ Nick Brown ]
* Export variables for hooks (Closes: #992572)
[ Luca Boccassi ]
* Bump debhelper-compat to 13, no changes
* Bump Standards-Version to 4.6.0, no changes
-- Luca Boccassi <bluca@debian.org> Thu, 02 Sep 2021 13:55:32 +0100
live-build (1:20210407) unstable; urgency=medium
* Upload to unstable.
-- Luca Boccassi <bluca@debian.org> Wed, 07 Apr 2021 18:52:50 +0100
live-build (1:20210405) experimental; urgency=medium
* Firmware download: skip architecture if not found (Closes: #986278)
* Autopkgtest: build a buster image
* Autopkgtest: remove architecture restriction
-- Luca Boccassi <bluca@debian.org> Mon, 05 Apr 2021 13:04:04 +0100
live-build (1:20210330) unstable; urgency=medium
* security: do not append /updates for Bullseye and newer.
(Closes: #986148)
-- Luca Boccassi <bluca@debian.org> Tue, 30 Mar 2021 16:17:38 +0100
live-build (1:20210329) unstable; urgency=medium
[ Ryan Finnie ]
* Use --apt-http-proxy/--apt-ftp-proxy for debootstrap
* No mksquashfs progress bar if stdin is not a terminal
[ Unit 193 ]
* firmwarelists.sh: Search Contents-all for firmware too.
[ Roland Clobus ]
* Support security for bullseye. See
https://wiki.debian.org/NewInBullseye. Closes: #964914
* Fixed handling of checksums in combination with the d-i installer.
* Removed filesystem.size for squashfs images.
-- Luca Boccassi <bluca@debian.org> Mon, 29 Mar 2021 10:49:43 +0100
live-build (1:20210216) unstable; urgency=medium
[ Raphaël Hertzog ]
* Add symlinks to support kali releases
[ Roland Clobus ]
* Reproducible fix for glibc
[ Ryan Finnie ]
* binary_syslinux: Do not modify grub theme.txt if grub/splash.png
exists
* Restore_package_cache: Handle existing but empty packages directory
[ Roland Clobus ]
* The local LIVE_BUILD wins over the system live-build for the list of
udeb inclusions. Only copy when the distribution is known
* The local LIVE_BUILD wins over the system live-build for the list of
udeb exclusions
* lilo is not available any more in Bullseye (and newer), see #973850
* Adding symlink for udeb data for bullseye
[ Luca Boccassi ]
* Fix build on architecture without syslinux (Closes: #982746)
* autopkgtest: restrict to amd64 and i386 for now
[ Roland Clobus ]
* mkfs.msdos needs at most 32 bits for the -i argument. Use the
hexadecimal version of SOURCE_DATE_EPOCH, limited to the lower 32 bits
-- Luca Boccassi <bluca@debian.org> Tue, 16 Feb 2021 21:25:05 +0000
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 <raphael@offensive-security.com> Fri, 22 Jan 2021 15:13:32 +0100
live-build (1:20191221) unstable; urgency=medium
* Revert some Kali-specific change in scripts/build/binary_iso
-- Raphaël Hertzog <raphael@offensive-security.com> Thu, 19 Dec 2019 21:07:22 +0100
live-build (1:20191220) unstable; urgency=medium
* Fix "--debian-installer cdrom" and its interaction with binary_package-lists
apt-ftparchive is not able to differentiate between .deb and .udeb so
we have to install them in different pool directories so that we can
regenerate the Packages files without having the .udeb show up
unexpectedly.
Since binary_package-lists can overwrite the Packages files generated
in installer_debian-installer we have to ensure that it also updates
the Release file created formerly.
Ideally we should find a way to avoid the duplication of this logic.
* Bump Standards-Version to 4.4.1
* Switch to debhelper compat level 12
-- Raphaël Hertzog <raphael@offensive-security.com> Thu, 19 Dec 2019 19:16:08 +0100
live-build (1:20191219) unstable; urgency=medium
[ Adrian Gibanel Lopez ]
* Fixed foreign architecture package support to linux kernel flavours
(Closes: #884553)
[ Matthijs Kooijman ]
* Remove --templates from lb_config manpage
* Remove ldlinux.c32 for extlinux and syslinux
[ Roland Clobus ]
* Updated URL in many places.
* Reenabled the command line option for colored messages for all scripts.
The functionality was added 2008-11-01, but was not really active.
* Removed obsolete short command line options. -f was --filesystem -l was
--language -p was --package-list -e was --encryption
* Do not store _QUIET in the configuration file, otherwise the overrides in
the command line get ignored. Adds a documentation line for the other
command line options as well.
* Removed option none for --apt-indices, which was removed in 3.0.2-1.
* Removed option --bootstrap, which is not implemented.
* Mention --breakpoints in 'lb config --help'
* Fixed a typo for --clean in 'lb config --help'
* Manpage: --binary-filesystem also accepts ntfs
* Matched the documentation of --checksums to the implementation in live-boot
* Manpage: Added documentation for --breakpoints
* Manpage: --compression also accepts xz. The default is none
* Manpage: --config synchronised to 'lb config --help'
* Manpage: Added documentation for --zsync
* Manpage: Removed references to command line options that are no longer in
the code: --firmware-binary --firmware-chroot --hooks
--parent-mirror-chroot-updates --parent-mirror-chroot-backports
--parent-mirror-binary-updates --parent-mirror-binary-backports
--mirror-chroot-updates --mirror-chroot-backports --mirror-binary-updates
--mirror-binary-backports --templates
* --initramfs support none and live-boot
* Manpage: Added documentation for --initsystem
* Manpage: Added documentation for --image-name
* Manpage: Added documentation for --hdd-label, --hdd-size and
--hdd-partition-start
* Manpage: --mode explicitly supports debian and progress-linux. Special
handling for ubuntu was dropped 2015-05-03
* Manpage: --parent-archive-areas uses the same argument name as 'lb config
--help'
* Manpage: Added documentation for --firmware-binary and --firmware-chroot
* Manpage: Added documentation for --swap-file-path and --swap-file-size
* Manpage: Added documentation for --loadlin
* Manpage: Added documentation for --bootstrap-qemu-[arch|exclude|static]
* Reordered the command line options to make them in alphabetical order
* Manpage: added missing \fR tags
* Manpage: consistent use of whitespace in the command line option list
* Manpage: typo
* Manpage: Use alphabetical order for the description of the command line
options
* --mirror-binary* was not properly sorted
* Manpage: removed incorrect mentioning of the -d command line option
* Manpage: removed FIXME for the SYNOPSIS section, all options are now
listed
* Manpage: the configuration directory (config) cannot be modified
* Manpage: simplify the description
* Manpage: use 3rd person form when describing an option
* Manpage: Update the default values of --mirror-* and --parent-mirror-*
[ adrian15 ]
* Readd findiso parametre to loopback.cfg generation.
[ Raphaël Hertzog ]
* binary_package-lists: avoid messing with dpkg's status file
* chroot_live-packages: use dpkg-query to see if a package is installed
(Closes: #944983)
* Set default distribution to buster.
Thanks to Алексей Шилин (Closes: #934495)
* installer_debian-installer: don't mess with /var/lib/dpkg/status
* Tweak lintian overrides
* Support --distribution-binary and --distribution-chroot (Closes: #888507)
* Update my email in the Maintainer field.
[ Ronny Standtke ]
* Run binary_hooks after binary_grub-efi (Closes: #940846)
[ John Estabrook ]
* Add local archive keys before configuring local package repository
(Closes: #941691)
-- Raphaël Hertzog <raphael@offensive-security.com> Thu, 19 Dec 2019 18:56:00 +0100
live-build (1:20190311) unstable; urgency=medium
[ Hideki Yamane ]
* use deb.debian.org as default
* We should add buster for release. (Closes: #924293)
[ Luca Boccassi ]
* Bump Standards-Version to 4.3.0, no changes.
-- Luca Boccassi <bluca@debian.org> Mon, 11 Mar 2019 10:08:38 +0000
live-build (1:20180925) unstable; urgency=medium
[ Raphaël Hertzog ]
* Handle includes.chroot files installed over symlinked directories
[ Marcel Partap ]
* copy keys to /etc/apt/trusted.gpg.d with appropriate extension for
them to not be ignored.
[ Steven Shiau ]
* Use gcd{x64.aa64}.efi.signed for amd64/arm64 arch.
[ Luca Boccassi ]
* UEFI: remove the EFI/debian/grub.cfg, not necessary anymore
* Build-Depend on debhelper >= 10~ to facilitate backports.
* Add Rules-Requires-Root: no.
* Bump Standards-Version to 4.2.1.
* lintian: override error on dependency on e2fsprogs
-- Luca Boccassi <bluca@debian.org> Tue, 25 Sep 2018 14:28:19 +0100
live-build (1:20180618) unstable; urgency=medium
* ONIE: make lb clean remove the ONIE binary.
* Avoid apt-key add and just drop the custom user-supplied apt key in
/etc/apt/trusted.gpg.d. Note that this requires the key to be in
armored ASCII format - which is usually the default anyway.
* UEFI: parse vendor from Grub package metadata if available, and use
it in the EFI partition directory layout instead of always using
"debian" (which is still the default fallback).
* Bump Standards-Version to 4.1.4, no changes.
-- Luca Boccassi <bluca@debian.org> Mon, 18 Jun 2018 12:02:55 +0100
live-build (1:20180411) unstable; urgency=medium
* ONIE: Check_package in the host, not the chroot
* ONIE: missing dependency on file
* ONIE: add Recommends for programs needed by binary_onie
* Print an error and exit if a host package (dependency) is missing.
* Reconfigure bootstrapped packages after preseeding.
-- Luca Boccassi <bluca@debian.org> Wed, 11 Apr 2018 12:35:19 +0100
live-build (1:20180328) unstable; urgency=low
[ Raphaël Hertzog ]
* Restore i386/amd64 autodetection in grub after rename of
i386 kernel from -486 to -686. Closes: #884585
Thanks to Adrian Gibanel Lopez for the patch.
* Fix handling of multiple kernels in binary_loopback_cfg.
Closes: #884588 Thanks to Adrian Gibanel Lopez for the patch.
* Rework failsafe entries in grub configuration to be more
consistent with the i386/amd64 autodetection entries.
Closes: #884591 Thanks to Adrian Gibanel Lopez for the patch.
* Add e2fsprogs to Suggests along with mtd-utils, parted. Closes: #887278
* Fix Check_package invocation in binary_hdd for ntfs-3g
(/sbin/mkfs.nfts -> /sbin/mkfs.ntfs)
* Run mksquashfs with nice -n 19 to not overload the system.
Thanks to Ronny Standtke for the patch. (Closes: #867539)
[ Luca Boccassi ]
* Fix build with local offline mirrors (Closes: #891206)
[ Rohan Garg ]
* Simplify bootstrapping of foreign architectures with qemu-debootstrap
(Closes: #847919)
[ Steven Shiau ]
* Add grub-based UEFI boot support for ARM64 (Closes: #885692)
[ Luca Boccassi ]
* UEFI: add minimal grub.cfg to fat32 partition (Closes: #892406)
* UEFI: add support for Secure Boot on amd64 and arm64 (Closes: #821084)
* UEFI: use uppercase EFI directory name for Tianocore
* Add NEWS file to warn users about change of live-boot mount paths
* Add options to build ONIE images
* Add Acquire::AllowInsecureRepositories to fix apt-secure in sid
* Use HTTPS in debian/copyright (policy 4.0.0).
* Bump Standards-Version to 4.1.3.
* Add myself to Uploaders.
-- Luca Boccassi <bluca@debian.org> Wed, 28 Mar 2018 20:20:46 +0100
live-build (1:20171207) unstable; urgency=medium
* Use $SOURCE_DATE_EPOCH when updating timestamps of manual pages in order
to make the package reproducible at build time. Closes: #879169
Thanks to Chris Lamb <lamby@debian.org> for the patch.
* Accept kernels without initrd. Closes: #878430
Thanks to Balint Reczey <balint.reczey@canonical.com> for the patch.
* Fix the way the .disk/mkisofs file is created. Closes: #881941
Thanks to Daniel Reichelt <debian@nachtgeist.net> for the patch.
-- Raphaël Hertzog <hertzog@debian.org> Thu, 07 Dec 2017 20:29:59 +0100
live-build (1:20170920) unstable; urgency=medium
* Auto-update version strings in manual pages.
* Update default value of PREPARER to correct the embedded URL.
* Pass --partscan to losetup to clean up partition devices lingering
from former operations. Closes: #865586
Thanks to Matthijs Kooijman <matthijs@stdin.nl> for the patch.
* Fix multiple issues with LB_BUILD_WITH_CHROOT=false. Closes: #873513
Thanks to Matthijs Kooijman <matthijs@stdin.nl> for the patch.
* Fix size calculation when we use FAT filesystems that do not support
hardlinks. Closes: #873640
Thanks to Matthijs Kooijman <matthijs@stdin.nl> for the patch.
* Replace "kirkwood" and "orion5x" armel flavors with the new
"marvell" (as done by the linux source package since its version 4.4).
-- Raphaël Hertzog <hertzog@debian.org> Wed, 20 Sep 2017 10:01:42 +0200
live-build (1:20170829) unstable; urgency=medium
* Add .disk/mkisofs file recording the xorriso command line. Thanks
to Thomas Schmitt <scdbackup@gmx.net> for the suggestion.
* Initialize /etc/default/locale with LANG=C.UTF-8 so that we always
have a valid UTF-8 locale even when we don't have the "locales"
package installed.
* Drop all references to live-systems.org. Closes: #859290
* Update copyright file.
-- Raphaël Hertzog <hertzog@debian.org> Tue, 29 Aug 2017 14:16:49 +0200
live-build (1:20170807) unstable; urgency=medium
* Add keyboard shortcut on the "Advanced options" syslinux menu entry.
Closes: #864386 Thanks to Daniel Reichelt <debian@nachtgeist.net>
for the patch.
* Drop the --hardlinks option from xorriso command line call. It's not
needed to avoid duplication of files since this is a native feature
of the IS0 filesystem. cf https://bugs.kali.org/view.php?id=4109
for a discussion about this.
-- Raphaël Hertzog <hertzog@debian.org> Mon, 07 Aug 2017 17:29:04 +0200
live-build (1:20170213) unstable; urgency=medium
* Drop the versatile kernel flavour on armel. It's no longer built since
Linux 4.9.
-- Raphaël Hertzog <hertzog@debian.org> Mon, 13 Feb 2017 16:58:00 +0100
live-build (1:20161216) unstable; urgency=medium
* Cleanup binary_loopback_cfg and offer more freedom in overriding
the default grub-pc configuration.
* Update the manual page with the missiong --bootappend-live-failsafe
option.
* Keep supporting the former --bootloader (without s).
-- Raphaël Hertzog <hertzog@debian.org> Fri, 16 Dec 2016 10:05:26 +0100
live-build (1:20161202) unstable; urgency=medium
[ Raphaël Hertzog ]
* Officially adopt the package. Closes: #808048
* Better handle empty package lists.
* Drop ixp4xx from available armel flavors, the image has been gone since
linux 3.17.
* Add symlinks for libgpl.c32 and libmenu.c32 which are required by
the "Hardware Detection Tool (HDT)" menu entry that live-build adds
in the advanced menu.
* Add EFI boot support with grub-efi, thanks to Adrian Gibanel Lopez.
Closes: #731709
* Fix usage of config/packages.chroot/*.deb that has been broken by the
switch to GnuPG2 by default by no longer using GnuPG but relying
on APT's trusted=yes attribute instead.
Thus we no longer have remaining key in /etc/apt/trusted.gpg
after building. Closes: #816204
* Try to reuse /isolinux/splash.png in default grub configuration.
* Drop debian/source/{local-options,options} as they are no longer needed.
* Pass components to debootstrap --second-stage. Closes: #806782
Thanks to Sjoerd Simons <sjoerd.simons@collabora.co.uk> for the patch.
* Fix behaviour of (undocumented) "#nif" conditional test. Closes: #801379
Thanks to Erik Cumps <erik.cumps@esaturnus.com> for the patch.
* Export SOURCE_DATE_EPOCH when running chroot commands. Closes: #832998
Thanks to Chris Lamb <lamby@debian.org> for the patch.
* Set xorriso's "modification time" to SOURCE_DATE_EPOCH. Closes: #831379
Thanks to Chris Lamb <lamby@debian.org> for the patch.
* Support “lb config --debootstrap-script <script>” to use an alternate
bootstrap script when running debootstrap. Thanks to Sjoerd Simons
<sjoerd@debian.org> for the initial patch. Closes: #790033
* Manual pages updates by jnqnfe. Closes: #774730
* Drop left-over translation files for removed lb_testroot command.
* Get rid of useless bootstrap_archive-keys script. Closes: #773775
* Drop an optimization in chroot_archives that has undesired side-effects.
Thanks to jnqnfe for the patch. Closes: #775989
* Drop gpgv and debian-keyring from Suggests.
* Fix Check_installed function when checking against host. Thanks to jnqnfe
for the report. Closes: #774807
* Bump debhelper compat level to 10.
* Bump Standards-Version to 3.9.8.
* Use a grub theme that integrates reasonably well with the current
background picture.
* Default for LB_UNION_FILESYSTEM is now "overlay" just like in live-boot.
* Update the way we generate the version of live-build that is displayed by
lb --version.
* Instead of renaming kernel for syslinux, create hardlinks.
* Simplify grub configuration code to use only long kernel names. Put
advanced options in a submenu. Use distro-agnostic labels.
[ Kristian Klausen ]
* Include ext{3,4} journal size when calculating image size. Closes: #801712
* Switch d-i.debian.org URIs from http to https. Closes: #809699
* Fix typo in binary_syslinux. Closes: #818916
* Correct syslinux/extlinux mbr.bin path. Closes: #773833
-- Raphaël Hertzog <hertzog@debian.org> Fri, 02 Dec 2016 23:33:45 +0100
live-build (1:20151215) unstable; urgency=medium
* QA Upload.
[ Carlos Zuferri ]
* Adding missing file extension to hdd images.
[ Adrian Gibanel Lopez ]
* Multi bootloader support.
* loopback.cfg support in the GRUB setup.
[ Maximilian Mehnert ]
* force link creation when diverting flash-kernel.
* Old BIOS: start partition at specific place.
* scripts/build/binary_hdd:
- Fix code style.
[ Carlos Zuferri ]
* Using 'Live Systems Project' as default project in .pot files.
[ trebmuh ]
* Update French translation for manpages.
[ Ben Armstrong ]
* Remove 586 flavour for i386 architecture. (Closes: #807972)
[ Iain R. Learmonth ]
* Changing to native source format
* debian/control:
- Change maintainer to QA Group.
- Updated Homepage and Vcs-* fields.
-- Iain R. Learmonth <irl@debian.org> Tue, 15 Dec 2015 14:20:44 +0000
live-build (5.0~a11-2) unstable; urgency=low
* Removing myself from uploaders, lost trust in Debian (#804315).
-- Daniel Baumann <mail@daniel-baumann.ch> Fri, 20 Nov 2015 13:04:24 +0100
live-build (5.0~a11-1) unstable; urgency=low
[ Daniel Baumann ]
* Getting rid of hard-coded release numbers and using /etc/os-release
instead (Closes: #790860).
* Updating stat calls to also give the right result in container setups,
thanks to Kristian Klausen <klausenbusk@hotmail.com> (Closes:
#789300).
[ Maximilian Mehnert ]
* Correct syslinux mbr.bin path.
[ Daniel Baumann ]
* Wrap and sort debian control file.
-- Daniel Baumann <mail@daniel-baumann.ch> Sun, 23 Aug 2015 10:57:38 +0200
live-build (5.0~a10-1) unstable; urgency=low
[ Daniel Baumann ]
* Correcting typos in chroot_hooks.
[ Raphaël Hertzog ]
* Do not pass an empty version in APT::FTPArchive::Release::Version
(Closes: #789800).
* Drop elilo from list of d-i required packages on i386.
[ Daniel Reichelt ]
* Fix check for presence of chroot hooks
* Fix hook scripts location in Makefile
[ Daniel Baumann ]
* Simplify hooks pattern in Makefile.
-- Daniel Baumann <mail@daniel-baumann.ch> Mon, 10 Aug 2015 19:35:24 +0200
live-build (5.0~a9-1) unstable; urgency=low
* Splitting non-live specific hooks into their own subdirectory within
hooks.
* Installing apt and dpkg updates (if any) first in derivatives mode,
then doing dist-upgrade.
* Correcting symlinking of hooks in lb config.
* Correcting execution of local binary hooks.
* Correcting execution of local source hooks.
* Removing parent-directory too when cleaning up the config tree bind
mount in chroot.
-- Daniel Baumann <mail@daniel-baumann.ch> Sat, 06 Jun 2015 06:39:47 +0200
live-build (5.0~a8-1) unstable; urgency=low
* Actually removing live-build-cgi from control.
* Correcting leftover reference to binary_grub in binary.
-- Daniel Baumann <mail@daniel-baumann.ch> Tue, 19 May 2015 06:26:38 +0200
live-build (5.0~a7-1) unstable; urgency=low
* Renaming grub2 helper to grub-pc for later grub-efi addition.
* Renaming grub helper to grub-legacy for consistency.
* Dropping obsolete template checks within grub helpers.
* Switching from http.debian.net to httpredir.debian.org as default
binary mirror.
* Removing broken samhain handling (Closes: #785264).
-- Daniel Baumann <mail@daniel-baumann.ch> Thu, 14 May 2015 13:16:38 +0200
live-build (5.0~a6-1) unstable; urgency=low
* Moving grub and grub2 templates into shared bootloader config
@ -6167,7 +7148,7 @@ live-package (0.99.24-1) unstable; urgency=low
- adds LIVE_INCLUDE_CHROOT to the manual exported variables as reported by
Mathieu Geli <mathieu.geli@gmail.com> (Closes: #412325).
-- Daniel Baumann <mail@daniel-baumann.ch> Sun, 3 Mar 2007 12:25:00 +0100
-- Daniel Baumann <mail@daniel-baumann.ch> Sat, 03 Mar 2007 12:25:00 +0100
live-package (0.99.23-1) unstable; urgency=low

1
debian/compat vendored
View File

@ -1 +0,0 @@
9

59
debian/control vendored
View File

@ -1,47 +1,34 @@
Source: live-build
Section: misc
Priority: optional
Maintainer: Live Systems Maintainers <debian-live@lists.debian.org>
Uploaders: Daniel Baumann <mail@daniel-baumann.ch>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.6
Homepage: http://live-systems.org/devel/live-build/
Vcs-Browser: http://live-systems.org/gitweb/?p=live-build.git
Vcs-Git: git://live-systems.org/git/live-build.git
Maintainer: Debian Live <debian-live@lists.debian.org>
Uploaders: Raphaël Hertzog <raphael@offensive-security.com>,
Luca Boccassi <bluca@debian.org>
Build-Depends: debhelper-compat (= 13), devscripts, gettext, po4a
Standards-Version: 4.7.0
Rules-Requires-Root: no
Homepage: https://wiki.debian.org/DebianLive
Vcs-Browser: https://salsa.debian.org/live-team/live-build
Vcs-Git: https://salsa.debian.org/live-team/live-build.git
Package: live-build
Architecture: all
Depends:
${misc:Depends},
debootstrap,
Recommends:
apt-utils,
cpio,
wget,
live-boot-doc,
live-config-doc,
live-manual-html | live-manual,
Suggests:
gpgv,
debian-keyring,
Depends: cpio, debootstrap, ${misc:Depends}
Recommends: apt-utils,
bzip2,
cryptsetup,
file,
live-boot-doc,
live-config-doc,
live-manual-html | live-manual,
rsync,
systemd-container,
wget,
xz-utils
Suggests: e2fsprogs, eatmydata, git, mtd-utils, parted
Description: Live System Build Components
The Live Systems project maintains the components to build Debian based Live
The Debian Live project maintains the components to build Debian based Live
systems and the official Debian Live images themselves.
.
live-build contains the components to build a live system from a configuration
directory.
Package: live-build-cgi
Architecture: all
Depends: ${misc:Depends}, live-build (= ${source:Version})
Recommends:
apache2 | httpd,
cron,
Description: Live System Build Scripts (CGI frontend)
The Live Systems project maintains the components to build Debian based Live
systems and the official Debian Live images themselves.
.
live-build contains the components to build a live system from a configuration
directory.
.
This package contains the CGI frontend (experimental!).

10
debian/copyright vendored
View File

@ -1,10 +1,12 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: live-build
Upstream-Contact: Live Systems Project <debian-live@lists.debian.org>
Source: http://live-systems.org/archive/packages/live-build/
Upstream-Contact: Debian Live Project <debian-live@lists.debian.org>
Files: *
Copyright: 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
Copyright:
2016-2020 The Debian Live team
2016-2017 Raphaël Hertzog <hertzog@debian.org>
2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
License: GPL-3+
License: GPL-3+

55
debian/gitlab-ci.yml vendored Normal file
View File

@ -0,0 +1,55 @@
---
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
variables:
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
.lb-build:
stage: test
script:
- apt-get update
- apt-get install -y "$(find . -type f -name '*.deb')"
- lb --version
# We need to stay within the maximum limit for artifacts on Salsa (250M),
# so disable a few things
- lb config --apt-indices false --apt-recommends false --firmware-chroot false --source false --distribution sid --updates false --debootstrap-options "--variant=minbase" --bootloaders grub-efi
# But do install user-setup and sudo to have a usable image
- echo "user-setup sudo" > config/package-lists/recommends.list.chroot
# xz compresses initrds much better than zstd
- echo xz-utils >> config/package-lists/live.list.chroot
- mkdir -p config/includes.chroot_after_packages/etc/initramfs-tools/conf.d/
- printf 'COMPRESS=xz\nCOMPRESSLEVEL=9\n' > config/includes.chroot_after_packages/etc/initramfs-tools/conf.d/compress
# Remove stuff not really needed to boot
- echo 'rm -rf /usr/share/doc/* /usr/share/i18n/* /usr/share/man/* /usr/share/locale/*' >> config/hooks/normal/9020-remove-man-cache.hook.chroot
# Build the ISO
- lb build
- ls -lh
- cp live-image-${BUILD_ARCH}.contents ${WORKING_DIR}
- cp live-image-${BUILD_ARCH}.hybrid.iso ${WORKING_DIR}
artifacts:
when: always
paths:
- ${WORKING_DIR}/live-image-${BUILD_ARCH}.contents
- ${WORKING_DIR}/live-image-${BUILD_ARCH}.hybrid.iso
needs:
- job: build
artifacts: true
ISO amd64:
extends:
- .lb-build
variables:
BUILD_ARCH: 'amd64'
ISO arm64:
extends:
- .lb-build
rules:
- if: $CI_PROJECT_ROOT_NAMESPACE != "rclobus-guest"
variables:
BUILD_ARCH: 'arm64'
tags:
- $SALSA_CI_ARM_RUNNER_TAG

View File

@ -1,7 +1,7 @@
Before submitting a bug report against live-build, please make sure
that you have read your guidelines for live systems bug reports:
http://live-systems.org/manual/
https://live-team.pages.debian.net/live-manual/
By providing the required information as outlined in the guidelines makes
sure that we can optimally reproduce and fix bugs, not doing so wastes a

View File

@ -1 +1,6 @@
live-build: symlink-should-be-relative
live-build: absolute-symlink-in-top-level-folder
# Those cases are legitimate uses of direct access to the database
live-build: uses-dpkg-database-directly [usr/lib/live/build/chroot_tmpfs]
live-build: uses-dpkg-database-directly [usr/lib/live/build/clean]
live-build: uses-dpkg-database-directly [usr/share/live/build/functions/chroot.sh]
live-build: uses-dpkg-database-directly [usr/share/live/build/hooks/normal/8010-remove-backup-files.hook.chroot]

16
debian/rules vendored
View File

@ -1,20 +1,18 @@
#!/usr/bin/make -f
%:
dh ${@} --parallel
dh $@
override_dh_auto_install:
# Update manual pages first
$(MAKE) -C manpages update
$(MAKE) -C manpages build
dh_auto_install -- DESTDIR=debian/live-build
# Removing unused files
rm -f debian/live-build/usr/share/doc/live-build/COPYING
override_dh_builddeb:
dh_builddeb -- -Zxz
override_dh_link:
dh_link
# workaround dh_link convertion of absolute symlinks to relvative symlinks
rm -rf debian/live-build/usr/share/live/build/bootloaders
cp -a share/bootloaders debian/live-build/usr/share/live/build/bootloaders
# workaround dh_link conversion of absolute symlinks to relative symlinks
dh_link -X.c32 -Xisolinux.bin -Xpxelinux.0

View File

@ -1 +1 @@
3.0 (quilt)
3.0 (native)

11
debian/source/lintian-overrides vendored Normal file
View File

@ -0,0 +1,11 @@
# Ignore those errors, it's not nice but works currently
absolute-symbolic-link-target-in-source /usr/lib/ISOLINUX/isolinux.bin [share/bootloaders/isolinux/isolinux.bin]
absolute-symbolic-link-target-in-source /usr/lib/PXELINUX/pxelinux.0 [share/bootloaders/pxelinux/pxelinux.0]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/hdt.c32 [share/bootloaders/syslinux_common/hdt.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/ldlinux.c32 [share/bootloaders/isolinux/ldlinux.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/ldlinux.c32 [share/bootloaders/pxelinux/ldlinux.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/libcom32.c32 [share/bootloaders/syslinux_common/libcom32.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/libgpl.c32 [share/bootloaders/syslinux_common/libgpl.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/libmenu.c32 [share/bootloaders/syslinux_common/libmenu.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/libutil.c32 [share/bootloaders/syslinux_common/libutil.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/vesamenu.c32 [share/bootloaders/syslinux_common/vesamenu.c32]

View File

@ -1 +0,0 @@
abort-on-upstream-changes

View File

@ -1 +0,0 @@
compression = xz

15
debian/tests/build-default-image vendored Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -eu
set -o pipefail
cd "${AUTOPKGTEST_TMP}"
# Use the default values
lb config --verbose
# Verify some values
lb config --dump | grep 'LB_DISTRIBUTION="testing"'
lb config --dump | grep 'LB_UPDATES="true"'
lb config --dump | grep 'LB_SECURITY="true"'
lb config --dump | grep 'LB_PROPOSED_UPDATES="false"'
lb build --verbose
ls -l

21
debian/tests/build-kali-image vendored Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
set -eu
set -o pipefail
# Ensure Kali's keyring archive is installed and is always up to date
echo "Acquire::Retries 5;" > /etc/apt/apt.conf.d/live-build-ci
curl https://archive.kali.org/archive-key.asc > /etc/apt/trusted.gpg.d/kali.asc
mkdir -p /etc/apt/sources.list.d
echo "deb http://http.kali.org/kali kali-rolling main" > /etc/apt/sources.list.d/kali.list
apt-get update
apt-get install -y kali-archive-keyring
rm -f /etc/apt/trusted.gpg.d/kali.asc /etc/apt/sources.list.d/kali.list /etc/apt/apt.conf.d/live-build-ci
apt-get update
cd "${AUTOPKGTEST_TMP}"
git clone --depth 1 --no-tags https://gitlab.com/kalilinux/build-scripts/live-build-config.git
cd live-build-config
./build.sh --verbose
ls -l
ls -l images

14
debian/tests/build-stable-image vendored Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -eu
set -o pipefail
cd "${AUTOPKGTEST_TMP}"
# A minimal command line
lb config --verbose --distribution stable
# Verify some default values
lb config --dump | grep 'LB_UPDATES="true"'
lb config --dump | grep 'LB_SECURITY="true"'
lb config --dump | grep 'LB_PROPOSED_UPDATES="false"'
lb build --verbose
ls -l

20
debian/tests/control vendored Normal file
View File

@ -0,0 +1,20 @@
Tests: build-default-image
Depends: live-build
Restrictions: allow-stderr, needs-internet, needs-root
Tests: build-stable-image
Depends: live-build
Restrictions: allow-stderr, needs-internet, needs-root
Tests: build-kali-image
Depends: apt-utils,
bzip2,
ca-certificates,
cpio,
curl,
file,
git,
live-build,
wget,
xz-utils
Restrictions: allow-stderr, flaky, needs-internet, needs-root

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.

View File

@ -0,0 +1,63 @@
#!/bin/sh
set -e
# util-linux creates random UUIDs when uuid_generate_random is called
# Use LD_PRELOAD to replace uuid_generate_random with a less random version
# Don't run if gcc is not installed
if [ ! -e /usr/bin/cc ];
then
exit 0
fi
cat > unrandomize_uuid_generate_random.c << END_OF_SOURCE
#include <stdlib.h>
#include <stdio.h>
#define SEQUENCE_FILENAME "/var/cache/unrandomize_uuid_generate_random.sequence_number"
/* https://tools.ietf.org/html/rfc4122 */
typedef unsigned char uuid_t[16];
/* Our pseudo-random version */
void uuid_generate_random(uuid_t out)
{
/* Nil UUID */
for (int i=0;i<16;i++) {
out[i] = 0x00;
}
out[6]=0x40; /* UUID version 4 means randomly generated */
out[8]=0x80; /* bit7=1,bit6=0 */
/* The file doesn't need to exist yet */
FILE *f = fopen(SEQUENCE_FILENAME, "rb");
if (f) {
fread(out+12, 4, 1, f);
fclose(f);
}
/* Use the next number. Endianness is not important */
(*(unsigned long*)(out+12))++;
unsigned long long epoch;
/* Use SOURCE_DATE_EPOCH when provided */
char *date = getenv("SOURCE_DATE_EPOCH");
if (date) {
epoch = strtoll(date, NULL, 10);
} else {
epoch = 0ll;
}
out[0] = (epoch & 0xFF000000) >> 24;
out[1] = (epoch & 0x00FF0000) >> 16;
out[2] = (epoch & 0x0000FF00) >> 8;
out[3] = (epoch & 0x000000FF);
/* Write the sequence number */
f = fopen(SEQUENCE_FILENAME, "wb");
if (f) {
fwrite(out+12, 4, 1, f);
fclose(f);
}
}
END_OF_SOURCE
/usr/bin/cc -shared -fPIC unrandomize_uuid_generate_random.c -Wall --pedantic -o /usr/lib/unrandomize_uuid_generate_random.so
rm -f unrandomize_uuid_generate_random.c

View File

@ -0,0 +1,31 @@
#!/bin/sh
set -e
# fontconfig creates non-reproducible files with UUIDs
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864082
#
# Because the UUIDs should not be deleted, the proposed work-around is:
# * Use LD_PRELOAD to replace uuid_generate_random with a less random version
# Don't run if fontconfig is not installed
if [ ! -e /usr/bin/fc-cache ];
then
exit 0
fi
# Don't run if fontconfig is sufficiently new
if dpkg --compare-versions $(dpkg-query --show --showformat '${Version}\n' fontconfig | head -1) ge 2.13.1-4.4~;
then
exit 0
fi
# Don't run if the LD_PRELOAD module is not compiled
if [ ! -e /usr/lib/unrandomize_uuid_generate_random.so ];
then
echo "P: $(basename $0) Reproducible hook inactive: The UUID module was not found"
exit 0
fi
LD_PRELOAD=/usr/lib/unrandomize_uuid_generate_random.so /usr/bin/fc-cache --force --really-force --system-only --verbose
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,21 @@
#!/bin/sh
set -e
# mkconf of mdadm creates a file with a timestamp
# A bug report with patch is available at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982607
# This script duplicates that patch
# Don't run if mdadm is not installed
if [ ! -e /usr/share/mdadm/mkconf ];
then
exit 0
fi
# If mkconf already contains references to SOURCE_DATE_EPOCH, there is no need to patch the file
if grep -q SOURCE_DATE_EPOCH /usr/share/mdadm/mkconf;
then
exit 0
fi
sed -i -e '/# This configuration was auto-generated on/cif [ -z $SOURCE_DATE_EPOCH ]; then\n echo "# This configuration was auto-generated on $(date -R) by mkconf"\nelse\n echo "# This configuration was auto-generated on $(date -R --utc -d@$SOURCE_DATE_EPOCH) by mkconf"\nfi' /usr/share/mdadm/mkconf
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,28 @@
#!/bin/sh
set -e
# update-perl-sax-parsers of libxml-sax-perl creates a file with a random order of its lines
# A bug report with patch is available at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993444
# This script duplicates that patch
# Don't run if libxml-sax-perl is not installed
if [ ! -e /usr/bin/update-perl-sax-parsers ];
then
exit 0
fi
# If Debian.pm already contains a sort line, there is no need to patch the file
if grep -q sort /usr/share/perl5/XML/SAX/Debian.pm;
then
exit 0
fi
# Patch the Perl script
sed -i -e '/foreach my $key/s/keys/sort keys/' /usr/share/perl5/XML/SAX/Debian.pm
# Regenerate the file that has more than one key-value pair
update-perl-sax-parsers --remove XML::SAX::Expat
update-perl-sax-parsers --add XML::SAX::Expat --priority 50
update-perl-sax-parsers --update
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,62 @@
#!/bin/sh
set -e
# libxmlb2 creates random GUIDs
# See https://github.com/hughsie/libxmlb/issues/110
# Fixed upstream: https://github.com/hughsie/libxmlb/commit/0652ec042cc0611b9b98e080e64e1025db9b4183
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006358
#
# Until a sufficiently new version is installed, apply the work-around
# Don't run if libxmlb2 is not installed
if [ ! -e /usr/share/doc/libxmlb2 ];
then
exit 0
fi
# Don't run if AppStream is not installed
if [ ! -e /usr/bin/appstreamcli ];
then
exit 0
fi
# Don't run if the version of libxmlb2 is sufficiently new
if dpkg --compare-versions $(dpkg-query --show --showformat '${Version}\n' libxmlb2 | head -1) ge 0.3.7~;
then
exit 0
fi
# Refresh the compressed XML files
appstreamcli refresh --force > /dev/null
# appstream <= 0.15.1 uses /var/cache/app-info
# appstream >= 0.15.2 uses /var/cache/swcatalog
if [ -d /var/cache/swcatalog ];
then
CACHE_PATH=/var/cache/swcatalog/cache
else
CACHE_PATH=/var/cache/app-info/cache
fi
# Set the GUID field for each compressed XML file to zero
for f in $(ls ${CACHE_PATH}/*.xb);
do
dd if=$f of=tmp.xb count=8 iflag=count_bytes status=none
dd if=/dev/zero of=tmp.xb count=16 iflag=count_bytes status=none oflag=append conv=notrunc
dd if=$f of=tmp.xb skip=24 iflag=skip_bytes status=none oflag=append conv=notrunc
rm $f
mv tmp.xb $f
done
# When apt update is invoked, 50appstream calls 'appstreamcli refresh'
# so add another hook to reset the guid again
#
# Before the chroot is finalised, 'apt update' is invoked again, so the reset guid step needs to be re-applied
cat << EOF > /etc/apt/apt.conf.d/51appstream_reset_guid
# Reset the GUID of the AppStream cache files when APT's cache is updated (i.e. apt update)
APT::Update::Post-Invoke-Success {
"if /usr/bin/test -w ${CACHE_PATH} -a -e /usr/bin/appstreamcli; then for f in \$(ls ${CACHE_PATH}/*.xb); do dd if=\$f of=tmp.xb count=8 iflag=count_bytes status=none; dd if=/dev/zero of=tmp.xb count=16 iflag=count_bytes status=none oflag=append conv=notrunc; dd if=\$f of=tmp.xb skip=24 iflag=skip_bytes status=none oflag=append conv=notrunc; rm \$f; mv tmp.xb \$f; done; fi";
};
EOF
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,60 @@
#!/bin/sh
set -e
# This script fixes several issues:
# 1. The fmt files contain timestamps
# 2. The fmt files randomly select the path to language.dat.lua and language.def
# (/var/lib/texmf/tex/generic/config vs /usr/share/texlive/texmf-dist/tex/generic/config)
# 3. The fmt files have a random order due to the way iterators work in lua
# The function 'exception_strings' uses these iterators
# https://sources.debian.org/src/texlive-bin/2021.20210626.59705-1/texk/web2c/luatexdir/lang/texlang.c/?hl=501#L501
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009196
# 4. The 'tex' executable intentionally ignores SOURCE_DATE_EPOCH
# See https://sources.debian.org/src/texlive-bin/2021.20210626.59705-1/debian/patches/debian-SDE-docs-in-tex-etex-manpage/?hl=36#L36
# Note: This hook must run before 0140-remove-log-files.hook.chroot and 0190-remove-temporary-files.hook.chroot
# Don't run if texlive-binaries is not installed
if [ ! -e /usr/bin/luahbtex ];
then
exit 0
fi
# This is TeX: set FORCE_SOURCE_DATE to enable SOURCE_DATE_EPOCH -> fixes 1 and 2
export FORCE_SOURCE_DATE=1
# Generate the .fmt file 10 times. If the content differs, a fix for 3 is required
for i in $(seq 1 10); do luahbtex -ini -jobname=luahbtex -progname=luabhtex luatex.ini > /dev/null; md5sum luahbtex.fmt >> md5sum.luahbtex; done
rm -f luahbtex.fmt
rm -f luahbtex.log
if [ $(sort -u < md5sum.luahbtex | wc -l) -ne 1 ];
then
# Ugly hack: remove the hyphenation exceptions -> fixes 3
# This results in incorrect hyphenation, but it is a work-around until the function 'exception_strings' has been adjusted
sed -i -e '/as-so-ciate/d;/as-so-ciates/d;/dec-li-na-tion/d;/oblig-a-tory/d;/phil-an-thropic/d;/present/d;/presents/d;/project/d;/projects/d;/reci-procity/d;/re-cog-ni-zance/d;/ref-or-ma-tion/d;/ret-ri-bu-tion/d;/ta-ble/d' /usr/share/texlive/texmf-dist/tex/generic/hyphen/hyphen.tex
echo "P: $(basename $0) Reproducible hack has been applied: hyphenation of some words will be incorrect"
fi
rm -f md5sum.luahbtex
# Rebuild all .fmt and .log files in /var/lib/texmf/web2c
fmtutil --sys --all
# Use faketime to enforce a timestamp -> fixes 4
# NB: hooks don't know about the apt/aptitude selection, so use 'apt-get'
export FAKETIME_ALREADY_INSTALLED=1
if [ ! -e /usr/bin/faketime ];
then
FAKETIME_ALREADY_INSTALLED=0
apt-get install faketime --yes -o Acquire::Check-Valid-Until=false
fi
OLD_PWD=$(pwd)
cd /var/lib/texmf/web2c/tex
faketime $(date --utc -d@$SOURCE_DATE_EPOCH --iso-8601=seconds) tex -ini -jobname=tex -progname=tex tex.ini
cd ${OLD_PWD}
if [ ${FAKETIME_ALREADY_INSTALLED} -eq 0 ];
then
apt-get remove --purge --yes faketime
apt-get autoremove --yes
fi
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,30 @@
#!/bin/sh
set -e
# The file /var/lib/texmf/web2c/updmap.log contains timestamps for the files that it just generated
# Not reported yet. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=XXXXXXX
# Don't run if texlive-base is not installed
if [ ! -e /usr/bin/updmap ];
then
exit 0
fi
# Don't run if the script has been fixed
if grep -q gmtime /usr/share/texlive/texmf-dist/scripts/texlive/updmap.pl;
then
exit 0
fi
# Change: printf LOG "%s\n\n", scalar localtime();
# To : printf LOG "%s\n\n", defined $ENV{SOURCE_DATE_EPOCH} ? scalar gmtime($ENV{SOURCE_DATE_EPOCH}) : scalar localtime();
sed -i -e "/scalar localtime/s/scalar localtime/defined \$ENV{SOURCE_DATE_EPOCH} ? scalar gmtime(\$ENV{SOURCE_DATE_EPOCH}) : scalar localtime/" /usr/share/texlive/texmf-dist/scripts/texlive/updmap.pl
# Change: my ($s,$m,$h,$D,$M,$Y)=localtime($stat[9]);
# To : my ($s,$m,$h,$D,$M,$Y)=defined $ENV{SOURCE_DATE_EPOCH} ? gmtime($ENV{SOURCE_DATE_EPOCH}) : localtime($stat[9]);
sed -i -e "/localtime([$]/s/localtime/defined \$ENV{SOURCE_DATE_EPOCH} ? gmtime(\$ENV{SOURCE_DATE_EPOCH}) : localtime/" /usr/share/texlive/texmf-dist/scripts/texlive/updmap.pl
# The timestamp of the files that are generated by the script will be corrected in the 'lb binary' phase
updmap -sys
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,27 @@
#!/bin/sh
set -e
# mktexlsr and mktexlsr.pl generate different output
# Whichever of both scripts is run last, determines the output of /var/lib/texmf/ls-R
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003449
# Don't run if texlive-base is not installed
if [ ! -e /usr/share/texlive/texmf-dist/scripts/texlive/mktexlsr ];
then
exit 0
fi
# Don't run if the version of mktexlsr is sufficiently new
if grep -q "Also remove double empty" /usr/share/texlive/texmf-dist/scripts/texlive/mktexlsr;
then
exit 0
fi
# Apply only the functional part of the patch in #1003449 (removes double empty lines)
sed -i -e "/vc_dirs'\./s/[\\]/| cat -s \\\\/" /usr/share/texlive/texmf-dist/scripts/texlive/mktexlsr
# Run the shell script, this hook is the last invoker.
# The output in /var/lib/texmf/ls-R will be sorted
mktexlsr
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,87 @@
#!/bin/sh
set -e
# vlc-cache-gen uses readdir() which depends on the order in the filesystem
# Don't run if vlc is not installed
if [ ! -x /usr/lib/x86_64-linux-gnu/vlc/vlc-cache-gen ];
then
exit 0
fi
# Don't run if the cache file does not exist
if [ ! -e /usr/lib/x86_64-linux-gnu/vlc/plugins/plugins.dat ];
then
exit 0
fi
# Install disorderfs when needed and mark for removal at the end
_DISORDERFS_PREINSTALLED=yes
if [ ! -x /usr/bin/disorderfs ];
then
_DISORDERFS_PREINSTALLED=no
apt-get install --yes disorderfs
fi
# Install the fuse device (needed by disorderfs) and mark for removal at the end
_FUSE_DEVICE_PRESENT=yes
if [ ! -e /dev/fuse ];
then
_FUSE_DEVICE_PRESENT=no
mknod /dev/fuse c 10 229
fi
# Check for changes in the cache file, for suppressing the output if no change was made
_CHECK_FOR_CHANGES=yes
if [ ! -x /usr/bin/sha256sum ];
then
_CHECK_FOR_CHANGES=no
fi
# Prepare a directory with a stable sorting order
_ORDERED_DIR=$(mktemp --directory)
disorderfs /usr/lib/x86_64-linux-gnu/vlc/plugins ${_ORDERED_DIR} --reverse-dirents=no --sort-dirents=yes --quiet
# The checksum of the original file
if [ "${_CHECK_FOR_CHANGES}" = "yes" ];
then
sha256sum /usr/lib/x86_64-linux-gnu/vlc/plugins/plugins.dat > ${_ORDERED_DIR}/before.sha256sum
fi
# Regenerate the cache file in a directory which guarantees the sorting order of the files
/usr/lib/x86_64-linux-gnu/vlc/vlc-cache-gen ${_ORDERED_DIR}
# Verify the checksum for changes
if [ "${_CHECK_FOR_CHANGES}" = "yes" ];
then
_HOOK_WAS_NEEDED=no
sha256sum --check ${_ORDERED_DIR}/before.sha256sum --status || _HOOK_WAS_NEEDED=yes
rm -f ${_ORDERED_DIR}/before.sha256sum
fi
# Cleanup
fusermount -u ${_ORDERED_DIR}
rmdir ${_ORDERED_DIR}
if [ "${_DISORDERFS_PREINSTALLED}" = "no" ];
then
apt-get remove --yes --purge disorderfs
apt-get autoremove --yes
fi
if [ "${_FUSE_DEVICE_PRESENT}" = "no" ];
then
rm -f /dev/fuse
fi
# Report only when either a change was detected or not detectable (due to missing tools)
if [ "${_CHECK_FOR_CHANGES}" = "yes" ];
then
if [ "${_HOOK_WAS_NEEDED}" = "yes" ];
then
echo "P: $(basename $0) Reproducible hook has been applied"
fi
else
echo "P: $(basename $0) Reproducible hook has been applied"
fi

View File

@ -0,0 +1,42 @@
#!/bin/sh
set -e
# install-info has an unstable sort order when a new section is added
# Fixed by https://git.savannah.gnu.org/cgit/texinfo.git/commit/?id=01b5a4b9c33bef08feae041c221f820a1c76749f
#
# The postinst-hook of install-info depends on the natural order of the
# filesystem and deletes the existing dir file beforehand.
# Installing the same info.gz file again follows a different code path,
# which has a stable sort order
# Don't run if install-info is not installed
if [ ! -x /usr/bin/install-info ];
then
exit 0
fi
# Don't run if install-info is sufficiently new
if dpkg --compare-versions $(dpkg-query --show --showformat '${Version}\n' install-info | head -1) gt 7.2~;
then
exit 0
fi
# Keep the original file
cp /usr/share/info/dir /tmp/before
# dir, dircolors, dirname / pr, printenv, printf / tr, true, truncate / who, whoami
install-info /usr/share/info/coreutils.info.gz /usr/share/info/dir
# diff, diff3
install-info /usr/share/info/diffutils.info.gz /usr/share/info/dir
# dirmngr, dirmngr-client
if [ -e /usr/share/info/gnupg.info.gz ];
then
install-info /usr/share/info/gnupg.info.gz /usr/share/info/dir
fi
# Only report when the hook has made a difference
if ! diff /tmp/before /usr/share/info/dir > /dev/null;
then
echo "P: $(basename $0) Reproducible hook has been applied"
fi
rm -f /tmp/before

View File

@ -0,0 +1,64 @@
#!/bin/sh
set -e
# /etc/ssl/certs/java/cacerts is a keystore
# Due to cryptographic requirements, it will be non-reproducible
# as it embeds timestamps
# It can be re-generated with low overhead
# Don't run if ca-certificates-java is not installed
if [ ! -e /etc/ssl/certs/java/cacerts ];
then
exit 0
fi
# Remove the file
rm -f /etc/ssl/certs/java/cacerts
# Add a hook to live-config to recreate it
cat << EOF > /usr/lib/live/config/5000-ca-certificates-java
#!/bin/sh
. /lib/live/config.sh
## live-config(7) - System Configuration Components
## Copyright (C) 2024 The Debian Live team
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
Init ()
{
# Checking if package is installed
if ! pkg_is_installed "ca-certificates-java" || \\
component_was_executed "ca-certificates-java"
then
exit 0
fi
# If the keystore is embedded in the image, don't touch it
if [ -e /etc/ssl/certs/java/cacerts ]
then
exit 0
fi
echo -n " ca-certificates-java"
}
Config ()
{
# Re-generate the keystore
touch /var/lib/ca-certificates-java/fresh
dpkg-reconfigure ca-certificates-java
# Creating state file
touch /var/lib/live/config/ca-certificates-java
}
Init
Config
EOF
chmod u=rwx,go=rx /usr/lib/live/config/5000-ca-certificates-java
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,25 @@
#!/bin/sh
set -e
# update-dictcommon-aspell creates a file with content depending on PERL_HASH_SEED
# A bug report with patch is available at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1090981
# This script duplicates that patch
# Don't run if the file is not present
if [ ! -e /usr/share/perl5/Debian/DictionariesCommon.pm ];
then
exit 0
fi
# If DictionariesCommon.pm already contains a sort statement at line 656, there is no need to patch the file
if sed -e '656p;d' /usr/share/perl5/Debian/DictionariesCommon.pm | grep -q "foreach my \$k (sort keys"
then
exit 0
fi
# Patch the Perl script (at line 656)
sed -i -e '656s/keys/sort keys/' /usr/share/perl5/Debian/DictionariesCommon.pm
update-dictcommon-aspell
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
# Delete all older backups of ucf files
# The current files are /var/lib/ucf/hashfile and /var/lib/ucf/registry
rm -f /var/lib/ucf/hashfile.*
rm -f /var/lib/ucf/registry.*

View File

@ -0,0 +1,38 @@
#!/bin/sh
set -e
# fontconfig creates non-reproducible files with UUIDs
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864082
#
# Because the UUIDs should not be deleted, the proposed work-around is:
# * Use LD_PRELOAD to replace uuid_generate_random with a less random version
# Don't run if fontconfig is not installed
if [ ! -e /usr/bin/fc-cache ];
then
exit 0
fi
# Don't run if fontconfig is sufficiently new
if dpkg --compare-versions $(dpkg-query --show --showformat '${Version}\n' fontconfig | head -1) ge 2.13.1-4.4~;
then
exit 0
fi
# Don't run if there is no font in the initrd.img file
if ! lsinitramfs /initrd.img | grep "^var/cache/fontconfig" | grep ".cache-7$" > /dev/null;
then
exit 0
fi
# Don't run if the LD_PRELOAD module is not compiled
if [ ! -e /usr/lib/unrandomize_uuid_generate_random.so ];
then
echo "P: $(basename $0) Reproducible hook inactive: The UUID module was not found"
exit 0
fi
LD_PRELOAD=/usr/lib/unrandomize_uuid_generate_random.so update-initramfs -k all -u
touch /initrd.img_has_already_been_regenerated
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,41 @@
#!/bin/sh
set -e
# 'appstreamcli refresh --source=os' which is invoked by 'apt-get update'
# creates cache files that will be re-generated by live-config.
# These cache files are generated by lb for the C locale, while after boot in
# the live image the actual language is used (default=en_US) when a network
# connection was made. If no network is available 'GNOME Software' still works
# correctly without these cache files.
# Therefore these files can safely be removed from the live image.
#
# However, after all hooks have run, 'apt-get update' is run once again by
# 'chroot_archives chroot remove', therefore the original executable
# 'appstreamcli' is moved away by this script, to be restored upon the next
# invocation.
# Don't run if AppStream is not installed
if [ ! -e /usr/bin/appstreamcli ];
then
exit 0
fi
# Don't run if the version of appstream is too old
if dpkg --compare-versions $(dpkg-query --show --showformat '${Version}\n' appstream | head -1) lt 0.15.2~;
then
exit 0
fi
# Create a wrapper that restores itself on the next invocation
mv /usr/bin/appstreamcli /usr/bin/appstreamcli.orig
cat << EOF > /usr/bin/appstreamcli
#!/bin/sh
/usr/bin/appstreamcli.orig \$@
rm /usr/bin/appstreamcli
mv /usr/bin/appstreamcli.orig /usr/bin/appstreamcli
# Delete the cache files
rm -f /var/cache/swcatalog/cache/C-*.xb
EOF
chmod a+x /usr/bin/appstreamcli
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
# Remove the module and its data file
rm -f /usr/lib/unrandomize_uuid_generate_random.so
rm -f /var/cache/unrandomize_uuid_generate_random.sequence_number

View File

@ -0,0 +1,11 @@
Use these scripts to generate reproducible images.
See the generic Wiki page: https://wiki.debian.org/ReproducibleInstalls/LiveImages
After 'lb config' and before 'lb build' you should copy these hooks:
cp /usr/share/doc/live-build/examples/hooks/reproducible/* config/hooks/normal
or (when using the latest git version):
cp $LIVE_BUILD/examples/hooks/reproducible/* config/hooks/normal

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -11,80 +12,70 @@
set -e
# Including common functions
[ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
[ -n "${LIVE_BUILD}" ] && [ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'utility to build live systems')"
HELP="FIXME"
USAGE="FIXME"
PROGRAM="${FRONTEND}"
DESCRIPTION="Utility to build live systems"
USAGE="lb {clean|config|build}"
case "${1}" in
-h|--help)
if [ -x "$(which man 2>/dev/null)" ]
then
man lb
exit 0
else
${0} --usage
exit 0
fi
;;
# This bits of code relies on the fact that we only accept
# options without values before the real command.
GLOBAL_ARGS=""
while true; do
case $1 in
-*)
GLOBAL_ARGS="${GLOBAL_ARGS:+$GLOBAL_ARGS }$1"
shift
;;
*)
break
;;
esac
done
Arguments $GLOBAL_ARGS
""|-u|--usage)
Usage
;;
if [ $# = 0 ]; then
Echo_error "Missing sub-command"
Usage --fail
fi
-v|--version)
echo "${VERSION}"
exit 0
;;
COMMAND="${1}"
shift
*)
COMMAND="${1}"
shift
if [ -x "${LIVE_BUILD}/scripts/build/${COMMAND}" ]; then
# User has live-build copied locally in the system
SCRIPT="${LIVE_BUILD}/scripts/build/${COMMAND}"
elif [ -x "local/live-build/scripts/build/${COMMAND}" ]; then
# User has live-build copied locally in the config
SCRIPT="local/live-build/scripts/build/${COMMAND}";
elif [ -x /usr/lib/live/build/${COMMAND} ]; then
# User has live-build installed in the system
SCRIPT=/usr/lib/live/build/"${COMMAND}"
else
Echo_error "Unknown command: ${COMMAND}"
exit 1
fi
ENV=""
if [ "${COMMAND}" != "config" ]; then
# Checking user account
if [ "$(id -u)" -ne "0" ]; then
Echo_error "Root privileges needed!"
exit 1
fi
fi
if [ "${COMMAND}" != "config" ]
then
# Checking user account
if [ "$(id -u)" -ne "0" ]
then
Echo_error "need root privileges"
exit 1
fi
fi
ENV=""
for _FILE in config/environment config/environment.binary; do
if [ -e "${_FILE}" ]; then
ENV="${ENV} $(grep -v '^#' ${_FILE})"
fi
done
for _FILE in config/environment config/environment.binary
do
if [ -e "${_FILE}" ]
then
ENV="${ENV} $(grep -v '^#' ${_FILE})"
fi
done
_CMD_LABEL="lb ${COMMAND}"
if [ "${_COLOR_OUT}" = "true" ]; then
_CMD_LABEL="${CYAN}${_CMD_LABEL}${NO_COLOR}"
fi
Echo "[%s] ${_CMD_LABEL} %s" "$(date +'%F %T')" "$(echo ${GLOBAL_ARGS} ${@})"
if [ -x "${LIVE_BUILD}/scripts/build/${COMMAND}" ]
then
# User has live-build copied locally in the system
SCRIPT="${LIVE_BUILD}/scripts/build/${COMMAND}"
elif [ -x "local/live-build/scripts/build/${COMMAND}" ]
then
# User has live-build copied locally in the config
SCRIPT="local/live-build/scripts/build/${COMMAND}"
elif [ -x /usr/lib/live/build/${COMMAND} ]
then
# User has live-build installed in the system
SCRIPT=/usr/lib/live/build/"${COMMAND}"
elif [ -x "$(which ${COMMAND} 2>/dev/null)" ]
then
# User has live-build commands in path
SCRIPT="${COMMAND}"
else
Echo_error "no such script: ${COMMAND}"
exit 1
fi
Echo "[%s] %s" "$(date +'%F %T')" "lb ${COMMAND} $(echo ${@})"
${ENV} exec "${SCRIPT}" "${@}"
;;
esac
exec /usr/bin/env ${ENV} "${SCRIPT}" ${GLOBAL_ARGS} "${@}"

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program is free software: you can redistribute it and/or modify
@ -22,7 +23,7 @@
set -e
if [ -x "$(which man 2>/dev/null)" ]
if command -v man >/dev/null
then
man live-build
else

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -15,18 +16,14 @@ Find_files ()
In_list ()
{
NEEDLES="${1}"
local NEEDLE="${1}"
shift
for ITEM in ${@}
do
for NEEDLE in ${NEEDLES}
do
if [ "${NEEDLE}" = "${ITEM}" ]
then
return 0
fi
done
local ITEM
for ITEM in "${@}"; do
if [ "${NEEDLE}" = "${ITEM}" ]; then
return 0
fi
done
return 1
@ -34,8 +31,8 @@ In_list ()
Truncate ()
{
for FILE in ${@}
do
local FILE
for FILE in "${@}"; do
if [ ! -L ${FILE} ]
then
: > ${FILE}

View File

@ -1,124 +0,0 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
Check_architectures ()
{
ARCHITECTURES="${@}"
VALID="false"
for ARCHITECTURE in ${ARCHITECTURES}
do
if [ "$(echo ${LB_ARCHITECTURES} | grep ${ARCHITECTURE})" ]
then
VALID="true"
break
fi
done
if [ "${ARCHITECTURES}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]
then
VALID="true"
if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]
then
Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURES} was not found"
VALID="false"
fi
if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]
then
Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable"
VALID="false"
fi
fi
if [ "${VALID}" = "false" ]
then
Echo_warning "skipping %s, foreign architecture(s)." "${0}"
exit 0
fi
}
Check_crossarchitectures ()
{
if [ -x /usr/bin/dpkg ]
then
HOST="$(dpkg --print-architecture)"
else
HOST="$(uname -m)"
fi
case "${HOST}" in
amd64|i386|x86_64)
CROSS="amd64 i386"
;;
powerpc|ppc64)
CROSS="powerpc ppc64"
;;
*)
CROSS="${HOST}"
;;
esac
if [ "${LB_ARCHITECTURES}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]
then
if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]
then
Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURES} was not found"
exit 0
fi
if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]
then
Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable"
exit 0
fi
return
fi
Check_architectures "${CROSS}"
}
Check_multiarchitectures ()
{
if [ "$(echo ${LB_ARCHITECTURES} | wc -w)" -gt "1" ]
then
# First, only support multiarch on iso
case "${LIVE_IMAGE_TYPE}" in
iso*)
# Assemble multi-arch
case "${LB_CURRENT_ARCHITECTURE}" in
amd64)
DESTDIR="${DESTDIR}.amd"
DESTDIR_LIVE="${DESTDIR_LIVE}.amd"
DESTDIR_INSTALL="${DESTDIR_INSTALL}.amd"
;;
i386)
DESTDIR="${DESTDIR}.386"
DESTDIR_LIVE="${DESTDIR_LIVE}.386"
DESTDIR_INSTALL="${DESTDIR_INSTALL}.386"
;;
powerpc)
DESTDIR="${DESTDIR}.ppc"
DESTDIR_LIVE="${DESTDIR_LIVE}.ppc"
DESTDIR_INSTALL="${DESTDIR_INSTALL}.ppc"
;;
esac
;;
esac
fi
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,73 +11,95 @@
Arguments ()
{
ARGUMENTS="$(getopt --longoptions breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}")"
local LONGOPTS="breakpoints,color,debug,force,help,no-color,quiet,usage,verbose,version"
local SHORTOPTS="huv"
if [ "${?}" != "0" ]
then
Echo_error "terminating" >&2
local ARGUMENTS
local ERR=0
ARGUMENTS="$(getopt --shell sh --name "${PROGRAM}" --longoptions $LONGOPTS --options $SHORTOPTS -- "${@}")" || ERR=$?
if [ $ERR -eq 1 ]; then
Echo_error "invalid argument(s)"
exit 1
elif [ $ERR -ne 0 ]; then
Echo_error "getopt failure"
exit 1
fi
eval set -- "${ARGUMENTS}"
while true
do
case "${1}" in
--breakpoints)
_BREAKPOINTS="true"
while true; do
local ARG="${1}"
case "${ARG}" in
--breakpoints|--color|--debug|--force|-h|--help|--no-color|--quiet|-u|--usage|--verbose|-v|--version)
Handle_common_option "${ARG}"
shift
;;
-c|--conffile)
_CONFFILE="${2}"
shift 2
;;
--debug)
_DEBUG="true"
shift
;;
--force)
_FORCE="true"
shift
;;
-h|--help)
Man
shift
;;
--quiet)
_QUIET="true"
shift
;;
-u|--usage)
Usage
shift
;;
--verbose)
_VERBOSE="true"
shift
;;
-v|--version)
echo "${VERSION}"
exit 0
;;
--)
shift
break
;;
*)
Echo_error "internal error %s" "${0}"
Echo_error "Internal error, unhandled option: %s" "${ARG}"
exit 1
;;
esac
done
}
Handle_common_option ()
{
case "${1}" in
--breakpoints)
_BREAKPOINTS="true"
;;
--color)
_COLOR="true"
_COLOR_OUT="true"
_COLOR_ERR="true"
;;
--no-color)
_COLOR="false"
_COLOR_OUT="false"
_COLOR_ERR="false"
;;
--debug)
_DEBUG="true"
;;
--force)
_FORCE="true"
;;
-h|--help)
Man
;;
--quiet)
_QUIET="true"
;;
-u|--usage)
Usage --exit
;;
--verbose)
_VERBOSE="true"
;;
-v|--version)
echo "${VERSION}"
exit 0
;;
*)
Echo_error "Internal error: Unknown common option '%s'" "${1}"
exit 1
;;
esac
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,7 +11,7 @@
Breakpoint ()
{
NAME="${1}"
local NAME="${1}"
if [ "${_BREAKPOINTS}" = "true" ]
then

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -8,30 +9,30 @@
## under certain conditions; see COPYING for details.
Restore_cache ()
Restore_package_cache ()
{
DIRECTORY="${1}"
local DIRECTORY="cache/packages.${1}"
if [ "${LB_CACHE}" = "true" ] && [ "${LB_CACHE_PACKAGES}" = "true" ]
then
if [ -e "${DIRECTORY}" ]
then
# Restore old cache
if [ "$(stat --printf %d ${DIRECTORY})" = "$(stat --printf %d chroot/var/cache/apt/archives)" ]
if [ "$(stat --printf %d ${DIRECTORY}/)" = "$(stat --printf %d chroot/var/cache/apt/archives/)" ]
then
# with hardlinks
find "${DIRECTORY}" -name "*.deb" | xargs cp -fl -t chroot/var/cache/apt/archives
find "${DIRECTORY}" -name "*.deb" -print0 | xargs -0 --no-run-if-empty cp -fl -t chroot/var/cache/apt/archives
else
# without hardlinks
find "${DIRECTORY}" -name "*.deb" | xargs cp -t chroot/var/cache/apt/archives
find "${DIRECTORY}" -name "*.deb" -print0 | xargs -0 --no-run-if-empty cp -t chroot/var/cache/apt/archives
fi
fi
fi
}
Save_cache ()
Save_package_cache ()
{
DIRECTORY="${1}"
local DIRECTORY="cache/packages.${1}"
if [ "${LB_CACHE}" = "true" ] && [ "${LB_CACHE_PACKAGES}" = "true" ]
then
@ -46,6 +47,7 @@ Save_cache ()
mkdir -p "${DIRECTORY}"
# Saving new cache
local PACKAGE
for PACKAGE in chroot/var/cache/apt/archives/*.deb
do
if [ -e "${DIRECTORY}"/"$(basename ${PACKAGE})" ]

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,14 +11,16 @@
Chroot ()
{
CHROOT="${1}"; shift
COMMANDS="${@}"
local CHROOT="${1}"; shift
local COMMANDS
COMMANDS="${@}" #must be on separate line to 'local' declaration to avoid error
# Executing commands in chroot
Echo_debug "Executing: %s" "${COMMANDS}"
ENV=""
local ENV=""
local _FILE
for _FILE in config/environment config/environment.chroot
do
if [ -e "${_FILE}" ]
@ -26,7 +29,44 @@ Chroot ()
fi
done
${_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}
${_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} http_proxy=${http_proxy} no_proxy=${no_proxy} ${ENV} ${COMMANDS}
return "${?}"
return ${?}
}
Chroot_has_package() {
local PACKAGE="${1}"; shift
local CHROOT="${2:-chroot}"; shift
if dpkg-query --admindir=${CHROOT}/var/lib/dpkg -s ${PACKAGE} >/dev/null 2>&1 | grep -q "^Status: install"
then
return 0
fi
return 1
}
Chroot_package_list() {
local CHROOT="${1:-chroot}"; shift
dpkg-query --admindir=${CHROOT}/var/lib/dpkg -W -f'${Package}\n'
}
Chroot_copy_dir() {
local DIR="${1}"
local NAME="${2:-$(basename ${DIR})}"
Check_installed host /usr/bin/rsync rsync
if [ "${INSTALL_STATUS}" -eq "0" ]
then
Echo_message "Copying ${NAME} into chroot using rsync..."
rsync -Klrv --chown=0:0 "${DIR}" chroot/
else
cd "${DIR}"
Echo_message "Creating a tarball with files from ${NAME}..."
tar cf "${OLDPWD}"/chroot/"${NAME}".tar .
cd "${OLDPWD}"
Echo_message "Extracting the tarball in the chroot..."
Chroot chroot "tar -xvf ${NAME}.tar --no-same-owner --keep-directory-symlink --overwrite"
rm chroot/"${NAME}".tar
fi
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,6 +11,9 @@
Chroot_bind_path ()
{
local CHROOT
local BIND_SRC
local BIND_DEST
CHROOT="$(readlink -f ${1})"
BIND_SRC="$(readlink -f ${2})"
@ -26,6 +30,9 @@ Chroot_bind_path ()
Chroot_unbind_path ()
{
local CHROOT
local BIND_SRC
local BIND_DEST
CHROOT="$(readlink -f ${1})"
BIND_SRC="$(readlink -f ${2})"

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,6 +11,7 @@
NO_COLOR="\033[0m"
BOLD="\033[1m"
UNDERSCORE="\033[4m"
BLINK="\033[5m"

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -8,11 +9,30 @@
## under certain conditions; see COPYING for details.
PROGRAM="live-build"
VERSION="$(if [ -e ${LIVE_BUILD}/VERSION ]; then cat ${LIVE_BUILD}/VERSION; else cat /usr/share/live/build/VERSION; fi)"
CONFIG_VERSION="$(echo ${VERSION} | awk -F- '{ print $1 }')"
PROGRAM_NAME="live-build"
FRONTEND="lb"
PROGRAM="${FRONTEND} $(basename "${0}")"
VERSION=""
# Find the version:
# 1) For development versions, the git hash with date
# 2) For distributed source code, the version from the changelog
# 3) For installed versions, the version from the file VERSION
if [ ! -z "${LIVE_BUILD}" -a "$(command -v git)" -a -e ${LIVE_BUILD}/.git ]; then
VERSION="$(cd ${LIVE_BUILD}; git log -n 1 --pretty=format:%H_%aI)"
# If a local modification is made or there are staged commits, add 'mod'
# See https://stackoverflow.com/questions/2657935/checking-for-a-dirty-index-or-untracked-files-with-git
if ! $(cd ${LIVE_BUILD}; git diff-index --quiet HEAD --ignore-submodules --); then
VERSION="${VERSION}_mod"
fi
fi
if [ -z "${VERSION}" -a ! -z "${LIVE_BUILD}" -a -e ${LIVE_BUILD}/debian/changelog ]; then
# Remove the epoch
VERSION="$(dpkg-parsechangelog -S Version | sed -e 's/^[0-9]://')"
fi
if [ -z "${VERSION}" ]; then
VERSION="$(cat /usr/share/live/build/VERSION)"
fi
# FIXME
LIVE_BUILD_VERSION="${CONFIG_VERSION}"
LIVE_BUILD_VERSION="${VERSION}"
PATH="${PWD}/local/bin:${PATH}"

30
functions/compatibility.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
# We've added the option to also include files before packages renamed the old directory.
# This function auto detects which version should be used.
select_includes_chroot(){
local OLD_DIR="includes.chroot"
local NEW_DIR="includes.chroot_after_packages"
if Find_files "config/${NEW_DIR}/" && Find_files "config/${OLD_DIR}/"
then
Echo_error "You have files in ${OLD_DIR} and ${NEW_DIR}. Only one directory is allowed."
exit 1
fi
if Find_files "config/${NEW_DIR}/"
then
echo -n "${NEW_DIR}"
elif Find_files "config/${OLD_DIR}/"
then
echo -n "${OLD_DIR}"
fi
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -8,18 +9,24 @@
## under certain conditions; see COPYING for details.
Common_conffiles ()
{
echo "config/all config/common config/bootstrap config/chroot config/binary config/source"
}
Get_conffiles ()
{
local FILES
if [ -n "${LB_CONFIG}" ]
then
FILES="${LB_CONFIG}"
else
for FILE in ${@}
do
FILES="${FILES} ${FILE} ${FILE}.${LB_ARCHITECTURES} ${FILE}.${DISTRIBUTION}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||')"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||').${ARCHITECTURE}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lb_||').${DISTRIBUTION}"
# List standard files first, then possible user arch/dist overrides
FILES="${@}"
local FILE
for FILE in "${@}"; do
FILES="${FILES} ${LB_ARCHITECTURE:+$FILE.$LB_ARCHITECTURE}"
FILES="${FILES} ${LB_DISTRIBUTION:+$FILE.$LB_DISTRIBUTION}"
done
fi
@ -28,6 +35,7 @@ Get_conffiles ()
Read_conffiles ()
{
local CONFFILE
for CONFFILE in $(Get_conffiles "${@}")
do
if [ -f "${CONFFILE}" ]
@ -45,6 +53,7 @@ Read_conffiles ()
Print_conffiles ()
{
local CONFFILE
for CONFFILE in $(Get_conffiles "${@}")
do
if [ -f "${CONFFILE}" ]

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -8,31 +9,928 @@
## under certain conditions; see COPYING for details.
Get_configuration ()
# Prepare config for use, filling in defaults where no value provided for instance
#
# This function should avoid performing validation checks and failing from invalid values.
# Validation should be done through `Validate_config()`.
Prepare_config ()
{
_CONFIGURATION_FILE="${1}"
_FIELD_NAME="${2}"
# Colouring is re-evaluated here just incase a hard coded override was given in the saved config
case "${_COLOR}" in
true)
_COLOR_OUT="true"
_COLOR_ERR="true"
;;
false)
_COLOR_OUT="false"
_COLOR_ERR="false"
;;
auto)
;;
esac
_BREAKPOINTS="${_BREAKPOINTS:-false}"
_DEBUG="${_DEBUG:-false}"
_FORCE="${_FORCE:-false}"
_QUIET="${_QUIET:-false}"
_VERBOSE="${_VERBOSE:-false}"
if [ -e "${_CONFIGURATION_FILE}" ]
then
_FIELD_BODY="$(grep ^${_FIELD_NAME}: ${_CONFIGURATION_FILE} | awk '{ $1=""; print $0 }' | sed -e 's|^ ||')"
export LB_CONFIGURATION_VERSION="${LB_CONFIGURATION_VERSION:-${LIVE_BUILD_VERSION}}"
export LIVE_CONFIGURATION_VERSION="${LB_CONFIGURATION_VERSION}" #for backwards compatibility with hooks
LB_SYSTEM="${LB_SYSTEM:-live}"
LB_MODE="${LB_MODE:-debian}"
LB_DERIVATIVE="false"
LB_DISTRIBUTION="${LB_DISTRIBUTION:-testing}"
LB_DISTRIBUTION_CHROOT="${LB_DISTRIBUTION_CHROOT:-${LB_DISTRIBUTION}}"
LB_DISTRIBUTION_BINARY="${LB_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_CHROOT}}"
# Do a reproducible build, i.e. is SOURCE_DATE_EPOCH already set?
_REPRODUCIBLE="${SOURCE_DATE_EPOCH:-false}"
if [ "${_REPRODUCIBLE}" != "false" ]; then
_REPRODUCIBLE=true
fi
# For a reproducible build, use UTC per default, otherwise the local time
_UTC_TIME_DEFAULT=${_REPRODUCIBLE}
echo ${_FIELD_BODY}
}
# The current time: for a unified timestamp throughout the building process
export SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date '+%s')}"
Set_configuration ()
{
_CONFIGURATION_FILE="${1}"
_FIELD_NAME="${2}"
_FIELD_BODY="${3}"
if grep -qs "^${_FIELD_NAME}:" "${_CONFIGURATION_FILE}"
then
# Update configuration
sed -i -e "s|^${_FIELD_NAME}:.*$|${_FIELD_NAME}: ${_FIELD_BODY}|" "${_CONFIGURATION_FILE}"
LB_UTC_TIME="${LB_UTC_TIME:-${_UTC_TIME_DEFAULT}}"
# Set UTC option for use with `date` where applicable
if [ "${LB_UTC_TIME}" = "true" ]; then
DATE_UTC_OPTION="--utc"
else
# Append configuration
echo "${_FIELD_NAME}: ${_FIELD_BODY}" >> "${_CONFIGURATION_FILE}"
DATE_UTC_OPTION=""
fi
export LB_IMAGE_NAME="${LB_IMAGE_NAME:-live-image}"
export LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso-hybrid}"
#for backwards compatibility with hooks
export LIVE_IMAGE_NAME="${LB_IMAGE_NAME}"
export LIVE_IMAGE_TYPE="${LB_IMAGE_TYPE}"
if [ -z "${LB_ARCHITECTURE}" ]; then
if command -v dpkg >/dev/null; then
LB_ARCHITECTURE="$(dpkg --print-architecture)"
else
case "$(uname -m)" in
x86_64)
LB_ARCHITECTURE="amd64"
;;
i?86)
LB_ARCHITECTURE="i386"
;;
*)
Echo_error "Unable to determine current architecture"
exit 1
;;
esac
fi
fi
export LB_ARCHITECTURE
# For backwards compat with custom hooks and conditional includes
export LB_ARCHITECTURES="${LB_ARCHITECTURE}"
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-main}"
LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS:-${LB_ARCHIVE_AREAS}}"
export LB_ARCHIVE_AREAS="$(echo "${LB_ARCHIVE_AREAS}" | tr "," " ")"
export LB_PARENT_ARCHIVE_AREAS="$(echo "${LB_PARENT_ARCHIVE_AREAS}" | tr "," " ")"
LB_BACKPORTS="${LB_BACKPORTS:-false}"
if [ -n "$LB_PARENT_DISTRIBUTION" ]; then
LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT:-${LB_PARENT_DISTRIBUTION}}"
LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY:-${LB_PARENT_DISTRIBUTION}}"
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION}}"
else
LB_PARENT_DISTRIBUTION_CHROOT="${LB_PARENT_DISTRIBUTION_CHROOT:-${LB_DISTRIBUTION_CHROOT}}"
LB_PARENT_DISTRIBUTION_BINARY="${LB_PARENT_DISTRIBUTION_BINARY:-${LB_DISTRIBUTION_BINARY}}"
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_DEBIAN_INSTALLER_DISTRIBUTION}}"
fi
LB_APT="${LB_APT:-apt}"
LB_APT_HTTP_PROXY="${LB_APT_HTTP_PROXY}"
LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS:-true}"
LB_APT_SECURE="${LB_APT_SECURE:-true}"
LB_APT_SOURCE_ARCHIVES="${LB_APT_SOURCE_ARCHIVES:-true}"
LB_APT_INDICES="${LB_APT_INDICES:-true}"
APT_OPTIONS="${APT_OPTIONS:---yes -o Acquire::Retries=5}"
APTITUDE_OPTIONS="${APTITUDE_OPTIONS:---assume-yes -o Acquire::Retries=5}"
BZIP2_OPTIONS="${BZIP2_OPTIONS:--6}"
GZIP_OPTIONS="${GZIP_OPTIONS:--6}"
LZIP_OPTIONS="${LZIP_OPTIONS:--6}"
LZMA_OPTIONS="${LZMA_OPTIONS:--6}"
XZ_OPTIONS="${XZ_OPTIONS:--6}"
if gzip --help | grep -qs "\-\-rsyncable"
then
GZIP_OPTIONS="$(echo ${GZIP_OPTIONS} | sed -E -e 's|[ ]?--rsyncable||') --rsyncable"
fi
LB_CACHE="${LB_CACHE:-true}"
if [ "${LB_CACHE}" = "false" ]
then
LB_CACHE_INDICES="false"
LB_CACHE_PACKAGES="false"
LB_CACHE_STAGES="bootstrap" #bootstrap caching currently required for process to work
else
LB_CACHE_INDICES="${LB_CACHE_INDICES:-false}"
LB_CACHE_PACKAGES="${LB_CACHE_PACKAGES:-true}"
LB_CACHE_STAGES="${LB_CACHE_STAGES:-bootstrap}"
fi
LB_CACHE_STAGES="$(echo "${LB_CACHE_STAGES}" | tr "," " ")"
LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND:-noninteractive}"
LB_DEBCONF_PRIORITY="${LB_DEBCONF_PRIORITY:-critical}"
case "${LB_SYSTEM}" in
live)
LB_INITRAMFS="${LB_INITRAMFS:-live-boot}"
;;
normal)
LB_INITRAMFS="${LB_INITRAMFS:-none}"
;;
esac
LB_INITRAMFS_COMPRESSION="${LB_INITRAMFS_COMPRESSION:-gzip}"
case "${LB_SYSTEM}" in
live)
LB_INITSYSTEM="${LB_INITSYSTEM:-systemd}"
;;
normal)
LB_INITSYSTEM="${LB_INITSYSTEM:-none}"
;;
esac
if [ "${LB_ARCHITECTURE}" = "i386" ] && [ "${CURRENT_IMAGE_ARCHITECTURE}" = "amd64" ]
then
# Use linux32 when building amd64 images on i386
_LINUX32="linux32"
else
_LINUX32=""
fi
# Mirrors:
# *_MIRROR_BOOTSTRAP: to fetch packages from
# *_MIRROR_CHROOT: to fetch packages from
# *_MIRROR_CHROOT_SECURITY: security mirror to fetch packages from
# *_MIRROR_BINARY: mirror which ends up in the image
# *_MIRROR_BINARY_SECURITY: security mirror which ends up in the image
# *_MIRROR_DEBIAN_INSTALLER: to fetch installer from
if [ "${LB_MODE}" = "debian" ]; then
LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://deb.debian.org/debian/}"
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-${LB_MIRROR_BOOTSTRAP}}"
fi
LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT:-${LB_MIRROR_BOOTSTRAP}}"
LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIRROR_CHROOT:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
if [ "${LB_MODE}" = "debian" ]; then
LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-http://security.debian.org/}"
LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-${LB_MIRROR_CHROOT_SECURITY}}"
LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-http://deb.debian.org/debian/}"
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-${LB_MIRROR_BINARY}}"
LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-http://security.debian.org/}"
LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-${LB_MIRROR_BINARY_SECURITY}}"
fi
LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_PARENT_MIRROR_CHROOT}}"
LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM:-squashfs}"
LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-overlay}"
LB_INTERACTIVE="${LB_INTERACTIVE:-false}"
LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-debian-archive-keyring}"
# first, handle existing LB_LINUX_FLAVOURS for backwards compatibility
if [ -n "${LB_LINUX_FLAVOURS}" ]; then
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS}"
fi
case "${LB_ARCHITECTURE}" in
arm64)
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-arm64}"
;;
armel)
# armel will have special images: one rootfs image and many additional kernel images.
# therefore we default to all available armel flavours
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-marvell}"
;;
armhf)
# armhf will have special images: one rootfs image and many additional kernel images.
# therefore we default to all available armhf flavours
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-armmp armmp-lpae}"
;;
amd64)
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-amd64}"
;;
i386)
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-686-pae}"
;;
ia64)
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-itanium}"
;;
powerpc)
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-powerpc64 powerpc}"
;;
ppc64el)
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-powerpc64le}"
;;
riscv64)
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-riscv64}"
;;
s390x)
LB_LINUX_FLAVOURS_WITH_ARCH="${LB_LINUX_FLAVOURS_WITH_ARCH:-s390x}"
;;
*)
Echo_error "Architecture(s) ${LB_ARCHITECTURE} not yet supported (FIXME)"
exit 1
;;
esac
LB_LINUX_FLAVOURS=""
for FLAVOUR in ${LB_LINUX_FLAVOURS_WITH_ARCH}
do
ARCH_FILTERED_FLAVOUR="$(echo ${FLAVOUR} | awk -F':' '{print $1}')"
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:+$LB_LINUX_FLAVOURS }${ARCH_FILTERED_FLAVOUR}"
done
LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES:-linux-image}"
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat32}"
case "${LB_PARENT_DISTRIBUTION_BINARY}" in
sid|unstable)
LB_SECURITY="${LB_SECURITY:-false}"
LB_UPDATES="${LB_UPDATES:-false}"
LB_PROPOSED_UPDATES="${LB_PROPOSED_UPDATES:-false}"
;;
*)
LB_SECURITY="${LB_SECURITY:-true}"
LB_UPDATES="${LB_UPDATES:-true}"
LB_PROPOSED_UPDATES="${LB_PROPOSED_UPDATES:-false}"
;;
esac
case "${LB_ARCHITECTURE}" in
amd64|i386)
LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso-hybrid}"
;;
*)
LB_IMAGE_TYPE="${LB_IMAGE_TYPE:-iso}"
;;
esac
case "${LB_ARCHITECTURE}" in
amd64|i386)
if [ "${LB_INITRAMFS}" = "dracut-live" ]; then
LB_BOOTLOADER_BIOS="${LB_BOOTLOADER_BIOS:-grub-pc}"
else
LB_BOOTLOADER_BIOS="${LB_BOOTLOADER_BIOS:-syslinux}"
fi
if ! In_list "${LB_IMAGE_TYPE}" hdd netboot; then
LB_BOOTLOADER_EFI="${LB_BOOTLOADER_EFI:-grub-efi}"
fi
;;
arm64)
if ! In_list "${LB_IMAGE_TYPE}" hdd netboot; then
LB_BOOTLOADER_EFI="${LB_BOOTLOADER_EFI:-grub-efi}"
fi
;;
esac
# Command line option combines BIOS and EFI selection in one.
# Also, need to support old config files that held `LB_BOOTLOADERS`.
# Note that this function does not perform validation, so none is done here.
if [ -n "${LB_BOOTLOADERS}" ]; then
LB_BOOTLOADERS="$(echo "${LB_BOOTLOADERS}" | tr "," " ")"
unset LB_BOOTLOADER_BIOS
unset LB_BOOTLOADER_EFI
local BOOTLOADER
for BOOTLOADER in $LB_BOOTLOADERS; do
case "${BOOTLOADER}" in
grub-legacy|grub-pc|syslinux)
LB_BOOTLOADER_BIOS="${BOOTLOADER}"
;;
grub-efi)
LB_BOOTLOADER_EFI="${BOOTLOADER}"
;;
esac
done
fi
LB_CHECKSUMS="${LB_CHECKSUMS:-sha256}"
LB_COMPRESSION="${LB_COMPRESSION:-none}"
LB_ZSYNC="${LB_ZSYNC:-false}"
LB_BUILD_WITH_CHROOT="${LB_BUILD_WITH_CHROOT:-true}"
LB_BUILD_WITH_TMPFS="${LB_BUILD_WITH_TMPFS:-false}"
LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER:-none}"
if [ "${LB_DEBIAN_INSTALLER}" = "false" ]
then
LB_DEBIAN_INSTALLER="none"
Echo_warning "A value of 'false' for option LB_DEBIAN_INSTALLER is deprecated, please use 'none' in future."
fi
if [ "${LB_DEBIAN_INSTALLER}" = "true" ]
then
LB_DEBIAN_INSTALLER="netinst"
Echo_warning "A value of 'true' for option LB_DEBIAN_INSTALLER is deprecated, please use 'netinst' in future."
fi
# cdrom-checker in d-i requires a md5 checksum file
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]
then
if [ "${LB_CHECKSUMS}" = "none" ]
then
LB_CHECKSUMS="md5"
else
if ! In_list md5 ${LB_CHECKSUMS}; then
LB_CHECKSUMS=${LB_CHECKSUMS}" md5"
fi
fi
fi
LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_DISTRIBUTION}}"
LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-true}"
if [ -z "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
then
if Find_files config/debian-installer/preseed.cfg
then
LB_DEBIAN_INSTALLER_PRESEEDFILE="/preseed.cfg"
fi
if Find_files config/debian-installer/*.cfg && [ ! -e config/debian-installer/preseed.cfg ]
then
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."
fi
fi
LB_ISO_APPLICATION="${LB_ISO_APPLICATION:-Debian Live}"
LB_ISO_PREPARER="${LB_ISO_PREPARER:-live-build @LB_VERSION@; https://salsa.debian.org/live-team/live-build}"
LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER:-Debian Live project; https://wiki.debian.org/DebianLive; debian-live@lists.debian.org}"
# The string @ISOVOLUME_TS@ must have the same length as the output of `date +%Y%m%d-%H:%M`
LB_ISO_VOLUME="${LB_ISO_VOLUME:-Debian ${LB_DISTRIBUTION} @ISOVOLUME_TS@}"
case "${LB_INITRAMFS}" in
live-boot)
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-boot=live components quiet splash}"
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-boot=live components memtest noapic noapm nodma nomce nosmp nosplash vga=788}"
;;
dracut-live)
# Replace all spaces with underscore for the CD label
LB_ISO_VOLUME="$(echo "${LB_ISO_VOLUME}" | tr " " "_")"
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-boot=live components quiet splash rd.live.image root=live:CDLABEL=${LB_ISO_VOLUME} rd.live.dir=live rd.live.squashimg=filesystem.squashfs}"
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-boot=live components memtest noapic noapm nodma nomce nosmp nosplash vga=788 rd.live.image root=live:CDLABEL=${LB_ISO_VOLUME} rd.live.dir=live rd.live.squashimg=filesystem.squashfs}"
;;
none)
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-quiet splash}"
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-memtest noapic noapm nodma nomce nosmp nosplash vga=788}"
;;
esac
local _LB_BOOTAPPEND_PRESEED
if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
then
case "${LB_IMAGE_TYPE}" in
iso|iso-hybrid)
_LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
hdd)
_LB_BOOTAPPEND_PRESEED="file=/hd-media/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
netboot)
case "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" in
*://*)
_LB_BOOTAPPEND_PRESEED="file=${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
*)
_LB_BOOTAPPEND_PRESEED="file=/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
esac
;;
tar)
;;
esac
fi
if [ -n ${_LB_BOOTAPPEND_PRESEED} ]
then
LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL} ${_LB_BOOTAPPEND_PRESEED}"
fi
LB_BOOTAPPEND_INSTALL="$(echo ${LB_BOOTAPPEND_INSTALL} | sed -e 's/[ \t]*$//')"
LB_HDD_LABEL="${LB_HDD_LABEL:-DEBIAN_LIVE}"
LB_HDD_SIZE="${LB_HDD_SIZE:-auto}"
LB_MEMTEST="${LB_MEMTEST:-none}"
if [ "${LB_MEMTEST}" = "false" ]; then
LB_MEMTEST="none"
Echo_warning "A value of 'false' for option LB_MEMTEST is deprecated, please use 'none' in future."
fi
case "${LB_ARCHITECTURE}" in
amd64|i386)
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]; then
LB_LOADLIN="${LB_LOADLIN:-true}"
else
LB_LOADLIN="${LB_LOADLIN:-false}"
fi
;;
*)
LB_LOADLIN="${LB_LOADLIN:-false}"
;;
esac
LB_WIN32_LOADER="${LB_WIN32_LOADER:-false}"
LB_NET_TARBALL="${LB_NET_TARBALL:-true}"
LB_ONIE="${LB_ONIE:-false}"
LB_ONIE_KERNEL_CMDLINE="${LB_ONIE_KERNEL_CMDLINE:-}"
LB_FIRMWARE_CHROOT="${LB_FIRMWARE_CHROOT:-true}"
LB_FIRMWARE_BINARY="${LB_FIRMWARE_BINARY:-true}"
LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE:-512}"
LB_UEFI_SECURE_BOOT="${LB_UEFI_SECURE_BOOT:-auto}"
LB_SOURCE="${LB_SOURCE:-false}"
LB_SOURCE_IMAGES="${LB_SOURCE_IMAGES:-tar}"
LB_SOURCE_IMAGES="$(echo "${LB_SOURCE_IMAGES}" | tr "," " ")"
# Foreign/port bootstrapping
if [ -n "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]; then
LB_BOOTSTRAP_QEMU_ARCHITECTURE="${LB_BOOTSTRAP_QEMU_ARCHITECTURES}"
unset LB_BOOTSTRAP_QEMU_ARCHITECTURES
Echo_warning "LB_BOOTSTRAP_QEMU_ARCHITECTURES was renamed to LB_BOOTSTRAP_QEMU_ARCHITECTURE, please update your config."
fi
LB_BOOTSTRAP_QEMU_ARCHITECTURE="${LB_BOOTSTRAP_QEMU_ARCHITECTURE:-}"
LB_BOOTSTRAP_QEMU_EXCLUDE="${LB_BOOTSTRAP_QEMU_EXCLUDE:-}"
LB_BOOTSTRAP_QEMU_STATIC="${LB_BOOTSTRAP_QEMU_STATIC:-}"
}
Validate_config ()
{
Validate_config_permitted_values
Validate_config_dependencies
}
# Check values are individually permitted, including:
# - value in list of available values
# - string lengths within permitted ranges
Validate_config_permitted_values ()
{
if [ "${LB_APT_INDICES}" != "true" ] && [ "${LB_APT_INDICES}" != "false" ]; then
Echo_error "Value for LB_APT_INDICES (--apt-indices) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_APT_RECOMMENDS}" != "true" ] && [ "${LB_APT_RECOMMENDS}" != "false" ]; then
Echo_error "Value for LB_APT_RECOMMENDS (--apt-recommends) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_APT_SECURE}" != "true" ] && [ "${LB_APT_SECURE}" != "false" ]; then
Echo_error "Value for LB_APT_SECURE (--apt-secure) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_APT_SOURCE_ARCHIVES}" != "true" ] && [ "${LB_APT_SOURCE_ARCHIVES}" != "false" ]; then
Echo_error "Value for LB_APT_SOURCE_ARCHIVES (--apt-source-archives) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_BACKPORTS}" != "true" ] && [ "${LB_BACKPORTS}" != "false" ]; then
Echo_error "Value for LB_BACKPORTS (--backports) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_BUILD_WITH_CHROOT}" != "true" ] && [ "${LB_BUILD_WITH_CHROOT}" != "false" ]; then
Echo_error "Value for LB_BUILD_WITH_CHROOT (--build-with-chroot) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_CACHE}" != "true" ] && [ "${LB_CACHE}" != "false" ]; then
Echo_error "Value for LB_CACHE (--cache) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_CACHE_INDICES}" != "true" ] && [ "${LB_CACHE_INDICES}" != "false" ]; then
Echo_error "Value for LB_CACHE_INDICES (--cache-indices) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_CACHE_PACKAGES}" != "true" ] && [ "${LB_CACHE_PACKAGES}" != "false" ]; then
Echo_error "Value for LB_CACHE_PACKAGES (--cache-packages) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_DEBIAN_INSTALLER_GUI}" != "true" ] && [ "${LB_DEBIAN_INSTALLER_GUI}" != "false" ]; then
Echo_error "Value for LB_DEBIAN_INSTALLER_GUI (--debian-installer-gui) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_FIRMWARE_BINARY}" != "true" ] && [ "${LB_FIRMWARE_BINARY}" != "false" ]; then
Echo_error "Value for LB_FIRMWARE_BINARY (--firmware-binary) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_FIRMWARE_CHROOT}" != "true" ] && [ "${LB_FIRMWARE_CHROOT}" != "false" ]; then
Echo_error "Value for LB_FIRMWARE_CHROOT (--firmware-chroot) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_LOADLIN}" != "true" ] && [ "${LB_LOADLIN}" != "false" ]; then
Echo_error "Value for LB_LOADLIN (--loadlin) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_NET_TARBALL}" != "true" ] && [ "${LB_NET_TARBALL}" != "false" ]; then
Echo_error "Value for LB_NET_TARBALL (--net-tarball) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_ONIE}" != "true" ] && [ "${LB_ONIE}" != "false" ]; then
Echo_error "Value for LB_ONIE (--onie) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_PROPOSED_UPDATES}" != "true" ] && [ "${LB_PROPOSED_UPDATES}" != "false" ]; then
Echo_error "Value for LB_PROPOSED_UPDATES (--proposed-updates) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_SECURITY}" != "true" ] && [ "${LB_SECURITY}" != "false" ]; then
Echo_error "Value for LB_SECURITY (--security) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_SOURCE}" != "true" ] && [ "${LB_SOURCE}" != "false" ]; then
Echo_error "Value for LB_SOURCE (--source) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_UPDATES}" != "true" ] && [ "${LB_UPDATES}" != "false" ]; then
Echo_error "Value for LB_UPDATES (--updates) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_UTC_TIME}" != "true" ] && [ "${LB_UTC_TIME}" != "false" ]; then
Echo_error "Value for LB_UTC_TIME (--utc-time) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_WIN32_LOADER}" != "true" ] && [ "${LB_WIN32_LOADER}" != "false" ]; then
Echo_error "Value for LB_WIN32_LOADER (--win32-loader) can only be 'true' or 'false'!"
exit 1
fi
if [ "${LB_ZSYNC}" != "true" ] && [ "${LB_ZSYNC}" != "false" ]; then
Echo_error "Value for LB_ZSYNC (--zsync) can only be 'true' or 'false'!"
exit 1
fi
if ! In_list "${LB_APT}" apt apt-get aptitude; then
Echo_error "You have specified an invalid value for LB_APT (--apt)."
exit 1
fi
if ! In_list "${LB_BINARY_FILESYSTEM}" fat16 fat32 ext2 ext3 ext4 ntfs; then
Echo_error "You have specified an invalid value for LB_BINARY_FILESYSTEM (--binary-filesystem)."
exit 1
fi
if ! In_list "${LB_IMAGE_TYPE}" iso iso-hybrid hdd tar netboot; then
Echo_error "You have specified an invalid value for --binary-image."
exit 1
fi
if [ -z "${LB_BOOTLOADER_BIOS}" ] && [ -z "${LB_BOOTLOADER_EFI}" ]; then
Echo_warning "You have specified no bootloaders; I predict that you will experience some problems!"
fi
if [ -n "${LB_BOOTLOADER_BIOS}" ] && ! In_list "${LB_BOOTLOADER_BIOS}" grub-legacy grub-pc syslinux; then
Echo_error "You have specified an invalid BIOS bootloader."
exit 1
fi
if [ -n "${LB_BOOTLOADER_EFI}" ] && ! In_list "${LB_BOOTLOADER_EFI}" grub-efi; then
Echo_error "You have specified an invalid EFI bootloader."
exit 1
fi
if [ -n "${LB_BOOTLOADERS}" ]; then
local BOOTLOADER
local BOOTLOADERS_BIOS=0
local BOOTLOADERS_EFI=0
for BOOTLOADER in $LB_BOOTLOADERS; do
# Note, multiple instances of the same bootloader should be rejected,
# to avoid issues (e.g. in `binary_iso` bootloader handling).
case "${BOOTLOADER}" in
grub-legacy|grub-pc|syslinux)
BOOTLOADERS_BIOS=$(( $BOOTLOADERS_BIOS + 1 ))
;;
grub-efi)
BOOTLOADERS_EFI=$(( $BOOTLOADERS_EFI + 1 ))
;;
*)
Echo_error "The following is not a valid bootloader: '%s'" "${BOOTLOADER}"
exit 1
;;
esac
done
if [ $BOOTLOADERS_BIOS -ge 2 ]; then
Echo_error "Invalid bootloader selection. Multiple BIOS instances specified."
exit 1
fi
if [ $BOOTLOADERS_EFI -ge 2 ]; then
Echo_error "Invalid bootloader selection. Multiple EFI instances specified."
exit 1
fi
if [ $BOOTLOADERS_BIOS -eq 0 ] && [ $BOOTLOADERS_EFI -eq 0 ]; then
Echo_warning "You have specified no bootloaders; I predict that you will experience some problems!"
fi
fi
local CACHE_STAGE
for CACHE_STAGE in ${LB_CACHE_STAGES}; do
if ! In_list "${CACHE_STAGE}" bootstrap chroot rootfs; then
Echo_warning "The following is not a valid stage: '%s'" "${CACHE_STAGE}"
fi
done
local CHECKSUM
if [ "${LB_CHECKSUMS}" != "none" ]; then
for CHECKSUM in ${LB_CHECKSUMS}; do
if ! In_list "${CHECKSUM}" md5 sha1 sha224 sha256 sha384 sha512; then
Echo_error "You have specified an invalid value for LB_CHECKSUMS (--checksums): '%s'" "${CHECKSUM}"
exit 1
fi
done
fi
if ! In_list "${LB_CHROOT_FILESYSTEM}" ext2 ext3 ext4 squashfs jffs2 none plain; then
Echo_error "You have specified an invalid value for LB_CHROOT_FILESYSTEM (--chroot-filesystem)."
exit 1
fi
if ! In_list "${LB_COMPRESSION}" bzip2 gzip lzip xz none; then
Echo_error "You have specified an invalid value for LB_COMPRESSION (--compression)."
exit 1
fi
if ! In_list "${LB_DEBCONF_FRONTEND}" dialog editor noninteractive readline; then
Echo_error "You have specified an invalid value for LB_DEBCONF_FRONTEND (--debconf-frontend)."
exit 1
fi
if ! In_list "${LB_DEBCONF_PRIORITY}" low medium high critical; then
Echo_error "You have specified an invalid value for LB_DEBCONF_PRIORITY (--debconf-priority)."
exit 1
fi
if ! In_list "${LB_DEBIAN_INSTALLER}" cdrom netinst netboot businesscard live none; then
Echo_error "You have specified an invalid value for LB_DEBIAN_INSTALLER (--debian-installer)."
exit 1
fi
if echo ${LB_HDD_LABEL} | grep -qs ' '; then
Echo_error "Whitespace is not currently supported in HDD labels (LB_HDD_LABEL; --hdd-label)."
exit 1
fi
if ! In_list "${LB_INITRAMFS}" none live-boot dracut-live; then
Echo_error "You have specified an invalid value for LB_INITRAMFS (--initramfs)."
exit 1
fi
if [ "${LB_INITRAMFS}" = "dracut-live" ]; then
if [ "${LB_DM_VERITY}" = "true" ]; then
Echo_error "Currently unsupported/untested: dm_verity and dracut."
exit 1
fi
if [ "${LB_BOOTLOADER_BIOS}" = "grub-legacy" ]; then
Echo_error "Currently unsupported/untested: grub-legacy and dracut."
exit 1
fi
if [ "${LB_BOOTLOADER_BIOS}" = "syslinux" ]; then
Echo_error "Currently unsupported/untested: syslinux and dracut."
exit 1
fi
if ! In_list "${LB_IMAGE_TYPE}" iso iso-hybrid; then
# The boot=live:CDLABEL requires a CD medium
Echo_error "Currently unsupported/untested: image type ${LB_IMAGE_TYPE} and dracut."
exit 1
fi
if [ "${LB_INITRAMFS_COMPRESSION}" != "gzip" ]; then
Echo_error "Currently unsupported/untested: compression ${LB_INITRAMFS_COMPRESSION} and dracut."
exit 1
fi
if [ "${LB_CHROOT_FILESYSTEM}" != "squashfs" ]; then
Echo_error "Currently unsupported/untested: chroot filesystem ${LB_CHROOT_FILESYSTEM} and dracut."
exit 1
fi
if [ "${LB_INITSYSTEM}" != systemd ]; then
Echo_error "Currently unsupported/untested: init system ${LB_INITSYSTEM} and dracut."
exit 1
fi
fi
if ! In_list "${LB_INITRAMFS_COMPRESSION}" bzip2 gzip lzma; then
Echo_error "You have specified an invalid value for LB_INITRAMFS_COMPRESSION (--initramfs-compression)."
exit 1
fi
if ! In_list "${LB_INITSYSTEM}" sysvinit systemd none; then
Echo_error "You have specified an invalid value for LB_INITSYSTEM (--initsystem)."
exit 1
fi
if ! In_list "${LB_INTERACTIVE}" true shell x11 xnest false; then
Echo_error "You have specified an invalid value for LB_INTERACTIVE (--interactive)."
exit 1
fi
if [ "$(echo -n "${LB_ISO_APPLICATION}" | wc -c)" -gt 128 ]; then
Echo_warning "You have specified a value of LB_ISO_APPLICATION (--iso-application) that is too long; the maximum length is 128 characters."
fi
if [ "$(echo -n "${LB_ISO_PREPARER}" | sed -e "s/@LB_VERSION@/${VERSION}/" | wc -c)" -gt 128 ]; then
Echo_warning "You have specified a value of LB_ISO_PREPARER (--iso-preparer) that is too long; the maximum length is 128 characters."
fi
if [ "$(echo -n "${LB_ISO_PUBLISHER}" | wc -c)" -gt 128 ]; then
Echo_warning "You have specified a value of LB_ISO_PUBLISHER (--iso-publisher) that is too long; the maximum length is 128 characters."
fi
if [ "$(echo -n "${LB_ISO_VOLUME}" | sed -e "s/@ISOVOLUME_TS@/$(date $DATE_UTC_OPTION -d@${SOURCE_DATE_EPOCH} +%Y%m%d-%H:%M)/" | wc -c)" -gt 32 ]; then
Echo_warning "You have specified a value of LB_ISO_VOLUME (--iso-volume) that is too long; the maximum length is 32 characters."
fi
if ! In_list "${LB_MEMTEST}" memtest86+ memtest86 none; then
Echo_error "You have specified an invalid value for LB_MEMTEST (--memtest)."
exit 1
fi
if ! In_list "${LB_SOURCE_IMAGES}" iso netboot tar hdd; then
Echo_error "You have specified an invalid value for LB_SOURCE_IMAGES (--source-images)."
exit 1
fi
if ! In_list "${LB_SYSTEM}" live normal; then
Echo_error "You have specified an invalid value for LB_SYSTEM (--system)."
exit 1
fi
if ! In_list "${LB_UEFI_SECURE_BOOT}" auto enable disable; then
Echo_error "You have specified an invalid value for LB_UEFI_SECURE_BOOT (--uefi-secure-boot)."
exit 1
fi
if [ -n "${LB_BOOTSTRAP_QEMU_ARCHITECTURE}" ]; then
if [ -z "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
Echo_error "You have not specified the qemu-static binary for ${LB_BOOTSTRAP_QEMU_ARCHITECTURE} (--bootstrap-qemu-static)"
exit 1
fi
if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
Echo_error "The qemu-static binary (${LB_BOOTSTRAP_QEMU_STATIC}) for ${LB_BOOTSTRAP_QEMU_ARCHITECTURE} was not found on the host"
exit 1
fi
if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]; then
Echo_error "The qemu-static binary (${LB_BOOTSTRAP_QEMU_STATIC}) for ${LB_BOOTSTRAP_QEMU_ARCHITECTURE} is not executable on the host"
exit 1
fi
fi
}
# Check option combinations and other extra stuff
Validate_config_dependencies ()
{
if [ "${LB_BINARY_FILESYSTEM}" = "ntfs" ] && ! command -v ntfs-3g >/dev/null; then
Echo_error "Using ntfs as the binary filesystem is currently only supported if ntfs-3g is installed on the host system."
exit 1
fi
if [ "${LB_DEBIAN_INSTALLER}" != "none" ] && [ "${LB_DEBIAN_INSTALLER}" != "live" ]; then
# d-i true, no caching
if ! In_list "bootstrap" ${LB_CACHE_STAGES} || [ "${LB_CACHE}" != "true" ] || [ "${LB_CACHE_PACKAGES}" != "true" ]
then
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."
fi
fi
if In_list "syslinux" $LB_BOOTLOADERS; then
# syslinux + fat or ntfs, or extlinux + ext[234] or btrfs
if ! In_list "${LB_BINARY_FILESYSTEM}" fat16 fat32 ntfs ext2 ext3 ext4 btrfs; then
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."
fi
fi
if In_list "grub-pc" ${LB_BOOTLOADERS} || In_list "grub-efi" ${LB_BOOTLOADERS} || In_list "grub-legacy" ${LB_BOOTLOADERS}; then
if In_list "${LB_IMAGE_TYPE}" hdd netboot; then
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."
exit 1
fi
fi
Validate_http_proxy
}
# Retrieve the proxy settings from the host. Check whether conflicts are present with the command line arguments
Validate_http_proxy ()
{
local HOST_AUTO_APT_PROXY=""
local HOST_AUTO_APT_PROXY_LEGACY=""
local HOST_FIXED_APT_PROXY=""
# Fetch the proxy, using the various ways the http proxy can be set in apt
if command -v apt-config >/dev/null; then
local APT_CONFIG_OPTIONS
# apt-config only understands --option (-o) and --config-file (-c) of ${APT_OPTIONS}
# Don't report errors when additional options are provided and don't add additional quotes
APT_CONFIG_OPTIONS=$(getopt --quiet --unquoted --options 'c:o:' --long 'config-file:,option:' -- ${APT_OPTIONS} || true)
# The apt configuration `Acquire::http::Proxy-Auto-Detect` (and the legacy `Acquire::http::ProxyAutoDetect`)
# If the script fails, or the result of the script is `DIRECT` or an empty line, it is considered to be not set (https://sources.debian.org/src/apt/2.3.9/apt-pkg/contrib/proxy.cc/)
local AUTOPROXY
eval "$(apt-config ${APT_CONFIG_OPTIONS} shell AUTOPROXY Acquire::http::Proxy-Auto-Detect)"
if [ -x "${AUTOPROXY}" ]; then
HOST_AUTO_APT_PROXY="$(${AUTOPROXY} || echo '')"
if [ "${HOST_AUTO_APT_PROXY}" = "DIRECT" ]; then
HOST_AUTO_APT_PROXY=""
fi
fi
# Also check the legacy ProxyAutoDetect
eval "$(apt-config ${APT_CONFIG_OPTIONS} shell AUTOPROXY Acquire::http::ProxyAutoDetect)"
if [ -x "$AUTOPROXY" ]; then
HOST_AUTO_APT_PROXY_LEGACY="$(${AUTOPROXY} || echo '')"
if [ "${HOST_AUTO_APT_PROXY_LEGACY}" = "DIRECT" ]; then
HOST_AUTO_APT_PROXY_LEGACY=""
fi
fi
# The apt configuration `Acquire::http::proxy::URL-host` (https://sources.debian.org/src/apt/2.3.9/methods/http.cc/)
# If set to `DIRECT`, it is considered to be not set
# This configuration allows you to specify different proxies for specific URLs
# This setup is too complex for the purpose of live-build and will silently be ignored
# The apt configuration `Acquire::http::Proxy`
eval "$(apt-config ${APT_CONFIG_OPTIONS} shell HOST_FIXED_APT_PROXY Acquire::http::Proxy)"
fi
# Report all detected settings in debug mode
Echo_debug "Detected proxy settings:"
Echo_debug "--apt-http-proxy: ${LB_APT_HTTP_PROXY}"
Echo_debug "HOST Auto APT PROXY: ${HOST_AUTO_APT_PROXY}"
Echo_debug "HOST Auto APT PROXY (legacy): ${HOST_AUTO_APT_PROXY_LEGACY}"
Echo_debug "HOST Fixed APT PROXY: ${HOST_FIXED_APT_PROXY}"
# The environment variable 'http_proxy' is used when no apt option is set
Echo_debug "HOST http_proxy: ${http_proxy}"
# The environment variable 'no_proxy' contains a list of domains that must not be handled by a proxy,
# it overrides all previous settings by apt and 'http_proxy'
Echo_debug "HOST no_proxy: ${no_proxy}"
# Check whether any of the provided proxy values conflicts with another
local LAST_SEEN_PROXY_NAME=""
local LAST_SEEN_PROXY_VALUE=""
Validate_http_proxy_source "apt configuration option Acquire::http::Proxy-Auto-Detect" "${HOST_AUTO_APT_PROXY}"
Validate_http_proxy_source "apt configuration option Acquire::http::ProxyAutoDetect" "${HOST_AUTO_APT_PROXY_LEGACY}"
Validate_http_proxy_source "apt configuration option Acquire::http::Proxy" "${HOST_FIXED_APT_PROXY}"
Validate_http_proxy_source "environment variable http_proxy" "${http_proxy}"
Validate_http_proxy_source "command line option --apt-http-proxy" "${LB_APT_HTTP_PROXY}"
# This is the value to use for the other scripts in live-build
export http_proxy="${LAST_SEEN_PROXY_VALUE}"
if [ ! -z "${http_proxy}" ]; then
Echo_message "Using http proxy: ${http_proxy}"
fi
}
# Check whether a proxy setting conflicts with a previously set proxy setting
Validate_http_proxy_source ()
{
local NAME="${1}"
local VALUE="${2}"
if [ ! -z "${VALUE}" ]; then
if [ ! -z "${LAST_SEEN_PROXY_VALUE}" ]; then
if [ "${VALUE}" != "${LAST_SEEN_PROXY_VALUE}" ]; then
Echo_error "Inconsistent proxy configuration: the value for ${NAME} (${VALUE}) differs from the value for ${LAST_SEEN_PROXY_NAME} (${LAST_SEEN_PROXY_VALUE})"
exit 1
fi
fi
LAST_SEEN_PROXY_NAME="${NAME}"
LAST_SEEN_PROXY_VALUE="${VALUE}"
fi
}

View File

@ -1,74 +0,0 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
Cursor_goto_position ()
{
__LINE="${1}"
__COLUMN="${2}"
#echo -e "[${__LINE};${__COLUMN};H\c"
printf "[${__LINE};${__COLUMN};H"
}
Cursor_save_position ()
{
#echo -e "\c"
printf ""
}
Cursor_restore_position ()
{
#echo -e "\c"
printf ""
}
Cursor_line_up ()
{
__LINES="${1}"
#echo -e "[${__LINES}A\c"
printf "[${__LINES}A"
}
Cursor_line_down ()
{
__LINES="${1}"
#echo -e "[${__LINES}B\c"
printf "[${__LINES}B"
}
Cursor_columns_forward ()
{
__COLUMNS="${1}"
#echo -e "[${__COLUMNS}C\c"
printf "[${__COLUMNS}C"
}
Cursor_columns_backward ()
{
__COLUMNS="${1}"
#echo -e "[${__COLUMNS}D\c"
printf "[${__COLUMNS}D"
}
Cursor_clear_screen ()
{
#echo -e "\c"
printf ""
}
Cursor_erase_EOL ()
{
#echo -e "\c"
printf ""
}

View File

@ -1,908 +0,0 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
New_configuration ()
{
## Runtime
# Image: Architecture
if [ -x "/usr/bin/dpkg" ]
then
CURRENT_IMAGE_ARCHITECTURE="$(dpkg --print-architecture)"
else
case "$(uname -m)" in
x86_64)
CURRENT_IMAGE_ARCHITECTURE="amd64"
;;
i?86)
CURRENT_IMAGE_ARCHITECTURE="i386"
;;
*)
Echo_warning "Unable to determine current architecture, using ${CURRENT_IMAGE_ARCHITECTURE}"
;;
esac
fi
## Configuration
# Configuration-Version
LIVE_CONFIGURATION_VERSION="${LIVE_CONFIGURATION_VERSION:-$(Get_configuration config/build Configuration-Version)}"
LIVE_CONFIGURATION_VERSION="${LIVE_CONFIGURATION_VERSION:-${LIVE_BUILD_VERSION}}"
export LIVE_CONFIGURATION_VERSION
# Image: Name
LIVE_IMAGE_NAME="${LIVE_IMAGE_NAME:-$(Get_configuration config/build Name)}"
LIVE_IMAGE_NAME="${LIVE_IMAGE_NAME:-live-image}"
export LIVE_IMAGE_NAME
# Image: Architecture (FIXME: Support and default to 'any')
LB_ARCHITECTURES="${LB_ARCHITECTURES:-$(Get_configuration config/build Architecture)}"
LB_ARCHITECTURES="${LB_ARCHITECTURES:-${CURRENT_IMAGE_ARCHITECTURE}}"
export LB_ARCHITECTURES
# Image: Archive Areas
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-$(Get_configuration config/build Archive-Areas)}"
case "${LB_MODE}" in
progress-linux)
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-main contrib non-free}"
;;
*)
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS:-main}"
;;
esac
export LB_ARCHIVE_AREAS
# Image: Archive Areas
LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS:-$(Get_configuration config/build Parent-Archive-Areas)}"
LB_PARENT_ARCHIVE_AREAS="${LB_PARENT_ARCHIVE_AREAS:-${LB_ARCHIVE_AREAS}}"
export LB_PARENT_ARCHIVE_AREAS
# Image: Type
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-$(Get_configuration config/build Type)}"
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
export LIVE_IMAGE_TYPE
}
Set_defaults ()
{
# FIXME
New_configuration
## config/common
if [ -e local/live-build ]
then
LIVE_BUILD="${LIVE_BUILD:-${PWD}/local/live-build}"
export LIVE_BUILD
fi
# Setting system type
LB_SYSTEM="${LB_SYSTEM:-live}"
# Setting mode (currently: debian, progress-linux)
if [ -x /usr/bin/lsb_release ]
then
_DISTRIBUTOR="$(lsb_release -is | tr "[A-Z]" "[a-z]")"
case "${_DISTRIBUTOR}" in
debian|progress-linux)
LB_MODE="${LB_MODE:-${_DISTRIBUTOR}}"
;;
*)
LB_MODE="${LB_MODE:-debian}"
;;
esac
else
if [ -e /etc/progress-linux_version ]
then
LB_MODE="${LB_MODE:-progress-linux}"
else
LB_MODE="${LB_MODE:-debian}"
fi
fi
# Setting distribution name
case "${LB_MODE}" in
progress-linux)
LB_DISTRIBUTION="${LB_DISTRIBUTION:-cairon}"
LB_DERIVATIVE="true"
LB_DERIVATIVE_IS_BASED_ON="debian"
;;
*)
LB_DISTRIBUTION="${LB_DISTRIBUTION:-stretch}"
LB_DERIVATIVE="false"
;;
esac
case "${LB_MODE}" in
progress-linux)
case "${LB_DISTRIBUTION}" in
baureo|baureo-backports)
LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION:-wheezy}"
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION}}"
;;
cairon|cairon-backports)
LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION:-sid}"
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION}}"
;;
esac
LB_BACKPORTS="${LB_BACKPORTS:-true}"
;;
*)
LB_PARENT_DISTRIBUTION="${LB_PARENT_DISTRIBUTION:-${LB_DISTRIBUTION}}"
LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="${LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_PARENT_DISTRIBUTION}}"
LB_BACKPORTS="${LB_BACKPORTS:-false}"
;;
esac
# Setting package manager
LB_APT="${LB_APT:-apt}"
# Setting apt ftp proxy
LB_APT_FTP_PROXY="${LB_APT_FTP_PROXY}"
# Setting apt http proxy
LB_APT_HTTP_PROXY="${LB_APT_HTTP_PROXY}"
# Setting apt pipeline
# LB_APT_PIPELINE
APT_OPTIONS="${APT_OPTIONS:---yes}"
APTITUDE_OPTIONS="${APTITUDE_OPTIONS:---assume-yes}"
BZIP2_OPTIONS="${BZIP2_OPTIONS:--6}"
GZIP_OPTIONS="${GZIP_OPTIONS:--6}"
if gzip --help | grep -qs "\-\-rsyncable"
then
GZIP_OPTIONS="$(echo ${GZIP_OPTIONS} | sed -e 's|--rsyncable||') --rsyncable"
fi
LZIP_OPTIONS="${LZIP_OPTIONS:--6}"
LZMA_OPTIONS="${LZMA_OPTIONS:--6}"
XZ_OPTIONS="${XZ_OPTIONS:--6}"
# Setting apt recommends
case "${LB_MODE}" in
progress-linux)
LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS:-false}"
;;
*)
LB_APT_RECOMMENDS="${LB_APT_RECOMMENDS:-true}"
;;
esac
# Setting apt secure
LB_APT_SECURE="${LB_APT_SECURE:-true}"
# Setting apt source
case "${LB_MODE}" in
progress-linux)
LB_APT_SOURCE_ARCHIVES="${LB_APT_SOURCE_ARCHIVES:-false}"
;;
*)
LB_APT_SOURCE_ARCHIVES="${LB_APT_SOURCE_ARCHIVES:-true}"
;;
esac
# Setting cache option
LB_CACHE="${LB_CACHE:-true}"
LB_CACHE_INDICES="${LB_CACHE_INDICES:-false}"
LB_CACHE_PACKAGES="${LB_CACHE_PACKAGES:-true}"
LB_CACHE_STAGES="${LB_CACHE_STAGES:-bootstrap}"
# Setting debconf frontend
LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND:-noninteractive}"
LB_DEBCONF_PRIORITY="${LB_DEBCONF_PRIORITY:-critical}"
# Setting initramfs hook
case "${LB_SYSTEM}" in
live)
LB_INITRAMFS="${LB_INITRAMFS:-live-boot}"
;;
normal)
LB_INITRAMFS="${LB_INITRAMFS:-none}"
;;
esac
LB_INITRAMFS_COMPRESSION="${LB_INITRAMFS_COMPRESSION:-gzip}"
# Setting initsystem
case "${LB_MODE}" in
progress-linux)
case "${LB_DISTRIBUTION}" in
cairon*)
LB_INITSYSTEM="${LB_INITSYSTEM:-systemd}"
;;
*)
LB_INITSYSTEM="${LB_INITSYSTEM:-sysvinit}"
;;
esac
;;
*)
case "${LB_SYSTEM}" in
live)
LB_INITSYSTEM="${LB_INITSYSTEM:-systemd}"
;;
normal)
LB_INITSYSTEM="${LB_INITSYSTEM:-none}"
;;
esac
;;
esac
# Setting fdisk
if [ -z "${LB_FDISK}" ] || [ ! -x "${LB_FDISK}" ]
then
# Workaround for gnu-fdisk divertion
# (gnu-fdisk is buggy, #445304).
if [ -x /sbin/fdisk.distrib ]
then
LB_FDISK="fdisk.distrib"
elif [ -x /sbin/fdisk ]
then
LB_FDISK="fdisk"
else
Echo_error "Can't process file /sbin/fdisk"
fi
fi
# Setting losetup
if [ -z "${LB_LOSETUP}" ] || [ "${LB_LOSETUP}" != "/sbin/losetup.orig" ]
then
# Workaround for loop-aes-utils divertion
# (loop-aes-utils' losetup lacks features).
if [ -x /sbin/losetup.orig ]
then
LB_LOSETUP="losetup.orig"
elif [ -x /sbin/losetup ]
then
LB_LOSETUP="losetup"
else
Echo_error "Can't process file /sbin/losetup"
fi
fi
if [ "${LB_ARCHITECTURES}" = "i386" ] && [ "${CURRENT_IMAGE_ARCHITECTURE}" = "amd64" ]
then
# Use linux32 when building amd64 images on i386
_LINUX32="linux32"
else
_LINUX32=""
fi
# Setting tasksel
LB_TASKSEL="${LB_TASKSEL:-apt}"
# Setting root directory
case "${LB_MODE}" in
progress-linux)
LB_ROOT="${LB_ROOT:-progress-linux}"
;;
*)
LB_ROOT="${LB_ROOT:-${LB_MODE}-live}"
;;
esac
# Setting live build options
_BREAKPOINTS="${_BREAKPOINTS:-false}"
_COLOR="${_COLOR:-false}"
_DEBUG="${_DEBUG:-false}"
_FORCE="${_FORCE:-false}"
_QUIET="${_QUIET:-false}"
_VERBOSE="${_VERBOSE:-false}"
## config/bootstrap
# Setting mirror to fetch packages from
case "${LB_MODE}" in
debian)
LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://ftp.debian.org/debian/}"
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-${LB_MIRROR_BOOTSTRAP}}"
;;
progress-linux)
LB_PARENT_MIRROR_BOOTSTRAP="${LB_PARENT_MIRROR_BOOTSTRAP:-http://ftp.debian.org/debian/}"
LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP:-http://cdn.archive.progress-linux.org/packages/}"
;;
esac
LB_PARENT_MIRROR_CHROOT="${LB_PARENT_MIRROR_CHROOT:-${LB_PARENT_MIRROR_BOOTSTRAP}}"
LB_MIRROR_CHROOT="${LB_MIRROR_CHROOT:-${LB_MIRROR_BOOTSTRAP}}"
# Setting security mirror to fetch packages from
case "${LB_MODE}" in
debian)
LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-http://security.debian.org/}"
LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-${LB_MIRROR_CHROOT_SECURITY}}"
;;
progress-linux)
LB_PARENT_MIRROR_CHROOT_SECURITY="${LB_PARENT_MIRROR_CHROOT_SECURITY:-http://security.debian.org/}"
LB_MIRROR_CHROOT_SECURITY="${LB_MIRROR_CHROOT_SECURITY:-${LB_MIRROR_CHROOT}}"
;;
esac
# Setting mirror which ends up in the image
case "${LB_MODE}" in
debian)
LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-http://http.debian.net/debian/}"
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-${LB_MIRROR_BINARY}}"
;;
progress-linux)
LB_PARENT_MIRROR_BINARY="${LB_PARENT_MIRROR_BINARY:-http://ftp.debian.org/debian/}"
LB_MIRROR_BINARY="${LB_MIRROR_BINARY:-${LB_MIRROR_CHROOT}}"
;;
esac
# Setting security mirror which ends up in the image
case "${LB_MODE}" in
debian)
LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-http://security.debian.org/}"
LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-${LB_MIRROR_BINARY_SECURITY}}"
;;
progress-linux)
LB_PARENT_MIRROR_BINARY_SECURITY="${LB_PARENT_MIRROR_BINARY_SECURITY:-http://security.debian.org/}"
LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY:-${LB_MIRROR_CHROOT}}"
;;
esac
case "${LB_MODE}" in
progress-linux)
LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
;;
*)
LB_MIRROR_DEBIAN_INSTALLER="${LB_MIRROR_DEBIAN_INSTALLER:-${LB_MIRROR_CHROOT}}"
LB_PARENT_MIRROR_DEBIAN_INSTALLER="${LB_PARENT_MIRROR_DEBIAN_INSTALLER:-${LB_PARENT_MIRROR_CHROOT}}"
;;
esac
## config/chroot
# Setting chroot filesystem
LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM:-squashfs}"
# Setting union filesystem
LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-aufs}"
# Setting interactive shell/X11/Xnest
LB_INTERACTIVE="${LB_INTERACTIVE:-false}"
# Setting keyring packages
LB_KEYRING_PACKAGES="${LB_KEYRING_PACKAGES:-debian-archive-keyring}"
# Setting linux flavour string
case "${LB_ARCHITECTURES}" in
arm64)
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-arm64}"
;;
armel)
# armel will have special images: one rootfs image and many additional kernel images.
# therefore we default to all available armel flavours
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-ixp4xx kirkwood orion5x versatile}"
;;
armhf)
# armhf will have special images: one rootfs image and many additional kernel images.
# therefore we default to all available armhf flavours
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-armmp armmp-lpae}"
;;
amd64)
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-amd64}"
;;
i386)
case "${LB_MODE}" in
progress-linux)
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-686-pae}"
;;
*)
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-586}"
;;
esac
;;
ia64)
case "${LB_MODE}" in
progress-linux)
Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
exit 1
;;
*)
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-itanium}"
;;
esac
;;
powerpc)
case "${LB_MODE}" in
progress-linux)
Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
exit 1
;;
*)
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-powerpc64 powerpc}"
;;
esac
;;
s390x)
case "${LB_MODE}" in
progress-linux)
Echo_error "Architecture ${LB_ARCHITECTURES} not supported in the ${LB_MODE} mode."
exit 1
;;
*)
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS:-s390x}"
;;
esac
;;
*)
Echo_error "Architecture(s) ${LB_ARCHITECTURES} not yet supported (FIXME)"
exit 1
;;
esac
# Set linux packages
LB_LINUX_PACKAGES="${LB_LINUX_PACKAGES:-linux-image}"
# Setting security updates option
case "${LB_PARENT_DISTRIBUTION}" in
sid)
LB_SECURITY="${LB_SECURITY:-false}"
;;
*)
LB_SECURITY="${LB_SECURITY:-true}"
;;
esac
# Setting updates updates option
case "${LB_PARENT_DISTRIBUTION}" in
sid)
LB_UPDATES="${LB_UPDATES:-false}"
;;
*)
LB_UPDATES="${LB_UPDATES:-true}"
;;
esac
## config/binary
# Setting image filesystem
LB_BINARY_FILESYSTEM="${LB_BINARY_FILESYSTEM:-fat32}"
# Setting image type
case "${LB_ARCHITECTURES}" in
amd64|i386)
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso-hybrid}"
;;
*)
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE:-iso}"
;;
esac
# Setting apt indices
case "${LB_MODE}" in
progress-linux)
LB_APT_INDICES="${LB_APT_INDICES:-false}"
;;
*)
LB_APT_INDICES="${LB_APT_INDICES:-true}"
;;
esac
# Setting bootloader
if [ -z "${LB_BOOTLOADER}" ]
then
case "${LB_ARCHITECTURES}" in
amd64|i386)
LB_BOOTLOADER="syslinux"
;;
esac
fi
# Setting checksums
case "${LB_MODE}" in
progress-linux)
LB_CHECKSUMS="${LB_CHECKSUMS:-sha256}"
;;
*)
LB_CHECKSUMS="${LB_CHECKSUMS:-md5}"
;;
esac
# Setting compression
LB_COMPRESSION="${LB_COMPRESSION:-none}"
# Setting zsync
LB_ZSYNC="${LB_ZSYNC:-true}"
# Setting chroot option
LB_BUILD_WITH_CHROOT="${LB_BUILD_WITH_CHROOT:-true}"
LB_BUILD_WITH_TMPFS="${LB_BUILD_WITH_TMPFS:-false}"
# Setting debian-installer option
LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER:-false}"
LB_DEBIAN_INSTALLER_DISTRIBUTION="${LB_DEBIAN_INSTALLER_DISTRIBUTION:-${LB_DISTRIBUTION}}"
# Setting debian-installer-gui
case "${LB_MODE}" in
debian|progress-linux)
LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-true}"
;;
*)
LB_DEBIAN_INSTALLER_GUI="${LB_DEBIAN_INSTALLER_GUI:-false}"
;;
esac
# Setting debian-installer preseed filename
if [ -z "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
then
if Find_files config/debian-installer/preseed.cfg
then
LB_DEBIAN_INSTALLER_PRESEEDFILE="/preseed.cfg"
fi
if Find_files config/debian-installer/*.cfg && [ ! -e config/debian-installer/preseed.cfg ]
then
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."
fi
fi
# Setting boot parameters
case "${LB_INITRAMFS}" in
live-boot)
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-boot=live components quiet splash}"
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal}"
;;
none)
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-quiet splash}"
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal}"
;;
esac
if [ -n "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" ]
then
case "${LIVE_IMAGE_TYPE}" in
iso*)
_LB_BOOTAPPEND_PRESEED="file=/cdrom/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
hdd*)
_LB_BOOTAPPEND_PRESEED="file=/hd-media/install/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
netboot)
case "${LB_DEBIAN_INSTALLER_PRESEEDFILE}" in
*://*)
_LB_BOOTAPPEND_PRESEED="file=${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
*)
_LB_BOOTAPPEND_PRESEED="file=/${LB_DEBIAN_INSTALLER_PRESEEDFILE}"
;;
esac
;;
esac
fi
if [ -n ${_LB_BOOTAPPEND_PRESEED} ]
then
LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL} ${_LB_BOOTAPPEND_PRESEED}"
fi
LB_BOOTAPPEND_INSTALL="$(echo ${LB_BOOTAPPEND_INSTALL} | sed -e 's/[ \t]*$//')"
# Setting grub splash
# LB_GRUB_SPLASH
# Setting iso author
case "${LB_MODE}" in
debian)
LB_ISO_APPLICATION="${LB_ISO_APPLICATION:-Debian Live}"
;;
progress-linux)
LB_ISO_APPLICATION="${LB_ISO_APPLICATION:-Progress Linux}"
;;
esac
# Set iso preparer
LB_ISO_PREPARER="${LB_ISO_PREPARER:-live-build \$VERSION; http://live-systems.org/devel/live-build}"
# Set iso publisher
case "${LB_MODE}" in
progress-linux)
LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER:-Progress Linux; http://www.progress-linux.org/; progress-project@lists.progress-linux.org}"
;;
*)
LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER:-Live Systems project; http://live-systems.org/; debian-live@lists.debian.org}"
;;
esac
# Setting hdd options
case "${LB_MODE}" in
debian)
LB_HDD_LABEL="${LB_HDD_LABEL:-DEBIAN_LIVE}"
;;
progress-linux)
LB_HDD_LABEL="${LB_HDD_LABEL:-PROGRESS_$(echo ${LB_DISTRIBUTION} | tr "[a-z]" "[A-Z]")}"
;;
esac
# Setting hdd size
LB_HDD_SIZE="${LB_HDD_SIZE:-auto}"
# Setting iso volume
case "${LB_MODE}" in
debian)
LB_ISO_VOLUME="${LB_ISO_VOLUME:-Debian ${LB_DISTRIBUTION} \$(date +%Y%m%d-%H:%M)}"
;;
progress-linux)
LB_ISO_VOLUME="${LB_ISO_VOLUME:-Progress ${LB_DISTRIBUTION}}"
;;
esac
# Setting memtest option
LB_MEMTEST="${LB_MEMTEST:-none}"
# Setting loadlin option
case "${LB_MODE}" in
progress-linux)
;;
*)
case "${LB_ARCHITECTURES}" in
amd64|i386)
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
then
LB_LOADLIN="${LB_LOADLIN:-true}"
else
LB_LOADLIN="${LB_LOADLIN:-false}"
fi
;;
*)
LB_LOADLIN="${LB_LOADLIN:-false}"
;;
esac
;;
esac
# Setting win32-loader option
case "${LB_MODE}" in
progress-linux)
;;
*)
case "${LB_ARCHITECTURES}" in
amd64|i386)
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
then
LB_WIN32_LOADER="${LB_WIN32_LOADER:-true}"
else
LB_WIN32_LOADER="${LB_WIN32_LOADER:-false}"
fi
;;
*)
LB_WIN32_LOADER="${LB_WIN32_LOADER:-false}"
;;
esac
;;
esac
# Setting netboot filesystem
LB_NET_ROOT_FILESYSTEM="${LB_NET_ROOT_FILESYSTEM:-nfs}"
# Setting netboot server path
case "${LB_MODE}" in
progress-linux)
LB_NET_ROOT_PATH="${LB_NET_ROOT_PATH:-/srv/progress-linux}"
;;
*)
LB_NET_ROOT_PATH="${LB_NET_ROOT_PATH:-/srv/${LB_MODE}-live}"
;;
esac
# Setting netboot server address
LB_NET_ROOT_SERVER="${LB_NET_ROOT_SERVER:-192.168.1.1}"
# Setting net cow filesystem
LB_NET_COW_FILESYSTEM="${LB_NET_COW_FILESYSTEM:-nfs}"
# Setting net tarball
LB_NET_TARBALL="${LB_NET_TARBALL:-true}"
# Setting firmware option
LB_FIRMWARE_CHROOT="${LB_FIRMWARE_CHROOT:-true}"
LB_FIRMWARE_BINARY="${LB_FIRMWARE_BINARY:-true}"
# Setting swap file
LB_SWAP_FILE_SIZE="${LB_SWAP_FILE_SIZE:-512}"
## config/source
# Setting source option
LB_SOURCE="${LB_SOURCE:-false}"
# Setting image type
LB_SOURCE_IMAGES="${LB_SOURCE_IMAGES:-tar}"
}
Check_defaults ()
{
if [ -n "${LIVE_BUILD_VERSION}" ]
then
# We're only checking when we're actually running the checks
# that's why the check for emptyness of the version;
# however, as live-build always declares LIVE_BUILD_VERSION
# internally, this is safe assumption (no cases where it's unset,
# except when bootstrapping the functions/defaults etc.).
CURRENT_CONFIGURATION_VERSION="$(echo ${LIVE_CONFIGURATION_VERSION} | awk -F. ' { print $1 }')"
if [ -n "${CURRENT_CONFIGURATION_VERSION}" ]
then
CORRECT_VERSION="$(echo ${LIVE_BUILD_VERSION} | awk -F. '{ print $1 }')"
TOO_NEW_VERSION="$((${CORRECT_VERSION} + 1))"
TOO_OLD_VERSION="$((${CORRECT_VERSION} - 1))"
if [ ${CURRENT_CONFIGURATION_VERSION} -ne ${CORRECT_VERSION} ]
then
if [ ${CURRENT_CONFIGURATION_VERSION} -ge ${TOO_NEW_VERSION} ]
then
Echo_error "This config tree is too new for live-build (${VERSION})."
Echo_error "Aborting build, please update live-build."
exit 1
elif [ ${CURRENT_CONFIGURATION_VERSION} -le ${TOO_OLD_VERSION} ]
then
Echo_error "This config tree is too old for live-build (${VERSION})."
Echo_error "Aborting build, please update the configuration."
exit 1
else
Echo_warning "This configuration does not specify a version or has a unknown version."
Echo_warning "Continuing build, please correct the configuration."
fi
fi
fi
fi
case "${LB_BINARY_FILESYSTEM}" in
ntfs)
if [ ! -x "$(which ntfs-3g 2>/dev/null)" ]
then
Echo_error "Using ntfs as the binary filesystem is currently only supported"
Echo_error "if ntfs-3g is installed on the host system."
exit 1
fi
;;
esac
if echo ${LB_HDD_LABEL} | grep -qs ' '
then
Echo_error "There are currently no whitespaces supported in hdd labels."
exit 1
fi
if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
then
# d-i true, no caching
if ! echo ${LB_CACHE_STAGES} | grep -qs "bootstrap\b" || [ "${LB_CACHE}" != "true" ] || [ "${LB_CACHE_PACKAGES}" != "true" ]
then
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."
fi
fi
if [ "${LB_BOOTLOADER}" = "syslinux" ]
then
# syslinux + fat or ntfs, or extlinux + ext[234] or btrfs
case "${LB_BINARY_FILESYSTEM}" in
fat*|ntfs|ext[234]|btrfs)
;;
*)
Echo_warning "You have selected values of LB_BOOTLOADER and LB_BINARY_FILESYSTEM which are incompatible - the syslinux family only support FAT, NTFS, ext[234] or btrfs filesystems."
;;
esac
fi
case "${LIVE_IMAGE_TYPE}" in
hdd*)
case "${LB_BOOTLOADER}" in
grub)
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."
exit 1
;;
esac
;;
esac
if [ "$(echo \"${LB_ISO_APPLICATION}\" | wc -c)" -gt 128 ]
then
Echo_warning "You have specified a value of LB_ISO_APPLICATION that is too long; the maximum length is 128 characters."
fi
if [ "$(echo \"${LB_ISO_PREPARER}\" | wc -c)" -gt 128 ]
then
Echo_warning "You have specified a value of LB_ISO_PREPARER that is too long; the maximum length is 128 characters."
fi
if [ "$(echo \"${LB_ISO_PUBLISHER}\" | wc -c)" -gt 128 ]
then
Echo_warning "You have specified a value of LB_ISO_PUBLISHER that is too long; the maximum length is 128 characters."
fi
if [ "$(eval "echo \"${LB_ISO_VOLUME}\"" | wc -c)" -gt 32 ]
then
Echo_warning "You have specified a value of LB_ISO_VOLUME that is too long; the maximum length is 32 characters."
fi
# Architectures to use foreign bootstrap for
LB_BOOTSTRAP_QEMU_ARCHITECTURES="${LB_BOOTSTRAP_QEMU_ARCHITECTURES:-}"
# Packages to exclude for the foreign/ports bootstrapping
LB_BOOTSTRAP_QEMU_EXCLUDE="${LB_BOOTSTRAP_QEMU_EXCLUDE:-}"
# Ports using foreign bootstrap need a working qemu-*-system. This is the location it
LB_BOOTSTRAP_QEMU_STATIC="${LB_BOOTSTRAP_QEMU_STATIC:-}"
}

View File

@ -1,206 +1,90 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
exec 3>&1
Echo ()
{
STRING="${1}"
local STRING="${1}"
shift
printf "${STRING}\n" "${@}"
printf "${STRING}\n" "${@}" >&3
}
Echo_debug ()
{
if [ "${_DEBUG}" = "true" ]
then
STRING="${1}"
if [ "${_DEBUG}" = "true" ]; then
local STRING="${1}"
shift
printf "D: ${STRING}\n" "${@}"
fi
}
Echo_debug_running ()
{
if [ "${_DEBUG}" = "true" ]
then
STRING="${1}"
shift
printf "D: ${STRING}" "${@}"
if [ "${_COLOR}" = "false" ]
then
printf "..."
else
printf "... ${YELLOW}${BLINK}running${NO_COLOR}"
fi
printf "D: ${STRING}\n" "${@}" >&3
fi
}
Echo_error ()
{
STRING="${1}"
local STRING="${1}"
shift
if [ "${_COLOR}" = "false" ]
then
printf "E:"
else
printf "${RED}E${NO_COLOR}:"
local PREFIX="${RED}E${NO_COLOR}"
if [ "${_COLOR_ERR}" = "false" ]; then
PREFIX="E"
fi
printf " ${STRING}\n" "${@}" >&2
printf "${PREFIX}: ${STRING}\n" "${@}" >&2
}
Echo_message ()
{
if [ "${_QUIET}" != "true" ]
then
STRING="${1}"
local STRING="${1}"
shift
if [ "${_COLOR}" = "false" ]
then
printf "P:"
else
printf "${WHITE}P${NO_COLOR}:"
local PREFIX="${PURPLE}P${NO_COLOR}"
if [ "${_COLOR_OUT}" = "false" ]; then
PREFIX="P"
fi
printf " ${STRING}\n" "${@}"
fi
}
Echo_message_running ()
{
if [ "${_QUIET}" != "true" ]
then
STRING="${1}"
shift
if [ "${_COLOR}" = "false" ]
then
printf "P:"
else
printf "${WHITE}P${NO_COLOR}:"
fi
printf " ${STRING}" "${@}"
if [ "${_COLOR}" = "true" ]
then
printf "... ${YELLOW}${BLINK}running${NO_COLOR}"
else
printf "..."
fi
printf "${PREFIX}: ${STRING}\n" "${@}" >&3
fi
}
Echo_verbose ()
{
if [ "${_VERBOSE}" = "true" ]
then
STRING="${1}"
if [ "${_VERBOSE}" = "true" ]; then
local STRING="${1}"
shift
printf "I: ${STRING}\n" "${@}"
fi
}
Echo_verbose_running ()
{
if [ "${_VERBOSE}" != "true" ]
then
STRING="${1}"
shift
printf "I: ${STRING}" "${@}"
if [ "${_COLOR}" = "true" ]
then
printf "... ${YELLOW}${BLINK}running${NO_COLOR}"
else
printf "..."
fi
printf "I: ${STRING}\n" "${@}" >&3
fi
}
Echo_warning ()
{
STRING="${1}"
local STRING="${1}"
shift
if [ "${_COLOR}" = "false" ]
then
printf "W:"
else
printf "${YELLOW}W${NO_COLOR}:"
local PREFIX="${YELLOW}W${NO_COLOR}"
if [ "${_COLOR_ERR}" = "false" ]; then
PREFIX="W"
fi
printf " ${STRING}\n" "${@}"
}
Echo_status ()
{
__RETURN="${?}"
if [ "${_COLOR}" = "false" ]
then
if [ "${__RETURN}" = "0" ]
then
printf " done.\n"
else
printf " failed.\n"
fi
else
Cursor_columns_backward 8
if [ "${__RETURN}" = "0" ]
then
printf " ${GREEN}done${NO_COLOR}. \n"
else
printf " ${RED}failed${NO_COLOR}.\n"
fi
fi
}
Echo_done ()
{
if [ "${_COLOR}" = "false" ]
then
printf " already done.\n"
else
Cursor_columns_backward 8
printf " ${GREEN}already done${NO_COLOR}.\n"
fi
printf "${PREFIX}: ${STRING}\n" "${@}" >&2
}
Echo_file ()
{
while read LINE
local LINE
while read -r LINE
do
echo "${1}: ${LINE}"
echo "${1}: ${LINE}" >&3
done < "${1}"
}
Echo_breakage ()
{
case "${LB_PARENT_DISTRIBUTION}" in
sid)
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."
;;
*)
Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy."
;;
esac
Echo_message "${@}"
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,7 +11,7 @@
Exit ()
{
VALUE="${?}"
local VALUE=$1
if [ "${_DEBUG}" = "true" ]
then
@ -18,10 +19,17 @@ Exit ()
set | grep -e ^LB
fi
# Skip if we have not yet completed the initial bootstrapping (bootstrap_debootstrap)
# (nothing to be done; avoids unhelpful messages)
if ! Stagefile_exists bootstrap; then
return ${VALUE}
fi
# Always exit true in case we are not able to unmount
# (e.g. due to running processes in chroot from user customizations)
Echo_message "Begin unmounting filesystems..."
local DIRECTORY
if [ -e /proc/mounts ]
then
for DIRECTORY in $(awk -v dir="${PWD}/chroot/" '$2 ~ dir { print $2 }' /proc/mounts | sort -r)
@ -29,16 +37,18 @@ Exit ()
umount ${DIRECTORY} > /dev/null 2>&1 || true
done
else
for DIRECTORY in /dev/shm /dev/pts /dev /proc /selinux /sys /root/config
for DIRECTORY in /dev/shm /dev/pts /dev /proc /sys/fs/selinux /sys /root/config
do
umount -f chroot/${DIRECTORY} > /dev/null 2>&1 || true
done
fi
rm -f .build/chroot_devpts
rm -f .build/chroot_proc
rm -f .build/chroot_selinuxfs
rm -f .build/chroot_sysfs
STAGEFILES_DIR="$(Stagefiles_dir)"
rm -f "${STAGEFILES_DIR}"/chroot_devpts
rm -f "${STAGEFILES_DIR}"/chroot_proc
rm -f "${STAGEFILES_DIR}"/chroot_selinuxfs
rm -f "${STAGEFILES_DIR}"/chroot_sysfs
Echo_message "Saving caches..."
@ -46,18 +56,35 @@ Exit ()
# but let's assume that if there's any binary stage file arround
# we are in binary stage.
if ls .build/binary* > /dev/null 2>&1
if ls "${STAGEFILES_DIR}"/binary* > /dev/null 2>&1
then
Save_cache cache/packages.binary
Save_package_cache binary
else
Save_cache cache/packages.chroot
Save_package_cache chroot
fi
return ${VALUE}
}
Setup_cleanup ()
Exit_exit ()
{
Echo_message "Setting up cleanup function"
trap 'Exit' EXIT HUP INT QUIT TERM
local VALUE=$?
if [ "${VALUE}" -ne 0 ]; then
Echo_error "An unexpected failure occurred, exiting..."
fi
Exit ${VALUE}
}
Exit_other ()
{
local VALUE=$?
Echo_warning "Unexpected early exit caught, attempting cleanup..."
Exit ${VALUE}
}
Setup_clean_exit ()
{
Echo_message "Setting up clean exit handler"
trap 'Exit_other' HUP INT QUIT TERM
trap 'Exit_exit' EXIT
}

117
functions/firmwarelists.sh Executable file
View File

@ -0,0 +1,117 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2023 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
# Updates FIRMWARE_PACKAGES with list of packages determined from specified
# archive areas of specified distro, based upon reading archive content file.
#
# Shared by chroot_firmware and installer_debian-installer
#
# Assumption: firmware packages install files into /lib/firmware
Firmware_List_From_Contents () {
local MIRROR_CHROOT="${1}"
local DISTRO_CHROOT="${2}"
local ARCHIVE_AREAS="${3}"
local HAS_X86_ARCH=0
local HAS_ARM_ARCH=0
local _ARCHIVE_AREA
for _ARCHIVE_AREA in ${ARCHIVE_AREAS}
do
local CONTENTS_FILEDIR="cache/contents.chroot/${DISTRO_CHROOT}/${_ARCHIVE_AREA}"
mkdir -p "${CONTENTS_FILEDIR}"
local _ARCH
for _ARCH in all ${LB_ARCHITECTURE}
do
local CONTENTS_URL="${MIRROR_CHROOT}/dists/${DISTRO_CHROOT}/${_ARCHIVE_AREA}/Contents-${_ARCH}.gz"
local CONTENTS_FILE="${CONTENTS_FILEDIR}/contents-${_ARCH}.gz"
# Purge from cache if not wanting to use from cache, ensuring fresh copy
if [ "${LB_CACHE}" != "true" ]
then
rm -f "${CONTENTS_FILE}"
fi
# If not cached, download
if [ ! -e "${CONTENTS_FILE}" ]
then
# Contents-all.gz does not exist in Buster and other older versions
if ! wget --quiet --spider ${WGET_OPTIONS} "${CONTENTS_URL}"; then
continue
fi
wget ${WGET_OPTIONS} "${CONTENTS_URL}" -O "${CONTENTS_FILE}"
fi
local PACKAGES
PACKAGES="$(gunzip -c "${CONTENTS_FILE}" | awk '/^(usr\/)?lib\/firmware/ { print $NF }' | sort -u )"
FIRMWARE_PACKAGES="${FIRMWARE_PACKAGES} ${PACKAGES}"
if [ -n "${FIRMWARE_DETAILS_FILE}" ]
then
# Use similar formatting as tools/make-firmware-image from debian-cd
# Note: for firmware/Contents-firmware (used by check-missing-firmware.sh from hw-detect),
# the second argument must be the filename of the package.
# That information is not available here and will be added by installer_debian-installer
gunzip -c "${CONTENTS_FILE}" | awk -v AREA=${_ARCHIVE_AREA} '/^(usr\/)?lib\/firmware/ { printf "/%-54s %s %s\n", $1, $2, AREA }' >> ${FIRMWARE_DETAILS_FILE}
fi
# Don't waste disk space, if not making use of caching
if [ "${LB_CACHE}" != "true" ]
then
rm -f "${CONTENTS_FILE}"
fi
case "${_ARCH}" in
arm64 | armel | armhf)
HAS_ARM_ARCH=1
;;
amd64 | i386)
HAS_X86_ARCH=1
;;
esac
done
# Clean up the cache directory, if no files are present
rmdir --ignore-fail-on-non-empty "cache/contents.chroot/${DISTRO_CHROOT}/${_ARCHIVE_AREA}"
rmdir --ignore-fail-on-non-empty "cache/contents.chroot/${DISTRO_CHROOT}"
rmdir --ignore-fail-on-non-empty "cache/contents.chroot"
done
# Blocklist firmware which does not match the requested architectures #1035382
# See https://salsa.debian.org/images-team/debian-cd/-/blob/master/tasks/bookworm/exclude-firmware
# Filter out firmware packages that are only useful with non-free drivers
BLOCKLIST_FIRMWARE="firmware-nvidia-gsp firmware-nvidia-tesla-gsp"
# Exclude ARM firmware when no ARM is requested
if [ ${HAS_ARM_ARCH} -eq 0 ]
then
BLOCKLIST_FIRMWARE="${BLOCKLIST_FIRMWARE} arm-trusted-firmware-tools crust-firmware firmware-qcom-soc firmware-samsung firmware-ti-connectivity raspi-firmware"
fi
# Exclude x86 firmware when no x86 is requested
if [ ${HAS_X86_ARCH} -eq 0 ]
then
BLOCKLIST_FIRMWARE="${BLOCKLIST_FIRMWARE} amd64-microcode firmware-intel-sound firmware-sof-signed intel-microcode"
fi
# Deduplicate the list and prepare for easier manipulation by having each package on its own line
local _FIRMWARE_PACKAGES_FILE=tmp_firmware_packages.txt
echo ${FIRMWARE_PACKAGES} | tr " " "\n" | sort -u > ${_FIRMWARE_PACKAGES_FILE}
# Remove the blocklisted firmware packages
# FIRMWARE_PACKAGES has section names and BLOCKLIST_FIRMWARE (intentionally) does not
local _REMOVEME
for _REMOVEME in ${BLOCKLIST_FIRMWARE}
do
sed -i -e "/\/${_REMOVEME}$/d" ${_FIRMWARE_PACKAGES_FILE}
done
# Reassemble the filtered list
FIRMWARE_PACKAGES=$(cat ${_FIRMWARE_PACKAGES_FILE})
rm -f ${_FIRMWARE_PACKAGES_FILE}
}

View File

@ -1,36 +0,0 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
Help ()
{
Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}"
echo
Echo "Usage:"
echo
if [ -n "${USAGE}" ]
then
Echo "${USAGE}"
echo
fi
Echo " %s [-h|--help]" "${PROGRAM}"
Echo " %s [-u|--usage]" "${PROGRAM}"
Echo " %s [-v|--version]" "${PROGRAM}"
echo
if [ -n "${HELP}" ]
then
Echo "${HELP}"
echo
fi
Echo "Report bugs to the Live Systems project <http://live-systems.org/>."
exit 0
}

86
functions/init.sh Executable file
View File

@ -0,0 +1,86 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
Auto_build_config ()
{
# Automatically build config
if [ -x auto/config ] && ! Stagefile_exists config; then
Echo_message "Automatically populating config tree."
lb config
fi
}
Init_config_data ()
{
Arguments "${@}"
Read_conffiles $(Common_conffiles)
Prepare_config
# Validating config
if [ "${CONFIG_VALIDATED}" != "true" ]; then
Validate_config
export CONFIG_VALIDATED="true"
fi
# Apt v2.0.1 introduced color support, but it needs to be explicitly enabled.
# This is done here so that the injection of the option does not get stored in the config file.
if [ "${_COLOR_OUT}" = "true" ] && [ "${_COLOR_ERR}" = "true" ]; then
APT_OPTIONS="${APT_OPTIONS} -o APT::Color=true"
APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=true"
else
APT_OPTIONS="${APT_OPTIONS} -o APT::Color=false"
APTITUDE_OPTIONS="${APTITUDE_OPTIONS} -o APT::Color=false"
fi
}
# "Auto" script redirection.
#
# As a matter of convenience users can have a set of saved commandline options
# which will be automatically included in every execution of live-build. How
# this works is that the save file is itself a shell script saved in the config
# directory (one per top-level live-build command in fact). When `lb config`,
# `lb build` or `lb clean` is run, these scripts, if they see that an "auto"
# file exists in the config, they run that file, passing along any user
# arguments, and terminate once that ends. The "auto" script simply re-executes
# the same command (e.g. `lb config`), only with a first param of "noauto",
# used to stop an infinite loop of further redirection, then a fixed saved set
# of command line options, as saved in the file by the user, then any
# additional command line arguments passed into the script. This is simply a
# means of injecting a saved set of command line options into the execution of
# live-build.
#
# As for this function, it is a simple helper, used by the top-level commands
# to perform the redirection if the relevant "auto" file exists. It should only
# be called if the calling command script was not run with "noauto" as the
# first argument (the purpose of which was just described).
Maybe_auto_redirect ()
{
local TYPE="${1}"; shift
case "${TYPE}" in
clean|config|build)
;;
*)
Echo_error "Unknown auto redirect type"
exit 1
;;
esac
local AUTO_SCRIPT="auto/${TYPE}"
if [ -x "${AUTO_SCRIPT}" ]; then
Echo_message "Executing ${AUTO_SCRIPT} script."
./"${AUTO_SCRIPT}" "${@}"
exit ${?}
elif [ -f "${AUTO_SCRIPT}" ]; then
Echo_warning "The ${AUTO_SCRIPT} script exists but is not executable, ignoring."
fi
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -8,40 +9,38 @@
## under certain conditions; see COPYING for details.
Acquire_lockfile ()
{
local FILE="${1:-.lock}"
Check_lockfile "${FILE}"
Create_lockfile "${FILE}"
}
Check_lockfile ()
{
FILE="${1}"
local FILE="${1}"
if [ -z "${FILE}" ]
then
FILE=".build/lock"
fi
# Checking lock file
if [ -f "${FILE}" ]
then
Echo_error "${PROGRAM} locked"
if [ -f "${FILE}" ]; then
Echo_error "${PROGRAM} already locked"
exit 1
fi
}
Create_lockfile ()
{
FILE="${1}"
local FILE="${1}"
if [ -z "${FILE}" ]
then
FILE=".build/lock"
fi
DIRECTORY="$(dirname ${FILE})"
# Creating lock directory
mkdir -p "${DIRECTORY}"
# Creating lock trap
# Create lock trap
# This automatically removes the lock file in certain conditions
trap 'ret=${?}; '"rm -f \"${FILE}\";"' exit ${ret}' EXIT HUP INT QUIT TERM
# Creating lock file
touch "${FILE}"
}
Remove_lockfile ()
{
local FILE="${1:-.lock}"
rm -f "${FILE}"
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -9,8 +10,8 @@
Lodetach ()
{
DEVICE="${1}"
ATTEMPT="${2:-1}"
local DEVICE="${1}"
local ATTEMPT="${2:-1}"
if [ "${ATTEMPT}" -gt 3 ]
then
@ -21,7 +22,7 @@ Lodetach ()
# Changes to block devices result in uevents which trigger rules which in
# turn access the loop device (ex. udisks-part-id, blkid) which can cause
# a race condition. We call 'udevadm settle' to help avoid this.
if [ -x "$(which udevadm 2>/dev/null)" ]
if command -v udevadm >/dev/null
then
udevadm settle
fi
@ -31,17 +32,19 @@ Lodetach ()
sync
sleep 1
${LB_LOSETUP} -d "${DEVICE}" || Lodetach "${DEVICE}" "$(expr ${ATTEMPT} + 1)"
losetup -d "${DEVICE}" || Lodetach "${DEVICE}" "$(expr ${ATTEMPT} + 1)"
}
Losetup ()
{
DEVICE="${1}"
FILE="${2}"
PARTITION="${3:-1}"
local DEVICE="${1}"
local FILE="${2}"
local PARTITION="${3:-1}"
${LB_LOSETUP} --read-only "${DEVICE}" "${FILE}"
FDISK_OUT="$(${LB_FDISK} -l -u ${DEVICE} 2>&1)"
local FDISK_OUT
local LOOPDEVICE
losetup --read-only --partscan "${DEVICE}" "${FILE}"
FDISK_OUT="$(fdisk -l -u ${DEVICE} 2>&1)"
Lodetach "${DEVICE}"
LOOPDEVICE="$(echo ${DEVICE}p${PARTITION})"
@ -50,23 +53,45 @@ Losetup ()
then
Echo_message "Mounting %s with offset 0" "${DEVICE}"
${LB_LOSETUP} "${DEVICE}" "${FILE}"
losetup --partscan "${DEVICE}" "${FILE}"
else
local SECTORS
local OFFSET
SECTORS="$(echo "$FDISK_OUT" | sed -ne "s|^$LOOPDEVICE[ *]*\([0-9]*\).*|\1|p")"
OFFSET="$(expr ${SECTORS} '*' 512)"
Echo_message "Mounting %s with offset %s" "${DEVICE}" "${OFFSET}"
${LB_LOSETUP} -o "${OFFSET}" "${DEVICE}" "${FILE}"
losetup --partscan -o "${OFFSET}" "${DEVICE}" "${FILE}"
fi
}
Calculate_partition_size ()
# adapted from lib/ext2fs/mkjournal.c, default block size is 4096 bytes (/etc/mke2fs.conf).
ext2fs_default_journal_size()
{
ORIGINAL_SIZE="${1}"
FILESYSTEM="${2}"
local SIZE="$1"
if [ "${SIZE}" -lt "8" ]; then # 2048*4096
echo 0
elif [ "${SIZE}" -lt "128" ]; then # 32768*4096
echo 4
elif [ "${SIZE}" -lt "1024" ]; then # 256*1024*4096
echo 16
elif [ "${SIZE}" -lt "2048" ]; then # 512*1024*4096
echo 32
elif [ "${SIZE}" -lt "4096" ]; then # 1024*1024*4096
echo 64
else
echo 128
fi
}
case "${FILESYSTEM}" in
Calculate_partition_size_without_journal ()
{
local WITHOUT_JOURNAL_ORIGINAL_SIZE="${1}"
local WITHOUT_JOURNAL_FILESYSTEM="${2}"
local PERCENT
case "${WITHOUT_JOURNAL_FILESYSTEM}" in
ext2|ext3|ext4)
PERCENT="6"
;;
@ -75,5 +100,31 @@ Calculate_partition_size ()
;;
esac
echo $(expr ${ORIGINAL_SIZE} + ${ORIGINAL_SIZE} \* ${PERCENT} / 100 + 1)
echo $(expr ${WITHOUT_JOURNAL_ORIGINAL_SIZE} + ${WITHOUT_JOURNAL_ORIGINAL_SIZE} \* ${PERCENT} / 100 + 1)
}
Calculate_partition_size ()
{
local ORIGINAL_SIZE="${1}"
local FILESYSTEM="${2}"
case "${FILESYSTEM}" in
ext3|ext4)
local NON_JOURNAL_SIZE
local PROJECTED_JOURNAL_SIZE
local PROJECTED_PARTITION_SIZE
local PRE_FINAL_PARTITION_SIZE
local JOURNAL_SIZE
NON_JOURNAL_SIZE=$(Calculate_partition_size_without_journal ${ORIGINAL_SIZE} ${FILESYSTEM})
PROJECTED_JOURNAL_SIZE=$(ext2fs_default_journal_size ${NON_JOURNAL_SIZE})
PROJECTED_PARTITION_SIZE=$(expr ${ORIGINAL_SIZE} + ${PROJECTED_JOURNAL_SIZE})
PRE_FINAL_PARTITION_SIZE=$(Calculate_partition_size_without_journal ${PROJECTED_PARTITION_SIZE} ${FILESYSTEM})
JOURNAL_SIZE=$(ext2fs_default_journal_size ${PRE_FINAL_PARTITION_SIZE})
expr $(Calculate_partition_size_without_journal ${ORIGINAL_SIZE} ${FILESYSTEM}) + ${JOURNAL_SIZE}
;;
*)
Calculate_partition_size_without_journal ${ORIGINAL_SIZE} ${FILESYSTEM}
;;
esac
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,9 +11,15 @@
Man ()
{
if [ -x "$(which man 2>/dev/null)" ]
then
man $(basename ${0})
exit 0
if command -v man >/dev/null; then
if [ -n "${LIVE_BUILD}" -a -e "${LIVE_BUILD}/manpages/en/lb_${PROGRAM#lb }.1" ]; then
man ${LIVE_BUILD}/manpages/en/lb_${PROGRAM#lb }.1
else
man ${PROGRAM}
fi
else
Echo_warning "man is not installed, falling back to usage output."
Usage
fi
exit 0
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,20 +11,22 @@
Expand_packagelist ()
{
local _LB_EXPAND_QUEUE
_LB_EXPAND_QUEUE="$(basename "${1}")"
shift
while [ -n "${_LB_EXPAND_QUEUE}" ]
do
local _LB_LIST_NAME
local _LB_EXPAND_QUEUE
_LB_LIST_NAME="$(echo ${_LB_EXPAND_QUEUE} | cut -d" " -f1)"
_LB_EXPAND_QUEUE="$(echo ${_LB_EXPAND_QUEUE} | cut -s -d" " -f2-)"
_LB_LIST_LOCATION=""
_LB_NESTED=0
_LB_ENABLED=1
local _LB_LIST_LOCATION=""
local _LB_NESTED=0
local _LB_ENABLED=1
for _LB_SEARCH_PATH in ${@}
do
for _LB_SEARCH_PATH in "${@}"; do
if [ -e "${_LB_SEARCH_PATH}/${_LB_LIST_NAME}" ]
then
_LB_LIST_LOCATION="${_LB_SEARCH_PATH}/${_LB_LIST_NAME}"
@ -33,7 +36,7 @@ Expand_packagelist ()
if [ -z "${_LB_LIST_LOCATION}" ]
then
echo "W: Unknown package list '${_LB_LIST_NAME}'" >&2
Echo_warning "Unknown package list '${_LB_LIST_NAME}'"
continue
fi
@ -41,6 +44,7 @@ Expand_packagelist ()
do
case "${_LB_LINE}" in
\!*)
local _EXEC
_EXEC="$(echo ${_LB_LINE} | sed -e 's|^!||')"
case "${LB_BUILD_WITH_CHROOT}" in
@ -57,11 +61,15 @@ Expand_packagelist ()
\#if\ *)
if [ ${_LB_NESTED} -eq 1 ]
then
echo "E: Nesting conditionals is not supported" >&2
Echo_error "Nesting conditionals is not supported"
exit 1
fi
_LB_NESTED=1
local _LB_NEEDLE
local _LB_HAYSTACK
local _LB_NEEDLE_PART
local _LB_HAYSTACK_PART
_LB_NEEDLE="$(echo "${_LB_LINE}" | cut -d' ' -f3-)"
_LB_HAYSTACK="$(eval "echo \$LB_$(echo "${_LB_LINE}" | cut -d' ' -f2)")"
@ -81,22 +89,26 @@ Expand_packagelist ()
\#nif\ *)
if [ ${_LB_NESTED} -eq 1 ]
then
echo "E: Nesting conditionals is not supported" >&2
Echo_error "Nesting conditionals is not supported"
exit 1
fi
_LB_NESTED=1
local _LB_NEEDLE
local _LB_HAYSTACK
local _LB_NEEDLE_PART
local _LB_HAYSTACK_PART
_LB_NEEDLE="$(echo "${_LB_LINE}" | cut -d' ' -f3-)"
_LB_HAYSTACK="$(eval "echo \$LB_$(echo "${_LB_LINE}" | cut -d' ' -f2)")"
_LB_ENABLED=0
_LB_ENABLED=1
for _LB_NEEDLE_PART in ${_LB_NEEDLE}
do
for _LB_HAYSTACK_PART in ${_LB_HAYSTACK}
do
if [ "${_LB_NEEDLE_PART}" != "${_LB_HAYSTACK_PART}" ]
if [ "${_LB_NEEDLE_PART}" = "${_LB_HAYSTACK_PART}" ]
then
_LB_ENABLED=1
_LB_ENABLED=0
fi
done
done
@ -125,13 +137,15 @@ Expand_packagelist ()
Discover_package_architectures ()
{
_LB_EXPANDED_PKG_LIST="${1}"
_LB_DISCOVERED_ARCHITECTURES=""
local _LB_EXPANDED_PKG_LIST="${1}"
local _LB_DISCOVERED_ARCHITECTURES=""
shift
if [ -e "${_LB_EXPANDED_PKG_LIST}" ] && [ -s "${_LB_EXPANDED_PKG_LIST}" ]
then
local _LB_PACKAGE_LINE
local _LB_PACKAGE_LINE_PART
while read _LB_PACKAGE_LINE
do
# Lines from the expanded package list may have multiple, space-separated packages

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -8,56 +9,101 @@
## under certain conditions; see COPYING for details.
# The file that records temporarily installed packages.
Installed_tmp_packages_file ()
{
echo "chroot.installed_tmp_pkgs"
}
# Note, writes to _LB_PACKAGES
Check_package ()
{
CHROOT="${1}"
FILE="${2}"
PACKAGE="${3}"
local CHROOT="${1}"
local FILE="${2}"
local PACKAGE="${3}"
Check_installed "${CHROOT}" "${FILE}" "${PACKAGE}"
case "${INSTALL_STATUS}" in
1)
if [ "${INSTALL_STATUS}" -ne 0 ]
then
if [ "${LB_BUILD_WITH_CHROOT}" != "false" ] && [ "${CHROOT}" = "chroot" ]
then
_LB_PACKAGES="${_LB_PACKAGES} ${PACKAGE}"
;;
2)
else
Echo_error "You need to install %s on your host system." "${PACKAGE}"
exit 1
;;
esac
}
Install_package ()
{
if [ -n "${_LB_PACKAGES}" ] && [ "${LB_BUILD_WITH_CHROOT}" != "false" ]
then
case "${LB_APT}" in
apt|apt-get)
Chroot chroot "apt-get install -o APT::Install-Recommends=false ${APT_OPTIONS} ${_LB_PACKAGES}"
;;
aptitude)
Chroot chroot "aptitude install --without-recommends ${APTITUDE_OPTIONS} ${_LB_PACKAGES}"
;;
esac
fi
fi
}
Remove_package ()
# Note, reads from _LB_PACKAGES
Install_packages ()
{
if [ -n "${_LB_PACKAGES}" ] && [ "${LB_BUILD_WITH_CHROOT}" != "false" ]
then
if [ -z "${_LB_PACKAGES}" ] || [ "${LB_BUILD_WITH_CHROOT}" != "true" ]; then
return
fi
# Record in file to survive failure such that recovery can take place.
local LIST_FILE
LIST_FILE="$(Installed_tmp_packages_file)"
local PACKAGE
for PACKAGE in ${_LB_PACKAGES}; do
echo "${PACKAGE}" >> "${LIST_FILE}"
done
case "${LB_APT}" in
apt|apt-get)
Chroot chroot "apt-get install -o APT::Install-Recommends=false ${APT_OPTIONS} ${_LB_PACKAGES}"
;;
aptitude)
Chroot chroot "aptitude install --without-recommends ${APTITUDE_OPTIONS} ${_LB_PACKAGES}"
;;
esac
unset _LB_PACKAGES # Can clear this now
}
Remove_packages ()
{
if [ "${LB_BUILD_WITH_CHROOT}" != "true" ]; then
return
fi
local LIST_FILE
LIST_FILE="$(Installed_tmp_packages_file)"
# List is read from file to ensure packages from any past failure are
# included in the list on re-running scripts to recover.
local PACKAGES=""
if [ -e "${LIST_FILE}" ]; then
local PACKAGE
while read -r PACKAGE; do
PACKAGES="${PACKAGES} ${PACKAGE}"
done < "${LIST_FILE}"
fi
if [ -n "${PACKAGES}" ]; then
case "${LB_APT}" in
apt|apt-get)
Chroot chroot "apt-get remove --purge ${APT_OPTIONS} ${_LB_PACKAGES}"
Chroot chroot "apt-get remove --auto-remove --purge ${APT_OPTIONS} ${PACKAGES}"
;;
aptitude)
Chroot chroot "aptitude purge ${APTITUDE_OPTIONS} ${_LB_PACKAGES}"
Chroot chroot "aptitude purge --purge-unused ${APTITUDE_OPTIONS} ${PACKAGES}"
;;
esac
fi
rm -f "${LIST_FILE}"
}
#FIXME: make use of this. see commit log that added this for details.
# Perform temp package removal for recovery if necessary
Cleanup_temp_packages ()
{
if [ -e "$(Installed_tmp_packages_file)" ]; then
Remove_packages
fi
}
# Check_installed
@ -67,9 +113,9 @@ Remove_package ()
# 2 if package isn't installed and we aren't in an apt managed system
Check_installed ()
{
CHROOT="${1}"
FILE="${2}"
PACKAGE="${3}"
local CHROOT="${1}"
local FILE="${2}"
local PACKAGE="${3}"
if [ "${LB_BUILD_WITH_CHROOT}" = "true" ] && [ "${CHROOT}" = "chroot" ]
then
@ -80,9 +126,9 @@ Check_installed ()
INSTALL_STATUS=1
fi
else
if which dpkg-query > /dev/null 2>&1
if [ -e /etc/debian_version ]
then
if Chroot chroot "dpkg-query -s ${PACKAGE}" 2> /dev/null | grep -qs "Status: install"
if dpkg-query -s "${PACKAGE}" 2> /dev/null | grep -qs "Status: install"
then
INSTALL_STATUS=0
else
@ -99,3 +145,28 @@ Check_installed ()
fi
}
# $1 = Packagename
# Echoes:
# 1 if the package is available
# 0 otherwise
Check_package_available ()
{
local _PACKAGE="${1}"
if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]
then
if [ $(Chroot chroot apt-cache show "^${_PACKAGE}$" 2> /dev/null | grep "^Package:" | wc -l) -eq 1 ]
then
echo 1
return
fi
else
if [ $(apt-cache show "^${_PACKAGE}$" 2> /dev/null | grep "^Package:" | wc -l) -eq 1 ]
then
echo 1
return
fi
fi
echo 0
}

View File

@ -1,18 +0,0 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
# Debian releases
RELEASE_jessie="8"
RELEASE_stretch="9"
RELEASE_sid="unstable"
# Progress Linux releases
RELEASE_baureo="2"
RELEASE_cairon="3"

150
functions/sourcelist.sh Executable file
View File

@ -0,0 +1,150 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
Create_apt_sources_list ()
{
local PARENT_MIRROR
local MIRROR
local PARENT_MIRROR_SECURITY
local MIRROR_SECURITY
local PARENT_DISTRIBUTION
local DISTRIBUTION
case "${1}" in
chroot)
PARENT_MIRROR=${LB_PARENT_MIRROR_CHROOT}
MIRROR=${LB_MIRROR_CHROOT}
PARENT_MIRROR_SECURITY=${LB_PARENT_MIRROR_CHROOT_SECURITY}
MIRROR_SECURITY=${LB_MIRROR_CHROOT_SECURITY}
PARENT_DISTRIBUTION=${LB_PARENT_DISTRIBUTION_CHROOT}
DISTRIBUTION=${LB_DISTRIBUTION_CHROOT}
;;
binary)
PARENT_MIRROR="${LB_PARENT_MIRROR_BINARY}"
MIRROR="${LB_MIRROR_BINARY}"
PARENT_MIRROR_SECURITY=${LB_PARENT_MIRROR_BINARY_SECURITY}
MIRROR_SECURITY=${LB_MIRROR_BINARY_SECURITY}
PARENT_DISTRIBUTION=${LB_PARENT_DISTRIBUTION_BINARY}
DISTRIBUTION=${LB_DISTRIBUTION_BINARY}
;;
*)
Echo_error "Invalid mode '${1}' specified for source list creation!"
exit 1
;;
esac
local _PASS="${2}"
local PARENT_FILE
case "${LB_DERIVATIVE}" in
true)
PARENT_FILE="sources.list.d/debian.list"
;;
false)
PARENT_FILE="sources.list"
;;
esac
local LIST_FILE="chroot/etc/apt/sources.list.d/${LB_MODE}.list"
local PARENT_LIST_FILE="chroot/etc/apt/${PARENT_FILE}"
local _DISTRIBUTION
if [ "${LB_DERIVATIVE}" = "true" ]; then
_DISTRIBUTION="$(echo ${DISTRIBUTION} | sed -e 's|-backports||')"
fi
# Clear out existing lists
rm -f ${PARENT_LIST_FILE} ${LIST_FILE}
# Set general repo
echo "deb ${PARENT_MIRROR} ${PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> ${PARENT_LIST_FILE}
echo "deb-src ${PARENT_MIRROR} ${PARENT_DISTRIBUTION} ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
if [ "${LB_DERIVATIVE}" = "true" ]; then
echo "deb ${MIRROR} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
echo "deb-src ${MIRROR} ${_DISTRIBUTION} ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
fi
# Set security repo
if [ "${LB_SECURITY}" = "true" ]; then
case "${LB_MODE}" in
debian)
case "${PARENT_DISTRIBUTION}" in
sid|unstable)
# do nothing
;;
buster|jessie|stretch)
echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
echo "deb-src ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}/updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
;;
*)
echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
echo "deb-src ${PARENT_MIRROR_SECURITY} ${PARENT_DISTRIBUTION}-security ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
;;
esac
if [ "${LB_DERIVATIVE}" = "true" ]; then
echo "deb ${MIRROR_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
echo "deb-src ${MIRROR_SECURITY} ${_DISTRIBUTION}/updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
fi
;;
esac
fi
# Set updates repo
if [ "${LB_UPDATES}" = "true" ]; then
echo "deb ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
echo "deb-src ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
if [ "${LB_DERIVATIVE}" = "true" ]; then
echo "deb ${MIRROR} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
echo "deb-src ${MIRROR} ${_DISTRIBUTION}-updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
fi
fi
# Set proposed-updates repo
if [ "${LB_PROPOSED_UPDATES}" = "true" ]; then
echo "deb ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-proposed-updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
echo "deb-src ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-proposed-updates ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
if [ "${LB_DERIVATIVE}" = "true" ]; then
echo "deb ${MIRROR} ${_DISTRIBUTION}-proposed-updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
echo "deb-src ${MIRROR} ${_DISTRIBUTION}-proposed-updates ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
fi
fi
# Set backports repo
if [ "${LB_BACKPORTS}" = "true" ]; then
case "${LB_MODE}" in
debian)
if [ "${PARENT_DISTRIBUTION}" != "sid" ] && [ "${PARENT_DISTRIBUTION}" != "unstable" ]; then
echo "deb ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
echo "deb-src ${PARENT_MIRROR} ${PARENT_DISTRIBUTION}-backports ${LB_PARENT_ARCHIVE_AREAS}" >> "${PARENT_LIST_FILE}"
fi
;;
esac
if [ "${LB_DERIVATIVE}" = "true" ]; then
echo "deb ${MIRROR} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
echo "deb-src ${MIRROR} ${_DISTRIBUTION}-backports ${LB_ARCHIVE_AREAS}" >> "${LIST_FILE}"
fi
fi
# Disable deb-src entries?
if [ "${_PASS}" != "source" ] && [ "${LB_APT_SOURCE_ARCHIVES}" != "true" ]; then
sed -i "s/^deb-src/#deb-src/g" "${PARENT_LIST_FILE}"
if [ "${LB_DERIVATIVE}" = "true" ]; then
sed -i "s/^deb-src/#deb-src/g" "${LIST_FILE}"
fi
fi
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -8,31 +9,77 @@
## under certain conditions; see COPYING for details.
Stagefiles_dir ()
{
echo ".build"
}
# Get the default filename for a script's stagefile (the name of the script
# file itself). A suffix can be appended via providing as a param.
Stagefile_name ()
{
local SUFFIX="${1}"
local FILENAME
FILENAME="$(basename $0)"
echo ${FILENAME}${SUFFIX:+.$SUFFIX}
}
Stagefile_exists ()
{
if [ -f ".build/${1:-$(Stagefile_name)}" ]; then
return 0
fi
return 1
}
Check_stagefile ()
{
FILE="${1}"
NAME="$(basename ${1})"
local FILE
local NAME
FILE=".build/${1:-$(Stagefile_name)}"
NAME="$(basename ${FILE})"
# Checking stage file
if [ -f "${FILE}" ]
then
if [ "${_FORCE}" != "true" ]
then
# Skipping execution
Echo_warning "skipping %s, already done" "${NAME}"
if [ -f "${FILE}" ]; then
if [ "${_FORCE}" != "true" ]; then
# Skip execution
Echo_warning "Skipping %s, already done" "${NAME}"
exit 0
else
# Forcing execution
Echo_message "forcing %s" "${NAME}"
# Force execution
Echo_message "Forcing %s" "${NAME}"
rm -f "${FILE}"
fi
fi
}
# Used by chroot preparation scripts in removal mode
Ensure_stagefile_exists ()
{
local FILE
local NAME
FILE=".build/${1:-$(Stagefile_name)}"
NAME="$(basename ${FILE})"
# Checking stage file
if [ ! -f "${FILE}" ]; then
if [ "${_FORCE}" != "true" ]; then
# Skip execution
Echo_warning "Skipping removal of %s, it is not applied" "${NAME}"
exit 0
else
# Force execution
Echo_message "Forcing %s" "${NAME}"
fi
fi
}
Create_stagefile ()
{
FILE="${1}"
DIRECTORY="$(dirname ${1})"
local FILE
local DIRECTORY
FILE=".build/${1:-$(Stagefile_name)}"
DIRECTORY="$(dirname ${FILE})"
# Creating stage directory
mkdir -p "${DIRECTORY}"
@ -41,31 +88,37 @@ Create_stagefile ()
touch "${FILE}"
}
Require_stagefile ()
Remove_stagefile ()
{
NAME="$(basename ${0})"
FILES="${@}"
NUMBER="$(echo ${@} | wc -w)"
local FILE
FILE=".build/${1:-$(Stagefile_name)}"
rm -f "${FILE}"
}
for FILE in ${FILES}
do
# Find at least one of the required stages
if [ -f ${FILE} ]
then
CONTINUE="true"
NAME="${NAME} $(basename ${FILE})"
# Ensure that all specified stagefiles exist (and thus that all associated stages are complete)
Require_stagefiles ()
{
if [ $# -eq 0 ]; then
Echo_warning "Bad 'Require_stagefiles' usage, no params were supplied"
return 0
fi
local FILE
local MISSING=""
local MISSING_COUNT=0
for FILE in "${@}"; do
if [ ! -f ".build/${FILE}" ]; then
MISSING_COUNT=$(( $MISSING_COUNT + 1 ))
MISSING="${MISSING:+$MISSING }${FILE}"
fi
done
if [ "${CONTINUE}" != "true" ]
then
if [ "${NUMBER}" -eq 1 ]
then
Echo_error "%s: %s missing" "${NAME}" "${FILE}"
else
Echo_error "%s: one of %s is missing" "${NAME}" "${FILES}"
fi
exit 1
if [ $MISSING_COUNT -eq 0 ]; then
return 0
elif [ $MISSING_COUNT -eq 1 ]; then
Echo_error "the following stage is required to be done first: %s" "${MISSING}"
else
Echo_error "the following stages are required to be completed first: %s" "${MISSING}"
fi
exit 1
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,22 +11,32 @@
Usage ()
{
printf "%s - %s\n" "${PROGRAM}" "${DESCRIPTION}"
echo
Echo "Usage:"
echo
echo "${PROGRAM_NAME} - ${DESCRIPTION}"
printf "\nUsage:\n\n"
if [ -n "${USAGE}" ]
then
Echo " ${USAGE}"
echo
if [ -n "${USAGE}" ]; then
# printf without placeholder required here for correct \t and \n formatting of `lb config` usage string
printf " ${USAGE}\n"
fi
printf " %s [-h|--help]\n" "${PROGRAM}"
printf " %s [-u|--usage]\n" "${PROGRAM}"
printf " %s [-v|--version]\n" "${PROGRAM}"
echo " ${PROGRAM} [-h|--help]"
echo " ${PROGRAM} [-u|--usage]"
echo " ${PROGRAM} [-v|--version]"
echo
Echo "Try \"%s --help\" for more information." "${PROGRAM}"
echo "Try \"${PROGRAM} --help\" for more information."
exit 1
case $1 in
--fail)
exit 1
;;
--exit)
exit 0
;;
"")
:
;;
*)
Echo_error "Unexpected parameter to Usage(): $1"
;;
esac
}

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -10,16 +11,16 @@
Apt ()
{
CHROOT="${1}"
local CHROOT="${1}"
shift
case "${LB_APT}" in
apt|apt-get)
Chroot ${CHROOT} apt-get ${APT_OPTIONS} ${@}
Chroot ${CHROOT} apt-get ${APT_OPTIONS} "${@}"
;;
aptitude)
Chroot ${CHROOT} aptitude ${APTITUDE_OPTIONS} ${@}
Chroot ${CHROOT} aptitude ${APTITUDE_OPTIONS} "${@}"
;;
esac
}

3
manpages/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
po4a.cfg
fr/
ja/

View File

@ -42,12 +42,12 @@ build: check po4a.cfg
@if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
then \
echo "E: po4a - command not found"; \
echo "I: po4a can be obtained from http://po4a.alioth.debian.org/"; \
echo "I: po4a can be obtained from https://po4a.org"; \
echo "I: On Debian based systems, po4a can be installed with 'apt-get install po4a'."; \
exit 1; \
fi
po4a --keep 0 --package-name live-build --package-version $(shell cat ../VERSION) po4a.cfg
po4a --copyright-holder "Debian Live Project" --keep 0 --package-name live-build --package-version $(shell cd .. && dpkg-parsechangelog -S Version) po4a.cfg
clean:
rm -f po/*/*.po~
@ -57,3 +57,5 @@ distclean: clean
rm -rf $(LANGUAGES)
rebuild: distclean update build
.PHONY: all update check build clean distclean rebuild

View File

@ -1,6 +1,7 @@
#!/bin/sh
## live-build(7) - Live System Build Components
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@ -11,13 +12,14 @@
set -e
PROGRAM="LIVE\\\-BUILD"
VERSION="$(cat ../VERSION)"
VERSION="$(cd .. && dpkg-parsechangelog -S Version)"
RELEASE_DATE="$(cd .. && dpkg-parsechangelog -S Timestamp)"
DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)"
DATE="$(LC_ALL=C date --utc --date="@${RELEASE_DATE}" +%Y\\\\-%m\\\\-%d)"
DAY="$(LC_ALL=C date +%d)"
MONTH="$(LC_ALL=C date +%m)"
YEAR="$(LC_ALL=C date +%Y)"
DAY="$(LC_ALL=C date --utc --date="@${RELEASE_DATE}" +%d)"
MONTH="$(LC_ALL=C date --utc --date="@${RELEASE_DATE}" +%m)"
YEAR="$(LC_ALL=C date --utc --date="@${RELEASE_DATE}" +%Y)"
echo "Updating version headers..."
@ -25,7 +27,7 @@ for MANPAGE in en/*
do
SECTION="$(basename ${MANPAGE} | awk -F. '{ print $2 }')"
sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Live Systems Project\"|" ${MANPAGE}
sed -i -e "s|^.TH.*$|.TH ${PROGRAM} ${SECTION} ${DATE} ${VERSION} \"Debian Live Project\"|" ${MANPAGE}
done
# European date format

View File

@ -1,17 +1,15 @@
.TH LIVE\-BUILD 1 2015\-05\-04 5.0~a6-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
.SH NAME
\fBlb\fR \- wrapper for live\-build programs
.SH SYNOPSIS
\fBlb\fR COMMAND [COMMAND_OPTIONS]
\fBlb\fR \fICOMMAND\fR [\fICOMMAND_OPTIONS\fR]
.PP
\fBlb\fR [\fIlive\-build\ options\fR]
\fBlb\fR [\fIOPTIONS\fR]
.SH DESCRIPTION
\fBlb\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
.PP
.\" FIXME
\fBlb\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
.SH OPTIONS
\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.
@ -25,10 +23,10 @@
This program is a part of live\-build.
.SH HOMEPAGE
More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>.
More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
.SH BUGS
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 <\fIdebian-live@lists.debian.org\fR>.
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 <\fIdebian-live@lists.debian.org\fR>.
.SH AUTHOR
live\-build was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>.
live\-build was originally written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. Since 2016 development has been continued by the Debian Live team.

View File

@ -1,13 +1,13 @@
.TH LIVE\-BUILD 1 2015\-05\-04 5.0~a6-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
.SH NAME
\fBlb binary\fR \- Complete the binary stage
\fBlb_binary\fR \- Complete the binary stage
.SH SYNOPSIS
\fBlb binary\fR [\fIlive\-build options\fR]
\fBlb binary\fR [\fIOPTIONS\fR]
.SH DESCRIPTION
\fBlb binary\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
\fBlb binary\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
.PP
\fBlb binary\fR calls all necessary live\-build programs in the correct order to complete the binary stage.
@ -23,10 +23,10 @@
This program is a part of live\-build.
.SH HOMEPAGE
More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>.
More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
.SH BUGS
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 <\fIdebian-live@lists.debian.org\fR>.
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 <\fIdebian-live@lists.debian.org\fR>.
.SH AUTHOR
live\-build was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>.
live\-build was originally written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. Since 2016 development has been continued by the Debian Live team.

View File

@ -1,13 +1,13 @@
.TH LIVE\-BUILD 1 2015\-05\-04 5.0~a6-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
.SH NAME
\fBlb bootstrap\fR \- Complete the bootstrap stage
\fBlb_bootstrap\fR \- Complete the bootstrap stage
.SH SYNOPSIS
\fBlb bootstrap\fR [\fIlive\-build options\fR]
\fBlb bootstrap\fR [\fIOPTIONS\fR]
.SH DESCRIPTION
\fBlb bootstrap\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
\fBlb bootstrap\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
.PP
\fBlb bootstrap\fR calls all necessary live\-build programs in the correct order to complete the bootstrap stage.
@ -23,10 +23,10 @@
This program is a part of live\-build.
.SH HOMEPAGE
More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>.
More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
.SH BUGS
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 <\fIdebian-live@lists.debian.org\fR>.
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 <\fIdebian-live@lists.debian.org\fR>.
.SH AUTHOR
live\-build was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>.
live\-build was originally written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. Since 2016 development has been continued by the Debian Live team.

View File

@ -1,23 +1,21 @@
.TH LIVE\-BUILD 1 2015\-05\-04 5.0~a6-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
.SH NAME
\fBlb build\fR \- Complete the bootstrap, chroot, binary, and source stages
\fBlb_build\fR \- Complete the bootstrap, chroot, installer, binary, and source stages
.SH SYNOPSIS
\fBlb build\fR [\fIlive\-build options\fR]
\fBlb build\fR [\fIOPTIONS\fR]
.SH DESCRIPTION
\fBlb build\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
\fBlb build\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
.PP
\fBlb build\fR calls all necessary live\-build programs in the correct order to complete the bootstrap, chroot, binary, and source stages.
\fBlb build\fR calls all necessary live\-build programs in the correct order to complete the bootstrap, chroot, installer, binary, and source stages.
.SH OPTIONS
\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.
.SH FILES
.\" FIXME
.IP "\fBauto/build\fR" 4
.\" FIXME
.SH SEE ALSO
\fIlive\-build\fR(7)
@ -25,10 +23,10 @@
This program is a part of live\-build.
.SH HOMEPAGE
More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>.
More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
.SH BUGS
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 <\fIdebian-live@lists.debian.org\fR>.
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 <\fIdebian-live@lists.debian.org\fR>.
.SH AUTHOR
live\-build was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>.
live\-build was originally written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. Since 2016 development has been continued by the Debian Live team.

View File

@ -1,13 +1,13 @@
.TH LIVE\-BUILD 1 2015\-05\-04 5.0~a6-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
.SH NAME
\fBlb chroot\fR \- Complete the chroot stage
\fBlb_chroot\fR \- Complete the chroot stage
.SH SYNOPSIS
\fBlb chroot\fR [\fIlive\-build options\fR]
\fBlb chroot\fR [\fIOPTIONS\fR]
.SH DESCRIPTION
\fBlb chroot\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
\fBlb chroot\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
.PP
\fBlb chroot\fR calls all necessary live\-build programs in the correct order to complete the chroot stage.
@ -23,10 +23,10 @@
This program is a part of live\-build.
.SH HOMEPAGE
More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>.
More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
.SH BUGS
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 <\fIdebian-live@lists.debian.org\fR>.
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 <\fIdebian-live@lists.debian.org\fR>.
.SH AUTHOR
live\-build was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>.
live\-build was originally written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. Since 2016 development has been continued by the Debian Live team.

View File

@ -1,22 +1,19 @@
.TH LIVE\-BUILD 1 2015\-05\-04 5.0~a6-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
.SH NAME
\fBlb clean\fR \- Clean build directory
\fBlb_clean\fR \- Clean build directory
.SH SYNOPSIS
\fBlb clean\fR [\fIlive\-build options\fR]
\fBlb clean\fR [\fIOPTIONS\fR]
.SH DESCRIPTION
\fBlb clean\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
\fBlb clean\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
.PP
.\" FIXME
\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.
.\" FIXME
.SH OPTIONS
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.
.PP
.\" FIXME
.IP "\fB\-\-all\fR" 4
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.
.IP "\fB\-\-cache\fR" 4
@ -33,12 +30,9 @@ removes everything, including package cache but not stage cache. The config dire
removes all stage files.
.IP "\fB\-\-source\fR" 4
removes all source related caches, files, directories, and stage files.
.\" FIXME
.SH FILES
.\" FIXME
.IP "\fBauto/clean\fR" 4
.\" FIXME
.SH SEE ALSO
\fIlive\-build\fR(7)
@ -46,10 +40,10 @@ removes all source related caches, files, directories, and stage files.
This program is a part of live\-build.
.SH HOMEPAGE
More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>.
More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
.SH BUGS
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 <\fIdebian-live@lists.debian.org\fR>.
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 <\fIdebian-live@lists.debian.org\fR>.
.SH AUTHOR
live\-build was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>.
live\-build was originally written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. Since 2016 development has been continued by the Debian Live team.

View File

@ -1,25 +1,20 @@
.TH LIVE\-BUILD 1 2015\-05\-04 5.0~a6-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2020\-04\-27 1:20191222 "Debian Live Project"
.SH NAME
\fBlb config\fR \- Create config directory
\fBlb_config\fR \- Create config directory
.SH SYNOPSIS
\fBlb config\fR [\fIlive\-build options\fR]
\fBlb config\fR {\fB\-h\fR|\fB\-\-help\fR|\fB\-u\fR|\fB\-\-usage\fR|\fB\-v\fR|\fB\-\-version\fR}
.PP
.\" FIXME
\fBlb config\fR
.br
[\fB\-\-apt\fR apt|aptitude]
.br
[\fB\-\-apt\-ftp\-proxy\fR \fIURL\fR]
[\fB\-\-apt\fR apt|apt-get|aptitude]
.br
[\fB\-\-apt\-http\-proxy\fR \fIURL\fR]
.br
[\fB\-\-apt\-indices\fR true|false]
.br
[\fB\-\-apt\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
.br
[\fB\-\-aptitude\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
.br
[\fB\-\-apt\-pipeline\fR \fIDEPTH\fR]
.br
@ -29,17 +24,35 @@
.br
[\fB\-\-apt\-source\-archives\fR true|false]
.br
[\-a|\fB\-\-architectures\fR \fIARCHITECTURE\fR]
[\fB\-\-aptitude\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
.br
[\-b|\fB\-\-binary\-images\fR iso|iso\-hybrid|netboot|tar|hdd]
[\fB\-a\fR|\fB\-\-architecture\fR \fIARCHITECTURE\fR]
.br
[\fB\-\-binary\-filesystem\fR fat16|fat32|ext2|ext3|ext4]
[\fB\-\-archive\-areas\fR \fIARCHIVE_AREA\fR|"\fIARCHIVE_AREAS\fR"]
.br
[\fB\-\-bootappend\-install\fR \fIPARAMETER\fR|\fI"PARAMETERS"\fR]
[\fB\-\-backports\fR true|false]
.br
[\fB\-\-bootappend\-live\fR \fIPARAMETER\fR|\fI"PARAMETERS"\fR]
[\fB\-\-binary\-filesystem\fR fat16|fat32|ext2|ext3|ext4|ntfs]
.br
[\fB\-\-bootloader\fR grub|grub2|syslinux]
[\fB\-b\fR|\fB\-\-binary\-image\fR iso|iso\-hybrid|netboot|tar|hdd]
.br
[\fB\-\-bootappend\-install\fR \fIPARAMETER\fR|"\fIPARAMETERS\fR"]
.br
[\fB\-\-bootappend\-live\fR \fIPARAMETER\fR|"\fIPARAMETERS\fR"]
.br
[\fB\-\-bootappend\-live\-failsafe\fR \fIPARAMETER\fR|"\fIPARAMETERS\fR"]
.br
[\fB\-\-bootloaders\fR grub-legacy|grub-pc|syslinux|grub-efi|"\fIBOOTLOADERS\fR"]
.br
[\fB\-\-bootstrap\-qemu\-arch\fR \fIARCH\fR]
.br
[\fB\-\-bootstrap\-qemu\-exclude\fR \fIPACKAGE\fR|"\fIPACKAGES\fR"]
.br
[\fB\-\-bootstrap\-qemu\-static\fR \fIPATH\fR]
.br
[\fB\-\-breakpoints\fR]
.br
[\fB\-\-build\-with\-chroot\fR true|false]
.br
[\fB\-\-cache\fR true|false]
.br
@ -47,69 +60,83 @@
.br
[\fB\-\-cache\-packages\fR true|false]
.br
[\fB\-\-cache\-stages\fR \fISTAGE\fR|\fI"STAGES"\fR]
[\fB\-\-cache\-stages\fR bootstrap|chroot|rootfs|"\fISTAGES\fR"]
.br
[\fB\-\-checksums\fR md5|sha1|sha256|none]
[\fB\-\-checksums\fR md5|sha1|sha224|sha256|sha384|sha512|none]
.br
[\fB\-\-compression\fR bzip2|gzip|lzip|none]
[\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none|plain]
.br
[\fB\-\-config\fR \fIGIT_URL::GIT_ID\fR]
[\fB\-\-chroot\-squashfs\-compression\-level\fR LEVEL]
.br
[\fB\-\-build\-with\-chroot\fR true|false]
.br
[\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none]
[\fB\-\-chroot\-squashfs\-compression\-type\fR gzip|lzma|lzo|lz4|xz|zstd]
.br
[\fB\-\-clean\fR]
.br
[\-c|\fB\-\-conffile\fR \fIFILE\fR]
[\fB\-\-color\fR]
.br
[\fB\-\-compression\fR bzip2|gzip|lzip|xz|none]
.br
[\fB\-c\fR|\fB\-\-conffile\fR \fIFILE\fR]
.br
[\fB\-\-config\fR \fIGIT_URL\fR::\fIGIT_BRANCH\fR]
.br
[\fB\-\-debconf\-frontend\fR dialog|editor|noninteractive|readline]
.br
[\fB\-\-debconf\-priority\fR low|medium|high|critical]
.br
[\fB\-\-debian\-installer\fR true|cdrom|netinst|netboot|businesscard|live|false]
[\fB\-\-debian\-installer\fR cdrom|netinst|netboot|businesscard|live|none]
.br
[\fB\-\-debian\-installer\-distribution\fR daily|\fICODENAME\fR]
.br
[\fB\-\-debian\-installer\-preseedfile\fR \fIFILE\fR|\fIURL\fR]
[\fB\-\-debian\-installer\-distribution\fR daily|git|\fICODENAME\fR]
.br
[\fB\-\-debian\-installer\-gui\fR true|false]
.br
[\fB\-\-debian\-installer\-preseedfile\fR \fIFILE\fR|\fIURL\fR]
.br
[\fB\-\-debootstrap\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
.br
[\fB\-\-debootstrap\-script\fR \fISCRIPT\fR]
.br
[\fB\-\-debug\fR]
.br
[\-d|\fB\-\-distribution\fR \fICODENAME\fR]
[\fB\-d\fR|\fB\-\-distribution\fR \fICODENAME\fR]
.br
[\fB\-\-parent\-distribution\fR \fICODENAME\fR]
[\fB\-\-distribution\-chroot\fR \fICODENAME\fR]
.br
[\fB\-\-parent\-debian\-installer\-distribution\fR \fICODENAME\fR]
[\fB\-\-distribution\-binary\fR \fICODENAME\fR]
.br
[\fB\-\-dm\-verity\fR]
.br
[\fB\-\-dm\-verity\-fec\fR \fINB_ROOTS\fR]
.br
[\fB\-\-dm\-verity\-sign\fR \fISIGN_SCRIPT\fR]
.br
[\fB\-\-dump\fR]
.br
[\fB\-\-fdisk\fR fdisk|fdisk.dist]
[\fB\-\-firmware\-binary\fR true|false]
.br
[\fB\-\-firmware\-binary true|false\fR]
.br
[\fB\-\-firmware\-chroot true|false\fR]
[\fB\-\-firmware\-chroot\fR true|false]
.br
[\fB\-\-force\fR]
.br
[\fB\-\-grub\-splash\fR \fIFILE\fR]
.br
[\fB\-\-gzip\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
.br
[\fB\-\-hooks\fR \fIFILE\fR]
[\fB\-\-hdd\-label\fR \fILABEL\fR]
.br
[\fB\-\-hdd\-partition\-start\fR \fISTART\fR]
.br
[\fB\-\-hdd\-size\fR \fISIZE\fR]
.br
[\fB\-\-ignore\-system\-defaults\fR]
.br
[\fB\-\-initramfs\fR auto|none|live\-boot|casper]
[\fB\-\-image\-name\fR \fINAME\fR]
.br
[\fB\-\-initramfs\fR none|live\-boot|dracut\-live]
.br
[\fB\-\-initramfs\-compression\fR bzip2|gzip|lzma]
.br
[\fB\-\-initsystem\fR sysvinit|runit|systemd|upstart|none]
[\fB\-\-initsystem\fR sysvinit|systemd|none]
.br
[\fB\-\-interactive\fR shell]
.br
[\fB\-\-isohybrid\-options\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
[\fB\-\-interactive\fR true|shell|x11|xnest|false]
.br
[\fB\-\-iso\-application\fR \fINAME\fR]
.br
@ -121,350 +148,328 @@
.br
[\fB\-\-jffs2\-eraseblock\fR \fISIZE\fR]
.br
[\fB\-\-keyring\-packages\fR \fIPACKAGE\fI|\fI"PACKAGES"\fR]
[\fB\-\-keyring\-packages\fR \fIPACKAGE\fR|"\fIPACKAGES\fR"]
.br
[\-k|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|\fI"FLAVOURS"\fR]
[\fB\-k\fR|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|"\fIFLAVOURS\fR"]
.br
[\fB\-\-linux\-packages\fR \fI"PACKAGES"\fR]
[\fB\-\-linux\-packages\fR \fIPACKAGE\fR|"\fIPACKAGES\fR"]
.br
[\fB\-\-losetup\fR losetup|losetup.orig]
[\fB\-\-loadlin\fR true|false]
.br
[\fB\-\-memtest\fR memtest86+|memtest86|none]
.br
[\-m|\fB\-\-parent\-mirror\-bootstrap\fR \fIURL\fR]
[\fB\-\-mirror\-binary\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-chroot\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-chroot\-security\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-chroot\-updates\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-chroot\-backports\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-binary\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-binary\-security\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-binary\-updates\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-binary\-backports\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-debian\-installer\fR \fIURL\fR]
[\fB\-\-mirror\-binary\-security\fR \fIURL\fR]
.br
[\fB\-\-mirror\-bootstrap\fR \fIURL\fR]
.br
[\fB\-\-mirror\-chroot\fR \fIURL\fR]
.br
[\fB\-\-mirror\-chroot\-security\fR \fIURL\fR]
.br
[\fB\-\-mirror\-chroot\-updates\fR \fIURL\fR]
.br
[\fB\-\-mirror\-chroot\-backports\fR \fIURL\fR]
.br
[\fB\-\-mirror\-binary\fR \fIURL\fR]
.br
[\fB\-\-mirror\-binary\-security\fR \fIURL\fR]
.br
[\fB\-\-mirror\-binary\-updates\fR \fIURL\fR]
.br
[\fB\-\-mirror\-binary\-backports\fR \fIURL\fR]
.br
[\fB\-\-mirror\-debian\-installer\fR \fIURL\fR]
.br
[\fB\-\-mode\fR debian|progress-linux|ubuntu]
.br
[\fB\-\-system\fR live|normal]
.br
[\fB\-\-net\-root\-filesystem\fR nfs|cfs]
.br
[\fB\-\-net\-root\-mountoptions\fR \fIOPTIONS\fR]
.br
[\fB\-\-net\-root\-path\fR \fIPATH\fR]
.br
[\fB\-\-net\-root\-server\fR \fIIP\fR|\fIHOSTNAME\fR]
.br
[\fB\-\-net\-cow\-filesystem\fR nfs|cfs]
.br
[\fB\-\-net\-cow\-mountoptions\fR \fIOPTIONS\fR]
.br
[\fB\-\-net\-cow\-path\fR \fIPATH\fR]
.br
[\fB\-\-net\-cow\-server\fR \fIIP\fR|\fIHOSTNAME\fR]
[\fB\-\-mode\fR debian]
.br
[\fB\-\-net\-tarball\fR true|false]
.br
[\fB\-\-no\-color\fR]
.br
[\fB\-\-onie\fR true|false]
.br
[\fB\-\-onie\-kernel\-cmdline\fR \fIOPTION\fR|"\fIOPTIONS\fR"]
.br
[\fB\-\-parent\-archive\-areas\fR \fIARCHIVE_AREA\fR|"\fIARCHIVE_AREAS\fR"]
.br
[\fB\-\-parent\-debian\-installer\-distribution\fR daily|git|\fICODENAME\fR]
.br
[\fB\-\-parent\-distribution\fR \fICODENAME\fR]
.br
[\fB\-\-parent\-distribution\-chroot\fR \fICODENAME\fR]
.br
[\fB\-\-parent\-distribution\-binary\fR \fICODENAME\fR]
.br
[\fB\-\-parent\-mirror\-binary\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-binary\-security\fR \fIURL\fR]
.br
[\fB\-m\fR|\fB\-\-parent\-mirror\-bootstrap\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-chroot\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-chroot\-security\fR \fIURL\fR]
.br
[\fB\-\-parent\-mirror\-debian\-installer\fR \fIURL\fR]
.br
[\fB\-\-quiet\fR]
.br
[\fB\-\-archive\-areas\fR \fIARCHIVE_AREA\fR|\fI"ARCHIVE_AREAS"\fR]
.br
[\fB\-\-parent\-archive\-areas\fR \fIPARENT_ARCHIVE_AREA\fR|\fI"PARENT_ARCHIVE_AREAS"\fR]
.br
[\fB\-\-security\fR true|false]
.br
[\fB\-\-source\fR true|false]
.br
[\-s|\fB\-\-source\-images\fR iso|netboot|tar|hdd]
[\fB\-s\fR|\fB\-\-source\-images\fR iso|netboot|tar|hdd|"\fIIMAGES\fR"]
.br
[\fB\-\-tasksel\fR apt|aptitude|tasksel]
[\fB\-\-swap\-file\-path\fR \fIPATH\fR]
.br
[\fB\-\-templates\fR \fIPATH\fR]
[\fB\-\-swap\-file\-size\fR \fIMB\fR]
.br
[\fB\-\-hdd\-size \fIMB\fR]
[\fB\-\-system\fR live|normal]
.br
[\fB\-\-uefi\-secure\-boot\fR auto|enable|disable]
.br
[\fB\-\-updates\fR true|false]
.br
[\fB\-\-backports\fR true|false]
[\fB\-\-utc\-time\fR true|false]
.br
[\fB\-\-validate\fR]
.br
[\fB\-\-verbose\fR]
.br
[\fB\-\-win32\-loader true|false]
.\" FIXME
[\fB\-\-win32\-loader\fR true|false]
.br
[\fB\-\-zsync\fR true|false]
.SH DESCRIPTION
\fBlb config\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
\fBlb config\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
.PP
.\" FIXME
\fBlb config\fR populates the configuration directory for live\-build. By default, this directory is named 'config' and is created in the current directory where \fBlb config\fR was executed.
\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.
.PP
Note: Currently \fBlb config\fR tries to be smart and sets defaults for some options depending on the setting of other options (e.g. which linux packages to be used depending on if a wheezy system gets build or not). 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 its 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.
.\" FIXME
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.
.SH OPTIONS
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.
.PP
.\" FIXME
.IP "\fB\-\-apt\fR apt|aptitude" 4
.IP "\fB\-\-apt\fR apt|apt-get|aptitude" 4
defines if apt\-get or aptitude is used to install packages when building the image. The default is apt.
.IP "\fB\-\-apt\-ftp\-proxy\fR \fIURL\fR" 4
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.
.IP "\fB\-\-apt\-http\-proxy\fR \fIURL\fR" 4
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.
.IP "\fB\-\-apt\-indices\fR true|false|none" 4
defines if the resulting images should have apt indices or not and defaults to true. If set to none, no indices are included at all.
sets the proxy for HTTP connections. By default, this is empty. It is recommended to use the environment variable \fBhttp_proxy\fR instead.
.IP "\fB\-\-apt\-indices\fR true|false" 4
defines if the resulting images should have apt indices or not and defaults to true.
.IP "\fB\-\-apt\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
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.
.IP "\fB\-\-aptitude\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
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.
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.
.IP "\fB\-\-apt\-pipeline\fR \fIDEPTH\fR" 4
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.
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.
.IP "\fB\-\-apt\-recommends\fR true|false" 4
defines if apt should install recommended packages automatically. By default, this is true.
.IP "\fB\-\-apt\-secure\fR true|false" 4
defines if apt should check repository signatures. This is true by default.
.IP "\fB\-\-apt\-source\-archives\fR true|false" 4
defines if deb-src entries should be included in the resulting live image or not, defaults to true.
.IP "\-a|\fB\-\-architectures\fR \fIARCHITECTURE\fR" 4
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.
.IP "\-b|\fB\-\-binary\-images\fR iso|iso\-hybrid|netboot|tar|hdd" 4
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.
.IP "\fB\-\-binary\-filesystem\fR fat16|fat32|ext2|ext3|ext4" 4
defines the filesystem to be used in the image type. This only has an effect if the selected binary image type does allow to 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.
defines if deb-src entries should be included in the resulting live image's apt sources.list or not, defaults to true.
.IP "\fB\-\-aptitude\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
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.
.IP "\fB\-a\fR|\fB\-\-architecture\fR \fIARCHITECTURE\fR" 4
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.
.IP "\fB\-\-archive\-areas\fR \fIARCHIVE_AREA\fR|""\fIARCHIVE_AREAS\fR""" 4
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.
.IP "\fB\-\-backports\fR true|false" 4
defines if debian backports package archives should be included in the image or not.
.IP "\fB\-\-binary\-filesystem\fR fat16|fat32|ext2|ext3|ext4|ntfs" 4
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'.
.IP "\fB\-b\fR|\fB\-\-binary\-image\fR iso|iso\-hybrid|netboot|tar|hdd" 4
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'.
.IP "\fB\-\-bootappend\-install\fR \fIPARAMETER\fR|""\fIPARAMETERS\fR""" 4
sets boot parameters specific to debian\-installer, if included.
.IP "\fB\-\-bootappend\-live\fR \fIPARAMETER\fR|""\fIPARAMETERS\fR""" 4
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.
.IP "\fB\-\-bootloader\fR grub|grub2|syslinux" 4
defines which bootloader is being used in the generated image. This has only an effect if the selected binary image type does allow to 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.
.IP "\fB\-\-cache\fR true|false" 4
defines globally if any cache should be used at all. Different caches can be controlled through the their own options.
.IP "\fB\-\-cache\-indices\fR true|false" 4
defines if downloaded package indices and lists should be cached which is false by default. Enabling it would allow to rebuild an image completely offline, however, you would not get updates anymore then.
.IP "\fB\-\-cache\-packages\fR true|false" 4
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.
.IP "\fB\-\-cache\-stages\fR true|false|\fISTAGE\fR|""\fISTAGES\fR""" 4
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.
.IP "\fB\-\-checksums\fR md5|sha1|sha256|none" 4
defines if the binary image should contain a file called md5sums.txt, sha1sums.txt and/or sha256sums.txt. These lists all files on the image together with their checksums. This in turn can be used by live\-boot's built\-in integrity\-check to verify the medium if specified at boot prompt. In general, this should not be false 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.
.IP "\fB\-\-compression\fR bzip2|gzip|lzip|none" 4
defines the compression program to be used to compress tarballs. Defaults to gzip.
.IP "\fB\-\-config\fR \fIGIT_URL\fR::\fIGIT_ID\fR" 4
allows to bootstrap a config tree from a git repositories, optionally appended by a Git Id (branch, commit, tag, etc.).
.IP "\fB\-\-bootappend\-live\-failsafe\fR \fIPARAMETER\fR|""\fIPARAMETERS\fR""" 4
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.
.IP "\fB\-\-bootloaders\fR grub-legacy|grub-pc|syslinux|grub-efi|""\fIBOOTLOADERS\fR""" 4
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).
.IP "\fB\-\-bootstrap\-qemu\-arch\fR \fIARCH\fR" 4
sets the architecture to use for foreign bootstrap. Defaults to empty.
.IP "\fB\-\-bootstrap\-qemu\-exclude\fR \fIPACKAGE\fR|""\fIPACKAGES\fR""" 4
sets the packages to exclude during foreign bootstrap. Defaults to empty.
.IP "\fB\-\-bootstrap\-qemu\-static\fR \fIPATH\fR" 4
sets the static qemu binary for foreign bootstrap. Defaults to empty.
.IP "\fB\-\-breakpoints\fR" 4
inserts pauses during the generation of the image, where breakpoints have been placed, if any (development oriented).
.IP "\fB\-\-build\-with\-chroot\fR true|false" 4
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.
.IP "\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none" 4
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.
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.
.IP "\fB\-\-cache\fR true|false" 4
defines globally if any cache should be used at all. Different caches can be controlled through their own options.
.IP "\fB\-\-cache\-indices\fR true|false" 4
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.
.IP "\fB\-\-cache\-packages\fR true|false" 4
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.
.IP "\fB\-\-cache\-stages\fR bootstrap|chroot|rootfs|""\fISTAGES\fR""" 4
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.
.IP "\fB\-\-checksums\fR md5|sha1|sha224|sha256|sha384|sha512|none" 4
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.
.IP "\fB\-\-chroot\-filesystem\fR ext2|ext3|ext4|squashfs|jffs2|none|plain" 4
defines which filesystem type should be used for the root filesystem image. If you use 'none' or 'plain', 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.
.IP "\fB\-\-chroot\-squashfs\-compression\-level\fR LEVEL" 4
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.
.IP "\fB\-\-chroot\-squashfs\-compression\-type\fR gzip|lzma|lzo|lz4|xz|zstd" 4
defines the compression algorithm that is used for the root filesystem image if squashfs is used. Defaults to xz.
.IP "\fB\-\-clean\fR" 4
minimizes config directory by automatically removing unused and thus empty subdirectories.
.IP "\-c|\fB\-\-conffile\fR \fIFILE\fR" 4
using a user specified alternative configuration file in addition to the normally used one in the config directory.
.IP "\fB\-\-color\fR" 4
turns on color in the messages.
.IP "\fB\-\-compression\fR bzip2|gzip|lzip|xz|none" 4
defines the compression program to be used to compress tarballs. Defaults to none.
.IP "\fB\-c\fR|\fB\-\-conffile\fR \fIFILE\fR" 4
defines a user specified alternative configuration file to use in addition to the normally used one in the config directory.
.IP "\fB\-\-config\fR \fIGIT_URL\fR::\fIGIT_BRANCH\fR" 4
bootstraps the config tree from a git repository, optionally appended by a Git ID (branch, commit, tag, etc.).
.IP "\fB\-\-debconf\-frontend\fR dialog|editor|noninteractive|readline" 4
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.
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.
.IP "\fB\-\-debconf\-priority\fR low|medium|high|critical" 4
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.
.IP "\fB\-\-debian\-installer\fR true|cdrom|netinst|netboot|businesscard|live|false" 4
.IP "\fB\-\-debian\-installer\fR cdrom|netinst|netboot|businesscard|live|none" 4
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.
.IP "\fB\-\-debian\-installer\-distribution\fR daily|\fICODENAME\fR" 4
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.
.IP "\fB\-\-debian\-installer\-distribution\fR daily|git|\fICODENAME\fR" 4
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 either the \fIdaily\fR built installer or the installer rebuilt from its \fIgit\fR repository.
.IP "\fB\-\-debian\-installer\-gui\fR true|false" 4
defines whether the graphical version of the debian\-installer should be provided alongside the text based one. This defaults to true.
.IP "\fB\-\-debian\-installer\-preseedfile\fR \fIFILE\fR|\fIURL\fR" 4
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.
.IP "\fB\-\-debian\-installer\-gui\fR true|false" 4
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.
.IP "\fB\-\-debootstrap\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
passes the given options to debootstrap when setting up the base system.
.IP "\fB\-\-debootstrap\-script\fR \fISCRIPT\fR" 4
tells debootstrap to use an alternate bootstrap script (last parameter to debootstrap).
.IP "\fB\-\-debug\fR" 4
turn on debugging informational messages.
.IP "\-d|\fB\-\-distribution\fR \fICODENAME\fR" 4
defines the distribution of the resulting live system.
.IP "\-d|\fB\-\-parent\-distribution\fR \fICODENAME\fR" 4
defines the parent distribution for derivatives of the resulting live system.
.IP "\-d|\fB\-\-parent\-debian\-installer\-distribution\fR \fICODENAME\fR" 4
defines the parent debian\-installer distribution for derivatives of the resulting live system.
turns on debugging informational messages.
.IP "\fB\-d\fR|\fB\-\-distribution\fR \fICODENAME\fR" 4
defines the distribution of the resulting live system. This defaults to 'testing'. The value 'sid' can be used for Debian unstable.
.IP "\fB\-\-distribution\-binary\fR \fICODENAME\fR" 4
defines the distribution enabled in the resulting live system (defaults to the value set in \fB\-\-distribution\fR)
.IP "\fB\-\-distribution\-chroot\fR \fICODENAME\fR" 4
defines the distribution used to build the live system (defaults to the value set in \fB\-\-distribution\fR)
.IP "\fB\-\-dm\-verity\fR" 4
Enables dm\-verity support for root file system. Only squashfs, ext2, ext3 and ext4 are supported. For more information see \fIlive\-boot\fR(7).
.IP "\fB\-\-dm\-verity\-fec\fR \fINB_ROOTS\fR" 4
Enables forward error correction for dm-verity. \fINB_ROOTS\fR is the number of error correction roots thas should be used. The value can be between 2 and 24. Android uses 2 by default.
.IP "\fB\-\-dm\-verity\-sign\fR \fISIGN_SCRIPT\fR" 4
Sign root hash of dm-verity device. Script takes two arguments: the root hash and a file to output the signature to.
.IP "\fB\-\-dump\fR" 4
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 informations required for us to locate and replicate an error.
.IP "\fB\-\-fdisk\fR fdisk|fdisk.dist" 4
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.
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.
.IP "\fB\-\-firmware\-binary\fR true|false" 4
includes firmware packages in debian-installer. Defaults to true.
.IP "\fB\-\-firmware\-chroot\fR true|false" 4
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.
.IP "\fB\-\-force\fR" 4
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.
.IP "\fB\-\-grub\-splash\fR \fIFILE\fR" 4
defines the name of an optional to be included splash screen graphic for the grub bootloader.
.IP "\fB\-\-gzip\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
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.
.IP "\fB\-\-hooks\fR \fIFILE\fR" 4
defines which hooks available in /usr/share/live/build/examples/hooks should be activated. Normally, there are no hooks executed. Make sure you know and understood the hook before you enable it.
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.
.IP "\fB\-\-hdd\-label\fR \fILABEL\fR" 4
defines the label for the HDD target. Defaults to 'DEBIAN_LIVE'.
.IP "\fB\-\-hdd\-partition\-start\fR \fISTART\fR" 4
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.
.IP "\fB\-\-hdd\-size\fR \fISIZE\fR" 4
defines the size for the HDD target. The unit is MiB. Defaults to 'auto', which generates the smallest possible image.
.IP "\fB\-\-ignore\-system\-defaults\fR" 4
\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.
.IP "\fB\-\-initramfs\fR auto|none|live\-boot|casper" 4
sets the name of package that contains the live system specific initramfs modification. By default, auto is used, which means that at build time of the image rather than on configuration time, the value will be expanded to casper when building ubuntu systems, to live\-boot for all other systems. Using 'none' is useful if the resulting system image should not be a live image (experimental).
.IP "\fB\-\-initramfs\-compression\fR bzip2|gzip|lzma]
defines the compression program to be used to compress the initramfs. Defaults to gzip.
.IP "\fB\-\-interactive\fR shell" 4
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.
.IP "\fB\-\-isohybrid\-options\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
defines options to pass to isohybrid.
\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.
.IP "\fB\-\-image\-name\fR \fINAME\fR" 4
sets the base name of the image. Defaults to live-image.
.IP "\fB\-\-initramfs\fR none|live\-boot|dracut\-live" 4
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). Note that dracut requires the CD label in the kernel command line, so you might want to set \fB\-\-iso\-volume\fR explicitly.
.IP "\fB\-\-initramfs\-compression\fR bzip2|gzip|lzma" 4
defines the compression program to be used to compress the initramfs. Defaults to 'gzip'.
.IP "\fB\-\-initsystem\fR sysvinit|systemd|none" 4
defines the init system. Defaults to 'systemd'.
.IP "\fB\-\-interactive\fR true|shell|x11|xnest|false" 4
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'.
.IP "\fB\-\-iso\-application\fR \fINAME\fR" 4
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.
sets the APPLICATION field in the header of a resulting CD/DVD image and defaults to "Debian Live".
.IP "\fB\-\-iso\-preparer\fR \fINAME\fR" 4
sets the PREPARER field in the header of a resulting CD/DVD image. By default this is set to "live\-build \fIVERSION\fR; http://packages.qa.debian.org/live\-build", where VERSION is expanded to the version of live\-build that was used to build the image.
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.
.IP "\fB\-\-iso\-publisher\fR \fINAME\fR" 4
sets the PUBLISHED field in the header of a resulting CD/DVD image. By default, this is set to 'Live Systems project; http:/live-systems.org/; debian\-live@lists.debian.org'. Remember to change this to the appropriate values at latest when you distributing custom and unofficial images.
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\-live@lists.debian.org'. Remember to change this to the appropriate value when distributing custom and unofficial images.
.IP "\fB\-\-iso\-volume\fR \fINAME\fR" 4
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.
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.
.IP "\fB\-\-jffs2\-eraseblock\fR \fISIZE\fR" 4
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.
.IP "\fB\-\-keyring\-packages\fR \fIPACKAGE\fI|""\fIPACKAGES\fR""" 4
sets the keyring package or additional keyring packages. By default this is set to debian\-archive\-keyring.
.IP "\-k|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|""\fIFLAVOURS\fR""" 4
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.
.IP "\fB\-\-linux\-packages\fR ""\fIPACKAGES\fR""" 4
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\-586). 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.
.IP "\fB\-\-losetup\fR losetup|losetup.orig" 4
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.
.IP "\fB\-\-keyring\-packages\fR \fIPACKAGE\fR|""\fIPACKAGES\fR""" 4
sets the keyring package or additional keyring packages (a space separated list). By default this is set to 'debian\-archive\-keyring'.
.IP "\fB\-k\fR|\fB\-\-linux\-flavours\fR \fIFLAVOUR\fR|""\fIFLAVOURS\fR""" 4
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.
.IP "\fB\-\-linux\-packages\fR \fIPACKAGE\fR|""\fIPACKAGES\fR""" 4
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.
.IP "\fB\-\-loadlin\fR true|false" 4
sets loadlin. Defaults to false, except when the debian-installer is included for x86_64 or i386.
.IP "\fB\-\-memtest\fR memtest86+|memtest86|none" 4
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+.
.IP "\-m|\fB\-\-parent\-mirror\-bootstrap\fR \fIURL\fR" 4
sets the location of the debian package mirror that should be used to bootstrap from. This defaults to http://ftp.de.debian.org/debian/ which may not be a good default if you live outside of Europe.
.IP "\fB\-\-parent\-mirror\-chroot\fR \fIURL\fR" 4
sets the location of the debian package mirror that will be used to fetch the packages in order to build the live system. By default, this is set to the value of \-\-parent\-mirror\-bootstrap.
.IP "\fB\-\-parent\-mirror\-chroot\-security\fR \fIURL\fR" 4
sets the location of the debian security package mirror that will be used to fetch the packages in order to build the live system. By default, this points to http://security.debian.org/debian/.
.IP "\fB\-\-parent\-mirror\-chroot\-updates\fR \fIURL\fR" 4
sets the location of the debian updates package mirror that will be used to fetch packages in order to build the live system. By default, this is set to the value of \-\-parent\-mirror\-chroot.
.IP "\fB\-\-parent\-mirror\-chroot\-backports\fR \fIURL\fR" 4
sets the location of the debian backports package mirror that will be used to fetch packages in order to build the live system. By default, this points to http://backports.debian.org/debian-backports/.
.IP "\fB\-\-parent\-mirror\-binary\fR \fIURL\fR" 4
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. By default, 'http://http.debian.net/debian/' is used.
.IP "\fB\-\-parent\-mirror\-binary\-security\fR \fIURL\fR" 4
sets the location of the debian security package mirror that should end up configured in the final image. By default, 'http://security.debian.org/' is used.
.IP "\fB\-\-parent\-mirror\-binary\-updates\fR \fIURL\fR" 4
sets the location of the debian updates package mirror that should end up configured in the final image. By default, the value of \-\-parent\-mirror\-binary is used.
.IP "\fB\-\-parent\-mirror\-binary\-backports\fR \fIURL\fR" 4
sets the location of the debian backports package mirror that should end up configured in the final image. By default, 'http://backports.debian.org/debian-backports/' is used.
.IP "\fB\-\-parent\-mirror\-debian\-installer\fR \fIURL\fR" 4
sets the location of the mirror that will be used to fetch the debian installer images. By default, this points to the same mirror used to build the live system, i.e. the value of \-\-parent\-mirror\-bootstrap.
.IP "\fB\-\-mirror\-bootstrap\fR \fIURL\fR" 4
sets the location of the debian package mirror that should be used to bootstrap the derivative from. This defaults to http://ftp.de.debian.org/debian/ which may not be a good default if you live outside of Europe.
.IP "\fB\-\-mirror\-chroot\fR \fIURL\fR" 4
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.
.IP "\fB\-\-mirror\-chroot\-security\fR \fIURL\fR" 4
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/debian/.
.IP "\fB\-\-mirror\-chroot\-updates\fR \fIURL\fR" 4
sets the location of the debian updates package mirror that will be used to fetch packages of the derivative in order to build the live system. By default, this is set to the value of \-\-mirror\-chroot.
.IP "\fB\-\-mirror\-chroot\-backports\fR \fIURL\fR" 4
sets the location of the debian backports package mirror that will be used to fetch packages of the derivative in order to build the live system. By default, this points to http://backports.debian.org/debian-backports/.
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+.
.IP "\fB\-\-mirror\-binary\fR \fIURL\fR" 4
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.
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/'.
.IP "\fB\-\-mirror\-binary\-security\fR \fIURL\fR" 4
sets the location of the derivatives security package mirror that should end up configured in the final image.
.IP "\fB\-\-mirror\-binary\-updates\fR \fIURL\fR" 4
sets the location of the derivatives updates package mirror that should end up configured in the final image.
.IP "\fB\-\-mirror\-binary\-backports\fR \fIURL\fR" 4
sets the location of the derivatives backports package mirror that should end up configured in the final image.
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/'.
.IP "\fB\-\-mirror\-bootstrap\fR \fIURL\fR" 4
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/'.
.IP "\fB\-\-mirror\-chroot\fR \fIURL\fR" 4
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.
.IP "\fB\-\-mirror\-chroot\-security\fR \fIURL\fR" 4
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/'.
.IP "\fB\-\-mirror\-debian\-installer\fR \fIURL\fR" 4
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\-bootstrap.
.IP "\fB\-\-mode\fR debian|progress|ubuntu" 4
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.
.IP "\fB\-\-mode\fR debian" 4
defines a global mode to load project specific defaults. By default this is set to debian.
.IP "\fB\-\-system\fR live|normal" 4
defines if the resulting system image should a live system or a normal, non-live system.
.IP "\fB\-\-net\-root\-filesystem\fR nfs|cfs" 4
defines the filesystem that will be configured in the bootloader configuration for your netboot image. This defaults to nfs.
.IP "\fB\-\-net\-root\-mountoptions\fR \fIOPTIONS\fR" 4
sets additional options for mounting the root filesystem in netboot images and is by default empty.
.IP "\fB\-\-net\-root\-path\fR \fIPATH\fR" 4
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.
.IP "\fB\-\-net\-root\-server\fR \fIIP\fR|\fIHOSTNAME\fR" 4
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.
.IP "\fB\-\-net\-cow\-filesystem\fR nfs|cfs" 4
defines the filesystem type for the copy\-on\-write layer and defaults to nfs.
.IP "\fB\-\-net\-cow\-mountoptions\fR \fIOPTIONS\fR" 4
sets additional options for mounting the copy\-on\-write layer in netboot images and is by default empty.
.IP "\fB\-\-net\-cow\-path\fR \fIPATH\fR" 4
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.
.PP
.IP "" 4
Example:
.br
/export/hosts/client_mac_address
.br
/export/hosts/00\-16\-D3\-33\-92\-E8
.IP "\fB\-\-net\-cow\-server\fR \fIIP\fR|\fIHOSTNAME\fR" 4
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.
.IP "\fB\-\-net\-tarball\fR true|false" 4
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.
defines if a compressed tarball should be created. If disabled, the plain binary directory is considered the output. Default is true.
.IP "\fB\-\-no\-color\fR" 4
turns off color in the messages.
.IP "\fB\-\-onie\fR true|false" 4
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.
.IP "\fB\-\-onie\-kernel\-cmdline\fR \fIOPTION\fR|""\fIOPTIONS\fR""" 4
defines additional kernel command line options that the ONIE system will use when booting the image. Default is empty string.
.IP "\fB\-\-parent\-archive\-areas\fR \fIARCHIVE_AREA\fR|""\fIARCHIVE_AREAS\fR""" 4
defines the archive areas for derivatives of the resulting live system (a comma or space separated list).
.IP "\fB\-\-parent\-debian\-installer\-distribution\fR daily|git|\fICODENAME\fR" 4
defines the parent debian\-installer distribution for derivatives of the resulting live system.
.IP "\fB\-\-parent\-distribution\fR \fICODENAME\fR" 4
defines the parent distribution for derivatives of the resulting live system.
.IP "\fB\-\-parent\-distribution\-binary\fR \fICODENAME\fR" 4
defines the derivative's parent distribution enabled in the resulting live system.
.IP "\fB\-\-parent\-distribution\-chroot\fR \fICODENAME\fR" 4
defines the derivative's parent distribution used to build the live system.
.IP "\fB\-\-parent\-mirror\-binary\fR \fIURL\fR" 4
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.
.IP "\fB\-\-parent\-mirror\-binary\-security\fR \fIURL\fR" 4
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.
.IP "\-m|\fB\-\-parent\-mirror\-bootstrap\fR \fIURL\fR" 4
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.
.IP "\fB\-\-parent\-mirror\-chroot\fR \fIURL\fR" 4
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.
.IP "\fB\-\-parent\-mirror\-chroot\-security\fR \fIURL\fR" 4
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.
.IP "\fB\-\-parent\-mirror\-debian\-installer\fR \fIURL\fR" 4
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.
.IP "\fB\-\-quiet\fR" 4
reduces the verbosity of messages output by \fBlb build\fR.
.IP "\fB\-\-archive\-areas\fR \fIARCHIVE_AREA\fR|""\fIARCHIVE_AREAS\fR""" 4
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.
.IP "\fB\-\-parent\-archive\-areas\fR \fIPARENT_ARCHIVE_AREA\fR|""\fIPARENT_ARCHIVE_AREAS\fR""" 4
defines the archive areas for derivatives of the resulting live system.
.IP "\fB\-\-security\fR true|false" 4
defines if the security repositories specified in the security mirror options should be used or not.
.IP "\fB\-\-source\fR true|false" 4
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.
.IP "\-s|\fB\-\-source\-images\fR iso|netboot|tar|hdd" 4
defines the image type for the source image. Default is tar.
.IP "\fB\-\-firmware\-binary\fR true|false" 4
defines if firmware packages should be automatically included into the binary pool for debian\-installer. Note that only firmware packages available within the configured archive areas are included, e.g. an image with packages from main only will not automatically include firmware from non\-free. This option does not interfere with explicitly listed packages in binary package lists.
.IP "\fB\-\-firmware\-chroot\fR true|false" 4
defines if firmware packages should be automatically included into the live image. Note that only firmware packages available within the configured archive areas are included, e.g. an image with packages from main only will not automatically include firmware from non\-free. This option does not interfere with explicitly listed packages in chroot package lists.
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.
.IP "\fB\-s\fR|\fB\-\-source\-images\fR iso|netboot|tar|hdd" 4
defines the image type for the source image. Default is tar. More than one can be specified (a comma or space separated list).
.IP "\fB\-\-swap\-file\-path\fR \fIPATH\fR" 4
defines the path to a swap file to create in the binary image. Default is not to create a swap file.
.IP "\fB\-\-swap\-file\-size\fR \fIMB\fR" 4
defines what size in megabytes the swap file should be, if one is to be created. Default is 512MB.
.IP "\fB\-\-tasksel\fR apt|aptitude|tasksel" 4
selects which program is used to install tasks. By default, this is set to tasksel.
.IP "\fB\-\-templates\fR \fIPATH\fR" 4
sets the path to the templates that live\-build is going to use, e.g. for bootloaders. By default, this is set to /usr/share/live/build/templates/.
.IP "\fB\-\-hdd\-size\fR MB" 4
defines what size the hdd image should be. Note that although the default is set to 10000 (= 10GB), it will not need 10GB space on your harddisk as the files are created as sparse files.
.IP "\fB\-\-system\fR live|normal" 4
defines if the resulting system image should be a live system or a normal, non-live system. Defaults to live.
.IP "\fB\-\-uefi\-secure\-boot\fR auto|enable|disable" 4
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.
.IP "\fB\-\-updates\fR true|false" 4
defines if debian updates package archives should be included in the image or not.
.IP "\fB\-\-backports\fR true|false" 4
defines if debian backports package archives should be included in the image or not.
.IP "\fB\-\-utc\-time\fR true|false" 4
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.
.IP "\fB\-\-validate\fR" 4
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.
.IP "\fB\-\-verbose\fR" 4
increases the verbosity of messages output by \fBlb build\fR.
.IP "\fB\-\-win32\-loader true|false" 4
.IP "\fB\-\-win32\-loader\fR true|false" 4
defines if win32\-loader should be included in the binary image or not.
.\" FIXME
.IP "\fB\-\-zsync\fR true|false" 4
defines whether a file for distributing the image in \fIzsync\fR(1) format will be generated. Defaults to false.
.SH ENVIRONMENT
.\" FIXME
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.
\" FIXME
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\-http\-proxy\fR becomes \fBLB_APT_HTTP_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.
.SH FILES
.\" FIXME
.IP "\fBauto/config\fR" 4
.IP "\fB/etc/live/build.conf, /etc/live/build/*\fR" 4
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.
.\" FIXME
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.
.SH SEE ALSO
\fIlive\-build\fR(7)
@ -476,10 +481,10 @@ An optional, global configuration file for \fBlb config\fR variables. It is usef
This program is a part of live\-build.
.SH HOMEPAGE
More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>.
More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
.SH BUGS
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 <\fIdebian-live@lists.debian.org\fR>.
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 <\fIdebian-live@lists.debian.org\fR>.
.SH AUTHOR
live\-build was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>.
live\-build was originally written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. Since 2016 development has been continued by the Debian Live team.

View File

@ -0,0 +1,32 @@
.TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
.SH NAME
\fBlb_installer\fR \- Complete the installer stage
.SH SYNOPSIS
\fBlb installer\fR [\fIOPTIONS\fR]
.SH DESCRIPTION
\fBlb installer\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
.PP
\fBlb installer\fR calls all necessary live\-build programs in the correct order to complete the installer stage.
.SH OPTIONS
\fBlb installer\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.
.SH FILES
.IP "\fBnone\fR" 4
.SH SEE ALSO
\fIlive\-build\fR(7)
.PP
This program is a part of live\-build.
.SH HOMEPAGE
More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
.SH BUGS
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 <\fIdebian-live@lists.debian.org\fR>.
.SH AUTHOR
live\-build was originally written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. Since 2016 development has been continued by the Debian Live team.

View File

@ -1,13 +1,13 @@
.TH LIVE\-BUILD 1 2015\-05\-04 5.0~a6-1 "Live Systems Project"
.TH LIVE\-BUILD 1 2020\-03\-30 1:20191222 "Debian Live Project"
.SH NAME
\fBlb source\fR \- Complete the source stage
\fBlb_source\fR \- Complete the source stage
.SH SYNOPSIS
\fBlb source\fR [\fIlive\-build options\fR]
\fBlb source\fR [\fIOPTIONS\fR]
.SH DESCRIPTION
\fBlb source\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the live systems tool suite.
\fBlb source\fR is a high\-level command (porcelain) of \fIlive\-build\fR(7), the Debian Live tool suite.
.PP
\fBlb source\fR calls all necessary live\-build programs in the correct order to complete the source stage.
@ -23,10 +23,10 @@
This program is a part of live\-build.
.SH HOMEPAGE
More information about live\-build and the Live Systems project can be found on the homepage at <\fIhttp://live-systems.org/\fR> and in the manual at <\fIhttp://live-systems.org/manual/\fR>.
More information about live\-build and the Debian Live project can be found on the homepage at <\fIhttps://wiki.debian.org/DebianLive\fR>.
.SH BUGS
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 <\fIdebian-live@lists.debian.org\fR>.
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 <\fIdebian-live@lists.debian.org\fR>.
.SH AUTHOR
live\-build was written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>.
live\-build was originally written by Daniel Baumann <\fImail@daniel-baumann.ch\fR>. Since 2016 development has been continued by the Debian Live team.

Some files were not shown because too many files have changed in this diff Show More