summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/attr
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/attr')
-rw-r--r--meta/recipes-support/attr/acl/0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch49
-rw-r--r--meta/recipes-support/attr/acl/0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch35
-rw-r--r--meta/recipes-support/attr/acl/0001-test-patch-out-failing-bits.patch60
-rw-r--r--meta/recipes-support/attr/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch24
-rw-r--r--meta/recipes-support/attr/acl/run-ptest37
-rw-r--r--meta/recipes-support/attr/acl_2.3.2.bb65
-rw-r--r--meta/recipes-support/attr/attr.inc72
-rw-r--r--meta/recipes-support/attr/attr/run-ptest34
-rw-r--r--meta/recipes-support/attr/attr_2.5.2.bb57
9 files changed, 218 insertions, 215 deletions
diff --git a/meta/recipes-support/attr/acl/0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch b/meta/recipes-support/attr/acl/0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch
new file mode 100644
index 0000000000..5052bdaa2f
--- /dev/null
+++ b/meta/recipes-support/attr/acl/0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch
@@ -0,0 +1,49 @@
1From 56abe432b65801f31277fb9a3bca0f9e31502315 Mon Sep 17 00:00:00 2001
2From: Matthias Gerstner <matthias.gerstner@suse.de>
3Date: Thu, 25 Apr 2024 12:43:49 +0200
4Subject: [PATCH] libmisc: __acl_get_uid(): fix memory wasting loop if user
5 does not exist
6
7I noticed that `acl_from_text()` unexpectedly returns ENOMEM for invalid
8user names. The reason for this is a missing break statement in the for
9loop in `__acl_get_uid()`, which causes the loop to act as if ERANGE was
10returned from `getpwnam_r()`, thereby exponentially increasing the
11buffer size to (in my case) multiple gigabytes, until `grow_buffer()`
12reports ENOMEM, which terminates the `__acl_get_uid()` function.
13
14This is a pretty costly "no such user" lookup that can disturb a
15process's heap memory management, but can also cause a process to fail
16e.g. if it is multithreaded and other threads encounter an ENOMEM,
17before `__acl_get_uid()` frees the gigantic heap buffer and returns.
18The allocated memory isn't actually used. Therefore on Linux it should
19not affect other processes by default, due to its overcommit memory
20and lazy memory allocation strategy.
21
22Fix this by properly terminating the for loop on any conditions except
23an ERANGE error being reported. The same break statement correctly
24exists in `__acl_get_gid()` already.
25
26Fixes: 3737f00 ("use thread-safe getpwnam_r and getgrnam_r")
27Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
28
29Upstream-Status: Backport
30Signed-off-by: Ross Burton <ross.burton@arm.com>
31---
32 libmisc/uid_gid_lookup.c | 1 +
33 1 file changed, 1 insertion(+)
34
35diff --git a/libmisc/uid_gid_lookup.c b/libmisc/uid_gid_lookup.c
36index a4f21f6..74baab4 100644
37--- a/libmisc/uid_gid_lookup.c
38+++ b/libmisc/uid_gid_lookup.c
39@@ -91,6 +91,7 @@ __acl_get_uid(const char *token, uid_t *uid_p)
40 if (err == ERANGE)
41 continue;
42 errno = err ? err : EINVAL;
43+ break;
44 }
45 free(buffer);
46 return result ? 0 : -1;
47--
482.43.0
49
diff --git a/meta/recipes-support/attr/acl/0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch b/meta/recipes-support/attr/acl/0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch
new file mode 100644
index 0000000000..5aa3f3224c
--- /dev/null
+++ b/meta/recipes-support/attr/acl/0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch
@@ -0,0 +1,35 @@
1From 47f8039ec9bd08b629775c8e788d11e41fa95f14 Mon Sep 17 00:00:00 2001
2From: Andreas Gruenbacher <agruenba@redhat.com>
3Date: Mon, 24 Mar 2025 21:14:09 +0100
4Subject: [PATCH] test/misc.test: Don't mix stdout and stderr
5
6In different environments, we may not get the stdout and stderr output
7in the order the run script expects, so check both separately.
8
9Fixes: https://savannah.nongnu.org/bugs/?66944
10Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
11
12Upstream-Status: Backport
13Signed-off-by: Ross Burton <ross.burton@arm.com>
14---
15 test/misc.test | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18diff --git a/test/misc.test b/test/misc.test
19index 06b3136..57c02e5 100644
20--- a/test/misc.test
21+++ b/test/misc.test
22@@ -440,8 +440,9 @@ Dangling symlink test https://savannah.nongnu.org/bugs/?28131
23 > other::r-x
24 >
25 $ setfacl -R -m u:bin:rw d
26- $ getfacl -RL d
27+ $ getfacl -RL d > /dev/null
28 > getfacl: d/b: No such file or directory
29+ $ getfacl -RL d 2> /dev/null
30 > # file: d
31 > # owner: %TUSER
32 > # group: %TGROUP
33--
342.43.0
35
diff --git a/meta/recipes-support/attr/acl/0001-test-patch-out-failing-bits.patch b/meta/recipes-support/attr/acl/0001-test-patch-out-failing-bits.patch
deleted file mode 100644
index 219feaccd0..0000000000
--- a/meta/recipes-support/attr/acl/0001-test-patch-out-failing-bits.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1From 7dec6fa3b3494a55120402ff1ea3eb96b67138e8 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 12 Dec 2019 15:47:49 +0100
4Subject: [PATCH] test: patch out failing bits
5
6I have confirmed on the host distro (Ubuntu 18.04) that they
7fail as well; upstream probably haven't noticed because the
8test is only executed under sudo.
9
10Upstream-Status: Inappropriate [disabling tests instead of fixing them properly]
11Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
12---
13 test/root/permissions.test | 13 -------------
14 1 file changed, 13 deletions(-)
15
16diff --git a/test/root/permissions.test b/test/root/permissions.test
17index 8f8f825..21e8a95 100644
18--- a/test/root/permissions.test
19+++ b/test/root/permissions.test
20@@ -50,10 +50,6 @@ User daemon is a member in the owning group, which has only read access.
21 Verify this.
22
23 $ su daemon
24- $ cat f
25- > root
26- > bin
27-
28 $ echo daemon >> f
29 >~ .*f: Permission denied$
30
31@@ -146,8 +142,6 @@ the owning group, he should still have no write access.
32 $ setfacl -x g:daemon f
33
34 $ su daemon
35- $ echo daemon4 >> f
36- >~ .*f: Permission denied$
37
38
39 Change the owning group. The other permissions should now grant user
40@@ -158,12 +152,6 @@ daemon write access.
41
42 $ su daemon
43 $ echo daemon5 >> f
44- $ cat f
45- > root
46- > bin
47- > daemon
48- > daemon2
49- > daemon5
50
51
52 Verify that permissions in separate matching ACL entries do not
53@@ -173,7 +161,6 @@ accumulate.
54 $ setfacl -m g:bin:r,g:daemon:w f
55
56 $ su daemon
57- $ : < f
58 $ : > f
59 $ : <> f
60 >~ .*f: Permission denied$
diff --git a/meta/recipes-support/attr/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch b/meta/recipes-support/attr/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch
deleted file mode 100644
index 748f37f3e7..0000000000
--- a/meta/recipes-support/attr/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1From 42ae3f8a5e32ba0681ccd1552a203ddad8748a6e Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 12 Dec 2019 13:45:52 +0100
4Subject: [PATCH] tests: do not hardcode the build path into a helper library
5
6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 test/Makemodule.am | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/test/Makemodule.am b/test/Makemodule.am
13index e1d715d..cffe732 100644
14--- a/test/Makemodule.am
15+++ b/test/Makemodule.am
16@@ -30,7 +30,7 @@ EXTRA_DIST += \
17 check_LTLIBRARIES = libtestlookup.la
18
19 libtestlookup_la_SOURCES = test/test_passwd.c test/test_group.c
20-libtestlookup_la_CFLAGS = -DBASEDIR=\"$(abs_srcdir)\"
21+libtestlookup_la_CFLAGS = -DBASEDIR=\"/tmp/acl-ptest\"
22 libtestlookup_la_LDFLAGS = -rpath $(abs_builddir)
23
24 # Make sure translations don't break tests when matching output.
diff --git a/meta/recipes-support/attr/acl/run-ptest b/meta/recipes-support/attr/acl/run-ptest
index 3af75c84fe..f28d8c1212 100644
--- a/meta/recipes-support/attr/acl/run-ptest
+++ b/meta/recipes-support/attr/acl/run-ptest
@@ -1,16 +1,31 @@
1#!/bin/sh 1#!/bin/sh
2#
3#This script is used to run acl test suites
4 2
5#umask 077 3failed=0
4all=0
6 5
7mkdir -p /tmp/acl-ptest/test
8cp test/test.* /tmp/acl-ptest/test
9 6
10set +e 7for f in *.test; do
11make test-suite.log 8 LD_PRELOAD=$(pwd)/libtestlookup.so ./run $f
12exitcode=$? 9 case "$?" in
13if [ $exitcode -ne 0 -a -e test-suite.log ]; then 10 0)
14 cat test-suite.log 11 echo "PASS: $f"
12 all=$((all + 1))
13 ;;
14 77)
15 echo "SKIP: $f"
16 ;;
17 *)
18 echo "FAIL: $f"
19 failed=$((failed + 1))
20 all=$((all + 1))
21 ;;
22 esac
23done
24
25if [ "$failed" -eq 0 ] ; then
26 echo "All $all tests passed"
27 exit 0
28else
29 echo "$failed of $all tests failed"
30 exit 1
15fi 31fi
16exit $exitcode
diff --git a/meta/recipes-support/attr/acl_2.3.2.bb b/meta/recipes-support/attr/acl_2.3.2.bb
index 6178473873..a405cc2692 100644
--- a/meta/recipes-support/attr/acl_2.3.2.bb
+++ b/meta/recipes-support/attr/acl_2.3.2.bb
@@ -16,11 +16,10 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
16DEPENDS = "attr" 16DEPENDS = "attr"
17 17
18SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.tar.gz \ 18SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.tar.gz \
19 file://0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch \
20 file://0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch \
19 file://run-ptest \ 21 file://run-ptest \
20 file://0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch \
21 file://0001-test-patch-out-failing-bits.patch \
22 " 22 "
23
24SRC_URI[sha256sum] = "5f2bdbad629707aa7d85c623f994aa8a1d2dec55a73de5205bac0bf6058a2f7c" 23SRC_URI[sha256sum] = "5f2bdbad629707aa7d85c623f994aa8a1d2dec55a73de5205bac0bf6058a2f7c"
25 24
26inherit autotools gettext ptest 25inherit autotools gettext ptest
@@ -31,55 +30,41 @@ PACKAGES =+ "lib${BPN}"
31 30
32FILES:lib${BPN} = "${libdir}/lib*${SOLIBS}" 31FILES:lib${BPN} = "${libdir}/lib*${SOLIBS}"
33 32
34PTEST_BUILD_HOST_FILES = "builddefs"
35PTEST_BUILD_HOST_PATTERN = "^RPM"
36
37do_compile_ptest() { 33do_compile_ptest() {
38 oe_runmake libtestlookup.la 34 oe_runmake libtestlookup.la libtestlookup_la_CFLAGS=-DBASEDIR=\\\"${PTEST_PATH}\\\"
39} 35}
40 36
41do_install_ptest() { 37do_install_ptest() {
42 cp -rf ${S}/test/ ${D}${PTEST_PATH} 38 install -m755 ${S}/test/run ${S}/test/sort-getfacl-output ${D}${PTEST_PATH}/
43 cp -rf ${S}/build-aux/ ${D}${PTEST_PATH} 39 install -m644 ${S}/test/*.acl ${D}${PTEST_PATH}/
44 mkdir -p ${D}${PTEST_PATH}/.libs 40
45 cp -rf ${B}/.libs/libtestlookup* ${D}${PTEST_PATH}/.libs 41 # Install the tests
46 cp ${B}/Makefile ${D}${PTEST_PATH} 42 for t in $(makefile-getvar ${S}/test/Makemodule.am TESTS); do
47 43 install -m644 ${S}/$t ${D}${PTEST_PATH}/
48 sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ 44 done
49 -e 's|${DEBUG_PREFIX_MAP}||g' \ 45 # Remove the tests that are expected to fail (they need a NFS server configured)
50 -e 's:${HOSTTOOLS_DIR}/::g' \ 46 for t in $(makefile-getvar ${S}/test/Makemodule.am XFAIL_TESTS); do
51 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ 47 rm ${D}${PTEST_PATH}/$(basename $t)
52 -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ 48 done
53 -i ${D}${PTEST_PATH}/Makefile 49 # These tests need a very specific user/group setup
54 50 # (https://savannah.nongnu.org/bugs/index.php?66927)
55 sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile 51 rm -f ${D}${PTEST_PATH}/getfacl.test ${D}${PTEST_PATH}/permissions.test ${D}${PTEST_PATH}/restore.test ${D}${PTEST_PATH}/setfacl.test
56 sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile 52
57 sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile 53 ${B}/libtool --mode=install install ${B}/libtestlookup.la ${D}${PTEST_PATH}/
58 sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile 54 rm -f ${D}${PTEST_PATH}/*.la
59 55 install -d ${D}${PTEST_PATH}/test
60 rm ${D}${PTEST_PATH}/.libs/libtestlookup.lai 56 install -m644 ${S}/test/test.passwd ${S}/test/test.group ${D}${PTEST_PATH}/test
61}
62
63do_install_ptest:append:libc-musl() {
64 sed -i -e '/test\/misc.test/d' ${D}${PTEST_PATH}/Makefile
65} 57}
66 58
67RDEPENDS:${PN}-ptest = "acl \ 59RDEPENDS:${PN}-ptest = "acl \
68 bash \
69 coreutils \ 60 coreutils \
70 perl \ 61 perl \
71 perl-module-constant \
72 perl-module-filehandle \
73 perl-module-getopt-std \
74 perl-module-posix \
75 shadow \
76 make \
77 gawk \
78 e2fsprogs-mke2fs \
79 perl-module-cwd \ 62 perl-module-cwd \
80 perl-module-file-basename \ 63 perl-module-file-basename \
81 perl-module-file-path \ 64 perl-module-file-path \
82 perl-module-file-spec \ 65 perl-module-filehandle \
66 perl-module-getopt-std \
67 perl-module-posix \
83 " 68 "
84 69
85BBCLASSEXTEND = "native nativesdk" 70BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
deleted file mode 100644
index 75d616893a..0000000000
--- a/meta/recipes-support/attr/attr.inc
+++ /dev/null
@@ -1,72 +0,0 @@
1SUMMARY = "Utilities for manipulating filesystem extended attributes"
2DESCRIPTION = "Implement the ability for a user to attach name:value pairs to objects within the XFS filesystem."
3
4HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
5SECTION = "libs"
6
7DEPENDS = "virtual/libintl"
8
9LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
10LICENSE:${PN} = "GPL-2.0-or-later"
11LICENSE:lib${BPN} = "LGPL-2.1-or-later"
12LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
13 file://doc/COPYING.LGPL;md5=b8d31f339300bc239d73461d68e77b9c \
14 file://tools/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
15 file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
16
17SRC_URI = "${SAVANNAH_GNU_MIRROR}/attr/${BP}.tar.gz \
18 file://run-ptest \
19 file://0001-attr.c-Include-libgen.h-for-posix-version-of-basenam.patch \
20"
21
22inherit ptest update-alternatives autotools gettext
23
24PACKAGES =+ "lib${BPN}"
25
26FILES:lib${BPN} = "${libdir}/lib*${SOLIBS} ${sysconfdir}"
27
28ALTERNATIVE_PRIORITY = "100"
29ALTERNATIVE:${PN} = "setfattr"
30ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
31
32PTEST_BUILD_HOST_FILES = "builddefs"
33PTEST_BUILD_HOST_PATTERN = "^RPM"
34
35do_install_ptest() {
36 cp ${B}/Makefile ${D}${PTEST_PATH}
37 sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
38 -e 's|${DEBUG_PREFIX_MAP}||g' \
39 -e 's:${HOSTTOOLS_DIR}/::g' \
40 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
41 -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
42 -i ${D}${PTEST_PATH}/Makefile
43
44 sed -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
45 sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile
46 sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile
47 sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile
48 cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}
49 cp -rf ${S}/test/ ${D}${PTEST_PATH}
50}
51
52do_install_ptest:append:libc-musl() {
53 sed -i -e 's|f: Operation n|f: N|g' ${D}${PTEST_PATH}/test/attr.test
54}
55
56RDEPENDS:${PN}-ptest = "attr \
57 bash \
58 coreutils \
59 perl-module-constant \
60 perl-module-filehandle \
61 perl-module-getopt-std \
62 perl-module-posix \
63 make \
64 perl \
65 gawk \
66 perl-module-cwd \
67 perl-module-file-basename \
68 perl-module-file-path \
69 perl-module-file-spec \
70 "
71
72BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/attr/attr/run-ptest b/meta/recipes-support/attr/attr/run-ptest
index 3e7a3a17a0..028671a9bd 100644
--- a/meta/recipes-support/attr/attr/run-ptest
+++ b/meta/recipes-support/attr/attr/run-ptest
@@ -1,10 +1,30 @@
1#!/bin/sh 1#!/bin/sh
2 2
3set +e 3failed=0
4make test-suite.log 4all=0
5exitcode=$? 5
6if [ $exitcode -ne 0 -a -e test-suite.log ]; then 6for f in *.test; do
7 cat test-suite.log 7 ./run $f
8fi 8 case "$?" in
9exit $exitcode 9 0)
10 echo "PASS: $f"
11 all=$((all + 1))
12 ;;
13 77)
14 echo "SKIP: $f"
15 ;;
16 *)
17 echo "FAIL: $f"
18 failed=$((failed + 1))
19 all=$((all + 1))
20 ;;
21 esac
22done
10 23
24if [ "$failed" -eq 0 ] ; then
25 echo "All $all tests passed"
26 exit 0
27else
28 echo "$failed of $all tests failed"
29 exit 1
30fi
diff --git a/meta/recipes-support/attr/attr_2.5.2.bb b/meta/recipes-support/attr/attr_2.5.2.bb
index 2110c6d885..390445b959 100644
--- a/meta/recipes-support/attr/attr_2.5.2.bb
+++ b/meta/recipes-support/attr/attr_2.5.2.bb
@@ -1,5 +1,60 @@
1require attr.inc 1SUMMARY = "Utilities for manipulating filesystem extended attributes"
2DESCRIPTION = "Implement the ability for a user to attach name:value pairs to objects within the XFS filesystem."
3
4HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
5SECTION = "libs"
6
7DEPENDS = "virtual/libintl"
8
9LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
10LICENSE:${PN} = "GPL-2.0-or-later"
11LICENSE:lib${BPN} = "LGPL-2.1-or-later"
12LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
13 file://doc/COPYING.LGPL;md5=b8d31f339300bc239d73461d68e77b9c \
14 file://tools/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
15 file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
16
17SRC_URI = "${SAVANNAH_GNU_MIRROR}/attr/${BP}.tar.gz \
18 file://run-ptest \
19 file://0001-attr.c-Include-libgen.h-for-posix-version-of-basenam.patch \
20"
2 21
3SRC_URI[sha256sum] = "39bf67452fa41d0948c2197601053f48b3d78a029389734332a6309a680c6c87" 22SRC_URI[sha256sum] = "39bf67452fa41d0948c2197601053f48b3d78a029389734332a6309a680c6c87"
4 23
24inherit ptest update-alternatives autotools gettext
25
26PACKAGES =+ "lib${BPN}"
27
28FILES:lib${BPN} = "${libdir}/lib*${SOLIBS} ${sysconfdir}"
29
30ALTERNATIVE_PRIORITY = "100"
31ALTERNATIVE:${PN} = "setfattr getfattr"
32ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr"
33ALTERNATIVE_TARGET[getfattr] = "${bindir}/getfattr"
34
35do_install_ptest() {
36 install -m755 ${S}/test/run ${S}/test/sort-getfattr-output ${D}${PTEST_PATH}/
37
38 for t in $(makefile-getvar ${S}/test/Makemodule.am TESTS); do
39 install -m644 ${S}/$t ${D}${PTEST_PATH}/
40 done
41}
42
43do_install_ptest:append:libc-musl() {
44 # With glibc strerror(ENOTSUP) is "Operation not supported" but
45 # musl is "Not supported".
46 # https://savannah.nongnu.org/bugs/?62370
47 sed -i -e 's|f: Operation not supported|f: Not supported|g' ${D}${PTEST_PATH}/attr.test
48}
49
50RDEPENDS:${PN}-ptest = "attr \
51 perl \
52 perl-module-cwd \
53 perl-module-file-basename \
54 perl-module-file-path \
55 perl-module-filehandle \
56 perl-module-getopt-std \
57 perl-module-posix \
58 "
59
5BBCLASSEXTEND = "native nativesdk" 60BBCLASSEXTEND = "native nativesdk"