From 18caed4475334b282587a27d5e99e504a58a20a6 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 15 Feb 2016 12:00:32 +0200 Subject: gnu: grep: Update to 2.23. * gnu/packages/base.scm (grep): Update to 2.23. --- 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 f8ea80b5e7..b7699b8f71 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -74,14 +74,14 @@ command-line arguments, multiple languages, and so on.") (define-public grep (package (name "grep") - (version "2.22") + (version "2.23") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grep/grep-" version ".tar.xz")) (sha256 (base32 - "1srn321x7whlhs5ks36zlcrrmj4iahll8fxwsh1vbz3v04px54fa")) + "1kvflnraswy6mz3dbxs9m4aqgqf9603z63l2140ph5yfw674gz2l")) (patches (list (search-patch "grep-timing-sensitive-test.patch"))))) (build-system gnu-build-system) -- cgit v1.2.3 From 5d9356f0fe67e679e35b92b5020a4a7b850af81c Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 17 Feb 2016 20:33:16 +0200 Subject: gnu: binutils: Update to 2.26. * gnu/packages/base.scm (binutils): Update to 2.26. --- 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 b7699b8f71..b4bebaa527 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -355,14 +355,14 @@ change. GNU make offers many powerful extensions over the standard utility.") (define-public binutils (package (name "binutils") - (version "2.25.1") + (version "2.26") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/binutils/binutils-" version ".tar.bz2")) (sha256 (base32 - "08lzmhidzc16af1zbx34f8cy4z7mzrswpdbhrb8shy3xxpflmcdm")) + "1ngc2h3knhiw8s22l8y6afycfaxr5grviqy7mwvm4bsl14cf9b62")) (patches (list (search-patch "binutils-ld-new-dtags.patch") (search-patch "binutils-loongson-workaround.patch"))))) (build-system gnu-build-system) -- cgit v1.2.3 From 10baeb35dedbe2a7b8de09fce2f5966ed8f569a9 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 17 Feb 2016 23:28:16 +0200 Subject: gnu: coreutils: Update to 8.25. * gnu/packages/base.scm (coreutils): Update to 8.25. [source]: Remove patch. --- gnu/packages/base.scm | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index b4bebaa527..0b07ea196d 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -245,23 +245,14 @@ used to apply commands with arbitrarily long arguments.") (define-public coreutils (package (name "coreutils") - (version "8.24") + (version "8.25") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/coreutils/coreutils-" version ".tar.xz")) (sha256 (base32 - "0w11jw3fb5sslf0f72kxy7llxgk1ia3a6bcw0c9kmvxrlj355mx2")) - (patches - (list (origin - (method url-fetch) - (uri "http://git.savannah.gnu.org/cgit/coreutils.git/\ -patch/?id=3ba68f9e64fa2eb8af22d510437a0c6441feb5e0") - (sha256 - (base32 - "1dnlszhc8lihhg801i9sz896mlrgfsjfcz62636prb27k5hmixqz")) - (file-name "coreutils-tail-inotify-race.patch")))))) + "11yfrnb94xzmvi4lhclkcmkqsbhww64wf234ya1aacjvg82prrii")))) (build-system gnu-build-system) (inputs `(("acl" ,acl) ; TODO: add SELinux ("gmp" ,gmp) ;bignums in 'expr', yay! -- cgit v1.2.3 From 70e17ba368dc08e5708870c77c4ebf336ff02646 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 14 Mar 2016 21:06:38 +0200 Subject: gnu: grep: Update to 2.24. * gnu/packages/base.scm (grep): Update to 2.24. --- 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 3c6b189120..7bd2ba4121 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -74,14 +74,14 @@ command-line arguments, multiple languages, and so on.") (define-public grep (package (name "grep") - (version "2.23") + (version "2.24") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grep/grep-" version ".tar.xz")) (sha256 (base32 - "1kvflnraswy6mz3dbxs9m4aqgqf9603z63l2140ph5yfw674gz2l")) + "057cir4p19h7yv4xir1wiaxfa1fp45d3pl7xsaaannlc16wvwj7j")) (patches (list (search-patch "grep-timing-sensitive-test.patch"))))) (build-system gnu-build-system) -- cgit v1.2.3 From 61516a1613efd0e12afc83922b005e5218b3624a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 6 Apr 2016 17:09:42 +0200 Subject: Revert "gnu: binutils: Update to 2.26." This reverts commit 5d9356f0fe67e679e35b92b5020a4a7b850af81c. Binutils 2.26 and ld in particular reportedly has serious bugs. For us, ld from 'binutils-cross-boot0' fails when linking 'cc1plus' in the first stage. --- 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 7bd2ba4121..2010bc0d57 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -346,14 +346,14 @@ change. GNU make offers many powerful extensions over the standard utility.") (define-public binutils (package (name "binutils") - (version "2.26") + (version "2.25.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/binutils/binutils-" version ".tar.bz2")) (sha256 (base32 - "1ngc2h3knhiw8s22l8y6afycfaxr5grviqy7mwvm4bsl14cf9b62")) + "08lzmhidzc16af1zbx34f8cy4z7mzrswpdbhrb8shy3xxpflmcdm")) (patches (list (search-patch "binutils-ld-new-dtags.patch") (search-patch "binutils-loongson-workaround.patch"))))) (build-system gnu-build-system) -- cgit v1.2.3 From e37595d9617658e3098b1d1b3f9f5d9aad4daf53 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 6 Apr 2016 22:20:49 +0200 Subject: gnu: glibc: Update to 2.23. * gnu/packages/base.scm (glibc): Update to 2.23. Remove "glibc-locale-incompatibility.patch" and "glibc-CVE-2015-7547.patch", now unneeded. [arguments]: Add "libc_cv_ssp_strong=no" to #:configure-flags. Remove now unneeded patching of 'configure'. * gnu/packages/patches/glibc-CVE-2015-7547.patch: Remove. * gnu/packages/patches/glibc-locale-incompatibility.patch: Remove. * gnu-system.am (dist_patch_DATA): Adjust accordingly. --- gnu-system.am | 2 - gnu/packages/base.scm | 16 +- gnu/packages/patches/glibc-CVE-2015-7547.patch | 559 --------------------- .../patches/glibc-locale-incompatibility.patch | 23 - 4 files changed, 5 insertions(+), 595 deletions(-) delete mode 100644 gnu/packages/patches/glibc-CVE-2015-7547.patch delete mode 100644 gnu/packages/patches/glibc-locale-incompatibility.patch (limited to 'gnu/packages/base.scm') diff --git a/gnu-system.am b/gnu-system.am index fc5a233ae3..fb5a086555 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -489,12 +489,10 @@ dist_patch_DATA = \ gnu/packages/patches/glib-tests-prlimit.patch \ gnu/packages/patches/glib-tests-timer.patch \ gnu/packages/patches/glib-tests-gapplication.patch \ - gnu/packages/patches/glibc-CVE-2015-7547.patch \ gnu/packages/patches/glibc-bootstrap-system.patch \ gnu/packages/patches/glibc-hurd-extern-inline.patch \ gnu/packages/patches/glibc-ldd-x86_64.patch \ gnu/packages/patches/glibc-locales.patch \ - gnu/packages/patches/glibc-locale-incompatibility.patch \ gnu/packages/patches/glibc-o-largefile.patch \ gnu/packages/patches/glibc-versioned-locpath.patch \ gnu/packages/patches/gmp-arm-asm-nothumb.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 2010bc0d57..7a8844795b 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -459,14 +459,14 @@ store.") (define-public glibc (package (name "glibc") - (version "2.22") + (version "2.23") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "0j49682pm2nh4qbdw35bas82p1pgfnz4d2l7iwfyzvrvj0318wzb")) + "1s8krs3y2n6pzav7ic59dz41alqalphv7vww4138ag30wh0fpvwl")) (snippet ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is ;; required on LFS distros to avoid loading the distro's libc.so @@ -477,10 +477,8 @@ store.") (modules '((guix build utils))) (patches (map search-patch '("glibc-ldd-x86_64.patch" - "glibc-locale-incompatibility.patch" "glibc-versioned-locpath.patch" - "glibc-o-largefile.patch" - "glibc-CVE-2015-7547.patch"))))) + "glibc-o-largefile.patch"))))) (build-system gnu-build-system) ;; Glibc's refers to , for instance, so glibc @@ -497,7 +495,7 @@ store.") #:parallel-build? #f ;; The libraries have an empty RUNPATH, but some, such as the versioned - ;; libraries (libdl-2.22.so, etc.) have ld.so marked as NEEDED. Since + ;; libraries (libdl-2.23.so, etc.) have ld.so marked as NEEDED. Since ;; these libraries are always going to be found anyway, just skip ;; RUNPATH checks. #:validate-runpath? #f @@ -539,7 +537,7 @@ store.") "/bin/bash") ;; XXX: Work around "undefined reference to `__stack_chk_guard'". - "libc_cv_ssp=no") + "libc_cv_ssp=no" "libc_cv_ssp_strong=no") #:tests? #f ; XXX #:phases (modify-phases %standard-phases @@ -553,10 +551,6 @@ store.") ;; but cross-base uses it as a native input. (bash (or (assoc-ref inputs "static-bash") (assoc-ref native-inputs "static-bash")))) - ;; Use `pwd', not `/bin/pwd'. - (substitute* "configure" - (("/bin/pwd") "pwd")) - ;; Install the rpc data base file under `$out/etc/rpc'. ;; FIXME: Use installFlags = [ "sysconfdir=$(out)/etc" ]; (substitute* "sunrpc/Makefile" diff --git a/gnu/packages/patches/glibc-CVE-2015-7547.patch b/gnu/packages/patches/glibc-CVE-2015-7547.patch deleted file mode 100644 index 9a0909af74..0000000000 --- a/gnu/packages/patches/glibc-CVE-2015-7547.patch +++ /dev/null @@ -1,559 +0,0 @@ -Copied from Fedora: -http://pkgs.fedoraproject.org/cgit/rpms/glibc.git/tree/glibc-CVE-2015-7547.patch?h=f23&id=9f1734eb6ce3257b788d6e9203572e8204c6c584 - -Adapted to apply cleanly to glibc-2.22. - -Index: b/resolv/nss_dns/dns-host.c -=================================================================== ---- a/resolv/nss_dns/dns-host.c -+++ b/resolv/nss_dns/dns-host.c -@@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *an - int h_namelen = 0; - - if (ancount == 0) -- return NSS_STATUS_NOTFOUND; -+ { -+ *h_errnop = HOST_NOT_FOUND; -+ return NSS_STATUS_NOTFOUND; -+ } - - while (ancount-- > 0 && cp < end_of_message && had_error == 0) - { -@@ -1208,7 +1211,14 @@ gaih_getanswer_slice (const querybuf *an - /* Special case here: if the resolver sent a result but it only - contains a CNAME while we are looking for a T_A or T_AAAA record, - we fail with NOTFOUND instead of TRYAGAIN. */ -- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND; -+ if (canon != NULL) -+ { -+ *h_errnop = HOST_NOT_FOUND; -+ return NSS_STATUS_NOTFOUND; -+ } -+ -+ *h_errnop = NETDB_INTERNAL; -+ return NSS_STATUS_TRYAGAIN; - } - - -@@ -1222,11 +1232,101 @@ gaih_getanswer (const querybuf *answer1, - - enum nss_status status = NSS_STATUS_NOTFOUND; - -+ /* Combining the NSS status of two distinct queries requires some -+ compromise and attention to symmetry (A or AAAA queries can be -+ returned in any order). What follows is a breakdown of how this -+ code is expected to work and why. We discuss only SUCCESS, -+ TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns -+ that apply (though RETURN and MERGE exist). We make a distinction -+ between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable). -+ A recoverable TRYAGAIN is almost always due to buffer size issues -+ and returns ERANGE in errno and the caller is expected to retry -+ with a larger buffer. -+ -+ Lastly, you may be tempted to make significant changes to the -+ conditions in this code to bring about symmetry between responses. -+ Please don't change anything without due consideration for -+ expected application behaviour. Some of the synthesized responses -+ aren't very well thought out and sometimes appear to imply that -+ IPv4 responses are always answer 1, and IPv6 responses are always -+ answer 2, but that's not true (see the implemetnation of send_dg -+ and send_vc to see response can arrive in any order, particlarly -+ for UDP). However, we expect it holds roughly enough of the time -+ that this code works, but certainly needs to be fixed to make this -+ a more robust implementation. -+ -+ ---------------------------------------------- -+ | Answer 1 Status / | Synthesized | Reason | -+ | Answer 2 Status | Status | | -+ |--------------------------------------------| -+ | SUCCESS/SUCCESS | SUCCESS | [1] | -+ | SUCCESS/TRYAGAIN | TRYAGAIN | [5] | -+ | SUCCESS/TRYAGAIN' | SUCCESS | [1] | -+ | SUCCESS/NOTFOUND | SUCCESS | [1] | -+ | SUCCESS/UNAVAIL | SUCCESS | [1] | -+ | TRYAGAIN/SUCCESS | TRYAGAIN | [2] | -+ | TRYAGAIN/TRYAGAIN | TRYAGAIN | [2] | -+ | TRYAGAIN/TRYAGAIN' | TRYAGAIN | [2] | -+ | TRYAGAIN/NOTFOUND | TRYAGAIN | [2] | -+ | TRYAGAIN/UNAVAIL | TRYAGAIN | [2] | -+ | TRYAGAIN'/SUCCESS | SUCCESS | [3] | -+ | TRYAGAIN'/TRYAGAIN | TRYAGAIN | [3] | -+ | TRYAGAIN'/TRYAGAIN' | TRYAGAIN' | [3] | -+ | TRYAGAIN'/NOTFOUND | TRYAGAIN' | [3] | -+ | TRYAGAIN'/UNAVAIL | UNAVAIL | [3] | -+ | NOTFOUND/SUCCESS | SUCCESS | [3] | -+ | NOTFOUND/TRYAGAIN | TRYAGAIN | [3] | -+ | NOTFOUND/TRYAGAIN' | TRYAGAIN' | [3] | -+ | NOTFOUND/NOTFOUND | NOTFOUND | [3] | -+ | NOTFOUND/UNAVAIL | UNAVAIL | [3] | -+ | UNAVAIL/SUCCESS | UNAVAIL | [4] | -+ | UNAVAIL/TRYAGAIN | UNAVAIL | [4] | -+ | UNAVAIL/TRYAGAIN' | UNAVAIL | [4] | -+ | UNAVAIL/NOTFOUND | UNAVAIL | [4] | -+ | UNAVAIL/UNAVAIL | UNAVAIL | [4] | -+ ---------------------------------------------- -+ -+ [1] If the first response is a success we return success. -+ This ignores the state of the second answer and in fact -+ incorrectly sets errno and h_errno to that of the second -+ answer. However because the response is a success we ignore -+ *errnop and *h_errnop (though that means you touched errno on -+ success). We are being conservative here and returning the -+ likely IPv4 response in the first answer as a success. -+ -+ [2] If the first response is a recoverable TRYAGAIN we return -+ that instead of looking at the second response. The -+ expectation here is that we have failed to get an IPv4 response -+ and should retry both queries. -+ -+ [3] If the first response was not a SUCCESS and the second -+ response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN, -+ or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the -+ result from the second response, otherwise the first responses -+ status is used. Again we have some odd side-effects when the -+ second response is NOTFOUND because we overwrite *errnop and -+ *h_errnop that means that a first answer of NOTFOUND might see -+ its *errnop and *h_errnop values altered. Whether it matters -+ in practice that a first response NOTFOUND has the wrong -+ *errnop and *h_errnop is undecided. -+ -+ [4] If the first response is UNAVAIL we return that instead of -+ looking at the second response. The expectation here is that -+ it will have failed similarly e.g. configuration failure. -+ -+ [5] Testing this code is complicated by the fact that truncated -+ second response buffers might be returned as SUCCESS if the -+ first answer is a SUCCESS. To fix this we add symmetry to -+ TRYAGAIN with the second response. If the second response -+ is a recoverable error we now return TRYAGIN even if the first -+ response was SUCCESS. */ -+ - if (anslen1 > 0) - status = gaih_getanswer_slice(answer1, anslen1, qname, - &pat, &buffer, &buflen, - errnop, h_errnop, ttlp, - &first); -+ - if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND - || (status == NSS_STATUS_TRYAGAIN - /* We want to look at the second answer in case of an -@@ -1242,8 +1342,15 @@ gaih_getanswer (const querybuf *answer1, - &pat, &buffer, &buflen, - errnop, h_errnop, ttlp, - &first); -+ /* Use the second response status in some cases. */ - if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND) - status = status2; -+ /* Do not return a truncated second response (unless it was -+ unavoidable e.g. unrecoverable TRYAGAIN). */ -+ if (status == NSS_STATUS_SUCCESS -+ && (status2 == NSS_STATUS_TRYAGAIN -+ && *errnop == ERANGE && *h_errnop != NO_RECOVERY)) -+ status = NSS_STATUS_TRYAGAIN; - } - - return status; -Index: b/resolv/res_query.c -=================================================================== ---- a/resolv/res_query.c -+++ b/resolv/res_query.c -@@ -396,6 +396,7 @@ __libc_res_nsearch(res_state statp, - { - free (*answerp2); - *answerp2 = NULL; -+ *nanswerp2 = 0; - *answerp2_malloced = 0; - } - } -@@ -447,6 +448,7 @@ __libc_res_nsearch(res_state statp, - { - free (*answerp2); - *answerp2 = NULL; -+ *nanswerp2 = 0; - *answerp2_malloced = 0; - } - -@@ -521,6 +523,7 @@ __libc_res_nsearch(res_state statp, - { - free (*answerp2); - *answerp2 = NULL; -+ *nanswerp2 = 0; - *answerp2_malloced = 0; - } - if (saved_herrno != -1) -Index: b/resolv/res_send.c -=================================================================== ---- a/resolv/res_send.c -+++ b/resolv/res_send.c -@@ -1,3 +1,20 @@ -+/* Copyright (C) 2016 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ - /* - * Copyright (c) 1985, 1989, 1993 - * The Regents of the University of California. All rights reserved. -@@ -361,6 +378,8 @@ __libc_res_nsend(res_state statp, const - #ifdef USE_HOOKS - if (__glibc_unlikely (statp->qhook || statp->rhook)) { - if (anssiz < MAXPACKET && ansp) { -+ /* Always allocate MAXPACKET, callers expect -+ this specific size. */ - u_char *buf = malloc (MAXPACKET); - if (buf == NULL) - return (-1); -@@ -660,6 +679,77 @@ libresolv_hidden_def (res_nsend) - - /* Private */ - -+/* The send_vc function is responsible for sending a DNS query over TCP -+ to the nameserver numbered NS from the res_state STATP i.e. -+ EXT(statp).nssocks[ns]. The function supports sending both IPv4 and -+ IPv6 queries at the same serially on the same socket. -+ -+ Please note that for TCP there is no way to disable sending both -+ queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP -+ and sends the queries serially and waits for the result after each -+ sent query. This implemetnation should be corrected to honour these -+ options. -+ -+ Please also note that for TCP we send both queries over the same -+ socket one after another. This technically violates best practice -+ since the server is allowed to read the first query, respond, and -+ then close the socket (to service another client). If the server -+ does this, then the remaining second query in the socket data buffer -+ will cause the server to send the client an RST which will arrive -+ asynchronously and the client's OS will likely tear down the socket -+ receive buffer resulting in a potentially short read and lost -+ response data. This will force the client to retry the query again, -+ and this process may repeat until all servers and connection resets -+ are exhausted and then the query will fail. It's not known if this -+ happens with any frequency in real DNS server implementations. This -+ implementation should be corrected to use two sockets by default for -+ parallel queries. -+ -+ The query stored in BUF of BUFLEN length is sent first followed by -+ the query stored in BUF2 of BUFLEN2 length. Queries are sent -+ serially on the same socket. -+ -+ Answers to the query are stored firstly in *ANSP up to a max of -+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP -+ is non-NULL (to indicate that modifying the answer buffer is allowed) -+ then malloc is used to allocate a new response buffer and ANSCP and -+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes -+ are needed but ANSCP is NULL, then as much of the response as -+ possible is read into the buffer, but the results will be truncated. -+ When truncation happens because of a small answer buffer the DNS -+ packets header feild TC will bet set to 1, indicating a truncated -+ message and the rest of the socket data will be read and discarded. -+ -+ Answers to the query are stored secondly in *ANSP2 up to a max of -+ *ANSSIZP2 bytes, with the actual response length stored in -+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2 -+ is non-NULL (required for a second query) then malloc is used to -+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer -+ size and *ANSP2_MALLOCED is set to 1. -+ -+ The ANSP2_MALLOCED argument will eventually be removed as the -+ change in buffer pointer can be used to detect the buffer has -+ changed and that the caller should use free on the new buffer. -+ -+ Note that the answers may arrive in any order from the server and -+ therefore the first and second answer buffers may not correspond to -+ the first and second queries. -+ -+ It is not supported to call this function with a non-NULL ANSP2 -+ but a NULL ANSCP. Put another way, you can call send_vc with a -+ single unmodifiable buffer or two modifiable buffers, but no other -+ combination is supported. -+ -+ It is the caller's responsibility to free the malloc allocated -+ buffers by detecting that the pointers have changed from their -+ original values i.e. *ANSCP or *ANSP2 has changed. -+ -+ If errors are encountered then *TERRNO is set to an appropriate -+ errno value and a zero result is returned for a recoverable error, -+ and a less-than zero result is returned for a non-recoverable error. -+ -+ If no errors are encountered then *TERRNO is left unmodified and -+ a the length of the first response in bytes is returned. */ - static int - send_vc(res_state statp, - const u_char *buf, int buflen, const u_char *buf2, int buflen2, -@@ -669,11 +759,7 @@ send_vc(res_state statp, - { - const HEADER *hp = (HEADER *) buf; - const HEADER *hp2 = (HEADER *) buf2; -- u_char *ans = *ansp; -- int orig_anssizp = *anssizp; -- // XXX REMOVE -- // int anssiz = *anssizp; -- HEADER *anhp = (HEADER *) ans; -+ HEADER *anhp = (HEADER *) *ansp; - struct sockaddr *nsap = get_nsaddr (statp, ns); - int truncating, connreset, n; - /* On some architectures compiler might emit a warning indicating -@@ -766,6 +852,8 @@ send_vc(res_state statp, - * Receive length & response - */ - int recvresp1 = 0; -+ /* Skip the second response if there is no second query. -+ To do that we mark the second response as received. */ - int recvresp2 = buf2 == NULL; - uint16_t rlen16; - read_len: -@@ -802,40 +890,14 @@ send_vc(res_state statp, - u_char **thisansp; - int *thisresplenp; - if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) { -+ /* We have not received any responses -+ yet or we only have one response to -+ receive. */ - thisanssizp = anssizp; - thisansp = anscp ?: ansp; - assert (anscp != NULL || ansp2 == NULL); - thisresplenp = &resplen; - } else { -- if (*anssizp != MAXPACKET) { -- /* No buffer allocated for the first -- reply. We can try to use the rest -- of the user-provided buffer. */ --#if __GNUC_PREREQ (4, 7) -- DIAG_PUSH_NEEDS_COMMENT; -- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); --#endif --#if _STRING_ARCH_unaligned -- *anssizp2 = orig_anssizp - resplen; -- *ansp2 = *ansp + resplen; --#else -- int aligned_resplen -- = ((resplen + __alignof__ (HEADER) - 1) -- & ~(__alignof__ (HEADER) - 1)); -- *anssizp2 = orig_anssizp - aligned_resplen; -- *ansp2 = *ansp + aligned_resplen; --#endif --#if __GNUC_PREREQ (4, 7) -- DIAG_POP_NEEDS_COMMENT; --#endif -- } else { -- /* The first reply did not fit into the -- user-provided buffer. Maybe the second -- answer will. */ -- *anssizp2 = orig_anssizp; -- *ansp2 = *ansp; -- } -- - thisanssizp = anssizp2; - thisansp = ansp2; - thisresplenp = resplen2; -@@ -843,10 +905,14 @@ send_vc(res_state statp, - anhp = (HEADER *) *thisansp; - - *thisresplenp = rlen; -- if (rlen > *thisanssizp) { -- /* Yes, we test ANSCP here. If we have two buffers -- both will be allocatable. */ -- if (__glibc_likely (anscp != NULL)) { -+ /* Is the answer buffer too small? */ -+ if (*thisanssizp < rlen) { -+ /* If the current buffer is non-NULL and it's not -+ pointing at the static user-supplied buffer then -+ we can reallocate it. */ -+ if (thisansp != NULL && thisansp != ansp) { -+ /* Always allocate MAXPACKET, callers expect -+ this specific size. */ - u_char *newp = malloc (MAXPACKET); - if (newp == NULL) { - *terrno = ENOMEM; -@@ -858,6 +924,9 @@ send_vc(res_state statp, - if (thisansp == ansp2) - *ansp2_malloced = 1; - anhp = (HEADER *) newp; -+ /* A uint16_t can't be larger than MAXPACKET -+ thus it's safe to allocate MAXPACKET but -+ read RLEN bytes instead. */ - len = rlen; - } else { - Dprint(statp->options & RES_DEBUG, -@@ -1021,6 +1090,66 @@ reopen (res_state statp, int *terrno, in - return 1; - } - -+/* The send_dg function is responsible for sending a DNS query over UDP -+ to the nameserver numbered NS from the res_state STATP i.e. -+ EXT(statp).nssocks[ns]. The function supports IPv4 and IPv6 queries -+ along with the ability to send the query in parallel for both stacks -+ (default) or serially (RES_SINGLKUP). It also supports serial lookup -+ with a close and reopen of the socket used to talk to the server -+ (RES_SNGLKUPREOP) to work around broken name servers. -+ -+ The query stored in BUF of BUFLEN length is sent first followed by -+ the query stored in BUF2 of BUFLEN2 length. Queries are sent -+ in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP). -+ -+ Answers to the query are stored firstly in *ANSP up to a max of -+ *ANSSIZP bytes. If more than *ANSSIZP bytes are needed and ANSCP -+ is non-NULL (to indicate that modifying the answer buffer is allowed) -+ then malloc is used to allocate a new response buffer and ANSCP and -+ ANSP will both point to the new buffer. If more than *ANSSIZP bytes -+ are needed but ANSCP is NULL, then as much of the response as -+ possible is read into the buffer, but the results will be truncated. -+ When truncation happens because of a small answer buffer the DNS -+ packets header feild TC will bet set to 1, indicating a truncated -+ message, while the rest of the UDP packet is discarded. -+ -+ Answers to the query are stored secondly in *ANSP2 up to a max of -+ *ANSSIZP2 bytes, with the actual response length stored in -+ *RESPLEN2. If more than *ANSSIZP bytes are needed and ANSP2 -+ is non-NULL (required for a second query) then malloc is used to -+ allocate a new response buffer, *ANSSIZP2 is set to the new buffer -+ size and *ANSP2_MALLOCED is set to 1. -+ -+ The ANSP2_MALLOCED argument will eventually be removed as the -+ change in buffer pointer can be used to detect the buffer has -+ changed and that the caller should use free on the new buffer. -+ -+ Note that the answers may arrive in any order from the server and -+ therefore the first and second answer buffers may not correspond to -+ the first and second queries. -+ -+ It is not supported to call this function with a non-NULL ANSP2 -+ but a NULL ANSCP. Put another way, you can call send_vc with a -+ single unmodifiable buffer or two modifiable buffers, but no other -+ combination is supported. -+ -+ It is the caller's responsibility to free the malloc allocated -+ buffers by detecting that the pointers have changed from their -+ original values i.e. *ANSCP or *ANSP2 has changed. -+ -+ If an answer is truncated because of UDP datagram DNS limits then -+ *V_CIRCUIT is set to 1 and the return value non-zero to indicate to -+ the caller to retry with TCP. The value *GOTSOMEWHERE is set to 1 -+ if any progress was made reading a response from the nameserver and -+ is used by the caller to distinguish between ECONNREFUSED and -+ ETIMEDOUT (the latter if *GOTSOMEWHERE is 1). -+ -+ If errors are encountered then *TERRNO is set to an appropriate -+ errno value and a zero result is returned for a recoverable error, -+ and a less-than zero result is returned for a non-recoverable error. -+ -+ If no errors are encountered then *TERRNO is left unmodified and -+ a the length of the first response in bytes is returned. */ - static int - send_dg(res_state statp, - const u_char *buf, int buflen, const u_char *buf2, int buflen2, -@@ -1030,8 +1159,6 @@ send_dg(res_state statp, - { - const HEADER *hp = (HEADER *) buf; - const HEADER *hp2 = (HEADER *) buf2; -- u_char *ans = *ansp; -- int orig_anssizp = *anssizp; - struct timespec now, timeout, finish; - struct pollfd pfd[1]; - int ptimeout; -@@ -1064,6 +1191,8 @@ send_dg(res_state statp, - int need_recompute = 0; - int nwritten = 0; - int recvresp1 = 0; -+ /* Skip the second response if there is no second query. -+ To do that we mark the second response as received. */ - int recvresp2 = buf2 == NULL; - pfd[0].fd = EXT(statp).nssocks[ns]; - pfd[0].events = POLLOUT; -@@ -1227,55 +1356,56 @@ send_dg(res_state statp, - int *thisresplenp; - - if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) { -+ /* We have not received any responses -+ yet or we only have one response to -+ receive. */ - thisanssizp = anssizp; - thisansp = anscp ?: ansp; - assert (anscp != NULL || ansp2 == NULL); - thisresplenp = &resplen; - } else { -- if (*anssizp != MAXPACKET) { -- /* No buffer allocated for the first -- reply. We can try to use the rest -- of the user-provided buffer. */ --#if _STRING_ARCH_unaligned -- *anssizp2 = orig_anssizp - resplen; -- *ansp2 = *ansp + resplen; --#else -- int aligned_resplen -- = ((resplen + __alignof__ (HEADER) - 1) -- & ~(__alignof__ (HEADER) - 1)); -- *anssizp2 = orig_anssizp - aligned_resplen; -- *ansp2 = *ansp + aligned_resplen; --#endif -- } else { -- /* The first reply did not fit into the -- user-provided buffer. Maybe the second -- answer will. */ -- *anssizp2 = orig_anssizp; -- *ansp2 = *ansp; -- } -- - thisanssizp = anssizp2; - thisansp = ansp2; - thisresplenp = resplen2; - } - - if (*thisanssizp < MAXPACKET -- /* Yes, we test ANSCP here. If we have two buffers -- both will be allocatable. */ -- && anscp -+ /* If the current buffer is non-NULL and it's not -+ pointing at the static user-supplied buffer then -+ we can reallocate it. */ -+ && (thisansp != NULL && thisansp != ansp) - #ifdef FIONREAD -+ /* Is the size too small? */ - && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0 - || *thisanssizp < *thisresplenp) - #endif - ) { -+ /* Always allocate MAXPACKET, callers expect -+ this specific size. */ - u_char *newp = malloc (MAXPACKET); - if (newp != NULL) { -- *anssizp = MAXPACKET; -- *thisansp = ans = newp; -+ *thisanssizp = MAXPACKET; -+ *thisansp = newp; - if (thisansp == ansp2) - *ansp2_malloced = 1; - } - } -+ /* We could end up with truncation if anscp was NULL -+ (not allowed to change caller's buffer) and the -+ response buffer size is too small. This isn't a -+ reliable way to detect truncation because the ioctl -+ may be an inaccurate report of the UDP message size. -+ Therefore we use this only to issue debug output. -+ To do truncation accurately with UDP we need -+ MSG_TRUNC which is only available on Linux. We -+ can abstract out the Linux-specific feature in the -+ future to detect truncation. */ -+ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) { -+ Dprint(statp->options & RES_DEBUG, -+ (stdout, ";; response may be truncated (UDP)\n") -+ ); -+ } -+ - HEADER *anhp = (HEADER *) *thisansp; - socklen_t fromlen = sizeof(struct sockaddr_in6); - assert (sizeof(from) <= fromlen); diff --git a/gnu/packages/patches/glibc-locale-incompatibility.patch b/gnu/packages/patches/glibc-locale-incompatibility.patch deleted file mode 100644 index baf30a79a7..0000000000 --- a/gnu/packages/patches/glibc-locale-incompatibility.patch +++ /dev/null @@ -1,23 +0,0 @@ -This patch avoids an assertion failure when incompatible locale data -is encountered: - - https://sourceware.org/ml/libc-alpha/2015-09/msg00575.html - ---- glibc-2.22/locale/loadlocale.c 2015-09-22 17:16:02.321981548 +0200 -+++ glibc-2.22/locale/loadlocale.c 2015-09-22 17:17:34.814659064 +0200 -@@ -120,10 +120,11 @@ - _nl_value_type_LC_XYZ array. There are all pointers. */ - switch (category) - { --#define CATTEST(cat) \ -- case LC_##cat: \ -- assert (cnt < (sizeof (_nl_value_type_LC_##cat) \ -- / sizeof (_nl_value_type_LC_##cat[0]))); \ -+#define CATTEST(cat) \ -+ case LC_##cat: \ -+ if (cnt >= (sizeof (_nl_value_type_LC_##cat) \ -+ / sizeof (_nl_value_type_LC_##cat[0]))) \ -+ goto puntdata; \ - break - CATTEST (NUMERIC); - CATTEST (TIME); -- cgit v1.2.3 From 4d31bdb095397661ee3d941d8d01459cafdc119e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 24 Apr 2016 22:53:03 +0200 Subject: gnu: grep: Update to 2.25. * gnu/packages/base.scm (grep): Update to 2.25. --- 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 7a8844795b..2b491aa17c 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -74,14 +74,14 @@ command-line arguments, multiple languages, and so on.") (define-public grep (package (name "grep") - (version "2.24") + (version "2.25") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grep/grep-" version ".tar.xz")) (sha256 (base32 - "057cir4p19h7yv4xir1wiaxfa1fp45d3pl7xsaaannlc16wvwj7j")) + "0c38b67cnwchwzv4wq2gpz6smkhdxrac2hhssv8f0l04qnx867p2")) (patches (list (search-patch "grep-timing-sensitive-test.patch"))))) (build-system gnu-build-system) -- cgit v1.2.3 From 55de892b435657f82a25c6499174d09b4a680f15 Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis Date: Sun, 10 Apr 2016 21:20:51 +0300 Subject: gnu: glibc: Rename linux-headers input to kernel-headers. * gnu/packages/base.scm (glibc)[propagated-inputs]: Use a kernel agnostic name for the kernel headers. [arguments]: Adjust accordingly. * gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash) [propagated-inputs]: Adjust accordingly. * gnu/packages/cross-base.scm (cross-gcc-arguments)[arguments]: Adjust accordingly. (cross-gcc)[native-inputs]: Adjust accordingly. * gnu/packages/make-bootstrap.scm (%glibc-stripped)[arguments]: Adjust accordingly. [inputs]: Adjust accordingly. --- gnu/packages/base.scm | 4 ++-- gnu/packages/commencement.scm | 2 +- gnu/packages/cross-base.scm | 24 ++++++++++++------------ gnu/packages/make-bootstrap.scm | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index fce193ceec..d7e069edee 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -479,7 +479,7 @@ store.") ;; Glibc's refers to , for instance, so glibc ;; users should automatically pull Linux headers as well. - (propagated-inputs `(("linux-headers" ,linux-libre-headers))) + (propagated-inputs `(("kernel-headers" ,linux-libre-headers))) (outputs '("out" "debug")) @@ -519,7 +519,7 @@ store.") ,version) (string-append "--with-headers=" - (assoc-ref %build-inputs "linux-headers") + (assoc-ref %build-inputs "kernel-headers") "/include") ;; This is the default for most architectures as of GNU libc 2.21, diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 463f42537c..12cafb78e5 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -382,7 +382,7 @@ "export CPATH\n" all "\n")))) ,phases))))) - (propagated-inputs `(("linux-headers" ,(linux-libre-headers-boot0)))) + (propagated-inputs `(("kernel-headers" ,(linux-libre-headers-boot0)))) (native-inputs `(("texinfo" ,texinfo-boot0) ("perl" ,perl-boot0))) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index aa67d21c19..22dfa15674 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -166,18 +166,18 @@ may be either a libc package or #f.)" `(alist-cons-before 'configure 'set-cross-path (lambda* (#:key inputs #:allow-other-keys) - ;; Add the cross Linux headers to CROSS_CPATH, and remove them + ;; Add the cross kernel headers to CROSS_CPATH, and remove them ;; from CPATH. (let ((libc (assoc-ref inputs "libc")) - (linux (assoc-ref inputs "xlinux-headers"))) + (kernel (assoc-ref inputs "xkernel-headers"))) (define (cross? x) ;; Return #t if X is a cross-libc or cross Linux. (or (string-prefix? libc x) - (string-prefix? linux x))) + (string-prefix? kernel x))) (setenv "CROSS_CPATH" (string-append libc "/include:" - linux "/include")) + kernel "/include")) (setenv "CROSS_LIBRARY_PATH" (string-append libc "/lib")) @@ -250,9 +250,9 @@ GCC that does not target a libc; otherwise, target that libc." (alist-delete "libc" %final-inputs)))) (if libc `(("libc" ,libc) - ("xlinux-headers" ;the target headers + ("xkernel-headers" ;the target headers ,@(assoc-ref (package-propagated-inputs libc) - "linux-headers")) + "kernel-headers")) ,@inputs) inputs)))) @@ -314,17 +314,17 @@ XBINUTILS and the cross tool chain." ,flags)) ((#:phases phases) `(alist-cons-before - 'configure 'set-cross-linux-headers-path + 'configure 'set-cross-kernel-headers-path (lambda* (#:key inputs #:allow-other-keys) - (let ((linux (assoc-ref inputs "linux-headers"))) + (let ((kernel (assoc-ref inputs "kernel-headers"))) (setenv "CROSS_CPATH" - (string-append linux "/include")) + (string-append kernel "/include")) #t)) ,phases)))) - ;; Shadow the native "linux-headers" because glibc's recipe expects the - ;; "linux-headers" input to point to the right thing. - (propagated-inputs `(("linux-headers" ,xlinux-headers))) + ;; Shadow the native "kernel-headers" because glibc's recipe expects the + ;; "kernel-headers" input to point to the right thing. + (propagated-inputs `(("kernel-headers" ,xlinux-headers))) ;; FIXME: 'static-bash' should really be an input, not a native input, but ;; to do that will require building an intermediate cross libc. diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 85dfaa6b6f..def9c23b17 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -344,7 +344,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (libdir (string-append out "/lib")) (incdir (string-append out "/include")) (libc (assoc-ref %build-inputs "libc")) - (linux (assoc-ref %build-inputs "linux-headers"))) + (linux (assoc-ref %build-inputs "kernel-headers"))) (mkdir-p libdir) (for-each (lambda (file) (let ((target (string-append libdir "/" @@ -379,7 +379,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (parameterize ((%current-target-system #f)) (cross-libc target))) glibc))) - ("linux-headers" ,linux-libre-headers))) + ("kernel-headers" ,linux-libre-headers))) ;; Only one output. (outputs '("out"))))) -- cgit v1.2.3 From 74d637397b44a90d2dbc2ac100b38591dd4f81eb Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 17 May 2016 10:46:26 +0200 Subject: gnu: tar: Update to 1.29. * gnu/packages/base.scm (tar): Update to 1.29. [source]: Remove 'tar-d_ino_in_dirent-fix.patch'. [arguments]: New field. * gnu/packages/patches/tar-d_ino_in_dirent-fix.patch: Remove. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 - gnu/packages/base.scm | 18 +++++++++--- gnu/packages/patches/tar-d_ino_in_dirent-fix.patch | 33 ---------------------- 3 files changed, 14 insertions(+), 38 deletions(-) delete mode 100644 gnu/packages/patches/tar-d_ino_in_dirent-fix.patch (limited to 'gnu/packages/base.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 8cf5ef5c99..a1700a5e23 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -721,7 +721,6 @@ dist_patch_DATA = \ gnu/packages/patches/sudo-CVE-2015-5602.patch \ gnu/packages/patches/superlu-dist-scotchmetis.patch \ gnu/packages/patches/synfig-build-fix.patch \ - gnu/packages/patches/tar-d_ino_in_dirent-fix.patch \ gnu/packages/patches/tar-skip-unreliable-tests.patch \ gnu/packages/patches/tcl-mkindex-deterministic.patch \ gnu/packages/patches/tclxml-3.2-install.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 0d12376057..f5da787d6b 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -137,17 +137,27 @@ implementation offers several extensions over the standard utility.") (define-public tar (package (name "tar") - (version "1.28") + (version "1.29") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/tar/tar-" version ".tar.xz")) (sha256 (base32 - "1wi2zwm4c9r3h3b8y4w0nm0qq897kn8kyj9k22ba0iqvxj48vvk4")) - (patches (search-patches "tar-d_ino_in_dirent-fix.patch" - "tar-skip-unreliable-tests.patch")))) + "097hx7sbzp8qirl4m930lw84kn0wmxhmq7v1qpra3mrg0b8cyba0")) + (patches (search-patches "tar-skip-unreliable-tests.patch")))) (build-system gnu-build-system) + ;; Note: test suite requires ~1GiB of disk space. + (arguments + '(#:phases (modify-phases %standard-phases + (add-before 'build 'set-shell-file-name + (lambda* (#:key inputs #:allow-other-keys) + ;; Do not use "/bin/sh" to run programs. + (let ((bash (assoc-ref inputs "bash"))) + (substitute* "src/system.c" + (("/bin/sh") + (string-append bash "/bin/sh"))) + #t)))))) (synopsis "Managing tar archives") (description "Tar provides the ability to create tar archives, as well as the diff --git a/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch b/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch deleted file mode 100644 index 39d8e2b20a..0000000000 --- a/gnu/packages/patches/tar-d_ino_in_dirent-fix.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit e9ddc08da0982f36581ae5a8c7763453ff41cfe8 -Author: Sergey Poznyakoff -Date: Thu Sep 25 00:22:16 2014 +0300 - - Bugfixes. - - * doc/tar.1: Fix typo in font spec. - * src/tar.c (sort_mode_arg, sort_mode_flag): Protect "inode" - (SAVEDIR_SORT_INODE) with D_INO_IN_DIRENT - -diff --git a/src/tar.c b/src/tar.c -index 225c624..f8102e0 100644 ---- a/src/tar.c -+++ b/src/tar.c -@@ -1341,14 +1341,18 @@ static char filename_terminator; - static char const *const sort_mode_arg[] = { - "none", - "name", -+#if D_INO_IN_DIRENT - "inode", -+#endif - NULL - }; - - static int sort_mode_flag[] = { - SAVEDIR_SORT_NONE, - SAVEDIR_SORT_NAME, -+#if D_INO_IN_DIRENT - SAVEDIR_SORT_INODE -+#endif - }; - - ARGMATCH_VERIFY (sort_mode_arg, sort_mode_flag); \ No newline at end of file -- cgit v1.2.3 From 5d4d7a9aa9d76b7c626c50f3d07d9a03770981e3 Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis Date: Thu, 2 Jun 2016 12:36:05 +0300 Subject: gnu: glibc-hurd: Update to 20160518. * gnu/packages/base.scm (glibc/hurd)[version]: Update to version 20160518. [propagated-inputs]: Use hurd-core-headers. [native-inputs]: Remove libpthread's source and "patch/libpthread-patch". [arguments]: Add augment-libc.so and pre-configure-set-pwd phases. Remove prepare-libpthread phase. Stop removing "--with-headers=" from original-configure-flags. * gnu/packages/patches/glibc-hurd-extern-inline.patch: Remove patch. * gnu/packages/patches/libpthread-glibc-preparation.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Remove them. --- gnu/local.mk | 2 - gnu/packages/base.scm | 74 +++++------ .../patches/glibc-hurd-extern-inline.patch | 35 ----- .../patches/libpthread-glibc-preparation.patch | 146 --------------------- 4 files changed, 32 insertions(+), 225 deletions(-) delete mode 100644 gnu/packages/patches/glibc-hurd-extern-inline.patch delete mode 100644 gnu/packages/patches/libpthread-glibc-preparation.patch (limited to 'gnu/packages/base.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 0287befd22..641963daf2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -502,7 +502,6 @@ dist_patch_DATA = \ gnu/packages/patches/glib-networking-ssl-cert-file.patch \ gnu/packages/patches/glib-tests-timer.patch \ gnu/packages/patches/glibc-bootstrap-system.patch \ - gnu/packages/patches/glibc-hurd-extern-inline.patch \ gnu/packages/patches/glibc-ldd-x86_64.patch \ gnu/packages/patches/glibc-locales.patch \ gnu/packages/patches/glibc-o-largefile.patch \ @@ -601,7 +600,6 @@ dist_patch_DATA = \ gnu/packages/patches/libxslt-generated-ids.patch \ gnu/packages/patches/libxslt-remove-date-timestamps.patch \ gnu/packages/patches/lirc-localstatedir.patch \ - gnu/packages/patches/libpthread-glibc-preparation.patch \ gnu/packages/patches/lm-sensors-hwmon-attrs.patch \ gnu/packages/patches/lua-pkgconfig.patch \ gnu/packages/patches/lua51-liblua-so.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index f5da787d6b..b7ab7f14ce 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -761,66 +761,56 @@ command.") ;; The Hurd's libc variant. (package (inherit glibc) (name "glibc-hurd") - (version "2.18") + (version "2.19") (source (origin - (method git-fetch) - (uri (git-reference - (url "git://git.sv.gnu.org/hurd/glibc") - (commit "cc94b3cfe65523f980359e5f0e93a26196bda1d3"))) + (method url-fetch) + (uri (string-append "http://alpha.gnu.org/gnu/hurd/glibc-" + version "-hurd+libpthread-20160518" ".tar.gz")) (sha256 (base32 - "17gsh0kaz0zyvghjmx861mi2p65m9901lngi179x61zm6v2v3xc4")) - (file-name (string-append name "-" version)) - (patches (search-patches "glibc-hurd-extern-inline.patch")))) + "12zmdjviybpsdb2kq4cg98rds7909f0cc96fzdahdfrzlxx1q0px")))) ;; Libc provides , which includes a bunch of Hurd and Mach headers, ;; so both should be propagated. - (propagated-inputs `(("gnumach-headers" ,gnumach-headers) - ("hurd-headers" ,hurd-headers) - ("hurd-minimal" ,hurd-minimal))) + (propagated-inputs `(("hurd-core-headers" ,hurd-core-headers))) (native-inputs `(,@(package-native-inputs glibc) - ("patch/libpthread-patch" ,(search-patch "libpthread-glibc-preparation.patch")) ("mig" ,mig) - ("perl" ,perl) - ("libpthread" ,(origin - (method git-fetch) - (uri (git-reference - (url "git://git.sv.gnu.org/hurd/libpthread") - (commit "0ef7b75c4ba91b6660f0d3d8b51d14d25e3d5bfb"))) - (sha256 - (base32 - "031py18fls15z0wprni33mf762kg6fx8xqijppimhp83yp6ky3l3")) - (file-name "libpthread"))))) + ("perl" ,perl))) (arguments (substitute-keyword-arguments (package-arguments glibc) - ((#:configure-flags original-configure-flags) - `(append (list "--host=i686-pc-gnu" + ((#: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"))) + ,original-phases))) + ((#:configure-flags original-configure-flags) + `(append (list "--host=i586-pc-gnu" + + ;; We need this to get a working openpty() function. + "--enable-pt_chown" ;; nscd fails to build for GNU/Hurd: ;; . ;; Disable it. "--disable-nscd") (filter (lambda (flag) - (not (or (string-prefix? "--with-headers=" flag) - (string-prefix? "--enable-kernel=" flag)))) - ;; Evaluate 'original-configure-flags' in a - ;; lexical environment that has a dummy - ;; "linux-headers" input, to prevent errors. - (let ((%build-inputs `(("linux-headers" . "@DUMMY@") - ,@%build-inputs))) - ,original-configure-flags)))) - ((#:phases phases) - `(alist-cons-after - 'unpack 'prepare-libpthread - (lambda* (#:key inputs #:allow-other-keys) - (copy-recursively (assoc-ref inputs "libpthread") "libpthread") - - (system* "patch" "--force" "-p1" "-i" - (assoc-ref inputs "patch/libpthread-patch")) - #t) - ,phases)))) + (not (string-prefix? "--enable-kernel=" flag))) + ,original-configure-flags))))) (synopsis "The GNU C Library (GNU Hurd variant)") (supported-systems %hurd-systems))) diff --git a/gnu/packages/patches/glibc-hurd-extern-inline.patch b/gnu/packages/patches/glibc-hurd-extern-inline.patch deleted file mode 100644 index a609b1f54a..0000000000 --- a/gnu/packages/patches/glibc-hurd-extern-inline.patch +++ /dev/null @@ -1,35 +0,0 @@ -This changes the way _EXTERN_INLINE is defined so we can -avoid external definition errors. -https://lists.gnu.org/archive/html/bug-hurd/2014-04/msg00002.html - -diff --git a/signal/sigsetops.c b/signal/sigsetops.c -index 0317662..b92c296 100644 ---- a/signal/sigsetops.c -+++ b/signal/sigsetops.c -@@ -3,7 +3,9 @@ - - #include - --#define _EXTERN_INLINE -+#ifndef _EXTERN_INLINE -+#define _EXTERN_INLINE __extern_inline -+#endif - #ifndef __USE_EXTERN_INLINES - # define __USE_EXTERN_INLINES 1 - #endif - -Link libmachuser and libhurduser automatically with libc, since they are -considered a standard part of the API in GNU-land. - ---- a/Makerules -+++ b/Makerules -@@ -978,6 +978,9 @@ - '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ - ' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \ - ) > $@.new -+ifeq ($(patsubst gnu%,,$(config-os)),) -+ echo 'INPUT ( AS_NEEDED ( -lmachuser -lhurduser ) )' >> $@.new -+endif - mv -f $@.new $@ - - endif \ No newline at end of file diff --git a/gnu/packages/patches/libpthread-glibc-preparation.patch b/gnu/packages/patches/libpthread-glibc-preparation.patch deleted file mode 100644 index a43245436c..0000000000 --- a/gnu/packages/patches/libpthread-glibc-preparation.patch +++ /dev/null @@ -1,146 +0,0 @@ -This patch helps to integrate the Hurd's libpthread as a libc add-on. - -It writes the configure file, removes an rpc call not yet -implemented on the version of gnumach we use and defines -a missing macro. - -diff --git a/libpthread/configure b/libpthread/configure -new file mode 100644 -index 0000000..2cdbc71 ---- /dev/null -+++ b/libpthread/configure -@@ -0,0 +1,2 @@ -+libc_add_on_canonical=libpthread -+libc_add_on_subdirs=. --- -1.9.0 - -We are using a version of GNU Mach that lacks 'thread_terminate_release' -(not introduced yet). The 'thread_terminate' RPC call will be enough for -our needs. -See . - -diff --git a/libpthread/sysdeps/mach/pt-thread-terminate.c b/libpthread/sysdeps/mach/pt-thread-terminate.c -index 6672065..129a611 100644 ---- a/libpthread/sysdeps/mach/pt-thread-terminate.c -+++ b/libpthread/sysdeps/mach/pt-thread-terminate.c -@@ -70,9 +70,9 @@ __pthread_thread_terminate (struct __pthread *thread) - __mach_port_destroy (__mach_task_self (), wakeup_port); - - /* Terminate and release all that's left. */ -- err = __thread_terminate_release (kernel_thread, mach_task_self (), -- kernel_thread, reply_port, -- stackaddr, stacksize); -+ /* err = __thread_terminate_release (kernel_thread, mach_task_self (), */ -+ /* kernel_thread, reply_port, */ -+ /* stackaddr, stacksize); */ - - /* The kernel does not support it yet. Leak but at least terminate - correctly. */ --- -1.9.2 - -The __PTHREAD_SPIN_LOCK_INITIALIZER definition is missing, so we -define it to __SPIN_LOCK_INITIALIZER which already exists. -See . - -diff --git a/libpthread/sysdeps/mach/bits/spin-lock.h b/libpthread/sysdeps/mach/bits/spin-lock.h -index 537dac9..fca0e5a 100644 ---- a/libpthread/sysdeps/mach/bits/spin-lock.h -+++ b/libpthread/sysdeps/mach/bits/spin-lock.h -@@ -30,7 +30,7 @@ typedef __spin_lock_t __pthread_spinlock_t; - - /* Initializer for a spin lock object. */ - #ifndef __PTHREAD_SPIN_LOCK_INITIALIZER --#error __PTHREAD_SPIN_LOCK_INITIALIZER undefined: should be defined by . -+#define __PTHREAD_SPIN_LOCK_INITIALIZER __SPIN_LOCK_INITIALIZER - #endif - - __END_DECLS - -The version of the glibc we use doesn't include the shm-directory.c file and does -not yet support IS_IN. -See - -diff --git a/libpthread/Makefile b/libpthread/Makefile -index 2906788..b8dee58 100644 ---- a/libpthread/Makefile -+++ b/libpthread/Makefile -@@ -149,8 +149,6 @@ libpthread-routines := pt-attr pt-attr-destroy pt-attr-getdetachstate \ - sem-post sem-timedwait sem-trywait sem-unlink \ - sem-wait \ - \ -- shm-directory \ -- \ - cthreads-compat \ - $(SYSDEPS) - --- -2.3.6 - -diff --git a/libpthread/pthread/pt-create.c b/libpthread/pthread/pt-create.c -index d88afae..84044dc 100644 ---- a/libpthread/pthread/pt-create.c -+++ b/libpthread/pthread/pt-create.c -@@ -28,7 +28,7 @@ - - #include - --#if IS_IN (libpthread) -+#ifdef IS_IN_libpthread - # include - #endif - #ifdef HAVE_USELOCALE -@@ -50,7 +50,7 @@ entry_point (struct __pthread *self, void *(*start_routine)(void *), void *arg) - __resp = &self->res_state; - #endif - --#if IS_IN (libpthread) -+#ifdef IS_IN_libpthread - /* Initialize pointers to locale data. */ - __ctype_init (); - #endif -diff --git a/libpthread/pthread/pt-initialize.c b/libpthread/pthread/pt-initialize.c -index 9e5404b..b9cacbd 100644 ---- a/libpthread/pthread/pt-initialize.c -+++ b/libpthread/pthread/pt-initialize.c -@@ -28,7 +28,7 @@ - - DEFINE_HOOK (__pthread_init, (void)); - --#if IS_IN (libpthread) -+#ifdef IS_IN_libpthread - static const struct pthread_functions pthread_functions = - { - .ptr_pthread_attr_destroy = __pthread_attr_destroy, -@@ -81,7 +81,7 @@ static const struct pthread_functions pthread_functions = - void - ___pthread_init (void) - { --#if IS_IN (libpthread) -+#ifdef IS_IN_libpthread - __libc_pthread_init(&pthread_functions); - #endif - RUN_HOOK (__pthread_init, ()); -diff --git a/libpthread/pthread/pt-internal.h b/libpthread/pthread/pt-internal.h -index 18b5b4c..8cdcfce 100644 ---- a/libpthread/pthread/pt-internal.h -+++ b/libpthread/pthread/pt-internal.h -@@ -35,7 +35,7 @@ - #include - #include - --#if IS_IN (libpthread) -+#ifdef IS_IN_libpthread - # include - #endif - -@@ -60,7 +60,7 @@ enum pthread_state - # define PTHREAD_SYSDEP_MEMBERS - #endif - --#if !(IS_IN (libpthread)) -+#ifndef IS_IN_libpthread - #ifdef ENABLE_TLS - /* Type of the TCB. */ - typedef struct -- cgit v1.2.3 From aa81eb73ce6ee59c078331c709d553130e0443d3 Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis Date: Thu, 2 Jun 2016 12:49:30 +0300 Subject: gnu: glibc-hurd-headers: Use correct "--host". * gnu/packages/base.scm (glibc/hurd-headers)[arguments]: Use "i586-pc-gnu" instead of "i686-pc-gnu". --- gnu/packages/base.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index b7ab7f14ce..689ab2d3c3 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -825,7 +825,7 @@ command.") ;; We just pass the flags really needed to build the headers. ((#:configure-flags _) `(list "--enable-add-ons" - "--host=i686-pc-gnu" + "--host=i586-pc-gnu" "--enable-obsolete-rpc")) ((#:phases _) '(alist-replace -- cgit v1.2.3 From b09617da042ea6adc819df7a2ee04011133f696b Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis Date: Mon, 6 Jun 2016 17:21:51 +0300 Subject: gnu: base: Add glibc-for-target macro. * gnu/packages/base.scm (glibc): Add macro. (glibc/linux): Rename glibc to glibc/linux. (glibc/hurd): Adjust accordingly. --- gnu/packages/base.scm | 132 ++++++++++++++++++++++++++++---------------------- 1 file changed, 73 insertions(+), 59 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index d0ef06209f..74194bccdb 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -44,7 +44,9 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) - #:use-module (guix build-system trivial)) + #:use-module (guix build-system trivial) + #:use-module (ice-9 match) + #:export (glibc)) ;;; Commentary: ;;; @@ -464,7 +466,7 @@ store.") (export make-ld-wrapper) -(define-public glibc +(define-public glibc/linux (package (name "glibc") (version "2.23") @@ -641,6 +643,75 @@ with the Linux kernel.") (license lgpl2.0+) (home-page "http://www.gnu.org/software/libc/"))) +(define-public glibc/hurd + ;; The Hurd's libc variant. + (package (inherit glibc/linux) + (name "glibc-hurd") + (version "2.19") + (source (origin + (method url-fetch) + (uri (string-append "http://alpha.gnu.org/gnu/hurd/glibc-" + version "-hurd+libpthread-20160518" ".tar.gz")) + (sha256 + (base32 + "12zmdjviybpsdb2kq4cg98rds7909f0cc96fzdahdfrzlxx1q0px")))) + + ;; Libc provides , which includes a bunch of Hurd and Mach headers, + ;; so both should be propagated. + (propagated-inputs `(("hurd-core-headers" ,hurd-core-headers))) + (native-inputs + `(,@(package-native-inputs glibc/linux) + ("mig" ,mig) + ("perl" ,perl))) + + (arguments + (substitute-keyword-arguments (package-arguments glibc/linux) + ((#: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"))) + ,original-phases))) + ((#:configure-flags original-configure-flags) + `(append (list "--host=i586-pc-gnu" + + ;; We need this to get a working openpty() function. + "--enable-pt_chown" + + ;; nscd fails to build for GNU/Hurd: + ;; . + ;; Disable it. + "--disable-nscd") + (filter (lambda (flag) + (not (string-prefix? "--enable-kernel=" flag))) + ,original-configure-flags))))) + (synopsis "The GNU C Library (GNU Hurd variant)") + (supported-systems %hurd-systems))) + +(define* (glibc-for-target #:optional + (target (or (%current-target-system) + (%current-system)))) + "Return the glibc for TARGET, GLIBC/LINUX for a Linux host or +GLIBC/HURD for a Hurd host" + (match target + ((or "i586-pc-gnu" "i586-gnu") glibc/hurd) + (_ glibc/linux))) + +(define-syntax glibc + (identifier-syntax (glibc-for-target))) + (define-public glibc-2.21 ;; The old libc, which we use mostly to build locale data in the old format ;; (which the new libc can cope with.) @@ -760,63 +831,6 @@ variety of options. It is an alternative to the shell \"type\" built-in command.") (license gpl3+))) ; some files are under GPLv2+ -(define-public glibc/hurd - ;; The Hurd's libc variant. - (package (inherit glibc) - (name "glibc-hurd") - (version "2.19") - (source (origin - (method url-fetch) - (uri (string-append "http://alpha.gnu.org/gnu/hurd/glibc-" - version "-hurd+libpthread-20160518" ".tar.gz")) - (sha256 - (base32 - "12zmdjviybpsdb2kq4cg98rds7909f0cc96fzdahdfrzlxx1q0px")))) - - ;; Libc provides , which includes a bunch of Hurd and Mach headers, - ;; so both should be propagated. - (propagated-inputs `(("hurd-core-headers" ,hurd-core-headers))) - (native-inputs - `(,@(package-native-inputs glibc) - ("mig" ,mig) - ("perl" ,perl))) - - (arguments - (substitute-keyword-arguments (package-arguments glibc) - ((#: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"))) - ,original-phases))) - ((#:configure-flags original-configure-flags) - `(append (list "--host=i586-pc-gnu" - - ;; We need this to get a working openpty() function. - "--enable-pt_chown" - - ;; nscd fails to build for GNU/Hurd: - ;; . - ;; Disable it. - "--disable-nscd") - (filter (lambda (flag) - (not (string-prefix? "--enable-kernel=" flag))) - ,original-configure-flags))))) - (synopsis "The GNU C Library (GNU Hurd variant)") - (supported-systems %hurd-systems))) - (define-public glibc/hurd-headers (package (inherit glibc/hurd) (name "glibc-hurd-headers") -- cgit v1.2.3 From 36f0c9f2df2a76ae3bc43577b2e5a499ece69dbf Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 7 Jun 2016 16:49:14 +0300 Subject: gnu: make: Update to 4.2. * gnu/packages/base.scm (make): Update to 4.2. --- 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 74194bccdb..502684ff40 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -318,14 +318,14 @@ functionality beyond that which is outlined in the POSIX standard.") (define-public gnu-make (package (name "make") - (version "4.1") + (version "4.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/make/make-" version ".tar.bz2")) (sha256 (base32 - "19gwwhik3wdwn0r42b7xcihkbxvjl9r2bdal8nifc3k5i4rn3iqb")) + "0pv5rvz5pp4njxiz3syf786d2xp4j7gzddwjvgw5zmz55yvf6p2f")) (patches (search-patches "make-impure-dirs.patch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) ; to detect Guile -- cgit v1.2.3 From bbe032940c1ba4dd4aa0e450b288f7aca1588d90 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 10 Jun 2016 11:25:09 +0200 Subject: gnu: tar: Allow cross-compilation. * gnu/packages/base.scm (tar)[inputs]: New field. --- gnu/packages/base.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 502684ff40..422424cbe8 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -160,6 +160,13 @@ implementation offers several extensions over the standard utility.") (("/bin/sh") (string-append bash "/bin/sh"))) #t)))))) + + ;; When cross-compiling, the 'set-shell-file-name' phase needs to be able + ;; to refer to the target Bash. + (inputs (if (%current-target-system) + `(("bash" ,bash)) + '())) + (synopsis "Managing tar archives") (description "Tar provides the ability to create tar archives, as well as the -- cgit v1.2.3 From 38e9373b0d668d9e8347e0d6adce218480d41661 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 11 Jul 2016 10:23:08 +0300 Subject: gnu: glibc-2.21: Fix substitutes in glibc-2.21. * gnu/packages/base.scm (glibc-2.21)[arguments]: Add back substitution for /bin/pwd which was removed in the update of glibc to 2.23. --- gnu/packages/base.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 422424cbe8..ed1f84c470 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -732,7 +732,16 @@ GLIBC/HURD for a Hurd host" (sha256 (base32 "1f135546j34s9bfkydmx2nhh9vwxlx60jldi80zmsnln6wj3dsxf")) - (patches (search-patches "glibc-ldd-x86_64.patch")))))) + (patches (search-patches "glibc-ldd-x86_64.patch")))) + (arguments + (substitute-keyword-arguments (package-arguments glibc) + ((#:phases phases) + `(modify-phases ,phases + (add-before 'configure 'fix-pwd + (lambda _ + ;; Use `pwd' instead of `/bin/pwd' for glibc-2.21 + (substitute* "configure" + (("/bin/pwd") "pwd")))))))))) (define-public glibc-locales (package -- cgit v1.2.3 From c2c54ebd9153fd4a9609a3c58fb689aa9b242640 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 30 Jul 2016 13:14:36 +0200 Subject: gnu: Add glibc 2.22. * gnu/packages/base.scm (glibc-2.22): New variable. (glibc-2.21): Inherit from it; remove 'arguments' field. --- gnu/packages/base.scm | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index ed1f84c470..3135108ac8 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -719,19 +719,19 @@ GLIBC/HURD for a Hurd host" (define-syntax glibc (identifier-syntax (glibc-for-target))) -(define-public glibc-2.21 +(define-public glibc-2.22 ;; The old libc, which we use mostly to build locale data in the old format ;; (which the new libc can cope with.) (package (inherit glibc) - (version "2.21") + (version "2.22") (source (origin (inherit (package-source glibc)) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "1f135546j34s9bfkydmx2nhh9vwxlx60jldi80zmsnln6wj3dsxf")) + "0j49682pm2nh4qbdw35bas82p1pgfnz4d2l7iwfyzvrvj0318wzb")) (patches (search-patches "glibc-ldd-x86_64.patch")))) (arguments (substitute-keyword-arguments (package-arguments glibc) @@ -743,6 +743,21 @@ GLIBC/HURD for a Hurd host" (substitute* "configure" (("/bin/pwd") "pwd")))))))))) +(define-public glibc-2.21 + ;; The old libc, which we use mostly to build locale data in the old format + ;; (which the new libc can cope with.) + (package + (inherit glibc-2.22) + (version "2.21") + (source (origin + (inherit (package-source glibc)) + (uri (string-append "mirror://gnu/glibc/glibc-" + version ".tar.xz")) + (sha256 + (base32 + "1f135546j34s9bfkydmx2nhh9vwxlx60jldi80zmsnln6wj3dsxf")) + (patches (search-patches "glibc-ldd-x86_64.patch")))))) + (define-public glibc-locales (package (inherit glibc) -- cgit v1.2.3 From 85860fdf82f75c2026d8b93aac14ad34feea3d87 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Sun, 31 Jul 2016 10:42:47 +0800 Subject: gnu: glibc-locales: Fix build. * gnu/packages/patches/glibc-locales.patch: Adjust to glibc-2.23. * gnu/packages/base.scm (glibc-locales)[arguments]: Pass 'lib_cv_complocaledir'. --- gnu/packages/base.scm | 2 +- gnu/packages/patches/glibc-locales.patch | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 3135108ac8..5edf3eb493 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -786,7 +786,7 @@ the 'share/locale' sub-directory of this package.") ((#:configure-flags flags) `(append ,flags ;; Use $(libdir)/locale/X.Y as is the case by default. - (list (string-append "libc_cv_localedir=" + (list (string-append "libc_cv_complocaledir=" (assoc-ref %outputs "out") "/lib/locale/" ,(package-version glibc)))))))))) diff --git a/gnu/packages/patches/glibc-locales.patch b/gnu/packages/patches/glibc-locales.patch index 1bcf12bf6f..3a125e845e 100644 --- a/gnu/packages/patches/glibc-locales.patch +++ b/gnu/packages/patches/glibc-locales.patch @@ -5,8 +5,8 @@ in a package separate from glibc. 2. Use '--no-archive' to avoid building the big locale archive, and because the already-built 'localedef' would want to write it to '/run/current-system/locale', which is not possible. - 3. Pass $(localedir)/$$locale to install files in the right place, and - because otherwise, 'localedef' fails with: + 3. Pass $(inst_complocaledir)/$$locale to install files in the right + place, and because otherwise, 'localedef' fails with: "cannot write output files to `(null)'". --- glibc-2.22/localedata/Makefile 1970-01-01 01:00:00.000000000 +0100 @@ -25,7 +25,7 @@ in a package separate from glibc. $(LOCALEDEF) --alias-file=../intl/locale.alias \ -i locales/$$input -c -f charmaps/$$charset \ - $(addprefix --prefix=,$(install_root)) $$locale \ -+ $(addprefix --prefix=,$(install_root)) $(localedir)/$$locale \ ++ $(addprefix --prefix=,$(install_root)) $(inst_complocaledir)/$$locale \ && echo ' done'; \ tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP -- cgit v1.2.3