Accepting request 229262 from Base:System
- add acl-2.2.52-tests.patch and enable tests, check section taken from Fedora package (forwarded request 229210 from rudi_m) OBS-URL: https://build.opensuse.org/request/show/229262 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/acl?expand=0&rev=36
This commit is contained in:
commit
38f75f974c
180
acl-2.2.52-tests.patch
Normal file
180
acl-2.2.52-tests.patch
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
From cfd9ba83811189d9e12c86d32b06b5fd15b5f358 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
Date: Mon, 20 May 2013 13:49:34 +0200
|
||||||
|
Subject: [PATCH 1/2] make the tests ready for SELinux
|
||||||
|
|
||||||
|
---
|
||||||
|
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 afaf5f0..4880bd2 100644
|
||||||
|
--- a/test/root/permissions.test
|
||||||
|
+++ b/test/root/permissions.test
|
||||||
|
@@ -20,7 +20,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/---\\./---/'
|
||||||
|
> -rw-r----- root root
|
||||||
|
|
||||||
|
|
||||||
|
@@ -40,7 +40,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/---\\./---/'
|
||||||
|
> -rw-r----- bin bin
|
||||||
|
$ su bin
|
||||||
|
$ echo bin >> f
|
||||||
|
@@ -257,12 +257,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/---\\./---/'
|
||||||
|
> -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/---\\./---/'
|
||||||
|
> -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 6003cd4..5dbf73c 100644
|
||||||
|
--- a/test/root/restore.test
|
||||||
|
+++ b/test/root/restore.test
|
||||||
|
@@ -17,7 +17,7 @@ Ensure setuid bit is restored when the owner changes
|
||||||
|
$ 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/\\. root/ root/'
|
||||||
|
> -rwsr-xr-x root root
|
||||||
|
|
||||||
|
$ rm passwd passwd.acl
|
||||||
|
diff --git a/test/root/setfacl.test b/test/root/setfacl.test
|
||||||
|
index 630e9fb..dd7fe08 100644
|
||||||
|
--- a/test/root/setfacl.test
|
||||||
|
+++ b/test/root/setfacl.test
|
||||||
|
@@ -8,7 +8,7 @@ Setfacl utility tests. Run these tests on a filesystem with ACL support.
|
||||||
|
$ sg bin
|
||||||
|
$ umask 027
|
||||||
|
$ touch g
|
||||||
|
- $ ls -dl g | awk '{print $1}'
|
||||||
|
+ $ ls -dl g | awk '{print $1}' | sed 's/\\.$//'
|
||||||
|
> -rw-r-----
|
||||||
|
|
||||||
|
$ setfacl -m m:- g
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
||||||
|
|
||||||
|
From 3720a8a3cf55e295eca55457fad8177f6277f620 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
Date: Mon, 20 May 2013 15:00:47 +0200
|
||||||
|
Subject: [PATCH 2/2] 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)
|
||||||
|
---
|
||||||
|
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.7.1
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 13 21:52:00 UTC 2013 - sweet_f_a@gmx.de
|
||||||
|
|
||||||
|
- add acl-2.2.52-tests.patch and enable tests, check section taken
|
||||||
|
from Fedora package
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 18 07:43:08 UTC 2013 - coolo@suse.com
|
Tue Jun 18 07:43:08 UTC 2013 - coolo@suse.com
|
||||||
|
|
||||||
|
13
acl.spec
13
acl.spec
@ -34,6 +34,7 @@ Source2: baselibs.conf
|
|||||||
Source3: %name.keyring
|
Source3: %name.keyring
|
||||||
Patch0: builddefs.in.diff
|
Patch0: builddefs.in.diff
|
||||||
Patch2: 0001-Use-OS-byteswapping-macros.patch
|
Patch2: 0001-Use-OS-byteswapping-macros.patch
|
||||||
|
Patch3: acl-2.2.52-tests.patch
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
#BuildRequires: gpg-offline
|
#BuildRequires: gpg-offline
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
@ -81,6 +82,7 @@ to develop applications that require these.
|
|||||||
%setup -q -n acl-%version
|
%setup -q -n acl-%version
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
|
export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
|
||||||
@ -96,6 +98,17 @@ CFLAGS="$RPM_OPT_FLAGS"
|
|||||||
--with-pic
|
--with-pic
|
||||||
%{__make} %{?_smp_mflags}
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
|
%check
|
||||||
|
if ./setfacl/setfacl -m u:`id -u`:rwx .; then
|
||||||
|
make tests || exit $?
|
||||||
|
if test 0 = `id -u`; then
|
||||||
|
make root-tests || exit $?
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo '*** ACLs are probably not supported by the file system,' \
|
||||||
|
'the test-suite will NOT run ***'
|
||||||
|
fi
|
||||||
|
|
||||||
%install
|
%install
|
||||||
DIST_ROOT="$RPM_BUILD_ROOT"
|
DIST_ROOT="$RPM_BUILD_ROOT"
|
||||||
DIST_INSTALL=`pwd`/install.manifest
|
DIST_INSTALL=`pwd`/install.manifest
|
||||||
|
Loading…
Reference in New Issue
Block a user