Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31480

RPM packages fail to install because they require /bin/sh for %pretrans

    XMLWordPrintable

Details

    Description

      The RPM packages for 10.4.29 and 10.4.30 under:

      https://mirror.mariadb.org/yum/10.4/centos8-amd64/rpms/

      have added a %pretrans scriptlet interpreter requirement of /bin/sh. This makes it impossible to add them to a clean initial installation transaction (e.g., including them on a custom ISO for kickstarted install, or adding them to a fully clean bootstrap with an uninitialized rpmdb for OCI/similar builds).

      Given that none of the packages appear to have a non-empty %pretrans scriptlet, and given that no RPM should ever use an interpreter other than the embedded Lua engine during %pretrans, whichever tool is being used to create these RPMs should be configured to omit any requirement for %pretrans time.

      Quick script showing the problem:

      $ cat show-mariadb-pretrans 
      #!/bin/sh
      ls MariaDB*.rpm
      echo
      tblfmt='%s\t%s\t%s\t%s\n'
      {
          versions=( 10.4.28 10.4.29 10.4.30 )
          printf "${tblfmt}" subpackage "${versions[@]}"
          for n in backup client common compat server shared; do
              z=( )
              for v in "${versions[@]}"; do
                  f=MariaDB-$n-$v-1.el8.x86_64.rpm
                  z+=( "'$(rpm -q --scripts -p $f 2> /dev/null | grep pretrans)'" )
              done
              printf "${tblfmt}" ${n} "${z[@]}"
          done
      } | column -o'    ' -s'	' -t
      echo
      $ ./show-mariadb-pretrans 
      MariaDB-backup-10.4.28-1.el8.x86_64.rpm  MariaDB-common-10.4.28-1.el8.x86_64.rpm  MariaDB-server-10.4.28-1.el8.x86_64.rpm
      MariaDB-backup-10.4.29-1.el8.x86_64.rpm  MariaDB-common-10.4.29-1.el8.x86_64.rpm  MariaDB-server-10.4.29-1.el8.x86_64.rpm
      MariaDB-backup-10.4.30-1.el8.x86_64.rpm  MariaDB-common-10.4.30-1.el8.x86_64.rpm  MariaDB-server-10.4.30-1.el8.x86_64.rpm
      MariaDB-client-10.4.28-1.el8.x86_64.rpm  MariaDB-compat-10.4.28-1.el8.x86_64.rpm  MariaDB-shared-10.4.28-1.el8.x86_64.rpm
      MariaDB-client-10.4.29-1.el8.x86_64.rpm  MariaDB-compat-10.4.29-1.el8.x86_64.rpm  MariaDB-shared-10.4.29-1.el8.x86_64.rpm
      MariaDB-client-10.4.30-1.el8.x86_64.rpm  MariaDB-compat-10.4.30-1.el8.x86_64.rpm  MariaDB-shared-10.4.30-1.el8.x86_64.rpm
       
      subpackage    10.4.28    10.4.29                        10.4.30
      backup        ''         'pretrans program: /bin/sh'    'pretrans program: /bin/sh'
      client        ''         'pretrans program: /bin/sh'    'pretrans program: /bin/sh'
      common        ''         'pretrans program: /bin/sh'    'pretrans program: /bin/sh'
      compat        ''         'pretrans program: /bin/sh'    'pretrans program: /bin/sh'
      server        ''         'pretrans program: /bin/sh'    'pretrans program: /bin/sh'
      shared        ''         'pretrans program: /bin/sh'    'pretrans program: /bin/sh'
       
      $ 
      

      I wasn't sure if the MDEV project was the right place for this, being a packaging concern rather than a "real" bug, but I didn't see a more appropriate-looking spot for it, sorry if I missed something.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            rsandwick@sciencelogic.com Raynard Sandwick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.