diff --git a/mkosi.extra/usr/bin/_kdeos-overlay b/mkosi.extra/usr/bin/_kdeos-overlay index e810857..bf005e9 100755 --- a/mkosi.extra/usr/bin/_kdeos-overlay +++ b/mkosi.extra/usr/bin/_kdeos-overlay @@ -37,6 +37,9 @@ mount -v \ mount -v \ -o rw,subvol=@root \ "$rootdisk" "${sysroot}/root" +mount -v \ + -o rw,subvol=@snap \ + "$rootdisk" "${sysroot}/snap" mount -v \ -o rw,subvol=@locale \ "$rootdisk" "${sysroot}/usr/lib/locale" @@ -48,8 +51,5 @@ mount -v \ -t overlay \ -o "rw,lowerdir=${sysroot}/var,upperdir=${sysroot}/system/@var-overlay/upper,workdir=${sysroot}/system/@var-overlay/work,index=off,metacopy=off" \ overlay "${sysroot}/var" -mount -v \ - -o rw,subvol=@snap \ - "$rootdisk" "${sysroot}/var/lib/snapd/snap" # TODO: should we maybe also mount /etc into the initrd /etc so we have early access to fstab and the like diff --git a/mkosi.postinst.chroot b/mkosi.postinst.chroot index 8c6b74b..28d6a41 100755 --- a/mkosi.postinst.chroot +++ b/mkosi.postinst.chroot @@ -7,7 +7,7 @@ set -ex env mkdir --mode 0700 /system # for the kdeos-overlay.service -ln -s var/lib/snapd/snap /snap # for snapd +mkdir /snap # for snapd (will get a subvolume mounted into that snapd then mounts the snaps into) export SYSTEMD_ESP_PATH="$BOOT_MNT" mkdir --mode 0700 "$SYSTEMD_ESP_PATH" @@ -60,12 +60,12 @@ pacman --noconfirm --upgrade /tmp/yay-build/yay/*.pkg.tar.* pacman --noconfirm --sync libinih libnsl liburcu lzo python apparmor autoconf-archive go-tools python-docutils squashfs-tools xfsprogs # For build deps for systemd-bootchart pacman --noconfirm --sync intltool docbook-xsl -# FIXME: something breaks with snap-confines setuid bit, it doesn't arrive in the final image su - builder -c "yay --noconfirm --sync --sudo /bin/true snapd steam-devices-git systemd-bootchart" pacman --noconfirm --upgrade /home/builder/.cache/yay/snapd/*.pkg.tar.* pacman --noconfirm --upgrade /home/builder/.cache/yay/steam-devices-git/*.pkg.tar.* pacman --noconfirm --upgrade /home/builder/.cache/yay/systemd-bootchart/*.pkg.tar.* touch /var/lib/snapd/apparmor/snap-confine/.keep # this has been gotten lost in the past for unknown reasons +ln -s /snap /var/lib/snapd/snap # try to reconcile different default locations for snap mounts by making the arch path a symlink to the canonical one userdel --remove builder rm /etc/sudoers.d/builder rm -rf /home/builder