1712 Commits

Author SHA1 Message Date
Steve Langasek
ea630ac812 Merge remote-tracking branch 'jchittum/backport-apparmor65-lp2037567' into ubuntu/jammy 2023-12-03 21:50:08 -08:00
Philip Roche
11d1063be4 fix: Enable snap preseeding with ppc64el images where /boot/vmlinux is used instead of /boot/vmlinuz. (LP: #2038957)
ppc64el still uses /boot/vmlinux so we need to determine the boot file name as non ppc64el use /boot/vmlinuz. This
is then used to determine the kernel major minor version installed so that the correct apparmor features can be used
during snap preseeding. This preseeding was failing for ppc64el for the mantic 6.5 kernel as the /boot/vmlinuz
being checked did not exist.

(cherry picked from commit 089646a32f927f32e9e8961e231391f0bcb6f66b)

# Conflicts:
#	debian/changelog
#	live-build/functions
2023-10-27 12:51:48 +01:00
Steve Langasek
40a3b73b5e The chroot tmpfs mount should only be /var/lib/apt/lists, not /var/lib/apt; the latter breaks changes to /var/lib/apt/extended_states. LP: #2036195.
(cherry picked from commit 1deccc2edd7f139b84a6cb3d0a4dfe5ebaff50c7)

# Conflicts:
#	debian/changelog
2023-10-26 16:42:22 +01:00
John Chittum
025a8a6de6
fix: Add 6.5 kernel apparmor feats
lp: #2037567. starting in kernel 6.5.0.1006, there's been an update to
apparmor features. Creates the 6.5 kernel directory, fully populates
with feats checked from a machine running 6.5.0.1006 installed from
proposed (as of 20230927).

(cherry picked from commit 5427e5ad6c02b2d7c203cc6597aff5518d5b344c)
2023-10-19 07:06:45 -05:00
Utkarsh Gupta
4ba66ac0d1 fix: install LXD snap from stable/ubuntu-<version> channel (LP: #2036725)
In the past, we'd directly snap install lxd which defaults to
the latest/stable channel. However, whilst working on enhancing
unminimize, it was observed that we install this snap from
the stable/ubuntu-<version> channel instead.

This was also noted as a failure when running the CTF tests:
`lxd installed from latest/stable, not stable/ubuntu-23.10`

(cherry picked from commit 12a2109c223e261214747d5f98d4b8d7ee9625e3)
2023-10-04 13:48:50 +05:30
Utkarsh Gupta
67dd334c25 Fix unminimize to correctly list packages (LP: #1996489)
Prior to dpkg/1.21.0, there was a bug where dpkg -V/--verify
couldn't list all the correct packages correctly but with
that being fix and in archive since Jammy, this works perfectly
but the syntax to report the missing files have changed. It
just prints 'missing' now. With that new format, we can now
fix the regex to simply list the packages.

With this patch, the unminimize script works flawlessly
on a minimized image.

(cherry picked from commit 78a98c683573a1f7983afae54e2f187eeae127c7)
2023-10-04 13:48:40 +05:30
Thomas Bechtold
3b2eeb0171 fix: don't modify ssh_config for ubuntu-cpc projects (LP:1968873)
Modifying directly /etc/ssh/sshd_config creates "problems" when
upgrading eg. from Focal to Jammy because the upgrade will ask the
user what to do with the modified config. To avoid that, put the
custom configuration into /etc/ssh/sshd_config.d/ so the upgrade of
openssh-server can just replace /etc/ssh/sshd_config without asking
the user.

(cherry picked from commit b54d24ff3310f7ace00ab08e0dacfdc89e026f1c)
2023-09-19 13:55:30 +02:00
John Chittum
1184af06b0
fix: GRUB_DISTRIBUTION for buildd
LP: #2034253 Grub is found to use lsb_release or default to Debian.
buildd does not have lsb_release, so Debian was the GRUB_DISTRIBUTION.
that ends up with issues with the EFI path
2023-09-07 14:40:28 -05:00
Michael Hudson-Doyle
59732bc789 Remove additional dependencies from subiquity units as they are now interfering with the boot process. (LP: #2028862)
(cherry picked from commit 4f6f63dd6b53cc9eb44dfa09b2507e9406c8c923)
2023-08-28 14:15:58 -06:00
Utkarsh Gupta
9ff66d60d9 Merge remote-tracking branch 'jessica-youjeong/062223-jammy-snap-preseeding' into ubuntu/jammy
* jessica-youjeong/062223-jammy-snap-preseeding:
  fix: bind correct apparmor feature for validating snap seed
2023-08-19 03:24:28 +05:30
John Chittum
41df4f5c92
fix: 6.2 kernel missing feature
LP: 2031943

Same issue as affected 5.19. 6.2 apparmor featureset differs from 5.15.
Identified the same feature as 5.19, so copied over.

populated 6.2 with all of generic directory as well. Compatibility mode for
possible future change
2023-08-18 14:04:34 -05:00
Jess Jang
6b54faa6be fix: bind correct apparmor feature for validating snap seed
During Realtime kernel image build, there was an error during
validating snap seed which derivative images copied 5.19
apparmor feature and can't validate when Realtime kernel (5.15)
installed [0].

To prevent this, bind correct apparmor feature with kernel
version.

[0] https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/2024639
2023-08-02 22:37:22 -05:00
Łukasz 'sil2100' Zemczak
32d9a1b82e Merge branch 'jammy-add-tegra-live-server' of git+ssh://git.launchpad.net/~lool/livecd-rootfs/+git/jammy-add-tegra-live-server into ubuntu/jammy 2023-05-23 16:37:15 +02:00
Steve Langasek
5ac4df3a1a Drop use of --removable flag to grub-install from buildd/hooks
This now matches the cloud images (7c760864fdcb278ca37396f06f5e3f297428d63d)
fixing bootloader updates in the buildd images, but also fixing
compatibility with using devtmpfs for losetup.
2023-05-18 15:16:29 -07:00
Loïc Minier
35fef6becf Initial support for NVIDIA Tegra
live-build/auto/config:
- for Ubuntu Server live images and the arm64+tegra full arch, build a
  tegra variant with linux-nvidia-tegra as the flavor and
  linux-nvidia-tegra as the kernel meta-package
- default to nvidia-$SUBARCH as the kernel flavor and enable all
  components for all images using arm64+tegra as full arch

hooks/03-kernel-metapkg.chroot_early:
- use linux-nvidia-tegra as kernel meta-package for the nvidia-tegra
  flavor
2023-04-08 18:23:38 +00:00
John Chittum
e1fca53deb
feat: add 5.19 kernel apparmor features
the 5.19 kernel added ipc posix_mqueue apparmor features. the generic
set of apparmor features for the 5.15 LTS jammy kernel does not have
this feature. Along with the commit "support kernel with different
apparmor feats", this ensures that the HWE kernel for 5.19 has a
matching set.

note that on the next HWE roll, another directory will need to be added.
For each new HWE kernel roll, checking capabilities, creating the
directory, and adding the correct features will be required.
2023-04-07 09:36:30 -05:00
John Chittum
bd1690bd16
feat: support kernel with different apparmor feats
Jammy HWE is rolling to 5.19. the 5.19 kernel introduced more apparmor
features, specifically ipc. due to the roll, we now must support builds
with 2 different feature sets.

This specifically affects snap-preseeding, where if a snap_preseed is
run with a mismatched apparmor feature set, snap will require a restart
to match the running kernel's feature set. in the clouds, this can add
somehwere between 5-10s (as of checks on 20230404). This is a large boot
time performance hit.

Implementation is done at the `snap_validate_seed` function level. This
function is called in snap scenarios. It checks for an installed kernel
in the chroot, gets the major.min version, and checks for
apparmor/$KERN. If found, it will do a copy of the directory, providing
a naive override mechanism.

For CPC builds, we are adding a call to `snap_validate_seed` at the end
of affected hooks as well. This is a safe procedure to call, as it
reruns the snap_preseed for all snaps. By running at the end of build
processes, it ensures that any kernel changes done during the build are
taken into account.
2023-04-07 09:30:38 -05:00
Łukasz 'sil2100' Zemczak
2075062139 Enable building intel-iot live-server images. 2023-03-17 12:34:42 +01:00
Dimitri John Ledkov
632753aa7c
auto/config: Add support for ubuntu core arm64 generic images
LP: #2009067

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2023-03-02 18:14:12 +00:00
Łukasz 'sil2100' Zemczak
5bd8a465a6 Typo fix. 2023-02-23 00:30:40 +01:00
Łukasz 'sil2100' Zemczak
cccc04e0c1 Fix path. 2023-02-23 00:27:02 +01:00
Łukasz 'sil2100' Zemczak
5b99af28d0 Terrible workaround 2023-02-22 23:59:40 +01:00
Łukasz 'sil2100' Zemczak
87dcf0de62 Do not offer the hwe kernel for RISC-V server-live images 2023-02-20 17:30:01 +01:00
Łukasz 'sil2100' Zemczak
06fd5dacc3 Missed one place for handling lowlatency kernels flavours. 2023-02-16 14:23:53 +01:00
Łukasz 'sil2100' Zemczak
e5e4051ff4 ...piggyback flavor changes as well. 2023-02-07 16:08:54 +01:00
Łukasz 'sil2100' Zemczak
57fbcb4efd Enable the hwe kernel variant for 22.04.2. 2023-02-07 15:39:32 +01:00
Utkarsh Gupta
1278ff9231 Clean up whitespaces 2022-12-12 15:31:52 +05:30
Samir Akarioh
06dff46b6b feat: Add metadata on ubuntu-oci image
Add a file build.info on etc/cloud
with the serial information

Signed-off-by: Samir Akarioh <samir.akarioh@canonical.com>
(cherry picked from commit 105acdebc783291f740294b5c317f3e6d2da9de4)
2022-11-22 12:20:31 +01:00
Łukasz 'sil2100' Zemczak
7cbd320b6c Merge branch 'jammy-riscv64' of git+ssh://git.launchpad.net/~xypron/livecd-rootfs into ubuntu/jammy 2022-11-21 11:18:04 +01:00
Steve Langasek
481920f28b Remove modemmanager and udisks2 from cloud images in addition to fwupd. The use of tasks at install means all packages are marked manually installed in the apt database, so removing fwupd does not remove its dependencies. LP: #1981109. 2022-11-18 14:51:49 -08:00
Steve Langasek
3fe7a19c52 Remove fwupd from the cloud images. LP: #1981109. 2022-11-18 14:51:18 -08:00
Heinrich Schuchardt
591b0a3432 riscv64: use efi=debug earlycon
RISC-V boards tend to boot slowly.
We should provide progress information when booting.

Use 'efi=debug earlycon' on the Linux command line via new file
/etc/default/grub.d/cmdline.cfg.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-17 11:21:59 +01:00
Łukasz 'sil2100' Zemczak
0fa7ab23ed Add an additional subdir. 2022-11-17 11:21:59 +01:00
Heinrich Schuchardt
0016cada16 riscv: reduce initrd size for Nezha and LicheeRV boards
The Nezha and the LicheeRV boards do not have enough memory for an initrd
with most modules. Therefore the number of included modules has to be
reduced.

Create file /etc/initramfs-tools/conf.d/modules_list.conf
to set MODULES=list.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-17 11:21:59 +01:00
Heinrich Schuchardt
c4dc7bce4c riscv: remove invalid redirections
Remove redirections of type

    command &1>2

Executing the command in the background and creating and empty file '2'
was never intended.

As the messages are information only redirecting to stderr would not make
sense either.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-17 11:21:59 +01:00
Alexandre Ghiti
8ba2493a80 riscv: LicheeRV must use u-boot-nezha package
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-11-17 11:21:59 +01:00
Alexandre Ghiti
0940dd3cd8 riscv: Add support to build Microchip Icicle Kit image
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>

Replace FK_FORCE_CONTAINER by FK_FORCE (LP: #1989194)
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-11-17 11:21:59 +01:00
Alexandre Ghiti
e9004e6273 riscv: Add support to build LicheeRV Dock images
The LicheeRV Dock board comes with only 512MB of DRAM so the only difference
with a Nezha image is the fact that we have to remove
cryptsetup-initramfs package which makes the initrd too big for the
board to boot.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-11-17 11:21:59 +01:00
William Wilson
6939cb42d5 Rename FK_FORCE_CONTAINER to FK_FORCE 2022-10-19 10:03:04 -05:00
Steve Langasek
9da86ba533 The ubuntustudio dkms hook is only created when we're building ubuntustudio, so only chmod it when it exists. LP: #1983521. 2022-08-04 12:11:50 -07:00
Łukasz 'sil2100' Zemczak
80cb6a4a1e Backport fix for cloud RISC-V images from kinetic. 2022-08-04 17:24:12 +02:00
ce9549372a Manually blacklist DKMS modules for Ubuntu Studio builds (LP: #1983521). 2022-08-03 19:15:15 -05:00
Łukasz 'sil2100' Zemczak
31ea439043 Pre-install wpasupplicant on all the RISC-V preinstalled images (besides cloud). 2022-07-28 14:18:33 +02:00
Łukasz 'sil2100' Zemczak
84e7e03bf2 Cherry pick fix for unmatched boot image build fix from kinetic. 2022-07-25 10:25:06 +02:00
Alexandre Ghiti
bbcf3c5714 riscv: Use FK_FORCE_CONTAINER to force flash-kernel to run in a container
As explained in LP: #1980929, we need this in order to build RISC-V
images.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-13 16:04:21 +02:00
Alexandre Ghiti
6f9d5b7ff2 disk-image-uefi.binary: Fix wrong parenthesis
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-13 16:04:21 +02:00
Alexandre Ghiti
81614c6992 riscv: Bump image size to 4.5G
3.5G is not enough for riscv64 preinstalled as the creation of the initrd fails
with the following error:

Creating config file /etc/default/grub with new version
Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-1011-generic
zstd: error 25 : Write error : No space left on device (cannot write compressed block)
E: mkinitramfs failure zstd -q -1 -T0 25
update-initramfs: failed for /boot/initrd.img-5.15.0-1011-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-13 16:03:26 +02:00
Alexandre Ghiti
b9873fbed5 riscv: Use UEFI bootflow for the Nezha Board
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-13 16:03:26 +02:00
Alexandre Ghiti
ce9f5cacca riscv: Add support for StarFive VisionFive
The image created uses a UEFI bootflow, so we install grub for this board
only. We also need flash-kernel to install the dtb where grub can find
it.

This image is specifically architectured so that it can be installed on
a "factory" board, meaning using the u-boot firmware which was
originally implemented for Fedora, so we need the p3 partition that
embeds a uEnv.txt file to tell u-boot what/where to load next stage.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-13 16:03:26 +02:00
Alexandre Ghiti
80c5ccd5c1 riscv: Fix nezha hardcoded password attempt
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
2022-07-13 16:03:26 +02:00