mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] libgpiod: version bump 2.1.3 -> 2.2.2
@ 2025-07-09 12:51 Lars Alex Pedersen
  2025-07-10 13:33 ` Markus Heidelberg via ptxdist
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Alex Pedersen @ 2025-07-09 12:51 UTC (permalink / raw)
  To: ptxdist; +Cc: Lars Alex Pedersen

* Revert commit 0b38f33360be9221c1bca62f7023ffdcb9a9c0e5, since it has
  been fixed in release 2.2.2.
* Add new options to install the dbus daemon with and without systemd.
* Add gpio in group
* Add gpio-manager user and group

https://github.com/brgl/libgpiod/blob/v2.2.x/NEWS

Signed-off-by: Lars Alex Pedersen <lapeddk@gmail.com>
---
 projectroot/etc/group  |  2 ++
 projectroot/etc/passwd |  1 +
 rules/libgpiod.in      | 17 +++++++++++++++++
 rules/libgpiod.make    | 28 +++++++++++++++++++++++-----
 4 files changed, 43 insertions(+), 5 deletions(-)

diff --git a/projectroot/etc/group b/projectroot/etc/group
index 1a8e2eeb2..176e21194 100644
--- a/projectroot/etc/group
+++ b/projectroot/etc/group
@@ -39,4 +39,6 @@ seat:x:215:
 pipewire:x:216:
 mongodb:x:217:
 polkitd:x:218:
+gpio:x:219:
+gpio-manager:x:220:gpio
 nogroup:x:65534:
diff --git a/projectroot/etc/passwd b/projectroot/etc/passwd
index 89763295a..d6daf13c0 100644
--- a/projectroot/etc/passwd
+++ b/projectroot/etc/passwd
@@ -21,5 +21,6 @@ redis:x:212:213:redis:/dev/null:/bin/false
 pipewire:x:213:216:pipewire:/dev/null:/bin/false
 mongodb:x:214:217:mongodb:/dev/null:/bin/false
 polkitd:x:215:218:polkitd:/dev/null:/bin/false
+gpio-manager:x:216:220:gpio-manager:/dev/null:/bin/false
 rpcuser:x:65533:65534:RPC user:/dev/null:/bin/false
 nobody:x:65534:65534:Unprivileged Nobody:/dev/null:/bin/false
diff --git a/rules/libgpiod.in b/rules/libgpiod.in
index 94bff5164..4c4d60909 100644
--- a/rules/libgpiod.in
+++ b/rules/libgpiod.in
@@ -4,6 +4,9 @@ menuconfig LIBGPIOD
 	tristate
 	prompt "libgpiod                      "
 	select HOST_SYSTEM_PYTHON3
+	select DBUS		if LIBGPIOD_DBUS_DAEMON
+	select LIBGUDEV		if LIBGPIOD_DBUS_DAEMON
+	select GLIB		if LIBGPIOD_DBUS_DAEMON
 	select GCCLIBS_CXX	if LIBGPIOD_CXX
 	select PYTHON3		if LIBGPIOD_PYTHON3
 	help
@@ -57,6 +60,20 @@ config LIBGPIOD_GPIONOTIFY
 	help
 	  Waits for info changes on GPIO lines
 
+config LIBGPIOD_DBUS_DAEMON
+	bool
+	prompt "Install dbus daemon"
+	help
+	  Add a D-Bus interface to libgpiod together with a
+	  daemon implementing it and a command-line client
+
+config LIBGPIOD_DBUS_DAEMON_SYSTEMD
+	bool
+	prompt "Install dbus daemon systemd files"
+	depends on INITMETHOD_SYSTEMD
+	help
+	  Install dbus daemon systemd unit and udev files
+
 config LIBGPIOD_CXX
 	bool
 	prompt "Install C++ bindings"
diff --git a/rules/libgpiod.make b/rules/libgpiod.make
index 6272333b5..44f623b66 100644
--- a/rules/libgpiod.make
+++ b/rules/libgpiod.make
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_LIBGPIOD) += libgpiod
 #
 # Paths and names
 #
-LIBGPIOD_VERSION	:= 2.1.3
-LIBGPIOD_MD5		:= dd37487da746569b7311b2c8fd2f907d
+LIBGPIOD_VERSION	:= 2.2.2
+LIBGPIOD_MD5		:= 11e80ef978c7dbffc6f16dbac412ce42
 LIBGPIOD		:= libgpiod-$(LIBGPIOD_VERSION)
 LIBGPIOD_SUFFIX		:= tar.gz
 LIBGPIOD_URL		:= https://www.kernel.org/pub/software/libs/libgpiod/$(LIBGPIOD).$(LIBGPIOD_SUFFIX)
@@ -45,15 +45,18 @@ LIBGPIOD_CONF_OPT	:= \
 	--disable-tests \
 	--disable-profiling \
 	--disable-examples \
+	--$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-bindings-glib \
+	--disable-introspection	\
+	--$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD)-systemd \
+	--$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-dbus \
 	--$(call ptx/endis, PTXCONF_LIBGPIOD_CXX)-bindings-cxx \
 	--$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python \
 	--disable-bindings-rust
 
 LIBGPIOD_CONF_ENV := \
 	$(CROSS_ENV) \
-	$(if $(PTXCONF_LIBGPIOD_PYTHON3), \
-		ac_cv_path_PYTHON=$(CROSS_PYTHON3) \
-		ac_cv_prog_has_python_config=python$(PYTHON3_MAJORMINOR)-config)
+	systemdsystemunitdir=/usr/lib/systemd/system
+		
 
 LIBGPIOD_LDFLAGS:= -Wl,-rpath-link,$(LIBGPIOD_DIR)/lib/.libs
 
@@ -63,6 +66,8 @@ LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOGET)	+= gpioget
 LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOSET)	+= gpioset
 LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOMON)	+= gpiomon
 LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIONOTIFY)	+= gpionotify
+LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON)	+= gpio-manager
+LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON)	+= gpiocli
 
 # ----------------------------------------------------------------------------
 # Target-Install
@@ -84,6 +89,19 @@ $(STATEDIR)/libgpiod.targetinstall:
 			/usr/bin/$$tool); \
 	done
 
+ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON
+	@$(call install_tree, libgpiod, 0, 0, -, /usr/share/dbus-1/interfaces)
+	@$(call install_tree, libgpiod, 0, 0, -, /etc/dbus-1/system.d)
+	@$(call install_lib, libgpiod, 0, 0, 0644, libgpiodbus)
+	@$(call install_lib, libgpiod, 0, 0, 0644, libgpiod-glib)
+endif
+ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD
+	@$(call install_tree, libgpiod, 0, 0, -, /usr/lib/udev/rules.d)
+	@$(call install_alternative, libgpiod, 0, 0, 0644, \
+		/usr/lib/systemd/system/gpio-manager.service)
+	@$(call install_link, libgpiod, ../gpio-manager.service, \
+		/usr/lib/systemd/system/multi-user.target.wants/gpio-manager.service)
+endif
 ifdef PTXCONF_LIBGPIOD_CXX
 	@$(call install_lib, libgpiod, 0, 0, 0644, libgpiodcxx)
 endif

base-commit: 51f6fea554acb994e4f082af28077e82aab221cc
-- 
2.50.0




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] libgpiod: version bump 2.1.3 -> 2.2.2
  2025-07-09 12:51 [ptxdist] [PATCH] libgpiod: version bump 2.1.3 -> 2.2.2 Lars Alex Pedersen
@ 2025-07-10 13:33 ` Markus Heidelberg via ptxdist
  2025-07-10 19:27   ` Lars Pedersen
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Heidelberg via ptxdist @ 2025-07-10 13:33 UTC (permalink / raw)
  To: ptxdist; +Cc: Markus Heidelberg, Lars Alex Pedersen

On Wed, Jul 09, 2025 at 02:51:01PM +0200, Lars Alex Pedersen wrote:
> * Revert commit 0b38f33360be9221c1bca62f7023ffdcb9a9c0e5, since it has
>   been fixed in release 2.2.2.
> * Add new options to install the dbus daemon with and without systemd.
> * Add gpio in group
> * Add gpio-manager user and group
> 
> https://github.com/brgl/libgpiod/blob/v2.2.x/NEWS

You could use the official upstream URL instead of the GitHub mirror:
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/NEWS?h=v2.2.2

> Signed-off-by: Lars Alex Pedersen <lapeddk@gmail.com>
> ---
>  projectroot/etc/group  |  2 ++
>  projectroot/etc/passwd |  1 +
>  rules/libgpiod.in      | 17 +++++++++++++++++
>  rules/libgpiod.make    | 28 +++++++++++++++++++++++-----
>  4 files changed, 43 insertions(+), 5 deletions(-)
> 

> diff --git a/rules/libgpiod.make b/rules/libgpiod.make
> index 6272333b5..44f623b66 100644
> --- a/rules/libgpiod.make
> +++ b/rules/libgpiod.make
> @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_LIBGPIOD) += libgpiod
>  #
>  # Paths and names
>  #
> -LIBGPIOD_VERSION	:= 2.1.3
> -LIBGPIOD_MD5		:= dd37487da746569b7311b2c8fd2f907d
> +LIBGPIOD_VERSION	:= 2.2.2
> +LIBGPIOD_MD5		:= 11e80ef978c7dbffc6f16dbac412ce42
>  LIBGPIOD		:= libgpiod-$(LIBGPIOD_VERSION)
>  LIBGPIOD_SUFFIX		:= tar.gz
>  LIBGPIOD_URL		:= https://www.kernel.org/pub/software/libs/libgpiod/$(LIBGPIOD).$(LIBGPIOD_SUFFIX)
> @@ -45,15 +45,18 @@ LIBGPIOD_CONF_OPT	:= \
>  	--disable-tests \
>  	--disable-profiling \
>  	--disable-examples \
> +	--$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-bindings-glib \
> +	--disable-introspection	\

Tab instead of space after "introspection".

> +	--$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD)-systemd \
> +	--$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-dbus \

It seems to be customary to sort the options to make
scripts/configure_helper.py silent, even if this script has a --sort
option.

>  	--$(call ptx/endis, PTXCONF_LIBGPIOD_CXX)-bindings-cxx \
>  	--$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python \
>  	--disable-bindings-rust
>  
>  LIBGPIOD_CONF_ENV := \
>  	$(CROSS_ENV) \
> -	$(if $(PTXCONF_LIBGPIOD_PYTHON3), \
> -		ac_cv_path_PYTHON=$(CROSS_PYTHON3) \
> -		ac_cv_prog_has_python_config=python$(PYTHON3_MAJORMINOR)-config)

Reversion of commit 0b38f33360be9221c1bca62f7023ffdcb9a9c0e5 went wrong,
only ac_cv_prog_has_python_config has to be removed, the other lines
joined into one.

> +	systemdsystemunitdir=/usr/lib/systemd/system
> +		

Whitespace error introduced, this blank line is superfluous anyway.

>  
>  LIBGPIOD_LDFLAGS:= -Wl,-rpath-link,$(LIBGPIOD_DIR)/lib/.libs
>  
> @@ -63,6 +66,8 @@ LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOGET)	+= gpioget
>  LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOSET)	+= gpioset
>  LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOMON)	+= gpiomon
>  LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIONOTIFY)	+= gpionotify
> +LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON)	+= gpio-manager
> +LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON)	+= gpiocli
>  
>  # ----------------------------------------------------------------------------
>  # Target-Install
> @@ -84,6 +89,19 @@ $(STATEDIR)/libgpiod.targetinstall:
>  			/usr/bin/$$tool); \
>  	done
>  
> +ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON
> +	@$(call install_tree, libgpiod, 0, 0, -, /usr/share/dbus-1/interfaces)
> +	@$(call install_tree, libgpiod, 0, 0, -, /etc/dbus-1/system.d)
> +	@$(call install_lib, libgpiod, 0, 0, 0644, libgpiodbus)
> +	@$(call install_lib, libgpiod, 0, 0, 0644, libgpiod-glib)
> +endif
> +ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD
> +	@$(call install_tree, libgpiod, 0, 0, -, /usr/lib/udev/rules.d)
> +	@$(call install_alternative, libgpiod, 0, 0, 0644, \
> +		/usr/lib/systemd/system/gpio-manager.service)
> +	@$(call install_link, libgpiod, ../gpio-manager.service, \
> +		/usr/lib/systemd/system/multi-user.target.wants/gpio-manager.service)
> +endif

License information further above has to be extended for the new tools
and files. See "COPYING" and grep for "SPDX-License-Identifier" in
"dbus" directory.

>  ifdef PTXCONF_LIBGPIOD_CXX
>  	@$(call install_lib, libgpiod, 0, 0, 0644, libgpiodcxx)
>  endif
> 
> base-commit: 51f6fea554acb994e4f082af28077e82aab221cc
> -- 
> 2.50.0

Do Python bindings build in your setup? Not for me and that was the
reason why I didn't yet update to v2.2.x. I didn't have enough time and
knowledge to handle this error (the wrong revert has been corrected
before invoking "ptxdist compile libgpiod"):

  make[4]: Entering directory '/home/.../build-target/libgpiod-2.2.2/bindings/python'
  CFLAGS="-I/home/.../build-target/libgpiod-2.2.2/include/ -I/home/.../build-target/libgpiod-2.2.2/tests/gpiosim \
  -L/home/.../build-target/libgpiod-2.2.2/lib/.libs/ -L/home/.../build-target/libgpiod-2.2.2/tests/gpiosim/.libs/" \
  /home/.../sysroot-cross/usr/bin/python3.13 -m build
  * Creating venv isolated environment...
  
  Traceback (most recent call last):
    File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 375, in main
      built = build_call(
          args.srcdir, outdir, distributions, config_settings, not args.no_isolation, args.skip_dependency_check
      )
    File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 235, in build_package_via_sdist
      sdist = _build(isolation, builder, outdir, 'sdist', config_settings, skip_dependency_check)
    File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 145, in _build
      return _build_in_isolated_env(builder, outdir, distribution, config_settings)
    File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 109, in _build_in_isolated_env
      with _IsolatedEnvBuilder() as env:
           ~~~~~~~~~~~~~~~~~~~^^
    File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/env.py", line 107, in __enter__
      executable, scripts_dir = _create_isolated_env_venv(self._path)
                                ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
    File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/env.py", line 279, in _create_isolated_env_venv
      pip_distribution = next(iter(metadata.distributions(name='pip', path=[purelib])))  # type: ignore[no-untyped-call]
  StopIteration
  
  ERROR 
  make[4]: *** [Makefile:720: all-local] Error 1

I found this related pybuild issue, but didn't get to a solution:
https://github.com/pypa/build/issues/266

Markus


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ptxdist] [PATCH] libgpiod: version bump 2.1.3 -> 2.2.2
  2025-07-10 13:33 ` Markus Heidelberg via ptxdist
@ 2025-07-10 19:27   ` Lars Pedersen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Pedersen @ 2025-07-10 19:27 UTC (permalink / raw)
  To: Markus Heidelberg; +Cc: ptxdist

Hi. Thanks for the feedback.

On Thu, 10 Jul 2025 at 15:33, Markus Heidelberg <M.Heidelberg@cab.de> wrote:
>
> On Wed, Jul 09, 2025 at 02:51:01PM +0200, Lars Alex Pedersen wrote:
> > * Revert commit 0b38f33360be9221c1bca62f7023ffdcb9a9c0e5, since it has
> >   been fixed in release 2.2.2.
> > * Add new options to install the dbus daemon with and without systemd.
> > * Add gpio in group
> > * Add gpio-manager user and group
> >
> > https://github.com/brgl/libgpiod/blob/v2.2.x/NEWS
>
> You could use the official upstream URL instead of the GitHub mirror:
> https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/NEWS?h=v2.2.2
>
> > Signed-off-by: Lars Alex Pedersen <lapeddk@gmail.com>
> > ---
> >  projectroot/etc/group  |  2 ++
> >  projectroot/etc/passwd |  1 +
> >  rules/libgpiod.in      | 17 +++++++++++++++++
> >  rules/libgpiod.make    | 28 +++++++++++++++++++++++-----
> >  4 files changed, 43 insertions(+), 5 deletions(-)
> >
>
> > diff --git a/rules/libgpiod.make b/rules/libgpiod.make
> > index 6272333b5..44f623b66 100644
> > --- a/rules/libgpiod.make
> > +++ b/rules/libgpiod.make
> > @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_LIBGPIOD) += libgpiod
> >  #
> >  # Paths and names
> >  #
> > -LIBGPIOD_VERSION     := 2.1.3
> > -LIBGPIOD_MD5         := dd37487da746569b7311b2c8fd2f907d
> > +LIBGPIOD_VERSION     := 2.2.2
> > +LIBGPIOD_MD5         := 11e80ef978c7dbffc6f16dbac412ce42
> >  LIBGPIOD             := libgpiod-$(LIBGPIOD_VERSION)
> >  LIBGPIOD_SUFFIX              := tar.gz
> >  LIBGPIOD_URL         := https://www.kernel.org/pub/software/libs/libgpiod/$(LIBGPIOD).$(LIBGPIOD_SUFFIX)
> > @@ -45,15 +45,18 @@ LIBGPIOD_CONF_OPT := \
> >       --disable-tests \
> >       --disable-profiling \
> >       --disable-examples \
> > +     --$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-bindings-glib \
> > +     --disable-introspection \
>
> Tab instead of space after "introspection".
>
> > +     --$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD)-systemd \
> > +     --$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-dbus \
>
> It seems to be customary to sort the options to make
> scripts/configure_helper.py silent, even if this script has a --sort
> option.
>
> >       --$(call ptx/endis, PTXCONF_LIBGPIOD_CXX)-bindings-cxx \
> >       --$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python \
> >       --disable-bindings-rust
> >
> >  LIBGPIOD_CONF_ENV := \
> >       $(CROSS_ENV) \
> > -     $(if $(PTXCONF_LIBGPIOD_PYTHON3), \
> > -             ac_cv_path_PYTHON=$(CROSS_PYTHON3) \
> > -             ac_cv_prog_has_python_config=python$(PYTHON3_MAJORMINOR)-config)
>
> Reversion of commit 0b38f33360be9221c1bca62f7023ffdcb9a9c0e5 went wrong,
> only ac_cv_prog_has_python_config has to be removed, the other lines
> joined into one.
>
> > +     systemdsystemunitdir=/usr/lib/systemd/system
> > +
>
> Whitespace error introduced, this blank line is superfluous anyway.
>
> >
> >  LIBGPIOD_LDFLAGS:= -Wl,-rpath-link,$(LIBGPIOD_DIR)/lib/.libs
> >
> > @@ -63,6 +66,8 @@ LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOGET)  += gpioget
> >  LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOSET)   += gpioset
> >  LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOMON)   += gpiomon
> >  LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIONOTIFY)        += gpionotify
> > +LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON)       += gpio-manager
> > +LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON)       += gpiocli
> >
> >  # ----------------------------------------------------------------------------
> >  # Target-Install
> > @@ -84,6 +89,19 @@ $(STATEDIR)/libgpiod.targetinstall:
> >                       /usr/bin/$$tool); \
> >       done
> >
> > +ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON
> > +     @$(call install_tree, libgpiod, 0, 0, -, /usr/share/dbus-1/interfaces)
> > +     @$(call install_tree, libgpiod, 0, 0, -, /etc/dbus-1/system.d)
> > +     @$(call install_lib, libgpiod, 0, 0, 0644, libgpiodbus)
> > +     @$(call install_lib, libgpiod, 0, 0, 0644, libgpiod-glib)
> > +endif
> > +ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD
> > +     @$(call install_tree, libgpiod, 0, 0, -, /usr/lib/udev/rules.d)
> > +     @$(call install_alternative, libgpiod, 0, 0, 0644, \
> > +             /usr/lib/systemd/system/gpio-manager.service)
> > +     @$(call install_link, libgpiod, ../gpio-manager.service, \
> > +             /usr/lib/systemd/system/multi-user.target.wants/gpio-manager.service)
> > +endif
>
> License information further above has to be extended for the new tools
> and files. See "COPYING" and grep for "SPDX-License-Identifier" in
> "dbus" directory.
>
> >  ifdef PTXCONF_LIBGPIOD_CXX
> >       @$(call install_lib, libgpiod, 0, 0, 0644, libgpiodcxx)
> >  endif
> >
> > base-commit: 51f6fea554acb994e4f082af28077e82aab221cc
> > --
> > 2.50.0
>
> Do Python bindings build in your setup? Not for me and that was the
> reason why I didn't yet update to v2.2.x. I didn't have enough time and
> knowledge to handle this error (the wrong revert has been corrected
> before invoking "ptxdist compile libgpiod"):
>
>   make[4]: Entering directory '/home/.../build-target/libgpiod-2.2.2/bindings/python'
>   CFLAGS="-I/home/.../build-target/libgpiod-2.2.2/include/ -I/home/.../build-target/libgpiod-2.2.2/tests/gpiosim \
>   -L/home/.../build-target/libgpiod-2.2.2/lib/.libs/ -L/home/.../build-target/libgpiod-2.2.2/tests/gpiosim/.libs/" \
>   /home/.../sysroot-cross/usr/bin/python3.13 -m build
>   * Creating venv isolated environment...
>
>   Traceback (most recent call last):
>     File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 375, in main
>       built = build_call(
>           args.srcdir, outdir, distributions, config_settings, not args.no_isolation, args.skip_dependency_check
>       )
>     File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 235, in build_package_via_sdist
>       sdist = _build(isolation, builder, outdir, 'sdist', config_settings, skip_dependency_check)
>     File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 145, in _build
>       return _build_in_isolated_env(builder, outdir, distribution, config_settings)
>     File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/__main__.py", line 109, in _build_in_isolated_env
>       with _IsolatedEnvBuilder() as env:
>            ~~~~~~~~~~~~~~~~~~~^^
>     File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/env.py", line 107, in __enter__
>       executable, scripts_dir = _create_isolated_env_venv(self._path)
>                                 ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
>     File "/home/.../sysroot-host/usr/lib/python3.13/site-packages/build/env.py", line 279, in _create_isolated_env_venv
>       pip_distribution = next(iter(metadata.distributions(name='pip', path=[purelib])))  # type: ignore[no-untyped-call]
>   StopIteration
>
>   ERROR
>   make[4]: *** [Makefile:720: all-local] Error 1
>
> I found this related pybuild issue, but didn't get to a solution:
> https://github.com/pypa/build/issues/266

I'll check our other suggestions, but this seems like the main issue.
I got something working by patching libgpiod:

--- a/bindings/python/Makefile.am
+++ b/bindings/python/Makefile.am
@@ -36,7 +36,7 @@ clean-local:
 all-local: python-tests
  CFLAGS="-I$(abs_top_srcdir)/include/ -I$(abs_top_srcdir)/tests/gpiosim \
  -L$(abs_top_builddir)/lib/.libs/ -L$(abs_top_builddir)/tests/gpiosim/.libs/" \
- $(PYTHON) -m build
+ $(PYTHON) -m build --skip-dependency-check --wheel --no-isolation

--- a/ptxdist/rules/libgpiod.in
+++ b/ptxdist/rules/libgpiod.in
@@ -3,12 +3,14 @@
 menuconfig LIBGPIOD
        tristate
        prompt "libgpiod                      "
-       select HOST_SYSTEM_PYTHON3
-       select DBUS             if LIBGPIOD_DBUS_DAEMON
-       select LIBGUDEV         if LIBGPIOD_DBUS_DAEMON
-       select GLIB             if LIBGPIOD_DBUS_DAEMON
-       select GCCLIBS_CXX      if LIBGPIOD_CXX
-       select PYTHON3          if LIBGPIOD_PYTHON3
+       select HOST_PYTHON3             if LIBGPIOD_PYTHON3
+       select HOST_PYTHON3_PYBUILD     if LIBGPIOD_PYTHON3
+       select HOST_PYTHON3_PIP         if LIBGPIOD_PYTHON3
+       select DBUS                     if LIBGPIOD_DBUS_DAEMON
+       select LIBGUDEV                 if LIBGPIOD_DBUS_DAEMON
+       select GLIB                     if LIBGPIOD_DBUS_DAEMON
+       select GCCLIBS_CXX              if LIBGPIOD_CXX
+       select PYTHON3                  if LIBGPIOD_PYTHON3

I guess the reason is something with that the python compile options
from ptxdist in ptxd_make_world_compile.sh isn't being passed
correctly, probably because it is a python3 build within a autoconf
env.

I don't know if this is the correct way to fix it.

/Lars Pedersen

>
> Markus



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-10 19:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-09 12:51 [ptxdist] [PATCH] libgpiod: version bump 2.1.3 -> 2.2.2 Lars Alex Pedersen
2025-07-10 13:33 ` Markus Heidelberg via ptxdist
2025-07-10 19:27   ` Lars Pedersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox