Commit Graph

1324 Commits

Author SHA1 Message Date
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 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 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 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 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 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
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 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
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 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
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 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 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
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
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
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 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 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 4146699d37 Create binary_chroot stagefiles when skipping, too 2023-07-18 12:23:57 +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