From 52196aea193f56f416a687b68e95228a8ef1eec4 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 2 Apr 2017 20:14:11 -0400 Subject: gnu: tzdata: Update to 2017b. * gnu/packages/base.scm (tzdata): Update to 2017b. --- gnu/packages/base.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 5c36b612f1..072f401fc3 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1001,7 +1001,7 @@ command.") (define-public tzdata (package (name "tzdata") - (version "2017a") + (version "2017b") (source (origin (method url-fetch) (uri (string-append @@ -1009,7 +1009,7 @@ command.") version ".tar.gz")) (sha256 (base32 - "1mmv4rvcs12lrvgghw4fidczvb69yv69cmzknghcvw1c196mqfnz")))) + "11l0s43vx33dcs78p80122i8s5s9l1sjwkzzwh66njd35r92l97q")))) (build-system gnu-build-system) (arguments '(#:tests? #f @@ -1057,7 +1057,7 @@ command.") version ".tar.gz")) (sha256 (base32 - "1b1q7gnlsh5hjgs5065pvajd37rmbc3k9b8cgzad1vcrifswdwh2")))))) + "0h1d567gn8l3iqgyadcswwdy2yh07nhz3lfl8ds8saz2ajxka5sd")))))) (home-page "https://www.iana.org/time-zones") (synopsis "Database of current and historical time zones") (description "The Time Zone Database (often called tz or zoneinfo) -- cgit v1.2.3 From e162050dfc0dee708a7ac5bfcf37d2afd6081604 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 18 Apr 2017 20:13:45 +0200 Subject: gnu: Add workaround for `date` regression in coreutils@8.26. See and . * gnu/packages/base.scm (coreutils-8.27): New variable. * gnu/system.scm (%base-packages): Use that instead of COREUTILS. --- gnu/packages/base.scm | 17 +++++++++++++++++ gnu/system.scm | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 5c36b612f1..7af166d6e5 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Jan Nieuwenhuizen +;;; Copyright © 2017 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -361,6 +362,22 @@ functionality beyond that which is outlined in the POSIX standard.") (license gpl3+) (home-page "https://www.gnu.org/software/coreutils/"))) +;; We add version 8.27 here for use in (gnu system) due to a time +;; zone bug in `date' versions 8.25 - 8.26. +;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=23035 +;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26238 +(define-public coreutils-8.27 + (package + (inherit coreutils) + (version "8.27") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/coreutils/coreutils-" + version ".tar.xz")) + (sha256 + (base32 + "0sv547572iq8ayy8klir4hnngnx92a9nsazmf1wgzfc7xr4x74c8")))))) + (define-public coreutils-minimal ;; Coreutils without its optional dependencies. (package diff --git a/gnu/system.scm b/gnu/system.scm index 89c4150f99..f6ab7ded85 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -385,7 +385,7 @@ explicitly appear in OS." ;; The packages below are also in %FINAL-INPUTS, so take them from ;; there to avoid duplication. (map canonical-package - (list guile-2.0 bash coreutils findutils grep sed + (list guile-2.0 bash coreutils-8.27 findutils grep sed diffutils patch gawk tar gzip bzip2 xz lzip)))) (define %default-issue -- cgit v1.2.3 From fd6ec6bd99f64ca7792909f29f990d40e6e2e0d2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 23 Apr 2017 01:24:57 +0200 Subject: gnu: coreutils@8.27: Do not apply 'coreutils-cut-huge-range-test.patch'. This patch is not needed in 8.27. Reported by Mark H Weaver . * gnu/packages/base.scm (coreutils-8.27)[arguments]: New field. --- gnu/packages/base.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 7af166d6e5..387ae123ab 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -376,7 +376,14 @@ functionality beyond that which is outlined in the POSIX standard.") version ".tar.xz")) (sha256 (base32 - "0sv547572iq8ayy8klir4hnngnx92a9nsazmf1wgzfc7xr4x74c8")))))) + "0sv547572iq8ayy8klir4hnngnx92a9nsazmf1wgzfc7xr4x74c8")))) + (arguments + (if (string-prefix? "arm" (or (%current-target-system) + (%current-system))) + (substitute-keyword-arguments (package-arguments coreutils) + ((#:phases phases) + `(alist-delete 'patch-cut-test ,phases))) + (package-arguments coreutils))))) (define-public coreutils-minimal ;; Coreutils without its optional dependencies. -- cgit v1.2.3 From b2fd8f63679aa4f244c36fdca62f23c00b8eded9 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 26 Apr 2017 13:03:48 +0200 Subject: gnu: glibc/linux: Fix runtime crashes on i686 systems. * gnu/packages/patches/glibc-memchr-overflow-i686.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash)[native-inputs]: Add the patch conditionally for i686 systems. * gnu/packages/base.scm (glibc/linux)[native-inputs]: Add the patch conditionally for i686 systems. [arguments]: Apply the patch conditionally on i686 systems. --- gnu/local.mk | 1 + gnu/packages/base.scm | 20 +++++- gnu/packages/commencement.scm | 10 ++- .../patches/glibc-memchr-overflow-i686.patch | 74 ++++++++++++++++++++++ 4 files changed, 103 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/glibc-memchr-overflow-i686.patch (limited to 'gnu/packages/base.scm') diff --git a/gnu/local.mk b/gnu/local.mk index da2e82f475..f5574ecd80 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -612,6 +612,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-bootstrap-system.patch \ %D%/packages/patches/glibc-ldd-x86_64.patch \ %D%/packages/patches/glibc-locales.patch \ + %D%/packages/patches/glibc-memchr-overflow-i686.patch \ %D%/packages/patches/glibc-o-largefile.patch \ %D%/packages/patches/glibc-versioned-locpath.patch \ %D%/packages/patches/glog-gcc-5-demangling.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 9fcca45a54..6dc9e97c34 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -666,6 +666,16 @@ store.") ;; 4.7.1. ((" -lgcc_s") "")) + ;; Apply patch only on i686. + ;; TODO: Move the patch to 'patches' in the next update cycle. + ,@(if (string-prefix? "i686" (or (%current-target-system) + (%current-system))) + `(zero? (system* "patch" "-p1" "--force" + "--input" + (assoc-ref native-inputs + "glibc-memchr-overflow-i686.patch"))) + '()) + ;; Have `system' use that Bash. (substitute* "sysdeps/posix/system.c" (("#define[[:blank:]]+SHELL_PATH.*$") @@ -709,7 +719,15 @@ store.") ;; install the message catalogs, with 'msgfmt'. (native-inputs `(("texinfo" ,texinfo) ("perl" ,perl) - ("gettext" ,gettext-minimal))) + ("gettext" ,gettext-minimal) + + ;; Apply this patch only on i686 to avoid a full rebuild. + ;; TODO: Move to 'patches' in the next update cycle. + ,@(if (string-prefix? "i686" (or (%current-target-system) + (%current-system))) + `(("glibc-memchr-overflow-i686.patch" + ,(search-patch "glibc-memchr-overflow-i686.patch"))) + '()))) (native-search-paths ;; Search path for packages that provide locale data. This is useful diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 92f6e6c2ea..4fa34c93b1 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -22,6 +22,7 @@ (define-module (gnu packages commencement) #:use-module ((guix licenses) #:select (gpl3+ lgpl2.0+ public-domain)) + #:use-module (gnu packages) #:use-module (gnu packages bootstrap) #:use-module (gnu packages base) #:use-module (gnu packages bash) @@ -509,7 +510,14 @@ the bootstrap environment." (propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0)))) (native-inputs `(("texinfo" ,texinfo-boot0) - ("perl" ,perl-boot0))) + ("perl" ,perl-boot0) + ;; Apply this patch only on i686 to avoid a full rebuild. + ;; TODO: Remove in the next update cycle. + ,@(if (string-prefix? "i686" (or (%current-target-system) + (%current-system))) + `(("glibc-memchr-overflow-i686.patch" + ,(search-patch "glibc-memchr-overflow-i686.patch"))) + '()))) (inputs `(;; The boot inputs. That includes the bootstrap libc. We don't want ;; it in $CPATH, hence the 'pre-configure' phase above. diff --git a/gnu/packages/patches/glibc-memchr-overflow-i686.patch b/gnu/packages/patches/glibc-memchr-overflow-i686.patch new file mode 100644 index 0000000000..0b1b5b9f96 --- /dev/null +++ b/gnu/packages/patches/glibc-memchr-overflow-i686.patch @@ -0,0 +1,74 @@ +Extracted from glibc upstream git repository. Changes to the ChangeLog have +been removed. This patch is needed to fix spurious segmentation faults on +i686. + +From 3abeeec5f46ff036bd9df60bb096e20314ccd078 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Tue, 14 Mar 2017 14:16:13 -0300 +Subject: [PATCH] Fix i686 memchr overflow calculation (BZ#21182) + +This patch fixes the regression added by 23d2770 for final address +overflow calculation. The subtraction of the considered size (16) +at line 120 is at wrong place, for sizes less than 16 subsequent +overflow check will not take in consideration an invalid size (since +the subtraction will be negative). Also, the lea instruction also +does not raise the carry flag (CF) that is used in subsequent jbe +to check for overflow. + +The fix is to follow x86_64 logic from 3daef2c where the overflow +is first check and a sub instruction is issued. In case of resulting +negative size, CF will be set by the sub instruction and a NULL +result will be returned. The patch also add similar tests reported +in bug report. + +Checked on i686-linux-gnu and x86_64-linux-gnu. + + * string/test-memchr.c (do_test): Add BZ#21182 checks for address + near end of a page. + * sysdeps/i386/i686/multiarch/memchr-sse2.S (__memchr): Fix + overflow calculation. +--- + string/test-memchr.c | 6 ++++++ + sysdeps/i386/i686/multiarch/memchr-sse2.S | 2 +- + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/string/test-memchr.c b/string/test-memchr.c +index 2403c9242b..669e092e7d 100644 +--- a/string/test-memchr.c ++++ b/string/test-memchr.c +@@ -210,6 +210,12 @@ test_main (void) + do_test (0, i, i + 1, i + 1, 0); + } + ++ /* BZ#21182 - wrong overflow calculation for i686 implementation ++ with address near end of the page. */ ++ for (i = 2; i < 16; ++i) ++ /* page_size is in fact getpagesize() * 2. */ ++ do_test (page_size / 2 - i, i, i, 1, 0x9B); ++ + do_random_tests (); + return ret; + } +diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2.S b/sysdeps/i386/i686/multiarch/memchr-sse2.S +index 910679cfc0..e41f324a77 100644 +--- a/sysdeps/i386/i686/multiarch/memchr-sse2.S ++++ b/sysdeps/i386/i686/multiarch/memchr-sse2.S +@@ -117,7 +117,6 @@ L(crosscache): + + # ifndef USE_AS_RAWMEMCHR + jnz L(match_case2_prolog1) +- lea -16(%edx), %edx + /* Calculate the last acceptable address and check for possible + addition overflow by using satured math: + edx = ecx + edx +@@ -125,6 +124,7 @@ L(crosscache): + add %ecx, %edx + sbb %eax, %eax + or %eax, %edx ++ sub $16, %edx + jbe L(return_null) + lea 16(%edi), %edi + # else +-- +2.12.2 + -- cgit v1.2.3 From c2e4f14ac8cd3e1ce7f46a192ad0c9acc084b210 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 30 Apr 2017 13:01:20 +0200 Subject: gnu: glibc/linux: Fix build of glibc-intermediate. This is a follow-up to commit b2fd8f63679aa4f244c36fdca62f23c00b8eded9. * gnu/packages/base.scm (glibc/linux)[arguments]: Take patch from either native-inputs or just inputs; fix syntax error; report errors on patch failure. --- gnu/packages/base.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 6dc9e97c34..e896dbe2e1 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -670,10 +670,13 @@ store.") ;; TODO: Move the patch to 'patches' in the next update cycle. ,@(if (string-prefix? "i686" (or (%current-target-system) (%current-system))) - `(zero? (system* "patch" "-p1" "--force" - "--input" - (assoc-ref native-inputs - "glibc-memchr-overflow-i686.patch"))) + `((unless (zero? (system* "patch" "-p1" "--force" + "--input" + (or (assoc-ref native-inputs + "glibc-memchr-overflow-i686.patch") + (assoc-ref inputs + "glibc-memchr-overflow-i686.patch")))) + (error "patch failed for glibc-memchr-overflow-i686.patch"))) '()) ;; Have `system' use that Bash. -- cgit v1.2.3 From 5c6b6827e987450d8bcc149d2fa47296b7c8414b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 2 May 2017 12:19:55 +0200 Subject: gnu: libiconv: Update to 1.15. * gnu/packages/base.scm (libiconv): Update to 1.15. --- gnu/packages/base.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index e896dbe2e1..59a9acd67e 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1140,14 +1140,14 @@ and daylight-saving rules.") (define-public libiconv (package (name "libiconv") - (version "1.14") + (version "1.15") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libiconv/libiconv-" version ".tar.gz")) (sha256 (base32 - "04q6lgl3kglmmhw59igq1n7v3rp1rpkypl366cy1k1yn2znlvckj")) + "0y1ij745r4p48mxq84rax40p10ln7fc7m243p8k8sia519i3dxfc")) (modules '((guix build utils))) (snippet ;; Work around "declared gets" error on glibc systems (fixed by -- cgit v1.2.3 From 711a0dcefa7b5717dfea6a4a0fa474691e5fa566 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 16 May 2017 21:59:18 +0200 Subject: gnu: glibc/hurd: Use modify-phases syntax. * gnu/packages/base.scm (glibc/hurd)[arguments]: Use modify-phases syntax. --- gnu/packages/base.scm | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 29 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 59a9acd67e..8a48cadf7b 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -778,35 +778,33 @@ with the Linux kernel.") ((#:phases original-phases) ;; Add libmachuser.so and libhurduser.so to libc.so's search path. ;; See . - `(alist-cons-after - 'install 'augment-libc.so - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out"))) - (substitute* (string-append out "/lib/libc.so") - (("/[^ ]+/lib/libc.so.0.3") - (string-append out "/lib/libc.so.0.3" " libmachuser.so" " libhurduser.so")))) - #t) - (alist-cons-after - 'pre-configure 'pre-configure-set-pwd - (lambda _ - ;; Use the right 'pwd'. - (substitute* "configure" - (("/bin/pwd") "pwd"))) - (alist-replace - 'build - (lambda _ - ;; Force mach/hurd/libpthread subdirs to build first in order to avoid - ;; linking errors. - ;; See - (let ((-j (list "-j" (number->string (parallel-job-count))))) - (let-syntax ((make (syntax-rules () - ((_ target) - (zero? (apply system* "make" target -j)))))) - (and (make "mach/subdir_lib") - (make "hurd/subdir_lib") - (make "libpthread/subdir_lib") - (zero? (apply system* "make" -j)))))) - ,original-phases)))) + `(modify-phases ,original-phases + (add-after 'install 'augment-libc.so + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (substitute* (string-append out "/lib/libc.so") + (("/[^ ]+/lib/libc.so.0.3") + (string-append out "/lib/libc.so.0.3" " libmachuser.so" " libhurduser.so")))) + #t)) + (add-after 'pre-configure 'pre-configure-set-pwd + (lambda _ + ;; Use the right 'pwd'. + (substitute* "configure" + (("/bin/pwd") "pwd")) + #t)) + (replace 'build + (lambda _ + ;; Force mach/hurd/libpthread subdirs to build first in order to avoid + ;; linking errors. + ;; See + (let ((-j (list "-j" (number->string (parallel-job-count))))) + (let-syntax ((make (syntax-rules () + ((_ target) + (zero? (apply system* "make" target -j)))))) + (and (make "mach/subdir_lib") + (make "hurd/subdir_lib") + (make "libpthread/subdir_lib") + (zero? (apply system* "make" -j))))))))) ((#:configure-flags original-configure-flags) `(append (list "--host=i586-pc-gnu" -- cgit v1.2.3 From 441e99d433583fdf76910c3f9323f78a1d1bbaf3 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 16 May 2017 22:11:41 +0200 Subject: gnu: glibc/hurd: Do not apply i686 patch. This is a follow-up to commit c2e4f14ac8cd3e1ce7f46a192ad0c9acc084b210. * gnu/packages/base.scm (glibc/hurd)[arguments]: Override pre-configure phase with a copy that does not include the patch application. --- gnu/packages/base.scm | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 8a48cadf7b..d135a18bf8 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -779,6 +779,71 @@ with the Linux kernel.") ;; Add libmachuser.so and libhurduser.so to libc.so's search path. ;; See . `(modify-phases ,original-phases + ;; TODO: This is almost an exact copy of the phase of the same name + ;; in glibc/linux. The only difference is that the i686 patch is + ;; not applied here. In the next update cycle the patch moves to + ;; the patches field and this overwritten phase won't be needed any + ;; more. + (replace 'pre-configure + (lambda* (#:key inputs native-inputs outputs + #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + ;; FIXME: Normally we would look it up only in INPUTS + ;; but cross-base uses it as a native input. + (bash (or (assoc-ref inputs "static-bash") + (assoc-ref native-inputs "static-bash")))) + ;; Install the rpc data base file under `$out/etc/rpc'. + ;; FIXME: Use installFlags = [ "sysconfdir=$(out)/etc" ]; + (substitute* "sunrpc/Makefile" + (("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix) + (string-append out "/etc/rpc" suffix "\n")) + (("^install-others =.*$") + (string-append "install-others = " out "/etc/rpc\n"))) + + (substitute* "Makeconfig" + ;; According to + ;; , + ;; linking against libgcc_s is not needed with GCC + ;; 4.7.1. + ((" -lgcc_s") "")) + + ;; Have `system' use that Bash. + (substitute* "sysdeps/posix/system.c" + (("#define[[:blank:]]+SHELL_PATH.*$") + (format #f "#define SHELL_PATH \"~a/bin/bash\"\n" + bash))) + + ;; Same for `popen'. + (substitute* "libio/iopopen.c" + (("/bin/sh") + (string-append bash "/bin/sh"))) + + ;; Same for the shell used by the 'exec' functions for + ;; scripts that lack a shebang. + (substitute* (find-files "." "^paths\\.h$") + (("#define[[:blank:]]+_PATH_BSHELL[[:blank:]].*$") + (string-append "#define _PATH_BSHELL \"" + bash "/bin/sh\"\n"))) + + ;; Nscd uses __DATE__ and __TIME__ to create a string to + ;; make sure the client and server come from the same + ;; libc. Use something deterministic instead. + (substitute* "nscd/nscd_stat.c" + (("static const char compilation\\[21\\] =.*$") + (string-append + "static const char compilation[21] = \"" + (string-take (basename out) 20) "\";\n"))) + + ;; Make sure we don't retain a reference to the + ;; bootstrap Perl. + (substitute* "malloc/mtrace.pl" + (("^#!.*") + ;; The shebang can be omitted, because there's the + ;; "bilingual" eval/exec magic at the top of the file. + "") + (("exec @PERL@") + "exec perl"))))) (add-after 'install 'augment-libc.so (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))) -- cgit v1.2.3