From 1038f9433088dcec11dfddafd9e4e667b3ab476e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yao=20Wei=20=28=E9=AD=8F=E9=8A=98=E5=BB=B7=29?= Date: Fri, 16 Jun 2023 14:04:39 +0800 Subject: [PATCH] feat: add ubuntu-oem project for oem images --- debian/changelog | 10 ++++++++ live-build/auto/config | 31 ++++++++++++++++++++++-- live-build/ubuntu-oem/hooks.d/make-hooks | 1 + 3 files changed, 40 insertions(+), 2 deletions(-) create mode 120000 live-build/ubuntu-oem/hooks.d/make-hooks diff --git a/debian/changelog b/debian/changelog index 1b07683d..03dc4901 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +livecd-rootfs (2.900) UNRELEASED; urgency=medium + + * Add ubuntu-oem build project: + - auto/config: Make ubuntu-oem project available, and runs make-hooks like + ubuntu-cpc. + - live-build/ubuntu-oem: Create the directory for ubuntu-oem project, and + link make-hooks from ubuntu-cpc into it. + + -- Yao Wei (魏銘廷) Wed, 12 Jul 2023 11:01:07 +0800 + livecd-rootfs (2.899) mantic; urgency=medium * ubuntu-cpc: Revert mount ESP on /boot and bind mount /boot on /boot/efi diff --git a/live-build/auto/config b/live-build/auto/config index c26bd437..c86d6380 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -550,6 +550,8 @@ case $IMAGEFORMAT in add_package live casper fi ;; + ubuntu-oem) + ;; *) add_package live casper ;; @@ -810,6 +812,30 @@ case $PROJECT in esac ;; + ubuntu-oem) + touch config/universe-enabled + PASSES_TO_LAYERS="true" + #KERNEL_FLAVOURS='oem-22.04' + KERNEL_FLAVOURS='generic-hwe-22.04' + add_task minimal minimal standard ubuntu-desktop-minimal ubuntu-desktop-minimal-default-languages + add_task minimal.standard ubuntu-desktop ubuntu-desktop-default-languages + add_task minimal.standard.live ubuntu-live + add_package minimal cloud-init + remove_package minimal.standard.live ubiquity-frontend-gtk + add_snap minimal.standard.live ubuntu-desktop-installer/classic + + cat <<-EOF > config/minimal.standard.catalog-in.yaml + name: "Ubuntu Desktop for OEM" + description: >- + Ubuntu Desktop for OEM preinstallation. + id: ubuntu-desktop-oem + type: fsimage-layered + variant: desktop + locale_support: none + default: yes + EOF + ;; + kubuntu|kubuntu-dvd) add_task install minimal standard add_task install kubuntu-desktop @@ -1529,7 +1555,8 @@ EOF fi ;; - ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled|ubuntu-wsl:*|ubuntu-mini-iso:*|ubuntu:canary) + ubuntu-cpc:*|ubuntu-server:live|ubuntu:desktop-preinstalled| \ + ubuntu-wsl:*|ubuntu-mini-iso:*|ubuntu:canary|ubuntu-oem:*) # Ensure that most things e.g. includes.chroot are copied as is for entry in /usr/share/livecd-rootfs/live-build/${PROJECT}/*; do case $entry in @@ -1545,7 +1572,7 @@ EOF esac done - if [ "$PROJECT" = "ubuntu-cpc" ]; then + if [ "$PROJECT" = "ubuntu-cpc" ] || [ "$PROJECT" = "ubuntu-oem" ] ; then case ${IMAGE_TARGETS:-} in "") config/hooks.d/make-hooks --hooks-dir config/hooks all diff --git a/live-build/ubuntu-oem/hooks.d/make-hooks b/live-build/ubuntu-oem/hooks.d/make-hooks new file mode 120000 index 00000000..0a857d6e --- /dev/null +++ b/live-build/ubuntu-oem/hooks.d/make-hooks @@ -0,0 +1 @@ +../../ubuntu-cpc/hooks.d/make-hooks \ No newline at end of file