From f36b246c166aef4099367bdb8f43fed4db08be81 Mon Sep 17 00:00:00 2001 From: CloudBuilder Date: Sat, 28 Nov 2020 12:09:24 +0000 Subject: [PATCH] Imported 2.702 No reason for CPC update specified. --- debian/changelog | 21 ++++++++ get-ppa-fingerprint | 2 +- live-build/buildd/hooks/50-buildd-tar.binary | 4 ++ live-build/buildd/hooks/51-buildd-lxd.binary | 4 ++ live-build/functions | 2 +- live-build/lb_chroot_layered | 12 +++++ .../hooks.d/base/disk-image-uefi.binary | 48 +++++++++++++++++-- 7 files changed, 88 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index f916753b..a9e1e2e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,24 @@ +livecd-rootfs (2.702) hirsute; urgency=medium + + [ Sebastien Bacher ] + * Use the target realpath to do the unmounting + * Correctly set the environment needed by snapd in layered + + [ Dimitri John Ledkov ] + * get-ppa-fingerprint: use production instance with latest api. + * disk-image-uefi: riscv64 add u-boot spl (LP: #1905274) + * disk-image-uefi: riscv64 add ubuntu:ubuntu login, without expiry. + * rebuild with the correct version of 2.701 changes. + + -- Dimitri John Ledkov Tue, 24 Nov 2020 18:41:34 +0000 + +livecd-rootfs (2.701) hirsute; urgency=medium + + [ Cody Shepherd ] + * buildd: Create manifests for buildd tarballs + + -- Robert C Jennings Fri, 20 Nov 2020 14:55:21 -0600 + livecd-rootfs (2.700) hirsute; urgency=medium [ David Krauser ] diff --git a/get-ppa-fingerprint b/get-ppa-fingerprint index 1450362f..2a35e0cb 100755 --- a/get-ppa-fingerprint +++ b/get-ppa-fingerprint @@ -11,5 +11,5 @@ _, args = parser.parse_args() if not args: parser.error("must provide a PPA owner/name") owner_name, ppa_name = args[0].split("/", 1) -lp = Launchpad.login_anonymously('livecd-rootfs') +lp = Launchpad.login_anonymously('livecd-rootfs', 'production', version='devel') print(lp.people(owner_name).getPPAByName(name=ppa_name).signing_key_fingerprint) diff --git a/live-build/buildd/hooks/50-buildd-tar.binary b/live-build/buildd/hooks/50-buildd-tar.binary index c9c4663a..738e5f9a 100755 --- a/live-build/buildd/hooks/50-buildd-tar.binary +++ b/live-build/buildd/hooks/50-buildd-tar.binary @@ -4,6 +4,10 @@ # ourselves. set -e +. config/functions + +create_manifest chroot "livecd.$PROJECT.rootfs.manifest" + # gzip was chosen for fastest decompression speed: it decompresses buildd # chroots about twice as fast as xz and about five times as fast as bzip2. tar --transform='s,^chroot,chroot-autobuild,' --sort=name --numeric-owner \ diff --git a/live-build/buildd/hooks/51-buildd-lxd.binary b/live-build/buildd/hooks/51-buildd-lxd.binary index 44b38213..85daa72a 100755 --- a/live-build/buildd/hooks/51-buildd-lxd.binary +++ b/live-build/buildd/hooks/51-buildd-lxd.binary @@ -3,12 +3,16 @@ set -e . config/bootstrap +. config/functions TMPDIR="$(mktemp -d)" config/make-lxd-metadata "${LB_DISTRIBUTION%-*}" "$ARCH" \ >"$TMPDIR/metadata.yaml" tar --numeric-owner -cf "livecd.$PROJECT.lxd.tar" -C "$TMPDIR" metadata.yaml rm -rf "$TMPDIR" + +create_manifest chroot "livecd.$PROJECT.lxd.manifest" + # When using the combined metadata/rootfs form, the rootfs must be under # rootfs/ rather than under chroot-autobuild/. tar --transform='s,^chroot,rootfs,' --sort=name --numeric-owner \ diff --git a/live-build/functions b/live-build/functions index aba59859..74224dbb 100644 --- a/live-build/functions +++ b/live-build/functions @@ -152,7 +152,7 @@ setup_mountpoint() { teardown_mountpoint() { # Reverse the operations from setup_mountpoint - local mountpoint="$1" + local mountpoint=$(realpath "$1") # ensure we have exactly one trailing slash, and escape all slashes for awk mountpoint_match=$(echo "$mountpoint" | sed -e's,/$,,; s,/,\\/,g;')'\/' diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index 44429472..261d447b 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -208,10 +208,22 @@ create_chroot_pass () { lb chroot_install-packages ${pass} ${*} lb_chroot_remove_packages ${pass} ${*} + lb chroot_sysfs remove ${*} + lb chroot_proc remove ${*} + lb chroot_devpts remove ${*} + + setup_mountpoint chroot + # Snap management lb_chroot_snap_lists ${pass} ${*} lb_chroot_install_snaps ${pass} ${*} + teardown_mountpoint chroot + + lb chroot_devpts install ${*} + lb chroot_proc install ${*} + lb chroot_sysfs install ${*} + configure_network_manager # Mark kernel headers as autoremovable diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary index 916bc424..ff3f1d67 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary @@ -39,9 +39,16 @@ create_partitions() { # same as arm64/armhf, but set bit 2 legacy bios bootable # on the first partition for uboot sgdisk "${disk_image}" \ - --new=15:0:204800 \ + --set-alignment=2 \ + --new=13:34:2081 \ + --change-name=13:loader1 \ + --typecode=13:5B193300-FC78-40CD-8002-E86C45580B47 \ + --new=14:2082:10273 \ + --change-name=14:loader2 \ + --typecode=14:2E54B353-1271-4842-806F-E436D6AF6985 \ + --new=15::+106M\ --typecode=15:ef00 \ - --new=1: \ + --new=1:: \ --attributes=1:set:2 ;; amd64) @@ -103,11 +110,46 @@ install_grub() { ;; riscv64) # TODO does not exist yet on riscv64 - chroot mountpoint apt-get install -qqy u-boot-menu #grub-efi-riscv64 + chroot mountpoint apt-get install -qqy u-boot-menu u-boot-sifive #grub-efi-riscv64 efi_target=riscv64-efi chroot mountpoint u-boot-update + # FSBL, which gets U-Boot SPL + loader1="/dev/mapper${loop_device///dev/}p13" + # The real U-Boot + loader2="/dev/mapper${loop_device///dev/}p14" + + dd if=mountpoint/usr/lib/u-boot/sifive_fu540/u-boot-spl.bin of=$loader1 + dd if=mountpoint/usr/lib/u-boot/sifive_fu540/u-boot.itb of=$loader2 + + # Provide nocloud datasource + # Allow interactive login on baremetal SiFive board, + # without a cloud datasource. + mkdir -p mountpoint/var/lib/cloud/seed/nocloud + touch mountpoint/var/lib/cloud/seed/nocloud/meta-data + cat <mountpoint/var/lib/cloud/seed/nocloud/user-data +#cloud-config +chpasswd: + expire: false + list: + - ubuntu:ubuntu +EOF + cat <mountpoint/var/lib/cloud/seed/nocloud/network-data +# This is the initial network config. +# It can be overwritten by cloud-init. +network: + version: 2 + ethernets: + zz-all-en: + match: + name: "en*" + dhcp4: true + zz-all-eth: + match: + name: "eth*" + dhcp4: true +EOF ## TODO remove below once we have grub-efi-riscv64 rm mountpoint/tmp/device.map umount mountpoint/boot/efi