summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothée Ravier2014-03-19 02:17:47 +0100
committerNicolas Iooss2014-04-13 18:32:21 +0200
commit33cc706b7f85d74a065ffc54fcf29d3bf595a0dd (patch)
tree4d2073fa4a584ee693223acbaa0d2f7a0404517c
parent01223fa113f39ea501d5526335eb32b49e38e08f (diff)
downloadaur-33cc706b7f85d74a065ffc54fcf29d3bf595a0dd.tar.gz
coreutils-selinux 8.22-3 update
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD30
-rw-r--r--coreutils-8.22-shuf-segfault.patch74
3 files changed, 98 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9d039de35e2a..24480de0bd33 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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 = 1
+ pkgrel = 3
url = http://www.gnu.org/software/coreutils
install = coreutils.install
arch = i686
@@ -13,17 +13,20 @@ pkgbase = coreutils-selinux
depends = acl
depends = gmp
depends = libcap
+ depends = openssl
depends = libselinux
- provides = coreutils=8.22-1
- provides = selinux-coreutils=8.22-1
+ provides = coreutils=8.22-3
+ provides = selinux-coreutils=8.22-3
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-copy-fix-SELinux-context-preservation-for-existing-d.patch
source = 0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch
md5sums = 8fb0ae2267aa6e728958adc38f8163a2
md5sums = SKIP
+ md5sums = 94f7e6f373f37beb236caabed8fcdb52
md5sums = a320632626e1639643f3510ae1c62ed0
md5sums = 40575ec80e895b5db52dafa6556e6e26
diff --git a/PKGBUILD b/PKGBUILD
index 94eb6bc1ddaf..1a09f9f963f1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,7 @@
# $Id$
-# Maintainer: Allan McRae <allan@archlinux.org>
+# Maintainer: Sébastien "Seblu" Luttringer
+# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
# SELinux Maintainer: Timothée Ravier <tim@siosm.fr>
# SELinux Contributor: Nicky726 (Nicky726 <at> gmail <dot> com)
@@ -7,32 +9,36 @@
pkgname=coreutils-selinux
pkgver=8.22
-pkgrel=1
+pkgrel=3
pkgdesc="The basic file, shell and text manipulation utilities of the GNU operating system with SELinux support"
arch=('i686' 'x86_64')
license=('GPL3')
url="http://www.gnu.org/software/coreutils"
groups=('selinux')
-depends=('glibc' 'pam-selinux' 'acl' 'gmp' 'libcap' 'libselinux')
+depends=('glibc' 'pam-selinux' 'acl' 'gmp' 'libcap' 'openssl' 'libselinux')
install=${pkgname/-selinux}.install
conflicts=("${pkgname/-selinux}" "selinux-${pkgname/-selinux}")
-provides=("${pkgname/-selinux}=${pkgver}-${pkgrel}" "selinux-${pkgname/-selinux}=${pkgver}-${pkgrel}")
+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-copy-fix-SELinux-context-preservation-for-existing-d.patch'
'0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch')
md5sums=('8fb0ae2267aa6e728958adc38f8163a2'
'SKIP'
+ '94f7e6f373f37beb236caabed8fcdb52'
'a320632626e1639643f3510ae1c62ed0'
'40575ec80e895b5db52dafa6556e6e26')
prepare() {
- cd "${pkgname/-selinux}-$pkgver"
- patch -Np1 < "$srcdir/0001-copy-fix-SELinux-context-preservation-for-existing-d.patch"
- patch -Np1 < "$srcdir/0002-copy-fix-a-segfault-in-SELinux-context-copying-code.patch"
+ cd ${pkgname/-selinux}-$pkgver
+ patch -Np1 -i ../coreutils-8.22-shuf-segfault.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
}
build() {
- cd ${srcdir}/${pkgname/-selinux}-${pkgver}
+ cd ${pkgname/-selinux}-$pkgver
./configure --prefix=/usr --libexecdir=/usr/lib --with-openssl \
--enable-no-install-program=groups,hostname,kill,uptime \
--with-selinux
@@ -40,11 +46,11 @@ build() {
}
check() {
- cd ${srcdir}/${pkgname/-selinux}-${pkgver}
- #make RUN_EXPENSIVE_TESTS=yes check
+ cd ${pkgname/-selinux}-$pkgver
+ make RUN_EXPENSIVE_TESTS=yes check
}
package() {
- cd ${srcdir}/${pkgname/-selinux}-${pkgver}
- make DESTDIR=${pkgdir} install
+ cd ${pkgname/-selinux}-$pkgver
+ make DESTDIR="$pkgdir" install
}
diff --git a/coreutils-8.22-shuf-segfault.patch b/coreutils-8.22-shuf-segfault.patch
new file mode 100644
index 000000000000..e22b3c7b200b
--- /dev/null
+++ b/coreutils-8.22-shuf-segfault.patch
@@ -0,0 +1,74 @@
+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
+