Skip to content
Open
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 .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ jobs:
./bin/sync-rebuilds --self-test
./bin/omarchy-pkgs self-test
./bin/omarchy-release self-test
./tests/settings-docker-retirement.sh
./tests/neovim-remote-clipboard.sh
python tests/neovim-clipboard-tmux.py
./tests/published-build-plan.sh
Expand Down
56 changes: 53 additions & 3 deletions pkgbuilds/omarchy-settings-dev/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ conflicts=('omarchy-settings')
depends=(
'bash'
'curl'
'diffutils'
'gum'
'sudo'
'hicolor-icon-theme'
Expand All @@ -58,17 +59,14 @@ makedepends=(
# scriptlet WILL clobber user edits on each upgrade (documented limitation).
backup=(
'etc/fastfetch/config.jsonc'
'etc/docker/daemon.json'
'etc/gnupg/dirmngr.conf'
'etc/sysctl.d/99-omarchy-sysctl.conf'
'etc/sysctl.d/90-omarchy-file-watchers.conf'
'etc/systemd/logind.conf.d/10-ignore-power-button.conf'
'etc/systemd/logind.conf.d/20-inhibit-delay.conf'
'etc/systemd/resolved.conf.d/10-disable-multicast.conf'
'etc/systemd/resolved.conf.d/20-docker-dns.conf'
'etc/systemd/system.conf.d/10-faster-shutdown.conf'
'etc/systemd/system/user@.service.d/10-faster-shutdown.conf'
'etc/systemd/system/docker.service.d/no-block-boot.conf'
'etc/systemd/system/plocate-updatedb.service.d/ac-only.conf'
'etc/systemd/system.conf.d/20-omarchy-nofile.conf'
'etc/systemd/user.conf.d/20-omarchy-nofile.conf'
Expand Down Expand Up @@ -198,6 +196,30 @@ package() {
# ~/.config/mimeapps.list, and ~/.config/systemd/user can all override these.
install -Dm644 default/uwsm/env.d/10-omarchy "$pkgdir/usr/share/uwsm/env.d/10-omarchy"
install -Dm644 default/environment.d/10-omarchy-fcitx.conf "$pkgdir/usr/lib/environment.d/10-omarchy-fcitx.conf"
if [[ -f default/systemd/user/podman-restart.service.d/10-local.conf ]]; then
install -Dm644 default/systemd/user/podman-restart.service.d/10-local.conf "$pkgdir/usr/lib/systemd/user/podman-restart.service.d/10-local.conf"
fi
# Allow this recipe to build source revisions from before the Podman switch.
if [[ -f default/systemd/user-environment-generators/60-omarchy-podman ]]; then
install -Dm755 default/systemd/user-environment-generators/60-omarchy-podman "$pkgdir/usr/lib/systemd/user-environment-generators/60-omarchy-podman"
# Keep reference copies for conditional retirement after Docker is gone.
local docker_default
for docker_default in \
etc/docker/daemon.json \
etc/systemd/resolved.conf.d/20-docker-dns.conf \
etc/systemd/system/docker.service.d/no-block-boot.conf; do
if [[ -f $docker_default ]]; then
install -Dm644 "$docker_default" "$pkgdir/usr/share/omarchy/retired-docker/$docker_default"
fi
done
fi
# Rootless Docker sources keep a separate authenticated Windows daemon.
if [[ -f default/systemd/user-environment-generators/60-omarchy-rootless-docker ]]; then
install -Dm755 default/systemd/user-environment-generators/60-omarchy-rootless-docker "$pkgdir/usr/lib/systemd/user-environment-generators/60-omarchy-rootless-docker"
fi
if [[ -f default/systemd/system/docker.socket.d/10-omarchy-rootful.conf ]]; then
install -Dm644 default/systemd/system/docker.socket.d/10-omarchy-rootful.conf "$pkgdir/usr/lib/systemd/system/docker.socket.d/10-omarchy-rootful.conf"
fi
install -Dm644 default/fontconfig/conf.avail/50-omarchy.conf "$pkgdir/usr/share/fontconfig/conf.avail/50-omarchy.conf"
install -d "$pkgdir/etc/fonts/conf.d"
ln -sfn /usr/share/fontconfig/conf.avail/50-omarchy.conf "$pkgdir/etc/fonts/conf.d/50-omarchy.conf"
Expand All @@ -210,6 +232,10 @@ package() {
fi
install -Dm644 default/xdg-terminal-exec/hyprland-xdg-terminals.list "$pkgdir/usr/share/xdg-terminal-exec/hyprland-xdg-terminals.list"
install -Dm644 default/applications/mimeapps.list "$pkgdir/usr/share/applications/mimeapps.list"
# Rootless ONCE is optional; ship its unit without enabling it.
if [[ -f default/systemd/user/omarchy-once.service ]]; then
install -Dm644 default/systemd/user/omarchy-once.service "$pkgdir/usr/lib/systemd/user/omarchy-once.service"
fi
install -Dm644 default/systemd/user/bt-agent.service "$pkgdir/usr/lib/systemd/user/bt-agent.service"
install -Dm644 default/systemd/user/omarchy-sleep-lock.service "$pkgdir/usr/lib/systemd/user/omarchy-sleep-lock.service"
install -Dm644 default/systemd/user/omarchy-recover-internal-monitor.service "$pkgdir/usr/lib/systemd/user/omarchy-recover-internal-monitor.service"
Expand Down Expand Up @@ -279,6 +305,17 @@ package() {
# stage separately below).
install -d "$pkgdir/etc"
cp -a etc/. "$pkgdir/etc/"
# Older source revisions still ship Docker defaults. Keep user edits
# protected when building them, without stale entries in Podman packages.
local docker_config
for docker_config in \
'etc/docker/daemon.json' \
'etc/systemd/resolved.conf.d/20-docker-dns.conf' \
'etc/systemd/system/docker.service.d/no-block-boot.conf'; do
if [[ -f $pkgdir/$docker_config ]]; then
backup+=("$docker_config")
fi
done
# omacom/omarchy#13362 moves the HOOKS baseline into its own drop-in.
[[ ! -f $pkgdir/etc/mkinitcpio.conf.d/00-omarchy-hooks.conf ]] ||
backup+=('etc/mkinitcpio.conf.d/00-omarchy-hooks.conf')
Expand Down Expand Up @@ -429,6 +466,19 @@ EOF
# live root config.
install -d "$pkgdir/usr/share/omarchy/default"
cp -a default/. "$pkgdir/usr/share/omarchy/default/"
# Rootless helpers cross privilege boundaries; local source modes and
# ownership must not change the installed trust boundary.
if [[ -d default/docker/rootless ]]; then
local helper_directory helper
for helper_directory in usr usr/share usr/share/omarchy usr/share/omarchy/default usr/share/omarchy/default/docker usr/share/omarchy/default/docker/rootless; do
chmod 0755 "$pkgdir/$helper_directory"
chown 0:0 "$pkgdir/$helper_directory"
done
for helper in migrate.py rootful-listeners.py volume-manifest.py; do
install -m 0644 "default/docker/rootless/$helper" "$pkgdir/usr/share/omarchy/default/docker/rootless/$helper"
chown 0:0 "$pkgdir/usr/share/omarchy/default/docker/rootless/$helper"
done
fi
# Snapper config template used by the install-time `snapper create-config`.
install -Dm644 default/snapper/root \
"$pkgdir/etc/snapper/config-templates/omarchy"
Expand Down
31 changes: 31 additions & 0 deletions pkgbuilds/omarchy-settings-dev/omarchy-settings-dev.install
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,36 @@ _etc_overrides_apply() {
fi
}

# These defaults remain package-owned so upgrades preserve Docker's live
# configuration until its workload migration succeeds. Retire them only for
# Podman sources without the real engine, including later package reinstalls.
_docker_defaults_retire() {
[[ -f /usr/lib/systemd/user-environment-generators/60-omarchy-podman ]] || return 0
local provider
if provider=$(pacman -Qq docker 2>/dev/null); then
# Virtual dependencies can resolve to docker-git or another real engine.
[[ $provider == "podman-docker" ]] || return 0
else
# A failed database read is not evidence that the engine was removed.
pacman -Qq >/dev/null 2>&1 || return 0
fi

local relative active reference
for relative in \
etc/docker/daemon.json \
etc/systemd/resolved.conf.d/20-docker-dns.conf \
etc/systemd/system/docker.service.d/no-block-boot.conf; do
active="/$relative"
reference="/usr/share/omarchy/retired-docker/$relative"
[[ -f $reference && ( -f $active || -L $active ) ]] || continue
if cmp -s -- "$active" "$reference"; then
rm -f -- "$active" || return 1
else
mv -T --backup=numbered -- "$active" "$active.before-podman" || return 1
fi
done
}

post_install() {
local status=0
# Recover the grant lifecycle before optional configuration work, so a
Expand All @@ -129,6 +159,7 @@ post_install() {
status=1
}
_etc_overrides_apply || status=1
_docker_defaults_retire || status=1
return "$status"
}

Expand Down
42 changes: 42 additions & 0 deletions pkgbuilds/omarchy-settings/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ conflicts=('omarchy-settings-dev')
depends=(
'bash'
'curl'
'diffutils'
'gum'
'sudo'
'hicolor-icon-theme'
Expand Down Expand Up @@ -203,6 +204,30 @@ package() {
# ~/.config/mimeapps.list, and ~/.config/systemd/user can all override these.
install -Dm644 default/uwsm/env.d/10-omarchy "$pkgdir/usr/share/uwsm/env.d/10-omarchy"
install -Dm644 default/environment.d/10-omarchy-fcitx.conf "$pkgdir/usr/lib/environment.d/10-omarchy-fcitx.conf"
if [[ -f default/systemd/user/podman-restart.service.d/10-local.conf ]]; then
install -Dm644 default/systemd/user/podman-restart.service.d/10-local.conf "$pkgdir/usr/lib/systemd/user/podman-restart.service.d/10-local.conf"
fi
# Older pinned releases still use Docker and do not contain this generator.
if [[ -f default/systemd/user-environment-generators/60-omarchy-podman ]]; then
install -Dm755 default/systemd/user-environment-generators/60-omarchy-podman "$pkgdir/usr/lib/systemd/user-environment-generators/60-omarchy-podman"
# Keep reference copies for conditional retirement after Docker is gone.
local docker_default
for docker_default in \
etc/docker/daemon.json \
etc/systemd/resolved.conf.d/20-docker-dns.conf \
etc/systemd/system/docker.service.d/no-block-boot.conf; do
if [[ -f $docker_default ]]; then
install -Dm644 "$docker_default" "$pkgdir/usr/share/omarchy/retired-docker/$docker_default"
fi
done
fi
# Rootless Docker sources keep a separate authenticated Windows daemon.
if [[ -f default/systemd/user-environment-generators/60-omarchy-rootless-docker ]]; then
install -Dm755 default/systemd/user-environment-generators/60-omarchy-rootless-docker "$pkgdir/usr/lib/systemd/user-environment-generators/60-omarchy-rootless-docker"
fi
if [[ -f default/systemd/system/docker.socket.d/10-omarchy-rootful.conf ]]; then
install -Dm644 default/systemd/system/docker.socket.d/10-omarchy-rootful.conf "$pkgdir/usr/lib/systemd/system/docker.socket.d/10-omarchy-rootful.conf"
fi
install -Dm644 default/fontconfig/conf.avail/50-omarchy.conf "$pkgdir/usr/share/fontconfig/conf.avail/50-omarchy.conf"
install -d "$pkgdir/etc/fonts/conf.d"
ln -sfn /usr/share/fontconfig/conf.avail/50-omarchy.conf "$pkgdir/etc/fonts/conf.d/50-omarchy.conf"
Expand All @@ -215,6 +240,10 @@ package() {
fi
install -Dm644 default/xdg-terminal-exec/hyprland-xdg-terminals.list "$pkgdir/usr/share/xdg-terminal-exec/hyprland-xdg-terminals.list"
install -Dm644 default/applications/mimeapps.list "$pkgdir/usr/share/applications/mimeapps.list"
# Rootless ONCE is optional; ship its unit without enabling it.
if [[ -f default/systemd/user/omarchy-once.service ]]; then
install -Dm644 default/systemd/user/omarchy-once.service "$pkgdir/usr/lib/systemd/user/omarchy-once.service"
fi
install -Dm644 default/systemd/user/bt-agent.service "$pkgdir/usr/lib/systemd/user/bt-agent.service"
install -Dm644 default/systemd/user/omarchy-sleep-lock.service "$pkgdir/usr/lib/systemd/user/omarchy-sleep-lock.service"
install -Dm644 default/systemd/user/omarchy-recover-internal-monitor.service "$pkgdir/usr/lib/systemd/user/omarchy-recover-internal-monitor.service"
Expand Down Expand Up @@ -437,6 +466,19 @@ EOF
# live root config.
install -d "$pkgdir/usr/share/omarchy/default"
cp -a default/. "$pkgdir/usr/share/omarchy/default/"
# Rootless helpers cross privilege boundaries; local source modes and
# ownership must not change the installed trust boundary.
if [[ -d default/docker/rootless ]]; then
local helper_directory helper
for helper_directory in usr usr/share usr/share/omarchy usr/share/omarchy/default usr/share/omarchy/default/docker usr/share/omarchy/default/docker/rootless; do
chmod 0755 "$pkgdir/$helper_directory"
chown 0:0 "$pkgdir/$helper_directory"
done
for helper in migrate.py rootful-listeners.py volume-manifest.py; do
install -m 0644 "default/docker/rootless/$helper" "$pkgdir/usr/share/omarchy/default/docker/rootless/$helper"
chown 0:0 "$pkgdir/usr/share/omarchy/default/docker/rootless/$helper"
done
fi
# Snapper config template used by the install-time `snapper create-config`.
install -Dm644 default/snapper/root \
"$pkgdir/etc/snapper/config-templates/omarchy"
Expand Down
31 changes: 31 additions & 0 deletions pkgbuilds/omarchy-settings/omarchy-settings.install
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,36 @@ _etc_overrides_apply() {
fi
}

# These defaults remain package-owned so upgrades preserve Docker's live
# configuration until its workload migration succeeds. Retire them only for
# Podman sources without the real engine, including later package reinstalls.
_docker_defaults_retire() {
[[ -f /usr/lib/systemd/user-environment-generators/60-omarchy-podman ]] || return 0
local provider
if provider=$(pacman -Qq docker 2>/dev/null); then
# Virtual dependencies can resolve to docker-git or another real engine.
[[ $provider == "podman-docker" ]] || return 0
else
# A failed database read is not evidence that the engine was removed.
pacman -Qq >/dev/null 2>&1 || return 0
fi

local relative active reference
for relative in \
etc/docker/daemon.json \
etc/systemd/resolved.conf.d/20-docker-dns.conf \
etc/systemd/system/docker.service.d/no-block-boot.conf; do
active="/$relative"
reference="/usr/share/omarchy/retired-docker/$relative"
[[ -f $reference && ( -f $active || -L $active ) ]] || continue
if cmp -s -- "$active" "$reference"; then
rm -f -- "$active" || return 1
else
mv -T --backup=numbered -- "$active" "$active.before-podman" || return 1
fi
done
}

post_install() {
local status=0
# Recover the grant lifecycle before optional configuration work, so a
Expand All @@ -129,6 +159,7 @@ post_install() {
status=1
}
_etc_overrides_apply || status=1
_docker_defaults_retire || status=1
return "$status"
}

Expand Down
3 changes: 3 additions & 0 deletions pkgbuilds/once/.omarchy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"source": "local"
}
42 changes: 42 additions & 0 deletions pkgbuilds/once/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# ONCE with the rootless local proxy and Podman archive compatibility fixes.
pkgname=once
pkgver=0.3.2
pkgrel=1
pkgdesc='Manage self-hosted web applications with rootless Omarchy integration'
arch=('x86_64' 'aarch64')
url='https://github.com/basecamp/once'
license=('MIT')
makedepends=('go' 'patch')
optdepends=('docker: Docker Engine backend' 'podman: Podman backend')
provides=("once-bin=$pkgver")
conflicts=('once-bin')
options=('!lto' '!debug')
source=("once-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
'rootless.patch'
'once-background.service')
sha256sums=('24c676395cba262c374bcecf1556d0eecfb0c3497554a572fe3ed4f527d20357'
'ba449102a83d8d7ac315a873b61f2acaa366e8720cb7088366ec9c502324f959'
'aa314fe79677eb5f120fcc3d4c42007a93ff7b1ef917382c0c1fdca5633ad46a')

prepare() {
cd "once-$pkgver"
patch -Np1 -i "$srcdir/rootless.patch"
}

build() {
cd "once-$pkgver"
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X github.com/basecamp/once/internal/version.Version=v$pkgver-omarchy1" -o once ./cmd/once
}

check() {
cd "once-$pkgver"
go test ./internal/...
}

package() {
cd "once-$pkgver"
install -Dm755 once "$pkgdir/usr/bin/once"
install -Dm644 MIT-LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Preserve the legacy unit for users who explicitly retain rootful ONCE.
install -Dm644 "$srcdir/once-background.service" "$pkgdir/usr/lib/systemd/system/once-background.service"
}
13 changes: 13 additions & 0 deletions pkgbuilds/once/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Rootless ONCE package

This source build is based on the checksum-pinned upstream ONCE v0.3.2 archive. It provides `once-bin` for existing menu/package checks and conflicts with that vendor binary package. It does not install or enable an engine, change host sysctls, or enable the legacy system service.

`rootless.patch` contains the integration fixes required by both container proposals:

- `ONCE_ROOTLESS=1` selects loopback HTTP 8080 / HTTPS 8443, validates existing proxy bindings, and configures low ports only inside the private network namespaces of ONCE-created containers.
- Backups normalize Docker's `storage/...` and Podman's `/...` archive entries to the same `data/...` format, including hard links. Restore targets the mounted volume directly instead of the unstarted temporary container's root filesystem. Unexpected paths are rejected, including archives produced by the broken unpatched Podman path.
- Exec results wait for `Running=false` before interpreting the final exit code.

The resulting binary identifies as `v0.3.2-omarchy1`. Omarchy's launcher requires that build and disables binary self-update. The patch and its Go regression tests should be reevaluated against every upstream release; remove downstream changes once upstream supplies the same behavior. This is not a claim that the unmodified vendor binary supports rootless Podman.

`makepkg` builds the binary and runs upstream's internal unit suite plus the regression tests. Real Writebook lifecycle validation belongs in Omarchy Lab; a passing package build alone does not establish engine compatibility. The preserved system unit exists only for explicitly retained legacy deployments. New installations use `omarchy-once.service` in the user manager.
13 changes: 13 additions & 0 deletions pkgbuilds/once/once-background.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Once background tasks (once)
After=network.target docker.service

[Service]
Type=simple
Environment=ONCE_NO_SELF_UPDATE=1
ExecStart=/usr/bin/once background run --namespace once
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
Loading
Loading