From 5e338b5dbf256d0bc5032e7b54fb07b2dc66c1e6 Mon Sep 17 00:00:00 2001 From: Sander van Deijck Date: Thu, 22 Oct 2026 23:27:50 +0200 Subject: [PATCH] fwknop: switch GPG support to gnupg2 GnuPG 1.4 is being removed from the feed. Use gnupg2 for GPG support instead. GPGME 2.x still works with either, but GnuPG 2 does all secret key operations through gpg-agent, which is packaged in gnupg2-utils, so depend on that as well. While at it: - fix fwknopd depending on the nonexistent FWKNOP_GPG symbol instead of FWKNOPD_GPG; it only got gnupg through libfko so far. - pass --with-gpg=/usr/bin/gpg. Without it, configure looks for gpg on the build host, and libfko fails to build with GPG support if there is none. With GnuPG 2, the GPGME passphrase callback libfko uses only works in loopback pinentry mode, which libfko does not select. Passphrase- protected keys therefore need "pinentry-mode loopback" in gpg.conf, or a key without a passphrase together with GPG_ALLOW_NO_PW, as described in fwknopd(8). Signed-off-by: Sander van Deijck --- net/fwknop/Config.in | 2 +- net/fwknop/Makefile | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/net/fwknop/Config.in b/net/fwknop/Config.in index 8de7e47156..a2c1427810 100644 --- a/net/fwknop/Config.in +++ b/net/fwknop/Config.in @@ -4,7 +4,7 @@ menu "Configuration" config FWKNOPD_GPG bool "Enable GPG support" - select PACKAGE_gnupg + select PACKAGE_gnupg2 default n config FWKNOPD_NFQ_CAPTURE diff --git a/net/fwknop/Makefile b/net/fwknop/Makefile index c60e57d6b9..803dc0ea8c 100644 --- a/net/fwknop/Makefile +++ b/net/fwknop/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fwknop PKG_VERSION:=2.6.11 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.cipherdyne.org/fwknop/download @@ -49,7 +49,7 @@ define Package/fwknopd TITLE+= Daemon DEPENDS:=+iptables +libfko +!FWKNOPD_NFQ_CAPTURE:libpcap +FWKNOPD_NFQ_CAPTURE:iptables-mod-nfqueue \ +FWKNOPD_NFQ_CAPTURE:libnetfilter-queue +FWKNOPD_NFQ_CAPTURE:libnfnetlink \ - +FWKNOP_GPG:gnupg +FWKNOP_GPG:libgpgme + +FWKNOPD_GPG:gnupg2 +FWKNOPD_GPG:gnupg2-utils +FWKNOPD_GPG:libgpgme endef define Package/fwknopd/description @@ -73,7 +73,7 @@ define Package/fwknop CATEGORY:=Network SUBMENU:=Firewall TITLE+= Client - DEPENDS:=+libfko +FWKNOPD_GPG:gnupg +FWKNOPD_GPG:libgpgme + DEPENDS:=+libfko +FWKNOPD_GPG:gnupg2 +FWKNOPD_GPG:gnupg2-utils +FWKNOPD_GPG:libgpgme endef define Package/fwknop/description @@ -87,7 +87,7 @@ define Package/libfko CATEGORY:=Libraries SUBMENU:=Firewall TITLE+= Library - DEPENDS:=+FWKNOPD_GPG:gnupg +FWKNOPD_GPG:libgpgme + DEPENDS:=+FWKNOPD_GPG:gnupg2 +FWKNOPD_GPG:gnupg2-utils +FWKNOPD_GPG:libgpgme endef define Package/libfko/description @@ -99,6 +99,7 @@ endef CONFIGURE_ARGS += \ --$(if $(CONFIG_FWKNOPD_NFQ_CAPTURE),en,dis)able-nfq-capture \ --with$(if $(CONFIG_FWKNOPD_GPG),,out)-gpgme \ + $(if $(CONFIG_FWKNOPD_GPG),--with-gpg=/usr/bin/gpg) \ --with-iptables=/usr/sbin/iptables \ define Build/InstallDev