From f2f86655982058a4a1bb489356f23d7570d226d0 Mon Sep 17 00:00:00 2001 From: Adam Conrad Date: Thu, 16 Feb 2017 10:18:54 -0700 Subject: [PATCH] * Forward-port hardware enablement delta from trusty to xenial, with changes: - Implement hwe stack swapping as task filters instead of install hints - Revert ubuntu-desktop and ubuntu-gnome to use tasks again for the above --- debian/changelog | 11 ++++-- live-build/auto/build | 6 ++- live-build/auto/config | 83 ++++++++++++++++++++++++++++++------------ 3 files changed, 71 insertions(+), 29 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5e7ec336..07509e7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,15 +1,18 @@ -livecd-rootfs (2.408.6) UNRELEASED; urgency=medium +livecd-rootfs (2.408.7) xenial; urgency=medium + [ Łukasz 'sil2100' Zemczak ] * Add additional hints to ubuntu-touch* i386/amd64 image builds to pull in the gles version of the UITK. * Now that we have have systemd working on ubuntu-touch, remove the systemd-sysv- in add_package config to make sure we can build an image with systemd as the init system. - [ Steve Langasek ] - * Document the Vcs-Bzr branch for SRUs. + [ Adam Conrad ] + * Forward-port hardware enablement delta from trusty to xenial, with changes: + - Implement hwe stack swapping as task filters instead of install hints + - Revert ubuntu-desktop and ubuntu-gnome to use tasks again for the above - -- Łukasz 'sil2100' Zemczak Mon, 03 Oct 2016 14:14:43 +0200 + -- Adam Conrad Wed, 08 Feb 2017 11:50:52 -0700 livecd-rootfs (2.408.5) xenial; urgency=medium diff --git a/live-build/auto/build b/live-build/auto/build index aade2508..ec7dfe59 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -602,6 +602,7 @@ for FLAVOUR in $LB_LINUX_FLAVOURS; do if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then continue fi + FLAVOUR=${FLAVOUR%%-hwe-*} if [ "$FLAVOUR" = "virtual" ]; then # The virtual kernel is named generic in /boot FLAVOUR="generic" @@ -635,17 +636,18 @@ done NUMFLAVOURS="$(set -- $LB_LINUX_FLAVOURS; echo $#)" if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then # only one kernel flavour + FLAVOUR=${LB_LINUX_FLAVOURS%%-hwe-*} if [ -e "binary/$INITFS/vmlinuz" ]; then ln "binary/$INITFS/vmlinuz" "$PREFIX.kernel" chmod 644 "$PREFIX.kernel" else - ln -sf "$PREFIX.kernel-$LB_LINUX_FLAVOURS" "$PREFIX.kernel" + ln -sf "$PREFIX.kernel-$FLAVOUR" "$PREFIX.kernel" fi if [ -e "binary/$INITFS/initrd.lz" ]; then ln "binary/$INITFS/initrd.lz" "$PREFIX.initrd" chmod 644 "$PREFIX.initrd" else - ln -sf "$PREFIX.initrd-$LB_LINUX_FLAVOURS" "$PREFIX.initrd" + ln -sf "$PREFIX.initrd-$FLAVOUR" "$PREFIX.initrd" fi fi diff --git a/live-build/auto/config b/live-build/auto/config index 010dae93..9537d89d 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -58,9 +58,15 @@ add_task () # failure. for task; do + if [ -z "$HWE_BUILD" ]; then # We need a ridiculous number of backslashes to protect # parentheses from eval. echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task" >> "config/package-lists/livecd-rootfs.list.chroot_$pass" + else + # If HWE_BUILD is set, we strip out drivers not available + # in the HWE stack, then sed the rest with their HWE suffixes + echo "!chroot chroot apt-cache dumpavail | grep-dctrl -nsPackage \\\\\\( -XFArchitecture $ARCH -o -XFArchitecture all \\\\\\) -a -wFTask $task | grep -v xserver-xorg-input-vmmouse | sed -e 's/xserver-xorg.*/&-hwe-16.04/'" >> "config/package-lists/livecd-rootfs.list.chroot_$pass" + fi done } @@ -186,17 +192,20 @@ case $BINARYFORMAT in ;; esac -SIGNED_KERNEL_PACKAGE="linux-signed-generic" -UNITY_HWE_HINTS="unity-settings-daemon notify-osd libqt4-sql-sqlite unity gnome-terminal" -UBUNTUGNOME_HWE_HINTS="unity-settings-daemon- unity-control-center- libaccount-plugin-1.0-0- notification-daemon- libreoffice-style-elementary- libreoffice-style-human- libreoffice-style-breeze- curl- humanity-icon-theme- gnome-shell pinentry-curses" +HWE_X_PACKAGES="xserver-xorg-hwe-16.04 xserver-xorg-video-all-hwe-16.04 xserver-xorg-input-all-hwe-16.04" +HWE_KERNEL_FLAVOUR="generic-hwe-16.04" +HWE_SIGNED_KERNEL_PACKAGE="linux-signed-$HWE_KERNEL_FLAVOUR" case $PROJECT in ubuntu|ubuntu-dvd) - add_package install ubuntu-minimal ubuntu-standard - add_package install ubuntu-desktop $UNITY_HWE_HINTS + HWE_BUILD="yes" + add_task install minimal standard ubuntu-desktop + add_package install $HWE_X_PACKAGES LIVE_TASK='ubuntu-live' + LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' + KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" case $ARCH in - amd64) add_package live $SIGNED_KERNEL_PACKAGE ;; + amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; esac ;; @@ -220,11 +229,15 @@ case $PROJECT in ;; kubuntu|kubuntu-dvd) + HWE_BUILD="yes" add_task install minimal standard add_task install kubuntu-desktop + add_package install $HWE_X_PACKAGES LIVE_TASK='kubuntu-live' + LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' + KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" case $ARCH in - amd64) add_package live linux-signed-generic ;; + amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; esac COMPONENTS='main restricted universe' add_chroot_hook remove-gnome-icon-cache @@ -259,16 +272,17 @@ case $PROJECT in ;; xubuntu) + HWE_BUILD="yes" add_task install minimal standard xubuntu-desktop + add_package install $HWE_X_PACKAGES add_package install xterm LIVE_TASK='xubuntu-live' + LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' + KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" case $ARCH in - amd64) add_package live linux-signed-generic ;; + amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; esac COMPONENTS='main restricted universe multiverse' - case $ARCH in - amd64|i386) KERNEL_FLAVOURS=generic ;; - esac ;; ubuntu-netbook) @@ -277,45 +291,62 @@ case $PROJECT in ;; mythbuntu) + HWE_BUILD="yes" add_task install minimal standard mythbuntu-desktop + add_package install $HWE_X_PACKAGES LIVE_TASK='mythbuntu-live' + LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' + KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" case $ARCH in - amd64) add_package live linux-signed-generic ;; + amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; esac COMPONENTS='main restricted universe multiverse' ;; lubuntu) + HWE_BUILD="yes" add_task install minimal standard lubuntu-desktop - LIVE_TASK='lubuntu-live' case $ARCH in - amd64) add_package live linux-signed-generic ;; + amd64|i386) add_package install thermald ;; esac - COMPONENTS='main restricted universe multiverse' + add_package install $HWE_X_PACKAGES + LIVE_TASK='lubuntu-live' + LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' + KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" case $ARCH in - amd64|i386) KERNEL_FLAVOURS=generic ;; + amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; esac - + COMPONENTS='main restricted universe multiverse' # The Lubuntu STRUCTURE file has "feature # no-follow-recommends". Mirror this. export APT_OPTIONS="--yes --no-install-recommends" ;; ubuntu-gnome) - add_package install ubuntu-minimal ubuntu-standard - add_package install ubuntu-gnome-desktop $UBUNTUGNOME_HWE_HINTS + HWE_BUILD="yes" + add_task install minimal standard ubuntu-gnome-desktop + add_package install $HWE_X_PACKAGES LIVE_TASK='ubuntu-gnome-live' + LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' + KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" case $ARCH in - amd64) add_package live $SIGNED_KERNEL_PACKAGE ;; + amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; esac COMPONENTS='main restricted universe' ;; ubuntu-mate) + HWE_BUILD="yes" add_task install minimal standard ubuntu-mate-core ubuntu-mate-desktop + case $ARCH in + amd64|i386) add_package install thermald ;; + esac + add_package install $HWE_X_PACKAGES LIVE_TASK='ubuntu-mate-live' + LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' + KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" case $ARCH in - amd64) add_package live linux-signed-generic ;; + amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; esac COMPONENTS='main restricted universe multiverse' # The Ubuntu MATE STRUCTURE file has "feature @@ -324,19 +355,25 @@ case $PROJECT in ;; ubuntustudio-dvd) + HWE_BUILD="yes" add_task install minimal standard ubuntustudio-desktop ubuntustudio-audio ubuntustudio-fonts ubuntustudio-graphics ubuntustudio-video ubuntustudio-publishing ubuntustudio-photography + add_package install $HWE_X_PACKAGES linux-generic-hwe-16.04- COMPONENTS='main restricted universe multiverse' case $ARCH in - amd64|i386) KERNEL_FLAVOURS=lowlatency ;; + amd64|i386) KERNEL_FLAVOURS=lowlatency-hwe-16.04 ;; esac ;; ubuntukylin) + HWE_BUILD="yes" add_task install minimal standard ubuntukylin-desktop + add_package install $HWE_X_PACKAGES add_package install ubuntukylin-default-settings LIVE_TASK='ubuntukylin-live' + LIVE_TASK_FILTER='--not -Pe ^linux-\(headers\|image\|signed\)' + KERNEL_FLAVOURS="$HWE_KERNEL_FLAVOUR" case $ARCH in - amd64) add_package live linux-signed-generic ;; + amd64) add_package live $HWE_SIGNED_KERNEL_PACKAGE ;; esac COMPONENTS='main restricted universe' ;;