-
-
Save felegy/2575781644a8c179883be28c9f3bc7b6 to your computer and use it in GitHub Desktop.
Compile gnupg 2.4.x from Source for Debian Testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assumes new Debian Testing VM, for purpose of compiling, running below as root | |
# uses most libs already available from apt, only compiles lib ntbtls | |
gnupg_version=${GNUPG:-2.4.6} | |
ntbtls_version=${NTBTLS:-0.3.1} | |
DESTDIR=${DESTDIR:-'/'} | |
lsb_release -a | |
uname -a | |
apt update -qqq | |
apt -y install wget gpg | |
apt -y autoremove | |
wget https://gnupg.org/signature_key.asc | |
gpg --import signature_key.asc | |
gpg -k | |
wget https://www.gnupg.org/signature_key.html | |
cat signature_key.html | grep -A 1 ed25519 | |
# verify fingerprints | |
wget "https://www.gnupg.org/ftp/gcrypt/ntbtls/ntbtls-${ntbtls_version}.tar.bz2" | |
wget "https://www.gnupg.org/ftp/gcrypt/ntbtls/ntbtls-${ntbtls_version}.tar.bz2.sig" | |
wget "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${gnupg_version}.tar.bz2" | |
wget "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${gnupg_version}.tar.bz2.sig" | |
gpg --verify ntbtls-${ntbtls_version}.tar.bz2.sig | |
gpg --verify gnupg-${gnupg_version}.tar.bz2.sig | |
# verify sigs | |
apt -y remove gpg-agent | |
apt -y install curl zip unzip bzip2 gettext texinfo gnutls-bin libgnutls28-dev build-essential checkinstall libbz2-dev zlib1g-dev libsqlite3-dev libldap-dev dirmngr pinentry-curses libassuan0 libassuan-dev libksba8 libksba-dev libnpth0 libnpth0-dev libncurses-dev libncurses6 libgpgme11 libgpgme-dev libgpg-error0 libgpg-error-dev gpgrt-tools libgcrypt20 libgcrypt20-dev | |
apt -y autoremove | |
bunzip2 ntbtls-${ntbtls_version}.tar.bz2 | |
tar xvf ntbtls-${ntbtls_version}.tar | |
bunzip2 gnupg-${gnupg_version}.tar.bz2 | |
tar xvf gnupg-${gnupg_version}.tar | |
cd ntbtls-${ntbtls_version} && ./configure && make && make install "DESTDIR=${DESTDIR}" && cd .. | |
cd gnupg-${gnupg_version} && ./configure && make && make install "DESTDIR=${DESTDIR}"&& cd .. | |
mkdir -p "${DESTDIR}etc/ld.so.conf.d/" | |
echo "/usr/local/lib" > "${DESTDIR}etc/ld.so.conf.d/gpg2.conf" | |
exec "${DESTDIR}usr/local/bin/gpg" --version | |
# reboot & done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment