diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support/attr')
5 files changed, 93 insertions, 11 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc b/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc index 198fb4fed9..37a0218cbb 100644 --- a/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc +++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl.inc @@ -14,6 +14,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \ file://acl-fix-the-order-of-expected-output-of-getfacl.patch \ file://test-fix-insufficient-quoting-of.patch \ file://test-fixups-on-SELinux-machines-for-root-testcases.patch \ + file://test-fix-directory-permissions.patch \ " require ea-acl.inc @@ -33,7 +34,7 @@ do_install_append() { inherit ptest do_install_ptest() { - tar -cf - test/ --exclude nfs | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) mkdir ${D}${PTEST_PATH}/include cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/ } diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest b/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest index 3b31cc99af..a56946d8e6 100644 --- a/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest +++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest @@ -1,7 +1,64 @@ #!/bin/sh +# +#This script is used to run acl test suites -gpasswd -a daemon bin -make -C test -k tests root-tests |sed \ - -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \ - -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|' -gpasswd -d daemon bin +#umask 077 + +EXT3_IMAGE=ext3.img +EXT3_MOUNT_POINT=/mnt/ext3 + +trap 'rm -f ${EXT3_IMAGE}' EXIT + +dd if=/dev/zero of=${EXT3_IMAGE} bs=1M count=1 +if [ "$?" -eq 0 ]; then + echo "PASS: dump ext3.img" +else + echo "FAIL: dump ext3.img" + exit 1 +fi + +mkfs.ext3 -F ${EXT3_IMAGE} +if [ "$?" -eq 0 ]; then + echo "PASS: mkfs.ext3 -F ext3.img" +else + echo "FAIL: mkfs.ext3 -F ext3.img" + exit 1 +fi + +if [ -d $EXT3_MOUNT_POINT ]; then + echo "mount point exist" +else + mkdir -p $EXT3_MOUNT_POINT +fi + + +mount -o loop,rw,acl ${EXT3_IMAGE} $EXT3_MOUNT_POINT +if [ "$?" -eq 0 ]; then + echo "PASS: mount ext3.img" +else + echo "FAIL: mount ext3.img" + exit 1 +fi + +cp -rf ./test/ $EXT3_MOUNT_POINT + +cd $EXT3_MOUNT_POINT/test/ + +if sed -e 's!^bin:x:2:$!bin:x:2:daemon!' < /etc/group > gtmp +then if cp /etc/group group.orig; + then cp gtmp /etc/group + make -k tests root-tests | sed \ + -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \ + -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|' + cp group.orig /etc/group + else echo "FAIL: couldn't save original group file." + exit 1 + fi +else echo "FAIL: couldn't create modified group file." + exit 1 +fi + +cd - +umount $EXT3_MOUNT_POINT +rm -rf $EXT3_MOUNT_POINT +rm $EXT3_IMAGE diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch new file mode 100644 index 0000000000..cd4510c0b0 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch @@ -0,0 +1,24 @@ +commit c45bae84817a70fef6c2b661a07a492a0d23ae85 +Author: Peter Seebach <peter.seebach@windriver.com> +Date: Wed May 11 15:16:06 2016 -0500 + + Fix permissions on temporary directory + + The temporary directory's permissions have to allow other users to + view the directory. A default umask of 022 is common, but not mandatory, + and secure systems may have more restrictive defaults. + + Signed-off-by: Peter Seebach <peter.seebach@windriver.com> + +diff --git a/test/root/permissions.test b/test/root/permissions.test +index 42615f5..098b52a 100644 +--- a/test/root/permissions.test ++++ b/test/root/permissions.test +@@ -16,6 +16,7 @@ Cry immediately if we are not running as root. + First, set up a temporary directory and create a regular file with + defined permissions. + ++ $ umask 022 + $ mkdir d + $ cd d + $ umask 027 diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc b/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc index 68609784d9..e8b5d054b3 100644 --- a/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc +++ b/import-layers/yocto-poky/meta/recipes-support/attr/attr.inc @@ -2,7 +2,7 @@ SUMMARY = "Utilities for manipulating filesystem extended attributes" HOMEPAGE = "http://savannah.nongnu.org/projects/attr/" SECTION = "libs" -DEPENDS = "ncurses virtual/libintl" +DEPENDS = "virtual/libintl" LICENSE = "LGPLv2.1+ & GPLv2+" LICENSE_${PN} = "GPLv2+" @@ -26,7 +26,7 @@ do_install_append() { inherit ptest do_install_ptest() { - tar -cf - test/ --exclude ext | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) mkdir ${D}${PTEST_PATH}/include for i in builddefs buildmacros buildrules; \ do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \ diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb b/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb index 44eee39644..556c8e43e0 100644 --- a/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb +++ b/import-layers/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb @@ -2,9 +2,9 @@ require attr.inc # configure.ac was missing from the release tarball. This should be fixed in # future releases of attr, remove this when updating the recipe. -SRC_URI_append += "file://attr-Missing-configure.ac.patch \ - file://dont-use-decl-macros.patch \ - " +SRC_URI += "file://attr-Missing-configure.ac.patch \ + file://dont-use-decl-macros.patch \ + " SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7" SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859" |