diff options
author | Nicolas Iooss | 2014-07-26 10:12:04 +0200 |
---|---|---|
committer | Nicolas Iooss | 2014-07-26 10:12:04 +0200 |
commit | 58018bde046295a350d912a00b7dc594607d31ba (patch) | |
tree | 1ac2c9b8938bf9d85d15da05c6679aa3f58c73a0 | |
parent | ceb896e0ca2374f86e0819bfe60725c94359ba78 (diff) | |
download | aur-58018bde046295a350d912a00b7dc594607d31ba.tar.gz |
coreutils-selinux 8.23-1 update
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | 0001-copy-fix-SELinux-context-preservation-for-existing-d.patch | 47 | ||||
-rw-r--r-- | 0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch | 31 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | coreutils-8.22-shuf-segfault.patch | 74 |
5 files changed, 21 insertions, 190 deletions
@@ -1,7 +1,7 @@ pkgbase = coreutils-selinux pkgdesc = The basic file, shell and text manipulation utilities of the GNU operating system with SELinux support - pkgver = 8.22 - pkgrel = 4 + pkgver = 8.23 + pkgrel = 1 url = http://www.gnu.org/software/coreutils install = coreutils.install arch = i686 @@ -15,22 +15,14 @@ pkgbase = coreutils-selinux depends = libcap depends = openssl depends = libselinux - provides = coreutils=8.22-4 - provides = selinux-coreutils=8.22-4 + provides = coreutils=8.23-1 + provides = selinux-coreutils=8.23-1 conflicts = coreutils conflicts = selinux-coreutils - source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.22.tar.xz - source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.22.tar.xz.sig - source = coreutils-8.22-shuf-segfault.patch - source = 0001-cp-don-t-reserve-a-device-number.patch - source = 0001-copy-fix-SELinux-context-preservation-for-existing-d.patch - source = 0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch - md5sums = 8fb0ae2267aa6e728958adc38f8163a2 + source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz + source = ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.23.tar.xz.sig + md5sums = abed135279f87ad6762ce57ff6d89c41 md5sums = SKIP - md5sums = 94f7e6f373f37beb236caabed8fcdb52 - md5sums = ac3825f60b6e0300e375f656a3667c52 - md5sums = a320632626e1639643f3510ae1c62ed0 - md5sums = 40575ec80e895b5db52dafa6556e6e26 pkgname = coreutils-selinux diff --git a/0001-copy-fix-SELinux-context-preservation-for-existing-d.patch b/0001-copy-fix-SELinux-context-preservation-for-existing-d.patch deleted file mode 100644 index d34a4ba70edb..000000000000 --- a/0001-copy-fix-SELinux-context-preservation-for-existing-d.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 3e7a91463476d5f0a98a59b52d9b808629c7ab25 Mon Sep 17 00:00:00 2001 -From: Nicolas Iooss <nicolas.iooss_git@m4x.org> -Date: Sat, 18 Jan 2014 13:57:31 +0100 -Subject: [PATCH 1/2] copy: fix SELinux context preservation for existing - directories - -Apply upstream fix on src/copy.c - -http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=243128dbf0293be7b170dd47c8dbf3ed1834c093 ---- - src/copy.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/src/copy.c b/src/copy.c -index 0f044d0..2572f3f 100644 ---- a/src/copy.c -+++ b/src/copy.c -@@ -2408,6 +2408,17 @@ copy_internal (char const *src_name, char const *dst_name, - else - { - omitted_permissions = 0; -+ -+ /* For directories, the process global context could be reset for -+ descendents, so use it to set the context for existing dirs here. -+ This will also give earlier indication of failure to set ctx. */ -+ if (x->set_security_context || x->preserve_security_context) -+ if (! set_file_security_ctx (dst_name, x->preserve_security_context, -+ false, x)) -+ { -+ if (x->require_preserve_context) -+ goto un_backup; -+ } - } - - /* Decide whether to copy the contents of the directory. */ -@@ -2598,7 +2609,7 @@ copy_internal (char const *src_name, char const *dst_name, - - /* With -Z or --preserve=context, set the context for existing files. - Note this is done already for copy_reg() for reasons described therein. */ -- if (!new_dst && !x->copy_as_regular -+ if (!new_dst && !x->copy_as_regular && !S_ISDIR (src_mode) - && (x->set_security_context || x->preserve_security_context)) - { - if (! set_file_security_ctx (dst_name, x->preserve_security_context, --- -1.8.5.3 - diff --git a/0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch b/0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch deleted file mode 100644 index 22c3ad71783d..000000000000 --- a/0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 41916b5986de48851535be339a852efe315ac139 Mon Sep 17 00:00:00 2001 -From: Nicolas Iooss <nicolas.iooss_git@m4x.org> -Date: Sat, 18 Jan 2014 14:02:26 +0100 -Subject: [PATCH 2/2] copy: fix a segfault in SELinux context copying code - -Apply upstream fix on src/selinux.c - -http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=d718331e59afb35e56445f3a1597ed74a7f3a3e2 ---- - src/selinux.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/selinux.c b/src/selinux.c -index 680bc49..784cd1b 100644 ---- a/src/selinux.c -+++ b/src/selinux.c -@@ -192,6 +192,11 @@ restorecon_private (char const *path, bool local) - { - if (getfscreatecon (&tcon) < 0) - return rc; -+ if (!tcon) -+ { -+ errno = ENODATA; -+ return rc; -+ } - rc = lsetfilecon (path, tcon); - freecon (tcon); - return rc; --- -1.8.5.3 - @@ -8,8 +8,8 @@ # SELinux Contributor: Nicolas Iooss (nicolas <dot> iooss <at> m4x <dot> org) pkgname=coreutils-selinux -pkgver=8.22 -pkgrel=4 +pkgver=8.23 +pkgrel=1 pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system with SELinux support" arch=('i686' 'x86_64') license=('GPL3') @@ -20,31 +20,22 @@ install=${pkgname/-selinux}.install conflicts=("${pkgname/-selinux}" "selinux-${pkgname/-selinux}") provides=("${pkgname/-selinux}=${pkgver}-${pkgrel}" "selinux-${pkgname/-selinux}=${pkgver}-${pkgrel}") -source=(ftp://ftp.gnu.org/gnu/${pkgname/-selinux}/${pkgname/-selinux}-$pkgver.tar.xz{,.sig} - 'coreutils-8.22-shuf-segfault.patch' - '0001-cp-don-t-reserve-a-device-number.patch' - '0001-copy-fix-SELinux-context-preservation-for-existing-d.patch' - '0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch') -md5sums=('8fb0ae2267aa6e728958adc38f8163a2' - 'SKIP' - '94f7e6f373f37beb236caabed8fcdb52' - 'ac3825f60b6e0300e375f656a3667c52' - 'a320632626e1639643f3510ae1c62ed0' - '40575ec80e895b5db52dafa6556e6e26') +source=("ftp://ftp.gnu.org/gnu/${pkgname/-selinux}/${pkgname/-selinux}-$pkgver.tar.xz"{,.sig}) +md5sums=('abed135279f87ad6762ce57ff6d89c41' + 'SKIP') -prepare() { - cd ${pkgname/-selinux}-$pkgver - patch -p1 -i ../coreutils-8.22-shuf-segfault.patch - patch -p1 -i ../0001-cp-don-t-reserve-a-device-number.patch - patch -Np1 -i ../0001-copy-fix-SELinux-context-preservation-for-existing-d.patch - patch -Np1 -i ../0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch -} +#prepare() { +# cd $pkgname-$pkgver +#} build() { cd ${pkgname/-selinux}-$pkgver - ./configure --prefix=/usr --libexecdir=/usr/lib --with-openssl \ - --enable-no-install-program=groups,hostname,kill,uptime \ - --with-selinux + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib \ + --with-openssl \ + --enable-no-install-program=groups,hostname,kill,uptime \ + --with-selinux make } diff --git a/coreutils-8.22-shuf-segfault.patch b/coreutils-8.22-shuf-segfault.patch deleted file mode 100644 index e22b3c7b200b..000000000000 --- a/coreutils-8.22-shuf-segfault.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 24eb395471176e24762b08bfcef7562911537504 Mon Sep 17 00:00:00 2001 -From: Paul Eggert <eggert@cs.ucla.edu> -Date: Sun, 23 Feb 2014 15:34:48 -0800 -Subject: [PATCH] shuf: with -r, don't dump core if the input is empty - -Problem reported by valiant xiao in <http://bugs.gnu.org/16855>. -* NEWS: Document this. -* src/shuf.c (main): With -r, report an error if the input is empty. -* tests/misc/shuf.sh: Test for the bug. ---- - NEWS | 3 +++ - src/shuf.c | 15 +++++++++++---- - tests/misc/shuf.sh | 4 ++++ - 3 files changed, 18 insertions(+), 4 deletions(-) - -diff --git a/NEWS b/NEWS -index e72942b..2df246d 100644 ---- a/NEWS -+++ b/NEWS -@@ -22,6 +22,9 @@ GNU coreutils NEWS -*- outline -*- - it would display an error, requiring --no-dereference to avoid the issue. - [bug introduced in coreutils-5.3.0] - -+ shuf -r no longer dumps core if the input is empty. -+ [bug introduced in coreutils-8.22] -+ - ** New features - - od accepts a new option: --endian=TYPE to handle inputs with different byte -diff --git a/src/shuf.c b/src/shuf.c -index d4641fe..2a91072 100644 ---- a/src/shuf.c -+++ b/src/shuf.c -@@ -576,11 +576,18 @@ main (int argc, char **argv) - /* Generate output according to requested method */ - if (repeat) - { -- if (input_range) -- i = write_random_numbers (randint_source, head_lines, -- lo_input, hi_input, eolbyte); -+ if (head_lines == 0) -+ i = 0; - else -- i = write_random_lines (randint_source, head_lines, line, n_lines); -+ { -+ if (n_lines == 0) -+ error (EXIT_FAILURE, 0, _("No lines to repeat")); -+ if (input_range) -+ i = write_random_numbers (randint_source, head_lines, -+ lo_input, hi_input, eolbyte); -+ else -+ i = write_random_lines (randint_source, head_lines, line, n_lines); -+ } - } - else - { -diff --git a/tests/misc/shuf.sh b/tests/misc/shuf.sh -index d3ea1f2..d7251d1 100755 ---- a/tests/misc/shuf.sh -+++ b/tests/misc/shuf.sh -@@ -43,6 +43,10 @@ compare in out1 || { fail=1; echo "not a permutation" 1>&2; } - t=$(shuf -e a b c d e | sort | fmt) - test "$t" = 'a b c d e' || { fail=1; echo "not a permutation" 1>&2; } - -+# coreutils-8.22 dumps core. -+shuf -er -+test $? -eq 1 || fail=1 -+ - # Before coreutils-6.3, this would infloop. - # "seq 1860" produces 8193 (8K + 1) bytes of output. - seq 1860 | shuf > /dev/null || fail=1 --- -1.8.5.3 - |