summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Iooss2016-02-12 14:04:30 +0100
committerNicolas Iooss2016-02-12 14:04:30 +0100
commitb1864aa62554a1ffbc0da4d7feed90f6fc8ea5c0 (patch)
tree3cc4770d1d45ced8d3673b16ff8f08e2adfa6ca0
parentd3aa1a3740257c9c0a030a05d386d3ad61466c5d (diff)
downloadaur-b1864aa62554a1ffbc0da4d7feed90f6fc8ea5c0.tar.gz
coreutils-selinux 8.25-1 update
-rw-r--r--.SRCINFO17
-rw-r--r--0001-tests-support-non-MLS-SELinux-systems-in-mkdir-tests.patch36
-rw-r--r--PKGBUILD12
3 files changed, 35 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 12e86ed4fb5c..c942e4a6b0cd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,8 @@
+# Generated by makepkg 5.0.0
+# Fri Feb 12 13:04:29 UTC 2016
pkgbase = coreutils-selinux
pkgdesc = The basic file, shell and text manipulation utilities of the GNU operating system with SELinux support
- pkgver = 8.24
+ pkgver = 8.25
pkgrel = 1
url = http://www.gnu.org/software/coreutils
install = coreutils.install
@@ -15,16 +17,17 @@ pkgbase = coreutils-selinux
depends = libcap
depends = openssl
depends = libselinux
- provides = coreutils=8.24-1
- provides = selinux-coreutils=8.24-1
+ provides = coreutils=8.25-1
+ provides = selinux-coreutils=8.25-1
conflicts = coreutils
conflicts = selinux-coreutils
- source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.24.tar.xz
- source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.24.tar.xz.sig
+ source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.25.tar.xz
+ source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.25.tar.xz.sig
source = 0001-tests-support-non-MLS-SELinux-systems-in-mkdir-tests.patch
- md5sums = 40efdbce865d2458d8da0a9dcee7c16c
+ validpgpkeys = 6C37DC12121A5006BC1DB804DF6FD971306037D9
+ md5sums = 070e43ba7f618d747414ef56ab248a48
md5sums = SKIP
- md5sums = 59f5e3176277eab04488e9202d071518
+ md5sums = ab90c6ba801e06bcc11cf79a3f6168f6
pkgname = coreutils-selinux
diff --git a/0001-tests-support-non-MLS-SELinux-systems-in-mkdir-tests.patch b/0001-tests-support-non-MLS-SELinux-systems-in-mkdir-tests.patch
index b2b30f8965f4..0c8427c46b37 100644
--- a/0001-tests-support-non-MLS-SELinux-systems-in-mkdir-tests.patch
+++ b/0001-tests-support-non-MLS-SELinux-systems-in-mkdir-tests.patch
@@ -1,22 +1,27 @@
-From 9ea92da190ba454a5e690095ac10aff5bf220a95 Mon Sep 17 00:00:00 2001
-From: Nicolas Iooss <nicolas.iooss_git@polytechnique.org>
-Date: Wed, 8 Jul 2015 19:01:03 +0800
+From b6668a23d4a58c08d25023440854f9ce720b87de Mon Sep 17 00:00:00 2001
+From: Nicolas Iooss <nicolas.iooss@m4x.org>
+Date: Thu, 11 Feb 2016 14:36:50 +0100
Subject: [PATCH] tests: support non-MLS SELinux systems in mkdir tests
-When running "make check" on a non-MLS Linux system,
-tests/mkdir/restorecon.sh test fails with:
+When running "make check" on a Linux system running SELinux with a
+non-MLS policy, tests/mkdir/restorecon.sh test fails with:
chcon: invalid context: root:object_r:tmp_t:s0: Invalid argument
-A valid context for such a configuration would be
-root:object_r:tmp_t. So use it, and fix the sed pattern too to
-correctly grab the type out of "ls -Zd" result.
+Indeed in such a configuration, contexts cannot have ":s0" suffix.
+
+* tests/mkdir/restorecon.sh: detect non-MLS SELinux configurations by
+ using sestatus and in this case use a valid context when calling
+ runcon. Update the sed pattern of get_selinux_type to always grab the
+ SELinux type from the output of "ls -Zd" even with a non-MLS policy.
+
+[Upstream bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22631]
---
- tests/mkdir/restorecon.sh | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
+ tests/mkdir/restorecon.sh | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/mkdir/restorecon.sh b/tests/mkdir/restorecon.sh
-index 7d6a671b58a8..e5aa5507af96 100755
+index 0e7f03bc93db..cfd3bdda9637 100755
--- a/tests/mkdir/restorecon.sh
+++ b/tests/mkdir/restorecon.sh
@@ -21,10 +21,14 @@ print_ver_ mkdir mknod mkfifo
@@ -27,14 +32,15 @@ index 7d6a671b58a8..e5aa5507af96 100755
+get_selinux_type() { ls -Zd "$1" | sed -n 's/.*:\(.*_t\)[: ].*/\1/p'; }
mkdir subdir || framework_failure_
-+if sestatus |grep 'Policy MLS status:.*enabled' > /dev/null ; then
- chcon 'root:object_r:tmp_t:s0' subdir || framework_failure_
+-chcon 'root:object_r:tmp_t:s0' subdir || framework_failure_
++if sestatus 2>&1 |grep 'Policy MLS status:.*enabled' > /dev/null; then
++ chcon 'root:object_r:tmp_t:s0' subdir || framework_failure_
+else
-+chcon 'root:object_r:tmp_t' subdir || framework_failure_
++ chcon 'root:object_r:tmp_t' subdir || framework_failure_
+fi
cd subdir
# --- mkdir -Z ---
--
-2.4.5
+2.7.0
diff --git a/PKGBUILD b/PKGBUILD
index dc9c6a235725..81d5ca9d1faa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@
# SELinux Contributor: Nicky726 (Nicky726 <at> gmail <dot> com)
pkgname=coreutils-selinux
-pkgver=8.24
+pkgver=8.25
pkgrel=1
pkgdesc='The basic file, shell and text manipulation utilities of the GNU operating system with SELinux support'
arch=('i686' 'x86_64')
@@ -23,9 +23,9 @@ provides=("${pkgname/-selinux}=${pkgver}-${pkgrel}"
source=("ftp://ftp.gnu.org/gnu/${pkgname/-selinux}/${pkgname/-selinux}-$pkgver.tar.xz"{,.sig}
'0001-tests-support-non-MLS-SELinux-systems-in-mkdir-tests.patch')
validpgpkeys=('6C37DC12121A5006BC1DB804DF6FD971306037D9') # Pádraig Brady
-md5sums=('40efdbce865d2458d8da0a9dcee7c16c'
+md5sums=('070e43ba7f618d747414ef56ab248a48'
'SKIP'
- '59f5e3176277eab04488e9202d071518')
+ 'ab90c6ba801e06bcc11cf79a3f6168f6')
prepare() {
local _p
@@ -49,11 +49,7 @@ build() {
check() {
cd ${pkgname/-selinux}-$pkgver
- # With coreutils 8.24, gnulib-tests/test-getcwd.sh fails with error 7
- # Source code of failing test is at:
- # http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=tests/test-getcwd.c;h=756f932f4a58b583ff3bb943cdc336a8dd818e7d;hb=HEAD#l198
- # As it also fails on core/coreutils package, just skip it in coreutils-selinux.
- make check || :
+ make check
}
package() {