summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-support/attr/acl
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2016-08-17 14:31:25 -0500
committerPatrick Williams <patrick@stwcx.xyz>2016-08-22 16:43:26 +0000
commit60f9d69e016b11c468c98ea75ba0a60c44afbbc4 (patch)
treeecb49581a9e41a37943c22cd9ef3f63451b20ee7 /import-layers/yocto-poky/meta/recipes-support/attr/acl
parente18c61205e0234b03697129c20cc69c9b3940efc (diff)
downloadtalos-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.tar.gz
talos-openbmc-60f9d69e016b11c468c98ea75ba0a60c44afbbc4.zip
yocto-poky: Move to import-layers subdir
We are going to import additional layers, so create a subdir to hold all of the layers that we import with git-subtree. Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support/attr/acl')
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch198
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/acl/add-missing-configure.ac.patch59
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest7
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch108
-rw-r--r--import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch84
5 files changed, 456 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch b/import-layers/yocto-poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch
new file mode 100644
index 000000000..cf765fdbb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch
@@ -0,0 +1,198 @@
+acl: fix the order of expected output of getfacl
+
+The result of getfacl is sorted by user id.
+In Centos or RHEL, bin user id is 1 and daemon user id is 2.
+But in our image, bin user id is 2 and daemon user id is 1.
+The patch fixes this issue to make ptest pass.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ test/misc.test | 38 +++++++++++++++++++-------------------
+ 1 file changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/test/misc.test b/test/misc.test
+index 6e98053..53ae5b0 100644
+--- a/test/misc.test
++++ b/test/misc.test
+@@ -79,8 +79,8 @@ Multiple users
+
+ $ getfacl --omit-header f
+ > user::rw-
+- > user:bin:rw-
+ > user:daemon:r--
++ > user:bin:rw-
+ > group::r--
+ > mask::rw-
+ > other::r--
+@@ -94,8 +94,8 @@ Multiple groups
+
+ $ getfacl --omit-header f
+ > user::rw-
+- > user:bin:rw-
+ > user:daemon:r--
++ > user:bin:rw-
+ > group::r--
+ > group:daemon:r--
+ > group:users:rw-
+@@ -111,8 +111,8 @@ Remove one group
+
+ $ getfacl --omit-header f
+ > user::rw-
+- > user:bin:rw-
+ > user:daemon:r--
++ > user:bin:rw-
+ > group::r--
+ > group:daemon:r--
+ > mask::rw-
+@@ -146,8 +146,8 @@ Default ACL
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:rwx
+ > user:daemon:rw-
++ > user:bin:rwx
+ > group::r-x
+ > mask::rwx
+ > other::---
+@@ -236,16 +236,16 @@ Add some users and groups
+
+ $ getfacl --omit-header d/d
+ > user::rwx
+- > user:bin:rwx #effective:r-x
+ > user:daemon:r-x
++ > user:bin:rwx #effective:r-x
+ > group::r-x
+ > group:daemon:rwx #effective:r-x
+ > group:users:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:rwx #effective:r-x
+ > default:user:daemon:r-x
++ > default:user:bin:rwx #effective:r-x
+ > default:group::r-x
+ > default:mask::r-x
+ > default:other::---
+@@ -262,16 +262,16 @@ Symlink in directory with default ACL?
+
+ $ getfacl --omit-header d/l
+ > user::rwx
+- > user:bin:rwx #effective:r-x
+ > user:daemon:r-x
++ > user:bin:rwx #effective:r-x
+ > group::r-x
+ > group:daemon:rwx #effective:r-x
+ > group:users:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:rwx #effective:r-x
+ > default:user:daemon:r-x
++ > default:user:bin:rwx #effective:r-x
+ > default:group::r-x
+ > default:mask::r-x
+ > default:other::---
+@@ -287,16 +287,16 @@ Does mask manipulation work?
+
+ $ getfacl --omit-header d/d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:r-x
++ > user:bin:r-x
+ > group::r-x
+ > group:daemon:r-x
+ > group:users:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:rwx #effective:r-x
+ > default:user:daemon:r-x
++ > default:user:bin:rwx #effective:r-x
+ > default:group::r-x
+ > default:mask::r-x
+ > default:other::---
+@@ -308,16 +308,16 @@ Does mask manipulation work?
+
+ $ getfacl --omit-header d/d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:r-x
++ > user:bin:r-x
+ > group::r-x
+ > group:daemon:r-x
+ > group:users:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:rwx
+ > default:user:daemon:r-x
++ > default:user:bin:rwx
+ > default:group::r-x
+ > default:mask::rwx
+ > default:other::---
+@@ -333,8 +333,8 @@ Remove the default ACL
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:rwx
+ > user:daemon:rw-
++ > user:bin:rwx
+ > group::r-x
+ > mask::rwx
+ > other::---
+@@ -373,14 +373,14 @@ Now, chmod should change the group_obj entry
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:rwx
++ > user:bin:r-x
+ > group::rwx
+ > mask::rwx
+ > other::r-x
+ > default:user::rwx
+- > default:user:bin:r-x
+ > default:user:daemon:rwx
++ > default:user:bin:r-x
+ > default:group::rwx
+ > default:mask::rwx
+ > default:other::r-x
+@@ -392,14 +392,14 @@ Now, chmod should change the group_obj entry
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:rwx #effective:r-x
++ > user:bin:r-x
+ > group::rwx #effective:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:r-x
+ > default:user:daemon:rwx
++ > default:user:bin:r-x
+ > default:group::rwx
+ > default:mask::rwx
+ > default:other::r-x
+@@ -411,14 +411,14 @@ Now, chmod should change the group_obj entry
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:rwx #effective:r-x
++ > user:bin:r-x
+ > group::rwx #effective:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:r-x
+ > default:user:daemon:rwx
++ > default:user:bin:r-x
+ > default:group::rwx
+ > default:mask::rwx
+ > default:other::r-x
+--
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/add-missing-configure.ac.patch b/import-layers/yocto-poky/meta/recipes-support/attr/acl/add-missing-configure.ac.patch
new file mode 100644
index 000000000..eb6979fa3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/add-missing-configure.ac.patch
@@ -0,0 +1,59 @@
+Upstream-Status: Backport [configure.ac is missing from tarball]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: acl-2.2.52/configure.ac
+===================================================================
+--- /dev/null
++++ acl-2.2.52/configure.ac
+@@ -0,0 +1,50 @@
++
++# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
++#
++# This program is free software: you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program. If not, see <http://www.gnu.org/licenses/>.
++#
++AC_INIT(include/acl.h)
++AC_CONFIG_AUX_DIR([.])
++AC_CONFIG_MACRO_DIR([m4])
++AC_CONFIG_HEADER(include/config.h)
++AC_PREFIX_DEFAULT(/usr)
++
++AC_PROG_LIBTOOL
++
++AC_ARG_ENABLE(shared,
++[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
++ enable_shared=yes)
++AC_SUBST(enable_shared)
++
++AC_ARG_ENABLE(gettext,
++[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
++ enable_gettext=yes)
++AC_SUBST(enable_gettext)
++
++AC_ARG_ENABLE(lib64,
++[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
++ enable_lib64=no)
++AC_SUBST(enable_lib64)
++
++AC_PACKAGE_GLOBALS(acl)
++AC_PACKAGE_UTILITIES(acl)
++AC_PACKAGE_NEED_ATTR_XATTR_H
++AC_PACKAGE_NEED_ATTR_ERROR_H
++AC_MULTILIB($enable_lib64)
++AC_PACKAGE_NEED_GETXATTR_LIBATTR
++AC_MANUAL_FORMAT
++
++AC_FUNC_GCC_VISIBILITY
++
++AC_OUTPUT(include/builddefs)
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
new file mode 100644
index 000000000..3b31cc99a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+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
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
new file mode 100644
index 000000000..0b350be56
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
@@ -0,0 +1,108 @@
+From e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Mon, 20 May 2013 16:38:06 +0200
+Subject: [PATCH] test: fix insufficient quoting of '\'
+
+This is a follow-up to 7f2c91b8369242a8dbc2b304a5b71b2a85f5b855, which
+caused sbits-restore.test to fail in the following way in case SELinux
+was disabled:
+
+*** sbits-restore.test ***
+[3] $ umask 022 -- ok
+[4] $ mkdir d -- ok
+[5] $ touch d/g -- ok
+[6] $ touch d/u -- ok
+[7] $ chmod u+s d/u -- ok
+[8] $ chmod g+s d/g -- ok
+[9] $ chmod +t d -- ok
+[10] $ getfacl -R d > d.acl -- ok
+[11] $ rm -R d -- ok
+[12] $ mkdir d -- ok
+[13] $ touch d/g -- ok
+[14] $ touch d/u -- ok
+[15] $ setfacl --restore d.acl -- ok
+[16] $ ls -dl d | awk '{print $1}' | sed 's/.$//g' -- failed
+drwxr-xr- != drwxr-xr-t
+[18] $ ls -dl d/u | awk '{print $1}' | sed 's/.$//g' -- failed
+-rwSr--r- != -rwSr--r--
+[20] $ ls -dl d/g | awk '{print $1}' | sed 's/.$//g' -- failed
+-rw-r-Sr- != -rw-r-Sr--
+[22] $ rm -Rf d -- ok
+17 commands (14 passed, 3 failed)
+
+Upstream-Status: Backport
+http://git.savannah.gnu.org/cgit/acl.git/commit/?id=e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ test/cp.test | 2 +-
+ test/misc.test | 6 +++---
+ test/sbits-restore.test | 6 +++---
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/test/cp.test b/test/cp.test
+index 0867f63..a927195 100644
+--- a/test/cp.test
++++ b/test/cp.test
+@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if `-p' is given.
+ > -rw-rw-r--+
+
+ $ cp f g
+- $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
++ $ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
+ > -rw-r--r--
+
+ $ rm g
+diff --git a/test/misc.test b/test/misc.test
+index 6e98053..29372b7 100644
+--- a/test/misc.test
++++ b/test/misc.test
+@@ -254,7 +254,7 @@ Add some users and groups
+ Symlink in directory with default ACL?
+
+ $ ln -s d d/l
+- $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
+ > lrwxrwxrwx
+
+ $ ls -dl -L d/l | awk '{print $1}'
+@@ -343,7 +343,7 @@ Remove the default ACL
+ Reset to base entries
+
+ $ setfacl -b d
+- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+ > drwxr-x---
+
+ $ getfacl --omit-header d
+@@ -355,7 +355,7 @@ Reset to base entries
+ Now, chmod should change the group_obj entry
+
+ $ chmod 775 d
+- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+ > drwxrwxr-x
+
+ $ getfacl --omit-header d
+diff --git a/test/sbits-restore.test b/test/sbits-restore.test
+index de21340..5899b0a 100644
+--- a/test/sbits-restore.test
++++ b/test/sbits-restore.test
+@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
+ $ touch d/g
+ $ touch d/u
+ $ setfacl --restore d.acl
+- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+ > drwxr-xr-t
+- $ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d/u | awk '{print $1}' | sed 's/\\.$//g'
+ > -rwSr--r--
+- $ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g'
+ > -rw-r-Sr--
+ $ rm -Rf d
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch
new file mode 100644
index 000000000..8cc11a63e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch
@@ -0,0 +1,84 @@
+From d2f49ee6fe4850b8dda5b08676b36201d3c43710 Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Wed, 2 Mar 2016 15:46:57 +0800
+Subject: [PATCH] test: fixups on SELinux machines for root testcases
+
+ls adds a '.' at the end of the permission field list on SELinux
+machines, filter this out so root tests work on SELinux machines.
+
+Upstream-Status: Accepted
+http://git.savannah.gnu.org/cgit/acl.git/commit/?id=26a87d36f80d5e98bccb5878834d9e69dadfe3e9
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ test/root/permissions.test | 8 ++++----
+ test/root/restore.test | 2 +-
+ test/root/setfacl.test | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/root/permissions.test b/test/root/permissions.test
+index 9b9e3de..665339a 100644
+--- a/test/root/permissions.test
++++ b/test/root/permissions.test
+@@ -19,7 +19,7 @@ defined permissions.
+ $ cd d
+ $ umask 027
+ $ touch f
+- $ ls -l f | awk -- '{ print $1, $3, $4 }'
++ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ > -rw-r----- root root
+
+
+@@ -39,7 +39,7 @@ Now, change the ownership of the file to bin:bin and verify that this
+ gives user bin write access.
+
+ $ chown bin:bin f
+- $ ls -l f | awk -- '{ print $1, $3, $4 }'
++ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ > -rw-r----- bin bin
+ $ su bin
+ $ echo bin >> f
+@@ -256,12 +256,12 @@ directories if the file has an ACL and only CAP_FOWNER would grant them.
+ $ mkdir -m 600 x
+ $ chown daemon:daemon x
+ $ echo j > x/j
+- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
++ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ > -rw-r----- root root
+
+ $ setfacl -m u:daemon:r x
+
+- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
++ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ > -rw-r----- root root
+ (With the bug this gives: `ls: x/j: Permission denied'.)
+
+diff --git a/test/root/restore.test b/test/root/restore.test
+index 63a9d01..c85097c 100644
+--- a/test/root/restore.test
++++ b/test/root/restore.test
+@@ -21,7 +21,7 @@ Cry immediately if we are not running as root.
+ $ chown bin passwd
+ $ chmod u+s passwd
+ $ setfacl --restore passwd.acl
+- $ ls -dl passwd | awk '{print $1 " " $3 " " $4}'
++ $ ls -dl passwd | awk '{print $1 " " $3 " " $4}' | sed 's/\\.//g'
+ > -rwsr-xr-x root root
+
+ $ rm passwd passwd.acl
+diff --git a/test/root/setfacl.test b/test/root/setfacl.test
+index a46a9f4..7efbad7 100644
+--- a/test/root/setfacl.test
++++ b/test/root/setfacl.test
+@@ -12,7 +12,7 @@ Cry immediately if we are not running as root.
+ $ sg bin
+ $ umask 027
+ $ touch g
+- $ ls -dl g | awk '{print $1}'
++ $ ls -dl g | awk '{print $1}' | sed 's/\\.//g'
+ > -rw-r-----
+
+ $ setfacl -m m:- g
+--
+1.9.1
+
OpenPOWER on IntegriCloud