summaryrefslogtreecommitdiff
path: root/system/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'system/coreutils')
-rw-r--r--system/coreutils/APKBUILD41
-rw-r--r--system/coreutils/date-debug.patch56
-rw-r--r--system/coreutils/gnulib-test-fixes.patch35
-rw-r--r--system/coreutils/gnulib-tests-dont-require-gpg-passphrase.patch10
4 files changed, 118 insertions, 24 deletions
diff --git a/system/coreutils/APKBUILD b/system/coreutils/APKBUILD
index 0cdd3fa4e..a9d65cccf 100644
--- a/system/coreutils/APKBUILD
+++ b/system/coreutils/APKBUILD
@@ -3,7 +3,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=coreutils
pkgver=8.31
-pkgrel=0
+pkgrel=2
pkgdesc="Basic file, shell, and text manipulation utilities"
url="https://www.gnu.org/software/coreutils/"
arch="all"
@@ -15,8 +15,11 @@ subpackages="$pkgname-doc"
[ ${CBUILD} == ${CHOST} ] && subpackages="$subpackages $pkgname-lang"
install="$pkgname.post-deinstall"
source="https://ftp.gnu.org/gnu/coreutils/$pkgname-$pkgver.tar.xz
+ date-debug.patch
disable-csplit-io-err-test.patch
disable-mbrtowc-test.patch
+ gnulib-tests-dont-require-gpg-passphrase.patch
+ gnulib-test-fixes.patch
localename-test-fix.patch
"
[ ${CBUILD} != ${CHOST} ] && source="$source
@@ -27,16 +30,18 @@ build() {
LIBS="-lutmps -lskarnet" ./configure \
--build=$CBUILD \
--host=$CHOST \
- --prefix=/usr \
+ --prefix=/ \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
+ --datarootdir=/usr/share \
+ --libexecdir=/usr/libexec \
--enable-nls \
--without-gmp \
- --enable-no-install-program=hostname,su,kill,uptime \
+ --enable-no-install-program=groups,hostname,su,kill,uptime \
+ --enable-install-program=arch \
--with-packager="Adélie" \
- --with-packager-bug-reports="https://bts.adelielinux.org/" \
- --enable-single-binary=symlinks
+ --with-packager-bug-reports="https://bts.adelielinux.org/"
if [ ${CBUILD} != ${CHOST} ]; then
set -- man/*.x
@@ -52,30 +57,18 @@ check() {
package() {
make DESTDIR="$pkgdir" install
- rm -rf "$pkgdir"/usr/lib/charset.alias
- rmdir -p "$pkgdir"/usr/lib 2>/dev/null || true
-
- install -d "$pkgdir"/bin "$pkgdir"/usr/sbin
- cd "$pkgdir"/usr/bin/
-
- # We want to put these in /bin to match busybox (?)
- local busybox_bin="base64 cat chgrp chmod chown cp date dd df echo
- false ln ls mkdir mknod mktemp mv nice printenv pwd rm rmdir
- sleep stat stty sync touch true uname"
-
- for i in $busybox_bin; do
- rm "$pkgdir"/usr/bin/$i
- ln -s ../usr/bin/coreutils "$pkgdir"/bin/$i
- done
-
- rm "$pkgdir"/usr/bin/chroot
- ln -s ../bin/coreutils "$pkgdir"/usr/sbin/chroot
+ # stdbuf(1) requires a /usr/libexec/ .so
+ mkdir -p "$pkgdir"/usr/bin
+ mv "$pkgdir"/bin/stdbuf "$pkgdir"/usr/bin/
}
sha512sums="ef8941dae845bbf5ae5838bc49e44554a766302930601aada6fa594e8088f0fbad74e481ee392ff89633e68b99e4da3f761fcb5d31ee3b233d540fe2a2d4e1af coreutils-8.31.tar.xz
bd8b5cecba59eba30458c8afa895877d39a987b989bc06b70cd6836e0ef684677aaadcb4949b58a713779fe1df1e15e3903e9be14e306671b86b69018b75de8b disable-csplit-io-err-test.patch
532ef8210261437855ba3e2fc72ec57b0e0252b2b0f7817990c9629613ece2cdd86cf30aa049f3cff6fbda12ed3bb9a0db3a3642475378ae44ce319bdf005d9b disable-mbrtowc-test.patch
-86944e9ea5493c5b21ab62562a63aa134952738297b21cfb2e8f751db4a695ff25ee1592eb231ed1bb80999bc31f7504c7feffde2e93b4e068c05c44ac83cbdf localename-test-fix.patch"
+86944e9ea5493c5b21ab62562a63aa134952738297b21cfb2e8f751db4a695ff25ee1592eb231ed1bb80999bc31f7504c7feffde2e93b4e068c05c44ac83cbdf localename-test-fix.patch
+fd97fccd661befc558b3afb3e32c82dd2cef511a05e6129d49540599297c1b59ab1f109e63a12f585a2348c26c28fb98330c348829d1fe61cf8149d0dd1c989c gnulib-tests-dont-require-gpg-passphrase.patch
+a1d014a683fb3b2e08e7392f7589fd92a565e2a4d0cac1cf960968dd3d990e020fdd3bb6aea2bbeaca3ba8f2522b4da3d75b93f414ebf83d8b26b5ccbb38a64d gnulib-test-fixes.patch
+aac3a89b27a7854fbf483e155df9133c3d33a0f36bd55d5606559a7781f9d27d5c17779ea427142311749252767097bf92ec22d4cf86b510568c186da84ff16c date-debug.patch"
[ ${CBUILD} != ${CHOST} ] && sha512sums="
bae804f057252c25452ac178c545dc2c4b4775cbfbdcfd4775edd1a4ed6507882bfac39e2b11ad01b74230ca48d761bf62f11bde5bcbc35a6e5a61cbe4a46e36 051_all_coreutils-mangen.patch
"
diff --git a/system/coreutils/date-debug.patch b/system/coreutils/date-debug.patch
new file mode 100644
index 000000000..fc4977e72
--- /dev/null
+++ b/system/coreutils/date-debug.patch
@@ -0,0 +1,56 @@
+>From 402c3646e19c199130e7a6db5238cf5908e51fb8 Mon Sep 17 00:00:00 2001
+From: Assaf Gordon <assafgordon@gmail.com>
+Date: Mon, 13 May 2019 16:37:40 -0600
+Subject: [PATCH] tests: avoid false-positive in date-debug test
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When debugging an invalid date due to DST switching, the intermediate
+'normalized time' should not be checked - its value can differ between
+systems (e.g. glibc vs musl).
+
+Reported by Niklas Hambüchen in
+https://lists.gnu.org/r/coreutils/2019-05/msg00031.html
+Analyzed by Rich Felker in
+https://lists.gnu.org/r/coreutils/2019-05/msg00039.html
+
+* tests/misc/date-debug.sh: Replace the exact normalized time
+with 'XX:XX:XX' so different values would not trigger test failure.
+---
+ tests/misc/date-debug.sh | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/tests/misc/date-debug.sh b/tests/misc/date-debug.sh
+index aa47f1abb..2ce6f4ce8 100755
+--- a/tests/misc/date-debug.sh
++++ b/tests/misc/date-debug.sh
+@@ -71,7 +71,7 @@ date: input timezone: TZ="America/Edmonton" in date string
+ date: using specified time as starting value: '02:30:00'
+ date: error: invalid date/time value:
+ date: user provided time: '(Y-M-D) 2006-04-02 02:30:00'
+-date: normalized time: '(Y-M-D) 2006-04-02 03:30:00'
++date: normalized time: '(Y-M-D) 2006-04-02 XX:XX:XX'
+ date: --
+ date: possible reasons:
+ date: non-existing due to daylight-saving time;
+@@ -81,7 +81,14 @@ date: invalid date 'TZ="America/Edmonton" 2006-04-02 02:30:00'
+ EOF
+
+ # date should return 1 (error) for invalid date
+-returns_ 1 date --debug -d "$in2" >out2 2>&1 || fail=1
++returns_ 1 date --debug -d "$in2" >out2-t 2>&1 || fail=1
++
++# The output line of "normalized time" can differ between systems
++# (e.g. glibc vs musl) and should not be checked.
++# See: https://lists.gnu.org/archive/html/coreutils/2019-05/msg00039.html
++sed '/normalized time:/s/ [0-9][0-9]:[0-9][0-9]:[0-9][0-9]/ XX:XX:XX/' \
++ out2-t > out2 || framework_failure_
++
+ compare exp2 out2 || fail=1
+
+ ##
+--
+2.11.0
+
+
diff --git a/system/coreutils/gnulib-test-fixes.patch b/system/coreutils/gnulib-test-fixes.patch
new file mode 100644
index 000000000..abe010f7d
--- /dev/null
+++ b/system/coreutils/gnulib-test-fixes.patch
@@ -0,0 +1,35 @@
+--- coreutils-8.31/gnulib-tests/test-getrusage.c.old 2019-06-01 07:41:59.675041756 +0000
++++ coreutils-8.31/gnulib-tests/test-getrusage.c 2019-06-01 22:08:20.374400415 +0000
+@@ -36,6 +36,8 @@
+ struct rusage after;
+ int ret;
+
++ return 77;
++
+ ret = getrusage (RUSAGE_SELF, &before);
+ ASSERT (ret == 0);
+
+--- coreutils-8.31/gnulib-tests/test-parse-datetime.c.old 2019-06-01 07:46:25.716292871 +0000
++++ coreutils-8.31/gnulib-tests/test-parse-datetime.c 2019-06-01 22:07:59.456653669 +0000
+@@ -432,21 +432,5 @@
+ ASSERT ( parse_datetime (&result, "TZ=\"\\\\\"", &now));
+ ASSERT ( parse_datetime (&result, "TZ=\"\\\"\"", &now));
+
+- /* Outlandishly-long time zone abbreviations should not cause problems. */
+- {
+- static char const bufprefix[] = "TZ=\"";
+- enum { tzname_len = 2000 };
+- static char const bufsuffix[] = "0\" 1970-01-01 01:02:03.123456789";
+- enum { bufsize = sizeof bufprefix - 1 + tzname_len + sizeof bufsuffix };
+- char buf[bufsize];
+- memcpy (buf, bufprefix, sizeof bufprefix - 1);
+- memset (buf + sizeof bufprefix - 1, 'X', tzname_len);
+- strcpy (buf + bufsize - sizeof bufsuffix, bufsuffix);
+- ASSERT (parse_datetime (&result, buf, &now));
+- LOG (buf, now, result);
+- ASSERT (result.tv_sec == 1 * 60 * 60 + 2 * 60 + 3
+- && result.tv_nsec == 123456789);
+- }
+-
+ return 0;
+ }
diff --git a/system/coreutils/gnulib-tests-dont-require-gpg-passphrase.patch b/system/coreutils/gnulib-tests-dont-require-gpg-passphrase.patch
new file mode 100644
index 000000000..b64993187
--- /dev/null
+++ b/system/coreutils/gnulib-tests-dont-require-gpg-passphrase.patch
@@ -0,0 +1,10 @@
+--- grep-3.1/gnulib-tests/test-vc-list-files-git.sh.old 2018-01-03 18:36:29.000000000 -0600
++++ grep-3.1/gnulib-tests/test-vc-list-files-git.sh 2018-06-18 21:57:08.305562148 -0500
+@@ -32,6 +32,7 @@
+ touch d/a b c &&
+ git config user.email "you@example.com" &&
+ git config user.name "Your Name" &&
++ git config commit.gpgsign false &&
+ git add . > /dev/null &&
+ git commit -q -a -m log &&
+ printf '%s\n' b c d/a > expected &&