Skip to content

Commit b28c3b0

Browse files
committed
Merge remote-tracking branch 'origin/pr/575'
* origin/pr/575: archlinux: remove static /home and /usr/local entries archlinux: install qubes version of /etc/fstab archlinux: /proc/xen is not relevant anymore Pull request description: The custom persist feature relies on /home etc not being in /etc/fstab anymore. See commit messages for details. Fixes QubesOS/qubes-issues#9975
2 parents 2453e15 + aff3c5c commit b28c3b0

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
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: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ pre_install() {
3434
cp /etc/fstab /var/lib/qubes/fstab.orig
3535
fi
3636

37-
# Add qubes core related fstab entries
38-
echo "xen /proc/xen xenfs defaults 0 0" >> /etc/fstab
39-
4037
usermod -L root
4138
usermod -L user
4239
}
@@ -88,8 +85,19 @@ update_qubesconfig() {
8885
mount /usr/local || :
8986
fi
9087

91-
# Fix fstab update to core-agent-linux 4.0.33
92-
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
92+
93+
# Fix fstab update to core-agent-linux 4.3.19
94+
if grep -q '/rw/home\|/rw/usrlocal' /etc/fstab; then
95+
sed -i \
96+
-e '/# Template Binds/d' \
97+
-e '/\/rw\/home/d' \
98+
-e '/\/rw\/usrlocal/d' \
99+
/etc/fstab
100+
fi
93101

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

0 commit comments

Comments
 (0)