Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-94580

[RHEL-9] Sync lorax and lorax-templates-rhel where possible

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • No
    • None
    • image-builder-1
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      Templates included in lorax-templates-generic-34.9.27-1.el9 and lorax-templates-rhel-9.6-2.el9_6 (on RHEL-9.7.0-20250521.6) differ at several places:

      # diff -r -u0 /usr/share/lorax/templates.d/80-rhel /usr/share/lorax/templates.d/99-generic
      diff -r -u0 /usr/share/lorax/templates.d/80-rhel/appliance/libvirt.tmpl /usr/share/lorax/templates.d/99-generic/appliance/libvirt.tmpl
      --- /usr/share/lorax/templates.d/80-rhel/appliance/libvirt.tmpl	2025-02-18 13:21:05.000000000 -0500
      +++ /usr/share/lorax/templates.d/99-generic/appliance/libvirt.tmpl	2025-03-20 17:05:37.000000000 -0400
      @@ -12 +12 @@
      -%for disk, letter in zip(disks, xrange(97, 123)):
      +%for disk, letter in zip(disks, range(97, 123)):
      diff -r -u0 /usr/share/lorax/templates.d/80-rhel/arm.tmpl /usr/share/lorax/templates.d/99-generic/arm.tmpl
      --- /usr/share/lorax/templates.d/80-rhel/arm.tmpl	2025-02-18 13:21:05.000000000 -0500
      +++ /usr/share/lorax/templates.d/99-generic/arm.tmpl	2025-03-20 17:05:37.000000000 -0400
      @@ -1 +1 @@
      -<%page args="kernels, runtime_img, runtime_base, basearch, outroot, arch"/>
      +<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot, arch"/>
      @@ -14,0 +15 @@
      +import os
      @@ -15,0 +17,7 @@
      +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 = ""
      @@ -40,0 +49,18 @@
      +<% efiargs=""; efigraft="" %>
      +%if exists("boot/efi/EFI/*/gcdaa64.efi"):
      +    <%
      +    efiarch32 = ARM
      +    efiarch64 = None
      +    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
      +
      @@ -45 +71 @@
      -<% images=["product", "updates"] %>
      +<% filegraft=""; images=["product", "updates"] %>
      @@ -49,0 +76 @@
      +        <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %>
      @@ -52,0 +80,7 @@
      +# Inherit iso-graft/ if it exists from external templates
      +<%
      +    import os
      +    if os.path.exists(workdir + "/iso-graft"):
      +        filegraft += " " + workdir + "/iso-graft"
      +%>
      +
      @@ -54 +88 @@
      -%for f in glob("/usr/share/licenses/*-release/*"):
      +%for f in glob("usr/share/licenses/*-release-common/*"):
      @@ -55,0 +90 @@
      +    <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %>
      @@ -58 +93,11 @@
      -## FIXME: ARM may need some extra boot config
      +%if exists("boot/efi/EFI/*/gcdarm.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
      Only in /usr/share/lorax/templates.d/80-rhel/config_files/ppc: mapping
      Only in /usr/share/lorax/templates.d/80-rhel/config_files/ppc: ofboot.b
      Only in /usr/share/lorax/templates.d/80-rhel/config_files/ppc: yaboot.conf.3264
      Only in /usr/share/lorax/templates.d/80-rhel/config_files/ppc: yaboot.conf.in
      Only in /usr/share/lorax/templates.d/80-rhel/live/config_files/ppc: mapping
      Only in /usr/share/lorax/templates.d/80-rhel/live/config_files/ppc: ofboot.b
      Only in /usr/share/lorax/templates.d/80-rhel/live/config_files/ppc: yaboot.conf.3264
      Only in /usr/share/lorax/templates.d/80-rhel/live/config_files/ppc: yaboot.conf.in
      diff -r -u0 /usr/share/lorax/templates.d/80-rhel/live/live-install.tmpl /usr/share/lorax/templates.d/99-generic/live/live-install.tmpl
      --- /usr/share/lorax/templates.d/80-rhel/live/live-install.tmpl	2025-02-18 13:21:05.000000000 -0500
      +++ /usr/share/lorax/templates.d/99-generic/live/live-install.tmpl	2025-03-20 17:05:37.000000000 -0400
      @@ -23 +23 @@
      -%if basearch in ("ppc64le"):
      +%if basearch == "ppc64le":
      Only in /usr/share/lorax/templates.d/80-rhel/live: ppc.tmpl
      Only in /usr/share/lorax/templates.d/80-rhel: ppc.tmpl
      diff -r -u0 /usr/share/lorax/templates.d/80-rhel/runtime-cleanup.tmpl /usr/share/lorax/templates.d/99-generic/runtime-cleanup.tmpl
      --- /usr/share/lorax/templates.d/80-rhel/runtime-cleanup.tmpl	2025-02-18 13:21:05.000000000 -0500
      +++ /usr/share/lorax/templates.d/99-generic/runtime-cleanup.tmpl	2025-03-20 17:05:37.000000000 -0400
      @@ -156 +156 @@
      -removefrom coreutils /usr/bin/sha512sum /usr/bin/shuf
      +removefrom coreutils /usr/bin/sha512sum /usr/bin/shuf /usr/bin/stat
      @@ -188,3 +188,4 @@
      -removefrom glibc */${libdir}/libBrokenLocale*
      -removefrom glibc */${libdir}/libSegFault* */${libdir}/libanl*
      -removefrom glibc */${libdir}/libnss_compat*
      +removefrom glibc /lib/*/nosegneg/* /${libdir}/libBrokenLocale*
      +removefrom glibc /${libdir}/libSegFault* /${libdir}/libanl*
      +removefrom glibc /${libdir}/libcidn* /${libdir}/libnss_compat*
      +removefrom glibc /${libdir}/libnss_hesiod* /${libdir}/libnss_nis*
      @@ -192 +193,2 @@
      -removefrom glibc /usr/libexec/* /usr/*bin/iconvconfig
      +removefrom glibc /${libdir}/rtkaio* /sbin/sln
      +removefrom glibc /usr/libexec/* /usr/sbin/*
      @@ -195 +197 @@
      -removefrom glibc-common /usr/bin/locale /usr/bin/sprof
      +removefrom glibc-common /usr/bin/locale /usr/bin/rpcgen /usr/bin/sprof
      @@ -197,2 +199,2 @@
      -removefrom glibc-common pusr/bin/tzselect
      -removefrom glibc-common /usr/*bin/zic
      +removefrom glibc-common /usr/bin/tzselect
      +removefrom glibc-common /usr/libexec/* /usr/sbin/*
      @@ -280,0 +283 @@
      +removefrom openssl /etc/pki/* /usr/bin/* /usr/${libdir}/openssl/*
      

      Please, review the changes and sync the templates where possible.

      Please provide the package NVR for which bug is seen:

      lorax-templates-rhel-9.6-2.el9_6
      lorax-templates-generic-34.9.27-1.el9

              brlane@redhat.com Brian Lane
              rhn-support-jikortus Jiri Kortus
              Brian Lane Brian Lane
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: