3420 Commits

Author SHA1 Message Date
Pat Viafore
32d5afc40a
Expose a variable for sources.list backup
MOUNTPOINT_BACKUP_SOURCE_LIST is exposed when you call
setup_mountpoint.  Consumers can use this variable if they need to
explicitly change something in sources.list wihout relying on the name
livecd-rootfs chooses.
2020-09-21 12:07:48 -05:00
Robert C Jennings
5190aff932
Ensure a binary hook has not changed the temporary sources.list 2020-09-21 12:07:47 -05:00
Robert C Jennings
5362e3a7e7
Use build env archive mirror in binary hooks 2020-09-21 12:07:47 -05:00
Robert C Jennings
76f9f34177
releasing package livecd-rootfs version 2.688 2.688 2020-09-16 08:49:06 -05:00
Robert C Jennings
2be2a168ee
ubuntu-cpc: Fix spelling in vagrant file 2020-09-16 08:48:28 -05:00
Robert C Jennings
3a23df1711
releasing package livecd-rootfs version 2.687 2.687 2020-09-15 15:26:26 -05:00
John Chittum
fb33fe9026
Minor fixes to Vagrantfile comments 2020-08-27 15:46:36 -05:00
John Chittum
cfd43992a8
Reorder comments to ensure clarity
Long history comment moved to the end with short clarifying comments
before the relevant code. Update changelog with proper attribution
2020-08-27 15:11:15 -05:00
John Chittum
c92e885303
ubuntu-cpc: Vagrant Serial to Null (LP: #1874453)
Original fix proposed by Stanislav German-Evtushenko (giner)

CPC Ubuntu cloud images default to enabling a serial console connection
via the kernel commandline option `console=ttyS0`. Many clouds support
the serial connection, and utilize it for debugging purposes. Virtualbox
supports the serial connection as well. In Bionic and earlier images,
Vagrant boxes created a serial log file in the directory of the
Vagrantfile by default. However this is not standard behaviour for
Vagrant images, and so it was removed in Eoan onwards.

Starting in Eoan, there were reports of image booting slowdown (1874453
is a single example). After testing, it was determined that the serial
connection starting, without a device attached, was the cause of the
slow down. However, we did not want to revert to the old functionality
of creating a file. Much thanks to <giner> for providing the Ruby syntax
for sending to File::NULL.

This option will not create a local file, however, the default
Vagrantfile configuration is overwritable via a users Vagrantfile. The
original syntax for creating a file local to the users Vagrantfile has
been included as an example.
2020-08-27 14:37:40 -05:00
Stanislav German-Evtushenko
b0144d3018
vagrant: Use dummy file for the console output
Links:
- https://bugs.launchpad.net/cloud-images/+bug/1874453
2020-08-27 14:36:22 -05:00
Steve Langasek
10dae25655 releasing package livecd-rootfs version 2.685 2.686 2020-08-27 12:18:19 -07:00
Steve Langasek
08c09dc42a changelog 2020-08-27 12:17:22 -07:00
Steve Langasek
37f5f8881f Revert "Revert "Remove fstab from squashfs images""
This reverts commit d9de2701897608710ed97e206ee29f28af8cc82a.
2020-08-27 12:17:22 -07:00
Steve Langasek
ff6116a5c8 use python3-launchpadlib directly instead of python3-software-properties 2020-08-27 12:17:20 -07:00
Dan Streetman
82f206190d use python3-launchpadlib directly instead of python3-software-properties 2020-08-27 12:16:48 -07:00
Robert C Jennings
a17961a974
Release package livecd-rootfs version 2.685 2.685 2020-08-27 11:10:15 -05:00
Robert C Jennings
2844aa530d
Revert ubuntu-cpc: Disable boot splash
These introduced a regression for ppc64el and needs more time to bake.
This reverts commits 1deb0c68e8be6b06190402e32292c3c55134eee2 &
6dbb30f53bd3f2086021abdecaee04645c9ccda0.

 * "ubuntu-cpc: Fix ppc64el grub console update"
 * "ubuntu-cpc: Disable boot splash in all cloud images (LP: #1725358)"
2020-08-12 16:49:41 -05:00
Robert C Jennings
5b32b7e373
Release package livecd-rootfs version 2.684 2.684 2020-08-12 13:48:51 -05:00
Robert C Jennings
1deb0c68e8
ubuntu-cpc: Fix ppc64el grub console update
The commit 6dbb30f5 (2.682) which disabled boot splash for all cloud
images introduced an error in the ppc64el hook.  This patch corrects the
name of the variable that contains grub console overrides.  The error
seen during testing was
 'disk-image-ppc64el.binary: line 44: CONSOLES: unbound variable'
and this was due to a typo.
2020-08-12 13:48:03 -05:00
Steve Langasek
a2a0ec7d7c releasing package livecd-rootfs version 2.683 2.683 2020-08-12 11:35:49 -07:00
Steve Langasek
484c5fa8b1 Changelog entry 2020-08-12 11:35:29 -07:00
Steve Langasek
d9de270189 Revert "Remove fstab from squashfs images"
This reverts commit f96e874ed12e7e080111d27aa14c4f97aa6bec87.
2020-08-12 11:35:06 -07:00
Robert C Jennings
b907a03f54
Release package livecd-rootfs version 2.682 2.682 2020-08-12 04:53:17 -05:00
Robert C Jennings
6dbb30f53b
ubuntu-cpc: Disable boot splash in all cloud images (LP: #1725358)
When trying to debug an issue on ARM64 it was reported that it was
quite difficult to debug because of control codes on the console from
the splash.

For cloud image there is a chroot customization the drops 'quiet splash'
but this is only applied to amd64.  It hasn't made it into other
architectures because they don't have grub by default in the chroot.
However, when we get into binary hook for the uefi disk image and it's
derivatives grub is installed and this includes architectures that were
skipped in the chroot hook.

This patch changes the cpc-fixes chroot hook to add a cloud-images
grub config with basic overrides, including dropping the boot splash,
for all architectures.  For images that never get grub installed this
addition is harmless and small while ensuring that the grub experience
is consistent for images that have grub.  The configuration of console
devices as hard-coded remains arch specific.
2020-08-12 04:50:36 -05:00
Steve Langasek
c39b9b2d54 releasing package livecd-rootfs version 2.681 2.681 2020-08-10 14:54:28 -07:00
Steve Langasek
57d487b11d Use the Azure kernel for the HyperV gallery images. 2020-08-10 14:54:21 -07:00
Steve Langasek
9348a2e9cb Merge remote-tracking branch 'callmepk/ubuntu/master' into ubuntu/master 2020-08-10 14:52:07 -07:00
Steve Langasek
fa8398d671 releasing package livecd-rootfs version 2.680 2.680 2020-08-04 12:30:37 -07:00
Steve Langasek
e1c745e193 Merge remote-tracking branch 'codyshepherd/bootable-buildd/dist-upgrade/groovy' into ubuntu/master 2020-08-04 12:29:52 -07:00
Robert C Jennings
6f67e275a5
Release package livecd-rootfs version 2.679
Handle seeded lxd snap with channel name for ubuntu-cpc:minimized

The seed now specifies the lxd snap in focal as
'lxd=4.0/stable/ubuntu-20.04' which doesn't match the expectations of
the code with looks for lxd as the only snap in the seed for minimized
images.  This same pattern will be used in groovy near/after release.
This patch updates the pattern to accept 'lxd' or 'lxd=*'.

MP: https://code.launchpad.net/~rcj/livecd-rootfs/+git/livecd-rootfs/+merge/388320
2.679
2020-07-29 15:25:57 -05:00
Robert C Jennings
e3dce0ab17
Handle seeded lxd snap with channel name for ubuntu-cpc:minimized
The seed now specifies the lxd snap in focal as
'lxd=4.0/stable/ubuntu-20.04' which doesn't match the expectations of
the code with looks for lxd as the only snap in the seed for minimized
images.  This patch updates the pattern to accept 'lxd' or 'lxd=*'.
2020-07-29 14:56:26 -05:00
Dimitri John Ledkov
c69c79ea75
releasing package livecd-rootfs version 2.678 2.678 2020-07-27 17:38:35 +01:00
Dimitri John Ledkov
4d4f113f42
functions: provide nss_systemd-less nsswitch.conf in chroots. 2020-07-24 21:03:55 +01:00
Dimitri John Ledkov
109e6c6613
auto/build: use setup|teardown_mountpoint to reduce duplication 2020-07-24 20:59:57 +01:00
Robert C Jennings
9c52eaef60
Merge feature/initrdless-detection into ubuntu/master [a=davidkrauser] [r=rcj]
MP: https://code.launchpad.net/~davidkrauser/livecd-rootfs/+git/livecd-rootfs/+merge/387862
2020-07-23 14:01:06 -05:00
David Krauser
83499f1a95 Add mechanism to detect initrdless boot fallback
In v2.672 the default boot behavior of cloud images changed:

- Prior to v2.672, cloud images with the linux-generic kernel attempt
  to boot without an initramfs, would fail, and then retry with an
  initramfs.

- After v2.672, cloud images with the linux-generic kernel boot with
  an initramfs on the first try.

While the behavior is different between the two, they both result in
an instance that has booted with an initramfs. To ensure the changes
in v2.672 do not regress, we need an automated way to check if we are
attempting to boot without an initramfs and failing.

With this change, when we attempt to boot with an initramfs and fail,
initrdless_boot_fallback_triggered is set to non-zero in the grubenv.
This value can be checked after boot by looking in /boot/grub/grubenv
or by using the grub-editenv list command.
2020-07-22 16:41:10 -04:00
Jinming Wu, Patrick
afda365565
Additional fixes for Hyper-V builds
use of linux-azure, which is the optimized kernel for Hyper-V by
Microsoft
2020-07-22 17:27:03 +08:00
Robert C Jennings
2edabc31c2
releasing package livecd-rootfs version 2.677
* Avoid rbind /sys for chroot snap pre-seeding (cgroups fail to unmount)
2.677
2020-07-18 18:12:24 -05:00
Robert C Jennings
84397b5098
Avoid rbind /sys for chroot snap pre-seeding (cgroups fail to unmount)
Builds in LP with the Xenial kernel were happy with the recursive mount of
/sys inside the chroot while performing snap-preseeding but autopkgtests
with the groovy kernel failed.  With the groovy kernel the build was
unable to unmount sys/kernel/slab/*/cgroup/* (Operation not permitted).

This patch mounts /sys and /sys/kernel/security in the chroot in the
same way we've added for binary hooks.  This provides the paths under
/sys needed for snap-preseed while avoiding issues unmounting other
paths.
2020-07-18 16:52:18 -05:00
Dimitri John Ledkov
b22d7dc38c
releasing package livecd-rootfs version 2.676 2.676 2020-07-18 01:18:18 +01:00
Dimitri John Ledkov
b14f79ce2e
apparmor: compile all profiles 2020-07-18 00:45:26 +01:00
Dimitri John Ledkov
31861fd40d
seccomp: mount more up-to-date seccomp features 2020-07-18 00:24:16 +01:00
Dimitri John Ledkov
bc4d32a422
seccomp: add more up-to-date seccomp actions 2020-07-18 00:20:42 +01:00
Dimitri John Ledkov
a14a31b751
apparmor: mount more up-to-date apparmor features in the chroot. 2020-07-18 00:20:41 +01:00
Dimitri John Ledkov
37be000f39
apparmor: Add generic v5.4 kernel apparmor features 2020-07-17 23:42:53 +01:00
Dimitri John Ledkov
3694cf3f75
releasing package livecd-rootfs version 2.675 2.675 2020-07-17 21:19:57 +01:00
Dimitri John Ledkov
6e6ab16bf2
live-server: remove duplicate snaps, due to overlayfs vs snap-preseed. 2020-07-17 21:17:34 +01:00
Robert C Jennings
1ca11c9795
Apply snap-preseed optimizations after seeding snaps
The snap-preseed command can do a number of things during the build
that are currently performed at first boot (apparmor profiles, systemd
unit generation, etc).  This patch adds a call to reset the seeding and
apply these optimizations when adding a seeded snap.  As a prerequisite
to calling snap-preseed we need to make /dev/mem available as well as
mounts from the host to perform this work, so those are also added here.
2020-07-17 21:17:33 +01:00
Steve Langasek
2513613002 releasing package livecd-rootfs version 2.674 2.674 2020-07-16 15:40:22 -07:00
David Krauser
4c504f6781 Fix broken minimal cloud image boot on amd64
I recently pulled initramfs logic out of the base build hook, and
dropped that into the `replace_kernel` function. Any cloud image that
does not leverage the generic virtual kernel was expected to call
`replace_kernel` to pull in a custom kernel. That function will
disable initramfs boot for images that use a custom kernel.

Minimal cloud images on amd64 use the linux-kvm kernel, but the build
hook does not utilize the `replace_kernel` function. Instead, the
kernel flavor is set in `auto/config`. I pulled that logic out of
`auto/config` and am now calling `replace_kernel` in the build hook.

I also moved a call to generate the package list so that it will pick
up the change to the linux-kvm kernel.
2020-07-16 17:25:46 -04:00