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

unable to install rootfiles in a bootable container image

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-9.6
    • rhel-9.4
    • rootfiles
    • No
    • None
    • rhel-sst-cs-system-management
    • ssg_core_services
    • 2
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • x86_64
    • None

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

      Install rootfiles package in a bootable container image at build time

      What is the impact of this issue to you?

      We are unable to create a RHEL for Edge bootable container image

      Please provide the package NVR for which the bug is seen:

      rootfiles-8.1-31.el9

      How reproducible is this bug?:

      Every time

      Steps to reproduce:

      Create a simple Containerfile that attempts to insetall the `rootfiles` package:

      $ cat Containerfile.rootfiles 
      FROM registry.redhat.io/rhel9/rhel-bootc
      RUN dnf -y install rootfiles && dnf clean all
      

      Try to build the container image with podman build:

      podman build --pull=newer -t rhel-bootc-rootfiles -f Containerfile.rootfiles .
      

      Expected results

      Container image successfully built

      Actual results

      $ podman build --pull=newer -t rhel-bootc-rootfiles -f Containerfile.rootfiles .
      STEP 1/2: FROM registry.redhat.io/rhel9/rhel-bootc
      STEP 2/2: RUN dnf -y install rootfiles && dnf clean all
      Updating Subscription Management repositories.
      Unable to read consumer identity
      subscription-manager is operating in container mode.
      
      This system is not registered with an entitlement server. You can use subscription-manager to register.
      
      Red Hat Enterprise Linux 9 for x86_64 - AppStre  11 MB/s |  40 MB     00:03    
      Red Hat Enterprise Linux 9 for x86_64 - BaseOS  8.7 MB/s |  31 MB     00:03    
      Last metadata expiration check: 0:00:09 ago on Thu Sep 12 19:47:18 2024.
      Dependencies resolved.
      ================================================================================
       Package      Arch      Version          Repository                        Size
      ================================================================================
      Installing:
       rootfiles    noarch    8.1-31.el9       rhel-9-for-x86_64-baseos-rpms     11 k
      
      Transaction Summary
      ================================================================================
      Install  1 Package
      
      Total download size: 11 k
      Installed size: 817  
      Downloading Packages:
      rootfiles-8.1-31.el9.noarch.rpm                  62 kB/s |  11 kB     00:00    
      --------------------------------------------------------------------------------
      Total                                            61 kB/s |  11 kB     00:00     
      Red Hat Enterprise Linux 9 for x86_64 - BaseOS  3.5 MB/s | 3.6 kB     00:00    
      Importing GPG key 0xFD431D51:
       Userid     : "Red Hat, Inc. (release key 2) <security@redhat.com>"
       Fingerprint: 567E 347A D004 4ADE 55BA 8A5F 199E 2F91 FD43 1D51
       From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
      Key imported successfully
      Importing GPG key 0x5A6340B3:
       Userid     : "Red Hat, Inc. (auxiliary key 3) <security@redhat.com>"
       Fingerprint: 7E46 2425 8C40 6535 D56D 6F13 5054 E4A4 5A63 40B3
       From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
      Key imported successfully
      Running transaction check
      Transaction check succeeded.
      Running transaction test
      Transaction test succeeded.
      Running transaction
        Preparing        :                                                        1/1 
        Installing       : rootfiles-8.1-31.el9.noarch                            1/1 
      error: failed to open dir root of /root/: File exists
      
      Error unpacking rpm package rootfiles-8.1-31.el9.noarch
        Verifying        : rootfiles-8.1-31.el9.noarch                            1/1 
      Installed products updated.
      Error: Transaction failed
      
      Failed:
        rootfiles-8.1-31.el9.noarch                                                   
      
      Error: building at STEP "RUN dnf -y install rootfiles && dnf clean all": while running runtime: exit status 1
      

      Extra Info

      This is also reported in Fedora - https://bugzilla.redhat.com/show_bug.cgi?id=2260104

      And there is a PR to the Fedora rpm dist-git with a fix - https://src.fedoraproject.org/rpms/rootfiles/pull-request/5

      I can confirm that with a version of rootfiles with the PR applied, I can successfully build the container image.

              rhn-support-mosvald Martin Osvald
              miabbott@redhat.com Micah Abbott
              Ondrej Vasik Ondrej Vasik
              Frantisek Hrdina Frantisek Hrdina
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: