From a46bcfa2b5b588e476d4114647622c734dc5fc22 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 25 Oct 2024 09:52:10 -0400 Subject: [PATCH] Add CentOS Stream 10 and Alma Kitten 10 Similar to 9, but now hooks must be in /var instead of /usr --- confluent_osdeploy/confluent_osdeploy.spec.tmpl | 8 ++++++-- confluent_server/confluent/osimage.py | 15 ++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/confluent_osdeploy/confluent_osdeploy.spec.tmpl b/confluent_osdeploy/confluent_osdeploy.spec.tmpl index 5faab31f..26beb74f 100644 --- a/confluent_osdeploy/confluent_osdeploy.spec.tmpl +++ b/confluent_osdeploy/confluent_osdeploy.spec.tmpl @@ -28,11 +28,15 @@ This contains support utilities for enabling deployment of x86_64 architecture s #cp start_root urlmount ../stateless-bin/ #cd .. ln -s el8 el9 -for os in rhvh4 el7 genesis el8 suse15 ubuntu18.04 ubuntu20.04 ubuntu22.04 ubuntu24.04 coreos el9; do +cp -a el8 el10 +mv el10/initramfs/usr el10/initramfs/var +for os in rhvh4 el7 genesis el8 suse15 ubuntu18.04 ubuntu20.04 ubuntu22.04 ubuntu24.04 coreos el9 el10; do mkdir ${os}out cd ${os}out if [ -d ../${os}bin ]; then cp -a ../${os}bin/opt . + elif [ $os = el10 ]; then + cp -a ../el9bin/opt . else cp -a ../el8bin/opt . fi @@ -78,7 +82,7 @@ cp -a esxi7 esxi8 %install mkdir -p %{buildroot}/opt/confluent/share/licenses/confluent_osdeploy/ cp LICENSE %{buildroot}/opt/confluent/share/licenses/confluent_osdeploy/ -for os in rhvh4 el7 el8 el9 genesis suse15 ubuntu20.04 ubuntu18.04 ubuntu22.04 ubuntu24.04 esxi6 esxi7 esxi8 coreos; do +for os in rhvh4 el7 el8 el9 el10 genesis suse15 ubuntu20.04 ubuntu18.04 ubuntu22.04 ubuntu24.04 esxi6 esxi7 esxi8 coreos; do mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs mkdir -p %{buildroot}/opt/confluent/lib/osdeploy/$os/profiles cp ${os}out/addons.* %{buildroot}/opt/confluent/lib/osdeploy/$os/initramfs diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 8b9101ec..dcfdf6ec 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -315,6 +315,7 @@ def check_alma(isoinfo): ver = None arch = None cat = None + suffix = "" for entry in isoinfo[0]: if 'almalinux-release-8' in entry: ver = entry.split('-')[2] @@ -326,6 +327,12 @@ def check_alma(isoinfo): arch = entry.split('.')[-2] cat = 'el9' break + elif 'almalinux-kitten-release-10' in entry: + ver = entry.split('-')[3] + arch = entry.split('.')[-2] + cat = 'el10' + suffix = '_kitten' + break else: return None if arch == 'noarch' and '.discinfo' in isoinfo[1]: @@ -333,7 +340,7 @@ def check_alma(isoinfo): arch = prodinfo.split(b'\n')[2] if not isinstance(arch, str): arch = arch.decode('utf-8') - return {'name': 'alma-{0}-{1}'.format(ver, arch), 'method': EXTRACT, 'category': cat} + return {'name': 'alma{0}-{1}-{2}'.format(suffix, ver, arch), 'method': EXTRACT, 'category': cat} def check_centos(isoinfo): @@ -365,6 +372,12 @@ def check_centos(isoinfo): cat = 'el9' isstream = '_stream' break + elif 'centos-stream-release-10' in entry: + ver = entry.split('-')[3] + arch = entry.split('.')[-2] + cat = 'el10' + isstream = '_stream' + break elif 'centos-linux-release-8' in entry: ver = entry.split('-')[3] arch = entry.split('.')[-2]