|
@@ -16,11 +16,10 @@ LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
|
|
|
DEPENDS = "attr"
|
|
|
|
|
|
SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.tar.gz \
|
|
|
+ file://0001-libmisc-__acl_get_uid-fix-memory-wasting-loop-if-use.patch \
|
|
|
+ file://0001-test-misc.test-Don-t-mix-stdout-and-stderr.patch \
|
|
|
file://run-ptest \
|
|
|
- file://0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch \
|
|
|
- file://0001-test-patch-out-failing-bits.patch \
|
|
|
"
|
|
|
-
|
|
|
SRC_URI[sha256sum] = "5f2bdbad629707aa7d85c623f994aa8a1d2dec55a73de5205bac0bf6058a2f7c"
|
|
|
|
|
|
inherit autotools gettext ptest
|
|
@@ -31,57 +30,41 @@ PACKAGES =+ "lib${BPN}"
|
|
|
|
|
|
FILES:lib${BPN} = "${libdir}/lib*${SOLIBS}"
|
|
|
|
|
|
-PTEST_BUILD_HOST_FILES = "builddefs"
|
|
|
-PTEST_BUILD_HOST_PATTERN = "^RPM"
|
|
|
-
|
|
|
do_compile_ptest() {
|
|
|
- oe_runmake libtestlookup.la
|
|
|
+ oe_runmake libtestlookup.la libtestlookup_la_CFLAGS=-DBASEDIR=\\\"${PTEST_PATH}\\\"
|
|
|
}
|
|
|
|
|
|
do_install_ptest() {
|
|
|
- cp -rf ${S}/test/ ${D}${PTEST_PATH}
|
|
|
- cp -rf ${S}/build-aux/ ${D}${PTEST_PATH}
|
|
|
- mkdir -p ${D}${PTEST_PATH}/.libs
|
|
|
- cp -rf ${B}/.libs/libtestlookup* ${D}${PTEST_PATH}/.libs
|
|
|
- cp ${B}/Makefile ${D}${PTEST_PATH}
|
|
|
-
|
|
|
- sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
|
|
|
- -e 's|${DEBUG_PREFIX_MAP}||g' \
|
|
|
- -e 's:${HOSTTOOLS_DIR}/::g' \
|
|
|
- -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
|
|
|
- -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
|
|
|
- -i ${D}${PTEST_PATH}/Makefile
|
|
|
-
|
|
|
- sed -e "s|^srcdir =.*|srcdir = .|" \
|
|
|
- -e "s|^abs_srcdir =.*|abs_srcdir = .|" \
|
|
|
- -e "s|^abs_top_srcdir =.*|abs_top_srcdir = ..|" \
|
|
|
- -e "s|^Makefile:.*|Makefile:|" \
|
|
|
- -e "/^TEST_LOG_DRIVER =/s|(top_srcdir)|(top_builddir)|" \
|
|
|
- -i ${D}${PTEST_PATH}/Makefile
|
|
|
-
|
|
|
- rm ${D}${PTEST_PATH}/.libs/libtestlookup.lai
|
|
|
-}
|
|
|
-
|
|
|
-do_install_ptest:append:libc-musl() {
|
|
|
- sed -i -e '/test\/misc.test/d' ${D}${PTEST_PATH}/Makefile
|
|
|
+ install -m755 ${S}/test/run ${S}/test/sort-getfacl-output ${D}${PTEST_PATH}/
|
|
|
+ install -m644 ${S}/test/*.acl ${D}${PTEST_PATH}/
|
|
|
+
|
|
|
+ # Install the tests
|
|
|
+ for t in $(makefile-getvar ${S}/test/Makemodule.am TESTS); do
|
|
|
+ install -m644 ${S}/$t ${D}${PTEST_PATH}/
|
|
|
+ done
|
|
|
+ # Remove the tests that are expected to fail (they need a NFS server configured)
|
|
|
+ for t in $(makefile-getvar ${S}/test/Makemodule.am XFAIL_TESTS); do
|
|
|
+ rm ${D}${PTEST_PATH}/$(basename $t)
|
|
|
+ done
|
|
|
+ # These tests need a very specific user/group setup
|
|
|
+ # (https://savannah.nongnu.org/bugs/index.php?66927)
|
|
|
+ rm -f ${D}${PTEST_PATH}/getfacl.test ${D}${PTEST_PATH}/permissions.test ${D}${PTEST_PATH}/restore.test ${D}${PTEST_PATH}/setfacl.test
|
|
|
+
|
|
|
+ ${B}/libtool --mode=install install ${B}/libtestlookup.la ${D}${PTEST_PATH}/
|
|
|
+ rm -f ${D}${PTEST_PATH}/*.la
|
|
|
+ install -d ${D}${PTEST_PATH}/test
|
|
|
+ install -m644 ${S}/test/test.passwd ${S}/test/test.group ${D}${PTEST_PATH}/test
|
|
|
}
|
|
|
|
|
|
RDEPENDS:${PN}-ptest = "acl \
|
|
|
- bash \
|
|
|
coreutils \
|
|
|
perl \
|
|
|
- perl-module-constant \
|
|
|
- perl-module-filehandle \
|
|
|
- perl-module-getopt-std \
|
|
|
- perl-module-posix \
|
|
|
- shadow \
|
|
|
- make \
|
|
|
- gawk \
|
|
|
- e2fsprogs-mke2fs \
|
|
|
perl-module-cwd \
|
|
|
perl-module-file-basename \
|
|
|
perl-module-file-path \
|
|
|
- perl-module-file-spec \
|
|
|
+ perl-module-filehandle \
|
|
|
+ perl-module-getopt-std \
|
|
|
+ perl-module-posix \
|
|
|
"
|
|
|
|
|
|
BBCLASSEXTEND = "native nativesdk"
|