Skip to content

Commit

Permalink
fix(repos): fix namings after salt binaries and keys move
Browse files Browse the repository at this point in the history
BREAKING CHANGES: This commit changes upstream repository naming conventions
to get latest binaries and keys. If you depends on versions of salt from older,
please stick with version 1.x.x of this formula
  • Loading branch information
SMillerDev authored and sticky-note committed Feb 2, 2024
1 parent 570c44b commit 02275a4
Show file tree
Hide file tree
Showing 34 changed files with 93 additions and 95 deletions.
8 changes: 7 additions & 1 deletion docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ salt-formula

Yes, Salt can Salt itself!

## Note: As for salt `3006` and new `onedir` distribution method,
upstream repositories of saltstack have changed naming conventions
to get latest binaries and keys.
If you depends on versions of salt from older repositories,
please stick with version 1.x.x of this formula.

.. contents:: **Table of Contents**

General notes
Expand Down Expand Up @@ -134,7 +140,7 @@ Git repositories under ``/srv/formulas`` and makes them available in the relevan
'saltmain':
- salt.formulas
- salt.master


Pillar data can be used to customize all paths, URLs, etc. Here's a minimal pillar sample installing two formulas in the base environment:

Expand Down
2 changes: 1 addition & 1 deletion salt/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
salt:
version: ''
pin_version: false
py_ver: '' ## py2 is default
py_ver: 'py3' ## py3 is default
rootuser: root
rootgroup: root
install_packages: true
Expand Down
13 changes: 7 additions & 6 deletions salt/osfamilymap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

{%- set py_ver_repr = salt['pillar.get']('salt:py_ver', '') %}

{%- set repoarch = 'amd64' if salt['grains.get']('osarch', '') == 'x86_64' else 'arm64' %}
{%- set osrelease = salt['grains.get']('osrelease', '') %}
{%- set salt_release = salt['pillar.get']('salt:release', 'latest') %}
{%- if salt_release.split('.')|length >= 3 %}
Expand All @@ -13,7 +14,7 @@
{%- set osmajorrelease = salt['grains.get']('osmajorrelease', osrelease)|string %}
{%- set oscodename = salt['grains.get']('oscodename') %}
{%- set opensuse_repo_suffix = 'Leap_' ~ osrelease if salt['grains.get']('osfinger', '') == 'Leap-15' else 'Tumbleweed' %}
{%- set salt_repo = salt['pillar.get']('salt:repo', 'https://repo.saltproject.io') %}
{%- set salt_repo = salt['pillar.get']('salt:repo', 'https://repo.saltproject.io/salt') %}

#from template-formula
{%- if grains.os_family == 'MacOS' %}
Expand All @@ -25,9 +26,9 @@


Debian:
pkgrepo: 'deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=amd64] {{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
pkgrepo_keyring: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }}/salt-archive-keyring.gpg'
pkgrepo_keyring_hash: sha256=ea38e0cdbd8dc53e1af154a8d711a2a321a69f81188062dc5cde9d54df2b8c47
pkgrepo: 'deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch={{ repoarch }}] {{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/{{ repoarch }}/{{ salt_release }} {{ oscodename }} main'
pkgrepo_keyring: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ osfamily_lower }}/{{ osmajorrelease }}/amd64/{{ salt_release }}/SALT-PROJECT-GPG-PUBKEY-2023.gpg'
pkgrepo_keyring_hash: sha256=c6f6cbcd96fdb130b1dde8dcfc05d46a3a3f322ff0514f98e2e6473896243472
libgit2: libgit2-22
pyinotify: python-pyinotify
gitfs:
Expand All @@ -43,8 +44,8 @@ Debian:
RedHat:
pkgrepo_name: saltstack
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/$releasever/$basearch/{{ salt_release }}'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/$releasever/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/redhat/$releasever/$basearch/{{ salt_release }}'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/redhat/$releasever/$basearch/{{ salt_release }}/SALT-PROJECT-GPG-PUBKEY-2023.gpg'
pygit2: python-pygit2
python_git: GitPython
gitfs:
Expand Down
4 changes: 2 additions & 2 deletions salt/osfingermap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

Oracle Linux Server-7:
pkgrepo_humanname: SaltStack repo for RHEL/CentOS {{ osmajorrelease }}
pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/{{ osmajorrelease }}/$basearch/{{ salt_release }}'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/{{ osmajorrelease }}/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/redhat/{{ osmajorrelease }}/$basearch/{{ salt_release }}'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/redhat/{{ osmajorrelease }}/$basearch/{{ salt_release }}/SALT-PROJECT-GPG-PUBKEY-2023.gpg'
17 changes: 9 additions & 8 deletions salt/osmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

{%- set py_ver_repr = salt['pillar.get']('salt:py_ver', '') %}

{%- set repoarch = 'amd64' if salt['grains.get']('osarch', '') == 'x86_64' else 'arm64' %}
{%- set osrelease = salt['grains.get']('osrelease', '') %}
{%- set salt_release = salt['pillar.get']('salt:release', 'latest') %}
{%- if salt_release.split('.')|length >= 3 %}
Expand All @@ -13,22 +14,22 @@
{%- set osmajorrelease = salt['grains.get']('osmajorrelease', osrelease)|string %}
{%- set oscodename = salt['grains.get']('oscodename') %}
{%- set os_family_lower = salt['grains.get']('os_family')|lower %}
{%- set salt_repo = salt['pillar.get']('salt:repo', 'https://repo.saltproject.io') %}
{%- set salt_repo = salt['pillar.get']('salt:repo', 'https://repo.saltproject.io/salt') %}

Fedora:
pygit2: python2-pygit2

Amazon:
pkgrepo_name: saltstack-amzn-repo
pkgrepo_humanname: SaltStack repo for Amazon Linux 2
pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/amazon/2/$basearch/{{ salt_release }}'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/amazon/2/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/amazon/2/$basearch/{{ salt_release }}'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/amazon/2/$basearch/{{ salt_release }}/SALT-PROJECT-GPG-PUBKEY-2023.gpg'

Ubuntu:
pkgrepo: 'deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=amd64] {{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
pkgrepo_keyring: '{{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/salt-archive-keyring.gpg'
pkgrepo_keyring_hash: sha256=ea38e0cdbd8dc53e1af154a8d711a2a321a69f81188062dc5cde9d54df2b8c47
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: 'deb [signed-by=/usr/share/keyrings/SALT-PROJECT-GPG-PUBKEY-2023.gpg arch={{ repoarch }}] {{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ os_lower }}/{{ osrelease }}/{{ repoarch }}/{{ salt_release }} {{ oscodename }} main'
pkgrepo_keyring: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/SALT-PROJECT-GPG-PUBKEY-2023.gpg'
pkgrepo_keyring_hash: sha256=c6f6cbcd96fdb130b1dde8dcfc05d46a3a3f322ff0514f98e2e6473896243472
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/SALT-PROJECT-GPG-PUBKEY-2023.gpg'
pygit2: python-pygit2
gitfs:
pygit2:
Expand All @@ -39,7 +40,7 @@ Ubuntu:

Raspbian:
pkgrepo: 'deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=armhf] {{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }} {{ oscodename }} main'
pkgrepo_keyring: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }}/salt-archive-keyring.gpg'
pkgrepo_keyring: '{{ salt_repo }}/{{ py_ver_repr or 'py3' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }}/SALT-PROJECT-GPG-PUBKEY-2023.gpg'

SmartOS:
salt_master: salt
Expand Down
6 changes: 3 additions & 3 deletions test/integration/default/files/_mapdata/almalinux-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3004/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006/SALT-PROJECT-GPG-PUBKEY-2023.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
Expand Down Expand Up @@ -87,14 +87,14 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3004
pkgrepo: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo_name: saltstack
py_ver: py3
pygit2: python-pygit2
python_dulwich: python-dulwich
python_git: GitPython
release: '3004'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
6 changes: 3 additions & 3 deletions test/integration/default/files/_mapdata/amazonlinux-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/amazon/2/$basearch/3004/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/salt/py3/amazon/2/$basearch/3006/SALT-PROJECT-GPG-PUBKEY-2023.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
Expand Down Expand Up @@ -87,14 +87,14 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/amazon/2/$basearch/3004
pkgrepo: https://repo.saltproject.io/salt/py3/amazon/2/$basearch/3006
pkgrepo_humanname: SaltStack repo for Amazon Linux 2
pkgrepo_name: saltstack-amzn-repo
py_ver: py3
pygit2: python-pygit2
python_dulwich: python-dulwich
python_git: GitPython
release: '3004'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ values:
pyinotify: python2-pyinotify
python_dulwich: python-dulwich
python_git: python2-gitpython
release: '3004'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
6 changes: 3 additions & 3 deletions test/integration/default/files/_mapdata/centos-7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3003/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006/SALT-PROJECT-GPG-PUBKEY-2023.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
Expand Down Expand Up @@ -87,14 +87,14 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3003
pkgrepo: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo_name: saltstack
py_ver: py3
pygit2: python-pygit2
python_dulwich: python-dulwich
python_git: GitPython
release: '3003'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
6 changes: 3 additions & 3 deletions test/integration/default/files/_mapdata/centos-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3004/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006/SALT-PROJECT-GPG-PUBKEY-2023.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
Expand Down Expand Up @@ -87,14 +87,14 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3004
pkgrepo: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo_name: saltstack
py_ver: py3
pygit2: python-pygit2
python_dulwich: python-dulwich
python_git: GitPython
release: '3004'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
8 changes: 4 additions & 4 deletions test/integration/default/files/_mapdata/debian-10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ values:
parallel: true
pin_version: false
pkgrepo: deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=amd64]
https://repo.saltproject.io/py3/debian/10/amd64/3003 buster main
pkgrepo_keyring: https://repo.saltproject.io/py3/debian/10/amd64/3003/salt-archive-keyring.gpg
pkgrepo_keyring_hash: sha256=ea38e0cdbd8dc53e1af154a8d711a2a321a69f81188062dc5cde9d54df2b8c47
https://repo.saltproject.io/salt/py3/debian/10/amd64/3006 buster main
pkgrepo_keyring: https://repo.saltproject.io/salt/py3/debian/9/amd64/3006/SALT-PROJECT-GPG-PUBKEY-2023.gpg
pkgrepo_keyring_hash: sha256=c6f6cbcd96fdb130b1dde8dcfc05d46a3a3f322ff0514f98e2e6473896243472
py_ver: py3
pyinotify: python-pyinotify
python_dulwich: python-dulwich
python_git: python-git
release: '3003'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
8 changes: 4 additions & 4 deletions test/integration/default/files/_mapdata/debian-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ values:
parallel: true
pin_version: false
pkgrepo: deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=amd64]
https://repo.saltproject.io/py3/debian/11/amd64/3004 bullseye main
pkgrepo_keyring: https://repo.saltproject.io/py3/debian/11/amd64/3004/salt-archive-keyring.gpg
pkgrepo_keyring_hash: sha256=ea38e0cdbd8dc53e1af154a8d711a2a321a69f81188062dc5cde9d54df2b8c47
https://repo.saltproject.io/salt/py3/debian/11/amd64/3006 bullseye main
pkgrepo_keyring: https://repo.saltproject.io/salt/py3/debian/9/amd64/3006/SALT-PROJECT-GPG-PUBKEY-2023.gpg
pkgrepo_keyring_hash: sha256=c6f6cbcd96fdb130b1dde8dcfc05d46a3a3f322ff0514f98e2e6473896243472
py_ver: py3
pyinotify: python-pyinotify
python_dulwich: python-dulwich
python_git: python-git
release: '3004'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
8 changes: 4 additions & 4 deletions test/integration/default/files/_mapdata/debian-9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ values:
parallel: true
pin_version: false
pkgrepo: deb [signed-by=/usr/share/keyrings/salt-archive-keyring.gpg arch=amd64]
https://repo.saltproject.io/py3/debian/9/amd64/3003 stretch main
pkgrepo_keyring: https://repo.saltproject.io/py3/debian/9/amd64/3003/salt-archive-keyring.gpg
pkgrepo_keyring_hash: sha256=ea38e0cdbd8dc53e1af154a8d711a2a321a69f81188062dc5cde9d54df2b8c47
https://repo.saltproject.io/salt/py3/debian/9/amd64/3006 stretch main
pkgrepo_keyring: https://repo.saltproject.io/salt/py3/debian/9/amd64/3006/SALT-PROJECT-GPG-PUBKEY-2023.gpg
pkgrepo_keyring_hash: sha256=c6f6cbcd96fdb130b1dde8dcfc05d46a3a3f322ff0514f98e2e6473896243472
py_ver: py3
pyinotify: python-pyinotify
python_dulwich: python-dulwich
python_git: python-git
release: '3003'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
6 changes: 3 additions & 3 deletions test/integration/default/files/_mapdata/fedora-33.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3003/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006/SALT-PROJECT-GPG-PUBKEY-2023.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
Expand Down Expand Up @@ -87,14 +87,14 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3003
pkgrepo: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo_name: saltstack
py_ver: py3
pygit2: python2-pygit2
python_dulwich: python-dulwich
python_git: GitPython
release: '3003'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
6 changes: 3 additions & 3 deletions test/integration/default/files/_mapdata/fedora-34.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3004/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006/SALT-PROJECT-GPG-PUBKEY-2023.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
Expand Down Expand Up @@ -87,14 +87,14 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3004
pkgrepo: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo_name: saltstack
py_ver: py3
pygit2: python2-pygit2
python_dulwich: python-dulwich
python_git: GitPython
release: '3004'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
6 changes: 3 additions & 3 deletions test/integration/default/files/_mapdata/fedora-35.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3004/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006/SALT-PROJECT-GPG-PUBKEY-2023.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
Expand Down Expand Up @@ -87,14 +87,14 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3004
pkgrepo: https://repo.saltproject.io/salt/py3/redhat/$releasever/$basearch/3006
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo_name: saltstack
py_ver: py3
pygit2: python2-pygit2
python_dulwich: python-dulwich
python_git: GitPython
release: '3004'
release: '3006'
restart_via_at: false
retry_options:
attempts: 5
Expand Down
Loading

0 comments on commit 02275a4

Please sign in to comment.