public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Adolf Belka <adolf.belka@ipfire.org>
To: Michael Tremer <michael.tremer@ipfire.org>
Cc: "IPFire: Development-List" <development@lists.ipfire.org>
Subject: Re: [RFC PATCH 1/2] unbound: Enable the Python module(s)
Date: Sat, 16 Aug 2025 18:23:02 +0200	[thread overview]
Message-ID: <ce392153-ad77-44aa-ab6d-0059ee9da93e@ipfire.org> (raw)
In-Reply-To: <20250425123717.3462310-1-michael.tremer@ipfire.org>

Hi Michael,

After some time I thought I should have a go at building  with your two patches for the unbound fast flux option but the build fails to complete.

I am doing the build with the current next repo.

I have done the build twice and it fails at the same point each time at the python3-tomli build.

The following is the log output, which I have not been able to interpret to identify what is causing the build to fail.


Aug 16 15:11:49: Building python3-tomli make: Entering directory '/home/ahb/sandbox/ipfire-2-builder3/lfs'
make: Nothing to be done for 'download'.
make: Leaving directory '/home/ahb/sandbox/ipfire-2-builder3/lfs'
make: Entering directory '/usr/src/lfs'
tomli-2.0.1.tar.gz checksum OK
====================================== Installing tomli-2.0.1 ...
Install started; saving file list to /usr/src/lsalr ...
cd /usr/src/tomli-2.0.1 && python3 -m pyproject2setuppy.main build
Traceback (most recent call last):
   File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
     return _run_code(code, main_globals, None,
   File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
     exec(code, run_globals)
   File "/usr/lib/python3.10/site-packages/pyproject2setuppy/main.py", line 15, in <module>
     main()
   File "/usr/lib/python3.10/site-packages/pyproject2setuppy/__main__.py", line 53, in main
     handler(data)
   File "/usr/lib/python3.10/site-packages/pyproject2setuppy/flit.py", line 91, in handle_flit
     setup(**setup_metadata)
   File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
     _install_setup_requires(attrs)
   File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 75, in _install_setup_requires
     dist = MinimalDistribution(attrs)
   File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 57, in __init__
     super().__init__(filtered)
   File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 474, in __init__
     for ep in metadata.entry_points(group='distutils.setup_keywords'):
   File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 1009, in entry_points
     return SelectableGroups.load(eps).select(**params)
   File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 459, in load
     ordered = sorted(eps, key=by_group)
   File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 1006, in <genexpr>
     eps = itertools.chain.from_iterable(
   File "/usr/lib/python3.10/importlib/metadata/_itertools.py", line 16, in unique_everseen
     k = key(element)
   File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 941, in _normalized_name
     return self._name_from_stem(stem) or super()._normalized_name
   File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 622, in _normalized_name
     return Prepared.normalize(self.name)
   File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 871, in normalize
     return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
   File "/usr/lib/python3.10/re.py", line 209, in sub
     return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object
make: *** [python3-tomli:78: /usr/src/log/tomli-2.0.1] Error 1
make: Leaving directory '/usr/src/lfs'

Regards,

Adolf.

On 25/04/2025 14:37, Michael Tremer wrote:
> This can be used to script the resolver and use libunbound from Python.
> 
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>   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



  parent reply	other threads:[~2025-08-16 16:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25 12:37 Michael Tremer
2025-04-25 12:37 ` [RFC PATCH 2/2] Add Fast Flux detection in DNS Michael Tremer
2025-08-16 16:23 ` Adolf Belka [this message]
2025-08-18 11:50   ` [RFC PATCH 1/2] unbound: Enable the Python module(s) Michael Tremer
2025-08-18 12:40     ` Adolf Belka
2025-08-18 16:17       ` Adolf Belka
2025-08-18 17:00         ` Adolf Belka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ce392153-ad77-44aa-ab6d-0059ee9da93e@ipfire.org \
    --to=adolf.belka@ipfire.org \
    --cc=development@lists.ipfire.org \
    --cc=michael.tremer@ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox