From 920fd295d63b61189ff0a89551d03aaf05403865 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Wed, 18 Feb 2026 16:15:05 +0100 Subject: gpiod-sysfs-proxy: update to v0.1.4 This update fixes a couple problems with the proxy daemon but also addresses local issues with the recipe: modifies the systemd service to pass attr_timeout=0 for better reliability and updates the test script. Signed-off-by: Bartosz Golaszewski Signed-off-by: Khem Raj --- .../gpiod-sysfs-proxy/gpiod-sysfs-proxy.init.in | 2 +- .../gpiod-sysfs-proxy/gpiod-sysfs-proxy.service.in | 2 +- .../gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.2.bb | 85 ---------------------- .../gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.4.bb | 85 ++++++++++++++++++++++ 4 files changed, 87 insertions(+), 87 deletions(-) delete mode 100644 meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.2.bb create mode 100644 meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.4.bb (limited to 'meta-filesystems') diff --git a/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy/gpiod-sysfs-proxy.init.in b/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy/gpiod-sysfs-proxy.init.in index a9cf5e4075..cba731c9fd 100644 --- a/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy/gpiod-sysfs-proxy.init.in +++ b/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy/gpiod-sysfs-proxy.init.in @@ -40,7 +40,7 @@ do_start() mkdir -p $MOUNTPOINT fi - $PROG $MOUNTPOINT -o nonempty -o allow_other -o default_permissions -o entry_timeout=0 -f | logger -i $NAME & + $PROG $MOUNTPOINT -o nonempty -o allow_other -o default_permissions -o entry_timeout=0 -o attr_timeout=0 -f | logger -i $NAME & echo "done" } diff --git a/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy/gpiod-sysfs-proxy.service.in b/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy/gpiod-sysfs-proxy.service.in index 313523268c..5f8c4f4834 100644 --- a/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy/gpiod-sysfs-proxy.service.in +++ b/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy/gpiod-sysfs-proxy.service.in @@ -7,7 +7,7 @@ Description=User-space, libgpiod-based compatibility layer for linux GPIO sysfs [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 +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 diff --git a/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.2.bb b/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.2.bb deleted file mode 100644 index 3e68a52b09..0000000000 --- a/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.2.bb +++ /dev/null @@ -1,85 +0,0 @@ -SUMMARY = "User-space, libgpiod-based compatibility layer for linux GPIO sysfs interface." - -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://COPYING;md5=0dcf8b702b5c96178978c7223f64a73b" - -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] = "4bdd4b8a7042f63a40507ae0f16b360011e67cbb2f0276289636487a54849530" - -# 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 -# disabled - it plays a silly game with /sys/class, where it mounts a read-only -# overlay containing the missing /sys/class/gpio directory. This is a rather -# non-standard behavior so make sure the user actually wants it. -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 - 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_AUTO_ENABLE = "enable" - -INITSCRIPT_NAME = "gpiod-sysfs-proxy" -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-pyudev \ -" - -python __anonymous() { - if d.getVar("PTEST_ENABLED") == "1": - d.appendVar("SRC_URI", "git://github.com/brgl/gpio-sysfs-compat-tests;protocol=https;branch=main;destsuffix=tests;name=tests") - d.setVar("SRCREV_tests", "a3c9daa4650dd1e8d7fd8972db68d9c2c204263d") -} - -do_install_ptest() { - install -d ${D}${PTEST_PATH}/tests/ - install -m 0755 ${UNPACKDIR}/run-ptest.in ${D}${PTEST_PATH}/run-ptest - sed -i "s:@mountpoint@:$MOUNTPOINT:g" ${D}${PTEST_PATH}/run-ptest - install -m 0755 ${UNPACKDIR}/tests/gpio-sysfs-compat-tests ${D}${PTEST_PATH}/tests/gpio-sysfs-compat-tests -} - -# Test user is created for verifying chown() and chmod() operations. -USERADD_PACKAGES = "${PN}-ptest" -GROUPADD_PARAM:${PN}-ptest = "--system gpio-test" -USERADD_PARAM:${PN}-ptest = "--system -M -s /bin/nologin -g gpio-test gpio-test" - -RDEPENDS:${PN}-ptest += "kmod" -RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim kernel-module-configfs" diff --git a/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.4.bb b/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.4.bb new file mode 100644 index 0000000000..52b73f3ff4 --- /dev/null +++ b/meta-filesystems/dynamic-layers/meta-python/recipes-support/gpiod-sysfs-proxy/gpiod-sysfs-proxy_0.1.4.bb @@ -0,0 +1,85 @@ +SUMMARY = "User-space, libgpiod-based compatibility layer for linux GPIO sysfs interface." + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=0dcf8b702b5c96178978c7223f64a73b" + +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" + +# 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 +# disabled - it plays a silly game with /sys/class, where it mounts a read-only +# overlay containing the missing /sys/class/gpio directory. This is a rather +# non-standard behavior so make sure the user actually wants it. +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 + 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_AUTO_ENABLE = "enable" + +INITSCRIPT_NAME = "gpiod-sysfs-proxy" +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-pyudev \ +" + +python __anonymous() { + if d.getVar("PTEST_ENABLED") == "1": + d.appendVar("SRC_URI", "git://github.com/brgl/gpio-sysfs-compat-tests;protocol=https;branch=main;destsuffix=tests;name=tests") + d.setVar("SRCREV_tests", "2882af358480afcf7eed85584cddd560d6673637") +} + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests/ + install -m 0755 ${UNPACKDIR}/run-ptest.in ${D}${PTEST_PATH}/run-ptest + sed -i "s:@mountpoint@:$MOUNTPOINT:g" ${D}${PTEST_PATH}/run-ptest + install -m 0755 ${UNPACKDIR}/tests/gpio-sysfs-compat-tests ${D}${PTEST_PATH}/tests/gpio-sysfs-compat-tests +} + +# Test user is created for verifying chown() and chmod() operations. +USERADD_PACKAGES = "${PN}-ptest" +GROUPADD_PARAM:${PN}-ptest = "--system gpio-test" +USERADD_PARAM:${PN}-ptest = "--system -M -s /bin/nologin -g gpio-test gpio-test" + +RDEPENDS:${PN}-ptest += "kmod python3-multiprocess" +RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim kernel-module-configfs" -- cgit v1.2.3-54-g00ecf