;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages texinfo)
#:use-module (gnu packages hurd)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
#:use-module (gnu packages gettext)
#:use-module (guix utils)
#:use-module (guix packages)
#t)))))
(synopsis "Core GNU utilities (file, text, shell)")
(description
- "GNU Coreutils includes all of the basic command-line tools that are
-expected in a POSIX system. These provide the basic file, shell and text
-manipulation functions of the GNU system. Most of these tools offer extended
-functionality beyond that which is outlined in the POSIX standard.")
+ "GNU Coreutils package includes all of the basic command-line tools that
+are expected in a POSIX system, excluding shell. This package is the union of
+the GNU fileutils, sh-utils, and textutils packages. Most of these tools
+offer extended functionality beyond that which is outlined in the POSIX
+standard.")
(license gpl3+)
(home-page "https://www.gnu.org/software/coreutils/")))
;; version 2.28, GNU/Hurd used a different glibc branch.
(package
(name "glibc")
- ;; Note: Always use a dot after the minor version since various places rely
- ;; on "version-major+minor" to determine where locales are found.
- (version "2.28")
+ (version "2.29")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
(sha256
(base32
- "10iha5ynvdj5m62vgpgqbq4cwvc2yhyl2w9yyyjgfxmdmx8h145i"))
+ "0jzh58728flfh939a8k9pi1zdyalfzlxmwra7k0rzji5gvavivpk"))
(snippet
;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is
;; required on LFS distros to avoid loading the distro's libc.so
#t))
(modules '((guix build utils)))
(patches (search-patches "glibc-ldd-x86_64.patch"
- "glibc-2.28-git-fixes.patch"
+ "glibc-CVE-2019-7309.patch"
+ "glibc-CVE-2019-9169.patch"
+ "glibc-2.29-git-updates.patch"
"glibc-hidden-visibility-ldconfig.patch"
"glibc-versioned-locpath.patch"
"glibc-allow-kernel-2.6.32.patch"
"glibc-reinstate-prlimit64-fallback.patch"
- "glibc-hurd-magic-pid.patch"
"glibc-supported-locales.patch"))))
(build-system gnu-build-system)
("perl" ,perl)
("bison" ,bison)
("gettext" ,gettext-minimal)
+ ("python" ,python-minimal)
,@(if (hurd-target?)
`(("mig" ,mig)
;; Below are old libc versions, which we use mostly to build locale data in
;; the old format (which the new libc cannot cope with.)
+(define-public glibc-2.28
+ (package
+ (inherit glibc)
+ (version "2.28")
+ (source (origin
+ (inherit (package-source glibc))
+ (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
+ (sha256
+ (base32
+ "10iha5ynvdj5m62vgpgqbq4cwvc2yhyl2w9yyyjgfxmdmx8h145i"))
+ (patches (search-patches "glibc-ldd-x86_64.patch"
+ "glibc-2.28-git-fixes.patch"
+ "glibc-hidden-visibility-ldconfig.patch"
+ "glibc-versioned-locpath.patch"
+ "glibc-allow-kernel-2.6.32.patch"
+ "glibc-reinstate-prlimit64-fallback.patch"
+ "glibc-hurd-magic-pid.patch"
+ "glibc-2.28-supported-locales.patch"))))))
+
(define-public glibc-2.27
(package
(inherit glibc)
"glibc-versioned-locpath.patch"
"glibc-allow-kernel-2.6.32.patch"
"glibc-reinstate-prlimit64-fallback.patch"
- "glibc-supported-locales.patch"
+ "glibc-2.27-supported-locales.patch"
"glibc-CVE-2018-11236.patch"
"glibc-CVE-2018-11237.patch"))))
(properties `((lint-hidden-cve . ("CVE-2017-18269")))))) ; glibc-2.27-git-fixes
(("/bin/pwd") "pwd"))
#t))))))))
-(define (make-gcc-libc base-gcc libc)
+(define-public (make-gcc-libc base-gcc libc)
"Return a GCC that targets LIBC."
(package (inherit base-gcc)
(name (string-append (package-name base-gcc) "-"
(substitute-keyword-arguments
(ensure-keyword-arguments (package-arguments base-gcc)
'(#:implicit-inputs? #f))
- ((#:make-flags flags)
- `(let ((libc (assoc-ref %build-inputs "libc")))
- ;; FLAGS_FOR_TARGET are needed for the target libraries to receive
- ;; the -Bxxx for the startfiles.
- (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
- ,flags)))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'treat-glibc-as-system-header
+ (lambda _
+ (let ((libc (assoc-ref %build-inputs "libc")))
+ ;; GCCs build processes requires that the libc
+ ;; we're building against is on the system header
+ ;; search path.
+ (for-each (lambda (var)
+ (setenv var (string-append libc "/include")))
+ '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
+ #t)))))))
(native-inputs
- `(("libc" ,libc)
- ("libc:static" ,libc "static")
- ,@(append (package-inputs base-gcc)
- (fold alist-delete (%final-inputs) '("libc" "libc:static")))))
- (inputs '())))
+ `(,@(package-native-inputs base-gcc)
+ ,@(append (fold alist-delete (%final-inputs) '("libc" "libc:static")))
+ ("libc" ,libc)
+ ("libc:static" ,libc "static")))))
(define-public (make-glibc-locales glibc)
(package
(inherit glibc)
(name "glibc-locales")
(source (origin (inherit (package-source glibc))
- (patches (cons (search-patch "glibc-locales.patch")
+ ;; The patch for glibc 2.28 and earlier replaces the same
+ ;; content, but the context in the patch is different
+ ;; enough to fail to merge.
+ (patches (cons (search-patch
+ (if (version>=? (package-version glibc)
+ "2.29")
+ "glibc-locales.patch"
+ "glibc-locales-2.28.patch"))
(origin-patches (package-source glibc))))))
(synopsis "All the locales supported by the GNU C Library")
(description
;; tests---e.g., in Guile's i18n tests.
'("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR"))
#t))))
- (inputs `(("glibc" ,glibc)
- ("gzip" ,gzip)))
+ (native-inputs `(("glibc" ,glibc)
+ ("gzip" ,gzip)))
(synopsis "Small sample of UTF-8 locales")
(description
"This package provides a small sample of UTF-8 locales mostly useful in
(define-public glibc-utf8-locales
(make-glibc-utf8-locales glibc))
-(define-public glibc-locales-2.27
- (package (inherit (make-glibc-locales glibc-2.27))
- (name "glibc-locales-2.27")))
+;; Packages provided to ease use of binaries linked against the previous libc.
+(define-public glibc-locales-2.28
+ (package (inherit (make-glibc-locales glibc-2.28))
+ (name "glibc-locales-2.28")))
+(define-public glibc-utf8-locales-2.28
+ (package (inherit (make-glibc-utf8-locales glibc-2.28))
+ (name "glibc-utf8-locales-2.28")))
+
+;; These should no longer be needed.
(define-public glibc-utf8-locales-2.27
- (package (inherit (make-glibc-utf8-locales glibc-2.27))
- (name "glibc-utf8-locales-2.27")))
+ (deprecated-package "glibc-utf8-locales-2.27" glibc-utf8-locales-2.28))
+(define-public glibc-locales-2.27
+ (deprecated-package "glibc-locales-2.27" glibc-locales-2.28))
(define-public which
(package
(define-public tzdata
(package
(name "tzdata")
- (version "2019a")
+ (version "2020a")
(source (origin
(method url-fetch)
(uri (string-append
- "https://www.iana.org/time-zones/repository/releases/tzdata"
+ "https://data.iana.org/time-zones/releases/tzdata"
version ".tar.gz"))
(sha256
(base32
- "0wlpqm4asvi0waaz24xj20iq40gqfypmb4nldjhkfgm09bgnsdlh"))))
+ "18lrp0zh8m931jjlrv8lvjas4ka5dfkzdbwnbw5lwd2dlbn62wal"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f
(inputs `(("tzcode" ,(origin
(method url-fetch)
(uri (string-append
- "http://www.iana.org/time-zones/repository/releases/tzcode"
+ "https://data.iana.org/time-zones/releases/tzcode"
version ".tar.gz"))
(sha256
(base32
- "1x9z8fpgnhzlsnps0hamb54ymaskjab7ys9m4i4gpk9hpiig2fc7"))))))
+ "0sfnlqw1p93r7klny69rwr94fh22mz632h52phgzfgg01q9gfakx"))))))
(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)
(hidden-package
(package
(inherit tzdata)
- (version "2018g")
+ (version "2019b")
(source (origin
- (method url-fetch)
- (uri (string-append
- "https://www.iana.org/time-zones/repository/releases/tzdata"
- version ".tar.gz"))
- (sha256
- (base32
- "05kayi3w9pvhj6ljx1hvwd0r8mxfzn436fjmwhx53xkj919xxpq2"))))
+ (method url-fetch)
+ (uri (string-append
+ "https://data.iana.org/time-zones/releases/tzdata"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0r0clnlslwm15m1c61dinf1fi9ffgl6aipng7i7yryfwj0n0kn85"))))
(inputs
- `(("tzcode" ,(origin
+ `(("tzcode" ,(origin
(method url-fetch)
(uri (string-append
- "http://www.iana.org/time-zones/repository/releases/tzcode"
+ "https://data.iana.org/time-zones/releases/tzcode"
version ".tar.gz"))
(sha256
(base32
- "09y44fzcdq3c06saa8iqqa0a59cyw6ni3p31ps0j1w3hcpxz8lxa")))))))))
+ "0vbmswvv3li25s31shyllq5v24449lxnrki9hr043nipjd09sirf")))))))))
(define-public libiconv
(package