Skip to content
Merged
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
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -345,6 +360,7 @@ jobs:
- altlinux-10
- altlinux-11
- amazonlinux-2023
- archlinux
- debian-11
- debian-12
- photon-5
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/templates/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"altlinux-10",
"altlinux-11",
"amazonlinux-2023",
"archlinux",
"debian-11",
"debian-12",
"photon-5",
Expand Down Expand Up @@ -48,6 +49,7 @@
"altlinux-10",
"altlinux-11",
"amazonlinux-2023",
"archlinux",
"debian-11",
"debian-12",
"photon-5",
Expand All @@ -67,6 +69,7 @@
"altlinux-10",
"altlinux-11",
"amazonlinux-2023",
"archlinux",
"debian-11",
"debian-12",
"photon-5",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
56 changes: 32 additions & 24 deletions bootstrap-salt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6465,46 +6465,54 @@ 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 <container> 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" <<EOF
[Unit]
Description=Salt Minion (onedir)
Description=Salt ${fname} (onedir)
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/opt/saltstack/salt/salt-minion -c /etc/salt
ExecStart=/opt/saltstack/salt/salt-${fname} -c /etc/salt
Restart=always
LimitNOFILE=100000

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload

# 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 <container> 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
}
Expand Down
Loading