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

RPMs with pre-trans non-lua scriptlets fail to install

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.3.0, rhel-10.1
    • osbuild-composer
    • None
    • Low
    • rhel-sst-image-builder
    • ssg_front_door
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      Certain packages like cuda-drivers have a non-lua pretrans scriptlet. Such scriptlets require the presence of /bin/sh in the target root. Since Image Builder installs all packages in one big transaction to an empty root, an installation of such a package inevitably fails because there's obviosuly no /bin/sh in the root before the transaction.

      An example of such a scriptlet:

      if [ -x /usr/bin/nvidia-uninstall ]; then
          echo "Removing existing driver runfile install"
          /usr/bin/nvidia-uninstall -s || :
      fi

       

      Should be simple to reproduce this with the cuda package from https://developer.download.nvidia.com/compute/cuda/repos/fedora39/x86_64/

      The error that can be found in osbuild-composer's logs is similar to this one:

      error: Failed dependencies:
              /bin/sh is needed by cuda-drivers-550.54.14-1.x86_64
      Traceback (most recent call last):
        File "/run/osbuild/bin/org.osbuild.rpm", line 382, in <module>
          r = main(args["tree"], args["inputs"], args["options"])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/run/osbuild/bin/org.osbuild.rpm", line 338, in main
          subprocess.run([
        File "/usr/lib64/python3.12/subprocess.py", line 571, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['rpm', '--verbose', '--root', '/run/osbuild/tree', '--nosignature', '--install', '/tmp/manifest.o4c0pxvl']' returned non-zero exit status 254.

              osbuilders Osbuilders Bot Account
              obudai@redhat.com Ondrej Budai
              Osbuilders Bot Account Osbuilders Bot Account
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated: