From c30de4bcfd6b9ec535f3559dfd967bfb9d8319dd Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Wed, 16 Oct 2024 03:23:55 -0700 Subject: [PATCH] libksba --- 14-libksba.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 14 ++++++++++---- 2 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 14-libksba.sh diff --git a/14-libksba.sh b/14-libksba.sh new file mode 100644 index 0000000..2c3c5bb --- /dev/null +++ b/14-libksba.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +if [ "`whoami`" == "root" ]; then + echo "Danger, Will Robinson!" + echo "Do not execute me as r00t" + exit 1 +fi + +TARBALL="libksba-1.6.7.tar.bz2" +DNL="https://www.gnupg.org/ftp/gcrypt/libksba/libksba-1.6.7.tar.bz2" +SHA256="cf72510b8ebb4eb6693eef765749d83677a03c79291a311040a5bfd79baab763" + +[ -d libksba-1.6.7 ] && rm -rf libksba-1.6.7 + +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 -jxf ${TARBALL} && cd libksba-1.6.7 +./configure --prefix=/usr +if [ $? -ne 0 ]; then + echo "Configure script failed for libksba. Sorry." + exit 1 +fi + +make +if [ $? -ne 0 ]; then + echo "Failed building libksba. Sorry." + exit 1 +fi + +echo "running make check" +make check > libksba.check.log 2>&1 + +echo "Inspect libksba-1.6.7/libksba.check.log and if all good, as root:" +echo +echo " cd libksba-1.6.7" +echo " make install" +echo + diff --git a/README.md b/README.md index 616e2a1..ec99099 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ Justification: Needed to build RPM itself. Depends upon UnZip for documentation. Dependency Three: libgpg-error ------------------------------ -Justification: Needed to build libgcrypt and libassuan. No build dependencies -outside of LFS. +Justification: Needed to build libgcrypt, libassuan, and libksba. No build +dependencies outside of LFS. * Script: [`03-libgpg-error.sh`](03-libgpg-error.sh) * Status: Script Works @@ -112,11 +112,17 @@ Justification: Needed to build RPM. No build dependencies outside of LFS. Dependency Thirteen: libassuan ------------------------------ -Justification: Needed to build GnuPG +Justification: Needed to build GnuPG. Requires libgpg-error. * Script: [`13-libassuan.sh`](13-libassuan.sh) * Status: Script Untested - +Dependency Fourteen: libksba +---------------------------- + +Justification: Needed to build GnuPG. Requires libgpg-error. + +* Script: [`14-libksba.sh`](14-libksba.sh) +* Status: Script Untested