From 742e601bafc2e3bf2397110adc27ce8f6765b459 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 27 Aug 2025 12:06:08 +0200 Subject: [PATCH] Pinning packages when one goes bad (#1162) * Don't update system packages to prevent issues from something too new at the wrong time * Add system to pin and ignore bad packages To deal with the abseil-cpp issue --- bin/omarchy-pkg-ignored | 7 +++++++ bin/omarchy-pkg-pinned | 7 +++++++ bin/omarchy-update-system-pkgs | 4 ++-- install.sh | 1 + install/packages.ignored | 1 + install/packages.pinned | 1 + install/packaging/pins.sh | 13 +++++++++++++ migrations/1756284863.sh | 3 +++ 8 files changed, 35 insertions(+), 2 deletions(-) create mode 100755 bin/omarchy-pkg-ignored create mode 100755 bin/omarchy-pkg-pinned create mode 100644 install/packages.ignored create mode 100644 install/packages.pinned create mode 100644 install/packaging/pins.sh create mode 100644 migrations/1756284863.sh diff --git a/bin/omarchy-pkg-ignored b/bin/omarchy-pkg-ignored new file mode 100755 index 0000000..765fe69 --- /dev/null +++ b/bin/omarchy-pkg-ignored @@ -0,0 +1,7 @@ +#!/bin/bash + +IGNORED_PACKAGES_FILE="$OMARCHY_PATH/install/packages.ignored" + +if [[ -f $IGNORED_PACKAGES_FILE ]]; then + tr '\r\n' ',' <"$IGNORED_PACKAGES_FILE" | sed 's/,$//' +fi diff --git a/bin/omarchy-pkg-pinned b/bin/omarchy-pkg-pinned new file mode 100755 index 0000000..16d0df1 --- /dev/null +++ b/bin/omarchy-pkg-pinned @@ -0,0 +1,7 @@ +#!/bin/bash + +PINNED_PACKAGES_FILE=$OMARCHY_PATH/install/packages.pinned + +if [[ -f $PINNED_PACKAGES_FILE ]]; then + tr '\r\n' ',' <"$PINNED_PACKAGES_FILE" | sed 's/,$//' +fi diff --git a/bin/omarchy-update-system-pkgs b/bin/omarchy-update-system-pkgs index e3a12fa..7f01790 100755 --- a/bin/omarchy-update-system-pkgs +++ b/bin/omarchy-update-system-pkgs @@ -1,8 +1,8 @@ #!/bin/bash echo -e "\e[32m\nUpdate system packages\e[0m" -sudo pacman -Syu --noconfirm -echo +echo "sudo pacman -Syu --noconfirm --ignore \"$(omarchy-pkg-ignored)\"" +sudo pacman -Syu --noconfirm --ignore "$(omarchy-pkg-ignored)" if omarchy-pkg-aur-accessible; then echo -e "\e[32m\nUpdate AUR packages\e[0m" diff --git a/install.sh b/install.sh index 794aad4..00f8786 100755 --- a/install.sh +++ b/install.sh @@ -22,6 +22,7 @@ source $OMARCHY_INSTALL/packaging/fonts.sh source $OMARCHY_INSTALL/packaging/lazyvim.sh source $OMARCHY_INSTALL/packaging/webapps.sh source $OMARCHY_INSTALL/packaging/tuis.sh +source $OMARCHY_INSTALL/packaging/pins.sh # Configuration source $OMARCHY_INSTALL/config/config.sh diff --git a/install/packages.ignored b/install/packages.ignored new file mode 100644 index 0000000..0b612e3 --- /dev/null +++ b/install/packages.ignored @@ -0,0 +1 @@ +abseil-cpp diff --git a/install/packages.pinned b/install/packages.pinned new file mode 100644 index 0000000..f349af9 --- /dev/null +++ b/install/packages.pinned @@ -0,0 +1 @@ +https://pkgs.omarchy.org/x86_64/abseil-cpp-20250512.1-1-x86_64.pkg.tar.zst diff --git a/install/packaging/pins.sh b/install/packaging/pins.sh new file mode 100644 index 0000000..bacb616 --- /dev/null +++ b/install/packaging/pins.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# We pin explicit packages that are bad upstream here +pinned_packages=$(omarchy-pkg-pinned) + +if [[ -n $pinned_packages ]]; then + echo -e "\e[32m\nInstall pinned system packages\e[0m" + + for pinned in $pinned_packages; do + echo "sudo pacman -U --noconfirm $pinned" + sudo pacman -U --noconfirm $pinned + done +fi diff --git a/migrations/1756284863.sh b/migrations/1756284863.sh new file mode 100644 index 0000000..3e1308b --- /dev/null +++ b/migrations/1756284863.sh @@ -0,0 +1,3 @@ +echo "Pin abseil-cpp as the latest package is broken" + +sudo pacman -U --noconfirm https://archive.archlinux.org/packages/u/uwsm/uwsm-0.23.0-1-any.pkg.tar.zst