From 68aaaadb5e6f615c3054bca8b9768de7d5746c17 Mon Sep 17 00:00:00 2001 From: Twangboy Date: Thu, 10 Sep 2026 16:24:04 -0600 Subject: [PATCH 1/2] fix(bootstrap): create per-role systemd units in install_arch_linux_onedir_post() install_arch_linux_onedir_post() only ever created and enabled a hardcoded salt-minion.service unit. install_arch_linux_restart_daemons() and install_arch_check_services() are generic and unconditionally loop over api/master/minion/syndic per the _INSTALL_* flags, so a -M (master) or -S (syndic) onedir install on Arch Linux would fail when those functions tried to restart/check a salt-master.service or salt-syndic.service unit that was never created. Port ALT Linux's install_alt_linux_onedir_post() loop, which creates a unit for whichever roles are actually requested via _INSTALL_MASTER / _INSTALL_MINION / _INSTALL_SYNDIC, gated by _START_DAEMONS. Default minion-only behavior is unchanged. --- bootstrap-salt.sh | 56 +++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index f483079b1..70f0f0957 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -6465,20 +6465,41 @@ install_arch_check_services() { install_arch_linux_onedir_post() { echodebug "install_arch_linux_onedir_post() entry" - # Disable any distro/AUR salt units - systemctl disable --now salt-minion.service 2>/dev/null || true - systemctl disable --now salt-master.service 2>/dev/null || true + # Add onedir paths system-wide. This only takes effect for login/interactive + # shells that source /etc/profile.d - it does not help something like + # `docker exec salt-call ...`, which runs without one, so also + # symlink the onedir binaries into /usr/bin, already on PATH everywhere. + cat >/etc/profile.d/saltstack.sh <<'EOF' +export PATH=/opt/saltstack/salt:/opt/saltstack/salt/bin:$PATH +EOF + + chmod 644 /etc/profile.d/saltstack.sh + + for bin in /opt/saltstack/salt/salt*; do + [ -f "$bin" ] && [ -x "$bin" ] && ln -sf "$bin" "/usr/bin/$(basename "$bin")" + done + + for fname in api master minion syndic; do + # Skip salt-api since the service should be opt-in and not necessarily started on boot + [ $fname = "api" ] && continue + + # Skip if not meant to be installed + [ $fname = "master" ] && [ "$_INSTALL_MASTER" -eq $BS_FALSE ] && continue + [ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue + [ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue + + # Disable any distro/AUR salt unit before dropping our own + systemctl disable --now "salt-${fname}.service" 2>/dev/null || true - # Drop a clean unit, same pattern as Debian/Ubuntu onedir - cat >/etc/systemd/system/salt-minion.service <<'EOF' + cat >"/etc/systemd/system/salt-${fname}.service" < salt-call ...`, which runs without one, so also - # symlink the onedir binaries into /usr/bin, already on PATH everywhere. - cat >/etc/profile.d/saltstack.sh <<'EOF' -export PATH=/opt/saltstack/salt:/opt/saltstack/salt/bin:$PATH -EOF - - chmod 644 /etc/profile.d/saltstack.sh - - for bin in /opt/saltstack/salt/salt*; do - [ -f "$bin" ] && [ -x "$bin" ] && ln -sf "$bin" "/usr/bin/$(basename "$bin")" + if [ "$_START_DAEMONS" -eq $BS_TRUE ]; then + systemctl enable --now "salt-${fname}.service" + fi done - if [ "$_START_DAEMONS" -eq $BS_TRUE ]; then - systemctl enable --now salt-minion.service - fi + systemctl daemon-reload return 0 } From 0e5b8589038258542beccd9c7f58b505ef65d207 Mon Sep 17 00:00:00 2001 From: Twangboy Date: Thu, 10 Sep 2026 16:25:25 -0600 Subject: [PATCH 2/2] feat(archlinux): add Arch Linux to the CI test matrix Wire Arch Linux into the generated GitHub Actions test matrix, following the same pattern used to add ALT Linux: - Add "archlinux" to generate.py's LINUX_DISTROS, STABLE_DISTROS, and ONEDIR_DISTROS lists, and to DISTRO_DISPLAY_NAMES/CONTAINER_SLUG_NAMES (Arch is rolling-release, so distro-slug and container-slug are both just "archlinux"). - Regenerate ci.yml (pre-commit run -av generate-actions-workflow), adding the archlinux job and its instances list, and adding it to set-pipeline-exit-status's needs. - Add archlinux to test-linux.yml's --break-system-packages conditionals, since Arch enforces the same PEP 668 externally-managed-environment restriction as Debian>=12/Ubuntu>=24 for the CI container's own pip install step. No new version blacklist entries are added yet; the container image for archlinux already exists in salt-ci-containers, but which stable-*/git-* instances actually pass is unverified pending the first real CI run (matching how ALT Linux's own blacklist entries were only added after real failures surfaced). Likely candidates to watch: install_arch_linux_stable()'s AUR build has no version pinning, and git-* installs may hit Arch's own PEP 668 restriction since _USE_BREAK_SYSTEM_PACKAGES in bootstrap-salt.sh only covers ubuntu>=24/debian>=12. --- .github/workflows/ci.yml | 16 ++++++++++++++++ .github/workflows/templates/generate.py | 5 +++++ .github/workflows/test-linux.yml | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e49f0491a..67a147a42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -225,6 +225,21 @@ jobs: instances: '["stable-3006", "onedir-3006", "stable-3006-24", "stable-3007", "onedir-3007", "stable-3007-1", "stable-3008", "git-3008", "onedir-3008", "latest", "default"]' + archlinux: + name: Arch Linux + if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' + uses: ./.github/workflows/test-linux.yml + needs: + - lint + - generate-actions-workflow + with: + distro-slug: archlinux + display-name: Arch Linux + container-slug: archlinux + timeout: 20 + instances: '["stable-3006", "git-3006", "onedir-3006", "stable-3006-24", "stable-3007", "git-3007", "onedir-3007", "stable-3007-1", "stable-3008", "git-3008", "onedir-3008", "git-master", "latest", "default"]' + + debian-11: name: Debian 11 if: github.event_name == 'push' || needs.collect-changed-files.outputs.run-tests == 'true' @@ -345,6 +360,7 @@ jobs: - altlinux-10 - altlinux-11 - amazonlinux-2023 + - archlinux - debian-11 - debian-12 - photon-5 diff --git a/.github/workflows/templates/generate.py b/.github/workflows/templates/generate.py index ed98b2273..8c0efa442 100755 --- a/.github/workflows/templates/generate.py +++ b/.github/workflows/templates/generate.py @@ -19,6 +19,7 @@ "altlinux-10", "altlinux-11", "amazonlinux-2023", + "archlinux", "debian-11", "debian-12", "photon-5", @@ -48,6 +49,7 @@ "altlinux-10", "altlinux-11", "amazonlinux-2023", + "archlinux", "debian-11", "debian-12", "photon-5", @@ -67,6 +69,7 @@ "altlinux-10", "altlinux-11", "amazonlinux-2023", + "archlinux", "debian-11", "debian-12", "photon-5", @@ -221,6 +224,7 @@ "altlinux-11": "ALT Linux 11", "amazonlinux-2": "Amazon 2", "amazonlinux-2023": "Amazon 2023", + "archlinux": "Arch Linux", "debian-11": "Debian 11", "debian-12": "Debian 12", "debian-13": "Debian 13", @@ -244,6 +248,7 @@ "altlinux-11": "altlinux-11", "amazonlinux-2": "amazonlinux-2", "amazonlinux-2023": "amazonlinux-2023", + "archlinux": "archlinux", "debian-11": "debian-11", "debian-12": "debian-12", "debian-13": "debian-13", diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index f26cc1218..4a00ec5ab 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -89,12 +89,12 @@ jobs: exit 1 - name: "Install Python Dependencies with pip breakage in container ${{ inputs.container-slug }}" - if: ${{ ( inputs.distro-slug == 'debian-12' ) || ( inputs.distro-slug == 'debian-13' ) || ( inputs.distro-slug == 'ubuntu-2404' ) || ( inputs.distro-slug == 'ubuntu-2604' ) }} + if: ${{ ( inputs.distro-slug == 'archlinux' ) || ( inputs.distro-slug == 'debian-12' ) || ( inputs.distro-slug == 'debian-13' ) || ( inputs.distro-slug == 'ubuntu-2404' ) || ( inputs.distro-slug == 'ubuntu-2604' ) }} run: | docker exec ${{ github.run_id}}_salt-test python3 -m pip install --break-system-packages -r /_w/btstrap/tests/requirements.txt - name: "Install Python Dependencies without pip breakage in container ${{ inputs.container-slug }}" - if: ${{ ( inputs.distro-slug != 'debian-12' ) && ( inputs.distro-slug != 'debian-13' ) && ( inputs.distro-slug != 'ubuntu-2404' ) && ( inputs.distro-slug != 'ubuntu-2604' ) }} + if: ${{ ( inputs.distro-slug != 'archlinux' ) && ( inputs.distro-slug != 'debian-12' ) && ( inputs.distro-slug != 'debian-13' ) && ( inputs.distro-slug != 'ubuntu-2404' ) && ( inputs.distro-slug != 'ubuntu-2604' ) }} run: | docker exec ${{ github.run_id}}_salt-test python3 -m pip install -r /_w/btstrap/tests/requirements.txt