From 5446e99074f6828f02fea32a5a6d815993be49db Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Thu, 17 Oct 2024 01:57:59 -0700 Subject: [PATCH] swig and audit --- 30-swig.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 31-audit.sh | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 17 ++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 30-swig.sh create mode 100644 31-audit.sh diff --git a/30-swig.sh b/30-swig.sh new file mode 100644 index 0000000..3625d3f --- /dev/null +++ b/30-swig.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +if [ "`whoami`" == "root" ]; then + echo "Danger, Will Robinson!" + echo "Do not execute me as r00t" + exit 1 +fi + +TARBALL="swig-4.2.1.tar.gz" +DNL="https://downloads.sourceforge.net/swig/swig-4.2.1.tar.gz" +SHA256="fa045354e2d048b2cddc69579e4256245d4676894858fcf0bab2290ecf59b7d8" + +[ -d swig-4.2.1 ] && rm -rf swig-4.2.1 + +if [ ! -f ${TARBALL} ]; then + wget ${DNL} + if [ $? -ne 0 ]; then + echo "Could not retrieve ${DNL}" + echo "Sorry." + exit 1 + fi +fi + +CHECK="`sha256sum ${TARBALL} |awk ' { print $1 } ' `" +if [ "${CHECK}" != "${SHA256}" ]; then + echo "${TARBALL} does not match expected SHA256. Sorry." + exit 1 +fi + +tar -zxf ${TARBALL} && cd swig-4.2.1 + +./configure --prefix=/usr \ + --without-javascript \ + --without-maximum-compile-warnings +if [ $? -ne 0 ]; then + echo "Configure script failed for swig. Sorry." + exit 1 +fi + +make +if [ $? -ne 0 ]; then + echo "Failed building swig. Sorry." + exit 1 +fi + +cat > makeinstall.sh << "EOF" +#!/bin/bash +make install +cp -R Doc -T /usr/share/doc/swig-4.2.1 +EOF + +echo +echo "As the root user:" +echo +echo " cd swig-4.2.1" +echo " bash makeinstall.sh" +echo + diff --git a/31-audit.sh b/31-audit.sh new file mode 100644 index 0000000..9b65363 --- /dev/null +++ b/31-audit.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +if [ "`whoami`" == "root" ]; then + echo "Danger, Will Robinson!" + echo "Do not execute me as r00t" + exit 1 +fi + +TARBALL="audit-4.0.2.tar.gz" +DNL="https://people.redhat.com/sgrubb/audit/audit-4.0.2.tar.gz" +SHA256="d5d1b5d50ee4a2d0d17875bc6ae6bd6a7d5b34d9557ea847a39faec531faaa0a" + +[ -d audit-4.0.2 ] && rm -rf audit-4.0.2 + +if [ ! -f ${TARBALL} ]; then + wget ${DNL} + if [ $? -ne 0 ]; then + echo "Could not retrieve ${DNL}" + echo "Sorry." + exit 1 + fi +fi + +CHECK="`sha256sum ${TARBALL} |awk ' { print $1 } ' `" +if [ "${CHECK}" != "${SHA256}" ]; then + echo "${TARBALL} does not match expected SHA256. Sorry." + exit 1 +fi + +tar -zxf ${TARBALL} && cd audit-4.0.2 +./configure --prefix=/usr \ + --sysconfdir=/etc \ + --sharedstatedir=/var/lib \ + --docdir=/usr/share/doc/audit-4.0.2 +if [ $? -ne 0 ]; then + echo "Configure script failed for audit. Sorry." + exit 1 +fi +make +if [ $? -ne 0 ]; then + echo "Failed building audit. Sorry." + exit 1 +fi +echo +echo "Running make check" +make check > audit.check.log +echo + +echo "Inspect audit-4.0.2/audit.check.log and if okay, as root:" +echo +echo " cd audit-4.0.2" +echo " make install" +echo diff --git a/README.md b/README.md index d1cb211..1a12171 100644 --- a/README.md +++ b/README.md @@ -298,4 +298,21 @@ libdw from elfutils. * Script: [`29-debugedit.sh`](29-debugedit.sh) * Status: Script Works +Dependency Thirty: swig +----------------------- + +Justification: Required to build audit. Build requires pcre2. + +* Script: [`30-swig.sh`](30-swig.sh) +* Status: Working + +Dependency Thirty-One: audit +---------------------------- + +Justification: Required to build RPM 4.20.0 (current) + +* Script: [`31-audit.sh`](31-audit.sh) +* Status: Working +* Note: Did not try starting the service +