diff --git a/meta-openeuler/recipes-core/acl/acl/0001-test-patch-out-failing-bits.patch b/meta-openeuler/recipes-core/acl/acl/0001-test-patch-out-failing-bits.patch new file mode 100644 index 0000000000000000000000000000000000000000..ba2ffee5d277675ed53e8d48439c6c8b9b476892 --- /dev/null +++ b/meta-openeuler/recipes-core/acl/acl/0001-test-patch-out-failing-bits.patch @@ -0,0 +1,63 @@ +From 9e08219e0e99ee2589cf35fa8d52cef3515accce Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 12 Dec 2019 15:47:49 +0100 +Subject: [PATCH] test: patch out failing bits + +I have confirmed on the host distro (Ubuntu 18.04) that they +fail as well; upstream probably haven't noticed because the +test is only executed under sudo. + +Upstream-Status: Inappropriate [disabling tests instead of fixing them properly] +Signed-off-by: Alexander Kanavin +--- + test/root/permissions.test | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/test/root/permissions.test b/test/root/permissions.test +index 8f8f825..21e8a95 100644 +--- a/test/root/permissions.test ++++ b/test/root/permissions.test +@@ -50,10 +50,6 @@ User daemon is a member in the owning group, which has only read access. + Verify this. + + $ su daemon +- $ cat f +- > root +- > bin +- + $ echo daemon >> f + >~ .*f: Permission denied$ + +@@ -146,8 +142,6 @@ the owning group, he should still have no write access. + $ setfacl -x g:daemon f + + $ su daemon +- $ echo daemon4 >> f +- >~ .*f: Permission denied$ + + + Change the owning group. The other permissions should now grant user +@@ -158,12 +152,6 @@ daemon write access. + + $ su daemon + $ echo daemon5 >> f +- $ cat f +- > root +- > bin +- > daemon +- > daemon2 +- > daemon5 + + + Verify that permissions in separate matching ACL entries do not +@@ -173,7 +161,6 @@ accumulate. + $ setfacl -m g:bin:r,g:daemon:w f + + $ su daemon +- $ : < f + $ : > f + $ : <> f + >~ .*f: Permission denied$ +-- +2.17.1 + diff --git a/meta-openeuler/recipes-core/acl/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch b/meta-openeuler/recipes-core/acl/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch new file mode 100644 index 0000000000000000000000000000000000000000..57ef0bb728cfdd305795f85f8109727869b49810 --- /dev/null +++ b/meta-openeuler/recipes-core/acl/acl/0001-tests-do-not-hardcode-the-build-path-into-a-helper-l.patch @@ -0,0 +1,24 @@ +From 39d332a8801de5d9ef09dacb3dba85c208b7b2ad Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 12 Dec 2019 13:45:52 +0100 +Subject: [PATCH] tests: do not hardcode the build path into a helper library + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + test/Makemodule.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/Makemodule.am b/test/Makemodule.am +index 17d4927..015de7f 100644 +--- a/test/Makemodule.am ++++ b/test/Makemodule.am +@@ -30,7 +30,7 @@ EXTRA_DIST += \ + check_LTLIBRARIES = libtestlookup.la + + libtestlookup_la_SOURCES = test/test_passwd.c test/test_group.c +-libtestlookup_la_CFLAGS = -DBASEDIR=\"$(abs_srcdir)\" ++libtestlookup_la_CFLAGS = -DBASEDIR=\"/tmp/acl-ptest\" + libtestlookup_la_LDFLAGS = -rpath $(abs_builddir) + + AM_TESTS_ENVIRONMENT = PATH="$(abs_top_builddir):$$PATH"; diff --git a/meta-openeuler/recipes-core/acl/acl/run-ptest b/meta-openeuler/recipes-core/acl/acl/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..43128233654d31b3577877ce21cb4344b3068fa9 --- /dev/null +++ b/meta-openeuler/recipes-core/acl/acl/run-ptest @@ -0,0 +1,10 @@ +#!/bin/sh +# +#This script is used to run acl test suites + +#umask 077 + +mkdir -p /tmp/acl-ptest/test +cp test/test.* /tmp/acl-ptest/test + +make test-suite.log diff --git a/meta-openeuler/recipes-core/acl/acl_2.3.1.bb b/meta-openeuler/recipes-core/acl/acl_2.3.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..a285af482f69b7d6e0adae35e6a1b0554b8470ff --- /dev/null +++ b/meta-openeuler/recipes-core/acl/acl_2.3.1.bb @@ -0,0 +1,78 @@ +SUMMARY = "Utilities for managing POSIX Access Control Lists" +DESCRIPTION = "ACL allows you to provide different levels of access to files \ +and folders for different users." + +HOMEPAGE = "http://savannah.nongnu.org/projects/acl/" +BUGTRACKER = "http://savannah.nongnu.org/bugs/?group=acl" + +SECTION = "libs" + +LICENSE = "LGPLv2.1+ & GPLv2+" +LICENSE_${PN} = "GPLv2+" +LICENSE_lib${BPN} = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \ + file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764" + +DEPENDS = "attr" + +SRC_URI = "file://acl/acl-${PV}.tar.gz \ + 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] = "760c61c68901b37fdd5eefeeaf4c0c7a26bdfdd8ac747a1edff1ce0e243c11af" + +inherit autotools gettext ptest + +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 +} + +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 -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile + + rm ${D}${PTEST_PATH}/.libs/libtestlookup.lai +} + +RDEPENDS_${PN}-ptest = "acl \ + bash \ + coreutils \ + perl \ + 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 \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/attr/attr.inc b/meta-openeuler/recipes-core/attr/attr.inc new file mode 100644 index 0000000000000000000000000000000000000000..442273d669da35265fbfd0b05d20250a094036b9 --- /dev/null +++ b/meta-openeuler/recipes-core/attr/attr.inc @@ -0,0 +1,67 @@ +SUMMARY = "Utilities for manipulating filesystem extended attributes" +DESCRIPTION = "Implement the ability for a user to attach name:value pairs to objects within the XFS filesystem." + +HOMEPAGE = "http://savannah.nongnu.org/projects/attr/" +SECTION = "libs" + +DEPENDS = "virtual/libintl" + +LICENSE = "LGPLv2.1+ & GPLv2+" +LICENSE_${PN} = "GPLv2+" +LICENSE_lib${BPN} = "LGPLv2.1+" +LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \ + file://doc/COPYING.LGPL;md5=b8d31f339300bc239d73461d68e77b9c \ + file://tools/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \ + file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb" + +SRC_URI = "file://attr/attr-${PV}.tar.gz \ + file://attr/0001-bypass-wrong-output-when-enabled-selinux.patch \ + file://run-ptest \ +" + +#inherit ptest update-alternatives autotools gettext +inherit autotools gettext + +PACKAGES =+ "lib${BPN}" + +FILES_lib${BPN} = "${libdir}/lib*${SOLIBS}" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "setfattr" +ALTERNATIVE_TARGET[setfattr] = "${bindir}/setfattr" + +PTEST_BUILD_HOST_FILES = "builddefs" +PTEST_BUILD_HOST_PATTERN = "^RPM" + +do_install_ptest() { + 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 -i "s|^srcdir =.*|srcdir = \.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^abs_srcdir =.*|abs_srcdir = \.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^abs_top_srcdir =.*|abs_top_srcdir = \.\.|g" ${D}${PTEST_PATH}/Makefile + sed -i "s|^Makefile:.*|Makefile:|g" ${D}${PTEST_PATH}/Makefile + cp -rf ${S}/build-aux/ ${D}${PTEST_PATH} + cp -rf ${S}/test/ ${D}${PTEST_PATH} +} + +RDEPENDS_${PN}-ptest = "attr \ + coreutils \ + perl-module-filehandle \ + perl-module-getopt-std \ + perl-module-posix \ + make \ + perl \ + gawk \ + perl-module-cwd \ + perl-module-file-basename \ + perl-module-file-path \ + perl-module-file-spec \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/attr/attr/run-ptest b/meta-openeuler/recipes-core/attr/attr/run-ptest new file mode 100644 index 0000000000000000000000000000000000000000..f64244f239390dd9a3c3e257ca1523c1a2efbf80 --- /dev/null +++ b/meta-openeuler/recipes-core/attr/attr/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +make test-suite.log diff --git a/meta-openeuler/recipes-core/attr/attr_2.5.1.bb b/meta-openeuler/recipes-core/attr/attr_2.5.1.bb new file mode 100644 index 0000000000000000000000000000000000000000..5c5f7bcffb4e40af3fde0f84e7eecb68647fb539 --- /dev/null +++ b/meta-openeuler/recipes-core/attr/attr_2.5.1.bb @@ -0,0 +1,5 @@ +require attr.inc + +SRC_URI[sha256sum] = "bae1c6949b258a0d68001367ce0c741cebdacdd3b62965d17e5eb23cd78adaf8" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-openeuler/recipes-core/json-c/json-c_0.15.bb b/meta-openeuler/recipes-core/json-c/json-c_0.15.bb new file mode 100644 index 0000000000000000000000000000000000000000..4c4e1af275f3b1fd342d58477b29621ec0d7efaf --- /dev/null +++ b/meta-openeuler/recipes-core/json-c/json-c_0.15.bb @@ -0,0 +1,16 @@ +SUMMARY = "C bindings for apps which will manipulate JSON data" +DESCRIPTION = "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C." +HOMEPAGE = "https://github.com/json-c/json-c/wiki" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2" + +SRC_URI = "file://json-c/json-c-0.15-20200726.tar.gz" + +SRC_URI[sha256sum] = "4ba9a090a42cf1e12b84c64e4464bb6fb893666841d5843cc5bef90774028882" +UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" +UPSTREAM_CHECK_REGEX = "json-c-(?P\d+(\.\d+)+)-\d+" +S = "${WORKDIR}/json-c-json-c-0.15-20200726" +RPROVIDES_${PN} = "libjson" + +inherit cmake +BBCLASSEXTEND = "native nativesdk"