From ab4694e3f5b885738c0db6798ad17fa5cdb6025c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 31 Jan 2026 21:49:07 +0100 Subject: [PATCH] Introduce rc channel --- bin/omarchy-channel-set | 3 ++- bin/omarchy-menu | 3 ++- bin/omarchy-refresh-pacman | 17 +++++++++-------- default/pacman/mirrorlist-rc | 1 + default/pacman/pacman-rc.conf | 30 ++++++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 default/pacman/mirrorlist-rc create mode 100644 default/pacman/pacman-rc.conf diff --git a/bin/omarchy-channel-set b/bin/omarchy-channel-set index 342ee2e2..116539b2 100755 --- a/bin/omarchy-channel-set +++ b/bin/omarchy-channel-set @@ -14,7 +14,7 @@ # and people with a lot of experience managing Linux systems. if (($# == 0)); then - echo "Usage: omarchy-channel-set [stable|edge|dev]" + echo "Usage: omarchy-channel-set [stable|rc|edge|dev]" exit 1 else channel="$1" @@ -22,6 +22,7 @@ fi case "$channel" in "stable") omarchy-branch-set "master" && omarchy-refresh-pacman "stable" && sudo pacman -Suu --noconfirm ;; +"rc") omarchy-branch-set "rc" && omarchy-refresh-pacman "rc" && sudo pacman -Suu --noconfirm ;; "edge") omarchy-branch-set "master" && omarchy-refresh-pacman "edge" ;; "dev") omarchy-branch-set "dev" && omarchy-refresh-pacman "edge" ;; *) echo "Unknown channel: $channel"; exit 1; ;; diff --git a/bin/omarchy-menu b/bin/omarchy-menu index 2ba2fc0c..df71f582 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -506,8 +506,9 @@ show_update_menu() { } show_update_channel_menu() { - case $(menu "Update channel" "🟢 Stable\n🟔 Edge\nšŸ”“ Dev") in + case $(menu "Update channel" "🟢 Stable\n🟔 Release Candidate\n🟠 Edge\nšŸ”“ Dev") in *Stable*) present_terminal "omarchy-channel-set stable" ;; + *Candidate*) present_terminal "omarchy-channel-set rc" ;; *Edge*) present_terminal "omarchy-channel-set edge" ;; *Dev*) present_terminal "omarchy-channel-set dev" ;; *) show_update_menu ;; diff --git a/bin/omarchy-refresh-pacman b/bin/omarchy-refresh-pacman index 3cffd226..49983ccd 100755 --- a/bin/omarchy-refresh-pacman +++ b/bin/omarchy-refresh-pacman @@ -7,17 +7,18 @@ sudo cp -f /etc/pacman.conf /etc/pacman.conf.bak sudo cp -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak -if [[ $1 == "edge" ]]; then - sudo cp -f ~/.local/share/omarchy/default/pacman/pacman-edge.conf /etc/pacman.conf - sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-edge /etc/pacman.d/mirrorlist - echo "Setting channel to edge" -else - sudo cp -f ~/.local/share/omarchy/default/pacman/pacman-stable.conf /etc/pacman.conf - sudo cp -f ~/.local/share/omarchy/default/pacman/mirrorlist-stable /etc/pacman.d/mirrorlist - echo "Setting channel to stable" +channel="${1:-stable}" + +if [[ "$channel" != "stable" && "$channel" != "rc" && "$channel" != "edge" ]]; then + echo "Error: Invalid channel '$channel'. Must be one of: stable, rc, edge" + exit 1 fi +echo "Setting channel to $channel" echo +sudo cp -f "$OMARCHY_PATH/default/pacman/pacman-$channel.conf" /etc/pacman.conf +sudo cp -f "$OMARCHY_PATH/default/pacman/mirrorlist-$channel" /etc/pacman.d/mirrorlist + # Reset all package DBs and then update sudo pacman -Syyu --noconfirm diff --git a/default/pacman/mirrorlist-rc b/default/pacman/mirrorlist-rc new file mode 100644 index 00000000..0692a0a1 --- /dev/null +++ b/default/pacman/mirrorlist-rc @@ -0,0 +1 @@ +Server = https://rc-mirror.omarchy.org/$repo/os/$arch diff --git a/default/pacman/pacman-rc.conf b/default/pacman/pacman-rc.conf new file mode 100644 index 00000000..50d2e498 --- /dev/null +++ b/default/pacman/pacman-rc.conf @@ -0,0 +1,30 @@ +# See the pacman.conf(5) manpage for option and repository directives + +[options] +Color +ILoveCandy +VerbosePkgLists +HoldPkg = pacman glibc +Architecture = auto +CheckSpace +ParallelDownloads = 5 +DownloadUser = alpm + +# By default, pacman accepts packages signed by keys that its local keyring +# trusts (see pacman-key and its man page), as well as unsigned packages. +SigLevel = Required DatabaseOptional +LocalFileSigLevel = Optional + +# pacman searches repositories in the order defined here +[core] +Include = /etc/pacman.d/mirrorlist + +[extra] +Include = /etc/pacman.d/mirrorlist + +[multilib] +Include = /etc/pacman.d/mirrorlist + +[omarchy] +SigLevel = Optional TrustAll +Server = https://pkgs.omarchy.org/edge/$arch