Skip to content

Commit 66c561e

Browse files
committed
archlinux: install qubes version of /etc/fstab
Install it as /etc/fstab, and replace the original in post-install hook, but only if it wasn't qubes one already. This way, user modifications are not overridden. QubesOS/qubes-issues#9975
1 parent 24adc1a commit 66c561e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

archlinux/PKGBUILD.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ package_qubes-vm-core() {
100100
make -C qubes-rpc/kde DESTDIR="$pkgdir" install
101101
make -C qubes-rpc/nautilus DESTDIR="$pkgdir" install
102102
make -C qubes-rpc/thunar DESTDIR="$pkgdir" install
103+
make -C filesystem DESTDIR="$pkgdir" install
104+
105+
# Adjust fstab for Arch
106+
mv "$pkgdir/etc/fstab" "$pkgdir/etc/fstab.qubes"
107+
echo "
108+
# This MUST be a ramfs, not a tmpfs! The data here is incredibly sensitive
109+
# (allows root access) and must not be leaked to disk.
110+
tmpfs /etc/pacman.d/gnupg/private-keys-v1.d ramfs defaults,noexec,nosuid,nodev,mode=600 0 0" >> "$pkgdir/etc/fstab.qubes"
103111

104112
# Install systemd script allowing to automount /lib/modules
105113
install -m 644 "archlinux/PKGBUILD.qubes-ensure-lib-modules.service" "${pkgdir}/usr/lib/systemd/system/qubes-ensure-lib-modules.service"

archlinux/PKGBUILD.install

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ update_qubesconfig() {
8585
mount /usr/local || :
8686
fi
8787

88-
# Fix fstab update to core-agent-linux 4.0.33
89-
grep -F -q "/rw/usrlocal" /etc/fstab || sed "/\/rw\/home/a\/rw\/usrlocal \/usr\/local none noauto,bind,defaults 0 0" -i /etc/fstab
88+
# Install qubes version of fstab
89+
if ! grep -q dmroot /etc/fstab; then
90+
cp -f /etc/fstab.qubes /etc/fstab
91+
fi
9092

9193
#/usr/lib/qubes/update-proxy-configs
9294
# Archlinux pacman configuration is handled in update_finalize

0 commit comments

Comments
 (0)