Commit Graph

3312 Commits

Author SHA1 Message Date
Luca Boccassi e1bcf1549f Update changelog for 1:20180925~bpo9+1 release 2018-10-01 11:59:47 +01: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