From b45cad12b41e79ae5dbf8eb2bfde1104b9a2bc4d Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 20 Dec 2023 11:34:13 -0800 Subject: [PATCH] Ship static files instead of generating in a hook When the files we're creating in the live layer have static content, ship them in live-build/ubuntu/includes.chroot.minimal.standard.live instead of generating them from live-build/ubuntu/hooks/020-ubuntu-live.chroot_early. Also fixes the fact that live-build/ubuntu/hooks/020-ubuntu-live.chroot_early was incorrectly writing to /root in the previous upload instead of /usr. --- debian/changelog | 11 ++++++ .../ubuntu/hooks/020-ubuntu-live.chroot_early | 36 ------------------- .../etc/initramfs-tools/conf.d/casperize.conf | 1 + .../ubuntu-desktop-installer.service | 1 + .../user/ubuntu-desktop-installer.service | 15 ++++++++ .../glib-2.0/schemas/casper.gschema.override | 12 +++++++ 6 files changed, 40 insertions(+), 36 deletions(-) create mode 100644 live-build/ubuntu/includes.chroot.minimal.standard.live/etc/initramfs-tools/conf.d/casperize.conf create mode 120000 live-build/ubuntu/includes.chroot.minimal.standard.live/etc/systemd/user/graphical-session.target.wants/ubuntu-desktop-installer.service create mode 100644 live-build/ubuntu/includes.chroot.minimal.standard.live/usr/lib/systemd/user/ubuntu-desktop-installer.service create mode 100644 live-build/ubuntu/includes.chroot.minimal.standard.live/usr/share/glib-2.0/schemas/casper.gschema.override diff --git a/debian/changelog b/debian/changelog index 0b3ce7dc..bc591994 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +livecd-rootfs (24.04.14) UNRELEASED; urgency=medium + + * When the files we're creating in the live layer have static content, + ship them in live-build/ubuntu/includes.chroot.minimal.standard.live + instead of generating them from + live-build/ubuntu/hooks/020-ubuntu-live.chroot_early. Also fixes the + fact that live-build/ubuntu/hooks/020-ubuntu-live.chroot_early was + incorrectly writing to /root in the previous upload instead of /usr. + + -- Steve Langasek Wed, 20 Dec 2023 11:26:08 -0800 + livecd-rootfs (24.04.13) noble; urgency=medium * Drop support for building armhf+raspi images; as of noble these are diff --git a/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early b/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early index 905cac96..1894fcc5 100755 --- a/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early +++ b/live-build/ubuntu/hooks/020-ubuntu-live.chroot_early @@ -10,44 +10,8 @@ case ${PASS:-} in ;; esac -cat < /etc/initramfs-tools/conf.d/casperize.conf -export CASPER_GENERATE_UUID=1 -EOF - cat < /etc/initramfs-tools/conf.d/default-layer.conf LAYERFS_PATH=${PASS}.squashfs EOF -# change settings to have an 'installer only' session by default -printf "[org.gnome.desktop.a11y]\nalways-show-universal-access-status=true\n" \ - >> /usr/share/glib-2.0/schemas/casper.gschema.override -# we can't unload the dock because the shell would enter the overview on login; -# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1788 -printf "[org.gnome.shell.extensions.dash-to-dock:ubuntu]\ndock-fixed=false\nintellihide=false\n" \ - >> /root/usr/share/glib-2.0/schemas/casper.gschema.override -printf "[org.gnome.shell]\ndisabled-extensions=['ding@rastersoft.com']\n" \ - >> /root/usr/share/glib-2.0/schemas/casper.gschema.override - glib-compile-schemas /usr/share/glib-2.0/schemas/ -# start the installer on session start, restore normal session on close - -cat > /usr/lib/systemd/user/ubuntu-desktop-installer.service << EOF - -[Unit] -Description=Ubuntu Desktop Installer -PartOf=graphical-session.target -After=graphical-session.target - -# Never run in GDM -Conflicts=gnome-session@gnome-login.target - -[Service] -Type=oneshot -ExecStart=/snap/bin/ubuntu-desktop-installer --try-or-install -ExecStopPost=sh -c "gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed true; gsettings set org.gnome.shell.extensions.dash-to-dock intellihide true; gnome-extensions enable ding@rastersoft.com" -Restart=no -EOF - -mkdir /etc/systemd/user/graphical-session.target.wants/ -ln -s /usr/lib/systemd/user/ubuntu-desktop-installer.service \ - /etc/systemd/user/graphical-session.target.wants/ diff --git a/live-build/ubuntu/includes.chroot.minimal.standard.live/etc/initramfs-tools/conf.d/casperize.conf b/live-build/ubuntu/includes.chroot.minimal.standard.live/etc/initramfs-tools/conf.d/casperize.conf new file mode 100644 index 00000000..bd31c96a --- /dev/null +++ b/live-build/ubuntu/includes.chroot.minimal.standard.live/etc/initramfs-tools/conf.d/casperize.conf @@ -0,0 +1 @@ +export CASPER_GENERATE_UUID=1 diff --git a/live-build/ubuntu/includes.chroot.minimal.standard.live/etc/systemd/user/graphical-session.target.wants/ubuntu-desktop-installer.service b/live-build/ubuntu/includes.chroot.minimal.standard.live/etc/systemd/user/graphical-session.target.wants/ubuntu-desktop-installer.service new file mode 120000 index 00000000..aebba6d4 --- /dev/null +++ b/live-build/ubuntu/includes.chroot.minimal.standard.live/etc/systemd/user/graphical-session.target.wants/ubuntu-desktop-installer.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/ubuntu-desktop-installer.service \ No newline at end of file diff --git a/live-build/ubuntu/includes.chroot.minimal.standard.live/usr/lib/systemd/user/ubuntu-desktop-installer.service b/live-build/ubuntu/includes.chroot.minimal.standard.live/usr/lib/systemd/user/ubuntu-desktop-installer.service new file mode 100644 index 00000000..00fa4649 --- /dev/null +++ b/live-build/ubuntu/includes.chroot.minimal.standard.live/usr/lib/systemd/user/ubuntu-desktop-installer.service @@ -0,0 +1,15 @@ +# start the installer on session start, restore normal session on close + +[Unit] +Description=Ubuntu Desktop Installer +PartOf=graphical-session.target +After=graphical-session.target + +# Never run in GDM +Conflicts=gnome-session@gnome-login.target + +[Service] +Type=oneshot +ExecStart=/snap/bin/ubuntu-desktop-installer --try-or-install +ExecStopPost=sh -c "gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed true; gsettings set org.gnome.shell.extensions.dash-to-dock intellihide true; gnome-extensions enable ding@rastersoft.com" +Restart=no diff --git a/live-build/ubuntu/includes.chroot.minimal.standard.live/usr/share/glib-2.0/schemas/casper.gschema.override b/live-build/ubuntu/includes.chroot.minimal.standard.live/usr/share/glib-2.0/schemas/casper.gschema.override new file mode 100644 index 00000000..1213c5ab --- /dev/null +++ b/live-build/ubuntu/includes.chroot.minimal.standard.live/usr/share/glib-2.0/schemas/casper.gschema.override @@ -0,0 +1,12 @@ +# change settings to have an 'installer only' session by default +[org.gnome.desktop.a11y] +always-show-universal-access-status=true + +# we can't unload the dock because the shell would enter the overview on login; +# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1788 +[org.gnome.shell.extensions.dash-to-dock:ubuntu] +dock-fixed=false +intellihide=false + +[org.gnome.shell] +disabled-extensions=['ding@rastersoft.com']