From bc80b9998ba9b04137308677860886c15cf4c3ed Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 30 Sep 2023 16:28:56 +0000 Subject: [PATCH] core/gnutls to 3.8.1-2 --- core/gnutls/PKGBUILD | 22 +++++++++++++++++----- core/gnutls/config | 9 +++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 core/gnutls/config diff --git a/core/gnutls/PKGBUILD b/core/gnutls/PKGBUILD index b6bc16260..d89027b27 100644 --- a/core/gnutls/PKGBUILD +++ b/core/gnutls/PKGBUILD @@ -6,7 +6,7 @@ pkgname=gnutls pkgver=3.8.1 -pkgrel=1 +pkgrel=2 pkgdesc="A library which provides a secure layer over a reliable transport layer" arch=('x86_64') license=('GPL3' 'LGPL2.1') @@ -17,9 +17,13 @@ depends=('glibc' 'gcc-libs' 'gmp' 'libtasn1' 'readline' 'zlib' 'nettle' makedepends=('tpm2-tss') checkdepends=('net-tools' 'tpm2-tools') optdepends=('tpm2-tss: support for TPM2 wrapped keys') -source=(https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/${pkgname}-${pkgver}.tar.xz{,.sig}) +backup=(etc/gnutls/config + etc/modules-load.d/gnutls.conf) +source=(https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/${pkgname}-${pkgver}.tar.xz{,.sig} + config) sha256sums=('ba8b9e15ae20aba88f44661978f5b5863494316fe7e722ede9d069fe6294829c' - 'SKIP') + 'SKIP' + '22e614510fe52defe8c233ce3e5ead2205739fd967657ce3176ca121f3c562b5') validpgpkeys=('462225C3B46F34879FC8496CD605848ED7E69871') # "Daiki Ueno " #validpgpkeys=('5D46CB0F763405A7053556F47A75A648B3F9220C') # "Zoltan Fridrich " @@ -33,8 +37,8 @@ build() { --with-zstd \ --with-tpm2 \ --enable-openssl-compatibility \ - --with-default-trust-store-pkcs11="pkcs11:" -# --enable-ktls \ # breaks testsuite + --with-default-trust-store-pkcs11="pkcs11:" \ + --enable-ktls sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make } @@ -51,6 +55,14 @@ package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}" install + # prepare to load tls module required for ktls + install -dm755 "$pkgdir"/etc/modules-load.d + echo "#tls" > "$pkgdir"/etc/modules-load.d/gnutls.conf + + # disable ktls by default for now + install -dm755 "$pkgdir"/etc/gnutls + install -Dm644 "${srcdir}"/config "$pkgdir"/etc/gnutls/config + # lots of .png files are put into infodir and are gzipped by makepkg! this needs to be fixed by using !zipman # gzip -9 all files in infodir and manpages manually find "$pkgdir/usr/share/info" -name '*.info*' -exec gzip -n -9 {} \; diff --git a/core/gnutls/config b/core/gnutls/config new file mode 100644 index 000000000..69c29a3be --- /dev/null +++ b/core/gnutls/config @@ -0,0 +1,9 @@ +# https://gnutls.org/manual/html_node/Enabling_002fDisabling-system_002facceleration-protocols.html#Enabling-KTLS +# +# GnuTLS is built with -–enable-ktls configuration, KTLS is disabled by default. +# This can be enabled by setting ktls = true in [global] section. +# + +[global] +ktls = false +#ktls = true