diff mbox series

[meta-oe,46/55] inotify-tools: upgrade 4.25.9.0 -> 4.26.291

Message ID 20261125080732.2419614-52-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-multimedia] clightd: Port ALS sensor to libiio 1.0 | expand

Commit Message

Khem Raj Nov. 25, 2026, 8:07 a.m. UTC
inotify-tools was rewritten in Rust. The tools and libinotifytools are
meant as drop-in replacements: the library keeps SONAME
libinotifytools.so.0 and the C headers. Upstream now releases every
green commit on master as <series>.<commit count>. Also new:
- fanotify mount and filesystem watches (btrfs sub-volumes, overlayfs)
- filenames preserved in fanotify delete and move events
- timeouts respected while waiting for filtered or batched events

Autotools is gone; the top-level GNU Makefile runs cargo for the
workspace, generates the headers and man pages and installs the
historical layout. Build with the cargo class and call make with the
OE target triple, profile and target dir. Use the release tarball,
which has the full version stamped in VERSION. The only crate is libc;
the crates include was generated from Cargo.lock with the same logic as
'bitbake -c update_crates inotify-tools'. The static library is not
installed, as with the old --disable-static build. The ptest keeps
running the C++ C-ABI unit test (libinotifytools/src/test.cpp), now
built against the Rust cdylib. The upstream package metadata
(Cargo.toml) declares GPL-2.0-or-later and COPYING is the GPLv2 text,
so LICENSE becomes GPL-2.0-or-later.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 .../inotify-tools/inotify-tools-crates.inc    |  8 +++
 .../inotify-tools/inotify-tools_4.25.9.0.bb   | 37 ------------
 .../inotify-tools/inotify-tools_4.26.291.bb   | 57 +++++++++++++++++++
 3 files changed, 65 insertions(+), 37 deletions(-)
 create mode 100644 meta-oe/recipes-support/inotify-tools/inotify-tools-crates.inc
 delete mode 100644 meta-oe/recipes-support/inotify-tools/inotify-tools_4.25.9.0.bb
 create mode 100644 meta-oe/recipes-support/inotify-tools/inotify-tools_4.26.291.bb
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools-crates.inc b/meta-oe/recipes-support/inotify-tools/inotify-tools-crates.inc
new file mode 100644
index 0000000000..90ab41a802
--- /dev/null
+++ b/meta-oe/recipes-support/inotify-tools/inotify-tools-crates.inc
@@ -0,0 +1,8 @@ 
+# Autogenerated with 'bitbake -c update_crates inotify-tools'
+
+# from Cargo.lock
+SRC_URI += " \
+    crate://crates.io/libc/0.2.183 \
+"
+
+SRC_URI[libc-0.2.183.sha256sum] = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d"
diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools_4.25.9.0.bb b/meta-oe/recipes-support/inotify-tools/inotify-tools_4.25.9.0.bb
deleted file mode 100644
index a03b835641..0000000000
--- a/meta-oe/recipes-support/inotify-tools/inotify-tools_4.25.9.0.bb
+++ /dev/null
@@ -1,37 +0,0 @@ 
-SUMMARY = "Command line tools and C library providing a simple interface to inotify"
-HOMEPAGE = "http://wiki.github.com/rvoicilas/inotify-tools"
-SECTION = "console/devel"
-LICENSE = "GPL-2.0-only"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ac6c26e52aea428ee7f56dc2c56424c6"
-
-SRCREV = "81c6c9881edf4844f2b8250e63f82da9cb7f5444"
-
-SRC_URI = "git://github.com/${BPN}/${BPN};branch=master;protocol=https \
-           file://run-ptest \
-           "
-
-
-inherit autotools ptest
-
-EXTRA_OECONF = "--disable-doxygen"
-
-# workaround until glibc 2.35 is fixed for this [1]
-# [1] https://sourceware.org/pipermail/libc-alpha/2021-December/134215.html
-CFLAGS += "-Wno-error"
-
-PACKAGES =+ "libinotifytools"
-
-FILES:libinotifytools = "${libdir}/lib*.so.*"
-
-do_compile_ptest() {
-        cd libinotifytools/src
-        oe_runmake
-        oe_runmake test
-}
-
-do_install_ptest() {
-    install -d ${D}${PTEST_PATH}
-    cp -r ${B}/libinotifytools/src/.libs/test ${D}${PTEST_PATH}/
-}
-
-FILES:${PN}-ptest += "${PTEST_PATH}"
diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools_4.26.291.bb b/meta-oe/recipes-support/inotify-tools/inotify-tools_4.26.291.bb
new file mode 100644
index 0000000000..75f26e8a97
--- /dev/null
+++ b/meta-oe/recipes-support/inotify-tools/inotify-tools_4.26.291.bb
@@ -0,0 +1,57 @@ 
+SUMMARY = "Command line tools and C library providing a simple interface to inotify"
+HOMEPAGE = "https://github.com/inotify-tools/inotify-tools"
+SECTION = "console/devel"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ac6c26e52aea428ee7f56dc2c56424c6"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.gz \
+           file://run-ptest \
+           "
+SRC_URI[sha256sum] = "633c012d30a0f66770454ee15e6d5d24003a61206b4a698cc4b32e6715855667"
+
+UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
+UPSTREAM_CHECK_REGEX = "releases/tag/(?P<pver>\d+(\.\d+)+)"
+
+inherit cargo cargo-update-recipe-crates ptest
+
+require ${BPN}-crates.inc
+
+EXTRA_OEMAKE = " \
+    CARGOFLAGS='-v --frozen' \
+    PROFILE=${CARGO_PROFILE} \
+    TARGET=${RUST_HOST_SYS} \
+    CARGO_TARGET_DIR=${B}/target \
+    ENABLE_STATIC=0 \
+    prefix=${prefix} \
+    bindir=${bindir} \
+    libdir=${libdir} \
+    includedir=${includedir} \
+    mandir=${mandir} \
+"
+
+do_compile() {
+    export RUSTFLAGS="${RUSTFLAGS}"
+    oe_runmake -C ${S}
+}
+
+do_install() {
+    oe_cargo_fix_env
+    export RUSTFLAGS="${RUSTFLAGS}"
+    oe_runmake -C ${S} install DESTDIR=${D}
+}
+
+PACKAGES =+ "libinotifytools"
+
+FILES:libinotifytools = "${libdir}/lib*.so.*"
+
+# The C++ unit test of the C ABI, linked against the installed library
+do_compile_ptest() {
+    ${CXX} ${CXXFLAGS} -std=c++17 -Wall -I${S}/libinotifytools/src \
+        -o ${B}/test ${S}/libinotifytools/src/test.cpp \
+        -L${B}/target/${CARGO_TARGET_SUBDIR} -linotifytools ${LDFLAGS}
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}
+    install -m 0755 ${B}/test ${D}${PTEST_PATH}/
+}