* [ptxdist] [PATCH v5 1/2] host-python3-pip: Set dependency on host-python3-setuptools
@ 2025-07-17 13:11 Lars Alex Pedersen
2025-07-17 13:11 ` [ptxdist] [PATCH v5 2/2] libgpiod: version bump 2.1.3 -> 2.2.2 Lars Alex Pedersen
0 siblings, 1 reply; 3+ messages in thread
From: Lars Alex Pedersen @ 2025-07-17 13:11 UTC (permalink / raw)
To: ptxdist; +Cc: Lars Alex Pedersen
Signed-off-by: Lars Alex Pedersen <lapeddk@gmail.com>
---
rules/host-python3-pip.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/rules/host-python3-pip.in b/rules/host-python3-pip.in
index 02650dce6..1dc5b2cd0 100644
--- a/rules/host-python3-pip.in
+++ b/rules/host-python3-pip.in
@@ -6,4 +6,5 @@ config HOST_PYTHON3_PIP
select HOST_PYTHON3_INSTALLER
select HOST_PYTHON3_PYBUILD
select HOST_PYTHON3_WHEEL
+ select HOST_PYTHON3_SETUPTOOLS
default ALLYES
base-commit: a9adc3e18c9c2450c938d6de95d0fd14dbe47acc
--
2.50.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ptxdist] [PATCH v5 2/2] libgpiod: version bump 2.1.3 -> 2.2.2
2025-07-17 13:11 [ptxdist] [PATCH v5 1/2] host-python3-pip: Set dependency on host-python3-setuptools Lars Alex Pedersen
@ 2025-07-17 13:11 ` Lars Alex Pedersen
2025-07-17 13:28 ` Markus Heidelberg via ptxdist
0 siblings, 1 reply; 3+ messages in thread
From: Lars Alex Pedersen @ 2025-07-17 13:11 UTC (permalink / raw)
To: ptxdist; +Cc: Lars Alex Pedersen
* Add new options to install the dbus daemon with and without systemd.
* Add gpio in group
* Add gpio-manager user and group
* Python binding now requires host pybuild and pip for build and
install, together with a patch to get the right build options
* Removed ac_cv_prog_has_python_config line in rule, since it has been
fixed in this release
* Configure options updated and reordered to match configure helper
* New option --disable-introspection is removed by autogen.sh
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>
---
v5:
- Fixed license appending
v4:
- Split licenses for dbus daemon into systemd and non-systemd parts
...1-Add-ptxdist-python-compile-options.patch | 22 +++++++
patches/libgpiod-2.2.2/autogen.sh | 1 +
patches/libgpiod-2.2.2/series | 4 ++
projectroot/etc/group | 2 +
projectroot/etc/passwd | 1 +
rules/libgpiod.in | 27 ++++++++-
rules/libgpiod.make | 58 ++++++++++++++-----
7 files changed, 99 insertions(+), 16 deletions(-)
create mode 100644 patches/libgpiod-2.2.2/0001-Add-ptxdist-python-compile-options.patch
create mode 120000 patches/libgpiod-2.2.2/autogen.sh
create mode 100644 patches/libgpiod-2.2.2/series
diff --git a/patches/libgpiod-2.2.2/0001-Add-ptxdist-python-compile-options.patch b/patches/libgpiod-2.2.2/0001-Add-ptxdist-python-compile-options.patch
new file mode 100644
index 000000000..b8e8ebc04
--- /dev/null
+++ b/patches/libgpiod-2.2.2/0001-Add-ptxdist-python-compile-options.patch
@@ -0,0 +1,22 @@
+From: Lars Alex Pedersen <laa@kamstrup.com>
+Date: Thu, 10 Jul 2025 18:24:59 +0000
+Subject: [PATCH] Add ptxdist python compile options
+
+Signed-off-by: Lars Alex Pedersen <laa@kamstrup.com>
+---
+ bindings/python/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
+index 2ae8ac8a514c..ff1d677bba2a 100644
+--- 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
+
+ install-exec-local:
+ $(PYTHON) -m pip install dist/*.whl \
diff --git a/patches/libgpiod-2.2.2/autogen.sh b/patches/libgpiod-2.2.2/autogen.sh
new file mode 120000
index 000000000..9f8a4cb7d
--- /dev/null
+++ b/patches/libgpiod-2.2.2/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/libgpiod-2.2.2/series b/patches/libgpiod-2.2.2/series
new file mode 100644
index 000000000..c0b6f9478
--- /dev/null
+++ b/patches/libgpiod-2.2.2/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Add-ptxdist-python-compile-options.patch
+# 34ebc65c9062276a316faee96d8f8775 - git-ptx-patches magic
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..3bff40f9c 100644
--- a/rules/libgpiod.in
+++ b/rules/libgpiod.in
@@ -3,9 +3,15 @@
menuconfig LIBGPIOD
tristate
prompt "libgpiod "
- select HOST_SYSTEM_PYTHON3
- select GCCLIBS_CXX if LIBGPIOD_CXX
- select PYTHON3 if LIBGPIOD_PYTHON3
+ select HOST_SYSTEM_PYTHON3 if LIBGPIOD_PYTHON3
+ select HOST_PYTHON3_PYBUILD if LIBGPIOD_PYTHON3
+ select HOST_PYTHON3_PIP if LIBGPIOD_PYTHON3
+ select HOST_AUTOTOOLS_AUTOCONF_ARCHIVE
+ 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
libgpiod is a library accompanied by a set of tools for
interacting with the Linux GPIO character device.
@@ -57,6 +63,21 @@ 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 LIBGPIOD_DBUS_DAEMON
+ 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..73bf2acca 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)
@@ -28,9 +28,23 @@ LIBGPIOD_LICENSE_FILES := \
file://LICENSES/GPL-2.0-only.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://LICENSES/Linux-syscall-note.txt;md5=6b0dff741019b948dfe290c05d6f361c
+ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON
+LIBGPIOD_LICENSE += AND GPL-2.0-or-later AND CC-BY-SA-4.0
+LIBGPIOD_LICENSE_FILES += \
+ file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f
+else
ifdef PTXCONF_LIBGPIOD_TOOLS
LIBGPIOD_LICENSE += AND GPL-2.0-or-later
-LIBGPIOD_LICENSE_FILES += file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263
+LIBGPIOD_LICENSE_FILES += \
+ file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263
+endif
+endif
+
+ifdef PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD
+LIBGPIOD_LICENSE += AND CC0-1.0
+LIBGPIOD_LICENSE_FILES += \
+ file://LICENSES/CC0-1.0.txt;md5=65d3616852dbf7b1a6d4b53b00626032
endif
# ----------------------------------------------------------------------------
@@ -47,22 +61,27 @@ LIBGPIOD_CONF_OPT := \
--disable-examples \
--$(call ptx/endis, PTXCONF_LIBGPIOD_CXX)-bindings-cxx \
--$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python \
- --disable-bindings-rust
+ --disable-bindings-rust \
+ --$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-dbus \
+ --$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON)-bindings-glib \
+ --$(call ptx/endis, PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD)-systemd
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)
+ ac_cv_path_PYTHON=$(CROSS_PYTHON3)) \
+ systemdsystemunitdir=/usr/lib/systemd/system
LIBGPIOD_LDFLAGS:= -Wl,-rpath-link,$(LIBGPIOD_DIR)/lib/.libs
-LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIODETECT) += gpiodetect
-LIBGPIOD_TOOLS-$(PTXCONF_LIBGPIOD_GPIOINFO) += gpioinfo
-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_BINS-$(PTXCONF_LIBGPIOD_GPIODETECT) += gpiodetect
+LIBGPIOD_BINS-$(PTXCONF_LIBGPIOD_GPIOINFO) += gpioinfo
+LIBGPIOD_BINS-$(PTXCONF_LIBGPIOD_GPIOGET) += gpioget
+LIBGPIOD_BINS-$(PTXCONF_LIBGPIOD_GPIOSET) += gpioset
+LIBGPIOD_BINS-$(PTXCONF_LIBGPIOD_GPIOMON) += gpiomon
+LIBGPIOD_BINS-$(PTXCONF_LIBGPIOD_GPIONOTIFY) += gpionotify
+LIBGPIOD_BINS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON) += gpio-manager
+LIBGPIOD_BINS-$(PTXCONF_LIBGPIOD_DBUS_DAEMON) += gpiocli
# ----------------------------------------------------------------------------
# Target-Install
@@ -79,11 +98,24 @@ $(STATEDIR)/libgpiod.targetinstall:
@$(call install_lib, libgpiod, 0, 0, 0644, libgpiod)
- @for tool in $(LIBGPIOD_TOOLS-y); do \
+ @for tool in $(LIBGPIOD_BINS-y); do \
$(call install_copy, libgpiod, 0, 0, 0755, -, \
/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
--
2.50.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] [PATCH v5 2/2] libgpiod: version bump 2.1.3 -> 2.2.2
2025-07-17 13:11 ` [ptxdist] [PATCH v5 2/2] libgpiod: version bump 2.1.3 -> 2.2.2 Lars Alex Pedersen
@ 2025-07-17 13:28 ` Markus Heidelberg via ptxdist
0 siblings, 0 replies; 3+ messages in thread
From: Markus Heidelberg via ptxdist @ 2025-07-17 13:28 UTC (permalink / raw)
To: ptxdist; +Cc: Markus Heidelberg, Lars Alex Pedersen
On Thu, Jul 17, 2025 at 03:11:39PM +0200, Lars Alex Pedersen wrote:
> * Add new options to install the dbus daemon with and without systemd.
> * Add gpio in group
> * Add gpio-manager user and group
> * Python binding now requires host pybuild and pip for build and
> install, together with a patch to get the right build options
> * Removed ac_cv_prog_has_python_config line in rule, since it has been
> fixed in this release
> * Configure options updated and reordered to match configure helper
> * New option --disable-introspection is removed by autogen.sh
>
> 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>
> ---
> v5:
> - Fixed license appending
> v4:
> - Split licenses for dbus daemon into systemd and non-systemd parts
>
> ...1-Add-ptxdist-python-compile-options.patch | 22 +++++++
> patches/libgpiod-2.2.2/autogen.sh | 1 +
> patches/libgpiod-2.2.2/series | 4 ++
> projectroot/etc/group | 2 +
> projectroot/etc/passwd | 1 +
> rules/libgpiod.in | 27 ++++++++-
> rules/libgpiod.make | 58 ++++++++++++++-----
> 7 files changed, 99 insertions(+), 16 deletions(-)
> create mode 100644 patches/libgpiod-2.2.2/0001-Add-ptxdist-python-compile-options.patch
> create mode 120000 patches/libgpiod-2.2.2/autogen.sh
> create mode 100644 patches/libgpiod-2.2.2/series
Reviewed-by: Markus Heidelberg <m.heidelberg@cab.de>
Rudimentarily tested the Python bindings, but not the dbus stuff.
Thanks for investigating the Python bindings build error, Lars.
Now Michael, is this the right solution? What can be done to avoid the
downstream patch?
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-17 13:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-17 13:11 [ptxdist] [PATCH v5 1/2] host-python3-pip: Set dependency on host-python3-setuptools Lars Alex Pedersen
2025-07-17 13:11 ` [ptxdist] [PATCH v5 2/2] libgpiod: version bump 2.1.3 -> 2.2.2 Lars Alex Pedersen
2025-07-17 13:28 ` Markus Heidelberg via ptxdist
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox