From patchwork Fri Apr 25 12:37:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 8640 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ZkXRb5T69z3x4T for ; Fri, 25 Apr 2025 12:37:31 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ZkXRX6J16z2kd for ; Fri, 25 Apr 2025 12:37:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZkXRX5YKMz331C for ; Fri, 25 Apr 2025 12:37:28 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZkXRT5bfbz32dy for ; Fri, 25 Apr 2025 12:37:25 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "michael.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ZkXRS5Y3Rz2kd; Fri, 25 Apr 2025 12:37:24 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4ZkXRS4SCWzTh4C; Fri, 25 Apr 2025 12:37:24 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Cc: Michael Tremer Subject: [RFC PATCH 1/2] unbound: Enable the Python module(s) Date: Fri, 25 Apr 2025 12:37:16 +0000 Message-Id: <20250425123717.3462310-1-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.5 Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 This can be used to script the resolver and use libunbound from Python. Signed-off-by: Michael Tremer --- config/rootfiles/common/unbound | 4 ++++ lfs/unbound | 3 +++ make.sh | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/rootfiles/common/unbound b/config/rootfiles/common/unbound index 57390d6d9..03c956503 100644 --- a/config/rootfiles/common/unbound +++ b/config/rootfiles/common/unbound @@ -13,6 +13,10 @@ etc/unbound/unbound.conf usr/lib/libunbound.so.8 usr/lib/libunbound.so.8.1.30 #usr/lib/pkgconfig/libunbound.pc +#usr/lib/python3.10/site-packages/_unbound.la +usr/lib/python3.10/site-packages/_unbound.so +usr/lib/python3.10/site-packages/unbound.py +usr/lib/python3.10/site-packages/unboundmodule.py usr/sbin/unbound usr/sbin/unbound-anchor usr/sbin/unbound-checkconf diff --git a/lfs/unbound b/lfs/unbound index 537ccff7e..8c79125ec 100644 --- a/lfs/unbound +++ b/lfs/unbound @@ -71,6 +71,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && \ + PYTHON_VERSION=3 \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ @@ -83,6 +84,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) --enable-tfo-server \ --enable-ipset \ --with-libmnl \ + --with-pythonmodule \ + --with-pyunbound \ ac_cv_func_getentropy=no cd $(DIR_APP) && make $(MAKETUNING) diff --git a/make.sh b/make.sh index 3643b469e..3a673cd2b 100755 --- a/make.sh +++ b/make.sh @@ -1534,6 +1534,7 @@ build_system() { lfsmake2 libevent2 lfsmake2 apr lfsmake2 aprutil + lfsmake2 swig lfsmake2 unbound lfsmake2 gnutls lfsmake2 libuv @@ -1930,7 +1931,6 @@ build_system() { lfsmake2 minicom lfsmake2 ddrescue lfsmake2 parted - lfsmake2 swig lfsmake2 python3-pyelftools lfsmake2 u-boot lfsmake2 wireless-regdb