Skip to content

Commit

Permalink
[PoC] Continue the changes for openSUSE MicroOS and Tumbleweed
Browse files Browse the repository at this point in the history
  • Loading branch information
juliogonzalez committed Nov 10, 2023
1 parent 6b495bb commit 979c00d
Show file tree
Hide file tree
Showing 9 changed files with 121 additions and 62 deletions.
4 changes: 4 additions & 0 deletions spacewalk/certs-tools/rhn_bootstrap_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,10 @@ def getRegistrationStackSh():
grep -q 'Micro' /etc/os-release && BASE="${{BASE}}micro"
VERSION="$(grep '^\(VERSION_ID\)' /etc/os-release | sed -n 's/.*"\([[:digit:]]\+\).*/\\1/p')"
PATCHLEVEL="$(grep '^\(VERSION_ID\)' /etc/os-release | sed -n 's/.*\.\([[:digit:]]*\).*/\\1/p')"
# openSUSE MicroOS
grep -q 'MicroOS' /etc/os-release && BASE='opensusemicroos' && VERSION='latest'
# openSUSE Tumbleweed
grep -q 'Tumbleweed' /etc/os-release && BASE='opensusetumbleweed' && VERSION='latest'
fi
Z_CLIENT_CODE_BASE="${{BASE:-unknown}}"
Z_CLIENT_CODE_VERSION="${{VERSION:-unknown}}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Enable openSUSE Tumbleweed and openSUSE MicroOS
4 changes: 3 additions & 1 deletion susemanager-utils/susemanager-sls/salt-ssh/preflight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ function getZ_CLIENT_CODE_BASE() {
grep -q 'Micro' /etc/os-release && BASE="${BASE}micro"
VERSION="$(grep '^\(VERSION_ID\)' /etc/os-release | sed -n 's/.*"\([[:digit:]]\+\).*/\1/p')"
PATCHLEVEL="$(grep '^\(VERSION_ID\)' /etc/os-release | sed -n 's/.*\.\([[:digit:]]*\).*/\1/p')"
# openSUSE MicroOS, could be useful for Tumbleweed in the future
# openSUSE MicroOS
grep -q 'MicroOS' /etc/os-release && BASE='opensusemicroos' && VERSION='latest'
# openSUSE MicroOS
grep -q 'Tumbleweed' /etc/os-release && BASE='opensusetumbleweed' && VERSION='latest'
fi
Z_CLIENT_CODE_BASE="${BASE:-unknown}"
Z_CLIENT_CODE_VERSION="${VERSION:-unknown}"
Expand Down
12 changes: 8 additions & 4 deletions susemanager-utils/susemanager-sls/salt/bootstrap/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ no_ssh_push_key_authorized:
{% set osrelease_major = grains['osrelease_info'][0] %}
#exceptions to the family rule
{%- if "opensuse" in grains['oscodename']|lower %}
{% set os_base = 'opensuse' %}
{%- if "tumbleweed" in grains['oscodename']|lower %}
{% set os_base = 'opensusetumbleweed' %}
{%- else %}
{% set os_base = 'opensuse' %}
{%- endif %}
{%- endif %}
{%- if (grains['osrelease_info']| length) < 2 %}
{% set osrelease_minor = 0 %}
Expand All @@ -43,9 +47,9 @@ no_ssh_push_key_authorized:
{% set os_base = os_base|string + 'micro' %}
{%- endif %}
{%- endif %}
#end of expections
{%- if os_base == 'opensusemicroos' %}
{% set osrelease = 'latest' %}
#end of exceptions
{%- if os_base == 'opensusemicroos' or os_base == 'opensusetumbleweed' %}
{% set osrelease = 'latest/0' %}
{%- else %}
{% set osrelease = osrelease_major|string + '/' + osrelease_minor|string %}
{%- endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Allow openSUSE Tumbleweed bootstrapping
79 changes: 33 additions & 46 deletions susemanager/src/mgr_bootstrap_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,50 +159,6 @@
"venv-salt-minion",
]

PKGLISTUMBLEWEED_SALT_NO_BUNDLE = [
"libgomp1",
"libmpdec3",
"libpgm-5_2-0",
"libpython3_10-1_0",
"librpmbuild9",
"libsodium23",
"libunwind8",
"libyaml-0-2",
"libzmq5",
"python3-salt",
"python310",
"python310-Jinja2",
"python310-M2Crypto",
"python310-MarkupSafe",
"python310-PyYAML",
"python310-apipkg",
"python310-base",
"python310-certifi",
"python310-cffi",
"python310-charset-normalizer",
"python310-contextvars",
"python310-cryptography",
"python310-distro",
"python310-idna",
"python310-immutables",
"python310-iniconfig",
"python310-msgpack",
"python310-psutil",
"python310-py",
"python310-pyOpenSSL",
"python310-pycparser",
"python310-pyzmq",
"python310-requests",
"python310-rpm",
"python310-six",
"python310-urllib3",
"python310-zypp-plugin",
"salt",
"salt-minion",
"salt-transactional-update",
"update-alternatives",
]

PKGLIST15_SALT_NO_BUNDLE = [
"hostname",
"iproute2",
Expand Down Expand Up @@ -273,6 +229,17 @@
"venv-salt-minion",
]

PKGLISTMICROOS_BUNDLE_ONLY = [
"libnsl3",
"libtirpc3",
"libtirpc-netconfig",
"venv-salt-minion",
]

PKGLISTTUMBLEWEED_BUNDLE_ONLY = [
"venv-salt-minion",
]

ONLYSLE15 = [
"gio-branding-SLE",
]
Expand Down Expand Up @@ -1233,13 +1200,33 @@
'DEST' : DOCUMENT_ROOT + '/pub/repositories/opensusemicro/5/5/bootstrap/'
},
'openSUSE-MicroOS-x86_64-uyuni' : {
'BASECHANNEL' : 'opensuse_microos-x86_64', 'PKGLIST' : PKGLISTUMBLEWEED_SALT_NO_BUNDLE,
'BASECHANNEL' : 'opensuse_microos-x86_64', 'PKGLIST' : PKGLISTMICROOS_BUNDLE_ONLY,
'DEST' : DOCUMENT_ROOT + '/pub/repositories/opensusemicroos/latest/0/bootstrap/'
},
'openSUSE-MicroOS-aarch64-uyuni' : {
'BASECHANNEL' : 'opensuse_microos-aarch64', 'PKGLIST' : PKGLISTUMBLEWEED_SALT_NO_BUNDLE,
'BASECHANNEL' : 'opensuse_microos-aarch64', 'PKGLIST' : PKGLISTMICROOS_BUNDLE_ONLY,
'DEST' : DOCUMENT_ROOT + '/pub/repositories/opensusemicroos/latest/0/bootstrap/'
},
'openSUSE-MicroOS-ppc64le-uyuni' : {
'BASECHANNEL' : 'opensuse_microos-ppc64le', 'PKGLIST' : PKGLISTMICROOS_BUNDLE_ONLY,
'DEST' : DOCUMENT_ROOT + '/pub/repositories/opensusemicroos/latest/0/bootstrap/'
},
'openSUSE-Tumbleweed-x86_64-uyuni' : {
'BASECHANNEL' : 'opensuse_tumbleweed-x86_64', 'PKGLIST' : PKGLISTTUMBLEWEED_BUNDLE_ONLY,
'DEST' : DOCUMENT_ROOT + '/pub/repositories/opensusetumbleweed/latest/0/bootstrap/'
},
'openSUSE-Tumbleweed-aarch64-uyuni' : {
'BASECHANNEL' : 'opensuse_tumbleweed-aarch64', 'PKGLIST' : PKGLISTTUMBLEWEED_BUNDLE_ONLY,
'DEST' : DOCUMENT_ROOT + '/pub/repositories/opensusetumbleweed/latest/0/bootstrap/'
},
'openSUSE-Tumbleweed-ppc64le-uyuni' : {
'BASECHANNEL' : 'opensuse_tumbleweed-ppc64le', 'PKGLIST' : PKGLISTTUMBLEWEED_BUNDLE_ONLY,
'DEST' : DOCUMENT_ROOT + '/pub/repositories/opensusetumbleweed/latest/0/bootstrap/'
},
'openSUSE-Tumbleweed-s390x-uyuni' : {
'BASECHANNEL' : 'opensuse_tumbleweed-s390x', 'PKGLIST' : PKGLISTTUMBLEWEED_BUNDLE_ONLY,
'DEST' : DOCUMENT_ROOT + '/pub/repositories/opensusetumbleweed/latest/0/bootstrap/'
},
'centos-6-x86_64' : {
'PDID' : [-11, 1682], 'BETAPDID' : [2064], 'PKGLIST' : RES6,
'DEST' : DOCUMENT_ROOT + '/pub/repositories/centos/6/bootstrap/'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix bootstrap repository definitions for openSUSE MicrOOS and Tumbleweed
80 changes: 69 additions & 11 deletions utils/spacewalk-common-channels.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1378,8 +1378,8 @@ repo_url = https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/

[opensuse_tumbleweed]
checksum = sha256
archs = x86_64, aarch64
name = openSUSE Leap Tumbleweed (%(arch)s)
archs = x86_64, s390x, aarch64, ppc64le
name = openSUSE Tumbleweed (%(arch)s)
gpgkey_url = file:///usr/lib/rpm/gnupg/keys/gpg-pubkey-29b700a4-62b07e22.asc
gpgkey_id = 29B700A4
gpgkey_fingerprint = AD48 5664 E901 B867 051A B15F 35A2 F86E 29B7 00A4
Expand All @@ -1389,45 +1389,103 @@ dist_map_release = Tumbleweed
[opensuse_tumbleweed-non-oss]
label = %(base_channel)s-non-oss
name = openSUSE Tumbleweed non oss (%(arch)s)
archs = x86_64, aarch64
archs = x86_64, s390x, aarch64, ppc64le
checksum = sha256
base_channels = opensuse_tumbleweed-%(arch)s
repo_url = http://download.opensuse.org/tumbleweed/repo/non-oss/

[opensuse_tumbleweed-updates]
label = %(base_channel)s-updates
name = openSUSE Leap Tumbleweed Updates (%(arch)s)
archs = x86_64, aarch64
name = openSUSE Tumbleweed Updates (%(arch)s)
archs = x86_64, s390x, aarch64, ppc64le
checksum = sha256
base_channels = opensuse_tumbleweed-%(arch)s
repo_url = https://download.opensuse.org/update/tumbleweed/

[opensuse_tumbleweed-openh264]
label = %(base_channel)s-openh264
name = openSUSE Tumbleweed Open H.264 Codec (%(arch)s)
archs = x86_64, s390x, aarch64, ppc64le
checksum = sha256
base_channels = opensuse_tumbleweed-%(arch)s
repo_url = http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed

[opensuse_tumbleweed-uyuni-client]
name = Uyuni Client Tools for %(base_channel_name)s
archs = x86_64, s390x, aarch64, ppc64le
base_channels = opensuse_tumbleweed-%(arch)s
checksum = sha256
gpgkey_url = https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/openSUSE_Tumbleweed/openSUSE_Tumbleweed/repodata/repomd.xml.key
gpgkey_id = E6E5A213
gpgkey_fingerprint = 50E6 0431 5448 5D99 0732 B5D6 ACAA 9CF7 E6E5 A213
repo_url = https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/openSUSE_Tumbleweed/openSUSE_Tumbleweed/

# This is expected. openSUSE Leap 15.0 client tools are valid for all openSUSE Leap Micro 5.X release
[opensuse_tumbleweed-uyuni-client-devel]
name = Uyuni Client Tools for %(base_channel_name)s (Development)
archs = x86_64, s390x, aarch64, ppc64le
base_channels = opensuse_tumbleweed-%(arch)s
checksum = sha256
gpgkey_url = https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/openSUSE_Tumbleweed/openSUSE_Tumbleweed/repodata/repomd.xml.key
gpgkey_id = E6E5A213
gpgkey_fingerprint = 50E6 0431 5448 5D99 0732 B5D6 ACAA 9CF7 E6E5 A213
repo_url = https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/openSUSE_Tumbleweed/openSUSE_Tumbleweed/

[opensuse_microos]
checksum = sha256
archs = x86_64, aarch64
archs = x86_64, aarch64, ppc64le
name = openSUSE MicroOS (%(arch)s)
gpgkey_url = https://download.opensuse.org/distribution/leap-micro/5.3/product/repo/Leap-Micro-5.3-x86_64-Media1/gpg-pubkey-3dbdc284-53674dd4.asc
gpgkey_id = 3DBDC284
gpgkey_fingerprint = 22C0 7BA5 3417 8CD0 2EFE 22AA B88B 2FD4 3DBD C284
gpgkey_url = file:///usr/lib/rpm/gnupg/keys/gpg-pubkey-29b700a4-62b07e22.asc
gpgkey_id = 29B700A4
gpgkey_fingerprint = AD48 5664 E901 B867 051A B15F 35A2 F86E 29B7 00A4
repo_url = http://download.opensuse.org/tumbleweed/repo/oss/
dist_map_release = 5.3

[opensuse_microos-non-oss]
label = %(base_channel)s-non-oss
name = openSUSE MicroOS no oss (%(arch)s)
archs = x86_64, aarch64
archs = x86_64, aarch64, ppc64le
checksum = sha256
base_channels = opensuse_microos-%(arch)s
repo_url = http://download.opensuse.org/tumbleweed/repo/non-oss/

[opensuse_microos-update]
label = %(base_channel)s-update
name = openSUSE MicroOS Update (%(arch)s)
archs = x86_64, aarch64
archs = x86_64, aarch64, ppc64le
checksum = sha256
base_channels = opensuse_microos-%(arch)s
repo_url = http://download.opensuse.org/update/tumbleweed/

[opensuse_microos-openh264]
label = %(base_channel)s-updates
name = openSUSE MicroOS Open H.264 Codec (%(arch)s)
archs = x86_64, aarch64, ppc64le
checksum = sha256
base_channels = opensuse_microos-%(arch)s
repo_url = http://codecs.opensuse.org/openh264/openSUSE_Tumbleweed

[opensuse_microos-uyuni-client]
name = Uyuni Client Tools for %(base_channel_name)s
archs = x86_64, aarch64, ppc64le
base_channels = opensuse_microos-%(arch)s
checksum = sha256
gpgkey_url = https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/openSUSE_Tumbleweed/openSUSE_Tumbleweed/repodata/repomd.xml.key
gpgkey_id = E6E5A213
gpgkey_fingerprint = 50E6 0431 5448 5D99 0732 B5D6 ACAA 9CF7 E6E5 A213
repo_url = https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/openSUSE_Tumbleweed/openSUSE_Tumbleweed/

# This is expected. openSUSE Leap 15.0 client tools are valid for all openSUSE Leap Micro 5.X release
[opensuse_microos-uyuni-client-devel]
name = Uyuni Client Tools for %(base_channel_name)s (Development)
archs = x86_64, aarch64, ppc64le
base_channels = opensuse_microos-%(arch)s
checksum = sha256
gpgkey_url = https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/openSUSE_Tumbleweed/openSUSE_Tumbleweed/repodata/repomd.xml.key
gpgkey_id = E6E5A213
gpgkey_fingerprint = 50E6 0431 5448 5D99 0732 B5D6 ACAA 9CF7 E6E5 A213
repo_url = https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/openSUSE_Tumbleweed/openSUSE_Tumbleweed/

[sles12-sp3-uyuni-client]
name = Uyuni Client Tools for SLES12 SP3 %(arch)s
archs = x86_64, s390x, aarch64, ppc64le
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Update the openSUSE Tumbleweed and MicroOS repositories

0 comments on commit 979c00d

Please sign in to comment.