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

crypto-policies rpm install error in mock environment

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

    • crypto-policies-20241128-1.git0dd441c.el10
    • None
    • Moderate
    • 1
    • rhel-security-crypto
    • ssg_security
    • 20
    • 0.1
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • CentOS Stream
    • Crypto24Q4
    • Hide

      Error from missing rm in %pre is suppressed (since missing rm only happens in first transaction, and there's nothing to rm at this point) [SanityOnly and/or one time manual testing]

      Show
      Error from missing rm in %pre is suppressed (since missing rm only happens in first transaction, and there's nothing to rm at this point) [SanityOnly and/or one time manual testing]
    • Pass
    • Not Needed
    • Manual
    • Release Note Not Required
    • x86_64
    • None

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

      I was preparing a mock root for building a package and noticed:

      $ mock -r centos-stream-10-x86_64 clean --scrub=all
      $ mock -r centos-stream-10-x86_64 init
      [cut]
        Installing       : elfutils-libelf-0.192-4.el10.x86_64                                          40/142 
        Running scriptlet: crypto-policies-20241106-2.git7073416.el10.noarch    41/142 
      /var/tmp/rpm-tmp.0Qrbd1: line 13: rm: command not found
        Installing       : crypto-policies-20241106-2.git7073416.el10.noarch          41/142 
        Running scriptlet: crypto-policies-20241106-2.git7073416.el10.noarch    41/142 
        Installing       : gdbm-libs-1:1.23-9.el10.x86_64                                             42/142 
        Installing       : libeconf-0.6.2-4.el10.x86_64                   
      [cut]
        Installing       : coreutils-9.5-5.el10.x86_64                                                    98/142
      [cut]
      

      I guess the failing command is https://gitlab.com/redhat/centos-stream/rpms/crypto-policies/-/blob/c10s/crypto-policies.spec?ref_type=heads#L178

      as the spec file lacks a Requires(pre) on coreutils which get installed only later so the rm command is missing when the pre script is executed.

      What is the impact of this issue to you?

      No impact, just reporting the issue

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

      crypto-policies-20241106-2.git7073416.el10

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. mock -r centos-stream-10-x86_64 clean --scrub=all
      2. mock -r centos-stream-10-x86_64 init

      Expected results

      no error about missing rm command

      Actual results

      /var/tmp/rpm-tmp.0Qrbd1: line 13: rm: command not found

              asosedki@redhat.com Alexander Sosedkin
              rhn-support-sbonazzo Sandro Bonazzola
              Alexander Sosedkin Alexander Sosedkin
              Ondrej Moris Ondrej Moris
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: