From 82a3d088d68b62476d8f8f7217f93062c4422b6d Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Wed, 16 Oct 2024 19:04:18 -0700 Subject: [PATCH] pinentry --- 26-pinentry.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 15 ++++++++++++--- 2 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 26-pinentry.sh diff --git a/26-pinentry.sh b/26-pinentry.sh new file mode 100644 index 0000000..9ae0261 --- /dev/null +++ b/26-pinentry.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +if [ "`whoami`" == "root" ]; then + echo "Danger, Will Robinson!" + echo "Do not execute me as r00t" + exit 1 +fi + +TARBALL="pinentry-1.3.1.tar.bz2" +DNL="https://www.gnupg.org/ftp/gcrypt/pinentry/pinentry-1.3.1.tar.bz2" +SHA256="bc72ee27c7239007ab1896c3c2fae53b076e2c9bd2483dc2769a16902bce8c04" + +[ -d pinentry-1.3.1 ] && rm -rf pinentry-1.3.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 -jxf ${TARBALL} && cd pinentry-1.3.1 +./configure --prefix=/usr \ + --enable-pinentry-tty \ + --disable-pinentry-qt5 +if [ $? -ne 0 ]; then + echo "Configure script failed for pinentry. Sorry." + exit 1 +fi + +make +if [ $? -ne 0 ]; then + echo "Failed building pinentry. Sorry." + exit 1 +fi + +echo +echo "As root:" +echo " cd pinentry-1.3.1" +echo " make install" +echo diff --git a/README.md b/README.md index f34ecc5..62a7b63 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ for documentation. Dependency Three: libgpg-error ------------------------------ -Justification: Needed to build libgcrypt, libassuan, and libksba. No build -dependencies outside of LFS. +Justification: Needed to build libgcrypt, libassuan, libksba, and pinentry. No +build dependencies outside of LFS. * Script: [`03-libgpg-error.sh`](03-libgpg-error.sh) * Status: Script Works @@ -130,7 +130,7 @@ Justification: Needed to build RPM. No build dependencies outside of LFS. Dependency Thirteen: libassuan ------------------------------ -Justification: Needed to build GnuPG. Requires libgpg-error. +Justification: Needed to build pinentry and GnuPG. Requires libgpg-error. * Script: [`13-libassuan.sh`](13-libassuan.sh) * Status: Script Works @@ -242,6 +242,15 @@ Justification: Needed for GnuPG. Requires Cyrus SASL to build. * Status: Script Untested * Note: Only installs client libraries, not the daemon +Dependency Twenty-Six: pinentry +------------------------------- + +Justification: Runtime dependency of GnuPG. Requires libassuan and libgpg-error. + +* Script: [`26-pinentry.sh`](26-pinentry.sh) +* Status: Script Works +* Note: GUI clients not built yet + Dependency Twenty-Seven: GnuPG ------------------------------