diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-01-23 14:19:02 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-01-23 16:29:19 +0100 |
commit | 9f533d60df8c248c790c41d80653e693e1a3f9e5 (patch) | |
tree | 1b9c26ace24c4acb58e0dd02775db4ed26871245 | |
parent | 61bce2f9cb1abc0221a843c4f77384d1532ffa55 (diff) | |
download | guix-9f533d60df8c248c790c41d80653e693e1a3f9e5.tar.gz |
gnu: util-linux: Update to 2.25.2.
* gnu/packages/linux.scm (util-linux): Update to 2.25.2. Remove util-linux-perl.patch, and add util-linux-tests.patch. Adjust 'snippet'. [arguments]: Remove 'patch-chkdupexe' phase. Add 'pre-check' phase. [native-inputs]: Add NET-BASE. * gnu/packages/patches/util-linux-perl.patch: Remove. * gnu/packages/patches/util-linux-tests.patch: New file. * gnu-system.am (dist_patch_DATA): Adjust accordingly.
-rw-r--r-- | gnu-system.am | 2 | ||||
-rw-r--r-- | gnu/packages/linux.scm | 41 | ||||
-rw-r--r-- | gnu/packages/patches/util-linux-perl.patch | 15 | ||||
-rw-r--r-- | gnu/packages/patches/util-linux-tests.patch | 30 |
4 files changed, 53 insertions, 35 deletions
diff --git a/gnu-system.am b/gnu-system.am index 5d773caa91..61829ad098 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -488,7 +488,7 @@ dist_patch_DATA = \ gnu/packages/patches/unzip-CVE-2014-8139.patch \ gnu/packages/patches/unzip-CVE-2014-8140.patch \ gnu/packages/patches/unzip-CVE-2014-8141.patch \ - gnu/packages/patches/util-linux-perl.patch \ + gnu/packages/patches/util-linux-tests.patch \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/vtk-mesa-10.patch \ gnu/packages/patches/w3m-fix-compile.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 2c74ff85c6..3e18441812 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages gcc) #:use-module (gnu packages flex) #:use-module (gnu packages bison) + #:use-module (gnu packages admin) #:use-module (gnu packages gperf) #:use-module (gnu packages libusb) #:use-module (gnu packages ncurses) @@ -380,41 +381,43 @@ providing the system administrator with some help in common tasks.") (define-public util-linux (package (name "util-linux") - (version "2.21") + (version "2.25.2") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/linux/utils/" - name "/v" version "/" - name "-" version ".2" ".tar.xz")) + name "/v" (version-major+minor version) "/" + name "-" version ".tar.xz")) (sha256 (base32 - "1rpgghf7n0zx0cdy8hibr41wvkm2qp1yvd8ab1rxr193l1jmgcir")) - (patches (list (search-patch "util-linux-perl.patch"))) + "1miwwdq1zwvhf0smrxx3fjddq3mz22s8rc5cw54s7x3kbdqpyig0")) + (patches (list (search-patch "util-linux-tests.patch"))) (modules '((guix build utils))) (snippet ;; We take the 'logger' program from GNU Inetutils, so remove - ;; it from here. - '(substitute* "misc-utils/Makefile.in" - (("PROGRAMS =(.*) logger(.*)" _ before after) - (string-append "PROGRAMS =" before " " after)) - (("MANS =(.*) logger\\.1(.*)" _ before after) - (string-append "MANS =" before " " after)))))) + ;; it from here. There's no '--disable-logger', hence this + ;; hack. + '(substitute* "configure" + (("build_logger=yes") "build_logger=no"))))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--disable-use-tty-group" "--enable-ddate") - #:phases (alist-cons-after - 'install 'patch-chkdupexe - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (substitute* (string-append out "/bin/chkdupexe") - ;; Allow 'patch-shebang' to do its work. - (("@PERL@") "/bin/perl")))) + #:phases (alist-cons-before + 'check 'pre-check + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (net (assoc-ref inputs "net-base"))) + ;; Change the test to refer to the right file. + (substitute* "tests/ts/misc/mcookie" + (("/etc/services") + (string-append net "/etc/services"))) + #t)) %standard-phases))) (inputs `(("zlib" ,guix:zlib) ("ncurses" ,ncurses))) (native-inputs - `(("perl" ,perl))) + `(("perl" ,perl) + ("net-base" ,net-base))) ;for tests (home-page "https://www.kernel.org/pub/linux/utils/util-linux/") (synopsis "Collection of utilities for the Linux kernel") (description diff --git a/gnu/packages/patches/util-linux-perl.patch b/gnu/packages/patches/util-linux-perl.patch deleted file mode 100644 index c657a1b5ae..0000000000 --- a/gnu/packages/patches/util-linux-perl.patch +++ /dev/null @@ -1,15 +0,0 @@ -Use this common trick that exploits similarities between sh and Perl syntax -to avoid a hard dependency on Perl. Instead, this script will work only -when 'perl' is available in $PATH. - ---- util-linux-2.21.2/misc-utils/chkdupexe.pl 2012-05-15 13:51:45.000000000 +0200 -+++ util-linux-2.21.2/misc-utils/chkdupexe.pl 2014-06-01 22:46:06.000000000 +0200 -@@ -1,5 +1,6 @@ --#!@PERL@ -w --# -+eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' -+ & eval 'exec perl -wS "$0" $argv:q' -+ if 0; - # chkdupexe version 2.1.1 - # - # Simple script to look for and list duplicate executables and dangling diff --git a/gnu/packages/patches/util-linux-tests.patch b/gnu/packages/patches/util-linux-tests.patch new file mode 100644 index 0000000000..2ad025f66a --- /dev/null +++ b/gnu/packages/patches/util-linux-tests.patch @@ -0,0 +1,30 @@ +This test checks whether 'root' is successfully translated to UID/GID 0, +using 'getpwnam' in libmount. This doesn't work in the chroot because +/etc/passwd doesn't contain an entry for 'root' so skip it. + + +--- util-linux-2.25.2/tests/ts/libmount/optstr 2015-01-23 13:58:41.181151194 +0100 ++++ util-linux-2.25.2/tests/ts/libmount/optstr 2015-01-23 13:58:42.829161716 +0100 +@@ -84,10 +84,6 @@ ts_init_subtest "apply-user" # add user, + ts_valgrind $TESTPROG --apply --user "noexec,nosuid,loop=/dev/looop0" 0x408 &> $TS_OUTPUT + ts_finalize_subtest + +-ts_init_subtest "fix" +-ts_valgrind $TESTPROG --fix "uid=root,gid=root" &> $TS_OUTPUT +-ts_finalize_subtest +- + ts_init_subtest "deduplicate" + ts_valgrind $TESTPROG --dedup bbb,ccc,AAA,xxx,AAA=a,AAA=bbb,ddd,AAA=ccc,fff=eee AAA &> $TS_OUTPUT + ts_finalize_subtest + + +The expected output for this test seems to lack a carriage return. + +--- util-linux-2.25.2/tests/expected/more/regexp 2015-01-23 14:02:21.098557632 +0100 ++++ util-linux-2.25.2/tests/expected/more/regexp 2015-01-23 14:02:23.598573648 +0100 +@@ -1,4 +1,4 @@ + + ...skipping +-foo ++ foo + xyzzy |