[neon/neon/livecd-rootfs/Neon/release] /: Merge feature/re-enable-noble-hyperv-desktop-builds-noble into ubuntu/noble [a=philroche] [r=mwhudson,utkarsh]

Philip Roche null at kde.org
Thu Jul 11 11:54:01 BST 2024


Git commit 639f04b7b9bb1aa4d071bf4f4ed94f3dbfe08293 by Philip Roche.
Committed on 27/05/2024 at 11:06.
Pushed by carlosdem into branch 'Neon/release'.

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

A  +6    -0    .idea.bkup/inspectionProfiles/profiles_settings.xml
A  +8    -0    .idea.bkup/livecd-rootfs.iml
A  +4    -0    .idea.bkup/misc.xml
A  +8    -0    .idea.bkup/modules.xml
A  +7    -0    .idea.bkup/vcs.xml
A  +50   -0    .idea.bkup/workspace.xml
A  +6    -0    .idea.bkup2/inspectionProfiles/profiles_settings.xml
A  +8    -0    .idea.bkup2/livecd-rootfs.iml
A  +8    -0    .idea.bkup2/modules.xml
A  +7    -0    .idea.bkup2/workspace.xml
A  +6    -0    .idea.bkup3/inspectionProfiles/profiles_settings.xml
A  +8    -0    .idea.bkup3/livecd-rootfs.iml
A  +8    -0    .idea.bkup3/modules.xml
A  +7    -0    .idea.bkup3/workspace.xml
A  +6    -0    .idea/inspectionProfiles/profiles_settings.xml
A  +8    -0    .idea/livecd-rootfs.iml
A  +8    -0    .idea/modules.xml
A  +7    -0    .idea/workspace.xml
A  +40   -0    arm64-minimized-alignment.patch
A  +63   -0    buildd-noble-ls-python-3-apt.patch
M  +6    -0    debian/changelog
A  +1    -0    debian/files
A  +43   -0    live-build/genbuildinfo.py
A  +1    -0    livecd-rootfs

https://invent.kde.org/neon/neon/livecd-rootfs/-/commit/639f04b7b9bb1aa4d071bf4f4ed94f3dbfe08293

diff --cc .idea.bkup/inspectionProfiles/profiles_settings.xml
index 00000000,00000000..105ce2da
new file mode 100644
--- /dev/null
+++ b/.idea.bkup/inspectionProfiles/profiles_settings.xml
@@@ -1,0 -1,0 +1,6 @@@
++<component name="InspectionProjectProfileManager">
++  <settings>
++    <option name="USE_PROJECT_PROFILE" value="false" />
++    <version value="1.0" />
++  </settings>
++</component>
diff --cc .idea.bkup/livecd-rootfs.iml
index 00000000,00000000..d0876a78
new file mode 100644
--- /dev/null
+++ b/.idea.bkup/livecd-rootfs.iml
@@@ -1,0 -1,0 +1,8 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<module type="PYTHON_MODULE" version="4">
++  <component name="NewModuleRootManager">
++    <content url="file://$MODULE_DIR$" />
++    <orderEntry type="inheritedJdk" />
++    <orderEntry type="sourceFolder" forTests="false" />
++  </component>
++</module>
diff --cc .idea.bkup/misc.xml
index 00000000,00000000..02b69cde
new file mode 100644
--- /dev/null
+++ b/.idea.bkup/misc.xml
@@@ -1,0 -1,0 +1,4 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (cpc-sbom) (2)" project-jdk-type="Python SDK" />
++</project>
diff --cc .idea.bkup/modules.xml
index 00000000,00000000..8f7a3b65
new file mode 100644
--- /dev/null
+++ b/.idea.bkup/modules.xml
@@@ -1,0 -1,0 +1,8 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="ProjectModuleManager">
++    <modules>
++      <module fileurl="file://$PROJECT_DIR$/.idea/livecd-rootfs.iml" filepath="$PROJECT_DIR$/.idea/livecd-rootfs.iml" />
++    </modules>
++  </component>
++</project>
diff --cc .idea.bkup/vcs.xml
index 00000000,00000000..1fb36172
new file mode 100644
--- /dev/null
+++ b/.idea.bkup/vcs.xml
@@@ -1,0 -1,0 +1,7 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="VcsDirectoryMappings">
++    <mapping directory="" vcs="Git" />
++    <mapping directory="$PROJECT_DIR$/livecd-rootfs" vcs="Git" />
++  </component>
++</project>
diff --cc .idea.bkup/workspace.xml
index 00000000,00000000..fde7212b
new file mode 100644
--- /dev/null
+++ b/.idea.bkup/workspace.xml
@@@ -1,0 -1,0 +1,50 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="ChangeListManager">
++    <list default="true" id="8b53e4fe-d06b-4120-bca1-09aab0c0e0b8" name="Changes" comment="">
++      <change beforePath="$PROJECT_DIR$/debian/changelog" beforeDir="false" afterPath="$PROJECT_DIR$/debian/changelog" afterDir="false" />
++      <change beforePath="$PROJECT_DIR$/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary" beforeDir="false" afterPath="$PROJECT_DIR$/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary" afterDir="false" />
++      <change beforePath="$PROJECT_DIR$/livecd-rootfs/debian/changelog" beforeDir="false" afterPath="$PROJECT_DIR$/livecd-rootfs/debian/changelog" afterDir="false" />
++      <change beforePath="$PROJECT_DIR$/livecd-rootfs/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary" beforeDir="false" afterPath="$PROJECT_DIR$/livecd-rootfs/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary" afterDir="false" />
++    </list>
++    <option name="SHOW_DIALOG" value="false" />
++    <option name="HIGHLIGHT_CONFLICTS" value="true" />
++    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
++    <option name="LAST_RESOLUTION" value="IGNORE" />
++  </component>
++  <component name="Git.Settings">
++    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
++  </component>
++  <component name="ProjectColorInfo"><![CDATA[{
++  "associatedIndex": 3
++}]]></component>
++  <component name="ProjectId" id="2VtkQwj0NQBRHE5uOcNk4KgQ7sF" />
++  <component name="ProjectViewState">
++    <option name="hideEmptyMiddlePackages" value="true" />
++    <option name="showLibraryContents" value="true" />
++  </component>
++  <component name="PropertiesComponent"><![CDATA[{
++  "keyToString": {
++    "RunOnceActivity.OpenProjectViewOnStart": "true",
++    "RunOnceActivity.ShowReadmeOnStart": "true",
++    "WebServerToolWindowFactoryState": "false",
++    "last_opened_file_path": "/home/philroche/Working/livecd-rootfs",
++    "vue.rearranger.settings.migration": "true"
++  }
++}]]></component>
++  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
++  <component name="TaskManager">
++    <task active="true" id="Default" summary="Default task">
++      <changelist id="8b53e4fe-d06b-4120-bca1-09aab0c0e0b8" name="Changes" comment="" />
++      <created>1695662751675</created>
++      <option name="number" value="Default" />
++      <option name="presentableId" value="Default" />
++      <updated>1695662751675</updated>
++      <workItem from="1695662752677" duration="2000" />
++    </task>
++    <servers />
++  </component>
++  <component name="TypeScriptGeneratedFilesManager">
++    <option name="version" value="3" />
++  </component>
++</project>
diff --cc .idea.bkup2/inspectionProfiles/profiles_settings.xml
index 00000000,00000000..105ce2da
new file mode 100644
--- /dev/null
+++ b/.idea.bkup2/inspectionProfiles/profiles_settings.xml
@@@ -1,0 -1,0 +1,6 @@@
++<component name="InspectionProjectProfileManager">
++  <settings>
++    <option name="USE_PROJECT_PROFILE" value="false" />
++    <version value="1.0" />
++  </settings>
++</component>
diff --cc .idea.bkup2/livecd-rootfs.iml
index 00000000,00000000..d0876a78
new file mode 100644
--- /dev/null
+++ b/.idea.bkup2/livecd-rootfs.iml
@@@ -1,0 -1,0 +1,8 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<module type="PYTHON_MODULE" version="4">
++  <component name="NewModuleRootManager">
++    <content url="file://$MODULE_DIR$" />
++    <orderEntry type="inheritedJdk" />
++    <orderEntry type="sourceFolder" forTests="false" />
++  </component>
++</module>
diff --cc .idea.bkup2/modules.xml
index 00000000,00000000..8f7a3b65
new file mode 100644
--- /dev/null
+++ b/.idea.bkup2/modules.xml
@@@ -1,0 -1,0 +1,8 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="ProjectModuleManager">
++    <modules>
++      <module fileurl="file://$PROJECT_DIR$/.idea/livecd-rootfs.iml" filepath="$PROJECT_DIR$/.idea/livecd-rootfs.iml" />
++    </modules>
++  </component>
++</project>
diff --cc .idea.bkup2/workspace.xml
index 00000000,00000000..d12cdb62
new file mode 100644
--- /dev/null
+++ b/.idea.bkup2/workspace.xml
@@@ -1,0 -1,0 +1,7 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="ProjectViewState">
++    <option name="hideEmptyMiddlePackages" value="true" />
++    <option name="showLibraryContents" value="true" />
++  </component>
++</project>
diff --cc .idea.bkup3/inspectionProfiles/profiles_settings.xml
index 00000000,00000000..105ce2da
new file mode 100644
--- /dev/null
+++ b/.idea.bkup3/inspectionProfiles/profiles_settings.xml
@@@ -1,0 -1,0 +1,6 @@@
++<component name="InspectionProjectProfileManager">
++  <settings>
++    <option name="USE_PROJECT_PROFILE" value="false" />
++    <version value="1.0" />
++  </settings>
++</component>
diff --cc .idea.bkup3/livecd-rootfs.iml
index 00000000,00000000..d0876a78
new file mode 100644
--- /dev/null
+++ b/.idea.bkup3/livecd-rootfs.iml
@@@ -1,0 -1,0 +1,8 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<module type="PYTHON_MODULE" version="4">
++  <component name="NewModuleRootManager">
++    <content url="file://$MODULE_DIR$" />
++    <orderEntry type="inheritedJdk" />
++    <orderEntry type="sourceFolder" forTests="false" />
++  </component>
++</module>
diff --cc .idea.bkup3/modules.xml
index 00000000,00000000..8f7a3b65
new file mode 100644
--- /dev/null
+++ b/.idea.bkup3/modules.xml
@@@ -1,0 -1,0 +1,8 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="ProjectModuleManager">
++    <modules>
++      <module fileurl="file://$PROJECT_DIR$/.idea/livecd-rootfs.iml" filepath="$PROJECT_DIR$/.idea/livecd-rootfs.iml" />
++    </modules>
++  </component>
++</project>
diff --cc .idea.bkup3/workspace.xml
index 00000000,00000000..d12cdb62
new file mode 100644
--- /dev/null
+++ b/.idea.bkup3/workspace.xml
@@@ -1,0 -1,0 +1,7 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="ProjectViewState">
++    <option name="hideEmptyMiddlePackages" value="true" />
++    <option name="showLibraryContents" value="true" />
++  </component>
++</project>
diff --cc .idea/inspectionProfiles/profiles_settings.xml
index 00000000,00000000..105ce2da
new file mode 100644
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@@ -1,0 -1,0 +1,6 @@@
++<component name="InspectionProjectProfileManager">
++  <settings>
++    <option name="USE_PROJECT_PROFILE" value="false" />
++    <version value="1.0" />
++  </settings>
++</component>
diff --cc .idea/livecd-rootfs.iml
index 00000000,00000000..d0876a78
new file mode 100644
--- /dev/null
+++ b/.idea/livecd-rootfs.iml
@@@ -1,0 -1,0 +1,8 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<module type="PYTHON_MODULE" version="4">
++  <component name="NewModuleRootManager">
++    <content url="file://$MODULE_DIR$" />
++    <orderEntry type="inheritedJdk" />
++    <orderEntry type="sourceFolder" forTests="false" />
++  </component>
++</module>
diff --cc .idea/modules.xml
index 00000000,00000000..8f7a3b65
new file mode 100644
--- /dev/null
+++ b/.idea/modules.xml
@@@ -1,0 -1,0 +1,8 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="ProjectModuleManager">
++    <modules>
++      <module fileurl="file://$PROJECT_DIR$/.idea/livecd-rootfs.iml" filepath="$PROJECT_DIR$/.idea/livecd-rootfs.iml" />
++    </modules>
++  </component>
++</project>
diff --cc .idea/workspace.xml
index 00000000,00000000..d12cdb62
new file mode 100644
--- /dev/null
+++ b/.idea/workspace.xml
@@@ -1,0 -1,0 +1,7 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<project version="4">
++  <component name="ProjectViewState">
++    <option name="hideEmptyMiddlePackages" value="true" />
++    <option name="showLibraryContents" value="true" />
++  </component>
++</project>
diff --cc arm64-minimized-alignment.patch
index 00000000,00000000..784e2373
new file mode 100644
--- /dev/null
+++ b/arm64-minimized-alignment.patch
@@@ -1,0 -1,0 +1,40 @@@
++diff --git a/live-build/auto/config b/live-build/auto/config
++index 20d28139..8f188b5d 100755
++--- a/live-build/auto/config
+++++ b/live-build/auto/config
++@@ -1048,12 +1048,13 @@ case $PROJECT in
++ 				add_task install ubuntu-server-raspi
++ 				;;
++ 			armhf*)
++-				add_package install flash-kernel
+++			  if [ "${SUBPROJECT:-}" != minimized ]; then
+++				  add_package install flash-kernel
+++				fi
++ 				;;
++ 			arm64*)
++-				add_package install flash-kernel
++-				if [ "${SUBARCH:-}" = "generic" ]; then
++-					KERNEL_FLAVOURS=generic
+++				if [ "${SUBPROJECT:-}" != minimized ]; then
+++				  add_package install flash-kernel
++ 				fi
++ 				;;
++ 			amd64*)
++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 3685e464..4602267c 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
++@@ -112,11 +112,11 @@ install_grub() {
++     # please file a bug against grub2 to include the affected module.
++     case $ARCH in
++         arm64)
++-            chroot mountpoint apt-get -qqy install --no-install-recommends shim-signed grub-efi-arm64-signed
+++            chroot mountpoint apt-get install -qqy shim-signed
++             efi_target=arm64-efi
++             ;;
++         armhf)
++-            chroot mountpoint apt-get -qqy install --no-install-recommends grub-efi-arm grub-efi-arm-bin
+++            chroot mountpoint apt-get -qqy install grub-efi-arm grub-efi-arm-bin
++             efi_target=arm-efi
++             ;;
++         amd64)
diff --cc buildd-noble-ls-python-3-apt.patch
index 00000000,00000000..8e38228d
new file mode 100644
--- /dev/null
+++ b/buildd-noble-ls-python-3-apt.patch
@@@ -1,0 -1,0 +1,63 @@@
++diff --git a/live-build/buildd/hooks/02-disk-image-uefi.binary b/live-build/buildd/hooks/02-disk-image-uefi.binary
++index 44a7ff42..a90f19c7 100755
++--- a/live-build/buildd/hooks/02-disk-image-uefi.binary
+++++ b/live-build/buildd/hooks/02-disk-image-uefi.binary
++@@ -53,6 +53,26 @@ LABEL=UEFI	/boot/efi	vfat	defaults	0 1
++ EOF
++ }
++ 
+++
+++divert_lsb_release() {
+++	CHROOT_ROOT="$1"
+++	chroot "$CHROOT_ROOT" dpkg-divert --local \
+++		--divert /usr/bin/lsb_release.dpkg-divert \
+++		--rename /usr/bin/lsb_release
+++  echo "echo Ubuntu" > "$CHROOT_ROOT"/usr/bin/lsb_release
+++  chmod +x "$CHROOT_ROOT"/usr/bin/lsb_release
+++
+++}
+++
+++undivert_lsb_release() {
+++	CHROOT_ROOT="$1"
+++	if grep -q "^echo Ubuntu$" "$CHROOT_ROOT"/usr/bin/lsb_release; then
+++		rm "$CHROOT_ROOT"/usr/bin/lsb_release
+++	fi
+++	chroot "$CHROOT_ROOT" dpkg-divert --remove --local \
+++		--rename /usr/bin/lsb_release
+++}
+++
++ install_grub() {
++     mkdir mountpoint
++     mount_partition "${rootfs_dev_mapper}" mountpoint
++@@ -69,7 +89,8 @@ install_grub() {
++     fi
++ 
++     chroot mountpoint apt-get -y update
++-
+++    divert_lsb_release mountpoint
+++    chroot mountpoint lsb_release
++     # UEFI GRUB modules are meant to be used equally by Secure Boot and
++     # non-Secure Boot systems. If you need an extra module not already
++     # provided or run into "Secure Boot policy forbids loading X" problems,
++@@ -84,7 +105,7 @@ install_grub() {
++             efi_target=arm-efi
++             ;;
++         amd64)
++-            chroot mountpoint apt-get install -qqy grub-pc shim-signed
+++            chroot mountpoint apt-get install -qqy grub-pc shim-signed python3-apt
++             efi_target=x86_64-efi
++             ;;
++     esac
++@@ -121,10 +142,12 @@ GRUB_RECORDFAIL_TIMEOUT=0
++ GRUB_TERMINAL=console
++ EOF
++ 
+++
++     divert_grub mountpoint
++     chroot mountpoint update-grub
++     replace_grub_root_with_label mountpoint
++     undivert_grub mountpoint
+++    undivert_lsb_release mountpoint
++ 
++     chroot mountpoint apt-get -y clean
++ 
diff --cc debian/changelog
index b34aef75,2b40014d..e4ce6c6f
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,4 -1,4 +1,10 @@@
 -livecd-rootfs (24.04.70) UNRELEASED; urgency=medium
++livecd-rootfs (24.04.71) noble; urgency=medium
++
++  * Re-enable ability to build HyperV desktop images (LP: #2064280)
++
++ -- Philip Roche <phil.roche at canonical.com>  Fri, 24 May 2024 15:47:48 +0100
++ 
 +livecd-rootfs (24.04.70) noble; urgency=medium
  
    [ Ɓukasz 'sil2100' Zemczak ]
    * Add experimental support for building ubuntu-core-desktop installer images
diff --cc debian/files
index 00000000,00000000..12597f08
new file mode 100644
--- /dev/null
+++ b/debian/files
@@@ -1,0 -1,0 +1,1 @@@
++livecd-rootfs_2.765.30_source.buildinfo devel optional
diff --cc live-build/genbuildinfo.py
index 00000000,00000000..25e519bd
new file mode 100755
--- /dev/null
+++ b/live-build/genbuildinfo.py
@@@ -1,0 -1,0 +1,43 @@@
++#!/usr/bin/python3
++import apt
++import os
++import platform
++import datetime
++from datetime import datetime, timezone
++
++# Get the current date and time in UTC timezone aware
++utc_now = datetime.now(timezone.utc)
++
++def get_system_architecture():
++    arch = platform.machine()
++    if arch == 'x86_64':
++        return 'amd64'
++    elif arch == 'aarch64':
++        return 'arm64'
++    else:
++        return f"Unknown architecture: {arch}"
++
++print("Format: 1.0")
++print("Build-Origin: Ubuntu")
++print(f"Build-Architecture: {get_system_architecture()}")
++print(f"Build-Date: {utc_now}")
++# Using python-apt to gather installed packages
++try:
++    package_cache = apt.Cache()
++
++    print("List of installed packages:")
++    for package in package_cache:
++        if package.is_installed:
++            print(f" {package.name} (= {package.installed.version}),")
++
++except Exception as e:
++    print(f"An error occurred while fetching installed packages: {e}")
++
++# Using os module to list all environment variables
++try:
++    print("\nEnvironment variables:")
++    for param, value in os.environ.items():
++        print(f" {param}={value}")
++
++except Exception as e:
++    print(f"An error occurred while fetching environment variables: {e}")
diff --cc livecd-rootfs
index 00000000,00000000..f5d3076e
new file mode 120000
--- /dev/null
+++ b/livecd-rootfs
@@@ -1,0 -1,0 +1,1 @@@
++/home/philroche/Working/livecd-rootfs



More information about the Neon-commits mailing list