Hi.

On Wed, 16 Jul 2025 at 15:58, Markus Heidelberg <[email protected]> wrote:
>
> On Tue, Jul 15, 2025 at 03:53:27PM +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 <[email protected]>
> > ---
> >  ...1-Add-ptxdist-python-compile-options.patch | 22 ++++++++
> >  patches/libgpiod-2.2.2/autogen.sh             |  1 +
> >  patches/libgpiod-2.2.2/series                 |  4 ++
>
> Python bindings can be built now without local adaption.

Great.

>
> >  projectroot/etc/group                         |  2 +
> >  projectroot/etc/passwd                        |  1 +
> >  rules/libgpiod.in                             | 27 ++++++++--
> >  rules/libgpiod.make                           | 53 ++++++++++++++-----
> >  7 files changed, 94 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/rules/libgpiod.make b/rules/libgpiod.make
> > index 6272333b5..6110130f2 100644
> > --- a/rules/libgpiod.make
> > +++ b/rules/libgpiod.make
>
> > @@ -28,9 +28,18 @@ 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 AND CC0-1.0
> > +LIBGPIOD_LICENSE_FILES       += \
> > +     
> > file://LICENSES/GPL-2.0-or-later.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> > +     file://LICENSES/CC-BY-SA-4.0.txt;md5=fba3b94d88bfb9b81369b869a1e9a20f 
> > \
> > +     file://LICENSES/CC0-1.0.txt;md5=65d3616852dbf7b1a6d4b53b00626032
>
> CC0-1.0 is only used for gpio-manager.service and 90-gpio.rules, so it
> should be dependent on PTXCONF_LIBGPIOD_DBUS_DAEMON_SYSTEMD.
> However, if installing rules files independently of systemd (see below),
> license selection would be correct.

Yes you are right. I need to split it an extra time.

>
> > -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 +93,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
>
> Good idea to rename LIBGPIOD_TOOLS-* to avoid confusion with the slightly
> unrelated PTXCONF_LIBGPIOD_TOOLS.
>
> > +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)
>
> Shouldn't udev rules (90-gpio.rules in this case) be installed
> independently of systemd? This would also be how nearly all existing
> packages containing udev rules files behave.

The 90-gpio.rules file is only installed with systemd:
----
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2022-2023 Bartosz Golaszewski
<[email protected]>

dbusdir = $(sysconfdir)/dbus-1/system.d/
dist_dbus_DATA = io.gpiod1.conf

if WITH_SYSTEMD

dist_systemdsystemunit_DATA = gpio-manager.service

udevdir = $(libdir)/udev/rules.d/
dist_udev_DATA = 90-gpio.rules

endif
---

>
> Sorry for this late feedback. I only had a deeper look into the dbus
> part after adaption of the license information. So maybe v4 :)

Yes v4 :)

/Lars Pedersen

>
> > +     @$(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
>
> Markus

Reply via email to