Skip to contentSkip to conversation

findutils: use getlimits from findutils

PATCH New [email protected] 1 participant 2 messages Jun 8, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 findutils: use getlimits from findutils

From: Etienne Cordonnier <[email protected]>

Having findutils depending on coreutils-getlimits makes it harder to replace GNU coreutils with uutils-coreutils using PREFERRED_PROVIDER.
Also, the findutils repository contains a version of getlimits used for the tests, so there is no need to depend on coreutils's version of getlimits.

---
 meta/recipes-extended/findutils/findutils/run-ptest | 3 +++
 meta/recipes-extended/findutils/findutils_4.10.0.bb | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
meta/recipes-extended/findutils/findutils/run-ptest +3 -0
index 3dec117067..0c9af47efd 100644
@@ -5,6 +5,9 @@ ln -s /usr/bin/find /tmp/oldfind
 # make oldfind visible
 export PATH="/tmp:${PATH}"
 
+# Add findutils ptest directory to PATH for getlimits
+export PATH="/usr/lib/findutils/ptest:${PATH}"
+
 export built_programs="find xargs locate updatedb"
 
 # this gets substituted by sed during build
meta/recipes-extended/findutils/findutils_4.10.0.bb +2 -1
index 57f77de16f..aa21637657 100644
@@ -15,12 +15,13 @@ CACHED_CONFIGUREVARS += "gl_cv_func_wcwidth_works=yes"
 EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
 
 # need od from coreutils for -t option
-RDEPENDS:${PN}-ptest += "bash sed grep coreutils coreutils-getlimits"
+RDEPENDS:${PN}-ptest += "bash sed grep coreutils"
 
 do_install_ptest:class-target() {
 	mkdir -p ${D}${PTEST_PATH}/tests/
 	cp ${S}/init.cfg ${D}${PTEST_PATH}
 	cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
+	install -m 755 ${B}/find/getlimits ${D}${PTEST_PATH}/
 
 	# substitute value in run-ptest with actual version
 	sed -i -e 's/__run_ptest_version__/${PV}/' ${D}${PTEST_PATH}/run-ptest
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 2/2 Revert "coreutils: split out coreutils-getlimits"

From: Etienne Cordonnier <[email protected]>

This reverts commit 149584beef1e1b28a4e51f40515204e7edaa9d1f.

The coreutils-getlimits package is no longer needed since findutils-ptest now uses its own getlimits implementation. This improves modularity and makes it easier to use alternative coreutils implementations via PREFERRED_PROVIDER (e.g. uutils-coreutils recipe in meta-openembedded).

---
 meta/recipes-core/coreutils/coreutils_9.7.bb | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)
meta/recipes-core/coreutils/coreutils_9.7.bb +3 -9
index 091e1ea2c5..dc9dfae26b 100644
@@ -74,11 +74,6 @@ RDEPENDS:coreutils:class-target += "${@bb.utils.contains('PACKAGECONFIG', 'singl
 # regardless of whether single-binary is in effect.
 RPROVIDES:coreutils += "${@bb.utils.contains('PACKAGECONFIG', 'single-binary', 'coreutils-stdbuf', '', d)}"
 
-# put getlimits into coreutils-getlimits, because other ptest packages such as
-# findutils-ptest may need this command. Note that getlimits is a noinst_PROGRAM
-PACKAGE_BEFORE_PN:class-target += "${PN}-getlimits"
-FILES:${PN}-getlimits = "${bindir}/getlimits"
-
 # Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
 do_compile:prepend () {
 	mkdir -p ${B}/src
@@ -106,9 +101,6 @@ do_install:append() {
 	# in update-alternatives to fail, therefore use lbracket - the name used
 	# for the actual source file.
 	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-
-	# this getlimits noinst_PROGRAM would possibly be needed by other ptest packages
-	install ${B}/src/getlimits ${D}/${bindir}
 }
 
 inherit update-alternatives
@@ -213,6 +205,7 @@ do_install_ptest () {
         fi
     done
 
+    install ${B}/src/getlimits ${D}/${bindir}
     # handle multilib
     sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
 }
@@ -224,6 +217,7 @@ do_install_ptest:append:libc-musl () {
     sed -i -e '/tests\/split\/line-bytes.sh/d' ${D}${PTEST_PATH}/Makefile
 }
 
-RDEPENDS:${PN}-ptest += "${PN}-getlimits xz  \
+RDEPENDS:${PN}-ptest += "xz  \
                          ${@bb.utils.contains('PACKAGECONFIG', 'acl', 'acl', '', d)} \
                          ${@bb.utils.contains('PACKAGECONFIG', 'xattr', 'attr', '', d)}"
+FILES:${PN}-ptest += "${bindir}/getlimits"
Signature · 1 line
2.43.0