diff --git a/lorax-lorax-33.6-1-sw.patch b/lorax-lorax-33.6-1-sw.patch new file mode 100755 index 0000000000000000000000000000000000000000..17df3332d81a2494905393d83a46661e14e4eff7 --- /dev/null +++ b/lorax-lorax-33.6-1-sw.patch @@ -0,0 +1,542 @@ +diff -Naur lorax-lorax-33.6-1.org/docs/lorax.rst lorax-lorax-33.6-1.sw/docs/lorax.rst +--- lorax-lorax-33.6-1.org/docs/lorax.rst 2022-08-22 12:39:14.330000000 +0000 ++++ lorax-lorax-33.6-1.sw/docs/lorax.rst 2022-08-22 13:57:37.880000000 +0000 +@@ -181,7 +181,7 @@ + The iso creation is handled by another set of templates. The one used depends + on the architecture that the iso is being created for. They are also stored in + ``/usr/share/lorax/templates.d/99-generic`` and are named after the arch, like +-``x86.tmpl`` and ``aarch64.tmpl``. They handle creation of the tree, copying ++``x86.tmpl`` , ``aarch64.tmpl`` and ``sw_64.tmpl``. They handle creation of the tree, copying + configuration template files, configuration variable substitution, treeinfo + metadata (via the :func:`treeinfo ` + template command). Kernel and initrd are copied from the installroot to their +diff -Naur lorax-lorax-33.6-1.org/share/templates.d/99-generic/config_files/sw_64/boot.msg lorax-lorax-33.6-1.sw/share/templates.d/99-generic/config_files/sw_64/boot.msg +--- lorax-lorax-33.6-1.org/share/templates.d/99-generic/config_files/sw_64/boot.msg 1970-01-01 00:00:00.000000000 +0000 ++++ lorax-lorax-33.6-1.sw/share/templates.d/99-generic/config_files/sw_64/boot.msg 2022-08-22 13:51:37.250000000 +0000 +@@ -0,0 +1,5 @@ ++ ++splash.lss ++ ++ - Press the 0107 key to begin the installation process. ++ +diff -Naur lorax-lorax-33.6-1.org/share/templates.d/99-generic/config_files/sw_64/grub2-efi.cfg lorax-lorax-33.6-1.sw/share/templates.d/99-generic/config_files/sw_64/grub2-efi.cfg +--- lorax-lorax-33.6-1.org/share/templates.d/99-generic/config_files/sw_64/grub2-efi.cfg 1970-01-01 00:00:00.000000000 +0000 ++++ lorax-lorax-33.6-1.sw/share/templates.d/99-generic/config_files/sw_64/grub2-efi.cfg 2022-08-22 13:51:37.250000000 +0000 +@@ -0,0 +1,46 @@ ++set default="1" ++ ++function load_video { ++ if [ x$feature_all_video_module = xy ]; then ++ insmod all_video ++ else ++ insmod efi_gop ++ insmod efi_uga ++ insmod ieee1275_fb ++ insmod vbe ++ insmod vga ++ insmod video_bochs ++ insmod video_cirrus ++ fi ++} ++ ++load_video ++set gfxpayload=keep ++insmod gzio ++insmod part_gpt ++insmod ext2 ++ ++set timeout=60 ++### END /etc/grub.d/00_header ### ++ ++search --no-floppy --set=root -l '@ISOLABEL@' ++ ++### BEGIN /etc/grub.d/10_linux ### ++menuentry 'Install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os { ++ linux @KERNELPATH@ @ROOT@ ro ++ initrd @INITRDPATH@ ++} ++menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os { ++ linux @KERNELPATH@ @ROOT@ rd.live.check ++ initrd @INITRDPATH@ ++} ++submenu 'Troubleshooting -->' { ++ menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class red --class gnu-linux --class gnu --class os { ++ linux @KERNELPATH@ @ROOT@ nomodeset ++ initrd @INITRDPATH@ ++ } ++ menuentry 'Rescue a @PRODUCT@ system' --class red --class gnu-linux --class gnu --class os { ++ linux @KERNELPATH@ @ROOT@ rescue ++ initrd @INITRDPATH@ ++ } ++} +diff -Naur lorax-lorax-33.6-1.org/share/templates.d/99-generic/config_files/sw_64/grub.conf lorax-lorax-33.6-1.sw/share/templates.d/99-generic/config_files/sw_64/grub.conf +--- lorax-lorax-33.6-1.org/share/templates.d/99-generic/config_files/sw_64/grub.conf 1970-01-01 00:00:00.000000000 +0000 ++++ lorax-lorax-33.6-1.sw/share/templates.d/99-generic/config_files/sw_64/grub.conf 2022-08-22 13:51:37.250000000 +0000 +@@ -0,0 +1,13 @@ ++#debug --graphics ++default=0 ++splashimage=@SPLASHPATH@ ++timeout 5 ++hiddenmenu ++title Install @PRODUCT@ @VERSION@ ++ findiso ++ kernel @KERNELPATH@ @ROOT@ quiet ++ initrd @INITRDPATH@ ++title Test this media & install @PRODUCT@ @VERSION@ ++ findiso ++ kernel @KERNELPATH@ @ROOT@ rd.live.check quiet ++ initrd @INITRDPATH@ +diff -Naur lorax-lorax-33.6-1.org/share/templates.d/99-generic/live/config_files/sw_64/grub2-efi.cfg lorax-lorax-33.6-1.sw/share/templates.d/99-generic/live/config_files/sw_64/grub2-efi.cfg +--- lorax-lorax-33.6-1.org/share/templates.d/99-generic/live/config_files/sw_64/grub2-efi.cfg 1970-01-01 00:00:00.000000000 +0000 ++++ lorax-lorax-33.6-1.sw/share/templates.d/99-generic/live/config_files/sw_64/grub2-efi.cfg 2022-08-22 13:51:28.150000000 +0000 +@@ -0,0 +1,42 @@ ++set default="1" ++ ++function load_video { ++ if [ x$feature_all_video_module = xy ]; then ++ insmod all_video ++ else ++ insmod efi_gop ++ insmod efi_uga ++ insmod ieee1275_fb ++ insmod vbe ++ insmod vga ++ insmod video_bochs ++ insmod video_cirrus ++ fi ++} ++ ++load_video ++set gfxpayload=keep ++insmod gzio ++insmod part_gpt ++insmod ext2 ++ ++set timeout=60 ++### END /etc/grub.d/00_header ### ++ ++search --no-floppy --set=root -l '@ISOLABEL@' ++ ++### BEGIN /etc/grub.d/10_linux ### ++menuentry 'Start @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os { ++ linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet ++ initrd @INITRDPATH@ ++} ++menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os { ++ linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet ++ initrd @INITRDPATH@ ++} ++submenu 'Troubleshooting -->' { ++ menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class red --class gnu-linux --class gnu --class os { ++ linux @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image nomodeset quiet ++ initrd @INITRDPATH@ ++ } ++} +diff -Naur lorax-lorax-33.6-1.org/share/templates.d/99-generic/live/live-install.tmpl lorax-lorax-33.6-1.sw/share/templates.d/99-generic/live/live-install.tmpl +--- lorax-lorax-33.6-1.org/share/templates.d/99-generic/live/live-install.tmpl 2022-08-22 12:39:14.360000000 +0000 ++++ lorax-lorax-33.6-1.sw/share/templates.d/99-generic/live/live-install.tmpl 2022-08-22 13:54:42.420000000 +0000 +@@ -2,6 +2,10 @@ + <%page args="basearch"/> + + ## arch-specific bootloader packages ++%if basearch == "sw_64": ++ installpkg efibootmgr ++ installpkg grub2-efi shim ++%endif + %if basearch == "aarch64": + installpkg efibootmgr + installpkg grub2-efi-aa64-cdboot shim-aa64 +diff -Naur lorax-lorax-33.6-1.org/share/templates.d/99-generic/live/sw_64.tmpl lorax-lorax-33.6-1.sw/share/templates.d/99-generic/live/sw_64.tmpl +--- lorax-lorax-33.6-1.org/share/templates.d/99-generic/live/sw_64.tmpl 1970-01-01 00:00:00.000000000 +0000 ++++ lorax-lorax-33.6-1.sw/share/templates.d/99-generic/live/sw_64.tmpl 2022-08-22 14:09:31.440000000 +0000 +@@ -0,0 +1,84 @@ ++<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel, extra_boot_args"/> ++<% ++configdir="tmp/config_files/sw_64" ++PXEBOOTDIR="images/pxeboot" ++KERNELDIR=PXEBOOTDIR ++LIVEDIR="LiveOS" ++LORAXDIR="usr/share/lorax/" ++ ++## Don't allow spaces or escape characters in the iso label ++def valid_label(ch): ++ return ch.isalnum() or ch == '_' ++ ++isolabel = ''.join(ch if valid_label(ch) else '-' for ch in isolabel) ++ ++import os ++from os.path import basename ++from pylorax.sysutils import joinpaths ++ ++# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3 ++if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3: ++ isoargs = "-iso-level 3" ++else: ++ isoargs = "" ++%> ++ ++mkdir ${LIVEDIR} ++install ${runtime_img} ${LIVEDIR}/squashfs.img ++treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img ++ ++## install kernels ++mkdir ${KERNELDIR} ++%for kernel in kernels: ++ ## normal sw_64 ++ installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz ++ installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img ++%endfor ++ ++#FIXME: this will need adjusted when we have a real bootloader. ++## WHeeeeeeee, EFI. ++## We could remove the basearch restriction someday.. ++<% efiargs=""; efigraft="" %> ++%if exists("boot/efi/EFI/*/gcdaa64.efi"): ++ <% ++ efiarch32 = None ++ efiarch64 = 'AA64' ++ efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot) ++ images = ["images/efiboot.img"] ++ %> ++ %for img in images: ++ <% ++ efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img) ++ efigraft += " {0}={1}/{0}".format(img,outroot) ++ %> ++ treeinfo images-${basearch} ${img|basename} ${img} ++ %endfor ++ <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel, extra_boot_args=extra_boot_args"/> ++%endif ++ ++# Create optional product.img and updates.img ++<% filegraft=""; images=["product", "updates"] %> ++%for img in images: ++ %if exists("%s/%s/" % (LORAXDIR, img)): ++ installimg ${LORAXDIR}/${img}/ images/${img}.img ++ treeinfo images-${basearch} ${img}.img images/${img}.img ++ <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %> ++ %endif ++%endfor ++ ++# Add the license files ++%for f in glob("/usr/share/licenses/*-release/*"): ++ install ${f} ${f|basename} ++ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %> ++%endfor ++ ++%if exists("boot/efi/EFI/*/gcdaa64.efi"): ++## make boot.iso ++runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \ ++ ${efiargs} -R -J -V '${isolabel}' \ ++ -graft-points \ ++ ${KERNELDIR}=${outroot}/${KERNELDIR} \ ++ ${LIVEDIR}=${outroot}/${LIVEDIR} \ ++ ${efigraft} ${filegraft} ++treeinfo images-${basearch} boot.iso images/boot.iso ++%endif +diff -Naur lorax-lorax-33.6-1.org/share/templates.d/99-generic/runtime-install.tmpl lorax-lorax-33.6-1.sw/share/templates.d/99-generic/runtime-install.tmpl +--- lorax-lorax-33.6-1.org/share/templates.d/99-generic/runtime-install.tmpl 2022-08-22 12:39:14.370000000 +0000 ++++ lorax-lorax-33.6-1.sw/share/templates.d/99-generic/runtime-install.tmpl 2022-08-22 13:53:14.680000000 +0000 +@@ -32,6 +32,11 @@ + installpkg glibc-all-langpacks + + ## arch-specific packages (bootloaders etc.) ++%if basearch == "sw_64": ++ installpkg efibootmgr ++ installpkg grub2-efi shim4 ++ installpkg uboot-tools ++%endif + %if basearch == "aarch64": + installpkg efibootmgr + installpkg grub2-efi-aa64-cdboot shim-aa64 +@@ -129,7 +134,7 @@ + installpkg pciutils usbutils ipmitool + installpkg mt-st smartmontools + installpkg hdparm +-%if basearch not in ("aarch64", "ppc64le", "s390x"): ++%if basearch not in ("aarch64", "sw_64", "ppc64le", "s390x"): + installpkg pcmciautils + %endif + ## see bug #1483278 +@@ -137,7 +142,7 @@ + installpkg libmlx4 rdma-core + %endif + installpkg rng-tools +-%if basearch in ("i386", "x86_64", "aarch64"): ++%if basearch in ("i386", "x86_64", "aarch64", "sw_64"): + installpkg dmidecode + %endif + +diff -Naur lorax-lorax-33.6-1.org/share/templates.d/99-generic/sw_64.tmpl lorax-lorax-33.6-1.sw/share/templates.d/99-generic/sw_64.tmpl +--- lorax-lorax-33.6-1.org/share/templates.d/99-generic/sw_64.tmpl 1970-01-01 00:00:00.000000000 +0000 ++++ lorax-lorax-33.6-1.sw/share/templates.d/99-generic/sw_64.tmpl 2022-08-22 13:53:41.110000000 +0000 +@@ -0,0 +1,86 @@ ++<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel"/> ++<% ++configdir="tmp/config_files/sw_64" ++PXEBOOTDIR="images/pxeboot" ++KERNELDIR=PXEBOOTDIR ++STAGE2IMG="images/install.img" ++LORAXDIR="usr/share/lorax/" ++ ++import os ++from os.path import basename ++from pylorax.sysutils import joinpaths ++ ++# Test the runtime_img, if it is > 4GiB we need to set -iso-level to 3 ++if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3: ++ isoargs = "-iso-level 3" ++else: ++ isoargs = "" ++%> ++ ++mkdir images ++install ${runtime_img} ${STAGE2IMG} ++treeinfo stage2 mainimage ${STAGE2IMG} ++ ++## install kernels ++mkdir ${KERNELDIR} ++%for kernel in kernels: ++ ## normal sw_64 ++ installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz ++ installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img ++%endfor ++ ++#FIXME: this will need adjusted when we have a real bootloader. ++## WHeeeeeeee, EFI. ++## We could remove the basearch restriction someday.. ++<% efiargs=""; efigraft="" %> ++%if exists("boot/efi/EFI/*/gcdaa64.efi"): ++ <% ++ efiarch32 = None ++ efiarch64 = 'AA64' ++ efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot) ++ images = ["images/efiboot.img"] ++ %> ++ %for img in images: ++ <% ++ efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img) ++ efigraft += " {0}={1}/{0}".format(img,outroot) ++ %> ++ treeinfo images-${basearch} ${img|basename} ${img} ++ %endfor ++ <%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch32=efiarch32, efiarch64=efiarch64, isolabel=isolabel"/> ++%endif ++ ++# Create optional product.img and updates.img ++<% filegraft=""; images=["product", "updates"] %> ++%for img in images: ++ %if exists("%s/%s/" % (LORAXDIR, img)): ++ installimg ${LORAXDIR}/${img}/ images/${img}.img ++ treeinfo images-${basearch} ${img}.img images/${img}.img ++ <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %> ++ %endif ++%endfor ++ ++# Inherit iso-graft/ if it exists from external templates ++<% ++ import os ++ if os.path.exists(workdir + "/iso-graft"): ++ filegraft += " " + workdir + "/iso-graft" ++%> ++ ++# Add the license files ++%for f in glob("/usr/share/licenses/*-release/*"): ++ install ${f} ${f|basename} ++ <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %> ++%endfor ++ ++%if exists("boot/efi/EFI/*/gcdaa64.efi"): ++## make boot.iso ++runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \ ++ ${efiargs} -R -J -V '${isolabel}' \ ++ -graft-points \ ++ .discinfo=${outroot}/.discinfo \ ++ ${KERNELDIR}=${outroot}/${KERNELDIR} \ ++ ${STAGE2IMG}=${outroot}/${STAGE2IMG} \ ++ ${efigraft} ${filegraft} ++treeinfo images-${basearch} boot.iso images/boot.iso ++%endif +diff -Naur lorax-lorax-33.6-1.org/src/pylorax/api/compose.py lorax-lorax-33.6-1.sw/src/pylorax/api/compose.py +--- lorax-lorax-33.6-1.org/src/pylorax/api/compose.py 2022-08-22 12:39:14.370000000 +0000 ++++ lorax-lorax-33.6-1.sw/src/pylorax/api/compose.py 2022-08-22 13:58:13.730000000 +0000 +@@ -878,6 +878,7 @@ + "arm": ["alibaba", "ami", "google", "hyper-v", "vhd", "vmdk"], + "armhfp": ["alibaba", "ami", "google", "hyper-v", "vhd", "vmdk"], + "aarch64": ["alibaba", "google", "hyper-v", "vhd", "vmdk"], ++ "sw_64": ["alibaba", "google", "hyper-v", "vhd", "vmdk"], + "ppc": ["alibaba", "ami", "google", "hyper-v", "vhd", "vmdk"], + "ppc64": ["alibaba", "ami", "google", "hyper-v", "vhd", "vmdk"], + "ppc64le": ["alibaba", "ami", "google", "hyper-v", "vhd", "vmdk"], +diff -Naur lorax-lorax-33.6-1.org/src/pylorax/__init__.py lorax-lorax-33.6-1.sw/src/pylorax/__init__.py +--- lorax-lorax-33.6-1.org/src/pylorax/__init__.py 2022-08-22 12:39:14.370000000 +0000 ++++ lorax-lorax-33.6-1.sw/src/pylorax/__init__.py 2022-08-22 13:59:31.630000000 +0000 +@@ -64,10 +64,11 @@ + DEFAULT_PLATFORM_ID = "platform:f32" + + class ArchData(DataHolder): +- lib64_arches = ("x86_64", "ppc64le", "s390x", "ia64", "aarch64") ++ lib64_arches = ("x86_64", "ppc64le", "s390x", "ia64", "aarch64", "sw_64") + bcj_arch = dict(i386="x86", x86_64="x86", + ppc64le="powerpc", +- arm="arm", armhfp="arm") ++ arm="arm", armhfp="arm", ++ sw_64="sw_64") + + def __init__(self, buildarch): + super(ArchData, self).__init__() +diff -Naur lorax-lorax-33.6-1.org/src/pylorax/installer.py lorax-lorax-33.6-1.sw/src/pylorax/installer.py +--- lorax-lorax-33.6-1.org/src/pylorax/installer.py 2022-08-22 12:39:14.370000000 +0000 ++++ lorax-lorax-33.6-1.sw/src/pylorax/installer.py 2022-08-22 13:58:02.260000000 +0000 +@@ -140,6 +140,7 @@ + "i386": "qemu-system-i386", + "arm": "qemu-system-arm", + "aarch64": "qemu-system-aarch64", ++ "sw_64": "qemu-system-sw_64", + "ppc64le": "qemu-system-ppc64" + } + +diff -Naur lorax-lorax-33.6-1.org/src/pylorax/treebuilder.py lorax-lorax-33.6-1.sw/src/pylorax/treebuilder.py +--- lorax-lorax-33.6-1.org/src/pylorax/treebuilder.py 2022-08-22 12:39:14.380000000 +0000 ++++ lorax-lorax-33.6-1.sw/src/pylorax/treebuilder.py 2022-08-22 13:58:31.260000000 +0000 +@@ -40,6 +40,7 @@ + 's390': 's390.tmpl', + 's390x': 's390.tmpl', + 'aarch64': 'aarch64.tmpl', ++ 'sw_64': 'sw_64.tmpl', + 'arm': 'arm.tmpl', + 'armhfp': 'arm.tmpl', + } +diff -Naur lorax-lorax-33.6-1.org/src/sbin/mkksiso lorax-lorax-33.6-1.sw/src/sbin/mkksiso +--- lorax-lorax-33.6-1.org/src/sbin/mkksiso 2022-08-22 12:39:14.380000000 +0000 ++++ lorax-lorax-33.6-1.sw/src/sbin/mkksiso 2022-08-22 14:01:51.780000000 +0000 +@@ -158,6 +158,28 @@ + raise RuntimeError("implantisomd5 failed") + + ++class Mkisofs_sw_64(MakeISOTool): ++ """Use the mkisofs tool to create the final iso (sw_64)""" ++ tools = ["mkisofs", "implantisomd5"] ++ arches = ["sw_64", "sw_64"] ++ ++ def run(self, tmpdir, grafts, volume_name, output_iso, efimode=NO_EFI): ++ cmd = ["mkisofs", "-o", output_iso, "-R", "-J", "-V", volume_name, ++ "-T"] ++ if log.root.level < log.INFO: ++ cmd.append("--verbose") ++ if efimode > NO_EFI: ++ cmd.extend(["-eltorito-alt-boot", "-e", "images/efiboot.img", "-no-emul-boot"]) ++ if efimode > EFIBOOT: ++ cmd.extend(["-eltorito-alt-boot", "-e", "images/macboot.img", "-no-emul-boot"]) ++ ++ if self.check_file_sizes(grafts): ++ cmd.append("-allow-limited-size") ++ ++ # Create the iso and implant the md5 checksums ++ self._exec(cmd, grafts, output_iso, implantmd5=True) ++ ++ + class Mkisofs_aarch64(MakeISOTool): + """Use the mkisofs tool to create the final iso (aarch64)""" + tools = ["mkisofs", "implantisomd5"] +@@ -268,6 +290,28 @@ + self._exec(cmd, grafts, output_iso, efimode, implantmd5=True) + + ++class Xorrisofs_sw_64(MakeISOTool): ++ """Use the xorrisofs tool to create the final iso (sw_64)""" ++ tools = ["xorrisofs", "implantisomd5"] ++ requirements = [] ++ arches = ["sw_64", "sw_64"] ++ ++ def run(self, tmpdir, grafts, volume_name, output_iso, efimode): ++ cmd = ["xorrisofs", "-o", output_iso, ++ "-R", "-J", "-V", volume_name] ++ if log.root.level < log.INFO: ++ cmd.append("--verbose") ++ if efimode == EFIBOOT: ++ cmd.extend(["-eltorito-alt-boot", "-e", "images/efiboot.img", "-no-emul-boot"]) ++ if efimode == MACBOOT: ++ cmd.extend(["-eltorito-alt-boot", "-e", "images/macboot.img", "-no-emul-boot"]) ++ ++ if self.check_file_sizes(grafts): ++ cmd.extend(["-iso-level", "3"]) ++ ++ # Create the iso and implant the md5 checksums ++ self._exec(cmd, grafts, output_iso, implantmd5=True) ++ + class Xorrisofs_aarch64(MakeISOTool): + """Use the xorrisofs tool to create the final iso (aarch64)""" + tools = ["xorrisofs", "implantisomd5"] +@@ -361,10 +405,10 @@ + + + # xorrisofs based classes +-XorrisofsTools = [Xorrisofs_aarch64, Xorrisofs_ppc64le, Xorrisofs_s390, Xorrisofs_x86_64] ++XorrisofsTools = [Xorrisofs_aarch64, Xorrisofs_sw_64, Xorrisofs_ppc64le, Xorrisofs_s390, Xorrisofs_x86_64] + + # mkisofs based classes +-MkisofsTools = [Mkisofs_aarch64, Mkisofs_ppc, Mkisofs_ppc64le, Mkisofs_s390, Mkisofs_x86_64] ++MkisofsTools = [Mkisofs_aarch64, Mkisofs_sw_64, Mkisofs_ppc, Mkisofs_ppc64le, Mkisofs_s390, Mkisofs_x86_64] + + + class MakeKickstartISO(): +diff -Naur lorax-lorax-33.6-1.org/tests/cli/test_build_and_deploy_aws.sh lorax-lorax-33.6-1.sw/tests/cli/test_build_and_deploy_aws.sh +--- lorax-lorax-33.6-1.org/tests/cli/test_build_and_deploy_aws.sh 2022-08-22 12:39:14.380000000 +0000 ++++ lorax-lorax-33.6-1.sw/tests/cli/test_build_and_deploy_aws.sh 2022-08-22 13:55:26.230000000 +0000 +@@ -138,6 +138,9 @@ + + # create an image from the imported selected snapshot + AMI_ARCH="$(uname -m)" ++ if [ "$AMI_ARCH" == "sw_64" ]; then ++ AMI_ARCH="sw_64" ++ fi + if [ "$AMI_ARCH" == "aarch64" ]; then + AMI_ARCH="arm64" + fi +@@ -158,6 +161,9 @@ + + rlPhaseStartTest "Start EC2 instance" + INSTANCE_TYPE="t2.small" ++ if [ "$(uname -m)" == "sw_64" ]; then ++ INSTANCE_TYPE="a1.medium" ++ fi + if [ "$(uname -m)" == "aarch64" ]; then + INSTANCE_TYPE="a1.medium" + fi +diff -Naur lorax-lorax-33.6-1.org/tests/cli/test_compose_sanity.sh lorax-lorax-33.6-1.sw/tests/cli/test_compose_sanity.sh +--- lorax-lorax-33.6-1.org/tests/cli/test_compose_sanity.sh 2022-08-22 12:39:14.380000000 +0000 ++++ lorax-lorax-33.6-1.sw/tests/cli/test_compose_sanity.sh 2022-08-22 13:55:57.840000000 +0000 +@@ -18,6 +18,10 @@ + # ami is supported on aarch64 + rlAssertEquals "lists all supported types" \ + "`$CLI compose types | xargs`" "ami ext4-filesystem live-iso liveimg-tar openstack partitioned-disk qcow2 tar" ++ elif [ "$(uname -m)" == "sw_64" ]; then ++ # ami is supported on sw_64 ++ rlAssertEquals "lists all supported types" \ ++ "`$CLI compose types | xargs`" "ami ext4-filesystem live-iso liveimg-tar openstack partitioned-disk qcow2 tar" + else + # non-x86 architectures disable alibaba + rlAssertEquals "lists all supported types" \ +diff -Naur lorax-lorax-33.6-1.org/tests/pylorax/test_compose.py lorax-lorax-33.6-1.sw/tests/pylorax/test_compose.py +--- lorax-lorax-33.6-1.org/tests/pylorax/test_compose.py 2022-08-22 12:39:14.400000000 +0000 ++++ lorax-lorax-33.6-1.sw/tests/pylorax/test_compose.py 2022-08-22 13:56:30.350000000 +0000 +@@ -818,6 +818,7 @@ + # A package for each arch to test for + arch_pkg = { + "aarch64": "shim-aa64", ++ "sw_64": "shim", + "arm": "grub2-efi-arm-cdboot", + "armhfp": "grub2-efi-arm-cdboot", + "x86_64": "shim-x64", +diff -Naur lorax-lorax-33.6-1.org/tests/pylorax/test_creator.py lorax-lorax-33.6-1.sw/tests/pylorax/test_creator.py +--- lorax-lorax-33.6-1.org/tests/pylorax/test_creator.py 2022-08-22 12:39:14.400000000 +0000 ++++ lorax-lorax-33.6-1.sw/tests/pylorax/test_creator.py 2022-08-22 13:56:59.670000000 +0000 +@@ -54,6 +54,7 @@ + "s390x": ("xz", []), + "ia64": ("xz", []), + "aarch64": ("xz", []) ++ "sw_64": ("xz", ["-Xbcj", "sw_64"]) + } + + for arch in test_arches: diff --git a/lorax.spec b/lorax.spec index 5e32f359300987a1ac8d9f3d44a16debb7419346..2ae5d7c81cd76496ee8f1028e012382993c2126c 100644 --- a/lorax.spec +++ b/lorax.spec @@ -3,7 +3,7 @@ Name: lorax Version: 33.6 -Release: 6 +Release: 7 Summary: A set of tools used to create bootable images License: GPLv2+ URL: https://github.com/weldr/lorax @@ -25,6 +25,7 @@ Patch12: backport-Improve-lmc-no-virt-error-handling.patch Patch13: backport-Add-POSTIN-scriptlet-error-to-the-log-monitor-list.patch Patch14: backport-Remove-LD_PRELOAD-libgomp.so.1-from-lmc-no-virt.patch Patch15: backport-runtime-install-don-t-install-notification-daemon.patch +Patch16: lorax-lorax-33.6-1-sw.patch BuildRequires: python3-devel python3-sphinx_rtd_theme python3-magic BuildRequires: python3-pytest-mock python3-pocketlint python3-gevent @@ -132,6 +133,7 @@ build images, etc. from the command line. %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 %build %make_build @@ -197,9 +199,12 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin %{_datadir}/lorax/composer/* %{_datadir}/lorax/lifted/* %{_tmpfilesdir}/lorax-composer.conf +%ifarch sw_64 +%else %dir %attr(0771, root, weldr) %{_sharedstatedir}/lorax/composer/ %dir %attr(0771, root, weldr) %{_sharedstatedir}/lorax/composer/blueprints/ %attr(0771, weldr, weldr) %{_sharedstatedir}/lorax/composer/blueprints/* +%endif %files -n composer-cli %defattr(-,root,root,-) @@ -213,6 +218,9 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin %{_mandir}/man1/*.1* %changelog +* Mon Oct 24 2022 wuzx - 33.6-7 +- add sw64 patch + * Sat Jan 08 2022 xihaochen - 33.6-6 - Type:requriements - Id:NA