From f7e1962da4d6eef3baa90c62853f461c2f8c63bb Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Thu, 17 Oct 2024 13:08:11 -0700 Subject: [PATCH] Build RPM 4.20.0 --- 99-rpm.sh | 68 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/99-rpm.sh b/99-rpm.sh index 6e60e67..1efe073 100644 --- a/99-rpm.sh +++ b/99-rpm.sh @@ -1,18 +1,16 @@ #!/bin/bash -### First using RPM 4.19.x and then I'll try latest - if [ "`whoami`" == "root" ]; then echo "Danger, Will Robinson!" echo "Do not execute me as r00t" exit 1 fi -TARBALL="rpm-4.18.2.tar.bz2" -DNL="https://ftp.osuosl.org/pub/rpm/releases/rpm-4.18.x/rpm-4.18.2.tar.bz2" -SHA256="ba7eee1bc2c6f83be73c0a40d159c625cbaed976b3ac044233404fb25ae1b979" +TARBALL="rpm-4.20.0.tar.bz2" +DNL="https://ftp.osuosl.org/pub/rpm/releases/rpm-4.20.x/rpm-4.20.0.tar.bz2" +SHA256="56ff7638cff98b56d4a7503ff59bc79f281a6ddffcda0d238c082bedfb5fbe7b" -[ -d rpm-4.18.2 ] && rm -rf rpm-4.18.2 +[ -d rpm-4.20.0 ] && rm -rf rpm-4.20.0 if [ ! -f ${TARBALL} ]; then wget ${DNL} @@ -23,26 +21,54 @@ if [ ! -f ${TARBALL} ]; then fi fi +# no git client in bootstrap phase so... +if [ ! -f rpmpgp-legacy.zip ]; then + rm -f master.zip + wget https://github.com/rpm-software-management/rpmpgp_legacy/archive/refs/heads/master.zip + mv master.zip rpmpgp-legacy.zip +fi + CHECK="`sha256sum ${TARBALL} |awk ' { print $1 } ' `" if [ "${CHECK}" != "${SHA256}" ]; then echo "${TARBALL} does not match expected SHA256. Sorry." exit 1 fi -tar -jxf ${TARBALL} && cd rpm-4.18.2 +tar -jxf ${TARBALL} && cd rpm-4.20.0 +cd rpmio +cp ../../rpmpgp-legacy.zip . +unzip rpmpgp-legacy.zip +mv rpmpgp_legacy-master rpmpgp_legacy +cd .. -./configure \ - --prefix=/usr \ - --libdir=/usr/lib \ - --enable-zstd=yes \ - --enable-libelf=yes \ - --enable-ndb \ - --enable-sqlite=yes \ - --disable-rpath \ - --enable-python \ - --with-crypto=libgcrypt \ - --disable-inhibit-plugin \ - --with-cap \ - --with-acl > ../RPM-CONFIGURE.TXT 2>&1 +mkdir _build +cd _build -echo "Inspect RPM-CONFIGURE.TXT for dependency issues." +#cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \ +# -DWITH_SELINUX=OFF \ +# -DWITH_SEQUOIA=OFF \ +# -DWITH_LEGACY_OPENPGP=ON \ +# -DENABLE_TESTSUITE=OFF -L .. +#exit +cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DWITH_SELINUX=OFF \ + -DWITH_SEQUOIA=OFF \ + -DWITH_LEGACY_OPENPGP=ON \ + -DENABLE_TESTSUITE=OFF .. +if [ $? -ne 0 ]; then + echo "CMake configuration failed for RPM. Sorry." + exit 1 +fi + +make +if [ $? -ne 0 ]; then + echo "Failed building RPM. Sorry." + exit 1 +fi + +echo +echo "As the root user:" +echo +echo " cd rpm-4.20.0/_build" +echo " make install" +echo