gpiod-sysfs-proxy: update to v1.0.2

This is a major release for gpiod-sysfs-proxy. Upstream now ships
systemd unit files so drop those from the recipe. The project was
updated to using the more modern pyfuse3 package. Other than that: it
works the same and passes the same set of tests. For sysvinit: some of
the command-line arguments are no longer supported in pyfuse3 so remove
them from the init script.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Bartosz Golaszewski
2026-07-02 11:36:47 +02:00
committed by Khem Raj
parent 155fd062e2
commit af37a6f0fb
5 changed files with 11 additions and 68 deletions
@@ -40,7 +40,7 @@ do_start()
mkdir -p $MOUNTPOINT
fi
$PROG $MOUNTPOINT -o nonempty -o allow_other -o default_permissions -o entry_timeout=0 -o attr_timeout=0 -f | logger -i $NAME &
$PROG $MOUNTPOINT -o allow_other -o default_permissions -f | logger -i $NAME &
echo "done"
}
@@ -1,15 +0,0 @@
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2024 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
[Unit]
Description=User-space, libgpiod-based compatibility layer for linux GPIO sysfs interface
[Service]
RuntimeDirectory=gpio
Type=simple
ExecStart=/usr/bin/gpiod-sysfs-proxy @mountpoint@ -f -o nonempty -o allow_other -o default_permissions -o entry_timeout=0 -o attr_timeout=0
ExecStop=/bin/umount @mountpoint@
Restart=always
[Install]
WantedBy=multi-user.target
@@ -1,13 +0,0 @@
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2024 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
[Unit]
Description=Remount of sysfs for gpiod-sysfs-proxy
ConditionPathExists=!/sys/class/gpio
[Mount]
DirectoryMode=0700
What=sysfs
Where=/run/gpio/sys
Type=sysfs
Options=nosuid,nodev,noexec
@@ -1,16 +0,0 @@
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2024 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
[Unit]
Description=Overlay on top of /sys/class adding the gpio class directory
Before=gpiod-sysfs-proxy.service
After=run-gpio-sys.mount
ConditionPathExists=!/sys/class/gpio
[Mount]
RuntimeDirectory=gpio/class/gpio
DirectoryMode=0755
What=overlay
Where=/sys/class
Type=overlay
Options=upperdir=/run/gpio/class,lowerdir=/run/gpio/sys/class,workdir=/run/gpio/work,ro,nosuid,nodev,noexec,relatime
@@ -1,21 +1,18 @@
SUMMARY = "User-space, libgpiod-based compatibility layer for linux GPIO sysfs interface."
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=0dcf8b702b5c96178978c7223f64a73b"
LIC_FILES_CHKSUM = "file://LICENSES/MIT.txt;md5=b1008aa4e86ef6163fc80a22d1547bea"
inherit systemd update-rc.d ptest pypi python_pep517 python_setuptools_build_meta useradd
PYPI_PACKAGE = "gpiod_sysfs_proxy"
SRC_URI += " \
file://gpiod-sysfs-proxy.service.in \
file://run-gpio-sys.mount \
file://sys-class.mount \
file://gpiod-sysfs-proxy.init.in \
file://run-ptest.in \
"
SRC_URI[sha256sum] = "bb38e31e4046a7aa0101c53c9e7e2cf319c0cd9620b9ba1641e962fce44a1f3a"
SRC_URI[sha256sum] = "a12fc9d0778078bf351daa4fab244910ac550e7bef77a12e47c16a1161bc539d"
# For full backward compatibility with the kernel sysfs interface, this option
# must be selected. However, we don't make it the default as - with kernel sysfs
@@ -27,29 +24,18 @@ PACKAGECONFIG[sys-class-mount] = ""
export MOUNTPOINT = "${@bb.utils.contains('PACKAGECONFIG', 'sys-class-mount', '/sys/class/gpio', '/run/gpio', d)}"
do_install:append() {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${UNPACKDIR}/gpiod-sysfs-proxy.service.in ${D}${systemd_system_unitdir}/gpiod-sysfs-proxy.service
if ${@bb.utils.contains('PACKAGECONFIG', 'sys-class-mount', 'true', 'false', d)}; then
install -d ${D}${systemd_system_unitdir}/sysinit.target.wants/
install -m 0644 ${UNPACKDIR}/run-gpio-sys.mount ${D}${systemd_system_unitdir}/run-gpio-sys.mount
install -m 0644 ${UNPACKDIR}/sys-class.mount ${D}${systemd_system_unitdir}/sys-class.mount
ln -sf ../run-gpio-sys.mount ${D}${systemd_system_unitdir}/sysinit.target.wants/run-gpio-sys.mount
ln -sf ../sys-class.mount ${D}${systemd_system_unitdir}/sysinit.target.wants/sys-class.mount
fi
sed -i "s:@mountpoint@:$MOUNTPOINT:g" ${D}${systemd_system_unitdir}/gpiod-sysfs-proxy.service
elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${UNPACKDIR}/gpiod-sysfs-proxy.init.in ${D}${sysconfdir}/init.d/gpiod-sysfs-proxy
sed -i "s:@mountpoint@:$MOUNTPOINT:g" ${D}${sysconfdir}/init.d/gpiod-sysfs-proxy
fi
}
SYSTEMD_SERVICE:${PN} = "gpiod-sysfs-proxy.service"
SYSTEMD_SERVICE:${PN} = " \
${@bb.utils.contains('PACKAGECONFIG', 'sys-class-mount', \
'gpiod-sysfs-proxy@sys-class-gpio.service', \
'gpiod-sysfs-proxy@run-gpio.service', d)} \
"
SYSTEMD_AUTO_ENABLE = "enable"
INITSCRIPT_NAME = "gpiod-sysfs-proxy"
@@ -58,9 +44,10 @@ INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 0 1 6 ."
FILES:${PN} += "/usr/lib/systemd/system"
RDEPENDS:${PN} += " \
python3-fuse \
python3-gpiod \
python3-pyfuse3 \
python3-pyudev \
python3-trio \
"
python __anonymous() {