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.
It turned out that 10.4.28 was built with cmake 3.11.4 and 10.4.29 was built with the latest (in rhel8 repos) cmake 3.20.2.
In 3.18 cpack got the support of %pretrans and %posttrans scriptlets: https://cmake.org/cmake/help/v3.18/release/3.18.html#cpack
I think this could be qualified as a cmake bug. I'll report it to kitware/cmake