From 2db16995b50fb6a657b1cbe72c76d2ac57155497 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Tue, 14 Oct 2025 16:02:56 +0200 Subject: [PATCH 1/3] Disable mandb updates for action --- action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 4135944..4b4e9bc 100644 --- a/action.yml +++ b/action.yml @@ -24,7 +24,13 @@ inputs: runs: using: "composite" steps: - - uses: cvmfs-contrib/github-action-cvmfs@f93ba85417fc145df0f82c672618dc7dd94c1702 # v5.2 + cache name update + - id: disable-mandb + run: | + # avoid processing trigger for man-db (seems to slow down installations) + echo "set man-db/auto-update false" | sudo debconf-communicate + sudo dpkg-reconfigure man-db + - id: install-cvmfs + uses: cvmfs-contrib/github-action-cvmfs@f93ba85417fc145df0f82c672618dc7dd94c1702 # v5.2 + cache name update with: # Can't use config package for macOS but our repos are available with the default configuration anyway # cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb From eb3efa90c034334bcd0013854f64395950398a87 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Tue, 14 Oct 2025 16:05:55 +0200 Subject: [PATCH 2/3] Add missing shell for command --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 4b4e9bc..550a7a8 100644 --- a/action.yml +++ b/action.yml @@ -29,6 +29,7 @@ runs: # avoid processing trigger for man-db (seems to slow down installations) echo "set man-db/auto-update false" | sudo debconf-communicate sudo dpkg-reconfigure man-db + shell: bash - id: install-cvmfs uses: cvmfs-contrib/github-action-cvmfs@f93ba85417fc145df0f82c672618dc7dd94c1702 # v5.2 + cache name update with: From 91986cd59751a9b57e5e44e6fb042055c42906d2 Mon Sep 17 00:00:00 2001 From: Alan O'Cais Date: Tue, 14 Oct 2025 16:12:01 +0200 Subject: [PATCH 3/3] Be more careful --- action.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 550a7a8..bd9b361 100644 --- a/action.yml +++ b/action.yml @@ -26,9 +26,32 @@ runs: steps: - id: disable-mandb run: | - # avoid processing trigger for man-db (seems to slow down installations) - echo "set man-db/auto-update false" | sudo debconf-communicate - sudo dpkg-reconfigure man-db + # Detect macOS (Darwin) and exit safely + if [ "$(uname)" = "Darwin" ]; then + echo "🛑 Skipping man-db disable: not applicable on macOS." + exit 0 + fi + # Proceed only if we're on a Debian/Ubuntu-like Linux + if [ ! -x /usr/bin/dpkg ]; then + echo "⚠️ dpkg not found — this system doesn't use man-db triggers." + exit 0 + fi + # Disable man-db updates (safe even if man-db is not installed) + # 1. Ensure the directory for custom binaries exists + sudo mkdir -p /usr/local/sbin + # 2. If mandb exists, back it up once + if [ -x /usr/bin/mandb ] && [ ! -f /usr/bin/mandb.disabled ]; then + sudo mv /usr/bin/mandb /usr/bin/mandb.disabled + fi + # 3. Replace mandb with a dummy command that does nothing but succeed + if [ ! -e /usr/local/sbin/mandb ]; then + echo -e '#!/bin/sh\nexit 0' | sudo tee /usr/local/sbin/mandb >/dev/null + sudo chmod +x /usr/local/sbin/mandb + fi + # 4. (Optional) Remove man-db’s post-install trigger script if it exists + if [ -f /var/lib/dpkg/info/man-db.postinst ]; then + sudo rm -f /var/lib/dpkg/info/man-db.postinst + fi shell: bash - id: install-cvmfs uses: cvmfs-contrib/github-action-cvmfs@f93ba85417fc145df0f82c672618dc7dd94c1702 # v5.2 + cache name update