Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/omamobile-omarchy/install
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ for f in patches/*.patch; do
install -Dm644 "$f" "$d/usr/share/omamobile/omarchy/patches/${f##*/}"
done
install -Dm644 zram/91-omamobile.conf "$d/usr/lib/systemd/zram-generator.conf.d/91-omamobile.conf"
install -Dm644 tmpfiles/omamobile-run.conf "$d/usr/lib/tmpfiles.d/omamobile-run.conf"
install -Dm644 libalpm/95-omamobile-omarchy-patches.hook "$d/usr/share/libalpm/hooks/95-omamobile-omarchy-patches.hook"
install -Dm644 LICENSE "$d/usr/share/licenses/omamobile-omarchy/LICENSE"
install -Dm644 LICENSE.omarchy "$d/usr/share/licenses/omamobile-omarchy/omarchy-MIT"
Expand Down
3 changes: 2 additions & 1 deletion packages/omamobile-omarchy/test/all
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fail() { printf 'not ok - %s\n' "$1" >&2; exit 1; }
pass() { printf 'ok - %s\n' "$1"; }

for f in install omamobile-omarchy.install lib/update-bin/* lib/lock-pam lib/modules-cleanup test/update.sh \
test/lock-pam.sh test/lock-glance test/sleep-lock.sh test/modules-cleanup.sh test/zram.sh; do
test/lock-pam.sh test/lock-glance test/sleep-lock.sh test/modules-cleanup.sh test/zram.sh test/run-mode.sh; do
bash -n "$f" || fail "$f parses"
done
for f in bin/omamobile-omarchy-patches bin/omamobile-update test/patches.py; do
Expand Down Expand Up @@ -64,6 +64,7 @@ fi
pass "install stages the module cleanup, its timer's wants link and the drop-in for Arch's"
bash test/modules-cleanup.sh || fail "modules-cleanup"
bash test/zram.sh || fail "zram drop-in"
bash test/run-mode.sh || fail "the /run mode rule"

# Every patch file says what it is for, before its first diff
for p in patches/*.patch; do
Expand Down
26 changes: 26 additions & 0 deletions packages/omamobile-omarchy/test/run-mode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# tmpfiles/omamobile-run.conf: the staged file, and, where systemd-tmpfiles
# can run on a made-up root (--root), that it takes a 1777 /run to 0755 and
# leaves what is in it alone. Nothing on this machine's /run is touched.
set -euo pipefail
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.."
fail() { printf 'not ok - %s\n' "$1" >&2; exit 1; }
pass() { printf 'ok - %s\n' "$1"; }
t=$(mktemp -d); trap 'rm -rf "$t"' EXIT

./install "$t/stage" >/dev/null
f=$t/stage/usr/lib/tmpfiles.d/omamobile-run.conf
[[ -f $f ]] || fail "the /run rule is staged in usr/lib/tmpfiles.d, where pacman's tmpfiles hook looks"
[[ $(grep -vE '^[[:space:]]*(#|$)' "$f") == "z /run 0755 root root - -" ]] || fail "one rule: z /run 0755 root root"
pass "the /run rule is staged: z /run 0755 root root"

if command -v systemd-tmpfiles >/dev/null && [[ $(id -u) == 0 ]]; then
mkdir -p "$t/root/run/keep"; chmod 1777 "$t/root/run"; chmod 0700 "$t/root/run/keep"
systemd-tmpfiles --root="$t/root" --create "$f" || fail "systemd-tmpfiles accepts the rule"
[[ $(stat -c %a "$t/root/run") == 755 ]] || fail "a 1777 /run becomes 0755 (got $(stat -c %a "$t/root/run"))"
[[ $(stat -c %a "$t/root/run/keep") == 700 ]] || fail "what is in /run keeps its mode"
pass "systemd-tmpfiles takes a 1777 /run to 0755 and leaves its contents alone"
else
pass "systemd-tmpfiles takes a 1777 /run to 0755 # SKIP needs root and systemd-tmpfiles"
fi
10 changes: 10 additions & 0 deletions packages/omamobile-omarchy/tmpfiles/omamobile-run.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SPDX-License-Identifier: MIT
# /run is 0755, as systemd mounts it. Boot images from before 2026-11-11
# (#437) mounted it with tmpfs's default, 1777, and Omarchy 4.5 refuses to
# work under a /run anyone can write: its sudo migration (1788163635) stops
# `omarchy update`, and its pacman hooks abort later transactions (#447).
# A new boot image only helps after a restart, and only where a device
# package carries one. This line is applied by pacman's own tmpfiles hook in
# the transaction that installs it, before Omarchy's migrations run, and at
# every boot.
z /run 0755 root root - -
2 changes: 1 addition & 1 deletion packages/omamobile-omarchy/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.43
0.1.44