diff --git a/confluent_osdeploy/el8/profiles/default/initprofile.sh b/confluent_osdeploy/el8/profiles/default/initprofile.sh index e8419f0a..d0125588 100644 --- a/confluent_osdeploy/el8/profiles/default/initprofile.sh +++ b/confluent_osdeploy/el8/profiles/default/initprofile.sh @@ -1,5 +1,5 @@ #!/bin/sh -sed -i 's/centos/CentOS/; s/rhel/Red Hat Enterprise Linux/; s/oraclelinux/Oracle Linux/' $2/profile.yaml +sed -i 's/centos/CentOS/; s/rhel/Red Hat Enterprise Linux/; s/oraclelinux/Oracle Linux/; s/alma/AlmaLinux/' $2/profile.yaml ln -s $1/images/pxeboot/vmlinuz $2/boot/kernel && \ ln -s $1/images/pxeboot/initrd.img $2/boot/initramfs/distribution mkdir -p $2/boot/efi/boot && \ diff --git a/confluent_server/confluent/osimage.py b/confluent_server/confluent/osimage.py index 36f51c47..7a8d4ea0 100644 --- a/confluent_server/confluent/osimage.py +++ b/confluent_server/confluent/osimage.py @@ -229,6 +229,26 @@ def extract_file(filepath, flags=0, callback=lambda x: None, imginfo=(), extract extract_entries(archive, flags, callback, totalsize, extractlist) +def check_alma(isoinfo): + ver = None + arch = None + cat = None + for entry in isoinfo[0]: + if 'almalinux-release-8' in entry: + ver = entry.split('-')[2] + arch = entry.split('.')[-2] + cat = 'el8' + break + else: + return None + if arch == 'noarch' and '.discinfo' in isoinfo[1]: + prodinfo = isoinfo[1]['.discinfo'] + 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} + + def check_centos(isoinfo): ver = None arch = None