aboutsummaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/archangel20
-rw-r--r--installer/lib/common.sh14
2 files changed, 34 insertions, 0 deletions
diff --git a/installer/archangel b/installer/archangel
index f103fe9..aa8eeaa 100755
--- a/installer/archangel
+++ b/installer/archangel
@@ -1269,6 +1269,25 @@ configure_zfs_tools() {
info "Tip: Install sanoid for automated snapshot retention."
}
+configure_tmpfiles_private_tmp() {
+ # On ZFS-on-root, statx() across sibling services' /var/tmp/systemd-private-*/tmp
+ # mounts returns errno 132 (ENOTNAM). Running tmpfiles in its own mount
+ # namespace avoids traversing them. See docs/zfs-tmpfiles-private-tmp-fix.md.
+ step "Isolating systemd-tmpfiles from sibling private-tmp (ZFS)"
+
+ local svc
+ for svc in systemd-tmpfiles-setup systemd-tmpfiles-clean; do
+ install_dropin "$svc" zfs-private-tmp /mnt << 'EOF'
+# ZFS: statx of sibling services' /var/tmp/systemd-private-*/tmp mounts
+# returns errno 132. Running in own namespace avoids traversing them.
+[Service]
+PrivateTmp=yes
+EOF
+ done
+
+ info "systemd-tmpfiles drop-ins installed (PrivateTmp=yes)."
+}
+
sync_efi_partitions() {
# Skip if only one disk
if [[ ${#EFI_PARTS[@]} -le 1 ]]; then
@@ -1496,6 +1515,7 @@ install_zfs() {
configure_zfs_services
configure_pacman_hook
configure_zfs_tools
+ configure_tmpfiles_private_tmp
sync_efi_partitions
create_genesis_snapshot
cleanup
diff --git a/installer/lib/common.sh b/installer/lib/common.sh
index d181e0b..8193b19 100644
--- a/installer/lib/common.sh
+++ b/installer/lib/common.sh
@@ -222,6 +222,20 @@ disk_in_use() {
return 1
}
+# Install a systemd drop-in for $service under $root, reading its body
+# from stdin. Creates $root/etc/systemd/system/$service.service.d/ at
+# mode 755 (idempotent) and writes $dropin_name.conf there. Intended
+# for post-pacstrap customization — pass "/mnt" as root at install
+# time; tests pass a tempdir.
+install_dropin() {
+ local service="$1"
+ local dropin_name="$2"
+ local root="$3"
+ local dir="${root}/etc/systemd/system/${service}.service.d"
+ install -d -m 755 "$dir"
+ cat > "${dir}/${dropin_name}.conf"
+}
+
# List available disks (not in use)
list_available_disks() {
local disks=()