Compare commits

...

19 Commits

Author SHA1 Message Date
Philip Roche
a0dea8f6e2
d/ch change to upload 24.04.72 noble 2024-06-25 12:23:43 +01:00
Philip Roche
d9e444988d
Merge bugfix/LP-2069828-restore-unminimize-during-server-build-noble into ubuntu/noble [a=philroche] [r=gjolly,utkarsh]
fix: Revert removal of unminimize call in server builds (LP: #2069828)

There was a change made by me in https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466388
as part of LP: #2066905 to remove references to LXD in the unminimize scripts
but I also removed the calls to `unminimize` in error.

This still needs to run but without any references to LXD which no longer
needs to be `unminimized` via snap installation.

(cherry picked from commit f574fc8200d8a4c7837288c5d2aa1e515137bb55)

MP: https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/468088
2024-06-25 12:19:00 +01:00
Philip Roche
62a80ac00a
fix: Revert removal of unminimize call in server builds (LP: #2069828)
There was a change made by me in https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466388
as part of LP: #2066905 to remove references to LXD in the unminimize scripts
but I also removed the calls to `unminimize` in error.

This still needs to run but without any references to LXD which no longer
needs to be `unminimized` via snap installation.

(cherry picked from commit f574fc8200d8a4c7837288c5d2aa1e515137bb55)
2024-06-24 17:26:07 +01:00
Heinrich Schuchardt
05933ff83f riscv64: use earlycon=sbi on command line
With current kernel we need to specify the SBI driver
for the early console to work.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-06-07 16:21:32 +02:00
Philip Roche
10d4a04d14
Merge bugfix/noble-remove-files-added-during-incorect-merge-conflict-resolution into ubuntu/noble [a=philroche] [r=brian-murray]
fix: Remove .patch files and livecd-rootfs symlink committed in error as part of merge commit.

Apologies. Trying to do too many things at once

This reverts changes added in error in commit 639f04b7

MP: https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466885
2024-06-04 18:42:12 +01:00
Philip Roche
d72ae0de70
fix: Remove .patch files and livecd-rootfs symlink committed in error as part of merge commit.
Apologies. Trying to do too many things at once

This reverts changes added in error in commit 639f04b7
2024-06-04 18:33:45 +01:00
Philip Roche
bfb829c64d fix: Remove .idea pycharm directories and files committed in error as part of merge commit.
Apologies. Trying to do too many things at once
2024-05-27 12:40:56 +01:00
Philip Roche
13ec478feb d/ch change to upload 24.04.71 noble 2024-05-27 12:06:44 +01:00
Philip Roche
639f04b7b9 Merge feature/re-enable-noble-hyperv-desktop-builds-noble into ubuntu/noble [a=philroche] [r=mwhudson,utkarsh]
feat: Re-enable ability to build HyperV desktop images (LP: #2064280)

We have not built Hyperv desktop images since Jammy and with the re-introduction of
HyperV for Noble we have encountered build issues caused by refactoring and removals
of code assumed to be redundant but the HyperV desktop images were actually using
these code paths.

This is a backport/SRU from oracular.

MP: https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466385

# Conflicts:
#	debian/changelog
2024-05-27 12:06:31 +01:00
Philip Roche
073d7e0404 d/ch change to upload 24.04.70 noble 2024-05-27 11:11:12 +01:00
Philip Roche
1f40b60606 Merge bugfix/lxd-no-longer-seeded-unminimize-noble into ubuntu/noble [a=philroche] [r=sdeziel,utkarsh,vorlon]
fix: No longer install LXD snap in unminimize script (LP: #2066905)

The LXD snap is no longer seeded in any images since Noble+ so the LXD related unminimize logic in
./live-build/auto/build?h=ubuntu/noble and ./live-build/ubuntu-server/hooks/01-unminimize.chroot_early
 is no longer required.

lxd-installer can remain installed.

This is a backport/SRU from oracular

(cherry picked from commit 46c19dfa913c133042d62e0caa2d2d526cd9bb7f)

MP: https://code.launchpad.net/~philroche/livecd-rootfs/+git/livecd-rootfs/+merge/466388
2024-05-27 11:10:05 +01:00
Philip Roche
5507ca8d83 fix: No longer install LXD snap in unminimize script (LP: #2066905)
The LXD snap is no longer seeded in any images since Noble+ so the LXD related unminimize logic in
./live-build/auto/build?h=ubuntu/noble and ./live-build/ubuntu-server/hooks/01-unminimize.chroot_early
 is no longer required.

lxd-installer can remain installed.

(cherry picked from commit 46c19dfa913c133042d62e0caa2d2d526cd9bb7f)
2024-05-24 15:48:21 +01:00
Philip Roche
49a14274d1 d/ch update for 24.04.70 to re-enable ability to build HyperV desktop images (LP: #2064280) 2024-05-24 15:34:40 +01:00
Philip Roche
5f59eec085 fix(Hyperv Desktop): remove redundant case statement match ubuntu
`ubuntu` will never match `${PROJECT:-}:${SUBPROJECT:-}` cases statement and can be safely removed.

(cherry picked from commit 0945c40fb2bb067d86d496b7b40bdae89123124c)
2024-05-24 15:31:21 +01:00
Philip Roche
8cc079fe50 fix(Hyperv Desktop): as we are using oem-config we do not need ubiquity-slideshow-ubuntu
As we are only using oem-config, oem-config-slideshow-ubuntu will suffice

(cherry picked from commit 8fe26586cc1b65621e74121b03c912dcee0e6cf8)
2024-05-24 15:31:16 +01:00
Philip Roche
34edbb9a1c fix(Hyperv Desktop): ubiquity-frontend-gtk is a dependency of the oem-config-gtk package so does not need to be added explicitly
(cherry picked from commit dc2d1318d2d2183f6d80673a1daf5dc8794cd3ed)
2024-05-24 15:31:11 +01:00
Philip Roche
40c7eac14d feat(Hyperv Desktop): Disable cloud-init for Hyperv Desktop images (LP: #2064280)
For Ubuntu 24.04 and later cloud-init is included in desktop images. This is not applicable for Hyperv images so
we can disable cloud-init. This leaves the cloud-init package installed but disabled so users can still
use it if they want.

This is a documented way to disable cloud-init. See https://cloudinit.readthedocs.io/en/latest/howto/disable_cloud_init.html

(cherry picked from commit ff47664d8c646ebae72c40145ee1fd8098185de6)
2024-05-24 15:30:50 +01:00
Phil Roche
b12e271417 fix(HyperV desktop): Ensure removed hyperv dependencies are present in HyperV builds (LP: #2064280)
A change in 8fb21808 also removed many of the dependencies that the hyperv images require.
This removal has been restored in this commit by adding them expliciltly in the hyperv hook.

(cherry picked from commit c459e5e5af0371c0228bd4e5ddec57b8954d39df)
2024-05-24 15:30:45 +01:00
Phil Roche
fa351ac77b fix(HyperV desktop): Re-enable ability to build HyperV desktop images (LP: #2064280)
We have not built Hyperv desktop images since Jammy and with the re-introduction of HyperV for Noble we have encountered build issues caused by refactoring and removals of code assumed to be redundant but the HyperV desktop images were actually using these code paths.

In bbedffe6 we split the building of cloud images and non cloud to using an ddisk-image-uefi.binary and disk-image-uefi-non-cloud.binary respectively. In e38264ca there was a change which meant that any attempt to build hyperv images would result in incorrect disk size and incorrect disk label.

This has been fixed by ensuring that the ubuntu:desktop-preinstalled $PROJECT:$SUBPROJECT matches and sets the correct disk size and correct disk label.

A change in 76d79466 changed the logic of how the image size for amd64 images were being set. This overrode the sizes set for the desktop images incorrectly.

This commit ensures that any desktop image being created uses the correct image size.

(cherry picked from commit 48aed401949637ac314e59de996ccab19d5eefcd)
2024-05-24 15:30:38 +01:00
7 changed files with 54 additions and 61 deletions

24
debian/changelog vendored
View File

@ -1,9 +1,29 @@
livecd-rootfs (24.04.70) UNRELEASED; urgency=medium livecd-rootfs (24.04.72) noble; urgency=medium
[ Heinrich Schuchardt ]
* riscv64: use earlycon=sbi on command line (LP: #2068739)
[ Philip Roche ]
* Revert removal of unminimize call in server builds (LP: #2069828)
-- Philip Roche <phil.roche@canonical.com> Mon, 24 Jun 2024 14:24:52 +0100
livecd-rootfs (24.04.71) noble; urgency=medium
* Re-enable ability to build HyperV desktop images (LP: #2064280)
-- Philip Roche <phil.roche@canonical.com> Mon, 27 May 2024 12:05:33 +0100
livecd-rootfs (24.04.70) noble; urgency=medium
[ Łukasz 'sil2100' Zemczak ]
* Add experimental support for building ubuntu-core-desktop installer images * Add experimental support for building ubuntu-core-desktop installer images
(LP: #2063203) (LP: #2063203)
-- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Wed, 24 Apr 2024 10:53:27 +0100 [ Philip Roche ]
* No longer install LXD snap in unminimize script (LP: #2066905)
-- Philip Roche <phil.roche@canonical.com> Fri, 24 May 2024 15:47:48 +0100
livecd-rootfs (24.04.69) noble; urgency=medium livecd-rootfs (24.04.69) noble; urgency=medium

View File

@ -283,18 +283,6 @@ if dpkg-query --show --showformat='${db:Status-Status}\n' linux-image-virtual 2>
fi fi
EOF EOF
fi
if [ "$PROJECT" = "ubuntu-cpc" ] || [ "$PROJECT" = "ubuntu-server" ]; then
cat >> chroot/usr/local/sbin/unminimize <<'EOF'
# installing LXD using the lxd-installer by simply invoking it
echo "Invoking LXD so that it can be installed by the lxd-installer's script.."
lxd --version
echo "Removing lxd installer package..."
apt-get purge -y lxd-installer
EOF
fi fi
cat >> chroot/usr/local/sbin/unminimize <<'EOF' cat >> chroot/usr/local/sbin/unminimize <<'EOF'

View File

@ -9,21 +9,6 @@ case $ARCH in
;; ;;
esac esac
case ${PROJECT:-}:${SUBPROJECT:-} in
ubuntu:)
echo "We don't create EFI images for Ubuntu Desktop."
exit 0
;;
ubuntu)
IMAGE_STR="# DESKTOP_IMG: This file was created/modified by the Desktop Image build process"
FS_LABEL="desktop-rootfs"
IMAGE_SIZE=12884901888 # 12G
;;
*)
IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
FS_LABEL="cloudimg-rootfs"
;;
esac
if [ "$ARCH" = "amd64" ]; then if [ "$ARCH" = "amd64" ]; then
IMAGE_SIZE=3758096384 # bump to 3.5G (3584*1024**2); Since Kinetic amd64 need more then the default 2.2G IMAGE_SIZE=3758096384 # bump to 3.5G (3584*1024**2); Since Kinetic amd64 need more then the default 2.2G
@ -44,6 +29,22 @@ if [ "$ARCH" = "riscv64" ]; then
IMAGE_SIZE=4831838208 # bump to 4.5G (4608*1024**2); initrd creation fails with "No space left" with 3.5G IMAGE_SIZE=4831838208 # bump to 4.5G (4608*1024**2); initrd creation fails with "No space left" with 3.5G
fi fi
case ${PROJECT:-}:${SUBPROJECT:-} in
ubuntu:)
echo "We don't create EFI images for Ubuntu Desktop."
exit 0
;;
ubuntu:desktop-preinstalled)
IMAGE_STR="# DESKTOP_IMG: This file was created/modified by the Desktop Image build process"
FS_LABEL="desktop-rootfs"
IMAGE_SIZE=12884901888 # 12G
;;
*)
IMAGE_STR="# CLOUD_IMG: This file was created/modified by the Cloud Image build process"
FS_LABEL="cloudimg-rootfs"
;;
esac
. config/binary . config/binary
. config/functions . config/functions

View File

@ -1,4 +1,4 @@
# Booting on many riscv64 systems is slow. Let the user view progress. # Booting on many riscv64 systems is slow. Let the user view progress.
# For minimum output use # For minimum output use
# GRUB_CMDLINE_LINUX_DEFAULT="quiet" # GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX_DEFAULT="efi=debug earlycon" GRUB_CMDLINE_LINUX_DEFAULT="efi=debug earlycon=sbi"

View File

@ -1 +1 @@
U_BOOT_PARAMETERS="ro efi=debug earlycon" U_BOOT_PARAMETERS="ro efi=debug earlycon=sbi"

View File

@ -10,30 +10,9 @@ case ${PASS} in
;; ;;
esac esac
# The unminimize script will try to install the lxd snap using the shim script # Run the unminimize script to re-install packages with all dpkg filters removed and install packages
# /usr/sbin/lxd from the lxd-installer package. # removed as part of minimization
# We can't do that at this stage so just neuter the lxd command (the snap
# will get properly seeded by generic machinery).
if [ -f "/usr/sbin/lxd" ]; then
dpkg-divert --add --divert /usr/sbin/lxd.REAL --rename /usr/sbin/lxd
ln -s /bin/true /usr/sbin/lxd
yes | /usr/local/sbin/unminimize yes | /usr/local/sbin/unminimize
# unminimize also uninstalls lxd-installer package
# and also removed `/usr/sbin/lxd` as a result, so we don't need to restore, but
# we do need to remove the mock we used as part of dpkg-divert
# first we need to remove the diversion
dpkg-divert --remove --no-rename /usr/sbin/lxd
# now remove the renamed file that we originally diverted to
rm -v /usr/sbin/lxd.REAL
else
# if /usr/sbin/lxd doesn't exist then lxd-installer package isn't installed.
# Instead, we can mock the command to avoid the unminimize script failing
ln -s /bin/true /usr/sbin/lxd
yes | /usr/local/sbin/unminimize
# as the lxd-installer package was not installed and thus not removed by `unminimize`
# the mock /usr/sbin/lxd will still be present, so we need to remove it
rm -v /usr/sbin/lxd
fi
# Fix up missing recommends. Other non-layered flavors handle this in # Fix up missing recommends. Other non-layered flavors handle this in
# live-build/auto/build, but we need to do it here. Also, there are # live-build/auto/build, but we need to do it here. Also, there are

View File

@ -39,8 +39,14 @@ trap cleanup_hyperv EXIT
# Perform customisations # Perform customisations
# For Ubuntu 24.04 and later cloud-init is included in desktop images. This is not applicable for Hyperv images so
# we can disable cloud-init. This leaves the cloud-init package installed but disabled so users can still
# use it if they want.
touch "${scratch_d}/etc/cloud/cloud-init.disabled"
chroot "${scratch_d}" apt-get update -y chroot "${scratch_d}" apt-get update -y
chroot "${scratch_d}" apt-get -y install xrdp linux-azure linux-tools-azure linux-cloud-tools-azure chroot "${scratch_d}" apt-get -y install xrdp linux-azure linux-tools-azure linux-cloud-tools-azure polkitd-pkla oem-config-gtk language-pack-en-base oem-config-slideshow-ubuntu
cat > ${scratch_d}/etc/modules-load.d/hyperv.conf << EOF cat > ${scratch_d}/etc/modules-load.d/hyperv.conf << EOF
${IMAGE_STR} ${IMAGE_STR}
@ -124,20 +130,19 @@ touch "${scratch_d}/var/lib/oem-config/run"
chroot "${scratch_d}" apt-get clean chroot "${scratch_d}" apt-get clean
raw_img=binary/boot/disk-hyperv-uefi.ext4
vhd_img=livecd.ubuntu-desktop-hyperv.vhdx
create_manifest "${scratch_d}" "$vhd_img.zip.manifest"
# End customisations # End customisations
cleanup_hyperv cleanup_hyperv
trap - EXIT trap - EXIT
raw_img=binary/boot/disk-hyperv-uefi.ext4
vhd_img=livecd.ubuntu-desktop-hyperv.vhdx
qemu-img convert -O vhdx "$raw_img" "$vhd_img" qemu-img convert -O vhdx "$raw_img" "$vhd_img"
rm "$raw_img" rm "$raw_img"
apt-get install -y zip apt-get install -y zip
create_manifest chroot "$vhd_img.zip.manifest"
zip "$vhd_img.zip" "$vhd_img" zip "$vhd_img.zip" "$vhd_img"
rm "$vhd_img" rm "$vhd_img"