diff options
375 files changed, 15377 insertions, 7397 deletions
diff --git a/Makefile.am b/Makefile.am index f4004e351e..6cd6e79cab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -175,6 +175,7 @@ MODULES = \ guix/build/git.scm \ guix/build/hg.scm \ guix/build/glib-or-gtk-build-system.scm \ + guix/build/gnu-bootstrap.scm \ guix/build/gnu-build-system.scm \ guix/build/gnu-dist.scm \ guix/build/guile-build-system.scm \ diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm index f86c79f0d0..e2495919d5 100644 --- a/build-aux/build-self.scm +++ b/build-aux/build-self.scm @@ -384,11 +384,11 @@ interface (FFI) of Guile.") #:key verbose? (version (date-version-string)) system (pull-version 0) - ;; For the standalone Guix, default to Guile 2.2. For old + ;; For the standalone Guix, default to Guile 3.0. For old ;; versions of 'guix pull' (pre-0.15.0), we have to use the ;; same Guile as the current one. (guile-version (if (> pull-version 0) - "2.2" + "3.0" (effective-version))) #:allow-other-keys diff --git a/doc/guix.texi b/doc/guix.texi index 2ed545847b..0cba0ee1ec 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -26510,7 +26510,7 @@ program. That gives a lot of flexibility. The program to run in that initrd. @deffn {Scheme Procedure} expression->initrd @var{exp} @ - [#:guile %guile-static-stripped] [#:name "guile-initrd"] + [#:guile %guile-3.0-static-stripped] [#:name "guile-initrd"] Return as a file-like object a Linux initrd (a gzipped cpio archive) containing @var{guile} and that evaluates @var{exp}, a G-expression, upon booting. All the derivations referenced by @var{exp} are diff --git a/etc/news.scm b/etc/news.scm index 10e01531a3..35e9a878cb 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -2,6 +2,7 @@ ;; ;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> +;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;; ;; Copying and distribution of this file, with or without modification, are ;; permitted in any medium without royalty provided the copyright notice and @@ -10,6 +11,73 @@ (channel-news (version 0) + (entry (commit "a33eac038a811603c8b9ed106ae405a5f80a0e9d") + (title (en "GNU C Library upgraded") + (de "GNU-C-Bibliothek aktualisiert") + (es "Actualización de la biblioteca C de GNU") + (fr "Mise à jour de la bibliothèque C de GNU") + (nl "GNU C-bibliotheek bijgewerkt")) + (body + (en "The GNU C Library (glibc) has been upgraded to version 2.31. To +run previously-installed programs linked against glibc 2.29, you need to +install locale data for version 2.29 in addition to locale data for 2.31: + +@example +guix install glibc-locales glibc-locales-2.29 +@end example + +On Guix System, you can adjust the @code{locale-libcs} field of your +@code{operating-system} form. Run @code{info \"(guix) Locales\"}, for more +info.") + (de "Die GNU-C-Bibliothek (glibc) wurde auf Version 2.31 +aktualisiert. Um zuvor installierte Programme, die an glibc 2.29 gebunden +worden sind, weiter benutzen zu können, müssen Sie Locale-Daten für Version +2.29 zusätzlich zu den Locale-Daten für 2.31 installieren: + +@example +guix install glibc-locales glibc-locales-2.29 +@end example + +Auf Guix System genügt es, das @code{locale-libcs}-Feld Ihrer +@code{operating-system}-Form anzupassen. Führen Sie @code{info \"(guix.de) +Locales\"} aus, um weitere Informationen dazu zu erhalten.") + (es "Se ha actualizado la biblioteca de C de GNU (glibc) a la versión +2.31. Para ejecutar programas instalados previamente que se encuentren +enlazados con glibc 2.29, es necesario que instale los datos de localización +de la versión 2.29 junto a los datos de localización de la versión 2.31: + +@example +guix install glibc-locales glibc-locales-2.29 +@end example + +En el sistema Guix, puede ajustar el campo @code{locale-libcs} de su +declaración @code{operating-system}. Ejecute @code{info \"(guix.es) +Localizaciones\"} para obtener más información.") + (fr "La bibliothèque C de GNU (glibc) a été mise à jour en version +2.31. Pour pouvoir lancer tes programmes déjà installés et liés à glibc 2.29, +tu dois installer les données pour la version 2.29 en plus des données de +régionalisation pour la version 2.31: + +@example +guix install glibc-locales glibc-locales-2.29 +@end example + +Sur le système Guix, tu peux ajuster le champ @code{locale-libcs} de ta forme +@code{operating-system}. Lance @code{info \"(guix.fr) Régionalisation\"} pour +plus de détails.") + (nl "De GNU C-bibliotheek (glibc) werd bijgewerkt naar versie 2.31. +Om gebruik te maken van reeds geïnstalleerde programma's die aan glibc 2.29 +gebonden zijn, moet u de regionale informatie van versie 2.29 naast die van +versie 2.31 installeren: + +@example +guix install glibc-locales glibc-locales-2.29 +@end example + +Op Guix System kunt u het @code{locale-libcs}-veld van uw +@code{operating-system}-vorm aanpassen. Voer @code{info \"(guix) Locales\"} +uit voor verdere uitleg."))) + (entry (commit "e1e6491226347d9fb93ff484d78cef98848a510a") (title (en "Guix Cookbook now available as Info") (de "Guix-Kochbuch jetzt als Info-Dokument verfügbar")) @@ -45,6 +113,15 @@ Ihre Beiträge werden gerne gesehen. Bitte @uref{https://guix.gnu.org/contact/, kontaktieren Sie die Entwickler}, um Ihre Rezepte mit uns zu teilen!"))) + (entry (commit "2ca7af43fe17d9acf082dce85d137a27a8ac4887") + (title (en "Further reduced binary seed bootstrap")) + (body + (en "The package graph on x86_64 and i686 is now rooted in a further +@dfn{reduced set of binary seeds}. The initial set of binaries from which +packages are built now weighs in at approximately 60 MiB, a quarter of what it +used to be. Run @code{info \"(guix) Bootstrapping\"} to learn more, or watch +the talk at @uref{https://fosdem.org/2020/schedule/event/gnumes/}."))) + (entry (commit "0468455e7d279c89ea3ad1b51935efb2b785ec47") (title (en "Rottlog service added to @code{%base-services}") (de "Rottlog-Dienst ist nun Teil der @code{%base-services}")) @@ -59,6 +136,14 @@ Systemdienst bereits in Ihrer Konfiguration für Guix System ausdrücklich genannt wurde, sollten Sie ihn jetzt daraus entfernen. Siehe den Abschnitt „Log-Rotation“ im Handbuch für weitere Informationen."))) + (entry (commit "b6bee63bed4f013064c0d902e7c8b83ed7514ade") + (title (en "@code{guile} package now refers to version 3.0")) + (body (en "The @code{guile} package has been upgraded to version 3.0 + (instead of 2.2). The @code{guile3.0-} packages have been renamed to their +original name, and @code{guile2.2-} variants of these packages have been +defined. Additionally, derivations are now all built with Guile 3.0, and +system services also run on 3.0."))) + (entry (commit "e3e1a7ba08af2d58c47264c543617e499c239444") (title (en "@command{guix pull} now supports SSH authenticated repositories") diff --git a/etc/release-manifest.scm b/etc/release-manifest.scm index c2904c5822..caa200c673 100644 --- a/etc/release-manifest.scm +++ b/etc/release-manifest.scm @@ -66,7 +66,7 @@ TARGET." ;; Packages that must be cross-buildable from x86_64-linux. ;; FIXME: Add (@ (gnu packages gcc) gcc) when <https://bugs.gnu.org/40463> ;; is fixed. - (append (list (@ (gnu packages guile) guile-2.2/fixed)) + (append (list (@ (gnu packages guile) guile-3.0/fixed)) (map specification->package '("coreutils" "grep" "sed" "findutils" "diffutils" "patch" "gawk" "gettext" "gzip" "xz" diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 190b717163..3f61b4a963 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2017 Leo Famulari <leo@famulari.name> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> -;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -54,6 +54,7 @@ grub-bootloader grub-efi-bootloader grub-mkrescue-bootloader + grub-minimal-bootloader grub-configuration)) @@ -457,6 +458,14 @@ fi~%")))) (configuration-file "/boot/grub/grub.cfg") (configuration-file-generator grub-configuration-file))) +(define grub-minimal-bootloader + (bootloader + (name 'grub) + (package grub-minimal) + (installer install-grub) + (configuration-file "/boot/grub/grub.cfg") + (configuration-file-generator grub-configuration-file))) + (define* grub-efi-bootloader (bootloader (inherit grub-bootloader) diff --git a/gnu/build/cross-toolchain.scm b/gnu/build/cross-toolchain.scm index 6bdbdd5411..9746be3e50 100644 --- a/gnu/build/cross-toolchain.scm +++ b/gnu/build/cross-toolchain.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> @@ -38,8 +38,11 @@ (define %gcc-include-paths ;; Environment variables for header search paths. - ;; Note: See <http://bugs.gnu.org/30756> for why not 'C_INCLUDE_PATH' & co. - '("CPATH")) + ;; Note: See <http://bugs.gnu.org/22186> for why not 'CPATH'. + '("C_INCLUDE_PATH" + "CPLUS_INCLUDE_PATH" + "OBJC_INCLUDE_PATH" + "OBJCPLUS_INCLUDE_PATH")) (define %gcc-cross-include-paths ;; Search path for target headers when cross-compiling. diff --git a/gnu/build/install.scm b/gnu/build/install.scm index b18654f1cc..87aa5d68da 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -76,6 +76,13 @@ the context of the caller. If the directive matches those defaults then, (('directory name uid gid mode) (loop `(directory ,name ,uid ,gid)) (chmod (string-append target name) mode)) + (('file name) + (call-with-output-file (string-append target name) + (const #t))) + (('file name (? string? content)) + (call-with-output-file (string-append target name) + (lambda (port) + (display content port)))) ((new '-> old) (let try () (catch 'system-error @@ -126,11 +133,14 @@ STORE." (directory "/home" 0 0))) -(define (populate-root-file-system system target) +(define* (populate-root-file-system system target + #:key (extras '())) "Make the essential non-store files and directories on TARGET. This -includes /etc, /var, /run, /bin/sh, etc., and all the symlinks to SYSTEM." +includes /etc, /var, /run, /bin/sh, etc., and all the symlinks to SYSTEM. +EXTRAS is a list of directives appended to the built-in directives to populate +TARGET." (for-each (cut evaluate-populate-directive <> target) - (directives (%store-directory))) + (append (directives (%store-directory)) extras)) ;; Add system generation 1. (let ((generation-1 (string-append target diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 05e833c0c6..c6f9df5f29 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net> ;;; @@ -40,6 +40,7 @@ find-long-option find-long-options make-essential-device-nodes + make-hurd-device-nodes make-static-device-nodes configure-qemu-networking @@ -223,7 +224,7 @@ one specific hardware device. These we have to create." (call-with-input-file devname-name read-static-device-nodes)))) -(define* (make-essential-device-nodes #:key (root "/")) +(define* (make-essential-device-nodes #:optional (root "/")) "Make essential device nodes under ROOT/dev." ;; The hand-made devtmpfs/udev! @@ -323,6 +324,36 @@ one specific hardware device. These we have to create." ;; File systems in user space (FUSE). (mknod (scope "dev/fuse") 'char-special #o666 (device-number 10 229))) +(define* (make-hurd-device-nodes #:optional (root "/")) + "Make some of the nodes needed on GNU/Hurd." + (define (scope dir) + (string-append root + (if (string-suffix? "/" root) + "" + "/") + dir)) + + (mkdir (scope "dev")) + (for-each (lambda (file) + (call-with-output-file (scope file) + (lambda (port) + (chmod port #o666)))) + '("dev/null" + "dev/zero" + "dev/full" + "dev/random" + "dev/urandom")) + ;; Don't create /dev/console, /dev/vcs, etc.: they are created by + ;; console-run on first boot. + + (mkdir (scope "servers")) + (mkdir (scope "servers/socket")) + ;; Don't create /servers/socket/1 & co: runsystem does that on first boot. + + ;; TODO: Set the 'gnu.translator' extended attribute for passive translator + ;; settings? + ) + (define %host-qemu-ipv4-address (inet-pton AF_INET "10.0.2.10")) diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 1a888b1a51..433b5a7e8d 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -34,6 +34,7 @@ #:use-module (guix records) #:use-module ((guix combinators) #:select (fold2)) #:use-module (ice-9 format) + #:use-module (ice-9 ftw) #:use-module (ice-9 match) #:use-module (ice-9 regex) #:use-module (ice-9 popen) @@ -234,6 +235,8 @@ deduplicates files common to CLOSURE and the rest of PREFIX." (device partition-device (default #f)) (size partition-size) (file-system partition-file-system (default "ext4")) + (file-system-options partition-file-system-options ;passed to 'mkfs.FS' + (default '())) (label partition-label (default #f)) (uuid partition-uuid (default #f)) (flags partition-flags (default '())) @@ -308,7 +311,7 @@ actual /dev name based on DEVICE." (define MS_BIND 4096) ; <sys/mounts.h> again! (define* (create-ext-file-system partition type - #:key label uuid) + #:key label uuid (options '())) "Create an ext-family file system of TYPE on PARTITION. If LABEL is true, use that as the volume name. If UUID is true, use it as the partition UUID." (format #t "creating ~a partition... ~@[label: ~s~] ~@[uuid: ~s~]\n" @@ -320,26 +323,29 @@ use that as the volume name. If UUID is true, use it as the partition UUID." '()) ,@(if uuid `("-U" ,(uuid->string uuid)) - '())))) + '()) + ,@options))) (define* (create-fat-file-system partition - #:key label uuid) + #:key label uuid (options '())) "Create a FAT file system on PARTITION. The number of File Allocation Tables will be determined based on file system size. If LABEL is true, use that as the volume name." ;; FIXME: UUID is ignored! (format #t "creating FAT partition...\n") (apply invoke "mkfs.fat" partition - (if label `("-n" ,label) '()))) + (append (if label `("-n" ,label) '()) options))) (define* (format-partition partition type - #:key label uuid) + #:key label uuid (options '())) "Create a file system TYPE on PARTITION. If LABEL is true, use that as the -volume name." +volume name. Options is a list of command-line options passed to 'mkfs.FS'." (cond ((string-prefix? "ext" type) - (create-ext-file-system partition type #:label label #:uuid uuid)) + (create-ext-file-system partition type #:label label #:uuid uuid + #:options options)) ((or (string-prefix? "fat" type) (string= "vfat" type)) - (create-fat-file-system partition #:label label #:uuid uuid)) + (create-fat-file-system partition #:label label #:uuid uuid + #:options options)) (else (error "Unsupported file system.")))) (define (initialize-partition partition) @@ -349,7 +355,8 @@ it, run its initializer, and unmount it." (format-partition (partition-device partition) (partition-file-system partition) #:label (partition-label partition) - #:uuid (partition-uuid partition)) + #:uuid (partition-uuid partition) + #:options (partition-file-system-options partition)) (mkdir-p target) (mount (partition-device partition) target (partition-file-system partition)) @@ -363,14 +370,20 @@ it, run its initializer, and unmount it." copy-closures? (register-closures? #t) system-directory - (deduplicate? #t)) + (deduplicate? #t) + (make-device-nodes + make-essential-device-nodes) + (extra-directives '())) "Return a procedure to initialize a root partition. If REGISTER-CLOSURES? is true, register all of CLOSURES in the partition's store. If DEDUPLICATE? is true, then also deduplicate files common to CLOSURES and the rest of the store when registering the closures. If COPY-CLOSURES? is true, copy all of CLOSURES to the partition. -SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." +SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation. + +EXTRA-DIRECTIVES is an optional list of directives to populate the root file +system that is passed to 'populate-root-file-system'." (lambda (target) (define target-store (string-append target (%store-directory))) @@ -381,7 +394,7 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." target)) ;; Populate /dev. - (make-essential-device-nodes #:root target) + (make-device-nodes target) ;; Optionally, register the inputs in the image's store. (when register-closures? @@ -403,12 +416,22 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation." ;; Add the non-store directories and files. (display "populating...\n") - (populate-root-file-system system-directory target) + (populate-root-file-system system-directory target + #:extras extra-directives) ;; 'register-closure' resets timestamps and everything, so no need to do it ;; once more in that case. (unless register-closures? - (reset-timestamps target)))) + ;; 'reset-timestamps' also resets file permissions; do that everywhere + ;; except on /dev so that /dev/null remains writable, etc. + (for-each (lambda (directory) + (reset-timestamps (string-append target "/" directory))) + (scandir target + (match-lambda + ((or "." ".." "dev") #f) + (_ #t)))) + (reset-timestamps (string-append target "/dev") + #:preserve-permissions? #t)))) (define (register-bootcfg-root target bootcfg) "On file system TARGET, register BOOTCFG as a GC root." diff --git a/gnu/ci.scm b/gnu/ci.scm index 0430cf594b..b61181be51 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -125,8 +125,12 @@ SYSTEM." %guile-bootstrap-tarball %bootstrap-tarballs)) -(define %packages-to-cross-build - %core-packages) +(define (packages-to-cross-build target) + "Return the list of packages to cross-build for TARGET." + ;; Don't cross-build the bootstrap tarballs for MinGW. + (if (string-contains target "mingw") + (drop-right %core-packages 6) + %core-packages)) (define %cross-targets '("mips64el-linux-gnu" @@ -177,7 +181,7 @@ SYSTEM." (map (lambda (package) (package-cross-job store (job-name package) package target system)) - %packages-to-cross-build)) + (packages-to-cross-build target))) (remove (either from-32-to-64? same? pointless?) %cross-targets))) diff --git a/gnu/installer.scm b/gnu/installer.scm index 0d55e0db56..79113cb0ef 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -313,18 +313,18 @@ selected keymap." (define set-installer-path ;; Add the specified binary to PATH for later use by the installer. #~(let* ((inputs - '#$(append (list bash ;start subshells - connman ;call connmanctl - cryptsetup - dosfstools ;mkfs.fat - e2fsprogs ;mkfs.ext4 - btrfs-progs ;mkfs.btrfs - jfsutils ;jfs_mkfs - kbd ;chvt - guix ;guix system init call - util-linux ;mkwap - shadow) - (map canonical-package (list coreutils))))) + '#$(list bash ;start subshells + connman ;call connmanctl + cryptsetup + dosfstools ;mkfs.fat + e2fsprogs ;mkfs.ext4 + btrfs-progs + jfsutils ;jfs_mkfs + kbd ;chvt + guix ;guix system init call + util-linux ;mkwap + shadow + coreutils))) (with-output-to-port (%make-void-port "w") (lambda () (set-path-environment-variable "PATH" '("bin" "sbin") inputs))))) diff --git a/gnu/local.mk b/gnu/local.mk index 39267f2765..722ccba746 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -11,10 +11,10 @@ # Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> # Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com> # Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> -# Copyright © 2016, 2017, 2018, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> +# Copyright © 2016, 2017, 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> # Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org> -# Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> +# Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com> # Copyright © 2017, 2018, 2019 Gábor Boskovits <boskovits@gmail.com> # Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net> # Copyright © 2018, 2019, 2020 Oleg Pykhalov <go.wigust@gmail.com> @@ -608,6 +608,7 @@ GNU_SYSTEM_MODULES = \ %D%/system.scm \ %D%/system/accounts.scm \ %D%/system/file-systems.scm \ + %D%/system/hurd.scm \ %D%/system/image.scm \ %D%/system/install.scm \ %D%/system/keyboard.scm \ @@ -735,7 +736,8 @@ dist_patch_DATA = \ %D%/packages/patches/aegis-test-fixup-1.patch \ %D%/packages/patches/aegis-test-fixup-2.patch \ %D%/packages/patches/aegisub-icu59-include-unistr.patch \ - %D%/packages/patches/aegisub-boost68.patch \ + %D%/packages/patches/aegisub-boost68.patch \ + %D%/packages/patches/aegisub-make43.patch \ %D%/packages/patches/agg-am_c_prototype.patch \ %D%/packages/patches/akonadi-paths.patch \ %D%/packages/patches/akonadi-not-relocatable.patch \ @@ -748,7 +750,6 @@ dist_patch_DATA = \ %D%/packages/patches/antlr3-3_3-fix-java8-compilation.patch \ %D%/packages/patches/apr-skip-getservbyname-test.patch \ %D%/packages/patches/aspell-default-dict-dir.patch \ - %D%/packages/patches/aspell-gcc-compat.patch \ %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ %D%/packages/patches/ath9k-htc-firmware-gcc.patch \ %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \ @@ -767,7 +768,6 @@ dist_patch_DATA = \ %D%/packages/patches/audiofile-hurd.patch \ %D%/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch \ %D%/packages/patches/automake-skip-amhello-tests.patch \ - %D%/packages/patches/avahi-CVE-2018-1000845.patch \ %D%/packages/patches/avahi-localstatedir.patch \ %D%/packages/patches/avogadro-boost148.patch \ %D%/packages/patches/avogadro-eigen3-update.patch \ @@ -777,10 +777,13 @@ dist_patch_DATA = \ %D%/packages/patches/azr3.patch \ %D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \ %D%/packages/patches/bash-completion-directories.patch \ + %D%/packages/patches/bash-linux-pgrp-pipe.patch \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ + %D%/packages/patches/bc-fix-cross-compilation.patch \ %D%/packages/patches/beancount-disable-googleapis-fonts.patch \ %D%/packages/patches/beets-werkzeug-compat.patch \ + %D%/packages/patches/behave-skip-a-couple-of-tests.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ %D%/packages/patches/benchmark-unbundle-googletest.patch \ %D%/packages/patches/biber-fix-encoding-write.patch \ @@ -817,6 +820,9 @@ dist_patch_DATA = \ %D%/packages/patches/clang-10.0-libc-search-path.patch \ %D%/packages/patches/clang-runtime-asan-build-fixes.patch \ %D%/packages/patches/clang-runtime-esan-build-fixes.patch \ + %D%/packages/patches/clang-runtime-9-libsanitizer-mode-field.patch \ + %D%/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch \ + %D%/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch \ %D%/packages/patches/classpath-aarch64-support.patch \ %D%/packages/patches/clementine-fix-sqlite.patch \ %D%/packages/patches/clementine-remove-crypto++-dependency.patch \ @@ -829,19 +835,24 @@ dist_patch_DATA = \ %D%/packages/patches/combinatorial-blas-awpm.patch \ %D%/packages/patches/combinatorial-blas-io-fix.patch \ %D%/packages/patches/containerd-test-with-go1.13.patch \ + %D%/packages/patches/coreutils-ls.patch \ %D%/packages/patches/cpufrequtils-fix-aclocal.patch \ %D%/packages/patches/crawl-upgrade-saves.patch \ %D%/packages/patches/crda-optional-gcrypt.patch \ %D%/packages/patches/clucene-contribs-lib.patch \ %D%/packages/patches/cube-nocheck.patch \ + %D%/packages/patches/curl-use-ssl-cert-env.patch \ %D%/packages/patches/cursynth-wave-rand.patch \ %D%/packages/patches/cvs-CVE-2017-12836.patch \ + %D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch \ %D%/packages/patches/date-output-pkg-config-files.patch \ %D%/packages/patches/darkice-workaround-fpermissive-error.patch \ + %D%/packages/patches/datefudge-gettimeofday.patch \ %D%/packages/patches/dbacl-include-locale.h.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ %D%/packages/patches/dbus-c++-gcc-compat.patch \ %D%/packages/patches/dbus-c++-threading-mutex.patch \ + %D%/packages/patches/dconf-meson-0.52.patch \ %D%/packages/patches/debops-constants-for-external-program-names.patch \ %D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \ %D%/packages/patches/deja-dup-use-ref-keyword-for-iter.patch \ @@ -856,6 +867,7 @@ dist_patch_DATA = \ %D%/packages/patches/docker-fix-tests.patch \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ %D%/packages/patches/doxygen-test.patch \ + %D%/packages/patches/doxygen-1.8.17-runtests.patch \ %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ %D%/packages/patches/dstat-skip-devices-without-io.patch \ %D%/packages/patches/dune-istl-2.7-fix-non-mpi-tests.patch \ @@ -898,19 +910,17 @@ dist_patch_DATA = \ %D%/packages/patches/fasthenry-spFactor.patch \ %D%/packages/patches/fbreader-curl-7.62.patch \ %D%/packages/patches/ffmpeg-prefer-dav1d.patch \ + %D%/packages/patches/fifengine-swig-compat.patch \ %D%/packages/patches/fifo-map-fix-flags-for-gcc.patch \ %D%/packages/patches/fifo-map-remove-catch.hpp.patch \ - %D%/packages/patches/file-CVE-2018-10360.patch \ - %D%/packages/patches/findutils-gnulib-libio.patch \ %D%/packages/patches/findutils-localstatedir.patch \ - %D%/packages/patches/findutils-makedev.patch \ - %D%/packages/patches/findutils-test-xargs.patch \ + %D%/packages/patches/findutils-test-rwlock-threads.patch \ %D%/packages/patches/flann-cmake-3.11.patch \ %D%/packages/patches/flint-ldconfig.patch \ %D%/packages/patches/foobillard++-pkg-config.patch \ %D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \ %D%/packages/patches/foomatic-filters-CVE-2015-8560.patch \ - %D%/packages/patches/fribidi-CVE-2019-18397.patch \ + %D%/packages/patches/fontconfig-hurd-path-max.patch \ %D%/packages/patches/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ %D%/packages/patches/gawk-shell.patch \ @@ -918,18 +928,22 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-arm-link-spec-fix.patch \ %D%/packages/patches/gcc-asan-missing-include.patch \ %D%/packages/patches/gcc-boot-2.95.3.patch \ - %D%/packages/patches/gcc-boot-4.7.4.patch \ + %D%/packages/patches/gcc-boot-4.6.4.patch \ %D%/packages/patches/gcc-cross-environment-variables.patch \ %D%/packages/patches/gcc-fix-texi2pod.patch \ %D%/packages/patches/gcc-4.8-libsanitizer-fix.patch \ %D%/packages/patches/gcc-4.9-libsanitizer-fix.patch \ %D%/packages/patches/gcc-4.9-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-libsanitizer-ustat.patch \ + %D%/packages/patches/gcc-4.9-libsanitizer-mode-size.patch \ + %D%/packages/patches/gcc-6-libsanitizer-mode-size.patch \ + %D%/packages/patches/gcc-7-libsanitizer-mode-size.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ %D%/packages/patches/gcc-strmov-store-file-names.patch \ %D%/packages/patches/gcc-4-compile-with-gcc-5.patch \ %D%/packages/patches/gcc-4.6-gnu-inline.patch \ %D%/packages/patches/gcc-4.9.3-mingw-gthr-default.patch \ + %D%/packages/patches/gcc-5-hurd.patch \ %D%/packages/patches/gcc-5.0-libvtv-runpath.patch \ %D%/packages/patches/gcc-5-source-date-epoch-1.patch \ %D%/packages/patches/gcc-5-source-date-epoch-2.patch \ @@ -939,21 +953,18 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-6-source-date-epoch-2.patch \ %D%/packages/patches/gcc-7-cross-mingw.patch \ %D%/packages/patches/gcc-7-cross-environment-variables.patch \ + %D%/packages/patches/gcc-7-cross-toolexeclibdir.patch \ %D%/packages/patches/gcc-8-cross-environment-variables.patch \ %D%/packages/patches/gcc-8-strmov-store-file-names.patch \ %D%/packages/patches/gcc-9-asan-fix-limits-include.patch \ %D%/packages/patches/gcc-9-strmov-store-file-names.patch \ - %D%/packages/patches/gd-CVE-2018-5711.patch \ - %D%/packages/patches/gd-CVE-2018-1000222.patch \ - %D%/packages/patches/gd-CVE-2019-6977.patch \ - %D%/packages/patches/gd-CVE-2019-6978.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ - %D%/packages/patches/gd-freetype-test-failure.patch \ + %D%/packages/patches/gd-brect-bounds.patch \ %D%/packages/patches/gdm-default-session.patch \ %D%/packages/patches/geoclue-config.patch \ - %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ - %D%/packages/patches/ghc-diff-swap-cover-args.patch \ - %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ + %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ + %D%/packages/patches/ghc-testsuite-dlopen-pie.patch \ + %D%/packages/patches/ghc-diff-swap-cover-args.patch \ %D%/packages/patches/ghc-haddock-api-fix-haddock.patch \ %D%/packages/patches/ghc-hpack-fix-tests.patch \ %D%/packages/patches/ghc-microlens-aeson-fix-tests.patch \ @@ -963,7 +974,6 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ - %D%/packages/patches/giflib-make-reallocarray-private.patch \ %D%/packages/patches/glib-tests-timer.patch \ %D%/packages/patches/glibc-CVE-2015-5180.patch \ %D%/packages/patches/glibc-CVE-2015-7547.patch \ @@ -977,13 +987,19 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-CVE-2018-11237.patch \ %D%/packages/patches/glibc-CVE-2019-7309.patch \ %D%/packages/patches/glibc-CVE-2019-9169.patch \ + %D%/packages/patches/glibc-CVE-2019-19126.patch \ %D%/packages/patches/glibc-allow-kernel-2.6.32.patch \ %D%/packages/patches/glibc-boot-2.16.0.patch \ %D%/packages/patches/glibc-boot-2.2.5.patch \ %D%/packages/patches/glibc-bootstrap-system-2.16.0.patch \ %D%/packages/patches/glibc-bootstrap-system.patch \ %D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \ + %D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch \ + %D%/packages/patches/glibc-hurd-clock_t_centiseconds.patch \ + %D%/packages/patches/glibc-hurd-gettyent.patch \ + %D%/packages/patches/glibc-hurd-mach-print.patch \ %D%/packages/patches/glibc-hurd-magic-pid.patch \ + %D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch \ %D%/packages/patches/glibc-ldd-x86_64.patch \ %D%/packages/patches/glibc-locales.patch \ %D%/packages/patches/glibc-locales-2.28.patch \ @@ -996,15 +1012,18 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-2.29-git-updates.patch \ %D%/packages/patches/glibc-2.27-supported-locales.patch \ %D%/packages/patches/glibc-2.28-supported-locales.patch \ + %D%/packages/patches/glibc-2.29-supported-locales.patch \ %D%/packages/patches/glibc-supported-locales.patch \ %D%/packages/patches/glm-restore-install-target.patch \ %D%/packages/patches/gmp-arm-asm-nothumb.patch \ %D%/packages/patches/gmp-faulty-test.patch \ %D%/packages/patches/gnome-shell-theme.patch \ + %D%/packages/patches/gnome-shell-disable-test.patch \ %D%/packages/patches/gnome-todo-delete-esource-duplicate.patch \ %D%/packages/patches/gnome-tweaks-search-paths.patch \ %D%/packages/patches/gnupg-default-pinentry.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ + %D%/packages/patches/gnutls-cross.patch \ %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \ %D%/packages/patches/gobject-introspection-cc.patch \ %D%/packages/patches/gobject-introspection-girepository.patch \ @@ -1018,18 +1037,21 @@ dist_patch_DATA = \ %D%/packages/patches/gromacs-tinyxml2.patch \ %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \ %D%/packages/patches/grub-efi-fat-serial-number.patch \ - %D%/packages/patches/gsl-test-i686.patch \ + %D%/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch \ %D%/packages/patches/gspell-dash-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ - %D%/packages/patches/guile-2.2-default-utf8.patch \ %D%/packages/patches/guile-2.2-skip-oom-test.patch \ %D%/packages/patches/guile-default-utf8.patch \ - %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ + %D%/packages/patches/guile-2.2-default-utf8.patch \ + %D%/packages/patches/guile-relocatable.patch \ + %D%/packages/patches/guile-3.0-relocatable.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ + %D%/packages/patches/guile-3.0-linux-syscalls.patch \ + %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ %D%/packages/patches/guile-present-coding.patch \ - %D%/packages/patches/guile-relocatable.patch \ %D%/packages/patches/guile-rsvg-pkgconfig.patch \ %D%/packages/patches/guile-emacs-fix-configure.patch \ + %D%/packages/patches/guile-sqlite3-fix-cross-compilation.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \ %D%/packages/patches/gtk2-theme-paths.patch \ @@ -1055,7 +1077,7 @@ dist_patch_DATA = \ %D%/packages/patches/hdf-eos5-fix-szip.patch \ %D%/packages/patches/hdf-eos5-fortrantests.patch \ %D%/packages/patches/hubbub-sort-entities.patch \ - %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \ + %D%/packages/patches/hurd-cross.patch \ %D%/packages/patches/hplip-remove-imageprocessor.patch \ %D%/packages/patches/hydra-disable-darcs-test.patch \ %D%/packages/patches/icecat-makeicecat.patch \ @@ -1070,6 +1092,7 @@ dist_patch_DATA = \ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/ilmbase-openexr-pkg-config.patch \ + %D%/packages/patches/inetutils-hurd.patch \ %D%/packages/patches/inkscape-poppler-0.76.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \ @@ -1085,7 +1108,6 @@ dist_patch_DATA = \ %D%/packages/patches/java-xerces-bootclasspath.patch \ %D%/packages/patches/java-xerces-build_dont_unzip.patch \ %D%/packages/patches/java-xerces-xjavac_taskdef.patch \ - %D%/packages/patches/jbig2dec-ignore-testtest.patch \ %D%/packages/patches/jfsutils-add-sysmacros.patch \ %D%/packages/patches/jfsutils-include-systypes.patch \ %D%/packages/patches/jsoncpp-fix-inverted-case.patch \ @@ -1131,6 +1153,7 @@ dist_patch_DATA = \ %D%/packages/patches/ldc-bootstrap-disable-tests.patch \ %D%/packages/patches/ldc-disable-phobos-tests.patch \ %D%/packages/patches/leela-zero-gtest.patch \ + %D%/packages/patches/less-hurd-path-max.patch \ %D%/packages/patches/liba52-enable-pic.patch \ %D%/packages/patches/liba52-link-with-libm.patch \ %D%/packages/patches/liba52-set-soname.patch \ @@ -1148,9 +1171,6 @@ dist_patch_DATA = \ %D%/packages/patches/libgit2-mtime-0.patch \ %D%/packages/patches/libgnome-encoding.patch \ %D%/packages/patches/libgnomeui-utf8.patch \ - %D%/packages/patches/libgpg-error-gawk-compat.patch \ - %D%/packages/patches/libffi-3.2.1-complex-alpha.patch \ - %D%/packages/patches/libjpeg-turbo-CVE-2019-2201.patch \ %D%/packages/patches/libjxr-fix-function-signature.patch \ %D%/packages/patches/libjxr-fix-typos.patch \ %D%/packages/patches/libotr-test-auth-fix.patch \ @@ -1166,6 +1186,7 @@ dist_patch_DATA = \ %D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch \ %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \ %D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch \ + %D%/packages/patches/libreoffice-poppler-compat.patch \ %D%/packages/patches/libsndfile-armhf-type-checks.patch \ %D%/packages/patches/libsndfile-CVE-2017-8361-8363-8365.patch \ %D%/packages/patches/libsndfile-CVE-2017-8362.patch \ @@ -1174,6 +1195,8 @@ dist_patch_DATA = \ %D%/packages/patches/libtgvoip-disable-sse2.patch \ %D%/packages/patches/libtgvoip-disable-webrtc.patch \ %D%/packages/patches/libtheora-config-guess.patch \ + %D%/packages/patches/libtirpc-hurd.patch \ + %D%/packages/patches/libtirpc-hurd-client.patch \ %D%/packages/patches/libtommath-fix-linkage.patch \ %D%/packages/patches/libtool-skip-tests2.patch \ %D%/packages/patches/libusb-0.1-disable-tests.patch \ @@ -1192,6 +1215,7 @@ dist_patch_DATA = \ %D%/packages/patches/lierolibre-remove-arch-warning.patch \ %D%/packages/patches/lierolibre-try-building-other-arch.patch \ %D%/packages/patches/linkchecker-tests-require-network.patch \ + %D%/packages/patches/linphoneqt-tabbutton.patch \ %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/lirc-localstatedir.patch \ @@ -1210,7 +1234,6 @@ dist_patch_DATA = \ %D%/packages/patches/luminance-hdr-qt-printer.patch \ %D%/packages/patches/lvm2-static-link.patch \ %D%/packages/patches/lxsession-use-gapplication.patch \ - %D%/packages/patches/make-glibc-compat.patch \ %D%/packages/patches/make-impure-dirs.patch \ %D%/packages/patches/mariadb-client-test-32bit.patch \ %D%/packages/patches/mars-install.patch \ @@ -1233,6 +1256,8 @@ dist_patch_DATA = \ %D%/packages/patches/mingw-w64-reproducible-gendef.patch \ %D%/packages/patches/minisat-friend-declaration.patch \ %D%/packages/patches/minisat-install.patch \ + %D%/packages/patches/mit-krb5-hurd.patch \ + %D%/packages/patches/mit-krb5-qualify-short-hostnames.patch \ %D%/packages/patches/mpc123-initialize-ao.patch \ %D%/packages/patches/module-init-tools-moduledir.patch \ %D%/packages/patches/monero-use-system-miniupnpc.patch \ @@ -1293,6 +1318,7 @@ dist_patch_DATA = \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openocd-nrf52.patch \ + %D%/packages/patches/openssh-hurd.patch \ %D%/packages/patches/openssl-runpath.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ %D%/packages/patches/openssl-c-rehash-in.patch \ @@ -1307,6 +1333,8 @@ dist_patch_DATA = \ %D%/packages/patches/p7zip-remove-unused-code.patch \ %D%/packages/patches/pam-krb5-CVE-2020-10595.patch \ %D%/packages/patches/pam-mount-luks2-support.patch \ + %D%/packages/patches/pango-skip-libthai-test.patch \ + %D%/packages/patches/pciutils-hurd-configure.patch \ %D%/packages/patches/sdl-pango-api_additions.patch \ %D%/packages/patches/sdl-pango-blit_overflow.patch \ %D%/packages/patches/sdl-pango-fillrect_crash.patch \ @@ -1316,6 +1344,7 @@ dist_patch_DATA = \ %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/perl-autosplit-default-time.patch \ + %D%/packages/patches/perl-cross.patch \ %D%/packages/patches/perl-deterministic-ordering.patch \ %D%/packages/patches/perl-finance-quote-unuse-mozilla-ca.patch \ %D%/packages/patches/perl-io-socket-ssl-openssl-1.0.2f-fix.patch \ @@ -1346,7 +1375,6 @@ dist_patch_DATA = \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ %D%/packages/patches/postgresql-disable-resolve_symlinks.patch \ - %D%/packages/patches/potrace-tests.patch \ %D%/packages/patches/procmail-ambiguous-getline-debian.patch \ %D%/packages/patches/procmail-CVE-2014-3618.patch \ %D%/packages/patches/procmail-CVE-2017-16844.patch \ @@ -1369,20 +1397,21 @@ dist_patch_DATA = \ %D%/packages/patches/python-2.7-search-paths.patch \ %D%/packages/patches/python-2.7-site-prefixes.patch \ %D%/packages/patches/python-2.7-source-date-epoch.patch \ + %D%/packages/patches/python-3-arm-alignment.patch \ %D%/packages/patches/python-3-deterministic-build-info.patch \ %D%/packages/patches/python-3-search-paths.patch \ %D%/packages/patches/python-3-fix-tests.patch \ - %D%/packages/patches/python-3.8-search-paths.patch \ %D%/packages/patches/python-3.8-fix-tests.patch \ %D%/packages/patches/python-CVE-2018-14647.patch \ %D%/packages/patches/python-aiohttp-3.6.2-no-warning-fail.patch \ %D%/packages/patches/python-alembic-exceptions-cause.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ - %D%/packages/patches/python-cffi-x87-stack-clean.patch \ + %D%/packages/patches/python-cross-compile.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-flask-restful-werkzeug-compat.patch \ + %D%/packages/patches/python-gst-fix-build-with-python-3.8.patch \ %D%/packages/patches/python-keras-integration-test.patch \ %D%/packages/patches/python-pep8-stdlib-tokenize-compat.patch \ %D%/packages/patches/python-pyfakefs-remove-bad-test.patch \ @@ -1395,6 +1424,7 @@ dist_patch_DATA = \ %D%/packages/patches/python2-parameterized-docstring-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ + %D%/packages/patches/python-pycrypto-time-clock.patch \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/python-robotframework-honor-source-date-epoch.patch \ @@ -1411,6 +1441,7 @@ dist_patch_DATA = \ %D%/packages/patches/qemu-fix-documentation-build-failure.patch \ %D%/packages/patches/qrcodegen-cpp-make-install.patch \ %D%/packages/patches/qt4-ldflags.patch \ + %D%/packages/patches/qtbase-moc-ignore-gcc-macro.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtbase-QTBUG-81715.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ @@ -1452,10 +1483,11 @@ dist_patch_DATA = \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-build-parallelism.patch \ %D%/packages/patches/scotch-integer-declarations.patch \ + %D%/packages/patches/screen-hurd-path-max.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ - %D%/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ + %D%/packages/patches/shadow-hurd-pctrl.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ %D%/packages/patches/slim-session.patch \ %D%/packages/patches/slim-config.patch \ @@ -1471,7 +1503,6 @@ dist_patch_DATA = \ %D%/packages/patches/superlu-dist-awpm-grid.patch \ %D%/packages/patches/superlu-dist-scotchmetis.patch \ %D%/packages/patches/supertux-unbundle-squirrel.patch \ - %D%/packages/patches/swig-guile-gc.patch \ %D%/packages/patches/swish-e-search.patch \ %D%/packages/patches/swish-e-format-security.patch \ %D%/packages/patches/symmetrica-bruch.patch \ @@ -1486,13 +1517,14 @@ dist_patch_DATA = \ %D%/packages/patches/tar-skip-unreliable-tests.patch \ %D%/packages/patches/tcc-boot-0.9.27.patch \ %D%/packages/patches/tclxml-3.2-install.patch \ + %D%/packages/patches/tcl-fix-cross-compilation.patch \ %D%/packages/patches/tcsh-fix-autotest.patch \ - %D%/packages/patches/tcsh-fix-out-of-bounds-read.patch \ %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/texinfo-5-perl-compat.patch \ - %D%/packages/patches/texlive-bin-CVE-2018-17407.patch \ - %D%/packages/patches/texlive-bin-luatex-poppler-compat.patch \ + %D%/packages/patches/texlive-bin-poppler-0.83.patch \ + %D%/packages/patches/texlive-bin-poppler-0.86.patch \ %D%/packages/patches/telegram-purple-adjust-test.patch \ + %D%/packages/patches/telepathy-glib-channel-memory-leak.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ %D%/packages/patches/thefuck-test-environ.patch \ @@ -1534,6 +1566,7 @@ dist_patch_DATA = \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ %D%/packages/patches/vboot-utils-skip-test-workbuf.patch \ + %D%/packages/patches/vigra-python-compat.patch \ %D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \ %D%/packages/patches/virglrenderer-CVE-2017-6386.patch \ @@ -1582,5 +1615,4 @@ dist_patch_DATA = \ %D%/packages/patches/zziplib-CVE-2018-16548.patch MISC_DISTRO_FILES = \ - %D%/packages/ld-wrapper.in \ - %D%/packages/ld-wrapper-next.in + %D%/packages/ld-wrapper.in diff --git a/gnu/packages/abiword.scm b/gnu/packages/abiword.scm index 2b65a02242..9cfd12a1e6 100644 --- a/gnu/packages/abiword.scm +++ b/gnu/packages/abiword.scm @@ -95,7 +95,7 @@ ("libchamplain" ,libchamplain) ("libglade" ,libglade) ("libgsf" ,libgsf) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("librsvg" ,librsvg) ("libxml2" ,libxml2) diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm index 0131adcac4..bcab125164 100644 --- a/gnu/packages/acl.scm +++ b/gnu/packages/acl.scm @@ -48,6 +48,7 @@ (arguments `(#:modules ((ice-9 ftw) ,@%gnu-build-system-modules) + #:configure-flags '("--disable-static") #:phases (modify-phases %standard-phases ;; XXX After repacking the sources the timestamps are reset to the diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 3222be2749..9afd88919c 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -29,8 +29,9 @@ ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net> -;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> ;;; @@ -91,6 +92,7 @@ #:use-module (gnu packages groff) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) + #:use-module (gnu packages hurd) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages inkscape) @@ -257,10 +259,10 @@ and provides a \"top-like\" mode (monitoring).") `(("pkg-config" ,pkg-config) ;; This is the Guile we use as a cross-compiler... - ("guile" ,guile-2.2.7))) + ("guile" ,guile-3.0))) (inputs ;; ... and this is the one that appears in shebangs when cross-compiling. - `(("guile" ,guile-2.2.7) ;for <https://bugs.gnu.org/37757> + `(("guile" ,guile-3.0) ;; The 'shepherd' command uses Readline when used interactively. It's ;; an unusual use case though, so we don't propagate it. @@ -274,15 +276,18 @@ interface and is based on GNU Guile.") (license license:gpl3+) (home-page "https://www.gnu.org/software/shepherd/"))) -(define-public guile3.0-shepherd +(define-public guile2.2-shepherd (package (inherit shepherd) - (name "guile3.0-shepherd") + (name "guile2.2-shepherd") (native-inputs `(("pkg-config" ,pkg-config) - ("guile" ,guile-next))) + ("guile" ,guile-2.2))) (inputs - `(("guile" ,guile-next))))) + `(("guile" ,guile-2.2))))) + +(define-public guile3.0-shepherd + (deprecated-package "guile3.0-shepherd" shepherd)) (define-public guile2.0-shepherd (package @@ -488,6 +493,7 @@ re-executing them as necessary.") (method url-fetch) (uri (string-append "mirror://gnu/inetutils/inetutils-" version ".tar.gz")) + (patches (search-patches "inetutils-hurd.patch")) (sha256 (base32 "05n65k4ixl85dc6rxc51b1b732gnmm8xnqi424dy9f1nz7ppb3xy")))) @@ -499,13 +505,27 @@ re-executing them as necessary.") ;; cross-compiling (by default it does not.) ,@(if (%current-target-system) '("--with-path-procnet-dev=/proc/net/dev") + '()) + ,@(if (hurd-target?) + '("--disable-rcp" + "--disable-rexec" + "--disable-rexecd" + "--disable-rlogin" + "--disable-rlogind" + "--disable-rsh" + "--disable-rshd" + "--disable-uucpd" + "--disable-whois") '())) ;; On some systems, 'libls.sh' may fail with an error such as: ;; "Failed to tell switch -a apart from -A". #:parallel-tests? #f)) (inputs `(("ncurses" ,ncurses) ("readline" ,readline))) ;for 'ftp' - (native-inputs `(("netstat" ,net-tools))) ;for tests + (native-inputs (if (member (%current-system) + (package-supported-systems net-tools)) + `(("netstat" ,net-tools)) ;for tests + '())) (home-page "https://www.gnu.org/software/inetutils/") (synopsis "Basic networking utilities") (description @@ -523,6 +543,7 @@ hostname.") (uri (string-append "https://github.com/shadow-maint/shadow/releases/" "download/" version "/shadow-" version ".tar.xz")) + (patches (search-patches "shadow-hurd-pctrl.patch")) (sha256 (base32 "0qmfq50sdhz6xilgxvinblll8j2iqfl7hwk45bq744y4plq4dbd3")))) @@ -556,11 +577,7 @@ hostname.") (for-each delete-file (find-files man "^groups\\.")) #t)))))) - (inputs (if (string-contains (or (%current-target-system) - (%current-system)) - "-linux") - `(("linux-pam" ,linux-pam)) - '())) + (inputs `(("linux-pam" ,linux-pam))) (home-page "https://github.com/shadow-maint/shadow") (synopsis "Authentication-related tools such as passwd, su, and login") (description @@ -587,13 +604,17 @@ login, passwd, su, groupadd, and useradd.") `(#:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key inputs outputs target #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (man8 (string-append out "/share/man/man8")) (sbin (string-append out "/sbin")) (shadow (assoc-ref inputs "shadow")) (login (string-append shadow "/bin/login"))) (substitute* "Makefile" + ,@(if (%current-target-system) + '((("CC=.*$") + (string-append "CC=" target "-gcc\n"))) + '()) (("^SBINDIR.*") (string-append "SBINDIR = " out "/sbin\n")) @@ -944,8 +965,9 @@ connection alive.") ("file" ,file))) (inputs `(("inetutils" ,inetutils) - ("net-tools" ,net-tools) - ("iproute" ,iproute) + ,@(if (hurd-target?) '() + `(("net-tools" ,net-tools) + ("iproute" ,iproute))) ;; isc-dhcp bundles a copy of BIND, which has proved vulnerable ;; in the past. Use a BIND-VERSION of our choosing instead. @@ -1767,12 +1789,12 @@ characters can be replaced as well, as can UTF-8 characters.") (build-system gnu-build-system) (inputs `(("ntfs-3g" ,ntfs-3g) - ("util-linux" ,util-linux) + ("util-linux" ,util-linux "lib") ("openssl" ,openssl) ;; FIXME: add reiserfs. ("zlib" ,zlib) ("e2fsprogs" ,e2fsprogs) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("ncurses" ,ncurses))) (home-page "https://www.cgsecurity.org/wiki/TestDisk") (synopsis "Data recovery tool") @@ -2897,14 +2919,7 @@ buffers.") (base32 "1gpdjs5aj6vsnzwcjvw5bb120lgffvvshi4202phr0bzw3b92ky8")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; many of the tests try to load kernel modules - #:phases - (modify-phases %standard-phases - (replace 'bootstrap - (lambda _ - ;; Don't run configure in this phase. - (setenv "NOCONFIGURE" "1") - (invoke "sh" "autogen.sh")))))) + `(#:tests? #f)) ; many of the tests try to load kernel modules (inputs `(("cairo" ,cairo) ("elfutils" ,elfutils) ; libdw @@ -3643,6 +3658,7 @@ tcpdump and snoop.") ("lvm2" ,lvm2) ("openssl" ,openssl) ("pcre" ,pcre) + ("libmount" ,util-linux "lib") ("util-linux" ,util-linux))) (arguments `(#:configure-flags diff --git a/gnu/packages/adns.scm b/gnu/packages/adns.scm index 541612d41a..5d8c6fdc91 100644 --- a/gnu/packages/adns.scm +++ b/gnu/packages/adns.scm @@ -62,7 +62,7 @@ scripts.") (define-public c-ares (package (name "c-ares") - (version "1.15.0") + (version "1.16.0") (source (origin (method url-fetch) (uri (string-append @@ -70,7 +70,7 @@ scripts.") ".tar.gz")) (sha256 (base32 - "0lk8knip4xk6qzksdkn7085mmgm4ixfczdyyjw656c193y3rgnvc")))) + "129sm0wzij0mp8vdv68v18hnykcjb6ivi66wnqnnw598q7bql1fy")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index d4f66d2ffd..4df2e96ecd 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> @@ -407,7 +408,7 @@ precision.") ("gsl" ,gsl) ("lapack" ,lapack) ("libao" ,ao) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libsamplerate" ,libsamplerate) ("libx11" ,libx11) @@ -690,15 +691,23 @@ binary.") (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz")) (sha256 (base32 - "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2")))) + "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2")) + (patches (search-patches "bc-fix-cross-compilation.patch")))) (build-system gnu-build-system) (native-inputs - `(("ed" ,ed) + `(("automake" ,automake) + ("autoconf" ,autoconf) + ("ed" ,ed) ("flex" ,flex) ("texinfo" ,texinfo))) (arguments '(#:configure-flags - (list "--with-readline"))) + (list "--with-readline") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'autogen + (lambda _ + (invoke "autoreconf" "-vif")))))) (home-page "https://www.gnu.org/software/bc/") (synopsis "Arbitrary precision numeric processing language") (description @@ -1240,15 +1249,6 @@ objects.") ("libtool" ,libtool))) (propagated-inputs `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'bootstrap 'setenv - ;; Prevent the autogen.sh script to carry out the configure - ;; script, which has not yet been patched to replace /bin/sh. - (lambda _ - (setenv "NOCONFIGURE" "yes") - #t))))) (synopsis "Algebraic computations with exact rings and fields") (description "Givaro is a C++ library implementing the basic arithmetic of various @@ -1287,15 +1287,7 @@ compound objects, such as vectors, matrices and univariate polynomials.") `(#:configure-flags (list (string-append "--with-blas-libs=" (assoc-ref %build-inputs "openblas") - "/lib/libopenblas.so")) - #:phases - (modify-phases %standard-phases - (add-before 'bootstrap 'setenv - ;; Prevent the autogen.sh script to carry out the configure - ;; script, which has not yet been patched to replace /bin/sh. - (lambda _ - (setenv "NOCONFIGURE" "yes") - #t))))) + "/lib/libopenblas.so")))) (synopsis "C++ library for linear algebra over finite fields") (description "FFLAS-FFPACK is a C++ template library for basic linear algebra @@ -1331,15 +1323,6 @@ algebra, such as the row echelon form.") ("pkg-config" ,pkg-config))) (inputs `(("fflas-ffpack" ,fflas-ffpack))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'bootstrap 'setenv - ;; Prevent the autogen.sh script to carry out the configure - ;; script, which has not yet been patched to replace /bin/sh. - (lambda _ - (setenv "NOCONFIGURE" "yes") - #t))))) (synopsis "C++ library for linear algebra over exact rings") (description "LinBox is a C++ template library for exact linear algebra computation diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index 17f5f41fcb..9ee7d28687 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Stefan Handschuh <handschuh.stefan@googlemail.com> ;;; Copyright © 2015 Kai-Chung Yan <seamlikok@gmail.com> -;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com> @@ -611,9 +611,20 @@ file system.") #:make-flags '("CXXFLAGS=-std=gnu++11 -Wno-error") #:phases (modify-phases %standard-phases + (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + ;; Hide the default GCC from CPLUS_INCLUDE_PATH to prevent it from + ;; shadowing the version of GCC provided in native-inputs. + (let ((gcc (assoc-ref inputs "gcc"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + #t))) (add-after 'unpack 'enter-source (lambda _ (chdir "libutils") #t)) - (add-after 'install 'install-headers (lambda* (#:key inputs outputs #:allow-other-keys) (copy-recursively "../include/utils" (string-append (assoc-ref outputs "out") "/include/utils"))))))) @@ -623,7 +634,7 @@ file system.") (native-inputs `(("android-bionic-uapi" ,android-bionic-uapi) ("android-liblog" ,android-liblog) - ("gcc" ,gcc-5))) ; XXX: fails to build with GCC 7 + ("gcc@5" ,gcc-5))) ; XXX: fails to build with GCC 7 (home-page "https://developer.android.com/") (synopsis "Android utility library") (description "@code{android-libutils} provides utilities for Android NDK developers.") @@ -840,7 +851,7 @@ script that you can put anywhere in your path.") (install-file "abootimg" bin) #t)))))) (inputs - `(("libblkid" ,util-linux))) + `(("libblkid" ,util-linux "lib"))) (home-page "https://ac100.grandou.net/abootimg") (synopsis "Tool for manipulating Android Boot Images") (description "This package provides a tool for manipulating old Android diff --git a/gnu/packages/animation.scm b/gnu/packages/animation.scm index 08bf4eb1de..0357ac1190 100644 --- a/gnu/packages/animation.scm +++ b/gnu/packages/animation.scm @@ -112,7 +112,7 @@ C++ @dfn{Standard Template Library} (STL).") `(("boost" ,boost) ("ffmpeg" ,ffmpeg) ("libdv" ,libdv) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libmng" ,libmng) ("zlib" ,zlib))) diff --git a/gnu/packages/arcan.scm b/gnu/packages/arcan.scm index db472efec5..e3f8b60aea 100644 --- a/gnu/packages/arcan.scm +++ b/gnu/packages/arcan.scm @@ -216,13 +216,7 @@ engine programmable using Lua.") (assoc-ref %build-inputs "xkbcomp") "/bin") ,(string-append "--with-xkb-output=" - "/tmp")) ; FIXME: Copied from xorg - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'noconfigure - (lambda _ - (setenv "NOCONFIGURE" "true") - #t))))) + "/tmp")))) ; FIXME: Copied from xorg (native-inputs `(("pkg-config" ,pkg-config) ("autoconf" ,autoconf) diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm index 689fe64ec1..7550736c40 100644 --- a/gnu/packages/aspell.scm +++ b/gnu/packages/aspell.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> ;;; Copyright © 2016 John Darrington <jmd@gnu.org> ;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il> @@ -40,7 +40,7 @@ (define-public aspell (package (name "aspell") - (version "0.60.6.1") + (version "0.60.8") (source (origin (method url-fetch) @@ -48,9 +48,8 @@ version ".tar.gz")) (sha256 (base32 - "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm")) - (patches (search-patches "aspell-default-dict-dir.patch" - "aspell-gcc-compat.patch")))) + "1wi60ankalmh8ds7nplz434jd7j94gdvbahdwsr539rlad8pxdzr")) + (patches (search-patches "aspell-default-dict-dir.patch")))) (build-system gnu-build-system) (arguments `(#:phases @@ -67,14 +66,6 @@ (("\"filter-path(.*)DICT_DIR" _ middle) (string-append "\"filter-path" middle "\"" libdir "\""))) - #t))) - (add-after 'install 'wrap-aspell - (lambda* (#:key outputs #:allow-other-keys) - (let ((bin/aspell (string-append (assoc-ref outputs "out") - "/bin/aspell"))) - (wrap-program bin/aspell - '("ASPELL_CONF" "" = - ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}"))) #t)))))) (inputs `(("perl" ,perl))) diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index 28c010ad6a..7261c62978 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -140,7 +140,7 @@ header.") (inputs `(("cfitsio" ,cfitsio) ("gsl" ,gsl) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("wcslib" ,wcslib) ("zlib" ,zlib))) @@ -226,7 +226,7 @@ objects.") `(("glu" ,glu) ("glew" ,glew) ("libtheora" ,libtheora) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ;; maybe required? ("mesa" ,mesa) @@ -326,7 +326,7 @@ Mechanics, Astrometry and Astrodynamics library.") ("freetype" ,freetype) ("pango" ,pango) ("giflib" ,giflib) - ("libjpeg", libjpeg) + ("libjpeg", libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("netpbm" ,netpbm) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 02d58f552e..d0ec23973a 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -1630,7 +1630,7 @@ especially for creating reverb effects. It supports impulse responses with 1, ;; uuid.h is included in the JACK type headers ;; db.h is included in the libjack metadata headers (propagated-inputs - `(("libuuid" ,util-linux) + `(("libuuid" ,util-linux "lib") ("bdb" ,bdb))) (native-inputs `(("pkg-config" ,pkg-config))) @@ -2555,13 +2555,6 @@ tempo and pitch of an audio recording independently of one another.") (base32 "1k962ljpnwyjw9jjiky2372khhri1wqvrj5qsalfpys31xqzw31p")))) (build-system gnu-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'bootstrap 'noconfigure - (lambda _ - (setenv "NOCONFIGURE" "yes") - #t))))) (inputs `(("jack" ,jack-1) ("alsa-lib" ,alsa-lib))) diff --git a/gnu/packages/autogen.scm b/gnu/packages/autogen.scm index 034db2ee96..968337ad8d 100644 --- a/gnu/packages/autogen.scm +++ b/gnu/packages/autogen.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -51,6 +52,10 @@ ;; “Something went wrong bootstrapping makefile fragments for ;; automatic dependency tracking. Try re-running configure with […]” (list "--disable-dependency-tracking") + + ;; XXX: Parallel tests may cause an indefinite hang with GNU Make 4.3. + #:parallel-tests? #f + #:phases (modify-phases %standard-phases (add-before 'patch-source-shebangs 'patch-test-scripts diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index f569b0e92a..657d4d3cb9 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -9,6 +9,8 @@ ;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,12 +56,43 @@ (base32 "113nlmidxy9kjr45kg9x3ngar4951mvag1js2a3j8nxcz34wxsv4")))) (build-system gnu-build-system) + (inputs + ;; TODO: remove `if' in the next rebuild cycle. + (if (%current-target-system) + `(("bash" ,bash-minimal) + ("perl" ,perl) + ("m4" ,m4)) + '())) (native-inputs `(("perl" ,perl) ("m4" ,m4))) - ;; XXX: testsuite: 209 and 279 failed. The latter is an impurity. It - ;; should use our own "cpp" instead of "/lib/cpp". - (arguments `(#:tests? #f)) + (arguments + `(;; XXX: testsuite: 209 and 279 failed. The latter is an impurity. It + ;; should use our own "cpp" instead of "/lib/cpp". + #:tests? #f + ,@(if (%current-target-system) + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'patch-non-shebang-references + (lambda* (#:key build inputs outputs #:allow-other-keys) + ;; `patch-shebangs' patches shebangs only, and the Perl + ;; scripts use a re-exec feature that references the + ;; build hosts' perl. Also, BASH and M4 store references + ;; hide in the scripts. + (let ((bash (assoc-ref inputs "bash")) + (m4 (assoc-ref inputs "m4")) + (perl (assoc-ref inputs "perl")) + (out (assoc-ref outputs "out")) + (store-directory (%store-directory))) + (substitute* (find-files (string-append out "/bin")) + (((string-append store-directory "/[^/]*-bash-[^/]*")) + bash) + (((string-append store-directory "/[^/]*-m4-[^/]*")) + m4) + (((string-append store-directory "/[^/]*-perl-[^/]*")) + perl)) + #t))))) + '()))) (home-page "https://www.gnu.org/software/autoconf/") (synopsis "Create source code configuration scripts") (description @@ -249,17 +282,24 @@ output is indexed in many ways to simplify browsing.") (define-public automake (package (name "automake") - (version "1.16.1") + (version "1.16.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/automake/automake-" version ".tar.xz")) (sha256 (base32 - "08g979ficj18i1w6w5219bgmns7czr03iadf20mk3lrzl8wbn1ax")) + "1l7dkqbsmbf94ax29jj1jf6a0r6ikc8jybg1p5m0c3ki7pg5ki6c")) (patches (search-patches "automake-skip-amhello-tests.patch")))) (build-system gnu-build-system) + (inputs + ;; TODO: remove `if' in the next rebuild cycle. + (if (%current-target-system) + `(("autoconf" ,autoconf-wrapper) + ("bash" ,bash-minimal) + ("perl" ,perl)) + '())) (native-inputs `(("autoconf" ,autoconf-wrapper) ("perl" ,perl))) @@ -268,7 +308,7 @@ output is indexed in many ways to simplify browsing.") (variable "ACLOCAL_PATH") (files '("share/aclocal"))))) (arguments - '(#:modules ((guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils) (srfi srfi-1) (srfi srfi-26) @@ -288,6 +328,37 @@ output is indexed in many ways to simplify browsing.") (setenv "CONFIG_SHELL" sh) #t))) + (add-before 'check 'skip-test + (lambda _ + ;; This test requires 'etags' and fails if it's missing. + ;; Skip it. + (substitute* "t/tags-lisp-space.sh" + (("^required.*" all) + (string-append "exit 77\n" all "\n"))) + #t)) + + ,@(if (%current-target-system) + `((add-after 'install 'patch-non-shebang-references + (lambda* (#:key build inputs outputs #:allow-other-keys) + ;; `patch-shebangs' patches shebangs only, and the Perl + ;; scripts use a re-exec feature that references the + ;; build hosts' perl. Also, AUTOCONF and BASH store + ;; references hide in the scripts. + (let ((autoconf (assoc-ref inputs "autoconf")) + (bash (assoc-ref inputs "bash")) + (perl (assoc-ref inputs "perl")) + (out (assoc-ref outputs "out")) + (store-directory (%store-directory))) + (substitute* (find-files (string-append out "/bin")) + (((string-append store-directory "/[^/]*-autoconf-[^/]*")) + autoconf) + (((string-append store-directory "/[^/]*-bash-[^/]*")) + bash) + (((string-append store-directory "/[^/]*-perl-[^/]*")) + perl)) + #t)))) + '()) + ;; Files like `install-sh', `mdate.sh', etc. must use ;; #!/bin/sh, otherwise users could leak erroneous shebangs ;; in the wild. See <http://bugs.gnu.org/14201> for an @@ -324,32 +395,6 @@ intuitive format and then Automake works with Autoconf to produce a robust Makefile, simplifying the entire process for the developer.") (license gpl2+))) ; some files are under GPLv3+ -(define-public automake-1.16.2 - (package - (inherit automake) - (version "1.16.2") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/automake/automake-" - version ".tar.xz")) - (sha256 - (base32 - "1l7dkqbsmbf94ax29jj1jf6a0r6ikc8jybg1p5m0c3ki7pg5ki6c")) - (patches - (search-patches "automake-skip-amhello-tests.patch")))) - (arguments - (substitute-keyword-arguments (package-arguments automake) - ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (add-before 'check 'skip-test - (lambda _ - ;; This test requires 'etags' and fails if it's missing. - ;; Skip it. - (substitute* "t/tags-lisp-space.sh" - (("^required.*" all) - (string-append "exit 77\n" all "\n"))) - #t)))))))) - (define-public libtool (package (name "libtool") @@ -379,21 +424,22 @@ Makefile, simplifying the entire process for the developer.") ;; XXX: There are test failures on mips64el-linux starting from 2.4.4: ;; <http://hydra.gnu.org/build/181662>. - #:tests? ,(not (string-prefix? "mips64" - (or (%current-target-system) + ;; Also, do not run tests when cross compiling + #:tests? ,(not (or (%current-target-system) + (string-prefix? "mips64" (%current-system)))) #:phases (modify-phases %standard-phases (add-before 'check 'pre-check - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs #:allow-other-keys) ;; Run the test suite in parallel, if possible. (setenv "TESTSUITEFLAGS" (string-append "-j" (number->string (parallel-job-count)))) ;; Patch references to /bin/sh. - (let ((bash (assoc-ref inputs "bash"))) + (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) (substitute* "tests/testsuite" (("/bin/sh") (string-append bash "/bin/sh"))) diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm index ba609cf12e..602f9d7997 100644 --- a/gnu/packages/avahi.scm +++ b/gnu/packages/avahi.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,17 +26,18 @@ #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages dbm) + #:use-module (gnu packages gettext) + #:use-module (gnu packages glib) #:use-module (gnu packages libdaemon) + #:use-module (gnu packages libevent) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages glib) #:use-module (gnu packages xml)) (define-public avahi (package (name "avahi") - (version "0.7") - (replacement avahi/fixed) + (version "0.8") (home-page "https://avahi.org") (source (origin (method url-fetch) @@ -43,29 +45,40 @@ version ".tar.gz")) (sha256 (base32 - "0128n7jlshw4bpx0vg8lwj8qwdisjxi7mvniwfafgnkzzrfrpaap")) - (patches (search-patches "avahi-localstatedir.patch")))) + "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6")) + (patches (search-patches "avahi-localstatedir.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fix version constraint in the avahi-libevent pkg-config file. + ;; This can be removed for Avahi versions > 0.8. + (substitute* "avahi-libevent.pc.in" + (("libevent-2\\.1\\.5") + "libevent >= 2.1.5")) + #t)))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--with-distro=none" + "--disable-static" "--localstatedir=/var" ; for the DBus socket "--disable-python" "--disable-mono" "--disable-doxygen-doc" "--disable-xmltoman" "--enable-tests" - "--disable-qt3" "--disable-qt4" + "--disable-qt4" "--disable-qt5" "--disable-gtk" "--disable-gtk3" "--enable-compat-libdns_sd"))) (inputs - `(("expat" ,expat) - ("glib" ,glib) - ("dbus" ,dbus) + `(("dbus" ,dbus) + ("expat" ,expat) ("gdbm" ,gdbm) + ("glib" ,glib) ("libcap" ,libcap) ;to enable chroot support in avahi-daemon - ("libdaemon" ,libdaemon))) + ("libdaemon" ,libdaemon) + ("libevent" ,libevent))) (native-inputs - `(("intltool" ,intltool) + `(("gettext" ,gettext-minimal) ("glib" ,glib "bin") ("pkg-config" ,pkg-config))) (synopsis "Implementation of mDNS/DNS-SD protocols") @@ -75,17 +88,6 @@ network. It is an implementation of the mDNS (for \"Multicast DNS\") and DNS-SD (for \"DNS-Based Service Discovery\") protocols.") (license lgpl2.1+))) -(define avahi/fixed - (package - (inherit avahi) - (source (origin - (inherit (package-source avahi)) - (patches - (append (search-patches "avahi-CVE-2018-1000845.patch") - (origin-patches (package-source avahi)))))) - ;; Hide a duplicate of the CVE fixed above. - (properties `((lint-hidden-cve . ("CVE-2017-6519")))))) - (define-public nss-mdns (package (name "nss-mdns") diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 00986a328d..6a5080bcf8 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; ;;; This file is part of GNU Guix. @@ -203,18 +204,18 @@ backups (called chunks) to allow easy burning to CD/DVD.") (define-public libarchive (package (name "libarchive") - (version "3.4.0") + (version "3.4.2") (source (origin (method url-fetch) (uri (list (string-append "https://libarchive.org/downloads/libarchive-" - version ".tar.gz") + version ".tar.xz") (string-append "https://github.com/libarchive/libarchive" "/releases/download/v" version "/libarchive-" - version ".tar.gz"))) + version ".tar.xz"))) (sha256 (base32 - "0pl25mmz1b1cnwf35kxmygyy9g7z7hslxbx329a9yx8csh7dahw6")))) + "18dd01ahs2hv74xm7axjc3yhq839p0x0s4vssvlmm8fknja09qfq")))) (build-system gnu-build-system) (inputs `(("bzip2" ,bzip2) @@ -234,24 +235,34 @@ backups (called chunks) to allow easy burning to CD/DVD.") (("/bin/pwd") (which "pwd"))) #t)) (replace 'check - (lambda _ - ;; XXX: The test_owner_parse, test_read_disk, and - ;; test_write_disk_lookup tests expect user 'root' to exist, but - ;; the chroot's /etc/passwd doesn't have it. Turn off those tests. - ;; - ;; XXX: Adjust test that fails with zstd 1.4.1 because the default - ;; options compresses two bytes better than this test expects. - ;; https://github.com/libarchive/libarchive/issues/1226 - (substitute* "libarchive/test/test_write_filter_zstd.c" - (("compression-level\", \"6\"") - "compression-level\", \"7\"")) + (lambda* (#:key (tests? #t) #:allow-other-keys) + (if tests? + ;; XXX: The test_owner_parse, test_read_disk, and + ;; test_write_disk_lookup tests expect user 'root' to + ;; exist, but the chroot's /etc/passwd doesn't have + ;; it. Turn off those tests. + ;; + ;; XXX: Adjust test that fails with zstd 1.4.1 + ;; because the default options compresses two bytes + ;; better than this test expects. + ;; https://github.com/libarchive/libarchive/issues/1226 + (begin + (substitute* "libarchive/test/test_write_filter_zstd.c" + (("compression-level\", \"6\"") + "compression-level\", \"7\"")) + + ;; The tests allow one to disable tests matching a globbing pattern. + (invoke "make" + "libarchive_test" + "bsdcpio_test" + "bsdtar_test") - ;; The tests allow one to disable tests matching a globbing pattern. - (invoke "make" "libarchive_test" "bsdcpio_test" "bsdtar_test") - ;; XXX: This glob disables too much. - (invoke "./libarchive_test" "^test_*_disk*") - (invoke "./bsdcpio_test" "^test_owner_parse") - (invoke "./bsdtar_test"))) + ;; XXX: This glob disables too much. + (invoke "./libarchive_test" "^test_*_disk*") + (invoke "./bsdcpio_test" "^test_owner_parse") + (invoke "./bsdtar_test")) + ;; Tests may be disabled if cross-compiling. + (format #t "Test suite not run.~%")))) (add-after 'install 'add--L-in-libarchive-pc (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 38e8d363eb..5ea129a9ae 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1,16 +1,16 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2019 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> -;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2016, 2018 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org> -;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> -;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> @@ -93,14 +93,14 @@ command-line arguments, multiple languages, and so on.") (define-public grep (package (name "grep") - (version "3.3") + (version "3.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grep/grep-" version ".tar.xz")) (sha256 (base32 - "055mqp6vrd0brkygmygb2673qwz409a7kyp1mzbfy6cn94f58q5r")) + "1yy33kiwrxrwj2nxa4fg15bvmwyghqbs8qwkdvy5phm784f7brjq")) (patches (search-patches "grep-timing-sensitive-test.patch")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl))) ;some of the tests require it @@ -134,14 +134,14 @@ including, for example, recursive directory searching.") (define-public sed (package (name "sed") - (version "4.7") + (version "4.8") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/sed/sed-" version - ".tar.xz")) + ".tar.gz")) (sha256 (base32 - "0smxcx66vx29djzb542nxcynl7qnzxqa5032ibazi7x2s267d198")))) + "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk")))) (build-system gnu-build-system) (synopsis "Stream editor") (native-inputs @@ -171,7 +171,22 @@ implementation offers several extensions over the standard utility.") (build-system gnu-build-system) ;; Note: test suite requires ~1GiB of disk space. (arguments - `(#:phases (modify-phases %standard-phases + `(,@(if (hurd-target?) + '(#:make-flags + (list (string-append + "TESTSUITEFLAGS= -k '" + "!sparse" + ",!renamed dirs in incrementals" + ",!--exclude-tag option in incremental pass" + ",!incremental dumps with -C" + ",!incremental dumps of nested directories" + ",!incremental restores with -C" + ",!concatenated incremental archives (renames)" + ",!renamed directory containing subdirectories" + ",!renamed subdirectories" + "'"))) + '()) + #: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. @@ -254,40 +269,29 @@ interactive means to merge two files.") (define-public findutils (package (name "findutils") - (version "4.6.0") + (version "4.7.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/findutils/findutils-" - version ".tar.gz")) + version ".tar.xz")) (sha256 (base32 - "178nn4dl7wbcw499czikirnkniwnx36argdnqgz4ik9i6zvwkm6y")) - (patches (search-patches - "findutils-gnulib-libio.patch" - "findutils-localstatedir.patch" - "findutils-makedev.patch" - "findutils-test-xargs.patch")) - (modules '((guix build utils))) - (snippet - '(begin - ;; The gnulib test-lock test is prone to writer starvation - ;; with our glibc@2.25, which prefers readers, so disable it. - ;; The gnulib commit b20e8afb0b2 should fix this once - ;; incorporated here. - (substitute* "tests/Makefile.in" - (("test-lock\\$\\(EXEEXT\\) ") "")) - #t)))) + "16kqz9yz98dasmj70jwf5py7jk558w96w0vgp3zf9xsqk3gzpzn5")) + (patches (search-patches "findutils-localstatedir.patch" + "findutils-test-rwlock-threads.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list ;; Tell 'updatedb' to write to /var. - "--localstatedir=/var" - - ;; Work around cross-compilation failure. See - ;; <http://savannah.gnu.org/bugs/?27299#comment1>. - ,@(if (%current-target-system) - '("gl_cv_func_wcwidth_works=yes") - '())))) + "--localstatedir=/var") + #:phases (modify-phases %standard-phases + (add-before 'check 'adjust-test-shebangs + (lambda _ + (substitute* '("tests/xargs/verbose-quote.sh" + "tests/find/exec-plus-last-file.sh") + (("#!/bin/sh") + (string-append "#!" (which "sh")))) + #t))))) (synopsis "Operating on files matching given criteria") (description "Findutils supplies the basic file directory searching utilities of the @@ -302,23 +306,26 @@ used to apply commands with arbitrarily long arguments.") (define-public coreutils (package (name "coreutils") - (version "8.31") + (version "8.32") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/coreutils/coreutils-" version ".tar.xz")) (sha256 (base32 - "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz")))) + "1yjcrh5hw70c0yn8zw55pd6j51dj90anpq8mmg649ps9g3gdhn24")) + (patches (search-patches "coreutils-ls.patch")))) (build-system gnu-build-system) (inputs `(("acl" ,acl) ; TODO: add SELinux ("gmp" ,gmp) ;bignums in 'expr', yay! - ;; Drop the dependency on libcap when cross-compiling since it's - ;; not quite cross-compilable. - ,@(if (%current-target-system) - '() - `(("libcap" ,libcap))))) ;capability support is 'ls', etc. + ;; Do not use libcap when cross-compiling since it's not quite + ;; cross-compilable; and use it only for supported systems. + ,@(if (and (not (%current-target-system)) + (member (%current-system) + (package-supported-systems libcap))) + `(("libcap" ,libcap)) ;capability support in 'ls', etc. + '()))) (native-inputs ;; Perl is needed to run tests in native builds, and to run the bundled ;; copy of help2man. However, don't pass it when cross-compiling since @@ -330,6 +337,23 @@ used to apply commands with arbitrarily long arguments.") (outputs '("out" "debug")) (arguments `(#:parallel-build? #f ; help2man may be called too early + ,@(if (hurd-target?) + '(#:make-flags ; these tests fail deterministically + (list (string-append "XFAIL_TESTS=tests/misc/env-S.pl" + " tests/misc/kill.sh" + " tests/misc/nice.sh" + " tests/misc/shred-passes.sh" + " tests/split/fail.sh" + " tests/split/l-chunk.sh" + " tests/dd/stats.sh" + " test-fdutimensat" + " test-futimens" + " test-linkat" + " test-renameat" + " test-renameatu" + " test-tls" + " test-utimensat"))) + '()) #:phases (modify-phases %standard-phases (add-before 'build 'patch-shell-references (lambda _ @@ -341,16 +365,6 @@ used to apply commands with arbitrarily long arguments.") (("/bin/sh") (which "sh"))) (substitute* (find-files "tests" "\\.sh$") (("#!/bin/sh") (string-append "#!" (which "sh")))) - #t)) - (add-before 'check 'disable-broken-test - (lambda _ - ;; This test hits the 127 character shebang limit in the build - ;; environment due to the way "env -S" splits arguments into - ;; shebangs. Note that "env-S-script.sh" works around this - ;; specific issue, but "env-S.pl" is not adjusted for build - ;; environments with long prefixes (/tmp/guix-build-...). - (substitute* "Makefile" - (("^.*tests/misc/env-S.pl.*$") "")) #t))))) (synopsis "Core GNU utilities (file, text, shell)") (description @@ -373,31 +387,31 @@ standard.") (define-public gnu-make (package (name "make") - (version "4.2.1") + (version "4.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/make/make-" version - ".tar.bz2")) + ".tar.gz")) (sha256 (base32 - "12f5zzyq2w56g95nni65hc0g5p7154033y2f3qmjvd016szn5qnn")) - (patches (search-patches "make-impure-dirs.patch" - "make-glibc-compat.patch")))) + "06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0")) + (patches (search-patches "make-impure-dirs.patch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) ; to detect Guile - (inputs `(("guile" ,guile-2.0))) + (inputs `(("guile" ,guile-3.0))) (outputs '("out" "debug")) (arguments - '(;; Work around faulty glob detection with glibc 2.27. See - ;; <https://lists.nongnu.org/archive/html/bug-make/2017-11/msg00027.html>. - #:configure-flags '("make_cv_sys_gnu_glob=yes") + `(,@(if (hurd-target?) + '(#:configure-flags '("CFLAGS=-D__alloca=alloca" + "ac_cv_func_posix_spawn=no")) + '()) #:phases (modify-phases %standard-phases (add-before 'build 'set-default-shell (lambda* (#:key inputs #:allow-other-keys) ;; Change the default shell from /bin/sh. (let ((bash (assoc-ref inputs "bash"))) - (substitute* "job.c" + (substitute* "src/job.c" (("default_shell =.*$") (format #f "default_shell = \"~a/bin/sh\";\n" bash))) @@ -413,17 +427,42 @@ change. GNU make offers many powerful extensions over the standard utility.") (license gpl3+) (home-page "https://www.gnu.org/software/make/"))) +(define-public gnu-make-4.2 + (package + (inherit gnu-make) + (version "4.2.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/make/make-" version + ".tar.bz2")) + (sha256 + (base32 + "12f5zzyq2w56g95nni65hc0g5p7154033y2f3qmjvd016szn5qnn")))) + (arguments + `(#:configure-flags '("CFLAGS=-D__alloca=alloca") + #:phases + (modify-phases %standard-phases + (add-before 'build 'set-default-shell + (lambda* (#:key inputs #:allow-other-keys) + ;; Change the default shell from /bin/sh. + (let ((bash (assoc-ref inputs "bash"))) + (substitute* "job.c" + (("default_shell =.*$") + (format #f "default_shell = \"~a/bin/sh\";\n" + bash))) + #t)))))))) + (define-public binutils (package (name "binutils") - (version "2.32") + (version "2.34") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/binutils/binutils-" version ".tar.bz2")) (sha256 (base32 - "0b8767nyal1bc4cyzg5h9iis8kpkln1i3wkamig75cifj1fb2f6y")) + "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49")) (patches (search-patches "binutils-loongson-workaround.patch")))) (build-system gnu-build-system) @@ -448,7 +487,17 @@ change. GNU make offers many powerful extensions over the standard utility.") ;; Make sure 'ar' and 'ranlib' produce archives in a ;; deterministic fashion. - "--enable-deterministic-archives"))) + "--enable-deterministic-archives") + + ;; XXX: binutils 2.34 was mistakenly released without generated manuals: + ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=25491>. To avoid a + ;; circular dependency on texinfo, prevent the build system from creating + ;; the manuals by calling "true" instead of "makeinfo"... + #:make-flags '("MAKEINFO=true"))) + + ;; ...and "hide" this package so that users who install binutils get the + ;; version with documentation defined below. + (properties '((hidden? . #t))) (synopsis "Binary utilities: bfd gas gprof ld") (description @@ -461,6 +510,37 @@ included.") (license gpl3+) (home-page "https://www.gnu.org/software/binutils/"))) +;; Work around a problem with binutils 2.34 whereby manuals are missing from +;; the release tarball. Remove this and the related code above when updating. +(define-public binutils+documentation + (package/inherit + binutils + (native-inputs + `(("texinfo" ,texinfo))) + (arguments + (substitute-keyword-arguments (package-arguments binutils) + ((#:make-flags _ ''()) ''()))) + (properties '()))) + +;; FIXME: ath9k-firmware-htc-binutils.patch do not apply on 2.34 because of a +;; big refactoring of xtensa-modules.c (commit 567607c11fbf7105 upstream). +;; Keep this version around until the patch is updated. +(define-public binutils-2.33 + (package/inherit + binutils + (version "2.33.1") + (source (origin + (inherit (package-source binutils)) + (uri (string-append "mirror://gnu/binutils/binutils-" + version ".tar.bz2")) + (sha256 + (base32 + "1cmd0riv37bqy9mwbg6n3523qgr8b3bbm5kwj19sjrasl4yq9d0c")))) + (arguments + (substitute-keyword-arguments (package-arguments binutils) + ((#:make-flags _ ''()) ''()))) + (properties '()))) + (define-public binutils-gold (package (inherit binutils) @@ -491,7 +571,7 @@ included.") (define* (make-ld-wrapper name #:key (target (const #f)) binutils - (guile (canonical-package guile-2.2)) + (guile (canonical-package guile-3.0)) (bash (canonical-package bash)) (guile-for-build guile)) "Return a package called NAME that contains a wrapper for the 'ld' program @@ -529,7 +609,9 @@ wrapper for the cross-linker for that target, called 'TARGET-ld'." '(string-append bin "/ld"))) (go (string-append ld ".go"))) - (setvbuf (current-output-port) _IOLBF) + (setvbuf (current-output-port) + (cond-expand (guile-2.0 _IOLBF) + (else 'line))) (format #t "building ~s/bin/ld wrapper in ~s~%" (assoc-ref %build-inputs "binutils") out) @@ -569,13 +651,13 @@ the store.") ;; version 2.28, GNU/Hurd used a different glibc branch. (package (name "glibc") - (version "2.29") + (version "2.31") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "0jzh58728flfh939a8k9pi1zdyalfzlxmwra7k0rzji5gvavivpk")) + "05zxkyz9bv3j9h0xyid1rhvh3klhsmrpkf3bcs6frvlgyr2gwilj")) (snippet ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is ;; required on LFS distros to avoid loading the distro's libc.so @@ -587,14 +669,14 @@ the store.") #t)) (modules '((guix build utils))) (patches (search-patches "glibc-ldd-x86_64.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-supported-locales.patch")))) + "glibc-supported-locales.patch" + "glibc-hurd-clock_t_centiseconds.patch" + "glibc-hurd-clock_gettime_monotonic.patch" + "glibc-hurd-signal-sa-siginfo.patch")))) (build-system gnu-build-system) ;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc @@ -821,6 +903,44 @@ with the Linux kernel.") ;; 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.30 + (package + (inherit glibc) + (version "2.30") + (source (origin + (inherit (package-source glibc)) + (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) + (sha256 + (base32 + "1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72")) + (patches (search-patches "glibc-ldd-x86_64.patch" + "glibc-CVE-2019-19126.patch" + "glibc-hidden-visibility-ldconfig.patch" + "glibc-versioned-locpath.patch" + "glibc-allow-kernel-2.6.32.patch" + "glibc-reinstate-prlimit64-fallback.patch" + "glibc-2.29-supported-locales.patch")))))) + +(define-public glibc-2.29 + (package + (inherit glibc) + (version "2.29") + (source (origin + (inherit (package-source glibc)) + (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) + (sha256 + (base32 + "0jzh58728flfh939a8k9pi1zdyalfzlxmwra7k0rzji5gvavivpk")) + (patches (search-patches "glibc-ldd-x86_64.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-2.29-supported-locales.patch")))))) + (define-public glibc-2.28 (package (inherit glibc) @@ -980,21 +1100,8 @@ with the Linux kernel.") (package-name libc) "-" (package-version libc))) (arguments - (substitute-keyword-arguments - (ensure-keyword-arguments (package-arguments base-gcc) - '(#:implicit-inputs? #f)) - ((#: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))))))) + (ensure-keyword-arguments (package-arguments base-gcc) + '(#:implicit-inputs? #f))) (native-inputs `(,@(package-native-inputs base-gcc) ,@(append (fold alist-delete (%final-inputs) '("libc" "libc:static"))) @@ -1134,18 +1241,12 @@ test environments.") (make-glibc-utf8-locales glibc)) ;; 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 - (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 glibc-locales-2.29 + (package (inherit (make-glibc-locales glibc-2.29)) + (name "glibc-locales-2.29"))) +(define-public glibc-utf8-locales-2.29 + (package (inherit (make-glibc-utf8-locales glibc-2.29)) + (name "glibc-utf8-locales-2.29"))) (define-public which (package @@ -1282,26 +1383,7 @@ and daylight-saving rules.") ;;; package. (define-public tzdata-for-tests (hidden-package - (package - (inherit tzdata) - (version "2019b") - (source (origin - (method url-fetch) - (uri (string-append - "https://data.iana.org/time-zones/releases/tzdata" - version ".tar.gz")) - (sha256 - (base32 - "0r0clnlslwm15m1c61dinf1fi9ffgl6aipng7i7yryfwj0n0kn85")))) - (inputs - `(("tzcode" ,(origin - (method url-fetch) - (uri (string-append - "https://data.iana.org/time-zones/releases/tzcode" - version ".tar.gz")) - (sha256 - (base32 - "0vbmswvv3li25s31shyllq5v24449lxnrki9hr043nipjd09sirf"))))))))) + (package/inherit tzdata))) (define-public libiconv (package diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 3256a356d4..1b342827c5 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -69,7 +69,16 @@ (4 "021gqqvgydixkrmqss64b6srfdlkvnx88lyfzpxfrn5d6bc7li0l") (5 "0xl2kyzm84nlyklrqzkn73ixabhzfhn9x91lzcmis89cppclvxav") (6 "0844749ixk1z60437nkznzms1f0nzh9an62kj7sny6r0zyk2k1fn") - (7 "16xg37gp1b8zlj5969w8mcrparwqlcbj9695vn3qhgb7wdz1xd0p"))) + (7 "16xg37gp1b8zlj5969w8mcrparwqlcbj9695vn3qhgb7wdz1xd0p") + (8 "1qyp19krjh8zxvb0jgwmyjz40djslwcf4xi7kc1ab0iaca44bipf") + (9 "00yrjjqd95s81b21qq3ba1y7h879q8jaajlkjggc6grhcwbs4g7d") + (10 "04ca5bjv456v538mkspzvn4xb2zdphh31r4fpvfm9p5my0jw7yyn") + (11 "1sklyixvsv8993kxzs0jigacpdchjrq7jv5xpdx7kbqyp4rf6k9c") + (12 "0cz21qg2gbr40lfgza7g02bqi2qknwqgxnq459pjj640d0cywhr9") + (13 "16h9nwz3yzwj7fnxvlidjymdc4yr30h818433gh9j1x3in6igmzm") + (14 "12gm5bvv2pd3m72z2ilj26pa08c61az253dsgfl24vpf2ijywvjx") + (15 "0pm0px758w4i23s55wajcv6lqfiym7zgxvq0pxf6vclkv8nxy5x5") + (16 "0vdha332km2iwx8g2ld15jy7d24cbplzgr1531dpzylr9ajxglgz"))) (define (download-patches store count) "Download COUNT Bash patches into store. Return a list of @@ -116,7 +125,8 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." (base32 "0kgvfwqdcd90waczf4gx39xnrxzijhjrzyzv7s8v4w31qqm0za5l")) (patch-flags '("-p0")) - (patches %patch-series-5.0))) + (patches (cons (search-patch "bash-linux-pgrp-pipe.patch") + %patch-series-5.0)))) (version (string-append version "." (number->string (length %patch-series-5.0)))) (build-system gnu-build-system) diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm index 73b0c073d9..50e4951dc1 100644 --- a/gnu/packages/bdw-gc.scm +++ b/gnu/packages/bdw-gc.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name> ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org> -;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +24,7 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages pkg-config) #:use-module (gnu packages hurd)) @@ -31,14 +32,14 @@ (define-public libgc (package (name "libgc") - (version "7.6.12") + (version "8.0.4") (source (origin (method url-fetch) (uri (string-append "https://github.com/ivmai/bdwgc/releases" "/download/v" version "/gc-" version ".tar.gz")) (sha256 (base32 - "10jhhi79d5brwlsyhwgpnrmc8nhlf7aan2lk9xhgihk5jc6srbvc")))) + "1798rp3mcfkgs38ynkbg2p47bq59pisrc6mn0l20pb5iczf0ssj3")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -54,21 +55,14 @@ ,@(if (hurd-triplet? (or (%current-system) (%current-target-system))) '("--disable-gcj-support") - '())) - #:phases (modify-phases %standard-phases - (add-after 'unpack 'adjust-pc-file - (lambda* (#:key inputs #:allow-other-keys) - (let ((libatomic-ops (assoc-ref inputs "libatomic-ops"))) - ;; GC 7.6.10 and later includes -latomic_ops in the - ;; pkg-config file. To avoid propagation, insert an - ;; absolute reference so dependent programs can find it. - (substitute* "bdw-gc.pc.in" - (("@ATOMIC_OPS_LIBS@" match) - (string-append "-L" libatomic-ops "/lib " - match))) - #t)))))) + '())))) (native-inputs `(("pkg-config" ,pkg-config))) - (inputs `(("libatomic-ops" ,libatomic-ops))) + (propagated-inputs + (if (%current-target-system) + ;; The build system refuses to check for compiler intrinsics when + ;; cross-compiling, and demands using libatomic-ops instead. + `(("libatomic-ops" ,libatomic-ops)) + '())) (outputs '("out" "debug")) (synopsis "The Boehm-Demers-Weiser conservative garbage collector for C and C++") @@ -91,17 +85,27 @@ C or C++ programs, though that is not its primary goal.") (license (x11-style (string-append home-page "license.txt"))))) -(define-public libgc-8.0 +;; TODO: Add a static output in libgc in the next rebuild cycle. +(define-public libgc/static-libs + (package/inherit + libgc + (arguments (substitute-keyword-arguments (package-arguments libgc) + ((#:configure-flags flags ''()) + `(cons "--enable-static" ,flags)))) + (properties '((hidden? . #t))))) + +(define-public libgc-7 (package (inherit libgc) - (version "8.0.4") + (version "7.6.12") (source (origin (method url-fetch) (uri (string-append "https://github.com/ivmai/bdwgc/releases" "/download/v" version "/gc-" version ".tar.gz")) (sha256 (base32 - "1798rp3mcfkgs38ynkbg2p47bq59pisrc6mn0l20pb5iczf0ssj3")))))) + "10jhhi79d5brwlsyhwgpnrmc8nhlf7aan2lk9xhgihk5jc6srbvc")))) + (propagated-inputs `(("libatomic-ops" ,libatomic-ops))))) (define-public libgc/back-pointers (package/inherit diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 40f75e9e0c..32b795948b 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -11995,7 +11995,8 @@ dependency like SeqAn.") ;; Ensure that Eigen headers can be found (setenv "CPLUS_INCLUDE_PATH" (string-append (assoc-ref inputs "eigen") - "/include/eigen3")) + "/include/eigen3:" + (or (getenv "CPLUS_INCLUDE_PATH") ""))) #t))))) (inputs `(("boost" ,boost) @@ -12173,8 +12174,8 @@ The following file formats are supported: (("lib/libdivsufsort.a") "/lib/libdivsufsort.so")) ;; Ensure that all headers can be found - (setenv "CPATH" - (string-append (getenv "CPATH") + (setenv "CPLUS_INCLUDE_PATH" + (string-append (or (getenv "CPLUS_INCLUDE_PATH") "") ":" (assoc-ref inputs "eigen") "/include/eigen3")) diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm index 12f19b785e..ae8d1a141b 100644 --- a/gnu/packages/bison.scm +++ b/gnu/packages/bison.scm @@ -31,7 +31,7 @@ (define-public bison (package (name "bison") - (version "3.4.1") + (version "3.5.3") (source (origin (method url-fetch) @@ -39,7 +39,7 @@ version ".tar.xz")) (sha256 (base32 - "03c2pmq3bs0drdislnz6gm1rwz3n4pb2rz9navyxydppxg2rl597")))) + "1i57hbczvr8674z73775jxdd3y59qggs5lmfd60gmwm5i1gmpy1b")))) (build-system gnu-build-system) (arguments '(;; Building in parallel on many-core systems may cause an error such as diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index 03c7fe4515..14f3815b52 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -407,7 +407,7 @@ and will take advantage of multiple processor cores where possible.") (assoc-ref %outputs "out") "/lib")))) (inputs `(("boost" ,boost) ("openssl" ,openssl))) - (native-inputs `(("python" ,python-2) + (native-inputs `(("python" ,python-wrapper) ("pkg-config" ,pkg-config))) (home-page "https://www.libtorrent.org/") (synopsis "Feature complete BitTorrent implementation") diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index 8bf2002adb..c3fc144cec 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -10,7 +10,9 @@ ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il> -;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,66 +42,113 @@ #:use-module (gnu packages icu4c) #:use-module (gnu packages perl) #:use-module (gnu packages python) - #:use-module (gnu packages shells)) + #:use-module (gnu packages shells) + #:use-module (srfi srfi-1)) + +(define (version-with-underscores version) + (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)) + +(define (boost-patch name version hash) + (origin + (method url-fetch) + (uri (string-append "https://www.boost.org/patches/" + (version-with-underscores version) "/" name)) + (file-name (string-append "boost-" name)) + (sha256 (base32 hash)))) (define-public boost (package (name "boost") - (version "1.70.0") + (version "1.72.0") (source (origin (method url-fetch) - (uri (let ((version-with-underscores - (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version))) - (list (string-append "mirror://sourceforge/boost/boost/" version - "/boost_" version-with-underscores ".tar.bz2") - (string-append "https://dl.bintray.com/boostorg/release/" - version "/source/boost_" - version-with-underscores ".tar.bz2")))) + (uri (string-append "https://dl.bintray.com/boostorg/release/" + version "/source/boost_" + (version-with-underscores version) ".tar.bz2")) + (patches + (list (boost-patch + ;; 1.72.0 was released with a faulty coroutine submodule: + ;; <https://github.com/boostorg/coroutine/issues/46>. + "0001-revert-cease-dependence-on-range.patch" version + "1zcqxzh56m1s635wqwk15j3zcs2gmjvjy2f0hid7i78s4pgm0yfs"))) (sha256 (base32 - "0y47nc7w0arwgj4x1phadxbvl7wyfcgknbz5kv8lzpl98wsyh2j3")))) + "08h7cv61fd0lzb4z50xanfqn0pdgvizjrpd1kcdgj725pisb5jar")))) (build-system gnu-build-system) (inputs `(("icu4c" ,icu4c) ("zlib" ,zlib))) (native-inputs `(("perl" ,perl) - ("python" ,python-2) + ,@(if (%current-target-system) + '() + `(("python" ,python-wrapper))) ("tcsh" ,tcsh))) (arguments - `(#:tests? #f + `(#:imported-modules ((guix build python-build-system) + ,@%gnu-build-system-modules) + #:modules (((guix build python-build-system) #:select (python-version)) + ,@%gnu-build-system-modules) + #:tests? #f #:make-flags (list "threading=multi" "link=shared" - ;; XXX: Disable installation of Boosts modular CMake config scripts - ;; which conflicts in 1.70.0 with the ones provided by CMake. - ;; See <https://bugs.gnu.org/36721>. - "--no-cmake-config" - ;; Set the RUNPATH to $libdir so that the libs find each other. (string-append "linkflags=-Wl,-rpath=" - (assoc-ref %outputs "out") "/lib")) + (assoc-ref %outputs "out") "/lib") + ,@(if (%current-target-system) + `("--user-config=user-config.jam" + ;; Python is not supported when cross-compiling. + "--without-python" + "binary-format=elf" + "target-os=linux" + ,@(cond + ((string-prefix? "arm" (%current-target-system)) + '("abi=aapcs" + "address-model=32" + "architecture=arm")) + ((string-prefix? "aarch64" (%current-target-system)) + '("abi=aapcs" + "address-model=64" + "architecture=arm")) + (else '()))) + '())) #:phases (modify-phases %standard-phases (delete 'bootstrap) (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) (let ((icu (assoc-ref inputs "icu4c")) + (python (assoc-ref inputs "python")) (out (assoc-ref outputs "out"))) (substitute* '("libs/config/configure" "libs/spirit/classic/phoenix/test/runtest.sh" - "tools/build/src/engine/execunix.c" - "tools/build/src/engine/Jambase" - "tools/build/src/engine/jambase.c") + "tools/build/src/engine/execunix.cpp" + "tools/build/src/engine/Jambase") (("/bin/sh") (which "sh"))) (setenv "SHELL" (which "sh")) (setenv "CONFIG_SHELL" (which "sh")) + ,@(if (%current-target-system) + `((call-with-output-file "user-config.jam" + (lambda (port) + (format port + "using gcc : cross : ~a-c++ ;" + ,(%current-target-system))))) + '()) + (invoke "./bootstrap.sh" (string-append "--prefix=" out) ;; Auto-detection looks for ICU only in traditional ;; install locations. (string-append "--with-icu=" icu) + ;; Ditto for Python. + ,@(if (%current-target-system) + '() + `((string-append "--with-python-root=" python) + (string-append "--with-python=" python "/bin/python") + (string-append "--with-python-version=" + (python-version python)))) "--with-toolset=gcc")))) (replace 'build (lambda* (#:key make-flags #:allow-other-keys) @@ -109,17 +158,27 @@ (replace 'install (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "./b2" "install" make-flags))) - (add-after 'install 'provide-libboost_python - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; Boost can build support for both Python 2 and Python 3 since - ;; version 1.67.0, and suffixes each library with the Python - ;; version. Many consumers only check for libboost_python - ;; however, so we provide it here as suggested in - ;; <https://github.com/boostorg/python/issues/203>. - (with-directory-excursion (string-append out "/lib") - (symlink "libboost_python27.so" "libboost_python.so")) - #t)))))) + ,@(if (%current-target-system) + '() + '((add-after 'install 'provide-libboost_python + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python-version (python-version + (assoc-ref inputs "python"))) + (libboost_pythonNN.so + (string-append "libboost_python" + (string-join (string-split + python-version #\.) + "") + ".so"))) + (with-directory-excursion (string-append out "/lib") + (symlink libboost_pythonNN.so "libboost_python.so") + ;; Some packages only look for the major version. + (symlink libboost_pythonNN.so + (string-append "libboost_python" + (string-take python-version 1) + ".so"))) + #t)))))))) (home-page "https://www.boost.org") (synopsis "Peer-reviewed portable C++ source libraries") @@ -129,54 +188,16 @@ across a broad spectrum of applications.") (license (license:x11-style "https://www.boost.org/LICENSE_1_0.txt" "Some components have other similar licences.")))) -;; TODO: Merge with 'Boost' in the next rebuild cycle. -(define-public boost-with-python3 +(define-public boost-with-python2 (package (inherit boost) - (name "boost-python3") + (name "boost-python2") (native-inputs - `(("perl" ,perl) - ("python" ,python) - ("tcsh" ,tcsh))) - (arguments (substitute-keyword-arguments (package-arguments boost) - ((#:phases phases) - `(modify-phases ,phases - (replace 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((icu (assoc-ref inputs "icu4c")) - (python (assoc-ref inputs "python")) - (out (assoc-ref outputs "out"))) - (substitute* '("libs/config/configure" - "libs/spirit/classic/phoenix/test/runtest.sh" - "tools/build/src/engine/execunix.c" - "tools/build/src/engine/Jambase" - "tools/build/src/engine/jambase.c") - (("/bin/sh") (which "sh"))) - - (setenv "SHELL" (which "sh")) - (setenv "CONFIG_SHELL" (which "sh")) + `(("python" ,python-2) + ,@(alist-delete "python" (package-native-inputs boost)))))) - (substitute* "tools/build/src/tools/python.jam" - (("include/python\\$\\(version\\)") - "include/python$(version)m")) - - (invoke "./bootstrap.sh" - (string-append "--prefix=" out) - ;; Auto-detection looks for dependencies only - ;; in traditional install locations. - (string-append "--with-icu=" icu) - (string-append "--with-python=" python "/bin/python3") - (string-append "--with-python-root=" python) - "--with-python-version=3.7" - "--with-toolset=gcc")))) - (replace 'provide-libboost_python - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (with-directory-excursion (string-append out "/lib") - (symlink "libboost_python37.so" "libboost_python.so") - ;; Some packages also look for libboost_python3.so - (symlink "libboost_python37.so" "libboost_python3.so")) - #t))))))))) +(define-public boost-with-python3 + (deprecated-package "boost-with-python3" boost)) (define-public boost-static (package @@ -189,10 +210,18 @@ across a broad spectrum of applications.") ((#:phases phases) `(modify-phases ,phases (replace 'provide-libboost_python - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python-version (python-version + (assoc-ref inputs "python"))) + (libboost_pythonNN.a + (string-append "libboost_python" + (string-join (string-split + python-version #\.) + "") + ".a"))) (with-directory-excursion (string-append out "/lib") - (symlink "libboost_python27.a" "libboost_python.a")) + (symlink libboost_pythonNN.a "libboost_python.a")) #t))))))))) (define-public boost-1.69 diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 666562762f..0f0d3b4b62 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2019 nee <nee@cock.li> ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2018, 2019, 2020 Vagrant Cascadian <vagrant@debian.org> ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com> ;;; @@ -93,7 +94,9 @@ (sha256 (base32 "0zgp5m3hmc9jh8wpjx6czzkh5id2y8n1k823x2mjvm2sk6b28ag5")) - (patches (search-patches "grub-efi-fat-serial-number.patch")))) + (patches (search-patches + "grub-efi-fat-serial-number.patch" + "grub-verifiers-Blocklist-fallout-cleanup.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -154,11 +157,19 @@ ;; Depend on LVM2 for libdevmapper, used by 'grub-probe' and ;; 'grub-install' to recognize mapped devices (LUKS, etc.) - ("lvm2" ,lvm2) + ,@(if (member (or (%current-target-system) + (%current-system)) + (package-supported-systems lvm2)) + `(("lvm2" ,lvm2)) + '()) ;; Depend on mdadm, which is invoked by 'grub-probe' and 'grub-install' ;; to determine whether the root file system is RAID. - ("mdadm" ,mdadm) + ,@(if (member (or (%current-target-system) + (%current-system)) + (package-supported-systems mdadm)) + `(("mdadm" ,mdadm)) + '()) ;; Console-setup's ckbcomp is invoked by grub-kbdcomp. It is required ;; for generating alternative keyboard layouts. @@ -166,7 +177,11 @@ ;; Needed for ‘grub-mount’, the only reliable way to tell whether a given ;; file system will be readable by GRUB without rebooting. - ("fuse" ,fuse) + ,@(if (member (or (%current-target-system) + (%current-system)) + (package-supported-systems fuse)) + `(("fuse" ,fuse)) + '()) ("freetype" ,freetype) ;; ("libusb" ,libusb) @@ -198,7 +213,9 @@ ;; Dependencies for the test suite. The "real" QEMU is needed here, ;; because several targets are used. ("parted" ,parted) - ("qemu" ,qemu-minimal) + ,@(if (member (%current-system) (package-supported-systems qemu-minimal)) + `(("qemu" ,qemu-minimal)) + '()) ("xorriso" ,xorriso))) (home-page "https://www.gnu.org/software/grub/") (synopsis "GRand Unified Boot loader") @@ -212,6 +229,33 @@ menu to select one of the installed operating systems.") (license license:gpl3+) (properties '((cpe-name . "grub2"))))) +(define-public grub-minimal + (package + (inherit grub) + (name "grub-minimal") + (inputs + (fold alist-delete (package-inputs grub) + '("lvm2" "mdadm" "fuse" "console-setup"))) + (native-inputs + (fold alist-delete (package-native-inputs grub) + '("help2man" "texinfo" "parted" "qemu" "xorriso"))) + (arguments + `(#:configure-flags (list "PYTHON=true") + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-stuff + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (substitute* "grub-core/Makefile.in" + (("/bin/sh") (which "sh"))) + + ;; Make the font visible. + (copy-file (assoc-ref (or native-inputs inputs) + "unifont") + "unifont.bdf.gz") + (system* "gunzip" "unifont.bdf.gz") + + #t))) + #:tests? #f)))) + (define-public grub-efi (package (inherit grub) @@ -305,7 +349,7 @@ menu to select one of the installed operating systems.") ("perl" ,perl) ("python-2" ,python-2))) (inputs - `(("libuuid" ,util-linux) + `(("libuuid" ,util-linux "lib") ("mtools" ,mtools))) (arguments `(#:parallel-build? #f @@ -943,7 +987,7 @@ to Novena upstream, does not load u-boot.img from the first partition.") ("libyaml" ,libyaml) ("openssl" ,openssl) ("openssl:static" ,openssl "static") - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) (home-page "https://dev.chromium.org/chromium-os/chromiumos-design-docs/verified-boot") (synopsis "ChromiumOS verified boot utilities") diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index d6995f104c..f58ce2de93 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -1,8 +1,8 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> -;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2018, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2019 Carl Dong <contact@carldong.me> ;;; ;;; This file is part of GNU Guix. @@ -104,6 +104,15 @@ ,(base32 "07830bx29ad5i0l1ykj0g0b1jayjdblf01sr3ww9wbnwdbzinqms")) ("xz" ,(base32 "0i9kxdi17bm5gxfi2xzm0y73p3ii0cqxli1sbljm6rh2fjgyn90k"))) + ("i586-gnu" + ("bash" + ,(base32 "1as8649aqaibahhhrvkj10ci8shpi4hq5n7gnik8rhhy0dc1jarg")) + ("mkdir" + ,(base32 "1snqgpfrl00hfn82lm29jqylzjsfb9jd6ha74dp12phwb8fpbmb9")) + ("tar" + ,(base32 "0nq2c1zb3wv5bf7kd83sziaashydazrn7xgq6kijlk0zj2syzc2m")) + ("xz" + ,(base32 "033rhpk6zrpxpd6ffjyg5y2zwq9x9cnq0zljb7k8jlncbalsayq5"))) ("mips64el-linux" ("bash" ,(base32 "1aw046dhda240k9pb9iaj5aqkm23gkvxa9j82n4k7fk87nbrixw6")) @@ -114,12 +123,17 @@ ("xz" ,(base32 "09j1d69qr0hhhx4k4ih8wp00dfc9y4rp01hfg3vc15yxd0jxabh5"))))) -(define (bootstrap-executable-url program system) - "Return the URL where PROGRAM can be found for SYSTEM." - (string-append - "https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/" - system "/" program - "?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e")) +(define %bootstrap-executable-base-urls + ;; This is where the bootstrap executables come from. + '("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/" + "http://lilypond.org/janneke/guix/")) + +(define (bootstrap-executable-file-name system program) + "Return the FILE-NAME part of url where PROGRAM can be found for SYSTEM." + (match system + ("i586-gnu" (string-append system "/20200326/" program)) + (_ (string-append system "/" program + "?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e")))) (define bootstrap-executable (mlambda (program system) @@ -140,7 +154,9 @@ for system '~a'") ((sha256) (origin (method url-fetch/executable) - (uri (bootstrap-executable-url program system)) + (uri (map (cute string-append <> + (bootstrap-executable-file-name system program)) + %bootstrap-executable-base-urls)) (file-name program) (sha256 sha256))))))) @@ -301,7 +317,8 @@ or false to signal an error." "http://alpha.gnu.org/gnu/guix/bootstrap" "ftp://alpha.gnu.org/gnu/guix/bootstrap" "http://www.fdn.fr/~lcourtes/software/guix/packages" - "http://flashner.co.il/guix/bootstrap")) + "http://flashner.co.il/guix/bootstrap" + "http://lilypond.org/janneke/guix/")) (define (bootstrap-guile-url-path system) "Return the URI for FILE." @@ -311,6 +328,8 @@ or false to signal an error." "/20170217/guile-2.0.14.tar.xz") ("armhf-linux" "/20150101/guile-2.0.11.tar.xz") + ("i586-gnu" + "/20200326/guile-static-stripped-2.0.14-i586-pc-gnu.tar.xz") (_ "/20131110/guile-2.0.9.tar.xz")))) @@ -326,7 +345,9 @@ or false to signal an error." ("armhf-linux" (base32 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5")) ("aarch64-linux" - (base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r")))) + (base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r")) + ("i586-gnu" + (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac")))) (define (bootstrap-guile-origin system) "Return an <origin> object for the Guile tarball of SYSTEM." @@ -456,6 +477,8 @@ $out/bin/guile --version~%" "/20150101/static-binaries.tar.xz") ("aarch64-linux" "/20170217/static-binaries.tar.xz") + ("i586-gnu" + "/20200326/static-binaries-0-i586-pc-gnu.tar.xz") (_ "/20131110/static-binaries.tar.xz"))) %bootstrap-base-urls)) @@ -473,6 +496,9 @@ $out/bin/guile --version~%" ("aarch64-linux" (base32 "18dfiq6c6xhsdpbidigw6480wh0vdgsxqq3xindq4lpdgqlccpfh")) + ("i586-gnu" + (base32 + "17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn")) ("mips64el-linux" (base32 "072y4wyfsj1bs80r6vbybbafy8ya4vfy7qj25dklwk97m6g71753")))))) @@ -519,6 +545,8 @@ $out/bin/guile --version~%" "/20150101/binutils-2.25.tar.xz") ("aarch64-linux" "/20170217/binutils-2.27.tar.xz") + ("i586-gnu" + "/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz") (_ "/20131110/binutils-2.23.2.tar.xz"))) %bootstrap-base-urls)) @@ -536,6 +564,9 @@ $out/bin/guile --version~%" ("aarch64-linux" (base32 "111s7ilfiby033rczc71797xrmaa3qlv179wdvsaq132pd51xv3n")) + ("i586-gnu" + (base32 + "11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs")) ("mips64el-linux" (base32 "1x8kkhcxmfyzg1ddpz2pxs6fbdl6412r7x0nzbmi5n7mj8zw2gy7")))))) @@ -589,6 +620,8 @@ $out/bin/guile --version~%" "/20150101/glibc-2.20.tar.xz") ("aarch64-linux" "/20170217/glibc-2.25.tar.xz") + ("i586-gnu" + "/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz") (_ "/20131110/glibc-2.18.tar.xz"))) %bootstrap-base-urls)) @@ -606,6 +639,9 @@ $out/bin/guile --version~%" ("aarch64-linux" (base32 "07nx3x8598i2924rjnlrncg6rm61c9bmcczbbcpbx0fb742nvv5c")) + ("i586-gnu" + (base32 + "14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952")) ("mips64el-linux" (base32 "0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg"))))))))) @@ -675,6 +711,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \ "/20150101/gcc-4.8.4.tar.xz") ("aarch64-linux" "/20170217/gcc-5.4.0.tar.xz") + ("i586-gnu" + "/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz") (_ "/20131110/gcc-4.8.2.tar.xz"))) %bootstrap-base-urls)) @@ -692,6 +730,9 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \ ("aarch64-linux" (base32 "1ar3vdzyqbfm0z36kmvazvfswxhcihlacl2dzdjgiq25cqnq9ih1")) + ("i586-gnu" + (base32 + "1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5")) ("mips64el-linux" (base32 "1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks"))))))))) @@ -808,19 +849,18 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \ (define (%bootstrap-inputs) ;; The initial, pre-built inputs. From now on, we can start building our ;; own packages. - `(,@(match (%current-system) - ((or "i686-linux" "x86_64-linux") - `(("linux-libre-headers" ,%bootstrap-linux-libre-headers) - ("bootstrap-mescc-tools" ,%bootstrap-mescc-tools) - ("mes" ,%bootstrap-mes))) - (_ - `(("libc" ,%bootstrap-glibc) - ("gcc" ,%bootstrap-gcc) - ("binutils" ,%bootstrap-binutils)))) - ("coreutils&co" ,%bootstrap-coreutils&co) - - ;; In gnu-build-system.scm, we rely on the availability of Bash. - ("bash" ,%bootstrap-coreutils&co))) + (match (%current-system) + ((or "i686-linux" "x86_64-linux") + `(("linux-libre-headers" ,%bootstrap-linux-libre-headers) + ("bootstrap-mescc-tools" ,%bootstrap-mescc-tools) + ("mes" ,%bootstrap-mes))) + (_ + `(("libc" ,%bootstrap-glibc) + ("gcc" ,%bootstrap-gcc) + ("binutils" ,%bootstrap-binutils) + ("coreutils&co" ,%bootstrap-coreutils&co) + ;; In gnu-build-system.scm, we rely on the availability of Bash. + ("bash" ,%bootstrap-coreutils&co))))) (define %bootstrap-inputs-for-tests ;; These are bootstrap inputs that are cheap to produce (no compilation diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index d27c951d43..a8ffa56bc6 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -171,7 +171,7 @@ files and generates build instructions for the Ninja build system.") (define-public meson (package (name "meson") - (version "0.50.1") + (version "0.53.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/mesonbuild/meson/" @@ -179,7 +179,7 @@ files and generates build instructions for the Ninja build system.") version ".tar.gz")) (sha256 (base32 - "1k2fw5qk4mqjcb4j5dhp8xfn0caqphb11yh8zkw7v9w01kb5d3zn")))) + "07y2hh9dfn1m9g4bsy49nbn3vdmd0b2iwr8bxg19fhqq6c7q73ry")))) (build-system python-build-system) (arguments `(;; FIXME: Tests require many additional inputs, a fix for the RUNPATH diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm index 81b2b436c1..104d61148a 100644 --- a/gnu/packages/calendar.scm +++ b/gnu/packages/calendar.scm @@ -38,6 +38,7 @@ #:use-module (gnu packages dav) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages icu4c) #:use-module (gnu packages perl) @@ -136,7 +137,10 @@ the <tz.h> library for handling time zones and leap seconds.") (build-system cmake-build-system) (arguments '(#:tests? #f ; test suite appears broken - #:configure-flags '("-DSHARED_ONLY=true") + #:configure-flags '("-DSHARED_ONLY=true" + ;; required by evolution-data-server + "-DGOBJECT_INTROSPECTION=true" + "-DICAL_GLIB_VAPI=true") #:phases (modify-phases %standard-phases (add-before 'configure 'patch-paths @@ -153,9 +157,11 @@ the <tz.h> library for handling time zones and leap seconds.") (("\\\"/usr/share/lib/zoneinfo\\\"") ""))) #t))))) (native-inputs - `(("gtk-doc" ,gtk-doc) + `(("gobject-introspection" ,gobject-introspection) + ("gtk-doc" ,gtk-doc) ("perl" ,perl) - ("pkg-config" ,pkg-config))) + ("pkg-config" ,pkg-config) + ("vala" ,vala))) (inputs `(("glib" ,glib) ("libxml2" ,libxml2) diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm index a2f1121b1a..e1cded55e2 100644 --- a/gnu/packages/cdrom.scm +++ b/gnu/packages/cdrom.scm @@ -477,7 +477,7 @@ capacity is user-selectable.") ("eudev" ,eudev) ("fontconfig" ,fontconfig) ("libexif" ,libexif) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("ffmpeg" ,ffmpeg-3.4))) (native-inputs `(("pkg-config" ,pkg-config) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 213363f645..9971700d2d 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -67,6 +67,7 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) + #:use-module (gnu packages xml) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -645,26 +646,20 @@ doctest.") (define-public python-mock (package (name "python-mock") - (version "2.0.0") + (version "3.0.5") (source (origin (method url-fetch) (uri (pypi-uri "mock" version)) (sha256 (base32 - "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i")))) + "1hrp6j0yrx2xzylfv02qa8kph661m6yq4p0mc8fnimch9j4psrc3")))) (propagated-inputs - `(("python-pbr" ,python-pbr-minimal) - ("python-six" ,python-six))) + `(("python-six" ,python-six))) (build-system python-build-system) - (native-inputs - `(("python-unittest2" ,python-unittest2))) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (zero? (system* "unit2"))))))) + ;; FIXME: Tests require "pytest", which depends on this package. + '(#:tests? #f)) (home-page "https://github.com/testing-cabal/mock") (synopsis "Python mocking and patching library for testing") (description @@ -772,35 +767,40 @@ standard library.") (define-public python-pytest (package (name "python-pytest") - (version "4.4.2") + (version "5.3.5") (source (origin (method url-fetch) (uri (pypi-uri "pytest" version)) (sha256 (base32 - "18w38kjnffdcrlbw6ny6dksgxai6x9bxpjs2m6klqmb8hfzjkcb2")))) + "139i9cjhrv5aici3skq8iihvfb3lq0d8xb5j7qycr2hlk8cfjpqd")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ - (invoke "pytest" "-vv" "-k" - (string-append - ;; These tests involve the /usr directory, and fails. - "not test_remove_dir_prefix" - " and not test_argcomplete" - ;; This test tries to override PYTHONPATH, and - ;; subsequently fails to locate the test libraries. - " and not test_collection"))))))) + (lambda* (#:key (tests? #t) #:allow-other-keys) + (if tests? + (invoke "pytest" "-vv" "-k" + (string-append + ;; These tests involve the /usr directory, and fails. + "not test_remove_dir_prefix" + " and not test_argcomplete" + ;; This test tries to override PYTHONPATH, and + ;; subsequently fails to locate the test libraries. + " and not test_collection")) + (format #t "test suite not run~%")) + #t))))) (propagated-inputs `(("python-atomicwrites" ,python-atomicwrites) ("python-attrs" ,python-attrs-bootstrap) ("python-more-itertools" ,python-more-itertools) + ("python-packaging" ,python-packaging-bootstrap) ("python-pluggy" ,python-pluggy) ("python-py" ,python-py) - ("python-six" ,python-six-bootstrap))) + ("python-six" ,python-six-bootstrap) + ("python-wcwidth" ,python-wcwidth))) (native-inputs `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`. ("bash" ,bash) @@ -808,7 +808,8 @@ standard library.") ("python-nose" ,python-nose) ("python-mock" ,python-mock) ("python-pytest" ,python-pytest-bootstrap) - ("python-setuptools-scm" ,python-setuptools-scm))) + ("python-setuptools-scm" ,python-setuptools-scm) + ("python-xmlschema" ,python-xmlschema))) (home-page "https://docs.pytest.org/en/latest/") (synopsis "Python testing library") (description @@ -818,15 +819,41 @@ and many external plugins.") (license license:expat) (properties `((python2-variant . ,(delay python2-pytest)))))) +;; Pytest 4.x are the last versions that support Python 2. (define-public python2-pytest - (let ((pytest (package-with-python2 - (strip-python2-variant python-pytest)))) - (package - (inherit pytest) - (propagated-inputs - `(("python2-funcsigs" ,python2-funcsigs) - ("python2-pathlib2" ,python2-pathlib2) - ,@(package-propagated-inputs pytest)))))) + (package + (inherit (strip-python2-variant python-pytest)) + (name "python2-pytest") + (version "4.6.9") + (source (origin + (method url-fetch) + (uri (pypi-uri "pytest" version)) + (sha256 + (base32 + "0fgkmpc31nzy97fxfrkqbzycigdwxwwmninx3qhkzp81migggs0r")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + ,@(package-arguments python-pytest))) + (propagated-inputs + `(("python-atomicwrites" ,python2-atomicwrites) + ("python-attrs" ,python2-attrs-bootstrap) + ("python-funcsigs" ,python2-funcsigs) + ("python-importlib-metadata" ,python2-importlib-metadata-bootstrap) + ("python-more-itertools" ,python2-more-itertools) + ("python-packaging" ,python2-packaging-bootstrap) + ("python-pathlib2" ,python2-pathlib2) + ("python-pluggy" ,python2-pluggy) + ("python-py" ,python2-py) + ("python-six" ,python2-six-bootstrap) + ("python-wcwidth" ,python2-wcwidth))) + (native-inputs + `(("bash" ,bash) ;tests require 'compgen' + ("python-hypothesis" ,python2-hypothesis) + ("python-nose" ,python2-nose) + ("python-mock" ,python2-mock) + ("python-pytest" ,python2-pytest-bootstrap) + ("python-setuptools-scm" ,python2-setuptools-scm))))) (define-public python-pytest-bootstrap (package @@ -837,24 +864,37 @@ and many external plugins.") (properties `((python2-variant . ,(delay python2-pytest-bootstrap)))))) (define-public python2-pytest-bootstrap - (let ((pytest (package-with-python2 - (strip-python2-variant python-pytest-bootstrap)))) - (package (inherit pytest) - (propagated-inputs - `(("python2-funcsigs" ,python2-funcsigs-bootstrap) - ("python2-pathlib2" ,python2-pathlib2-bootstrap) - ,@(package-propagated-inputs pytest)))))) + (hidden-package + (package/inherit + python2-pytest + (name "python2-pytest-bootstrap") + (arguments + (substitute-keyword-arguments (package-arguments python2-pytest) + ((#:tests? _ #f) #f))) + (native-inputs + `(("python-setuptools-scm" ,python2-setuptools-scm))) + (propagated-inputs + `(("python-atomicwrites" ,python2-atomicwrites) + ("python-attrs" ,python2-attrs-bootstrap) + ("python-funcsigs" ,python2-funcsigs-bootstrap) + ("python-importlib-metadata" ,python2-importlib-metadata-bootstrap) + ("python-more-itertools" ,python2-more-itertools) + ("python-packaging" ,python2-packaging-bootstrap) + ("python-pathlib2" ,python2-pathlib2-bootstrap) + ("python-pluggy" ,python2-pluggy-bootstrap) + ("python-py" ,python2-py) + ("python-wcwidth" ,python2-wcwidth)))))) (define-public python-pytest-cov (package (name "python-pytest-cov") - (version "2.6.1") + (version "2.8.1") (source (origin (method url-fetch) (uri (pypi-uri "pytest-cov" version)) (sha256 - (base32 "0cyxbbghx2l4p60w10k00j1j74q1ngfiffr0pxn73ababjr69dha")))) + (base32 "0avzlk9p4nc44k7lpx9109dybq71xqnggxb9f4hp0l64pbc44ryc")))) (build-system python-build-system) (arguments `(#:phases @@ -883,18 +923,28 @@ supports coverage of subprocesses.") (define-public python-pytest-runner (package (name "python-pytest-runner") - (version "4.4") + (version "5.2") (source (origin (method url-fetch) (uri (pypi-uri "pytest-runner" version)) (sha256 (base32 - "1x0d9n40lsiphblbs61rdc0d5r31f6vh0vcahqdv0mffakbnrb80")))) + "0awll1bva5zy8cspsxcpv7pjcrdf5c6pf56nqn4f74vvmlzfgiwn")))) (build-system python-build-system) + (arguments + '(;; FIXME: The test suite requires 'python-flake8' and 'python-black', + ;; but that introduces a circular dependency. + #:tests? #f + #:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "pytest" "-vv") + (format #t "test suite not run~%")) + #t))))) (native-inputs - `(("python-pytest" ,python-pytest-bootstrap) - ("python-setuptools-scm" ,python-setuptools-scm))) + `(("python-setuptools-scm" ,python-setuptools-scm))) (home-page "https://github.com/pytest-dev/pytest-runner") (synopsis "Invoke py.test as a distutils command") (description @@ -1385,14 +1435,14 @@ have failed since the last commit or what tests are currently failing."))) (define-public python-coverage (package (name "python-coverage") - (version "4.5.3") + (version "5.0.3") (source (origin (method url-fetch) (uri (pypi-uri "coverage" version)) (sha256 (base32 - "02f6m073qdispn96rc616hg0rnmw1pgqzw3bgxwiwza4zf9hirlx")))) + "1vrg8panqw79pswg52ygbrff3wdnxarrd9qz6c64ah0c4h2cmbvp")))) (build-system python-build-system) (arguments ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors. @@ -1677,20 +1727,20 @@ instantly.") (define-public python-hypothesis (package (name "python-hypothesis") - (version "4.18.3") + (version "5.4.1") (source (origin (method url-fetch) (uri (pypi-uri "hypothesis" version)) (sha256 (base32 - "0a35nwqyjnm4cphi43xracqpkws0ip61mndvqb1iqq7gkva83lb1")))) + "0zn09bn6hadk4vxl6jy8bkjr5fz8mrhin3z46w7pq5qgbaycr89p")))) (build-system python-build-system) - (native-inputs - `(("python-flake8" ,python-flake8) - ("python-pytest" ,python-pytest-bootstrap))) + (arguments + ;; XXX: Tests are not distributed with the PyPI archive. + '(#:tests? #f)) (propagated-inputs `(("python-attrs" ,python-attrs-bootstrap) - ("python-coverage" ,python-coverage))) + ("python-sortedcontainers" ,python-sortedcontainers))) (synopsis "Library for property based testing") (description "Hypothesis is a library for testing your Python code against a much larger range of examples than you would ever want to write by hand. It’s @@ -1700,10 +1750,18 @@ seamlessly into your existing Python unit testing work flow.") (license license:mpl2.0) (properties `((python2-variant . ,(delay python2-hypothesis)))))) +;; This is the last version of Hypothesis that supports Python 2. (define-public python2-hypothesis (let ((hypothesis (package-with-python2 (strip-python2-variant python-hypothesis)))) (package (inherit hypothesis) + (version "4.57.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "hypothesis" version)) + (sha256 + (base32 + "183gpxbfcdhdqzlahkji5a71n6lmvgqsbkcb0ihqad51n2j6jhrw")))) (propagated-inputs `(("python2-enum34" ,python2-enum34) ,@(package-propagated-inputs hypothesis)))))) @@ -2075,7 +2133,9 @@ backported from Python 2.7 for Python 2.4+.") (uri (pypi-uri "behave" version)) (sha256 (base32 - "11hsz365qglvpp1m1w16239c3kiw15lw7adha49lqaakm8kj6rmr")))) + "11hsz365qglvpp1m1w16239c3kiw15lw7adha49lqaakm8kj6rmr")) + (patches (search-patches + "behave-skip-a-couple-of-tests.patch")))) (build-system python-build-system) (native-inputs `(("python-mock" ,python-mock) @@ -2256,13 +2316,13 @@ create data based on random numbers and yet remain repeatable.") (define-public python-freezegun (package (name "python-freezegun") - (version "0.3.12") + (version "0.3.14") (source (origin (method url-fetch) (uri (pypi-uri "freezegun" version)) (sha256 - (base32 "1rx57v8ryjncjimg8hys9kx1r3rknvwcl4y340g20jn0sf69qk9a")))) + (base32 "0al75mk829j1izxi760b7yjnknjihyfhp2mvi5qiyrxb9cpxwqk2")))) (build-system python-build-system) (native-inputs `(("python-mock" ,python-mock) @@ -2429,11 +2489,21 @@ portable to just about any platform.") (let ((out (assoc-ref outputs "out"))) (setenv "CC" "gcc") (setenv "PREFIX" out) + + ;; XXX: Without this flag, the CLOCK_REALTIME test hangs + ;; indefinitely. See README.packagers for more information. + ;; Try removing this for future versions of libfaketime. + (setenv "FAKETIME_COMPILE_CFLAGS" "-DFORCE_MONOTONIC_FIX") + #t))) (add-before 'check 'pre-check (lambda _ (substitute* "test/functests/test_exclude_mono.sh" (("/bin/bash") (which "bash"))) + + ;; Do not fail due to use of 'ftime', which was deprecated in + ;; glibc 2.31. Remove this for later versions of libfaketime. + (setenv "FAKETIME_COMPILE_CFLAGS" "-Wno-deprecated-declarations") #t))) #:test-target "test")) (native-inputs @@ -2569,6 +2639,19 @@ system. The code under test requires no modification to work with pyfakefs.") (define-public python2-pyfakefs (package-with-python2 python-pyfakefs)) +;; This minimal variant is used to avoid a circular dependency between +;; python2-importlib-metadata, which requires pyfakefs for its tests, and +;; python2-pytest, which requires python2-importlib-metadata. +(define-public python2-pyfakefs-bootstrap + (hidden-package + (package + (inherit python2-pyfakefs) + (name "python2-pyfakefs-bootstrap") + (native-inputs '()) + (arguments + `(#:python ,python-2 + #:tests? #f))))) + (define-public python-aiounittest (package (name "python-aiounittest") diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 3330f91dfc..d08363a8dc 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -77,7 +77,7 @@ (build-system gnu-build-system) (inputs `(("ncurses" ,ncurses) - ("libuuid" ,util-linux) + ("libuuid" ,util-linux "lib") ("libx11" ,libx11) ("xorg-rgb" ,xorg-rgb) ("nanopass" ,nanopass) diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm index 795cc2943f..9bfe690625 100644 --- a/gnu/packages/chromium.scm +++ b/gnu/packages/chromium.scm @@ -427,18 +427,6 @@ from forcing GEXP-PROMISE." `(cons "--enable-custom-modes" ,flags)))))) -;; Add a custom ld wrapper that supports quoted strings in response files. -;; To be merged with 'ld-wrapper' in a future rebuild cycle. -(define-public ld-wrapper-next - (let ((orig (car (assoc-ref (%final-inputs) "ld-wrapper")))) - (package - (inherit orig) - (name "ld-wrapper-next") - (inputs - `(("wrapper" ,(search-path %load-path - "gnu/packages/ld-wrapper-next.in")) - ,@(alist-delete "wrapper" (package-inputs orig))))))) - (define-public ungoogled-chromium (package (name "ungoogled-chromium") @@ -770,7 +758,6 @@ from forcing GEXP-PROMISE." ("clang" ,clang-9) ("gn" ,gn) ("gperf" ,gperf) - ("ld-wrapper" ,ld-wrapper-next) ("ninja" ,ninja) ("node" ,node) ("pkg-config" ,pkg-config) @@ -799,7 +786,7 @@ from forcing GEXP-PROMISE." ("glib" ,glib) ("gtk+" ,gtk+) ("harfbuzz" ,harfbuzz) - ("icu4c" ,icu4c-66.1) + ("icu4c" ,icu4c) ("jsoncpp" ,jsoncpp) ("lcms" ,lcms) ("libevent" ,libevent) diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm index 817c8a96db..39aa54a9e8 100644 --- a/gnu/packages/ci.scm +++ b/gnu/packages/ci.scm @@ -120,7 +120,7 @@ `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,objs))) #t)))))) (inputs - `(("guile" ,guile-2.2) + `(("guile" ,guile-3.0) ("guile-fibers" ,guile-fibers) ("guile-gcrypt" ,guile-gcrypt) ("guile-json" ,guile-json-3) diff --git a/gnu/packages/cinnamon.scm b/gnu/packages/cinnamon.scm index a8850391aa..fadf18df81 100644 --- a/gnu/packages/cinnamon.scm +++ b/gnu/packages/cinnamon.scm @@ -51,13 +51,6 @@ (base32 "18mjy80ly9361npjhxpm3n0pkmrwviaqr2kixjb7hyxa6kzzh5xw")))) (build-system gnu-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'bootstrap 'skip-premature-configure - (lambda _ - (setenv "NOCONFIGURE" "set") - #t))))) ;; TODO: package 'libgsystem'. (inputs `(("accountsservice" ,accountsservice) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 2d2827ffee..cf3bc406bc 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -5,10 +5,12 @@ ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> -;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +34,7 @@ #:use-module (guix utils) #:use-module (guix deprecation) #:use-module (guix build-system gnu) + #:use-module (guix build-system cmake) #:use-module (guix build-system emacs) #:use-module (gnu packages) #:use-module (gnu packages backup) @@ -39,19 +42,63 @@ #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages file) + #:use-module (gnu packages hurd) #:use-module (gnu packages libevent) #:use-module (gnu packages ncurses) + #:use-module (gnu packages serialization) #:use-module (gnu packages sphinx) #:use-module (gnu packages texinfo) #:use-module (gnu packages xml) + #:use-module (ice-9 match) #:use-module (srfi srfi-1)) -;;; This minimal variant of CMake does not include the documentation. It is -;;; used by the cmake-build-system. -(define-public cmake-minimal +;;; Build phases shared between 'cmake-bootstrap' and the later variants +;;; that use cmake-build-system. +(define %common-build-phases + `((add-after 'unpack 'split-package + ;; Remove files that have been packaged in other package recipes. + (lambda _ + (delete-file "Auxiliary/cmake-mode.el") + (substitute* "Auxiliary/CMakeLists.txt" + ((".*cmake-mode.el.*") "")) + #t)) + (add-before 'configure 'patch-bin-sh + (lambda _ + ;; Replace "/bin/sh" by the right path in... a lot of + ;; files. + (substitute* + '("Modules/CompilerId/Xcode-3.pbxproj.in" + "Modules/Internal/CPack/CPack.RuntimeScript.in" + "Source/cmGlobalXCodeGenerator.cxx" + "Source/cmLocalUnixMakefileGenerator3.cxx" + "Source/cmExecProgramCommand.cxx" + "Utilities/Release/release_cmake.cmake" + "Tests/CMakeLists.txt" + "Tests/RunCMake/File_Generate/RunCMakeTest.cmake") + (("/bin/sh") (which "sh"))) + #t)))) + +(define %common-disabled-tests + '(;; This test copies libgcc_s.so.1 from GCC and tries to modify its RPATH, + ;; but does not cope with the file being read-only. + "BundleUtilities" + ;; This test requires network access. + "CTestTestUpload" + ;; This test requires 'ldconfig' which is not available in Guix. + "RunCMake.install")) + +(define %preserved-third-party-files + '(;; 'Source/cm_getdate.c' includes archive_getdate.c wholesale, so it must + ;; be available along with the required headers. + "Utilities/cmlibarchive/libarchive/archive_getdate.c" + "Utilities/cmlibarchive/libarchive/archive_getdate.h")) + +;;; The "bootstrap" CMake. It is used to build 'cmake-minimal' below, as well +;;; as any dependencies that need cmake-build-system. +(define-public cmake-bootstrap (package - (name "cmake-minimal") - (version "3.15.1") + (name "cmake-bootstrap") + (version "3.16.5") (source (origin (method url-fetch) (uri (string-append "https://www.cmake.org/files/v" @@ -59,23 +106,50 @@ "/cmake-" version ".tar.gz")) (sha256 (base32 - "1xyprly3sf4wi0n1x79k4n22yxm6pb7fv70gqr9lvc7qv14cbphq")) - (modules '((guix build utils))) + "1z4bb8z6b4dvq5hrvajrf1hyybqay3xybyimf71w1jgcp180nxjz")) + (modules '((guix build utils) + (ice-9 ftw))) (snippet - '(begin - ;; Drop bundled software. - (with-directory-excursion "Utilities" - (for-each delete-file-recursively - '("cmbzip2" - ;; "cmcompress" - "cmcurl" - "cmexpat" - ;; "cmjsoncpp" - ;; "cmlibarchive" - "cmliblzma" - ;; "cmlibuv" - "cmzlib")) - #t))))) + `(begin + ;; CMake bundles its dependencies in the "Utilities" directory. + ;; Delete those to ensure the system libraries are used. + (define preserved-files + '(,@%preserved-third-party-files + ;; Use the bundled JsonCpp during bootstrap to work around + ;; a circular dependency. TODO: JsonCpp can be built with + ;; Meson instead of CMake, but meson-build-system currently + ;; does not support cross-compilation. + "Utilities/cmjsoncpp" + ;; LibUV is required to bootstrap the initial build system. + "Utilities/cmlibuv")) + + (file-system-fold (lambda (dir stat result) ;enter? + (or (string=? "Utilities" dir) ;init + ;; The bundled dependencies are + ;; distinguished by having a "cm" + ;; prefix to their upstream names. + (and (string-prefix? "Utilities/cm" dir) + (not (member dir preserved-files))))) + (lambda (file stat result) ;leaf + (unless (or (member file preserved-files) + ;; Preserve top-level files. + (string=? "Utilities" + (dirname file))) + (delete-file file))) + (const #t) ;down + (lambda (dir stat result) ;up + (when (equal? (scandir dir) '("." "..")) + (rmdir dir))) + (const #t) ;skip + (lambda (file stat errno result) + (format (current-error-port) + "warning: failed to delete ~a: ~a~%" + file (strerror errno))) + #t + "Utilities" + lstat) + #t)) + (patches (search-patches "cmake-curl-certificates.patch")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -86,7 +160,7 @@ (string-append "--parallel=" parallel-job-count) (string-append "--prefix=" out) "--system-libs" - "--no-system-jsoncpp" ; FIXME: Circular dependency. + "--no-system-jsoncpp" ;; By default, the man pages and other docs land ;; in PREFIX/man and PREFIX/doc, but we want them ;; in share/{man,doc}. Note that unlike @@ -95,14 +169,18 @@ ;; to --mandir and --docdir. "--mandir=share/man" ,(string-append "--docdir=share/doc/cmake-" - (version-major+minor version)))) + (version-major+minor version)) + + ;; By default CMake is built without any optimizations. Use + ;; the recommended Release target for a ~2.5x speedup. + "--" "-DCMAKE_BUILD_TYPE=Release")) #:make-flags (let ((skipped-tests - (list "BundleUtilities" ; This test fails on Guix. + (list ,@%common-disabled-tests "CTestTestSubdir" ; This test fails to build 2 of the 3 tests. - ;; These tests requires network access. - "CTestCoverageCollectGCOV" - "CTestTestUpload"))) + ;; This test fails when ARGS (below) is in use, see + ;; <https://gitlab.kitware.com/cmake/cmake/issues/17165>. + "CTestCoverageCollectGCOV"))) (list (string-append ;; These arguments apply for the tests only. @@ -111,29 +189,7 @@ " --exclude-regex ^\\(" (string-join skipped-tests "\\|") "\\)$"))) #:phases (modify-phases %standard-phases - (add-after 'unpack 'split-package - ;; Remove files that have been packaged in other package recipes. - (lambda _ - (delete-file "Auxiliary/cmake-mode.el") - (substitute* "Auxiliary/CMakeLists.txt" - ((".*cmake-mode.el.*") "")) - #t)) - (add-before 'configure 'patch-bin-sh - (lambda _ - ;; Replace "/bin/sh" by the right path in... a lot of - ;; files. - (substitute* - '("Modules/CompilerId/Xcode-3.pbxproj.in" - "Modules/CPack.RuntimeScript.in" - "Source/cmGlobalXCodeGenerator.cxx" - "Source/cmLocalUnixMakefileGenerator3.cxx" - "Source/cmExecProgramCommand.cxx" - "Utilities/Release/release_cmake.cmake" - "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c" - "Tests/CMakeLists.txt" - "Tests/RunCMake/File_Generate/RunCMakeTest.cmake") - (("/bin/sh") (which "sh"))) - #t)) + ,@%common-build-phases (add-before 'configure 'set-paths (lambda _ ;; Help cmake's bootstrap process to find system libraries @@ -148,18 +204,31 @@ (apply invoke "./configure" configure-flags)))))) (inputs `(("bzip2" ,bzip2) - ("curl" ,curl) + ("curl" ,curl-minimal) ("expat" ,expat) ("file" ,file) ("libarchive" ,libarchive) - ("libuv" ,libuv) - ("ncurses" ,ncurses) ; required for ccmake + ,@(if (hurd-target?) + '() + `(("libuv" ,libuv))) ;not supported on the Hurd + ("ncurses" ,ncurses) ;required for ccmake ("rhash" ,rhash) ("zlib" ,zlib))) (native-search-paths (list (search-path-specification (variable "CMAKE_PREFIX_PATH") - (files '(""))))) + (files '(""))) + ;; "cmake-curl-certificates.patch" changes CMake to honor 'SSL_CERT_DIR' + ;; and 'SSL_CERT_FILE', hence these search path entries. + (search-path-specification + (variable "SSL_CERT_DIR") + (separator #f) ;single entry + (files '("etc/ssl/certs"))) + (search-path-specification + (variable "SSL_CERT_FILE") + (file-type 'regular) + (separator #f) ;single entry + (files '("etc/ssl/certs/ca-certificates.crt"))))) (home-page "https://cmake.org/") (synopsis "Cross-platform build system") (description @@ -169,23 +238,84 @@ and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice.") (properties '((hidden? . #t))) (license (list license:bsd-3 ; cmake - license:bsd-4 ; cmcompress - license:bsd-2 ; cmlibarchive license:expat ; cmjsoncpp is dual MIT/public domain license:public-domain)))) ; cmlibarchive/archive_getdate.c +;;; This minimal variant of CMake does not include the documentation. It is +;;; used by the cmake-build-system. +(define-public cmake-minimal + (package + (inherit cmake-bootstrap) + (name "cmake-minimal") + (source (origin + (inherit (package-source cmake-bootstrap)) + (snippet + (match (origin-snippet (package-source cmake-bootstrap)) + ((_ _ exp ...) + ;; Now we can delete the remaining software bundles. + (append `(begin + (define preserved-files ',%preserved-third-party-files)) + exp)))))) + (inputs + `(("curl" ,curl) + ("jsoncpp" ,jsoncpp) + ,@(alist-delete "curl" (package-inputs cmake-bootstrap)))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list "-DCMAKE_USE_SYSTEM_LIBRARIES=ON" + (string-append "-DCMAKE_DOC_DIR=share/doc/cmake-" + ,(version-major+minor (package-version + cmake-bootstrap)))) + + ;; This is the CMake used in cmake-build-system. Ensure compiler + ;; optimizations are enabled to save size and CPU cycles. + #:build-type "Release" + #:phases + (modify-phases %standard-phases + ,@%common-build-phases + (replace 'check + (lambda* (#:key tests? parallel-tests? #:allow-other-keys) + (let ((skipped-tests (list ,@%common-disabled-tests + ;; This test requires the bundled libuv. + "BootstrapTest"))) + (if tests? + (begin + (invoke "ctest" "-j" (if parallel-tests? + (number->string (parallel-job-count)) + "1") + "--exclude-regex" + (string-append "^(" (string-join skipped-tests "|") ")$"))) + (format #t "test suite not run~%")) + #t)))) + ,@(if (%current-target-system) + '() + `(#:cmake ,cmake-bootstrap)))))) + +;;; The "user-facing" CMake, now with manuals and HTML documentation. (define-public cmake (package (inherit cmake-minimal) (name "cmake") (arguments (substitute-keyword-arguments (package-arguments cmake-minimal) - ((#:configure-flags configure-flags ''()) - `(append ,configure-flags - ;; Extra configure flags used to generate the documentation. - '("--sphinx-info" - "--sphinx-man" - "--sphinx-html"))) + ;; Use cmake-minimal this time. + ((#:cmake _ #f) + (if (%current-target-system) + cmake-minimal-cross + cmake-minimal)) + + ;; Enable debugging information for convenience. + ((#:build-type _ #f) "RelWithDebInfo") + + ((#:configure-flags flags ''()) + `(append (list "-DSPHINX_INFO=ON" "-DSPHINX_MAN=ON" "-DSPHINX_HTML=ON" + (string-append "-DCMAKE_DOC_DIR=share/doc/cmake-" + ,(version-major+minor (package-version + cmake-minimal))) + "-DCMAKE_INFO_DIR=share/info" + "-DCMAKE_MAN_DIR=share/man") + ,flags)) ((#:phases phases) `(modify-phases ,phases (add-after 'install 'move-html-doc @@ -208,45 +338,13 @@ and workspaces that can be used in the compiler environment of your choice.") (outputs '("out" "doc")) (properties (alist-delete 'hidden? (package-properties cmake-minimal))))) -(define-public cmake-3.15.5 - ;; CMake 3.15.5 fixes some issues, but declare another version to - ;; avoid triggering the rebuild of all CMake-based packages. - ;; See <https://issues.guix.gnu.org/issue/38060>. - ;; - ;; Furthermore, this variant fixes X.509 certificate lookup: - ;; <https://issues.guix.gnu.org/issue/37371>. +(define-public cmake-minimal-cross (package - (inherit cmake) - (version "3.15.5") - (source (origin - (inherit (package-source cmake)) - (uri (string-append "https://www.cmake.org/files/v" - (version-major+minor version) - "/cmake-" version ".tar.gz")) - (sha256 - (base32 - "1d5y8d92axcc6rfqlsxamayfs3fc1vdby91hn5mx1kn02ppprpgv")) - (patches - (append (search-patches "cmake-curl-certificates.patch") - (origin-patches (package-source cmake)))))) - - (native-search-paths - ;; "cmake-curl-certificates.patch" changes CMake to honor 'SSL_CERT_DIR' - ;; and 'SSL_CERT_FILE', hence these search path entries. - (append (list (search-path-specification - (variable "SSL_CERT_DIR") - (separator #f) ;single entry - (files '("etc/ssl/certs"))) - (search-path-specification - (variable "SSL_CERT_FILE") - (file-type 'regular) - (separator #f) ;single entry - (files '("etc/ssl/certs/ca-certificates.crt")))) - (package-native-search-paths cmake))))) - -;; This was cmake@3.15.1 plus "cmake-curl-certificates.patch". -(define-deprecated cmake/fixed cmake-3.15.5) -(export cmake/fixed) + (inherit cmake-minimal) + (name "cmake-minimal-cross") + (native-search-paths '()) + (search-paths + (package-native-search-paths cmake-minimal)))) (define-public emacs-cmake-mode (package diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index ff30fbd86f..fcf0e07db7 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -30,6 +30,7 @@ (define-module (gnu packages code) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) @@ -660,9 +661,24 @@ the C, C++, C++/CLI, Objective‑C, C#, and Java programming languages.") ;; overrides this to be in PREFIX/doc. Fix this. (substitute* "doc/Makefile.in" (("^docdir = .*$") "docdir = @docdir@\n")) + #t)) + (add-after 'unpack 'fix-configure + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.sub and config.guess: + (with-directory-excursion "config" + (for-each (lambda (file) + (install-file + (string-append (assoc-ref + (or native-inputs inputs) "automake") + "/share/automake-" + ,(version-major+minor + (package-version automake)) + "/" file) ".")) + '("config.sub" "config.guess"))) #t))))) (native-inputs - `(("texinfo" ,texinfo))) + `(("texinfo" ,texinfo) + ("automake" ,automake))) ; For up to date 'config.guess' and 'config.sub'. (synopsis "Code reformatter") (description "Indent is a program that makes source code easier to read by diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 46b3859b6e..59ef5d078b 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -5,8 +5,9 @@ ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> -;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,7 +32,6 @@ #:use-module (gnu packages c) #:use-module (gnu packages gcc) #:use-module (gnu packages m4) - #:use-module (gnu packages file) #:use-module (gnu packages gawk) #:use-module (gnu packages bison) #:use-module (gnu packages flex) @@ -44,13 +44,16 @@ #:use-module (gnu packages python) #:use-module (gnu packages linux) #:use-module (gnu packages hurd) + #:use-module (gnu packages shells) #:use-module (gnu packages texinfo) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages rsync) #:use-module (gnu packages xml) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix memoization) #:use-module (guix utils) #:use-module (srfi srfi-1) @@ -80,81 +83,369 @@ ;;; ;;; Code: +(define bootar + (package + (name "bootar") + (version "1a") + (source (origin + (method url-fetch) + (uri (list (string-append + "mirror://gnu/guix/mirror/bootar-" version ".ses") + (string-append + "https://files.ngyro.com/bootar/bootar-" + version ".ses"))) + (sha256 + (base32 + "0mvp6vgx0q316fvy3z2lddlc5xgq5np3bm1fypgvj6dnayibg9np")))) + (build-system gnu-build-system) + (arguments + `(#:implicit-inputs? #f + #:tests? #f + #:guile ,%bootstrap-guile + #:imported-modules ((guix build gnu-bootstrap) + ,@%gnu-build-system-modules) + #:phases + (begin + (use-modules (guix build gnu-bootstrap)) + (modify-phases %standard-phases + (replace 'unpack + (lambda* (#:key inputs #:allow-other-keys) + (let* ((source (assoc-ref inputs "source")) + (guile-dir (assoc-ref inputs "guile")) + (guile (string-append guile-dir "/bin/guile"))) + (invoke guile "--no-auto-compile" source) + (chdir "bootar") + #t))) + (replace 'configure (bootstrap-configure ,version "." "scripts")) + (replace 'build (bootstrap-build ".")) + (replace 'install (bootstrap-install "." "scripts")))))) + (inputs `(("guile" ,%bootstrap-guile))) + (home-page "https://git.ngyro.com/bootar") + (synopsis "Tar decompression and extraction in Guile Scheme") + (description "Bootar is a simple Tar extractor written in Guile +Scheme. It supports running 'tar xvf' on uncompressed tarballs or +tarballs that are compressed with BZip2, GZip, or XZ. It also provides +standalone scripts for 'bzip2', 'gzip', and 'xz' that each support +decompression to standard output. + +What makes this special is that Bootar is distributed as a +self-extracting Scheme (SES) program. That is, a little script that +outputs the source code of Bootar. This makes it possible to go from +pure Scheme to Tar and decompression in one easy step.") + (license license:gpl3+))) + +(define gash-boot + (package + (inherit gash) + (name "gash-boot") + (source (origin + (inherit (package-source gash)) + (modules '()))) + (arguments + `(#:implicit-inputs? #f + #:tests? #f + #:guile ,%bootstrap-guile + #:imported-modules ((guix build gnu-bootstrap) + ,@%gnu-build-system-modules) + #:phases + (begin + (use-modules (guix build gnu-bootstrap)) + (modify-phases %standard-phases + (replace 'configure + (bootstrap-configure ,(package-version gash) "gash" "scripts")) + (replace 'build (bootstrap-build "gash")) + (replace 'install (bootstrap-install "gash" "scripts")) + (add-after 'install 'install-symlinks + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (symlink (string-append out "/bin/gash") + (string-append out "/bin/sh")) + (symlink (string-append out "/bin/gash") + (string-append out "/bin/bash")) + #t))))))) + (inputs `(("guile" ,%bootstrap-guile))) + (native-inputs `(("bootar" ,bootar))))) + +(define gash-utils-boot + (package + (inherit gash-utils) + (name "gash-utils-boot") + (arguments + `(#:implicit-inputs? #f + #:tests? #f + #:guile ,%bootstrap-guile + #:imported-modules ((guix build gnu-bootstrap) + ,@%gnu-build-system-modules) + #:phases + (begin + (use-modules (guix build gnu-bootstrap)) + (modify-phases %standard-phases + (add-after 'unpack 'set-load-path + (lambda* (#:key inputs #:allow-other-keys) + (let ((gash (assoc-ref inputs "gash"))) + (add-to-load-path (string-append gash "/share/guile/site/" + (effective-version)))) + #t)) + (add-before 'configure 'pre-configure + (lambda _ + (format #t "Creating gash/commands/testb.scm~%") + (copy-file "gash/commands/test.scm" + "gash/commands/testb.scm") + (substitute* "gash/commands/testb.scm" + (("gash commands test") "gash commands testb") + (("apply test [(]cdr") "apply test/bracket (cdr")) + (for-each (lambda (script) + (let ((target (string-append "scripts/" + script ".in"))) + (format #t "Creating scripts/~a~%" target) + (copy-file "scripts/template.in" target) + (substitute* target + (("@UTILITY@") script)))) + '("awk" "basename" "cat" "chmod" "cmp" "command" + "compress" "cp" "cut" "diff" "dirname" "expr" + "false" "find" "grep" "head" "ln" "ls" "mkdir" + "mv" "printf" "pwd" "reboot" "rm" "rmdir" + "sed" "sleep" "sort" "tar" "test" "touch" "tr" + "true" "uname" "uniq" "wc" "which")) + (format #t "Creating scripts/[.in~%") + (copy-file "scripts/template.in" "scripts/[.in") + (substitute* "scripts/[.in" + (("@UTILITY@") "testb")) + (delete-file "scripts/template.in") + #t)) + (replace 'configure + (bootstrap-configure ,(package-version gash-utils) + "gash" "scripts")) + (replace 'build (bootstrap-build "gash")) + (replace 'install (bootstrap-install "gash" "scripts")) + ;; XXX: The scripts should add Gash to their load paths and + ;; this phase should not exist. + (add-after 'install 'copy-gash + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (moddir (string-append out "/share/guile/site/" + (effective-version))) + (godir (string-append out "/lib/guile/" + (effective-version) + "/site-ccache")) + (gash (assoc-ref inputs "gash")) + (gash-moddir (string-append gash "/share/guile/site/" + (effective-version))) + (gash-godir (string-append gash "/lib/guile/" + (effective-version) + "/site-ccache"))) + (copy-file (string-append gash-moddir "/gash/compat.scm") + (string-append moddir "/gash/compat.scm")) + (copy-recursively (string-append gash-moddir "/gash/compat") + (string-append moddir "/gash/compat")) + (copy-file (string-append gash-godir "/gash/compat.go") + (string-append godir "/gash/compat.go")) + (copy-recursively (string-append gash-godir "/gash/compat") + (string-append godir "/gash/compat")) + #t))))))) + (inputs `(("gash" ,gash-boot) + ("guile" ,%bootstrap-guile))) + (native-inputs `(("bootar" ,bootar))))) + +(define (%boot-gash-inputs) + `(("bash" , gash-boot) ; gnu-build-system wants "bash" + ("coreutils" , gash-utils-boot) + ("bootar" ,bootar) + ("guile" ,%bootstrap-guile))) + +(define %bootstrap-mes-rewired + (package + (inherit mes) + (name "bootstrap-mes-rewired") + (version "0.19") + (source #f) + (native-inputs `(("mes" ,%bootstrap-mes) + ("gash" ,gash-boot))) + (inputs '()) + (propagated-inputs '()) + (outputs '("out")) + (build-system trivial-build-system) + (arguments + `(#:guile ,%bootstrap-guile + #:modules ((guix build utils)) + + #:builder (begin + (use-modules (guix build utils) + (srfi srfi-26)) + + (let* ((mes (assoc-ref %build-inputs "mes")) + (gash (assoc-ref %build-inputs "gash")) + (mes-bin (string-append mes "/bin")) + (guile (string-append mes-bin "/mes")) + (mes-module (string-append mes "/share/mes/module")) + (out (assoc-ref %outputs "out")) + (bin (string-append out "/bin")) + (mescc (string-append bin "/mescc")) + (module (string-append out "/share/mes/module"))) + (define (rewire file) + (substitute* file + ((mes) out) + (("/gnu/store[^ ]+mes-minimal-[^/)}\"]*") out) + (("/gnu/store[^ ]+guile-[^/]*/bin/guile") guile) + (("/gnu/store[^ ]+bash-[^/)}\"]*") gash))) + + (mkdir-p bin) + (for-each (lambda (file) (install-file file bin)) + (find-files mes-bin)) + (mkdir-p module) + (copy-recursively (string-append mes-module "/mes") + (string-append module "/mes")) + (copy-recursively (string-append mes-module "/srfi") + (string-append module "/srfi")) + (for-each rewire + ;; Cannot easily rewire "mes" because it + ;; contains NUL characters; would require + ;; remove-store-references alike trick + (filter (negate (cut string-suffix? "/mes" <>)) + (find-files bin))) + (rewire (string-append module "/mes/boot-0.scm")) + + (delete-file mescc) + (with-output-to-file mescc + (lambda _ + (display (string-append + "\ +#! " gash "/bin/sh +LANG=C +LC_ALL=C +export LANG LC_ALL + +MES_PREFIX=${MES_REWIRED_PREFIX-" out "/share/mes} +MES=" bin "/mes +export MES MES_PREFIX + +MES_ARENA=${MES_REWIRED_ARENA-10000000} +MES_MAX_ARENA=${MES_REWIRED_ARENA-10000000} +MES_STACK=${MES_REWIRED_STACK-1000000} +export MES_ARENA MES_MAX_ARENA MES_STACK + +$MES -e '(mescc)' module/mescc.scm -- \"$@\" +")))) + (chmod mescc #o555) + + (with-directory-excursion module + (chmod "mes/base.mes" #o644) + (copy-file "mes/base.mes" "mes/base.mes.orig") + (let ((base.mes (open-file "mes/base.mes" "a"))) + (display " +;; A fixed map, from Mes 0.21, required to bootstrap Mes 0.21 +(define (map f h . t) + (if (or (null? h) + (and (pair? t) (null? (car t))) + (and (pair? t) (pair? (cdr t)) (null? (cadr t)))) '() + (if (null? t) (cons (f (car h)) (map f (cdr h))) + (if (null? (cdr t)) + (cons (f (car h) (caar t)) (map f (cdr h) (cdar t))) + (if (null? (cddr t)) + (cons (f (car h) (caar t) (caadr t)) (map f (cdr h) (cdar t) (cdadr t))) + (error 'unsupported (cons* 'map-4: f h t))b ))))) +" base.mes) + (close base.mes)) + + (chmod "mes/guile.mes" #o644) + (copy-file "mes/guile.mes" "mes/guile.mes.orig") + (let ((guile.mes (open-file "mes/guile.mes" "a"))) + (display " +;; After booting guile.scm; use Mes 0.21; especially: MesCC 0.21 +(let* ((self (car (command-line))) + (prefix (dirname (dirname self)))) + (set! %moduledir (string-append prefix \"/mes/module/\")) + (setenv \"%numbered_arch\" \"true\")) + +" guile.mes) + (close guile.mes))) + #t)))))) + (define mes-boot (package (inherit mes) (name "mes-boot") - (version "0.19") + (version "0.22") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/mes/" "mes-" version ".tar.gz")) (sha256 (base32 - "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0")))) + "0p1jsrrmcbc0zrvbvnjbb6iyxr0in71km293q8qj6gnar6bw09av")))) (inputs '()) (propagated-inputs '()) (native-inputs - `(("mescc-tools" ,%bootstrap-mescc-tools) - ("nyacc-source" ,(bootstrap-origin - (package-source nyacc-0.86))) - - ("coreutils" , %bootstrap-coreutils&co) - ("bootstrap-mes" ,%bootstrap-mes))) + `(("nyacc-source" ,(origin (inherit (package-source nyacc)) + (snippet #f))) + ("mes" ,%bootstrap-mes-rewired) + ("mescc-tools" ,%bootstrap-mescc-tools) + ,@(%boot-gash-inputs))) (arguments `(#:implicit-inputs? #f + #:tests? #f #:guile ,%bootstrap-guile #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries #:phases (modify-phases %standard-phases (add-after 'unpack 'unpack-seeds (lambda _ - (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")) - (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes"))) + (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source"))) (with-directory-excursion ".." - (mkdir-p "nyacc-source") - (invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf" nyacc-source) - (symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed")) - #t))) + (invoke "tar" "-xvf" nyacc-source))))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref %outputs "out"))) - (setenv "GUILE" "mes") - (setenv "GUILE_EFFECTIVE_VERSION" "2.2") - (setenv "GUILE_LOAD_PATH" "nyacc") - (symlink (string-append "../nyacc-source/module") "nyacc") - (invoke "bash" "configure.sh" - (string-append "--prefix=" out))))) + (let ((out (assoc-ref %outputs "out")) + (gash (assoc-ref %build-inputs "bash")) + (mes (assoc-ref %build-inputs "mes")) + (dir (with-directory-excursion ".." (getcwd)))) + (setenv "AR" (string-append "gash " (getcwd) "/scripts/mesar")) + (setenv "BASH" (string-append gash "/bin/bash")) + (setenv "CC" (string-append mes "/bin/mescc")) + (setenv "GUILE_LOAD_PATH" + (string-append + mes "/share/mes/module" + ":" dir "/nyacc-0.99.0/module")) + (invoke "gash" "configure.sh" + (string-append "--prefix=" out) + (string-append "--host=i686-linux-gnu"))))) (replace 'build (lambda _ - (let ((mes (assoc-ref %build-inputs "bootstrap-mes"))) - (setenv "MES_PREFIX" (string-append mes "/share/mes")) - (setenv "MES_ARENA" "100000000") - (setenv "MES_MAX_ARENA" "100000000") - (setenv "MES_STACK" "10000000") - (invoke "sh" "bootstrap.sh")))) - (replace 'check - (lambda _ - (setenv "DIFF" "sh scripts/diff.scm") - ;; fail fast tests - ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t") - ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/63-struct-cell") - (invoke "sh" "check.sh"))) + (invoke "sh" "bootstrap.sh"))) + (delete 'check) (replace 'install (lambda _ - (invoke "sh" "install.sh")))))) + (substitute* "install.sh" ; show some progress + ((" -xf") " -xvf") + (("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd) + (string-append space "echo '" cmd "'\n" + space cmd "\n"))) + (invoke "sh" "install.sh") + ;; Keep ASCII output, for friendlier comparison and bisection + (let* ((out (assoc-ref %outputs "out")) + (cache (string-append out "/lib/cache"))) + (define (objects-in-dir dir) + (find-files dir + (lambda (name stat) + (and (equal? (dirname name) dir) + (or (string-suffix? ".o" name) + (string-suffix? ".s" name)))))) + (for-each (lambda (x) (install-file x cache)) + (append (objects-in-dir ".") + (objects-in-dir "mescc-lib")))) + #t))))) (native-search-paths - ;; Use the language-specific variables rather than 'CPATH' because they - ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'. - ;; The intent is to allow headers that are in the search path to be - ;; treated as "system headers" (headers exempt from warnings) just like - ;; the typical /usr/include headers on an FHS system. (list (search-path-specification (variable "C_INCLUDE_PATH") - (files '("share/mes/include"))) + (files '("include"))) (search-path-specification (variable "LIBRARY_PATH") - (files '("share/mes/lib"))))))) + (files '("lib"))) + (search-path-specification + (variable "MES_PREFIX") + (separator #f) + (files '(""))))))) + (define tcc-boot0 ;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 11 @@ -163,266 +454,467 @@ ;; bootstrappable effort; we will try again later. These patches have been ;; ported to 0.9.27, alas the resulting tcc is buggy. Once MesCC is more ;; mature, this package should use the 0.9.27 sources (or later). - (let ((version "0.9.26") - (revision "6") - (commit "c004e9a34fb026bb44d211ab98bb768e79900eef")) - (package - (inherit tcc) - (name "tcc-boot0") - (version (string-append version "-" revision "." (string-take commit 7))) - (source (origin - (method url-fetch) - (uri (list (string-append "mirror://gnu/guix/mirror" - "/tinycc-" commit ".tar.gz") - (string-append "https://gitlab.com/janneke/tinycc" - "/-/archive/" commit - "/tinycc-" commit ".tar.gz"))) - (sha256 - (base32 - "1hmzn1pq0x22ppd80hyrn5qzqq94mxd0ychzj6vrr2vnj2frjv5b")))) - (build-system gnu-build-system) - (supported-systems '("i686-linux" "x86_64-linux")) - (inputs '()) - (propagated-inputs '()) - (native-inputs - `(("mes" ,mes-boot) - ("mescc-tools" ,%bootstrap-mescc-tools) - ("nyacc-source" ,(bootstrap-origin - (package-source nyacc-0.86))) - - ("coreutils" , %bootstrap-coreutils&co) - ("bootstrap-mes" ,%bootstrap-mes))) - (arguments - `(#:implicit-inputs? #f - #:guile ,%bootstrap-guile - #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-seeds - (lambda* (#:key outputs #:allow-other-keys) - (let* ((coreutils (assoc-ref %build-inputs "coreutils")) - (nyacc-source (assoc-ref %build-inputs "nyacc-source")) - (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes"))) - (setenv "PATH" (string-append - coreutils "/bin")) - (format (current-error-port) "PATH=~s\n" (getenv "PATH")) - (with-directory-excursion ".." - (mkdir-p "nyacc-source") - (invoke "tar" "--strip=1" "-C" "nyacc-source" - "-xvf" nyacc-source) - (symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed")) - #t))) - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref %outputs "out")) - (dir (with-directory-excursion ".." (getcwd))) - (coreutils (assoc-ref %build-inputs "coreutils")) - (mes (assoc-ref %build-inputs "mes")) - (mescc-tools (assoc-ref %build-inputs "mescc-tools")) - (libc (assoc-ref %build-inputs "libc")) - (interpreter (if libc - ;; also for x86_64-linux, we are still on i686-linux - (string-append libc ,(glibc-dynamic-linker "i686-linux")) - (string-append mes "/lib/mes-loader")))) - (setenv "PATH" (string-append - coreutils "/bin" - ":" mes "/bin" - ":" mescc-tools "/bin")) - (format (current-error-port) "PATH=~s\n" (getenv "PATH")) - - (setenv "PREFIX" out) - (symlink (string-append mes "/share/mes") "mes") - (symlink (string-append "../nyacc-source/module") "nyacc") - (setenv "MES_PREFIX" "mes") - (setenv "MES_ARENA" "100000000") - (setenv "MES_MAX_ARENA" "100000000") - (setenv "MES_STACK" "10000000") - (setenv "MES" "mes") - (setenv "GUILE_LOAD_PATH" "nyacc") - (invoke "sh" "configure" - "--prefix=$PREFIX" - (string-append "--elfinterp=" interpreter) - "--crtprefix=." - "--tccdir=.")))) - (replace 'build - (lambda _ - (substitute* "bootstrap.sh" - (("^ cmp") "# cmp")) - (invoke "sh" "bootstrap.sh"))) - (replace 'check - (lambda _ - (setenv "DIFF" "diff.scm") - (setenv "OBJDUMP" "true") - ;; fail fast tests - ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen") - ;; (invoke "sh" "-x" "test.sh" "mes/scaffold/tinycc/00_assignment") - (setenv "TCC" "./tcc") - (invoke "sh" "check.sh"))) - (replace 'install - (lambda _ - (invoke "sh" "install.sh")))))) - (native-search-paths - ;; Use the language-specific variables rather than 'CPATH' because they - ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'. - ;; The intent is to allow headers that are in the search path to be - ;; treated as "system headers" (headers exempt from warnings) just like - ;; the typical /usr/include headers on an FHS system. - (list (search-path-specification - (variable "C_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "LIBRARY_PATH") - (files '("lib")))))))) - -(define tcc-boot (package - (inherit tcc-boot0) - (name "tcc-boot") - (version "0.9.27") - (source (bootstrap-origin - (origin - (inherit (package-source tcc)) - (patches (search-patches "tcc-boot-0.9.27.patch"))))) + (inherit tcc) + (name "tcc-boot0") + (version "0.9.26-1103-g6e62e0e") + (source (origin + (method url-fetch) + (uri (string-append + "http://lilypond.org/janneke/mes/20191117/" + "/tcc-" version ".tar.gz")) + (sha256 + (base32 + "1qbybw7mxbgkv3sazvz1v7c8byq998vk8f1h25ik8w3d2l63lxng")))) (build-system gnu-build-system) + (supported-systems '("i686-linux" "x86_64-linux")) (inputs '()) (propagated-inputs '()) (native-inputs `(("mes" ,mes-boot) - ("tcc" ,tcc-boot0) - - ("coreutils" , %bootstrap-coreutils&co))) + ("nyacc-source" ,(origin (inherit (package-source nyacc)) + (snippet #f))) + ("mescc-tools" ,%bootstrap-mescc-tools) + ,@(%boot-gash-inputs))) (arguments `(#:implicit-inputs? #f #:guile ,%bootstrap-guile - - ;; Binutils' 'strip' b0rkes MesCC/M1/hex2 binaries, tcc-boot also comes - ;; with MesCC/M1/hex2-built binaries. - #:strip-binaries? #f - + #:validate-runpath? #f ; no dynamic executables + #:strip-binaries? #f ; no strip yet #:phases (modify-phases %standard-phases + (add-after 'unpack 'unpack-seeds + (lambda* (#:key outputs #:allow-other-keys) + (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source"))) + (with-directory-excursion ".." + (invoke "tar" "-xvf" nyacc-source))))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref %outputs "out")) - (coreutils (assoc-ref %build-inputs "coreutils")) - (mes (assoc-ref %build-inputs "mes")) - (tcc (assoc-ref %build-inputs "tcc")) - (libc (assoc-ref %build-inputs "libc")) - (interpreter (if libc - ;; also for x86_64-linux, we are still on i686-linux - (string-append libc ,(glibc-dynamic-linker "i686-linux")) - (string-append mes "/lib/mes-loader")))) - ;; unpack - (setenv "PATH" (string-append - coreutils "/bin" - ":" tcc "/bin")) - (format (current-error-port) "PATH=~s\n" (getenv "PATH")) + (dir (with-directory-excursion ".." (getcwd))) + (interpreter "/lib/mes-loader")) + + (setenv "prefix" out) + (setenv "GUILE_LOAD_PATH" + (string-append dir "/nyacc-0.99.0/module")) + + (substitute* "conftest.c" + (("volatile") "")) + (invoke "sh" "configure" - (string-append "--cc=tcc") - (string-append "--cpu=i386") + "--cc=mescc" (string-append "--prefix=" out) (string-append "--elfinterp=" interpreter) - (string-append "--crtprefix=" tcc "/lib") - (string-append "--sysincludepaths=" tcc "/include") - (string-append "--libpaths=" tcc "/lib"))))) + "--crtprefix=." + "--tccdir=.")))) (replace 'build - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref %outputs "out")) - (mes (assoc-ref %build-inputs "mes")) - (tcc (assoc-ref %build-inputs "tcc")) - (libc (assoc-ref %build-inputs "libc")) - (interpreter (if libc - ;; also for x86_64-linux, we are still on i686-linux - (string-append libc ,(glibc-dynamic-linker "i686-linux")) - (string-append mes "/lib/mes-loader")))) - (invoke "tcc" - "-vvv" - "-D" "BOOTSTRAP=1" - "-D" "ONE_SOURCE=1" - "-D" "TCC_TARGET_I386=1" - "-D" "CONFIG_TCC_STATIC=1" - "-D" "CONFIG_USE_LIBGCC=1" - "-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"") - "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"") - "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out - "/lib:{B}/lib:.\"") - "-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"") - "-D" (string-append "CONFIG_TCC_LIBPATHS=\"" tcc "/lib:{B}/lib:.\"") - "-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\"" tcc "/include" ":/include:{B}/include\"") - "-D" (string-append "TCC_LIBGCC=\"" tcc "/lib/libc.a\"") - "-o" "tcc" - "tcc.c")))) + (lambda _ + (substitute* "bootstrap.sh" ; Show some progress + (("^( *)((cp|ls|mkdir|rm|[.]/tcc|[.]/[$][{PROGRAM_PREFIX[}]tcc) [^\"]*[^\\])\n" all space cmd) + (string-append space "echo \"" cmd "\"\n" + space cmd "\n"))) + (invoke "sh" "bootstrap.sh"))) (replace 'check (lambda _ - ;; FIXME: add sensible check target (without depending on make) - ;; ./check.sh ? - (= 1 (status:exit-val (system* "./tcc" "--help"))))) + ;; fail fast tests + (system* "./tcc" "--help") ; --help exits 1 + ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen") + ;; (invoke "sh" "-x" "test.sh" "mes/scaffold/tinycc/00_assignment") + ;; TODO: add sensible check target (without depending on make) + ;; (invoke "sh" "check.sh") + #t)) (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref %outputs "out")) - (tcc (assoc-ref %build-inputs "tcc"))) - (mkdir-p (string-append out "/bin")) - (copy-file "tcc" (string-append out "/bin/tcc")) - (mkdir-p (string-append out "/lib/tcc")) - (copy-recursively (string-append tcc "/include") - (string-append out "/include")) - (copy-recursively (string-append tcc "/lib") - (string-append out "/lib")) - (invoke "tcc" "-D" "TCC_TARGET_I386=1" "-c" "-o" "libtcc1.o" "lib/libtcc1.c") - (invoke "tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o") - (copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a")) - (delete-file (string-append out "/lib/tcc/libtcc1.a")) - (copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a")) - #t)))))))) + (lambda _ + (substitute* "install.sh" ; Show some progress + (("^( *)((cp|ls|mkdir|rm|tar|./[$][{PROGRAM_PREFIX[}]tcc) [^\"]*[^\\])\n" all space cmd) + (string-append space "echo \"" cmd "\"\n" + space cmd "\n"))) -(define make-mesboot0 + (invoke "sh" "install.sh")))))) + (native-search-paths + (list (search-path-specification + (variable "C_INCLUDE_PATH") + (files '("include"))) + (search-path-specification + (variable "LIBRARY_PATH") + (files '("lib"))))))) + +(define gzip-mesboot + ;; The initial gzip. We keep this scripted gzip build before building make + ;; to soften the dependency on Gash Core Utils gzip. + (package + (inherit gzip) + (version "1.2.4") + (name "gzip-mesboot") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gzip/gzip-" version ".tar")) + (sha256 + (base32 + "1rhgk2vvmdvnn6vygf0dja92ryyng00knl0kz5srb77k2kryjb2d")))) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (native-inputs `(("tcc" ,tcc-boot0) + ,@(%boot-gash-inputs))) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:strip-binaries? #f ; no strip yet + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'scripted-patch + (lambda _ + (substitute* "util.c" + (("^char [*]strlwr" all) (string-append all "_tcc_cannot_handle_dupe"))) + #t)) + (replace 'build + (lambda _ + (let ((files '("bits" "crypt" "deflate" "getopt" "gzip" + "inflate" "lzw" "trees" "unlzh" "unlzw" + "unpack" "unzip" "util" "zip"))) + (define (compile x) + (invoke "tcc" "-c" "-D NO_UTIME=1" "-D HAVE_UNISTD_H=1" + (string-append x ".c"))) + (for-each compile files) + (apply invoke + (cons* "tcc" "-o" "gzip" + (map (lambda (x) (string-append x ".o")) files))) + (link "gzip" "gunzip")))) + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (install-file "gzip" bin) + (install-file "gunzip" bin)))) + (replace 'check + (lambda _ + (invoke "./gzip" "--version"))) + ;; no gzip yet + (delete 'compress-documentation)))))) + +(define gnu-make-mesboot0 + ;; The initial make (package (inherit gnu-make) (name "make-mesboot0") (version "3.80") (source (origin (method url-fetch) - (uri (string-append "mirror://gnu/make/make-" - version ".tar.gz")) + (uri (string-append "mirror://gnu/make/make-" version ".tar.gz")) (sha256 (base32 "1pb7fb7fqf9wz9najm85qdma1xhxzf1rhj5gwrlzdsz2zm0hpcv4")))) (supported-systems '("i686-linux" "x86_64-linux")) (inputs '()) (propagated-inputs '()) - (native-inputs `(("tcc" ,tcc-boot) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co))) + (native-inputs `(("tcc" ,tcc-boot0) + ,@(%boot-gash-inputs))) (arguments `(#:implicit-inputs? #f - #:tests? #f ; check depends on perl #:guile ,%bootstrap-guile - #:configure-flags `("CC=tcc -DO_RDONLY=0" + #:configure-flags '("CC=tcc" + "CPP=tcc -E" "LD=tcc" + "--build=i686-unknown-linux-gnu" + "--host=i686-unknown-linux-gnu" "--disable-nls") + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1)) + #:strip-binaries? #f ; no strip yet #:phases (modify-phases %standard-phases + (add-after 'unpack 'scripted-patch + (lambda _ + (substitute* "build.sh.in" + (("@LIBOBJS@") "getloadavg.o") + (("@REMOTE@") "stub")) + #t)) (add-after 'configure 'configure-fixup (lambda _ - (substitute* "build.sh" - (("^REMOTE=.*") "REMOTE=stub\n") - (("^extras=.*") "extras=getloadavg.c\n")) (substitute* "make.h" (("^extern long int lseek.*" all) (string-append "// " all))) #t)) - (delete 'patch-generated-file-shebangs) ; no perl (replace 'build (lambda _ (invoke "sh" "./build.sh"))) + (replace 'check ; proper check needs awk + (lambda _ + (invoke "./make" "--version"))) (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) + (lambda _ + (let* ((out (assoc-ref %outputs "out")) (bin (string-append out "/bin"))) - (install-file "make" bin) + (install-file "make" bin))))))))) + +(define (%boot-tcc0-inputs) + `(("make" ,gnu-make-mesboot0) + ("tcc" ,tcc-boot0) + ,@(%boot-gash-inputs))) + +(define bzip2-mesboot + ;; The initial bzip2 + (package + (inherit bzip2) + (name "bzip2-mesboot") + (version (package-version bzip2)) + (source (bootstrap-origin (package-source bzip2))) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (native-inputs (%boot-tcc0-inputs)) + (outputs '("out")) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:parallel-build? #f + #:tests? #f ; check is naive, also checks non-built PROGRAMS + #:strip-binaries? #f ; no strip yet + #:make-flags (list "CC=tcc -I ." "AR=tcc -ar" "bzip2" + (string-append "PREFIX=" + (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'scripted-patch + (lambda _ + (substitute* "Makefile" + (("\tln " all) + (string-append "\t#" all))) + (substitute* "bzip2.c" + (("struct utimbuf uTimBuf;" all) + (string-append "// " all)) + (("uTimBuf[.]" all) + (string-append "// " all)) + (("retVal = utime [(] dstName, &uTimBuf [)];" all) + (string-append "retVal = 0; // " all))) + #t)) + (replace 'configure + (lambda _ + (with-output-to-file "utime.h" + (lambda _ (display " +#define fchown(filedes, owner, group) 0 +#define fchmod(filedes, mode) 0 +"))) + #t)) + (replace 'check + (lambda _ + (invoke "./bzip2" "--help"))) + ;; FIXME: no compressing gzip yet + (delete 'compress-documentation)))))) + +(define bash-mesboot0 + ;; The initial Bash + (package + (inherit static-bash) + (name "bash-mesboot0") + (version "2.05b") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/bash/bash-" + version ".tar.gz")) + (sha256 + (base32 + "1r1z2qdw3rz668nxrzwa14vk2zcn00hw7mpjn384picck49d80xs")))) + (inputs '()) + (propagated-inputs '()) + (native-inputs (%boot-tcc0-inputs)) + (outputs '("out")) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:parallel-build? #f + #:strip-binaries? #f ; no strip yet + #:configure-flags + (list "--build=i686-unknown-linux-gnu" + "--host=i686-unknown-linux-gnu" + + "--without-bash-malloc" + "--disable-readline" + "--disable-history" + "--disable-help-builtin" + "--disable-progcomp" + "--disable-net-redirections" + "--disable-nls" + + ;; Pretend 'dlopen' is missing so we don't build loadable + ;; modules and related code. + "ac_cv_func_dlopen=no") + #:make-flags '("bash") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'setenv + (lambda _ + (let* ((gash (assoc-ref %build-inputs "bash")) + (shell (string-append gash "/bin/gash"))) + (setenv "CONFIG_SHELL" shell) + (setenv "SHELL" shell) + (setenv "CC" "tcc") + (setenv "LD" "tcc") + (setenv "AR" "tcc -ar") + (setenv "CFLAGS" "-D _POSIX_VERSION=1") + #t))) + (add-after 'unpack 'scripted-patch + (lambda _ + (substitute* "Makefile.in" + (("mksyntax\\.c\n") "mksyntax.c -lgetopt\n") + (("buildversion[.]o\n") "buildversion.o -lgetopt\n") + ;; No size in Gash + (("\tsize ") "#\tsize")) + (substitute* "lib/sh/oslib.c" + (("int name, namelen;") "char *name; int namelen;")) + (substitute* "lib/sh/snprintf.c" + (("^#if (defined [(]HAVE_LOCALE_H[)])" all define) (string-append "#if 0 //" define))) + (substitute* "configure" + ((" egrep") " grep")) + #t)) + (replace 'configure + (lambda* (#:key configure-flags #:allow-other-keys) + (let ((configure-flags (filter (lambda (x) + (and (not (string-prefix? "CONFIG_SHELL=" x)) + (not (string-prefix? "SHELL=" x)))) + configure-flags))) + (format (current-error-port) + "running ./configure ~a\n" (string-join configure-flags))) + (apply invoke (cons "./configure" configure-flags)))) + (add-after 'configure 'configure-fixups + (lambda _ + (substitute* "config.h" + (("#define GETCWD_BROKEN 1") "#undef GETCWD_BROKEN")) + (let ((config.h (open-file "config.h" "a"))) + (display (string-append " +// tcc: error: undefined symbol 'enable_hostname_completion' +#define enable_hostname_completion(on_or_off) 0 + +// /gnu/store/cq0cmv35s9dhilx14zaghlc08gpc0hwr-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice +#define HAVE_POSIX_SIGNALS 1 +#define endpwent(x) 0 +") + config.h) + (close config.h)) + #t)) + (replace 'check + (lambda _ + (invoke "./bash" "--version"))) + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (copy-file "bash" (string-append bin "/bash")) + (copy-file "bash" (string-append bin "/sh")) #t)))))))) +(define tcc-boot + ;; The final tcc. + (package + (inherit tcc-boot0) + (name "tcc-boot") + (version "0.9.27") + (source (origin + (inherit (package-source tcc)) + ;; `patches' needs XZ + ;; (patches (search-patches "tcc-boot-0.9.27.patch")) + )) + (build-system gnu-build-system) + (inputs '()) + (propagated-inputs '()) + (native-inputs `(;;("boot-patch" ,(search-patch "tcc-boot-0.9.27.patch")) + ("bzip2" ,bzip2-mesboot) + ,@(%boot-tcc0-inputs))) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:validate-runpath? #f ; no dynamic executables + #:strip-binaries? #f ; no strip yet + #:phases + (modify-phases %standard-phases + ;; tar xvf ..bz2 gives + ;; bzip2: PANIC -- internal consistency error + (replace 'unpack + (lambda* (#:key source #:allow-other-keys) + (copy-file source "tarball.tar.bz2") + (invoke "bzip2" "-d" "tarball.tar.bz2") + (invoke "tar" "xvf" "tarball.tar") + (chdir (string-append "tcc-" ,version)) + #t)) + ;; no patch yet + ;; (add-after 'unpack 'apply-boot-patch + ;; (lambda* (#:key inputs #:allow-other-keys) + ;; (let ((patch-file (assoc-ref inputs "boot-patch"))) + ;; (invoke "patch" "-p1" "-i" patch-file)))) + (add-after 'unpack 'scripted-patch + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "libtcc.c" + (("s->alacarte_link = 1;" all) + (string-append all " + s->static_link = 1;"))) + #t)) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out")) + (tcc (assoc-ref %build-inputs "tcc")) + (libc (assoc-ref %build-inputs "libc")) + (interpreter "/mes/loader")) + (invoke "sh" "configure" + (string-append "--cc=tcc") + (string-append "--cpu=i386") + (string-append "--prefix=" out) + (string-append "--elfinterp=" interpreter) + (string-append "--crtprefix=" tcc "/lib") + (string-append "--sysincludepaths=" tcc "/include") + (string-append "--libpaths=" tcc "/lib"))))) + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out")) + (tcc (assoc-ref %build-inputs "tcc")) + (libc (assoc-ref %build-inputs "libc")) + (interpreter "/mes/loader")) + (invoke + "tcc" + "-vvv" + "-D" "BOOTSTRAP=1" + "-D" "ONE_SOURCE=1" + "-D" "TCC_TARGET_I386=1" + "-D" "CONFIG_TCC_STATIC=1" + "-D" "CONFIG_USE_LIBGCC=1" + "-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"") + "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"") + "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"") + "-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"") + "-D" (string-append "CONFIG_TCC_LIBPATHS=\"" tcc "/lib:{B}/lib:.\"") + "-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\"" + tcc "/include" ":/include:{B}/include\"") + "-D" (string-append "TCC_LIBGCC=\"" tcc "/lib/libc.a\"") + "-o" "tcc" + "tcc.c")))) + (replace 'check + (lambda _ + ;; FIXME: add sensible check target (without depending on make) + ;; ./check.sh ? + (= 1 (status:exit-val (system* "./tcc" "--help"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref %outputs "out")) + (tcc (assoc-ref %build-inputs "tcc"))) + (and + (mkdir-p (string-append out "/bin")) + (copy-file "tcc" (string-append out "/bin/tcc")) + (mkdir-p (string-append out "/lib/tcc")) + (copy-recursively (string-append tcc "/include") + (string-append out "/include")) + (copy-recursively (string-append tcc "/lib") + (string-append out "/lib")) + (invoke "tcc" "-D" "TCC_TARGET_I386=1" "-c" "-o" "libtcc1.o" "lib/libtcc1.c") + (invoke "tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o") + (copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a")) + (delete-file (string-append out "/lib/tcc/libtcc1.a")) + (copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a")) + #t))))))))) + (define diffutils-mesboot + ;; The initial diffutils. (package (inherit diffutils) (name "diffutils-mesboot") @@ -437,12 +929,7 @@ (supported-systems '("i686-linux" "x86_64-linux")) (inputs '()) (propagated-inputs '()) - (native-inputs `(("mes" ,mes-boot) - ("tcc" ,tcc-boot) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("make" ,make-mesboot0))) + (native-inputs (%boot-tcc0-inputs)) (arguments `(#:implicit-inputs? #f #:guile ,%bootstrap-guile @@ -451,97 +938,207 @@ #:strip-binaries? #f ; no strip yet #:phases (modify-phases %standard-phases - ;; diffutils-2.7 needs more traditional configure - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (bash (assoc-ref %build-inputs "bash"))) - (setenv "CONFIG_SHELL" (string-append bash "/bin/sh")) - (setenv "CC" "tcc") - (setenv "LD" "tcc") - (invoke "./configure" (string-append "--prefix=" out))))) (add-before 'configure 'remove-diff3-sdiff (lambda* (#:key outputs #:allow-other-keys) (substitute* "Makefile.in" - (("PROGRAMS = .*" all) "PROGRAMS = cmp diff")) - #t))))))) + (("PROGRAMS = .*" all) "PROGRAMS = cmp diff")))) + (replace 'configure ; needs classic invocation of configure + (lambda* (#:key configure-flags #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (setenv "CONFIG_SHELL" shell) + (setenv "CC" "tcc") + (setenv "LD" "tcc") + (format (current-error-port) + "running ./configure ~a\n" (string-join configure-flags)) + (apply invoke (cons "./configure" configure-flags))))) + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (install-file "cmp" bin) + (install-file "diff" bin) + #t)))))))) + +(define patch-mesboot + ;; The initial patch. + (package + (inherit patch) + (name "patch-mesboot") + (version "2.5.9") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/patch/patch-" + version ".tar.gz")) + (sha256 + (base32 + "12nv7jx3gxfp50y11nxzlnmqqrpicjggw6pcsq0wyavkkm3cddgc")))) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (native-inputs (%boot-tcc0-inputs)) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:parallel-build? #f + #:tests? #f ; check is naive, also checks non-built PROGRAMS + #:strip-binaries? #f ; no strip yet + #:configure-flags '("AR=tcc -ar" "CC=tcc" "LD-tcc") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'scripted-patch + (lambda _ + ;; avoid another segfault + (substitute* "pch.c" + (("while [(]p_end >= 0[)]" all) + "p_end = -1;\nwhile (0)")) + #t)) + ;; FIXME: no compressing gzip yet + (delete 'compress-documentation)))))) + +(define sed-mesboot0 + ;; The initial sed. + (package + (inherit sed) + (name "sed-mesboot0") + (version "1.18") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/sed/sed-" + version ".tar.gz")) + (sha256 + (base32 + "1hyv7i82jd0q18xcql51ylc8jwadp3gb3irgcqlis3v61p35jsv2")))) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (native-inputs (%boot-tcc0-inputs)) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:parallel-build? #f + #:configure-flags '("CC=tcc") + #:make-flags '("CC=tcc" "extra_objs=" "DEFS=-D HAVE_BCOPY") + #:strip-binaries? #f ; no strip yet + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'scripted-patch + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (substitute* "configure" + (("/bin/sh") shell)) + #t))) + (replace 'check + (lambda _ + (invoke "./sed" "--version"))) + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (install-file "sed" bin) + #t)))))))) + +(define (%boot-tcc-inputs) + `(("bash" ,bash-mesboot0) + ("bzip2" ,bzip2-mesboot) + ("diffutils" ,diffutils-mesboot) + ("gzip" ,gzip-mesboot) + ("patch" ,patch-mesboot) + ("sed" ,sed-mesboot0) + ("tcc" ,tcc-boot) + ,@(alist-delete "tcc" (%boot-tcc0-inputs)))) (define binutils-mesboot0 + ;; The initial Binutils (package (inherit binutils) (name "binutils-mesboot0") - (version "2.20.1a") - (source (bootstrap-origin - (origin - (method url-fetch) - (uri (string-append "mirror://gnu/binutils/binutils-" - version ".tar.bz2")) - (patches (search-patches "binutils-boot-2.20.1a.patch")) - (sha256 - (base32 - "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi"))))) + (version "2.14") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/binutils/binutils-" + version ".tar.gz")) + (sha256 + (base32 + "1w8xp7k44bkijr974x9918i4p1sw4g2fcd5mxvspkjpg38m214ds")))) (inputs '()) (propagated-inputs '()) - (native-inputs `(("tcc" ,tcc-boot) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) - ("make" ,make-mesboot0))) + (native-inputs (%boot-tcc-inputs)) (supported-systems '("i686-linux" "x86_64-linux")) (arguments `(#:implicit-inputs? #f #:guile ,%bootstrap-guile - #:tests? #f ; runtest: command not found + #:tests? #f ; runtest: command not found #:parallel-build? #f - #:strip-binaries? #f ; no strip yet + #:strip-binaries? #f ; no strip yet #:configure-flags - (let ((cppflags (string-append " -D __GLIBC_MINOR__=6" - " -D MES_BOOTSTRAP=1")) - (bash (assoc-ref %build-inputs "bash"))) - `(,(string-append "CONFIG_SHELL=" bash "/bin/sh") - ,(string-append "CPPFLAGS=" cppflags) - "AR=tcc -ar" - "CXX=false" - "RANLIB=true" - ,(string-append "CC=tcc" cppflags) - "--disable-nls" + (let ((out (assoc-ref %outputs "out"))) + `("--disable-nls" "--disable-shared" "--disable-werror" - "--build=i686-unknown-linux-gnu" - "--host=i686-unknown-linux-gnu" - "--with-sysroot=/")))))) + "--build=i386-unknown-linux" + "--host=i386-unknown-linux" + "--target=i386-unknown-linux" + "--with-sysroot=/" + ,(string-append "--prefix=" out))) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'setenv + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (setenv "CONFIG_SHELL" shell) + (setenv "SHELL" shell) + (setenv "AR" "tcc -ar") + (setenv "RANLIB" "true") + (setenv "CC" "tcc -D __GLIBC_MINOR__=6") + #t))) + (add-after 'unpack 'scripted-patch + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "bfd/configure" + (("^sed -e '/SRC-POTFILES.*" all) + "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' > po/Makefile\n")) + #t)) + (replace 'configure ; needs classic invocation of configure + (lambda* (#:key configure-flags #:allow-other-keys) + (format (current-error-port) + "running ./configure ~a\n" (string-join configure-flags)) + (apply system* "./configure" configure-flags) + (substitute* "config.status" + (("[.]//dev/null") "/dev/null")) + (invoke "sh" "./config.status")))))))) -(define gcc-core-mesboot +(define gcc-core-mesboot0 ;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C ;; Library v0.16 offers. Gcc-3.x (and 4.x) place higher demands on a C ;; library, such as dir.h/struct DIR/readdir, locales, signals... Also, - ;; with gcc-2.95.3, binutils-boot-2.20.1a and glibc-2.2.5 we found a GNU - ;; toolchain triplet "that works". + ;; with gcc-2.95.3, binutils (2.14.0, 2.20.1a) and glibc-2.2.5 we found a + ;; GNU toolchain triplet "that works". (package (inherit gcc) - (name "gcc-core-mesboot") + (name "gcc-core-mesboot0") (version "2.95.3") - (source (bootstrap-origin - (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-" - version - ".tar.gz")) - (patches (search-patches "gcc-boot-2.95.3.patch")) - (sha256 - (base32 - "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))) + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-" + version + ".tar.gz")) + ;; `patches' needs XZ + ;; (patches (search-patches "gcc-boot-2.95.3.patch")) + (sha256 + (base32 + "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an")))) (supported-systems '("i686-linux" "x86_64-linux")) (inputs '()) (propagated-inputs '()) - (native-inputs `(("binutils" ,binutils-mesboot0) - ("tcc" ,tcc-boot) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) - ("make" ,make-mesboot0))) + (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-2.95.3.patch")) + ("binutils" ,binutils-mesboot0) + ,@(%boot-tcc-inputs))) (outputs '("out")) (arguments `(#:implicit-inputs? #f @@ -557,32 +1154,37 @@ "--build=i686-unknown-linux-gnu" "--host=i686-unknown-linux-gnu" ,(string-append "--prefix=" out))) - #:make-flags (list - "CC=tcc -static -D __GLIBC_MINOR__=6" - "OLDCC=tcc -static -D __GLIBC_MINOR__=6" - "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6" - "AR=ar" - "RANLIB=ranlib" - (string-append "LIBGCC2_INCLUDES=-I " - (assoc-ref %build-inputs "tcc") - "/include") - "LANGUAGES=c" - (string-append "BOOT_LDFLAGS=" - " -B" (assoc-ref %build-inputs "tcc") - "/lib/")) + #:make-flags + `("CC=tcc -static -D __GLIBC_MINOR__=6" + "OLDCC=tcc -static -D __GLIBC_MINOR__=6" + "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6" + "AR=ar" + "RANLIB=ranlib" + ,(string-append "LIBGCC2_INCLUDES=-I " + (assoc-ref %build-inputs "tcc") + "/include") + "LANGUAGES=c" + ,(string-append "BOOT_LDFLAGS=" + " -B" (assoc-ref %build-inputs "tcc") + "/lib/")) #:modules ((guix build gnu-build-system) (guix build utils) (srfi srfi-1)) #:phases (modify-phases %standard-phases - ;; gcc-2.95.3 needs more traditional configure + (add-after 'unpack 'apply-boot-patch + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch-file (assoc-ref inputs "boot-patch"))) + (system* "patch" "--force" "-p1" "-i" patch-file) + #t))) (add-before 'configure 'setenv (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (bash (assoc-ref %build-inputs "bash")) - (tcc (assoc-ref %build-inputs "tcc")) - (cppflags " -D __GLIBC_MINOR__=6")) - (setenv "CONFIG_SHELL" (string-append bash "/bin/sh")) + (let* ((out (assoc-ref outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash")) + (tcc (assoc-ref %build-inputs "tcc")) + (cppflags " -D __GLIBC_MINOR__=6")) + (setenv "CONFIG_SHELL" shell) (setenv "CPPFLAGS" cppflags) (setenv "CC" (string-append "tcc" cppflags)) (setenv "CC_FOR_BUILD" (string-append "tcc" cppflags)) @@ -591,9 +1193,9 @@ (lambda _ (display " ac_cv_c_float_format='IEEE (little-endian)' -"))) - #t))) - (replace 'configure +")))))) + ;; gcc-2.95.3 + (replace 'configure ; needs classic invocation of configure (lambda* (#:key configure-flags #:allow-other-keys) (format (current-error-port) "running ./configure ~a\n" (string-join configure-flags)) @@ -611,34 +1213,36 @@ ac_cv_c_float_format='IEEE (little-endian)' (gcc-dir (string-append out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3"))) (mkdir-p "tmp") - (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a"))) - (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o"))) + (with-directory-excursion "tmp" + (invoke "ar" "x" (string-append "../gcc/libgcc2.a")) + (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a")) + (apply invoke "ar" "r" (string-append gcc-dir "/libgcc.a") + (find-files "." "\\.o"))) (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a")) (copy-file (string-append tcc "/lib/libtcc1.a") (string-append out "/lib/libtcc1.a")) + (invoke "ar" "x" (string-append tcc "/lib/libtcc1.a")) + (invoke "ar" "x" (string-append tcc "/lib/libc.a")) (invoke "ar" "r" (string-append gcc-dir "/libc.a") - (string-append tcc-lib "/libc+gnu.o") - (string-append tcc-lib "/libtcc1.o")) - (invoke "ar" "r" (string-append out "/lib/libc.a") - (string-append tcc-lib "/libc+gnu.o") - (string-append tcc-lib "/libtcc1.o")) - (invoke "ls" "-ltrF" gcc-dir) - (copy-recursively (string-append tcc "/include") - (string-append out "/include")) + "libc.o" "libtcc1.o") #t)))))) (native-search-paths - ;; Use the language-specific variables rather than 'CPATH' because they - ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'. - ;; The intent is to allow headers that are in the search path to be - ;; treated as "system headers" (headers exempt from warnings) just like - ;; the typical /usr/include headers on an FHS system. (list (search-path-specification (variable "C_INCLUDE_PATH") - (files '("include" "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"))) + (files '("include" + + ;; Needed to get things like GCC's <stddef.h>. + "lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib"))))))) +(define (%boot-mesboot-core-inputs) + `(("binutils" ,binutils-mesboot0) + ("gawk" ,gawk-mesboot0) + ("gcc" ,gcc-core-mesboot0) + ,@(alist-delete "tcc" (%boot-tcc-inputs)))) + (define mesboot-headers (package (inherit mes-boot) @@ -646,8 +1250,8 @@ ac_cv_c_float_format='IEEE (little-endian)' (supported-systems '("i686-linux" "x86_64-linux")) (inputs '()) (propagated-inputs '()) - (native-inputs `(("coreutils" ,%bootstrap-coreutils&co) - ("headers" ,%bootstrap-linux-libre-headers))) + (native-inputs `(("kernel-headers" ,%bootstrap-linux-libre-headers) + ,@(%boot-tcc-inputs))) (arguments `(#:implicit-inputs? #f #:guile ,%bootstrap-guile @@ -661,20 +1265,79 @@ ac_cv_c_float_format='IEEE (little-endian)' (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (include (string-append out "/include")) - (headers (assoc-ref %build-inputs "headers" ))) + (headers (assoc-ref %build-inputs "kernel-headers"))) (mkdir-p include) (copy-recursively "include" out) (copy-recursively headers out) - #t)))))) - (native-search-paths - ;; Use the language-specific variables rather than 'CPATH' because they - ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'. - ;; The intent is to allow headers that are in the search path to be - ;; treated as "system headers" (headers exempt from warnings) just like - ;; the typical /usr/include headers on an FHS system. - (list (search-path-specification - (variable "C_INCLUDE_PATH") - (files '("include"))))))) + #t)))))))) + +(define gawk-mesboot0 + ;; The initial Gawk. + (package + (inherit gawk) + (name "gawk-mesboot0") + (version "3.0.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gawk/gawk-" + version ".tar.gz")) + (sha256 + (base32 + "087s7vpc8zawn3l7bwv9f44bf59rc398hvaiid63klw6fkbvabr3")))) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (native-inputs (%boot-tcc-inputs)) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:configure-flags '("--build=i686-unknown-linux-gnu" + "--host=i686-unknown-linux-gnu" + "--disable-nls") + #:make-flags '("gawk") + #:parallel-build? #f + #:parallel-tests? #f + #:strip-binaries? #f ; no strip yet + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'scripted-patch + (lambda _ + (substitute* "Makefile.in" + (("date ") "echo today ") + ((" autoheader") "true") + ((" -lm ") " ")) + (substitute* "test/Makefile.in" + (("^bigtest:.*") "bigtest: basic\n") + (("( |\t)(childin|convfmt|fflush|longwrds|math|negexp)" all sep) sep)))) + (add-before 'configure 'setenv + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (setenv "CONFIG_SHELL" shell) + (setenv "SHELL" shell) + (setenv "CC" "tcc") + (setenv "CPP" "tcc -E") + (setenv "LD" "tcc") + (setenv "ac_cv_func_getpgrp_void" "yes") + (setenv "ac_cv_func_tzset" "yes")) + #t)) + (replace 'configure ; needs classic invocation of configure + (lambda* (#:key configure-flags #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out")) + (configure-flags + `(,@configure-flags + ,(string-append "--prefix=" out)))) + (format (current-error-port) "running ./configure ~a\n" (string-join configure-flags)) + (system* "touch" "configure") ; aclocal.m4 is newer than configure + (apply invoke (cons "./configure" configure-flags))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (install-file "gawk" bin) + (symlink "gawk" (string-append bin "/awk")) + #t)))))))) (define glibc-mesboot0 ;; GNU C Library 2.2.5 is the most recent glibc that we managed to build @@ -684,33 +1347,30 @@ ac_cv_c_float_format='IEEE (little-endian)' (inherit glibc) (name "glibc-mesboot0") (version "2.2.5") - (source (bootstrap-origin - (origin - (method url-fetch) - (uri (string-append "mirror://gnu/glibc/glibc-" - version - ".tar.gz")) - (patches (search-patches "glibc-boot-2.2.5.patch")) - (sha256 - (base32 - "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))) + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/glibc/glibc-" + version + ".tar.gz")) + ;; Patch needs XZ + ;; (patches (search-patches "glibc-boot-2.2.5.patch")) + (sha256 + (base32 + "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q")))) (supported-systems '("i686-linux" "x86_64-linux")) (inputs '()) (propagated-inputs '()) - (native-inputs `(("binutils" ,binutils-mesboot0) - ("gcc" ,gcc-core-mesboot) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) + (native-inputs `(("boot-patch" ,(search-patch "glibc-boot-2.2.5.patch")) + ("system-patch" ,(search-patch "glibc-bootstrap-system-2.2.5.patch")) ("headers" ,mesboot-headers) - ("make" ,make-mesboot0))) + ,@(%boot-mesboot-core-inputs))) (outputs '("out")) (arguments `(#:implicit-inputs? #f #:guile ,%bootstrap-guile #:tests? #f #:strip-binaries? #f + #:validate-runpath? #f ; no dynamic executables #:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds #:make-flags (list (string-append "SHELL=" @@ -719,25 +1379,31 @@ ac_cv_c_float_format='IEEE (little-endian)' #:configure-flags (let ((out (assoc-ref %outputs "out")) (headers (assoc-ref %build-inputs "headers"))) - (list - "--disable-shared" - "--enable-static" - "--disable-sanity-checks" - "--build=i686-unknown-linux-gnu" - "--host=i686-unknown-linux-gnu" - (string-append "--with-headers=" headers "/include") - "--enable-static-nss" - "--without-__thread" - "--without-cvs" - "--without-gd" - "--without-tls" - (string-append "--prefix=" out))) + `("--disable-shared" + "--enable-static" + "--disable-sanity-checks" + "--build=i686-unknown-linux-gnu" + "--host=i686-unknown-linux-gnu" + ,(string-append "--with-headers=" headers "/include") + "--enable-static-nss" + "--without-__thread" + "--without-cvs" + "--without-gd" + "--without-tls" + ,(string-append "--prefix=" out))) #:phases (modify-phases %standard-phases + (add-after 'unpack 'apply-boot-patch + (lambda* (#:key inputs #:allow-other-keys) + (and (let ((patch (assoc-ref inputs "boot-patch"))) + (invoke "patch" "--force" "-p1" "-i" patch)) + (let ((patch (assoc-ref inputs "system-patch"))) + (invoke "patch" "--force" "-p1" "-i" patch))))) (add-before 'configure 'setenv (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash")) (gcc (assoc-ref %build-inputs "gcc")) (headers (assoc-ref %build-inputs "headers")) (cppflags (string-append @@ -745,88 +1411,63 @@ ac_cv_c_float_format='IEEE (little-endian)' " -D MES_BOOTSTRAP=1" " -D BOOTSTRAP_GLIBC=1")) (cflags (string-append " -L " (getcwd)))) - (setenv "CONFIG_SHELL" (string-append bash "/bin/sh")) - (setenv "SHELL" (getenv "CONFIG_SHELL")) + (setenv "CONFIG_SHELL" shell) + (setenv "SHELL" shell) (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags)) (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags)) #t))) - ;; glibc-2.2.5 needs a more classic invocation of configure - ;; configure: warning: CONFIG_SHELL=/gnu/store/…-bash-minimal-4.4.12/bin/bash: invalid host type - (replace 'configure + (replace 'configure ; needs classic invocation of configure (lambda* (#:key configure-flags #:allow-other-keys) (format (current-error-port) "running ./configure ~a\n" (string-join configure-flags)) - (apply invoke "./configure" configure-flags)))))) - (native-search-paths - ;; Use the language-specific variables rather than 'CPATH' because they - ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'. - ;; The intent is to allow headers that are in the search path to be - ;; treated as "system headers" (headers exempt from warnings) just like - ;; the typical /usr/include headers on an FHS system. - (list (search-path-specification - (variable "C_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "CPLUS_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "LIBRARY_PATH") - (files '("lib"))))))) + (apply invoke "./configure" configure-flags))) + (add-after 'configure 'fixup-configure + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (substitute* "config.make" + (("INSTALL = scripts/") "INSTALL = $(..)./scripts/")) + (substitute* "config.make" + (("INSTALL = scripts/") "INSTALL = $(..)./scripts/") + (("BASH = ") (string-append + "SHELL = " shell " + BASH = "))) + #t)))))))) (define gcc-mesboot0 (package - (inherit gcc-core-mesboot) + (inherit gcc-core-mesboot0) (name "gcc-mesboot0") - (native-inputs `(("binutils" ,binutils-mesboot0) - ("gcc" ,gcc-core-mesboot) + (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-2.95.3.patch")) + ;; Packages are given in an order that's relevant for + ;; #include_next purposes. ("libc" ,glibc-mesboot0) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) ("kernel-headers" ,%bootstrap-linux-libre-headers) - ("make" ,make-mesboot0))) + ,@(%boot-mesboot-core-inputs))) (arguments - (substitute-keyword-arguments (package-arguments gcc-core-mesboot) + (substitute-keyword-arguments (package-arguments gcc-core-mesboot0) ((#:phases phases) `(modify-phases ,phases (replace 'setenv - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (bash (assoc-ref %build-inputs "bash")) - (gcc (assoc-ref %build-inputs "gcc")) - (glibc (assoc-ref %build-inputs "libc")) - (kernel-headers (assoc-ref %build-inputs "kernel-headers"))) - (setenv "CONFIG_SHELL" (string-append bash "/bin/sh")) - (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH")) - (setenv "C_INCLUDE_PATH" (string-append - gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include" - ":" kernel-headers "/include" - ":" glibc "/include")) - (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH")) - (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH")) - ;; FIXME: add glibc dirs to paths manually - (setenv "LIBRARY_PATH" (string-join - (list (string-append glibc "/lib") - (getenv "LIBRARY_PATH")) - ":")) - (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH")) - (with-output-to-file "config.cache" - (lambda _ - (display " + (lambda _ + (setenv "CONFIG_SHELL" (which "sh")) + (with-output-to-file "config.cache" + (lambda _ + (display " ac_cv_c_float_format='IEEE (little-endian)' "))) - #t))) + #t)) (replace 'install2 (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (gcc-dir (string-append out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3"))) - (mkdir-p "tmp") - (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a"))) - (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o"))) - (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a")) - #t))))) + (and + (mkdir-p "tmp") + (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a"))) + (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o"))) + (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a")))))))) ((#:configure-flags configure-flags) `(let ((out (assoc-ref %outputs "out"))) `("--disable-shared" @@ -840,32 +1481,166 @@ ac_cv_c_float_format='IEEE (little-endian)' ,(string-append "LIBGCC2_INCLUDES=-I " gcc "/include") "LANGUAGES=c"))))))) -(define binutils-mesboot +(define (%boot-mesboot0-inputs) + `(("gcc" ,gcc-mesboot0) + ("kernel-headers" ,%bootstrap-linux-libre-headers) + ("libc" ,glibc-mesboot0) + ,@(alist-delete "gcc" (%boot-mesboot-core-inputs)))) + +(define tar-mesboot + ;; Initial tar with support for xz compression. (package - (inherit binutils-mesboot0) - (name "binutils-mesboot") - (native-inputs `(("binutils" ,binutils-mesboot0) - ("libc" ,glibc-mesboot0) - ("gcc" ,gcc-mesboot0) + (inherit tar) + (name "tar-mesboot") + (version "1.22") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/tar/tar-" + version ".tar.gz")) + (sha256 + (base32 + "19nvix64y95n5v6rr5g9g3fn08zz85cb5anzd7csfv4a4sz9lw4y")))) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (native-inputs (%boot-mesboot0-inputs)) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:parallel-build? #f + #:tests? #f ; check is naive, also checks non-built PROGRAMS + #:strip-binaries? #f ; no strip yet + #:configure-flags '("--build=i686-unknown-linux-gnu" + "--host=i686-unknown-linux-gnu" + "--disable-nls") + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key configure-flags #:allow-other-keys) + (let* ((out (assoc-ref %outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (setenv "CONFIG_SHELL" shell) + (setenv "SHELL" shell) + (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv") + (setenv "gl_cv_func_rename_dest_works" "yes") + (format (current-error-port) + "running ./configure ~a\n" (string-join configure-flags)) + (apply invoke (cons "./configure" configure-flags))))) + (add-after 'unpack 'scripted-patch + (lambda _ + (let* ((bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (substitute* "configure" + ((" /bin/sh") shell))) + (substitute* "Makefile.in" + (("^SUBDIRS = doc") "SUBDIRS =")) + #t)) + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (install-file "src/tar" bin) + #t)))))))) - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) - ("kernel-headers" ,%bootstrap-linux-libre-headers) - ("make" ,make-mesboot0))) +(define grep-mesboot + ;; The initial grep. + (package + (inherit grep) + (name "grep-mesboot") + (version "2.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/grep/grep-" + version ".tar.gz")) + (sha256 + (base32 + "1w862l80lgc5mxvpiy4cfwk761d6xxavn0m3xd2l7xs2kmzvp6lq")))) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (native-inputs (%boot-mesboot0-inputs)) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:parallel-build? #f + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-configure + (lambda _ + (let* ((bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (substitute* "configure" + ((" [|][|] ./config.status") " || sh ./config.status"))))) + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (install-file "grep" bin) + (symlink "grep" (string-append bin "/egrep")) + (symlink "grep" (string-append bin "/fgrep")) + #t)))))))) + +(define binutils-mesboot1 + (package + (inherit binutils-mesboot0) + (name "binutils-mesboot1") + (native-inputs (%boot-mesboot0-inputs)) (arguments (substitute-keyword-arguments (package-arguments binutils-mesboot0) ((#:configure-flags configure-flags) - '(list "--disable-nls" - "--disable-shared" - "--disable-werror" - "--build=i686-unknown-linux-gnu" - "--host=i686-unknown-linux-gnu" - "--with-sysroot=/")))))) + '(let ((out (assoc-ref %outputs "out"))) + `("--disable-nls" + "--disable-shared" + "--disable-werror" + "--build=i686-unknown-linux-gnu" + "--host=i686-unknown-linux-gnu" + "--with-sysroot=/" + ,(string-append "--prefix=" out)))) + ((#:phases phases) + `(modify-phases ,phases + (replace 'setenv + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (setenv "CONFIG_SHELL" shell) + #t))))))))) + +(define coreutils-mesboot0 + (package + (inherit coreutils) + (name "coreutils-mesboot0") + ;; The latest .gz release of Coreutils is 8.13; which does not build with gcc-2.95.3: + ;; randperm.c: In function `sparse_swap': + ;; randperm.c:117: invalid lvalue in unary `&' + (version "5.0") ; 2003-04 + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/coreutils/coreutils-" + version ".tar.gz")) + (sha256 + (base32 + "10wq6k66i8adr4k08p0xmg87ff4ypiazvwzlmi7myib27xgffz62")))) + (native-inputs (%boot-mesboot0-inputs)) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (arguments + `(#:implicit-inputs? #f + #:tests? #f ; WARNING: `perl' is needed, ... + #:parallel-build? #f + #:strip-binaries? #f ; strip: unrecognized option `--only-keep-debug' + #:guile ,%bootstrap-guile + #:configure-flags + '("--disable-doc" + "LIBS=-lc -lnss_files -lnss_dns -lresolv" + "ac_cv_func_gethostbyname=no" + "gl_cv_func_rename_dest_works=yes"))))) -(define make-mesboot +(define gnu-make-mesboot (package - (inherit make-mesboot0) + (inherit gnu-make) (name "make-mesboot") (version "3.82") (source (origin @@ -875,27 +1650,178 @@ ac_cv_c_float_format='IEEE (little-endian)' (sha256 (base32 "1rs2f9hmvy3q6zkl15jnlmnpgffm0bhw5ax0h5c7q604wqrip69x")))) - (native-inputs `(("binutils" ,binutils-mesboot0) - ("libc" ,glibc-mesboot0) - ("gcc" ,gcc-mesboot0) - ("make" ,make-mesboot0) + (native-inputs (%boot-mesboot0-inputs)) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (arguments + `(#:implicit-inputs? #f + #:parallel-build? #f + #:guile ,%bootstrap-guile + #:configure-flags '("LIBS=-lc -lnss_files -lnss_dns -lresolv") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "./make" "--version"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (install-file "make" bin) + #t)))))))) - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("kernel-headers" ,%bootstrap-linux-libre-headers))) +(define gawk-mesboot + (package + (inherit gawk) + (name "gawk-mesboot") + (version "3.1.8") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gawk/gawk-" + version ".tar.gz")) + (sha256 + (base32 + "03d5y7jabq7p2s7ys9alay9446mm7i5g2wvy8nlicardgb6b6ii1")))) + (native-inputs `(,@(%boot-mesboot0-inputs) + ("mesboot-headers" ,mesboot-headers))) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) (arguments - (substitute-keyword-arguments (package-arguments make-mesboot0) - ((#:configure-flags configure-flags) - `(let ((out (assoc-ref %outputs "out"))) - `(,(string-append "--prefix=" out)))) - ((#:phases phases) - `(modify-phases ,phases - (delete 'configure-fixup) - (add-before 'configure 'setenv - (lambda _ - (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv") + `(#:implicit-inputs? #f + #:parallel-build? #f + #:guile ,%bootstrap-guile + #:configure-flags '("ac_cv_func_connect=no") + #:make-flags '("gawk") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "./gawk" "--version"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (install-file "gawk" bin) + (symlink "gawk" (string-append bin "/awk")) #t)))))))) +(define sed-mesboot + (package + (inherit sed) + (name "sed-mesboot") + (version "4.0.6") ; 2003-04 + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/sed/sed-" + version ".tar.gz")) + (sha256 + (base32 + "0861ij94cqc4vaaki6r2wlapwcmhpx4ggp4r70f46mb21a8fkvf1")))) + (native-inputs (%boot-mesboot0-inputs)) + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (arguments + `(#:implicit-inputs? #f + #:parallel-build? #f + #:guile ,%bootstrap-guile + #:tests? #f ; 8to7 fails + #:phases + (modify-phases %standard-phases + (add-after 'unpack '/bin/sh + (lambda _ + (let* ((bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + (substitute* "testsuite/Makefile.tests" + (("^SHELL = /bin/sh") + (string-append "SHELL = " shell))) + #t)))))))) + +(define bash-mesboot + (package + (inherit bash-mesboot0) + (version "4.4") + (name "bash-mesboot") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/bash/bash-" + version ".tar.gz")) + (sha256 + (base32 + "1jyz6snd63xjn6skk7za6psgidsd53k05cr3lksqybi0q6936syq")))) + (inputs '()) + (propagated-inputs '()) + (native-inputs (%boot-mesboot0-inputs)) + (outputs '("out")) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:parallel-build? #f + #:configure-flags + '("--build=i686-unknown-linux-gnu" + "--host=i686-unknown-linux-gnu" + + "--without-bash-malloc" + "--disable-readline" + "--disable-history" + "--disable-help-builtin" + "--disable-progcomp" + "--disable-net-redirections" + "--disable-nls" + + ;; Pretend 'dlopen' is missing so we don't build loadable + ;; modules and related code. + "ac_cv_func_dlopen=no") + #:make-flags '("bash") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'scripted-patch + (lambda _ + (substitute* "shell.c" + ((";;") ";")) + #t)) + (add-before 'configure 'setenv + (lambda _ + (setenv "AWK" "gawk") + (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv") + (setenv "gl_cv_func_rename_dest_works" "yes") + #t)) + (add-after 'configure 'configure-fixups + (lambda _ + (let ((config.h (open-file "config.h" "a"))) + (display (string-append " +#define enable_hostname_completion(on_or_off) 0 +") + config.h) + (close config.h)) + #t)) + (replace 'check + (lambda _ + (invoke "./bash" "--version"))) + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (copy-file "bash" (string-append bin "/bash")) + (copy-file "bash" (string-append bin "/sh")) + #t)))))))) + +(define (%boot-mesboot1-inputs) + `(("bash" ,bash-mesboot) + ("binutils" ,binutils-mesboot1) + ("coreutils" ,coreutils-mesboot0) + ("gawk" ,gawk-mesboot) + ("grep" ,grep-mesboot) + ("make" ,gnu-make-mesboot) + ("sed" ,sed-mesboot) + ("tar" ,tar-mesboot) + ,@(fold alist-delete (%boot-mesboot0-inputs) + '("bash" "binutils" "bootar" "coreutils" "gash" + "gawk" "grep" "guile" "make" "sed" "tar")))) + (define gmp-boot (package (inherit gmp) @@ -930,180 +1856,320 @@ ac_cv_c_float_format='IEEE (little-endian)' (base32 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1")))))) -(define gcc-mesboot1 +(define gcc-core-mesboot1 + ;; GCC 4.6.4 is the latest modular distribution. This package is not + ;; stricly needed, but very helpful for development because it builds + ;; relatively fast. If this configures and builds then gcc-mesboot1 also + ;; builds. (package (inherit gcc-mesboot0) - (name "gcc-mesboot1") - (version "4.7.4") - (source (bootstrap-origin - (origin (inherit (package-source gcc-4.7)) - (patches (search-patches "gcc-boot-4.7.4.patch"))))) + (name "gcc-core-mesboot1") + (version "4.6.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-core-" version ".tar.gz")) + (sha256 + (base32 + "173kdb188qg79pcz073cj9967rs2vzanyjdjyxy9v0xb0p5sad75")) + ;; Patch needs XZ + ;; (patches (search-patches "gcc-boot-4.6.4.patch")) + )) (inputs `(("gmp-source" ,(package-source gmp-boot)) ("mpfr-source" ,(package-source mpfr-boot)) ("mpc-source" ,(package-source mpc-boot)))) - (native-inputs `(("binutils" ,binutils-mesboot) - ("gcc" ,gcc-mesboot0) - ("libc" ,glibc-mesboot0) + (native-inputs `(("boot-patch" ,(search-patch "gcc-boot-4.6.4.patch")) + ,@(%boot-mesboot1-inputs))) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:tests? #f + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1)) + #:parallel-build? #f ; for debugging + #:make-flags + (let* ((libc (assoc-ref %build-inputs "libc")) + (ldflags (string-append + "-B" libc "/lib " + "-Wl,-dynamic-linker " + "-Wl," libc + ,(glibc-dynamic-linker "i686-linux")))) + (list (string-append "LDFLAGS=" ldflags) + (string-append "LDFLAGS_FOR_TARGET=" ldflags))) + #:configure-flags + (let ((out (assoc-ref %outputs "out")) + (glibc (assoc-ref %build-inputs "libc"))) + (list (string-append "--prefix=" out) + "--build=i686-unknown-linux-gnu" + "--host=i686-unknown-linux-gnu" + (string-append "--with-native-system-header-dir=" glibc "/include") + (string-append "--with-build-sysroot=" glibc "/include") + "--disable-bootstrap" + "--disable-decimal-float" + "--disable-libatomic" + "--disable-libcilkrts" + "--disable-libgomp" + "--disable-libitm" + "--disable-libmudflap" + "--disable-libquadmath" + "--disable-libsanitizer" + "--disable-libssp" + "--disable-libvtv" + "--disable-lto" + "--disable-lto-plugin" + "--disable-multilib" + "--disable-plugin" + "--disable-threads" + "--enable-languages=c" + "--enable-static" + "--disable-shared" + "--enable-threads=single" + "--disable-libstdcxx-pch" + "--disable-build-with-cxx")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'apply-boot-patch + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch-file (assoc-ref inputs "boot-patch"))) + (format (current-error-port) "patch file=~s\n" patch-file) + (system* "patch" "--force" "-p1" "-i" patch-file)) + #t)) + ;; c&p from commencement.scm:gcc-boot0 + (add-after 'unpack 'unpack-gmp&co + (lambda* (#:key inputs #:allow-other-keys) + (let ((gmp (assoc-ref %build-inputs "gmp-source")) + (mpfr (assoc-ref %build-inputs "mpfr-source")) + (mpc (assoc-ref %build-inputs "mpc-source"))) + + ;; To reduce the set of pre-built bootstrap inputs, build + ;; GMP & co. from GCC. + (for-each (lambda (source) + (or (invoke "tar" "xvf" source) + (error "failed to unpack tarball" + source))) + (list gmp mpfr mpc)) + + ;; Create symlinks like `gmp' -> `gmp-x.y.z'. + ,@(map (lambda (lib) + ;; Drop trailing letters, as gmp-6.0.0a unpacks + ;; into gmp-6.0.0. + `(symlink ,(string-trim-right + (package-full-name lib "-") + char-set:letter) + ,(package-name lib))) + (list gmp-boot mpfr-boot mpc-boot)) + #t))) + (add-before 'configure 'setenv + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (binutils (assoc-ref %build-inputs "binutils")) + (bash (assoc-ref %build-inputs "bash")) + (gcc (assoc-ref %build-inputs "gcc")) + (glibc (assoc-ref %build-inputs "libc")) + (kernel-headers (assoc-ref %build-inputs "kernel-headers"))) + (setenv "CONFIG_SHELL" (string-append bash "/bin/sh")) + (setenv "C_INCLUDE_PATH" (string-append + gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include" + ":" kernel-headers "/include" + ":" glibc "/include" + ":" (getcwd) "/mpfr/src")) + (setenv "LIBRARY_PATH" (string-append glibc "/lib" + ":" gcc "/lib")) + (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH")) + (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH")) + #t)))))))) - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) - ("kernel-headers" ,%bootstrap-linux-libre-headers) - ("make" ,make-mesboot))) +(define gcc-mesboot1 + (package + (inherit gcc-core-mesboot1) + (name "gcc-mesboot1") + (version "4.6.4") + (native-inputs + `(("gcc-g++" + ,(origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-g++-" version ".tar.gz")) + (sha256 + (base32 + "1fqqk5zkmdg4vmqzdmip9i42q6b82i3f6yc0n86n9021cr7ms2k9")))) + ,@(package-native-inputs gcc-core-mesboot1))) (arguments - (substitute-keyword-arguments (package-arguments gcc-core-mesboot) - ((#:make-flags make-flags) - `(let* ((libc (assoc-ref %build-inputs "libc")) - (ldflags (string-append - "-B" libc "/lib " - "-Wl,-dynamic-linker " - "-Wl," libc - ,(glibc-dynamic-linker "i686-linux")))) - (list (string-append "LDFLAGS=" ldflags) - (string-append "LDFLAGS_FOR_TARGET=" ldflags)))) + (substitute-keyword-arguments (package-arguments gcc-core-mesboot1) + ((#:configure-flags configure-flags) + `(let ((out (assoc-ref %outputs "out"))) + `("--enable-languages=c,c++" + ,@(filter + (negate (lambda (x) (string-prefix? "--enable-languages=" x))) + ,configure-flags)))) ((#:phases phases) `(modify-phases ,phases - ;; c&p from commencement.scm:gcc-boot0 - (add-after 'unpack 'unpack-gmp&co - (lambda* (#:key inputs #:allow-other-keys) - (let ((gmp (assoc-ref %build-inputs "gmp-source")) - (mpfr (assoc-ref %build-inputs "mpfr-source")) - (mpc (assoc-ref %build-inputs "mpc-source"))) - - ;; To reduce the set of pre-built bootstrap inputs, build - ;; GMP & co. from GCC. - (for-each (lambda (source) - (or (invoke "tar" "xvf" source) - (error "failed to unpack tarball" - source))) - (list gmp mpfr mpc)) - - ;; Create symlinks like `gmp' -> `gmp-x.y.z'. - ,@(map (lambda (lib) - ;; Drop trailing letters, as gmp-6.0.0a unpacks - ;; into gmp-6.0.0. - `(symlink ,(string-trim-right - (package-full-name lib "-") - char-set:letter) - ,(package-name lib))) - (list gmp-boot mpfr-boot mpc-boot)) - #t))) - (delete 'remove-info) + (add-before 'unpack 'unpack-g++ + (lambda _ + (let ((source-g++ (assoc-ref %build-inputs "gcc-g++"))) + (invoke "tar" "xvf" source-g++)) + #t)) (replace 'setenv - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (binutils (assoc-ref %build-inputs "binutils")) - (bash (assoc-ref %build-inputs "bash")) - (gcc (assoc-ref %build-inputs "gcc")) - (glibc (assoc-ref %build-inputs "libc")) - (kernel-headers (assoc-ref %build-inputs "kernel-headers"))) - (setenv "CONFIG_SHELL" (string-append bash "/bin/sh")) - (setenv "C_INCLUDE_PATH" (string-append - gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include" - ":" kernel-headers "/include" - ":" glibc "/include" - ":" (getcwd) "/mpfr/src")) - (setenv "LIBRARY_PATH" (string-append glibc "/lib" - ":" gcc "/lib")) - (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH")) - (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH")) - #t))) - (delete 'install2))) - ((#:configure-flags configure-flags) - `(let ((out (assoc-ref %outputs "out")) - (glibc (assoc-ref %build-inputs "libc"))) - (list (string-append "--prefix=" out) - "--build=i686-unknown-linux-gnu" - "--host=i686-unknown-linux-gnu" - - (string-append "--with-native-system-header-dir=" glibc "/include") - (string-append "--with-build-sysroot=" glibc "/include") - - "--disable-bootstrap" - "--disable-decimal-float" - "--disable-libatomic" - "--disable-libcilkrts" - "--disable-libgomp" - "--disable-libitm" - "--disable-libmudflap" - "--disable-libquadmath" - "--disable-libsanitizer" - "--disable-libssp" - "--disable-libvtv" - "--disable-lto" - "--disable-lto-plugin" - "--disable-multilib" - "--disable-plugin" - "--disable-threads" - "--enable-languages=c,c++" - - "--enable-static" - ;; libstdc++.so: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH () - "--disable-shared" - "--enable-threads=single" - - ;; No pre-compiled libstdc++ headers, to save space. - "--disable-libstdcxx-pch" - - ;; for libcpp ... - "--disable-build-with-cxx"))))))) + (lambda _ + (setenv "CONFIG_SHELL" (which "sh")) -(define gcc-mesboot1-wrapper - ;; We need this so gcc-mesboot1 can be used to create shared binaries that - ;; have the correct interpreter, otherwise configuring gcc-mesboot using - ;; --enable-shared will fail. + ;; Allow MPFR headers to be found. + (setenv "C_INCLUDE_PATH" + (string-append (getcwd) "/mpfr/src:" + (getenv "C_INCLUDE_PATH"))) + + ;; Set the C++ search path so that C headers can be found as + ;; libstdc++ is being compiled. + (setenv "CPLUS_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")) + #t)))))))) + +(define (%boot-mesboot2-inputs) + `(("gcc" ,gcc-mesboot1) + ,@(alist-delete "gcc" (%boot-mesboot1-inputs)))) + +(define xz-mesboot + ;; Finally, we can build xz. (package - (inherit gcc-mesboot1) - (name "gcc-mesboot1-wrapper") - (source #f) + (inherit xz) + (name "xz-mesboot") + (version "5.0.0") + (source (bootstrap-origin + (origin + (method url-fetch) + (uri (list (string-append "http://tukaani.org/xz/xz-" version + ".tar.gz") + (string-append "http://multiprecision.org/guix/xz-" + version ".tar.gz"))) + (sha256 + (base32 + "0kf40ggbs1vaaj5s9k4csycahzqcf65n20pa6lngqhm6j0cj3agb"))))) + (supported-systems '("i686-linux" "x86_64-linux")) (inputs '()) - (native-inputs `(("bash" ,%bootstrap-coreutils&co) - ("libc" ,glibc-mesboot) - ("gcc" ,gcc-mesboot1))) + (outputs '("out")) + (propagated-inputs '()) + (native-inputs (%boot-mesboot2-inputs)) (arguments `(#:implicit-inputs? #f #:guile ,%bootstrap-guile + #:parallel-build? #f + #:configure-flags + `("--disable-assembler" + "--disable-shared" + "--enable-small" + "--disable-threads" + "--disable-xzdec" + "--disable-lzmadec" + "--disable-lzmainfo" + "--disable-lzma-links" + "--disable-scripts" + "--disable-doc" + "--disable-nls" + "--disable-symbol-versions" + ;; configure disqualifies BASH, CPP, GCC and GREP + ;; all of which seem fine for the build + "ac_cv_prog_cc_c99=-std=gnu9x" + "ac_cv_path_GREP=grep" + "gl_cv_posix_shell=bash" + "ac_cv_have_decl_optreset=no" + "CPPFLAGS=-D__GNUC__=1"))))) + +(define hello-mesboot + ;; Check for Scheme-only bootstrap. + (package + (inherit hello) + (name "hello-mesboot") + (supported-systems '("i686-linux" "x86_64-linux")) + (inputs '()) + (propagated-inputs '()) + (native-inputs (%boot-mesboot2-inputs)) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:parallel-build? #f + ;; checking for grep that handles long lines and -e... + ;; configure: error: no acceptable grep could be found + #:configure-flags '("ac_cv_path_GREP=grep") #:phases (modify-phases %standard-phases - (delete 'unpack) - (delete 'configure) - (delete 'install) - (replace 'build - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bash (assoc-ref %build-inputs "bash")) - (libc (assoc-ref %build-inputs "libc")) - (gcc (assoc-ref %build-inputs "gcc")) - (bin (string-append out "/bin"))) - (mkdir-p bin) - (for-each - (lambda (program) - (let ((wrapper (string-append bin "/" program))) - (with-output-to-file wrapper - (lambda _ - (display (string-append "#! " bash "/bin/bash -exec " gcc "/bin/" program -" -Wl,--dynamic-linker" -;; also for x86_64-linux, we are still on i686-linux -" -Wl," libc ,(glibc-dynamic-linker "i686-linux") -" -Wl,--rpath" -" -Wl," libc "/lib" -" \"$@\" -")) - (chmod wrapper #o555))))) - '( - "gcc" - "g++" - "i686-unknown-linux-gnu-gcc" - "i686-unknown-linux-gnu-g++" - )) - #t))) (replace 'check - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (program (string-append bin "/gcc"))) - (invoke program "--help"))))))))) + (lambda _ + (invoke "./hello")))))))) + +(define binutils-mesboot + (package + (inherit binutils) + (name "binutils-mesboot") + (version "2.20.1a") + (source (bootstrap-origin + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/binutils/binutils-" + version ".tar.bz2")) + (patches (search-patches "binutils-boot-2.20.1a.patch")) + (sha256 + (base32 + "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi"))))) + (inputs '()) + (propagated-inputs '()) + (native-inputs `(("xz" ,xz-mesboot) + ,@(%boot-mesboot2-inputs))) + (supported-systems '("i686-linux" "x86_64-linux")) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:tests? #f ; runtest: command not found + #:parallel-build? #f + #:strip-binaries? #f ; no strip yet + #:configure-flags + `("CC=gcc" + "CXX=false" + "RANLIB=true" + "--disable-doc" + "--disable-nls" + "--disable-shared" + "--disable-werror" + "--build=i686-unknown-linux-gnu" + "--host=i686-unknown-linux-gnu" + "--with-sysroot=/" + ;; checking for grep that handles long lines and -e + "ac_cv_path_GREP=grep") + ;; FIXME: ac_cv_path_GREP=grep doesn't seem to be forwarded to + ;; cascading configure's? + #:make-flags '("ac_cv_path_GREP=grep") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'scripted-patch + (lambda _ + ;; sed-mesboot0 cannot build these + (copy-file "binutils/Makefile.in" "binutils/Makefile.in.orig") + (substitute* "binutils/Makefile.in" + ;; binutils/binutils uses an amazingly complex install + ;; command, using FOR, SED, READ, IF, ECHO, SED, SED, AWK, + ;; READ, and then LIBTOOL (to do something like + ;; `mkdir $DESTDIR$bindir; cp readline $DESTDIR$bindir ...') + + ;; Some tool [debugme!] cannot handle two escaped newlines + ;; (bash?), and the install stops after $(am__EXEEXT_11) + ;; ("objcopy"), so $(am__EXEEXT_13) ("readelf") and others do + ;; not get installed. Remove the stray newline: + (("^\t@BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ .*") "")) + (substitute* "opcodes/Makefile.in" + (("^SUBDIRS = [.] po") "SUBDIRS = .")) + (substitute* "binutils/Makefile.in" + (("^SUBDIRS = doc po") "SUBDIRS =")) + (substitute* "gas/Makefile.in" + (("^SUBDIRS = doc po") "SUBDIRS =")) + (substitute* "gprof/Makefile.in" + (("^SUBDIRS = po") "SUBDIRS =")) + (substitute* "ld/Makefile.in" + (("^SUBDIRS = po") "SUBDIRS =")) + #t))))))) + +(define (%boot-mesboot3-inputs) + `(("binutils" ,binutils-mesboot) + ("xz" ,xz-mesboot) + ,@(alist-delete "binutils" (%boot-mesboot2-inputs)))) (define glibc-headers-mesboot (package @@ -1121,17 +2187,8 @@ exec " gcc "/bin/" program (sha256 (base32 "0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7"))))) - (native-inputs `(("binutils" ,binutils-mesboot) - ("libc" ,glibc-mesboot0) - ("gcc" ,gcc-mesboot1) - ("headers" ,mesboot-headers) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) - ("kernel-headers" ,%bootstrap-linux-libre-headers) - ("make" ,make-mesboot))) - + (native-inputs `(("headers" ,mesboot-headers) + ,@(%boot-mesboot3-inputs))) (arguments (substitute-keyword-arguments (package-arguments glibc-mesboot0) ((#:configure-flags configure-flags) @@ -1146,49 +2203,51 @@ exec " gcc "/bin/" program "--with-pthread" "--without-cvs" "--without-gd" - "--enable-add-ons=nptl"))) + "--enable-add-ons=nptl" + ;; avoid: configure: error: confusing output from nm -u + "libc_cv_predef_stack_protector=no"))) ((#:make-flags make-flags) - `(let ((bash (assoc-ref %build-inputs "bash"))) - (list (string-append "SHELL=" bash "/bin/sh") - "install-bootstrap-headers=yes" "install-headers"))) + '(list "install-bootstrap-headers=yes" "install-headers")) ((#:phases phases) `(modify-phases ,phases + (delete 'apply-boot-patch) + (delete 'fixup-configure) + (delete 'set-path) + (replace 'unpack + (lambda* (#:key source #:allow-other-keys) + (invoke "tar" "xvf" source) + (chdir (string-append "glibc-" ,version)) + #t)) (replace 'setenv - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (headers (assoc-ref %build-inputs "headers")) - (bash (assoc-ref %build-inputs "bash")) - (coreutils (assoc-ref %build-inputs "coreutils")) - (libc (assoc-ref %build-inputs "libc")) - (gcc (assoc-ref %build-inputs "gcc")) + (lambda* (#:key inputs #:allow-other-keys) + (let* ((headers (assoc-ref inputs "headers")) + (libc (assoc-ref inputs "libc")) + (gcc (assoc-ref inputs "gcc")) (cppflags (string-append " -I " (getcwd) "/nptl/sysdeps/pthread/bits" " -D BOOTSTRAP_GLIBC=1")) (cflags (string-append " -L " (getcwd) " -L " libc "/lib"))) (setenv "libc_cv_friendly_stddef" "yes") - (setenv "CONFIG_SHELL" (string-append bash "/bin/sh")) - (setenv "SHELL" (getenv "CONFIG_SHELL")) - (format (current-error-port) "CONFIG_SHELL=~s\n" (getenv "CONFIG_SHELL")) + (setenv "CONFIG_SHELL" (which "sh")) + (setenv "SHELL" (which "sh")) (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags)) (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags)) + (setenv "LD" "gcc") ;; avoid -fstack-protector (setenv "libc_cv_ssp" "false") (substitute* "configure" - (("/bin/pwd") (string-append coreutils "/bin/pwd"))) - (setenv "C_INCLUDE_PATH" (string-append libc "/include" - headers "/include")) - (setenv "LIBRARY_PATH" (string-append libc "/lib")) + (("/bin/pwd") "pwd")) #t))) (replace 'install (lambda* (#:key outputs make-flags #:allow-other-keys) (let ((kernel-headers (assoc-ref %build-inputs "kernel-headers")) (out (assoc-ref outputs "out"))) - (apply invoke "make" make-flags) - (copy-recursively kernel-headers out) - #t))) + (and (apply invoke "make" make-flags) + (copy-recursively kernel-headers out) + #t)))) (replace 'configure (lambda* (#:key configure-flags #:allow-other-keys) (format (current-error-port) "running ../configure ~a\n" (string-join configure-flags)) @@ -1197,36 +2256,37 @@ exec " gcc "/bin/" program (apply invoke "../configure" configure-flags))) (add-after 'configure 'remove-sunrpc (lambda _ - (invoke "make" (string-append (getcwd) "/sysd-sorted" ) - (string-append "SHELL=" (getenv "CONFIG_SHELL"))) - (substitute* "sysd-sorted" - ((" sunrpc") " ") - ((" nis") " ")) - ;; 'rpcgen' needs native libc headers to be built. - (substitute* "../Makefile" - (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL")))) - (substitute* "../Makeconfig" - (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL")))) - (substitute* "../elf/Makefile" - (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL")))))))))))) + (let* ((out (assoc-ref %outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (shell (string-append bash "/bin/bash"))) + + (let ((Makefile (open-file "Makefile" "a"))) + (display (string-append " + +SHELL := " shell " +") + Makefile) + (close Makefile)) + (substitute* "../Makefile" + (("^SHELL := /bin/sh") (string-append "SHELL := " shell))) + (substitute* "../Makeconfig" + (("^SHELL := /bin/sh") (string-append "SHELL := " shell))) + (substitute* "../elf/Makefile" + (("^SHELL := /bin/sh") (string-append "SHELL := " shell))) + (invoke "make" (string-append (getcwd) "/sysd-sorted" )) + (substitute* "sysd-sorted" + ((" sunrpc") " ") + ((" nis") " ")) + #t))))))))) (define glibc-mesboot (package (inherit glibc-headers-mesboot) (name "glibc-mesboot") - (native-inputs `(("binutils" ,binutils-mesboot) - ("libc" ,glibc-mesboot0) - ("headers" ,glibc-headers-mesboot) - ("gcc" ,gcc-mesboot1) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) - ("kernel-headers" ,%bootstrap-linux-libre-headers) - ("make" ,make-mesboot))) - + (native-inputs `(("headers" ,glibc-headers-mesboot) + ,@(%boot-mesboot3-inputs))) (arguments - `(#:validate-runpath? #f ; fails when using --enable-shared + `(#:validate-runpath? #f ; fails when using --enable-shared ,@(substitute-keyword-arguments (package-arguments glibc-headers-mesboot) ((#:make-flags make-flags) `(let ((bash (assoc-ref %build-inputs "bash"))) @@ -1238,41 +2298,82 @@ exec " gcc "/bin/" program (let* ((kernel-headers (assoc-ref %build-inputs "kernel-headers")) (out (assoc-ref outputs "out")) (install-flags (cons "install" make-flags))) - (apply invoke "make" install-flags) - (copy-recursively kernel-headers out) - #t)))))))) - (native-search-paths ;; FIXME: move to glibc-mesboot0 - ;; Use the language-specific variables rather than 'CPATH' because they - ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'. - ;; The intent is to allow headers that are in the search path to be - ;; treated as "system headers" (headers exempt from warnings) just like - ;; the typical /usr/include headers on an FHS system. - (list (search-path-specification - (variable "C_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "CPLUS_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "LIBRARY_PATH") - (files '("lib"))))))) + (and (apply invoke "make" install-flags) + (copy-recursively kernel-headers out) + #t))))))))))) + +(define (%boot-mesboot4-inputs) + `(("libc" ,glibc-mesboot) + ,@(alist-delete "libc" (%boot-mesboot3-inputs)))) + +(define gcc-mesboot1-wrapper + ;; We need this so gcc-mesboot1 can be used to create shared binaries that + ;; have the correct interpreter, otherwise configuring gcc-mesboot using + ;; --enable-shared will fail. + (package + (inherit gcc-mesboot1) + (name "gcc-mesboot1-wrapper") + (source #f) + (inputs '()) + (native-inputs `(("bash" ,bash-mesboot) + ("coreutils" ,coreutils-mesboot0) + ("libc" ,glibc-mesboot) + ("gcc" ,gcc-mesboot1))) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:phases + (modify-phases %standard-phases + (delete 'unpack) + (delete 'configure) + (delete 'install) + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash (assoc-ref %build-inputs "bash")) + (libc (assoc-ref %build-inputs "libc")) + (gcc (assoc-ref %build-inputs "gcc")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (for-each + (lambda (program) + (let ((wrapper (string-append bin "/" program))) + (with-output-to-file wrapper + (lambda _ + (display (string-append "#! " bash "/bin/bash +exec " gcc "/bin/" program +" -Wl,--dynamic-linker" +;; also for x86_64-linux, we are still on i686-linux +" -Wl," libc ,(glibc-dynamic-linker "i686-linux") +" -Wl,--rpath" +" -Wl," libc "/lib" +" \"$@\" +")) + (chmod wrapper #o555))))) + '("cpp" + "gcc" + "g++" + "i686-unknown-linux-gnu-cpp" + "i686-unknown-linux-gnu-gcc" + "i686-unknown-linux-gnu-g++")) + #t))) + (replace 'check + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (program (string-append bin "/gcc"))) + (invoke program "--help"))))))))) (define gcc-mesboot (package (inherit gcc-mesboot1) (name "gcc-mesboot") - (version "4.9.4") + (version (package-version gcc-4.9)) (source (bootstrap-origin (package-source gcc-4.9))) - (native-inputs `(("binutils" ,binutils-mesboot) - ("gcc-wrapper" ,gcc-mesboot1-wrapper) + (native-inputs `(("gcc-wrapper" ,gcc-mesboot1-wrapper) ("gcc" ,gcc-mesboot1) - ("libc" ,glibc-mesboot) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) - ("kernel-headers" ,%bootstrap-linux-libre-headers) - ("make" ,make-mesboot))) + ("headers" ,glibc-headers-mesboot) + ,@(%boot-mesboot4-inputs))) (arguments `(#:validate-runpath? #f ,@(substitute-keyword-arguments (package-arguments gcc-mesboot1) @@ -1317,6 +2418,9 @@ exec " gcc "/bin/" program "--disable-build-with-cxx"))) ((#:phases phases) `(modify-phases ,phases + (delete 'apply-boot-patch) + (delete 'unpack-g++) ; sadly, gcc-4.9.4 does not provide + ; modular core/language downloads (replace 'setenv (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -1327,12 +2431,12 @@ exec " gcc "/bin/" program (kernel-headers (assoc-ref %build-inputs "kernel-headers"))) (setenv "CONFIG_SHELL" (string-append bash "/bin/sh")) (setenv "C_INCLUDE_PATH" (string-append - gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.7.4/include" + gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.6.4/include" ":" kernel-headers "/include" ":" glibc "/include" ":" (getcwd) "/mpfr/src")) (setenv "CPLUS_INCLUDE_PATH" (string-append - gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.7.4/include" + gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.6.4/include" ":" kernel-headers "/include" ":" glibc "/include" ":" (getcwd) "/mpfr/src")) @@ -1352,49 +2456,41 @@ exec " gcc "/bin/" program (version (package-version gcc-mesboot)) (source #f) (inputs '()) - (native-inputs `(("bash" ,%bootstrap-coreutils&co) + (native-inputs `(("bash" ,bash-mesboot) + ("coreutils" ,coreutils-mesboot0) ("libc" ,glibc-mesboot) ("gcc" ,gcc-mesboot))))) -(define m4-mesboot +(define (%boot-mesboot5-inputs) + `(("gcc-wrapper" ,gcc-mesboot-wrapper) + ("gcc" ,gcc-mesboot) + ,@(fold alist-delete (%boot-mesboot4-inputs) '("gcc" "gcc-wrapper")))) + +(define coreutils-mesboot (package - (inherit m4) - (name "m4-mesboot") - (version "1.4") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/m4/m4-" - version ".tar.gz")) - (sha256 - (base32 - "1f9bxj176kf3pvs350w2dfs8jgwhminywri5pyn01b11yc4yhsjw")))) + (inherit coreutils) + (name "coreutils-mesboot") + (source (bootstrap-origin (package-source coreutils))) + (native-inputs (%boot-mesboot5-inputs)) (supported-systems '("i686-linux" "x86_64-linux")) - (native-inputs `(("mes" ,mes-boot) - ("tcc" ,tcc-boot))) + (inputs '()) + (propagated-inputs '()) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (setenv "CONFIG_SHELL" (string-append - (assoc-ref %build-inputs "bash") - "/bin/sh")) - (setenv "CC" "tcc -static") - (setenv "CPP" "tcc -E") - (invoke "./configure" (string-append "--prefix=" out)))))))))) + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:tests? #f)))) + +(define (%boot-mesboot6-inputs) + `(("coreutils" ,coreutils-mesboot) + ,@(fold alist-delete (%boot-mesboot5-inputs) + '("coreutils" "kernel-headers")))) (define (%bootstrap-inputs+toolchain) - ;; The traditional bootstrap-inputs. For the i686-linux Reduced Binary Seed - ;; the actual reduced set with bootstrapped toolchain. + ;; The traditional bootstrap-inputs. For the i686-linux, x86_64-linux + ;; Scheme-only bootstrap the actual reduced set with bootstrapped toolchain. (match (%current-system) ((or "i686-linux" "x86_64-linux") - `(("libc" ,glibc-mesboot) - ("binutils" ,binutils-mesboot) - ("gcc-wrapper" ,gcc-mesboot-wrapper) - ("gcc" ,gcc-mesboot) - ,@(fold alist-delete (%bootstrap-inputs) - '("bootstrap-mescc-tools" "mes")))) + (%boot-mesboot6-inputs)) (_ (%bootstrap-inputs)))) @@ -1408,6 +2504,11 @@ exec " gcc "/bin/" program #:implicit-inputs? #f #:tests? #f ; cannot run "make check" ,@(substitute-keyword-arguments (package-arguments gnu-make) + ((#:configure-flags flags ''()) + ;; The generated config.status has some problems due to the + ;; bootstrap environment. Disable dependency tracking to work + ;; around it. + `(cons "--disable-dependency-tracking" ,flags)) ((#:phases phases) `(modify-phases ,phases (replace 'build @@ -1422,6 +2523,35 @@ exec " gcc "/bin/" program (native-inputs '()) ; no need for 'pkg-config' (inputs (%bootstrap-inputs+toolchain)))) +(define bzip2-boot0 + (package + (inherit bzip2) + (name "bzip2-boot0") + (native-inputs `()) + (inputs + `(("diffutils" ,diffutils-boot0) + ("make" ,gnu-make-boot0) + ,@(%bootstrap-inputs+toolchain))) + (arguments + `(#:guile ,%bootstrap-guile + #:implicit-inputs? #f + ,@(package-arguments bzip2))))) + +(define coreutils-boot0 + (package + (inherit coreutils) + (source (bootstrap-origin (package-source coreutils))) + (name "coreutils-boot0") + (native-inputs `()) + (inputs + `(("make" ,gnu-make-boot0) + ,@(%bootstrap-inputs+toolchain))) + (arguments + `(#:tests? #f + #:implicit-inputs? #f + #:guile ,%bootstrap-guile + ,@(package-arguments coreutils))))) + (define diffutils-boot0 (package (inherit diffutils) @@ -1434,7 +2564,15 @@ exec " gcc "/bin/" program `(#:tests? #f ; the test suite needs diffutils #:guile ,%bootstrap-guile #:implicit-inputs? #f - ,@(package-arguments diffutils))))) + ,@(match (%current-system) + ((or "arm-linux" "aarch64-linux") + (substitute-keyword-arguments (package-arguments diffutils) + ((#:configure-flags flags ''()) + ;; The generated config.status has some problems due to the + ;; bootstrap environment. Disable dependency tracking to work + ;; around it. + `(cons "--disable-dependency-tracking" ,flags)))) + (_ '())))))) (define findutils-boot0 (package @@ -1448,7 +2586,31 @@ exec " gcc "/bin/" program (arguments `(#:implicit-inputs? #f #:guile ,%bootstrap-guile - ,@(package-arguments findutils))))) + + ;; The build system assumes we have done a mistake when time_t is 32-bit + ;; on a 64-bit system. Ignore that for our bootstrap toolchain. + ,@(substitute-keyword-arguments (package-arguments findutils) + ((#:configure-flags flags ''()) + `(append + ,(if (target-64bit?) + ''("TIME_T_32_BIT_OK=yes") + ''()) + ,(match (%current-system) + ((or "arm-linux" "aarch64-linux") + ''("--disable-dependency-tracking")) + (_ ''())) + ,flags))))))) + +(define file + (package + (inherit (@ (gnu packages file) file)) + (arguments + `(#:configure-flags + `("--disable-bzlib" + ,,@(match (%current-system) + ((or "arm-linux" "aarch64-linux") + '("--disable-dependency-tracking")) + (_ '()))))))) (define file-boot0 (package @@ -1459,13 +2621,87 @@ exec " gcc "/bin/" program `(("make" ,gnu-make-boot0) ,@(%bootstrap-inputs+toolchain))) (arguments - `(#:implicit-inputs? #f + `(#:tests? #f ; merge test fails + #:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:configure-flags '("--disable-bzlib") + #:strip-binaries? #f + #:validate-runpath? #f + ,@(package-arguments file))))) + +(define gawk-boot0 + (package + (inherit patch) + (source (bootstrap-origin (package-source gawk))) + (name "gawk-boot0") + (native-inputs '()) + (inputs + `(("make" ,gnu-make-boot0) + ,@(%bootstrap-inputs+toolchain))) + (arguments + `(#:tests? #f + #:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:strip-binaries? #f + #:validate-runpath? #f)))) + +(define patch-boot0 + (package + (inherit patch) + (source (bootstrap-origin (package-source patch))) + (name "patch-boot0") + (native-inputs '()) + (inputs + `(("make" ,gnu-make-boot0) + ,@(%bootstrap-inputs+toolchain))) + (arguments + `(#:tests? #f ; merge test fails + #:implicit-inputs? #f #:guile ,%bootstrap-guile #:strip-binaries? #f #:validate-runpath? #f)))) +(define sed-boot0 + (package + (inherit sed) + (name "sed-boot0") + (source (bootstrap-origin (package-source sed))) + (native-inputs '()) + (inputs + `(("make" ,gnu-make-boot0) + ,@(%bootstrap-inputs+toolchain))) + (arguments + `(#:implicit-inputs? #f + #:tests? #f + #:guile ,%bootstrap-guile + ,@(package-arguments sed))))) + +(define tar-boot0 + (package + (inherit tar) + (name "tar-boot0") + (source (bootstrap-origin (package-source tar))) + (native-inputs '()) + (inputs + `(("make" ,gnu-make-boot0) + ,@(%bootstrap-inputs+toolchain))) + (arguments + `(#:implicit-inputs? #f + #:tests? #f + #:guile ,%bootstrap-guile + ,@(package-arguments tar))))) + (define (%boot0-inputs) - `(("make" ,gnu-make-boot0) + `(,@(match (%current-system) + ((or "i686-linux" "x86_64-linux") + `(("bzip2" ,bzip2-boot0) + ("coreutils" ,coreutils-boot0) + ("gawk" ,gawk-boot0) + ("patch" ,patch-boot0) + ("sed" ,sed-boot0) + ("tar" ,tar-boot0))) + (_ '())) + ("make" ,gnu-make-boot0) ("diffutils" ,diffutils-boot0) ("findutils" ,findutils-boot0) ("file" ,file-boot0) @@ -1714,20 +2950,13 @@ exec " gcc "/bin/" program #:implicit-inputs? #f ,@(package-arguments m4))))) -(define m4-boot0* - (package - ;; TODO: On the next rebuild cycle, use M4-BOOT0 as is. - (inherit m4-boot0) - (name "m4"))) - (define bison-boot0 ;; This Bison is needed to build MiG so we need it early in the process. ;; Recent versions of Linux-Libre headers also depend on this. (package (inherit bison) - ;; TODO: On the next build cycle, do: - ;;(name "bison-boot0") - (propagated-inputs `(("m4" ,m4-boot0*))) + (name "bison-boot0") + (propagated-inputs `(("m4" ,m4-boot0))) (native-inputs `(("perl" ,perl-boot0))) (inputs (%boot0-inputs)) ;remove Flex... (arguments @@ -1735,17 +2964,6 @@ exec " gcc "/bin/" program #:implicit-inputs? #f #:guile ,%bootstrap-guile - ;; XXX: These flags should be unconditional, but for now - ;; we just add them on x86 to avoid a full rebuild. - ;; TODO: On the next core-updates, use - ;; 'substitute-keyword-arguments' to inherit them from - ;; BISON. - ,@(if (member (%current-system) - '("x86_64-linux" "i686-linux")) - '(#:parallel-build? #f - #:parallel-tests? #f) - '()) - ;; Zero timestamps in liby.a; this must be done ;; explicitly here because the bootstrap Binutils don't ;; do that (default is "cru".) @@ -1756,53 +2974,90 @@ exec " gcc "/bin/" program "RANLIB=ranlib") (_ "RANLIB=ranlib -D")) - "V=1"))))) + "V=1") + + ,@(package-arguments bison))))) (define flex-boot0 ;; This Flex is needed to build MiG as well as Linux-Libre headers. - (let ((m4-boot0* (package (inherit m4-boot0*)))) - (package - (inherit flex) - (native-inputs `(("bison" ,bison-boot0))) - (propagated-inputs - ;; XXX: Here we use an 'm4-boot0' package that's not eq? so that it - ;; appears twice in '%build-inputs', like when we were using - ;; 'package-with-explicit-inputs'. - ;; TODO: Remove this hack on the next rebuild cycle. - `(("m4" ,m4-boot0*))) - (inputs (%boot0-inputs)) - (arguments - `(#:implicit-inputs? #f - #:guile ,%bootstrap-guile - #:tests? #f))))) - -(define linux-libre-headers-boot0 - (mlambda () - "Return Linux-Libre header files for the bootstrap environment." - ;; Note: this is wrapped in a thunk to nicely handle circular dependencies - ;; between (gnu packages linux) and this module. Additionally, memoize - ;; the result to play well with further memoization and code that relies - ;; on pointer identity; see <https://bugs.gnu.org/30155>. - (package - (inherit linux-libre-headers) - (arguments - `(#:guile ,%bootstrap-guile - #:implicit-inputs? #f - ,@(package-arguments linux-libre-headers))) - (native-inputs - `(("perl" ,perl-boot0) + (package + (inherit flex) + (native-inputs `(("bison" ,bison-boot0))) + (propagated-inputs `(("m4" ,m4-boot0))) + (inputs (%boot0-inputs)) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile + #:tests? #f)))) - ;; Flex and Bison are required since version 4.16. - ("flex" ,flex-boot0) - ("bison" ,bison-boot0) - ,@(%boot0-inputs)))))) +(define rsync-boot0 + (package + (inherit rsync) + (native-inputs `(("perl" ,perl-boot0))) + (inputs (%boot0-inputs)) + (arguments + `(#:implicit-inputs? #f + #:guile ,%bootstrap-guile)))) + +(define-syntax define/system-dependent + (lambda (s) + "Bind IDENTIFIER to EXP, where the value of EXP is known to depend on +'%current-system'. The definition ensures that (1) EXP is \"thunked\" so that +it sees the right value of '%current-system', and (2) that its result is +memoized as a function of '%current-system'." + (syntax-case s () + ((_ identifier exp) + (with-syntax ((memoized (datum->syntax #'identifier + (symbol-append + (syntax->datum #'identifier) + '/memoized)))) + #'(begin + (define memoized + (mlambda (system) exp)) + (define-syntax identifier + (identifier-syntax (memoized (%current-system)))))))))) + +(define/system-dependent linux-libre-headers-boot0 + ;; Note: this is wrapped in a thunk to nicely handle circular dependencies + ;; between (gnu packages linux) and this module. Additionally, memoize + ;; the result to play well with further memoization and code that relies + ;; on pointer identity; see <https://bugs.gnu.org/30155>. + (package + (inherit linux-libre-headers) + (arguments + `(#:guile ,%bootstrap-guile + #:implicit-inputs? #f + ,@(package-arguments linux-libre-headers))) + (native-inputs + `(("perl" ,perl-boot0) + + ;; Flex and Bison are required since version 4.16. + ("flex" ,flex-boot0) + ("bison" ,bison-boot0) + + ;; Rsync is required since version 5.3. + ("rsync" ,rsync-boot0) + ,@(%boot0-inputs))))) (define with-boot0 (package-with-explicit-inputs %boot0-inputs %bootstrap-guile)) (define gnumach-headers-boot0 - (with-boot0 (package-with-bootstrap-guile gnumach-headers))) + (with-boot0 + (package-with-bootstrap-guile + (package + (inherit gnumach-headers) + (version "1.8-116-g28b53508") + (source (bootstrap-origin + (origin + (method url-fetch) + (uri (string-append "https://lilypond.org/janneke/hurd/" + "gnumach-" version ".tar.gz")) + (sha256 + (base32 + "006i0zgwy81vxarpfm12vip4q6i5mgmi5mmy5ldvxp5hx9h3l0zg"))))) + (native-inputs '()))))) (define mig-boot0 (let* ((mig (package @@ -1816,35 +3071,50 @@ exec " gcc "/bin/" program (assoc-ref %build-inputs "flex") "/lib/"))))))) (with-boot0 mig))) +(define hurd-version-boot0 "0.9-229-ga1efcee8") +(define hurd-source-boot0 + (let ((version hurd-version-boot0)) + (bootstrap-origin + (origin + (method url-fetch) + (uri (string-append "https://lilypond.org/janneke/hurd/" + "hurd-v" version ".tar.gz")) + (sha256 + (base32 + "0bq2q2jisxcy0kgcm6rz0z2fddwxxm7azsama7li28a2m08kdpzy")))))) + (define hurd-headers-boot0 (let ((hurd-headers (package (inherit hurd-headers) - (native-inputs `(("mig" ,mig-boot0))) - (inputs '())))) + (version hurd-version-boot0) + (source hurd-source-boot0) + (native-inputs `(("mig" ,mig-boot0))) + (inputs '())))) (with-boot0 (package-with-bootstrap-guile hurd-headers)))) (define hurd-minimal-boot0 (let ((hurd-minimal (package (inherit hurd-minimal) - (native-inputs `(("mig" ,mig-boot0))) - (inputs '())))) + (version hurd-version-boot0) + (source hurd-source-boot0) + (native-inputs `(("mig" ,mig-boot0))) + (inputs '())))) (with-boot0 (package-with-bootstrap-guile hurd-minimal)))) -(define hurd-core-headers-boot0 - (mlambda () - "Return the Hurd and Mach headers as well as initial Hurd libraries for -the bootstrap environment." - (package (inherit (package-with-bootstrap-guile hurd-core-headers)) - (arguments `(#:guile ,%bootstrap-guile - ,@(package-arguments hurd-core-headers))) - (inputs - `(("gnumach-headers" ,gnumach-headers-boot0) - ("hurd-headers" ,hurd-headers-boot0) - ("hurd-minimal" ,hurd-minimal-boot0) - ,@(%boot0-inputs)))))) +(define/system-dependent hurd-core-headers-boot0 + ;; Return the Hurd and Mach headers as well as initial Hurd libraries for + ;; the bootstrap environment. + (package (inherit (package-with-bootstrap-guile hurd-core-headers)) + (arguments `(#:guile ,%bootstrap-guile + ,@(package-arguments hurd-core-headers))) + (inputs + `(("gnumach-headers" ,gnumach-headers-boot0) + ("hurd-headers" ,hurd-headers-boot0) + ("hurd-minimal" ,hurd-minimal-boot0) + ,@(%boot0-inputs))))) (define* (kernel-headers-boot0 #:optional (system (%current-system))) (match system - ("i586-gnu" (hurd-core-headers-boot0)) - (_ (linux-libre-headers-boot0)))) + ("i586-gnu" hurd-core-headers-boot0) + (_ linux-libre-headers-boot0))) (define texinfo-boot0 ;; Texinfo used to build libc's manual. @@ -1892,16 +3162,24 @@ the bootstrap environment." ;; pthreads, which is missing on non-x86 platforms at this stage. ;; Python 3.6 technically supports being built without threading ;; support, but requires additional patches. - (version "3.5.7") + (version "3.5.9") (source (bootstrap-origin (origin - (inherit (package-source python)) + (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) - (patches '()) (sha256 (base32 - "1p67pnp2ca5przx2s45r8m55dcn6f5hsm0l4s1zp7mglkf4r4n18"))))) + "0jdh9pvx6m6lfz2liwvvhn7vks7qrysqgwn517fkpxb77b33fjn2")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete the bundled copy of libexpat. + (delete-file-recursively "Modules/expat") + (substitute* "Modules/Setup.dist" + ;; Link Expat instead of embedding the bundled one. + (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) + #t))))) (inputs `(,@(%boot0-inputs) ("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc. @@ -1919,7 +3197,17 @@ the bootstrap environment." ;; Python package won't interfere with this one. ((#:make-flags _ ''()) ''()) ((#:phases phases) - `(modify-phases ,phases + ;; Remove the 'apply-alignment-patch' phase if present to avoid + ;; rebuilding this package. TODO: for the next rebuild cycle, + ;; consider inlining all the arguments instead of inheriting to + ;; make it easier to patch Python without risking a full rebuild. + ;; Or better yet, change to 'python-on-guile'. + `(modify-phases ,@(list (match phases + (('modify-phases original-phases + changes ... + ('add-after unpack apply-alignment-patch _)) + `(modify-phases ,original-phases ,@changes)) + (_ phases))) (add-before 'configure 'disable-modules (lambda _ (substitute* "setup.py" @@ -1929,24 +3217,34 @@ the bootstrap environment." ;; built, since it requires Linux headers. (("'linux', ") "")) #t)) - (delete 'set-TZDIR))) + (delete 'set-TZDIR) + ,@(if (hurd-system?) + `((add-before 'build 'fix-regen + (lambda* (#:key inputs #:allow-other-keys) + (let ((libc (assoc-ref inputs "libc"))) + (substitute* "Lib/plat-generic/regen" + (("/usr/include/") (string-append libc "/include/"))) + #t)))) + '()))) ((#:tests? _ #f) #f)))))) -(define ld-wrapper-boot0 - (mlambda () - ;; We need this so binaries on Hurd will have libmachuser and libhurduser - ;; in their RUNPATH, otherwise validate-runpath will fail. - (make-ld-wrapper "ld-wrapper-boot0" - #:target boot-triplet - #:binutils binutils-boot0 - #:guile %bootstrap-guile - #:bash (car (assoc-ref (%boot0-inputs) "bash")) - #:guile-for-build %bootstrap-guile))) +(define/system-dependent ld-wrapper-boot0 + ;; The first 'ld' wrapper, defined with 'define/system-dependent' because + ;; its calls '%boot0-inputs', whose result depends on (%current-system) + ;; + ;; We need this so binaries on Hurd will have libmachuser and libhurduser + ;; in their RUNPATH, otherwise validate-runpath will fail. + (make-ld-wrapper "ld-wrapper-boot0" + #:target boot-triplet + #:binutils binutils-boot0 + #:guile %bootstrap-guile + #:bash (car (assoc-ref (%boot0-inputs) "bash")) + #:guile-for-build %bootstrap-guile)) (define (%boot1-inputs) ;; 2nd stage inputs. `(("gcc" ,gcc-boot0) - ("ld-wrapper-cross" ,(ld-wrapper-boot0)) + ("ld-wrapper-cross" ,ld-wrapper-boot0) ("binutils-cross" ,binutils-boot0) ,@(alist-delete "binutils" (%boot0-inputs)))) @@ -1967,7 +3265,9 @@ the bootstrap environment." ((#:configure-flags flags) `(append (list ,(string-append "--host=" (boot-triplet)) ,(string-append "--build=" - (nix-system->gnu-triplet))) + (nix-system->gnu-triplet)) + ,(if (hurd-system?) "--disable-werror" + "")) ,flags)) ((#:phases phases) `(modify-phases ,phases @@ -1978,13 +3278,14 @@ the bootstrap environment." (unsetenv "CPATH") ;; Tell 'libpthread' where to find 'libihash' on Hurd systems. - ,@(if (hurd-triplet? (%current-system)) - `((substitute* "libpthread/Makefile" - (("LDLIBS-pthread.so =.*") - (string-append "LDLIBS-pthread.so = " - (assoc-ref %build-inputs "kernel-headers") - "/lib/libihash.a\n")))) - '()) + ,@(if (hurd-system?) + '((substitute* '("sysdeps/mach/Makefile" + "sysdeps/mach/hurd/Makefile") + (("LDLIBS-pthread.so =.*") + (string-append "LDLIBS-pthread.so = " + (assoc-ref %build-inputs "kernel-headers") + "/lib/libihash.a\n")))) + '()) ;; 'rpcgen' needs native libc headers to be built. (substitute* "sunrpc/Makefile" @@ -2005,7 +3306,7 @@ the bootstrap environment." ,@(%boot1-inputs) ;; A native MiG is needed to build Glibc on Hurd. - ,@(if (hurd-triplet? (%current-system)) + ,@(if (hurd-system?) `(("mig" ,mig-boot0)) '()) @@ -2069,20 +3370,19 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ("bash" ,bash))) (inputs '()))) -(define gcc-boot0-intermediate-wrapped - (mlambda () - ;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the - ;; non-cross names. - (cross-gcc-wrapper gcc-boot0 binutils-boot0 - glibc-final-with-bootstrap-bash - (car (assoc-ref (%boot1-inputs) "bash"))))) +(define/system-dependent gcc-boot0-intermediate-wrapped + ;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the + ;; non-cross names. + (cross-gcc-wrapper gcc-boot0 binutils-boot0 + glibc-final-with-bootstrap-bash + (car (assoc-ref (%boot1-inputs) "bash")))) (define static-bash-for-glibc ;; A statically-linked Bash to be used by GLIBC-FINAL in system(3) & co. (package (inherit static-bash) (source (bootstrap-origin (package-source static-bash))) - (inputs `(("gcc" ,(gcc-boot0-intermediate-wrapped)) + (inputs `(("gcc" ,gcc-boot0-intermediate-wrapped) ("libc" ,glibc-final-with-bootstrap-bash) ("libc:static" ,glibc-final-with-bootstrap-bash "static") ,@(fold alist-delete (%boot1-inputs) @@ -2160,24 +3460,27 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ;; if 'allowed-references' were per-output. (arguments `(#:allowed-references - ,(cons* `(,gcc-boot0 "lib") (kernel-headers-boot0) - static-bash-for-glibc - (package-outputs glibc-final-with-bootstrap-bash)) - + ((,gcc-boot0 "lib") + ,(kernel-headers-boot0) + ,static-bash-for-glibc + ,@(if (hurd-system?) + `(,gnumach-headers-boot0 + ,hurd-headers-boot0) + '()) + ,@(package-outputs glibc-final-with-bootstrap-bash)) ,@(package-arguments glibc-final-with-bootstrap-bash))))) -(define gcc-boot0-wrapped - (mlambda () - ;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the - ;; non-cross names. - (cross-gcc-wrapper gcc-boot0 binutils-boot0 glibc-final - (car (assoc-ref (%boot1-inputs) "bash"))))) +(define/system-dependent gcc-boot0-wrapped + ;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the + ;; non-cross names. + (cross-gcc-wrapper gcc-boot0 binutils-boot0 glibc-final + (car (assoc-ref (%boot1-inputs) "bash")))) (define (%boot2-inputs) ;; 3rd stage inputs. `(("libc" ,glibc-final) ("libc:static" ,glibc-final "static") - ("gcc" ,(gcc-boot0-wrapped)) + ("gcc" ,gcc-boot0-wrapped) ,@(fold alist-delete (%boot1-inputs) '("libc" "gcc" "linux-libre-headers")))) (define binutils-final @@ -2231,14 +3534,13 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ,@(package-arguments zlib))) (inputs (%boot2-inputs)))) -(define ld-wrapper-boot3 - (mlambda () - ;; A linker wrapper that uses the bootstrap Guile. - (make-ld-wrapper "ld-wrapper-boot3" - #:binutils binutils-final - #:guile %bootstrap-guile - #:bash (car (assoc-ref (%boot2-inputs) "bash")) - #:guile-for-build %bootstrap-guile))) +(define/system-dependent ld-wrapper-boot3 + ;; A linker wrapper that uses the bootstrap Guile. + (make-ld-wrapper "ld-wrapper-boot3" + #:binutils binutils-final + #:guile %bootstrap-guile + #:bash (car (assoc-ref (%boot2-inputs) "bash")) + #:guile-for-build %bootstrap-guile)) (define gcc-final ;; The final GCC. @@ -2300,15 +3602,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" char-set:letter) ,(package-name lib))) (list gmp-6.0 mpfr mpc)) - #t))) - (add-before 'configure 'treat-glibc-as-system-header - (lambda* (#:key inputs #:allow-other-keys) - (let ((libc (assoc-ref inputs "libc"))) - ;; Make sure Glibc is treated as a "system header" so - ;; #include_next does the right thing. - (for-each (lambda (var) - (setenv var (string-append libc "/include"))) - '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH")) #t)))))))) ;; This time we want Texinfo, so we get the manual. Add @@ -2323,7 +3616,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0))) ("mpfr-source" ,(package-source mpfr)) ("mpc-source" ,(package-source mpc)) - ("ld-wrapper" ,(ld-wrapper-boot3)) + ("ld-wrapper" ,ld-wrapper-boot3) ("binutils" ,binutils-final) ("libstdc++" ,libstdc++) ("zlib" ,zlib-final) @@ -2332,7 +3625,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (define (%boot3-inputs) ;; 4th stage inputs. `(("gcc" ,gcc-final) - ("ld-wrapper" ,(ld-wrapper-boot3)) + ("ld-wrapper" ,ld-wrapper-boot3) ,@(alist-delete "gcc" (%boot2-inputs)))) (define bash-final @@ -2364,7 +3657,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ;; This package must be public because other modules refer to it. However, ;; mark it as hidden so that 'fold-packages' ignores it. (with-boot4 (hidden-package - (package-with-bootstrap-guile guile-2.2/fixed)))) + (package-with-bootstrap-guile guile-3.0/fixed)))) (define glibc-utf8-locales-final ;; Now that we have GUILE-FINAL, build the UTF-8 locales. They are needed @@ -2397,9 +3690,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (define gnu-make-final ;; The final GNU Make, which uses the final Guile. - ;; FIXME: This is a mistake: we shouldn't be propagating GUILE-FINAL to - ;; PKG-CONFIG. - ;; TODO: Fix that on the next rebuild cycle. (let ((pkg-config (package (inherit %pkg-config) ;the native pkg-config (inputs `(("guile" ,guile-final) @@ -2420,7 +3710,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (define coreutils-final ;; The final Coreutils. Treat them specially because some packages, such as ;; Findutils, keep a reference to the Coreutils they were built with. - (with-boot5 (package-with-bootstrap-guile coreutils) + (with-boot5 (package-with-bootstrap-guile + (package + (inherit coreutils-minimal) + (name "coreutils"))) ;; Use the final Guile, linked against the ;; final libc with working iconv, so that ;; 'substitute*' works well when touching diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index a1c5bbf8c2..b599f3a603 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -270,16 +270,14 @@ file; as a result, it is often used in conjunction with \"tar\", resulting in (define-public bzip2 (package (name "bzip2") - (version "1.0.6") + (version "1.0.8") (source (origin (method url-fetch) - ;; XXX The bzip.org domain was allowed to expire. - (uri (string-append "https://web.archive.org/web/20180624184806/" - "http://www.bzip.org/" - version "/bzip2-" version ".tar.gz")) + (uri (string-append "https://sourceware.org/pub/bzip2/bzip2-" + version ".tar.gz")) (sha256 (base32 - "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152")))) + "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb")))) (build-system gnu-build-system) (arguments `(#:modules ((guix build gnu-build-system) @@ -288,6 +286,22 @@ file; as a result, it is often used in conjunction with \"tar\", resulting in (srfi srfi-1)) #:phases (modify-phases %standard-phases + (add-after 'set-paths 'hide-input-bzip2 + (lambda* (#:key inputs #:allow-other-keys) + (let ((bzip2 (assoc-ref inputs "bzip2"))) + (if bzip2 + ;; Prevent the build system from retaining a reference to + ;; BZIP2 from INPUTS. + (begin + (setenv "LIBRARY_PATH" + (string-join (delete (string-append bzip2 "/lib") + (string-split (getenv "LIBRARY_PATH") + #\:)) + ":")) + (format #t "environment variable `LIBRARY_PATH' set to `~a'~%" + (getenv "LIBRARY_PATH"))) + (format #t "no bzip2 found, nothing done~%")) + #t))) (replace 'configure (lambda* (#:key target #:allow-other-keys) (when ,(%current-target-system) @@ -1345,18 +1359,18 @@ or junctions, and always follows hard links.") (define-public zstd (package (name "zstd") - (version "1.4.2") + (version "1.4.4") (source (origin (method url-fetch) (uri (string-append "https://github.com/facebook/zstd/releases/download/" "v" version "/zstd-" version ".tar.gz")) (sha256 - (base32 "1ja3nrjynmiwwdjrf6crraizkbagp7y414bqqq2ady91nn1hjwqj")))) + (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr")))) (build-system gnu-build-system) - (outputs '("out" ;1.1MiB executables and documentation - "lib" ;1MiB shared library and headers - "static")) ;1MiB static library + (outputs '("out" ;1.2MiB executables and documentation + "lib" ;1.2MiB shared library and headers + "static")) ;1.2MiB static library (arguments `(#:phases (modify-phases %standard-phases @@ -1376,12 +1390,10 @@ or junctions, and always follows hard links.") (delete-file ar)) (find-files shared-libs "\\.a$")) - ;; While here, remove prefix= from the pkg-config file because it - ;; is unused, and because it contains a needless reference to $out. - ;; XXX: It would be great if #:disallow-references worked between - ;; outputs. + ;; Make sure the pkg-config file refers to the right output. (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc") - (("^prefix=.*") "")) + (("^prefix=.*") + (string-append "prefix=" lib "\n"))) #t)))) #:make-flags @@ -1558,13 +1570,13 @@ recreates the stored directory structure by default.") (package (name "zziplib") (version "0.13.69") - (replacement zziplib/fixed) (home-page "https://github.com/gdraheim/zziplib") (source (origin (method git-fetch) (uri (git-reference (url home-page) (commit (string-append "v" version)))) (file-name (git-file-name name version)) + (patches (search-patches "zziplib-CVE-2018-16548.patch")) (sha256 (base32 "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92")))) @@ -1596,13 +1608,6 @@ recreates the stored directory structure by default.") ;; files carry the Zlib license; see "docs/copying.html" for details. (license (list license:lgpl2.0+ license:mpl1.1)))) -(define zziplib/fixed - (package - (inherit zziplib) - (source (origin - (inherit (package-source zziplib)) - (patches (search-patches "zziplib-CVE-2018-16548.patch")))))) - (define-public libzip (package (name "libzip") @@ -1791,17 +1796,7 @@ single-member files which can't be decompressed in parallel.") (build-system cmake-build-system) (arguments `(#:tests? #f - #:phases (modify-phases %standard-phases - (add-before 'configure 'glibc-is-already-a-system-library - (lambda _ - ;; Prevent the build system from passing the glibc - ;; header files to GCC as "system headers", because - ;; it conflicts with the system headers already known - ;; to GCC, causing #include_next failures. - (substitute* "CMakeLists.txt" - (("include_directories\\(SYSTEM \\$\\{iconv") - "include_directories(${iconv")) - #t))))) + #:configure-flags '("-DBoost_NO_BOOST_CMAKE=ON"))) (inputs `(("boost" ,boost) ("libiconv" ,libiconv) ("xz" ,xz))) diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 965ab2949d..c91b0ee75e 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -1480,7 +1480,7 @@ applications. That is, compute distances and related measures for angular (base32 "1a8mi70x79a691r40yiw684jkg1mr9n8agkxlcksxcnrdybs9c0x")))) (build-system r-build-system) - (inputs `(("libjpeg" ,libjpeg))) + (inputs `(("libjpeg" ,libjpeg-turbo))) (home-page "https://www.rforge.net/jpeg/") (synopsis "Read and write JPEG images with R") (description "This package provides a way to read, write and display @@ -9900,7 +9900,7 @@ redundant complex conjugate when the input is real data.") (build-system r-build-system) (inputs `(("libtiff" ,libtiff) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("zlib" ,zlib))) (home-page "https://www.rforge.net/tiff/") (synopsis "Read and write TIFF images") @@ -18630,7 +18630,7 @@ currently limited to 8 bit greyscale images and 24, 32 bit (A)RGB images.") (properties `((upstream-name . "readbitmap"))) (build-system r-build-system) (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng))) (propagated-inputs `(("r-bmp" ,r-bmp) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index b07014da6c..9b4aa103da 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -4,8 +4,9 @@ ;;; Copyright © 2016, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2019 Carl Dong <contact@carldong.me> +;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,8 +55,11 @@ (define %gcc-include-paths ;; Environment variables for header search paths. - ;; Note: See <http://bugs.gnu.org/30756> for why not 'C_INCLUDE_PATH' & co. - '("CPATH")) + ;; Note: See <http://bugs.gnu.org/22186> for why not 'CPATH'. + '("C_INCLUDE_PATH" + "CPLUS_INCLUDE_PATH" + "OBJC_INCLUDE_PATH" + "OBJCPLUS_INCLUDE_PATH")) (define %gcc-cross-include-paths ;; Search path for target headers when cross-compiling. @@ -70,8 +74,8 @@ `(cons ,(string-append "--target=" target) ,flags)))))) -(define (cross-binutils target) - "Return a cross-Binutils for TARGET." +(define* (cross-binutils target #:optional (binutils binutils)) + "Return a cross-Binutils for TARGET using BINUTILS." (let ((binutils (package (inherit binutils) (arguments (substitute-keyword-arguments (package-arguments @@ -158,6 +162,13 @@ base compiler and using LIBC (which may be either a libc package or #f.)" "--disable-libsanitizer" )) + ;; Install cross-built libraries such as libgcc_s.so in + ;; the "lib" output. + ,@(if libc + `((string-append "--with-toolexeclibdir=" + (assoc-ref %outputs "lib") + "/" ,target "/lib")) + '()) ;; For a newlib (non-glibc) target ,@(if (cross-newlib? target) '("--with-newlib") @@ -176,19 +187,7 @@ base compiler and using LIBC (which may be either a libc package or #f.)" ,flags)) flags)) ((#:phases phases) - `(cross-gcc-build-phases - ,target - (modify-phases ,phases - (add-before 'configure 'treat-glibc-as-system-header - (lambda* (#:key inputs #:allow-other-keys) - (let ((libc (assoc-ref inputs "libc"))) - (when libc - ;; For GCC6 and later, make sure Glibc is treated as a "system - ;; header" such that #include_next does the right thing. - (for-each (lambda (var) - (setenv var (string-append libc "/include"))) - '("CROSS_C_INCLUDE_PATH" "CROSS_CPLUS_INCLUDE_PATH"))) - #t)))))))))) + `(cross-gcc-build-phases ,target ,phases)))))) (define (cross-gcc-patches xgcc target) "Return GCC patches needed for XGCC and TARGET." @@ -204,12 +203,19 @@ base compiler and using LIBC (which may be either a libc package or #f.)" (define (cross-gcc-snippet target) "Return GCC snippet needed for TARGET." - (cond ((target-mingw? target) - '(begin - (copy-recursively "libstdc++-v3/config/os/mingw32-w64" - "libstdc++-v3/config/os/newlib") - #t)) - (else #f))) + `(begin + ,@(if (target-mingw? target) + '((copy-recursively "libstdc++-v3/config/os/mingw32-w64" + "libstdc++-v3/config/os/newlib")) + '()) + ;; TOOLDIR_BASE_PREFIX is erroneous when using a separate "lib" + ;; output. Specify it correctly, otherwise GCC won't find its shared + ;; libraries installed in the "lib" output. See: + ;; https://lists.gnu.org/archive/html/bug-guix/2020-03/msg00196.html. + (substitute* "gcc/Makefile.in" + (("-DTOOLDIR_BASE_PREFIX=[^ ]*") + "-DTOOLDIR_BASE_PREFIX=\\\"../../../../\\\"")) + #t)) (define* (cross-gcc target #:key @@ -224,22 +230,26 @@ target that libc." (name (string-append "gcc-cross-" (if libc "" "sans-libc-") target)) - (source (origin (inherit (package-source xgcc)) - (patches - (append - (origin-patches (package-source xgcc)) - (cons (cond - ((version>=? (package-version xgcc) "8.0") (search-patch "gcc-8-cross-environment-variables.patch")) - ((version>=? (package-version xgcc) "6.0") (search-patch "gcc-6-cross-environment-variables.patch")) - (else (search-patch "gcc-cross-environment-variables.patch"))) - (cross-gcc-patches xgcc target)))) - (modules '((guix build utils))) - (snippet - (cross-gcc-snippet target)))) - - ;; For simplicity, use a single output. Otherwise libgcc_s & co. are not - ;; found by default, etc. - (outputs '("out")) + (source + (origin + (inherit (package-source xgcc)) + (patches + (append + (origin-patches (package-source xgcc)) + (append (cond + ((version>=? (package-version xgcc) "8.0") + (search-patches "gcc-8-cross-environment-variables.patch")) + ((version>=? (package-version xgcc) "6.0") + (search-patches "gcc-7-cross-toolexeclibdir.patch" + "gcc-6-cross-environment-variables.patch")) + (else + (search-patches "gcc-cross-environment-variables.patch"))) + (cross-gcc-patches xgcc target)))) + (modules '((guix build utils))) + (snippet + (cross-gcc-snippet target)))) + + (outputs '("out" "lib")) (arguments `(#:implicit-inputs? #f @@ -261,27 +271,31 @@ target that libc." #:binutils xbinutils)) ("binutils-cross" ,xbinutils) - ;; Call it differently so that the builder can check whether the "libc" - ;; input is #f. - ("libc-native" ,@(assoc-ref (%final-inputs) "libc")) - - ;; Remaining inputs. ,@(let ((inputs (append (package-inputs xgcc) - (alist-delete "libc" (%final-inputs))))) + (fold alist-delete (%final-inputs) + '("libc" "libc:static")) + + ;; Call it differently so that the builder can + ;; check whether the "libc" input is #f. + `(("libc-native" + ,@(assoc-ref (%final-inputs) "libc")) + ("libc-native:static" + ,@(assoc-ref (%final-inputs) + "libc:static")))))) (cond ((target-mingw? target) (if libc - `(("libc" ,libc) - ,@inputs) - `(("mingw-source" ,(package-source mingw-w64)) - ,@inputs))) + `(,@inputs + ("libc" ,libc)) + `(,@inputs + ("mingw-source" ,(package-source mingw-w64))))) (libc - `(("libc" ,libc) + `(,@inputs + ("libc" ,libc) ("libc:static" ,libc "static") ("xkernel-headers" ;the target headers ,@(assoc-ref (package-propagated-inputs libc) - "kernel-headers")) - ,@inputs)) + "kernel-headers")))) (else inputs))))) (inputs '()) @@ -293,7 +307,15 @@ target that libc." (map (lambda (variable) (search-path-specification (variable variable) - (files '("include")))) + + ;; Add 'include/c++' here so that <cstdlib>'s + ;; "#include_next <stdlib.h>" finds GCC's + ;; <stdlib.h>, not libc's. + (files (match variable + ("CROSS_CPLUS_INCLUDE_PATH" + '("include/c++" "include")) + (_ + '("include")))))) %gcc-cross-include-paths))) (native-search-paths '()))) @@ -499,7 +521,16 @@ and the cross tool chain." (("/[^ ]+/lib/libc.so.0.3") (string-append out "/lib/libc.so.0.3" " libmachuser.so libhurduser.so")))) - #t))) + #t)) + ;; TODO: move to glibc in the next rebuild cycle + (add-after 'unpack 'patch-libc/hurd + (lambda* (#:key inputs #:allow-other-keys) + (for-each + (lambda (name) + (let ((patch (assoc-ref inputs name))) + (invoke "patch" "-p1" "--force" "-i" patch))) + '("hurd-mach-print.patch" + "hurd-gettyent.patch"))))) '()))))) ;; Shadow the native "kernel-headers" because glibc's recipe expects the @@ -515,7 +546,12 @@ and the cross tool chain." ,@(if (hurd-triplet? target) `(("cross-mig" ,@(assoc-ref (package-native-inputs xheaders) - "cross-mig"))) + "cross-mig")) + ;; TODO: move to glibc in the next rebuild cycle + ("hurd-mach-print.patch" + ,@(search-patches "glibc-hurd-mach-print.patch")) + ("hurd-gettyent.patch" + ,@(search-patches "glibc-hurd-gettyent.patch"))) '()) ,@(package-inputs libc) ;FIXME: static-bash ,@(package-native-inputs libc)))))) diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index f48ab50ca9..bb684ddb53 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de> ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; ;;; This file is part of GNU Guix. @@ -715,19 +716,28 @@ BLAKE.") (define-public rhash (package (name "rhash") - (version "1.3.8") + (version "1.3.9") (source (origin (method url-fetch) - (uri (string-append "https://github.com/rhash/RHash/archive/v" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (uri (string-append "mirror://sourceforge/rhash/rhash/" version + "/rhash-" version "-src.tar.gz")) + (file-name (string-append "rhash-" version ".tar.gz")) (sha256 (base32 - "0k60ywyhwqwqxa2q2l85vwgf884hcgy31nxir3dqgz7ymib6llxy")))) + "1xn9fqa6rlnhsbgami45g82dlw9i1skg2sri3ydiinwak5ph1ca2")))) (build-system gnu-build-system) (arguments - `(#:make-flags + `(#:configure-flags + (list (string-append "--prefix=" (assoc-ref %outputs "out")) + ,@(let ((target (%current-target-system))) + (if target + `((string-append "--target=" ,target) + (string-append "--cc=" + (assoc-ref %build-inputs "cross-gcc") + "/bin/" ,target "-gcc")) + '()))) + #:make-flags ;; The binaries in /bin need some help finding librhash.so.0. (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) #:test-target "test" ; ‘make check’ just checks the sources @@ -736,9 +746,13 @@ BLAKE.") (replace 'configure ;; ./configure is not GNU autotools' and doesn't gracefully handle ;; unrecognized options, so we must call it manually. - (lambda* (#:key outputs #:allow-other-keys) - (invoke "./configure" - (string-append "--prefix=" (assoc-ref outputs "out"))))) + (lambda* (#:key configure-flags #:allow-other-keys) + (apply invoke "./configure" configure-flags))) + (add-before 'check 'patch-/bin/sh + (lambda _ + (substitute* "Makefile" + (("/bin/sh") (which "sh"))) + #t)) (add-after 'install 'install-library-extras (lambda* (#:key make-flags #:allow-other-keys) (apply invoke diff --git a/gnu/packages/cryptsetup.scm b/gnu/packages/cryptsetup.scm index 2a824d416e..d4c039ac04 100644 --- a/gnu/packages/cryptsetup.scm +++ b/gnu/packages/cryptsetup.scm @@ -62,7 +62,7 @@ ("libgcrypt" ,libgcrypt) ("lvm2" ,lvm2) ; device-mapper ("popt" ,popt) - ("util-linux" ,util-linux))) ; libuuid + ("util-linux" ,util-linux "lib"))) ;libuuid (synopsis "Hard disk encryption tool") (description "LUKS (Linux Unified Key Setup)/Cryptsetup provides a standard on-disk @@ -142,6 +142,6 @@ files). This assumes LIBRARY uses Libtool." ("libgcrypt" ,libgcrypt-static) ("lvm2" ,lvm2-static) ("util-linux" ,util-linux "static") - ("util-linux" ,util-linux) + ("util-linux" ,util-linux "lib") ("popt" ,popt)))) (synopsis "Hard disk encryption tool (statically linked)"))) diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index f24ea6c02a..b253d0604e 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2017 Leo Famulari <leo@famulari.name> ;;; Copyright © 2017 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -158,7 +159,7 @@ ("ijs" ,ijs) ("dbus" ,dbus) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("glib" ,glib) @@ -536,7 +537,20 @@ should only be used as part of the Guix cups-pk-helper service.") (string-append "rulessystemdir = " out "/lib/systemd/system")) (("/etc/sane.d") - (string-append out "/etc/sane.d")))))) + (string-append out "/etc/sane.d"))) + #t))) + (add-before 'configure 'fix-build-with-python-3.8 + (lambda* (#:key inputs #:allow-other-keys) + (let ((python (assoc-ref inputs "python"))) + ;; XXX: The configure script of looks for Python headers in the + ;; wrong places as of version 3.20.3. Help it by adding the + ;; include directory on C_INCLUDE_PATH. + (when python + (setenv "C_INCLUDE_PATH" + (string-append python "/include/python" + (python:python-version python) + ":" (getenv "C_INCLUDE_PATH")))) + #t))) (add-after 'install 'install-models-dat (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -585,7 +599,7 @@ should only be used as part of the Guix cups-pk-helper service.") (inputs `(("cups-minimal" ,cups-minimal) ("dbus" ,dbus) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libusb" ,libusb) ("python" ,python) ("python-dbus" ,python-dbus) diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm index aa5d24c401..48d7dd40bd 100644 --- a/gnu/packages/curl.scm +++ b/gnu/packages/curl.scm @@ -4,11 +4,12 @@ ;;; Copyright © 2015 Tomáš Čech <sleep_walker@suse.cz> ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016, 2017, 2019 Leo Famulari <leo@famulari.name> -;;; Copyright © 2017, 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Roel Janssen <roel@gnu.org> ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,7 +37,6 @@ #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages golang) - #:use-module (gnu packages groff) #:use-module (gnu packages guile) #:use-module (gnu packages kerberos) #:use-module (gnu packages libidn) @@ -45,20 +45,21 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages tls) - #:use-module (gnu packages web)) + #:use-module (gnu packages web) + #:use-module (srfi srfi-1)) (define-public curl (package (name "curl") - (version "7.65.3") - (replacement curl-7.66.0) + (version "7.69.1") (source (origin (method url-fetch) (uri (string-append "https://curl.haxx.se/download/curl-" version ".tar.xz")) (sha256 (base32 - "1sjz4fq7jg96mpmpqq82nd61njna6jp3c4m9yrbx2j1rh5a8ingj")))) + "0kwxh76iq9fblk7iyv4f75bmcmasarp2bcm1mm07wyvzd7kdbiq3")) + (patches (search-patches "curl-use-ssl-cert-env.patch")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;1.2 MiB of man3 pages @@ -70,27 +71,42 @@ ("zlib" ,zlib))) (native-inputs `(("perl" ,perl) - ;; to enable the --manual option and make test 1026 pass - ("groff" ,groff) ("pkg-config" ,pkg-config) ("python" ,python-wrapper))) (native-search-paths - ;; Note: This search path is respected by the `curl` command-line tool only. - ;; Ideally we would bake this into libcurl itself so other users can benefit, - ;; but it's not supported upstream due to thread safety concerns. + ;; These variables are introduced by curl-use-ssl-cert-env.patch. (list (search-path-specification + (variable "SSL_CERT_DIR") + (separator #f) ;single entry + (files '("etc/ssl/certs"))) + (search-path-specification + (variable "SSL_CERT_FILE") + (file-type 'regular) + (separator #f) ;single entry + (files '("etc/ssl/certs/ca-certificates.crt"))) + ;; Note: This search path is respected by the `curl` command-line + ;; tool only. Patching libcurl to read it too would bring no + ;; advantages and require maintaining a more complex patch. + (search-path-specification (variable "CURL_CA_BUNDLE") (file-type 'regular) (separator #f) ;single entry (files '("etc/ssl/certs/ca-certificates.crt"))))) (arguments - `(#:configure-flags (list "--with-gnutls" + `(#:disallowed-references ("doc") + #:configure-flags (list "--with-gnutls" (string-append "--with-gssapi=" (assoc-ref %build-inputs "mit-krb5")) "--disable-static") - ;; Add a phase to patch '/bin/sh' occurances in tests/runtests.pl #:phases (modify-phases %standard-phases + (add-after 'unpack 'do-not-record-configure-flags + (lambda _ + ;; Do not save the configure options to avoid unnecessary references. + (substitute* "curl-config.in" + (("@CONFIGURE_OPTIONS@") + "\"not available\"")) + #t)) (add-after 'install 'move-man3-pages (lambda* (#:key outputs #:allow-other-keys) @@ -143,17 +159,14 @@ tunneling, and so on.") "See COPYING in the distribution.")) (home-page "https://curl.haxx.se/"))) -(define curl-7.66.0 - (package - (inherit curl) - (version "7.66.0") - (source (origin - (method url-fetch) - (uri (string-append "https://curl.haxx.se/download/curl-" - version ".tar.xz")) - (sha256 - (base32 - "1hcqxpibhknhjy56wcxz5vd6m9ggx3ykwp3wp5wx05ih36481d6v")))))) +;; This package exists mainly to bootstrap CMake. It must not depend on +;; anything that uses cmake-build-system. +(define-public curl-minimal + (hidden-package + (package/inherit + curl + (name "curl-minimal") + (inputs (alist-delete "openldap" (package-inputs curl)))))) (define-public kurly (package diff --git a/gnu/packages/cyrus-sasl.scm b/gnu/packages/cyrus-sasl.scm index f84136e631..3e65a1faf6 100644 --- a/gnu/packages/cyrus-sasl.scm +++ b/gnu/packages/cyrus-sasl.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ (define-module (gnu packages cyrus-sasl) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages dbm) #:use-module (gnu packages kerberos) #:use-module (gnu packages tls) @@ -41,8 +43,13 @@ "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-" version ".tar.gz"))) (sha256 (base32 - "1m85zcpgfdhm43cavpdkhb1s2zq1b31472hq1w1gs3xh94anp1i6")))) + "1m85zcpgfdhm43cavpdkhb1s2zq1b31472hq1w1gs3xh94anp1i6")) + (patches (search-patches "cyrus-sasl-ac-try-run-fix.patch")))) (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) (inputs `(("gdbm" ,gdbm) ("openssl" ,openssl))) (propagated-inputs @@ -57,7 +64,13 @@ ;; 'plugin_common.c'. When building the shared libraries there, libtool ;; ends up doing "ln -s plugin_common.lo plugin_common.o", which can ;; fail with EEXIST when building things in parallel. - #:parallel-build? #f)) + #:parallel-build? #f + + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'autogen + (lambda _ + (invoke "autoreconf" "-vif")))))) (synopsis "Simple Authentication Security Layer implementation") (description "SASL (Simple Authentication Security Layer) is an Internet diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index c78d32efee..9de089e1bd 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -168,7 +168,7 @@ ("avahi" ,avahi) ("cyrus-sasl" ,cyrus-sasl) ("openssl" ,openssl) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) ;; http://www.4store.org has been down for a while now. (home-page "https://github.com/4store/4store") (synopsis "Clustered RDF storage and query engine") @@ -761,6 +761,20 @@ Language.") "-DINSTALL_SHAREDIR=share") #:phases (modify-phases %standard-phases + ,@(if (string-prefix? "arm" (%current-system)) + ;; XXX: Because of the GCC 5 input, we need to hide GCC 7 from + ;; CPLUS_INCLUDE_PATH so that its headers do not shadow GCC 5. + '((add-after 'set-paths 'hide-default-gcc + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + #t)))) + '()) (add-after 'unpack 'fix-pcre-detection (lambda _ ;; The bundled PCRE in MariaDB has a patch that was upstreamed @@ -893,7 +907,7 @@ Language.") `(("bison" ,bison) ;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>. ,@(if (string-prefix? "armhf" (%current-system)) - `(("gcc", gcc-5)) + `(("gcc@5", gcc-5)) '()) ("perl" ,perl))) (inputs @@ -974,7 +988,7 @@ developed in C/C++ to MariaDB and MySQL databases.") (invoke "make" "-C" "contrib" "install")))))) (inputs `(("readline" ,readline) - ("libuuid" ,util-linux) + ("libuuid" ,util-linux "lib") ("openssl" ,openssl) ("zlib" ,zlib))) (home-page "https://www.postgresql.org/") @@ -2698,7 +2712,7 @@ PickleShare.") (define-public python-apsw (package (name "python-apsw") - (version "3.28.0-r1") + (version "3.31.1-r1") (source (origin (method url-fetch) @@ -2706,7 +2720,7 @@ PickleShare.") "/download/" version "/apsw-" version ".zip")) (sha256 (base32 - "0x62534l5hcgwrc4k2gxpdzc1sxlhm6m4nwlay74rnmr77qh8wly")))) + "1gap5lr6c7bp134nzvfwr693i6d0fqyaysg3ms2cayjldv616yfx")))) (build-system python-build-system) (native-inputs `(("unzip" ,unzip))) diff --git a/gnu/packages/dav.scm b/gnu/packages/dav.scm index 5362d3505f..1b837dfe40 100644 --- a/gnu/packages/dav.scm +++ b/gnu/packages/dav.scm @@ -80,6 +80,11 @@ clients.") (if tests? (invoke "make" "test") #t))) + (add-after 'unpack 'patch-version-call + (lambda _ + (substitute* "docs/conf.py" + (("^release.*") (string-append "release = '" ,version "'\n"))) + #t)) (add-after 'install 'manpage (lambda* (#:key inputs outputs #:allow-other-keys) (invoke "make" "--directory=docs/" "man") diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm index 5191c475c2..ea812c9715 100644 --- a/gnu/packages/dbm.scm +++ b/gnu/packages/dbm.scm @@ -55,7 +55,7 @@ #:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key target outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (doc (assoc-ref outputs "doc"))) ;; '--docdir' is not honored, so we need to patch. @@ -74,6 +74,10 @@ '("--build=aarch64-unknown-linux-gnu") '()) + ,@(if (%current-target-system) ; cross building + '((string-append "--host=" target)) + '()) + ;; Remove 7 MiB of .a files. "--disable-static" @@ -134,7 +138,8 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") (sha256 (base32 "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6")))) - (arguments `(#:configure-flags '("--enable-libgdbm-compat"))) + (arguments `(#:configure-flags '("--enable-libgdbm-compat" + "--disable-static"))) (build-system gnu-build-system) (home-page "http://www.gnu.org.ua/software/gdbm") (synopsis diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index 524a980428..0e35ef7de1 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -112,7 +112,7 @@ ("libgcrypt" ,libgcrypt) ("lz4" ,lz4) ("lzo" ,lzo) - ("util-linux" ,util-linux) + ("util-linux" ,util-linux "lib") ("xz" ,xz) ("zlib" ,zlib) ("zstd:lib" ,zstd "lib"))) @@ -212,13 +212,15 @@ tmpfs/ramfs filesystems.") (inputs `(("lvm2" ,lvm2) ("readline" ,readline) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) (native-inputs `(("gettext" ,gettext-minimal) + ;; For the tests. ("e2fsprogs" ,e2fsprogs) ("perl" ,perl) - ("python" ,python-2))) + ("python" ,python-2) + ("util-linux" ,util-linux))) (home-page "https://www.gnu.org/software/parted/") (synopsis "Disk partition editor") (description @@ -242,7 +244,7 @@ tables. It includes a library and command-line utility.") (inputs `(("gettext" ,gettext-minimal) ("guile" ,guile-1.8) - ("util-linux" ,util-linux) + ("util-linux" ,util-linux "lib") ("parted" ,parted))) ;; The build neglects to look for its own headers in its own tree. A next ;; release should fix this, but may never come: GNU fdisk looks abandoned. @@ -282,7 +284,7 @@ tables, and it understands a variety of different formats.") `(("gettext" ,gettext-minimal) ("ncurses" ,ncurses) ("popt" ,popt) - ("util-linux" ,util-linux))) ; libuuid + ("util-linux" ,util-linux "lib"))) ;libuuid (arguments `(#:test-target "test" #:phases @@ -472,7 +474,7 @@ and can dramatically shorten the lifespan of the drive if left unchecked.") ;; as '/dev/disk/by-id' `(#:tests? #f)) (inputs - `(("util-linux" ,util-linux) + `(("util-linux" ,util-linux "lib") ("parted" ,parted) ("glib" ,glib) ("gtkmm" ,gtkmm) @@ -700,7 +702,7 @@ automatically finding out which program to use for what file type.") (inputs `(("cryptsetup" ,cryptsetup) ("nss" ,nss) - ("libblkid" ,util-linux) + ("libblkid" ,util-linux "lib") ("lvm2" ,lvm2) ; for "-ldevmapper" ("glib" ,glib) ("gpgme" ,gpgme))) @@ -753,7 +755,7 @@ passphrases.") ("json-c" ,json-c) ("keyutils" ,keyutils) ("kmod" ,kmod) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) (arguments `(#:configure-flags (list "--disable-asciidoctor" ; use docbook-xsl instead @@ -922,7 +924,7 @@ LVM D-Bus API).") ("libelf" ,libelf) ("elfutils" ,elfutils) ("json-glib" ,json-glib) - ("libblkid" ,util-linux))) + ("libblkid" ,util-linux "lib"))) (home-page "https://rmlint.rtfd.org") (synopsis "Remove duplicates and other lint from the file system") (description "@command{rmlint} finds space waste and other broken things diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 23a9aabe64..c96b693dc3 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -271,7 +271,7 @@ GTK+, lets you select a desktop session and log in to it.") (build-system cmake-build-system) (inputs `(("linux-pam" ,linux-pam) ("libpng" ,libpng) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("freeglut" ,freeglut) ("libxrandr" ,libxrandr) ("libxrender" ,libxrender) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 15c6c23d70..7ac1611cbf 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016 John Darrington <jmd@gnu.org> ;;; Copyright © 2016 ng0 <ng0@n0.is> ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com> ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net> ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index 098c2b4dfb..7221dd8fd9 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm @@ -183,7 +183,7 @@ by no means limited to these applications.) This package provides XML DTDs.") (define-public dblatex (package (name "dblatex") - (version "0.3.10") + (version "0.3.11") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/dblatex/dblatex/" @@ -191,7 +191,7 @@ by no means limited to these applications.) This package provides XML DTDs.") version ".tar.bz2")) (sha256 (base32 - "1yicd861rqz78i2khl35j7nvc0ccv4jx4hzqrbhll17082vrdmkg")))) + "0rp1bc2lgisigscq1i7zxfd2qdaxxxld6khbcxss4pq7fpi9fzkv")))) (build-system python-build-system) ;; TODO: Add xfig/transfig for fig2dev utility (inputs diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index 50e0f25cfb..dcacdb456f 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net> ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. @@ -33,6 +34,7 @@ #:use-module (guix build-system cmake) #:use-module (gnu packages) #:use-module (gnu packages autotools) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages python) #:use-module (gnu packages bison) @@ -148,7 +150,7 @@ markup) can be customized and extended by the user.") (define-public doxygen (package (name "doxygen") - (version "1.8.15") + (version "1.8.17") (home-page "http://www.doxygen.nl/") (source (origin (method url-fetch) @@ -159,8 +161,9 @@ markup) can be customized and extended by the user.") ".src.tar.gz"))) (sha256 (base32 - "0p94b4yb6bk2dxzs5kyl82xxgq2qakgbx5yy3ssbbadncb20x75x")) - (patches (search-patches "doxygen-test.patch")))) + "16dmv0gm1x8rvbm82fmjvi213q8fxqxinm75pcf595flya59ific")) + (patches (search-patches "doxygen-test.patch" + "doxygen-1.8.17-runtests.patch")))) (build-system cmake-build-system) (native-inputs `(("bison" ,bison) @@ -170,7 +173,15 @@ markup) can be customized and extended by the user.") (inputs `(("bash" ,bash-minimal))) (arguments - `(#:test-target "tests" + ;; Force cmake to use iconv header from cross-libc instead of the one + ;; from native libc. + `(,@(if (%current-target-system) + '(#:configure-flags + (list (string-append "-DICONV_INCLUDE_DIR=" + (assoc-ref %build-inputs "cross-libc") + "/include"))) + '()) + #:test-target "tests" #:phases (modify-phases %standard-phases (add-before 'configure 'patch-sh (lambda* (#:key inputs #:allow-other-keys) diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index 37be173949..48879df1bd 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -291,7 +291,7 @@ designed to be used in a generic text renderer.") ("fribidi" ,fribidi) ("glib" ,glib) ("gtk+-2" ,gtk+-2) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("liblinebreak" ,liblinebreak) ("libxft" ,libxft) ("sqlite" ,sqlite) diff --git a/gnu/packages/ed.scm b/gnu/packages/ed.scm index c2198763ef..da4c3ddf04 100644 --- a/gnu/packages/ed.scm +++ b/gnu/packages/ed.scm @@ -28,14 +28,14 @@ (define-public ed (package (name "ed") - (version "1.15") + (version "1.16") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/ed/ed-" version ".tar.lz")) (sha256 (base32 - "0x6ivy5k0d7dy5z9g8q8nipr89m4qbk2ink2898qq43smp08ji5d")))) + "0b4b1lwizvng9bvpcjnmpj2i80xz9xw2w8nfff27b2h4mca7mh6g")))) (build-system gnu-build-system) (native-inputs `(("lzip" ,lzip))) (arguments diff --git a/gnu/packages/efi.scm b/gnu/packages/efi.scm index 13c33adbd3..d986913243 100644 --- a/gnu/packages/efi.scm +++ b/gnu/packages/efi.scm @@ -112,6 +112,7 @@ environment presented by Intel's EFI.") ("util-linux" ,util-linux))) ; getopt (inputs `(("gnu-efi" ,gnu-efi) + ("libuuid" ,util-linux "lib") ("openssl" ,openssl))) (synopsis "EFI signing tools") (description "This package provides tools for signing EFI binaries.") diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index dc22aeaa6f..6356233460 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Alex Kost <alezost@gmail.com> ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> @@ -68,6 +68,7 @@ ;;; Copyright © 2020 John Soo <jsoo1@asu.edu> ;;; Copyright © 2020 Jérémy Korwin-Zmijowski <jeremy@korwin-zmijowski.fr> ;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2020 pinoaffe <pinoaffe@airmail.cc> ;;; ;;; This file is part of GNU Guix. @@ -2427,13 +2428,21 @@ type, for example: packages, buffers, files, etc.") "releases/emacs-guix-" version ".tar.gz")) (sha256 (base32 - "0yz64c0z4ygi2k4af18k4r1ncgys18jb8icywkp2g5pgmpn5l7ps")))) + "0yz64c0z4ygi2k4af18k4r1ncgys18jb8icywkp2g5pgmpn5l7ps")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Add support for Guile 3.0. Remove for versions > 0.5.2. + (substitute* "configure" + (("\"2\\.2 2\\.0\"") + "\"3.0 2.2 2.0\"")) + #t)))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("emacs" ,emacs-minimal))) (inputs - `(("guile" ,guile-2.2) + `(("guile" ,guile-3.0) ("guix" ,guix))) (propagated-inputs `(("geiser" ,emacs-geiser) @@ -10334,15 +10343,12 @@ It should enable you to implement low-level X11 applications.") ;; Add a .desktop file to xsessions (mkdir-p xsessions) (mkdir-p bin) - (with-output-to-file - (string-append xsessions "/exwm.desktop") - (lambda _ - (format #t "[Desktop Entry]~@ - Name=~a~@ - Comment=~a~@ - Exec=~a~@ - TryExec=~:*~a~@ - Type=Application~%" ,name ,synopsis exwm-executable))) + (make-desktop-entry-file + (string-append xsessions "/exwm.desktop") + #:name ,name + #:comment ,synopsis + #:exec exwm-executable + #:try-exec exwm-executable) ;; Add a shell wrapper to bin (with-output-to-file exwm-executable (lambda _ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index b6119c7dce..9c1fd30773 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -141,7 +141,7 @@ "lisp/textmodes/artist.el" "lisp/progmodes/sh-script.el") (("\"/bin/sh\"") - (format "~s" (which "sh")))) + (format #f "~s" (which "sh")))) #t)) (add-before 'configure 'fix-/bin/pwd (lambda _ @@ -165,7 +165,7 @@ (byte-recompile-directory (file-name-as-directory ,dir) 0 1)))) (invoke emacs "--quick" "--batch" - (format "--eval=~s" expr)))) + (format #f "--eval=~s" expr)))) (copy-file (assoc-ref inputs "guix-emacs.el") (string-append lisp-dir "/guix-emacs.el")) @@ -195,7 +195,7 @@ ("libxft" ,libxft) ("libtiff" ,libtiff) ("giflib" ,giflib) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("imagemagick" ,imagemagick) ("acl" ,acl) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index ac50efb923..15101e3aee 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -770,7 +770,8 @@ fonts to gEDA.") (lambda* (#:key inputs #:allow-other-keys) (setenv "CPLUS_INCLUDE_PATH" (string-append (assoc-ref inputs "catch") - "/include/catch")) + "/include/catch:" + (or (getenv "CPLUS_INCLUDE_PATH") ""))) #t))))) (native-inputs `(("pkg-config" ,pkg-config))) @@ -2216,7 +2217,7 @@ engineers for reverse engineers.") (native-inputs `(("googletest-source" ,(package-source googletest)))) (inputs - `(("libuuid" ,util-linux))) + `(("libuuid" ,util-linux "lib"))) (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm index 2fa586d6c0..e4413230ba 100644 --- a/gnu/packages/enlightenment.scm +++ b/gnu/packages/enlightenment.scm @@ -124,7 +124,7 @@ ("glib" ,glib) ("harfbuzz" ,harfbuzz) ("libinput" ,libinput-minimal) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libsndfile" ,libsndfile) ("libpng" ,libpng) ("libx11" ,libx11) @@ -133,7 +133,7 @@ ("lz4" ,lz4) ("openssl" ,openssl) ("pulseaudio" ,pulseaudio) - ("util-linux" ,util-linux) + ("util-linux" ,util-linux "lib") ("wayland" ,wayland) ("zlib" ,zlib))) (arguments diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index d8953016e5..281cdc78a9 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -122,7 +122,7 @@ from a mounted filesystem.") ("libscrypt" ,libscrypt) ("libsodium" ,libsodium) ("liburcu" ,liburcu) - ("util-linux" ,util-linux) ; lib{blkid,uuid} + ("util-linux" ,util-linux "lib") ; lib{blkid,uuid} ("lz4" ,lz4) ("zlib" ,zlib) ("zstd:lib" ,zstd "lib"))) @@ -214,7 +214,7 @@ single file can be mounted.") "jfsutils-include-systypes.patch")))) (build-system gnu-build-system) (inputs - `(("util-linux" ,util-linux))) + `(("util-linux" ,util-linux "lib"))) (home-page "http://jfs.sourceforge.net/home.html") (synopsis "Utilities for managing JFS file systems") (description @@ -358,7 +358,7 @@ non-determinism in the build process.") ("fuse", fuse) ("openssl" ,openssl) ("liburcu" ,liburcu) - ("libuuid" ,util-linux) + ("libuuid" ,util-linux "lib") ("libxml2" ,libxml2) ("readline" ,readline) ("zlib" ,zlib) @@ -590,7 +590,7 @@ APFS.") ("openssl" ,openssl) ("python" ,python) ("python-cffi" ,python-cffi) - ("util-linux" ,util-linux) + ("util-linux" ,util-linux "lib") ("zlib" ,zlib))) (home-page "https://zfsonlinux.org/") (synopsis "Native ZFS on Linux") diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm index 9ba51d1b74..bac951f9c5 100644 --- a/gnu/packages/file.scm +++ b/gnu/packages/file.scm @@ -30,15 +30,14 @@ (define-public file (package (name "file") - (version "5.33") + (version "5.38") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.astron.com/pub/file/file-" version ".tar.gz")) - (patches (search-patches "file-CVE-2018-10360.patch")) (sha256 (base32 - "1iipnwjkag7q04zjkaqic41r9nlw0ml6mhqian6qkkbisb1whlhw")))) + "0d7s376b4xqymnrsjxi3nsv3f5v89pzfspzml2pcajdk5by2yg2r")))) (build-system gnu-build-system) ;; When cross-compiling, this package depends upon a native install of diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 61d807190c..201ff3d1bd 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -258,7 +258,7 @@ and dynamically with report tools based on filtering and graphical charts.") ("gmp" ,gmp) ("libedit" ,libedit) ("mpfr" ,mpfr) - ("python" ,python-2) + ("python" ,python) ("utfcpp" ,utfcpp))) (native-inputs `(("groff" ,groff) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index b35f55ae97..e0a162f1b8 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -5,6 +5,8 @@ ;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -31,6 +33,7 @@ #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages assembly) + #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages cmake) #:use-module (gnu packages cross-base) @@ -59,7 +62,7 @@ '(#:phases (modify-phases %standard-phases (add-before 'configure 'pre-configure - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs #:allow-other-keys) (chdir "target_firmware") ;; 'configure' is a simple script that runs 'cmake' with @@ -67,7 +70,7 @@ (substitute* "configure" (("^TOOLCHAIN=.*$") (string-append "TOOLCHAIN=" - (assoc-ref inputs "cross-gcc") + (assoc-ref (or native-inputs inputs) "cross-gcc") "\n"))) #t)) (replace 'install @@ -82,8 +85,11 @@ ;; The firmware is cross-compiled using a "bare bones" compiler (no libc.) ;; Use our own tool chain for that. - (native-inputs `(("cross-gcc" ,(cross-gcc "xtensa-elf")) - ("cross-binutils" ,(cross-binutils "xtensa-elf")) + (native-inputs `(("cross-gcc" ,(cross-gcc + "xtensa-elf" + #:xbinutils (cross-binutils "xtensa-elf" + binutils-2.33))) + ("cross-binutils" ,(cross-binutils "xtensa-elf" binutils-2.33)) ("cmake" ,cmake-minimal) ("perl" ,perl))) (home-page "https://wireless.wiki.kernel.org/en/users/Drivers/ath9k_htc") @@ -314,14 +320,26 @@ coreboot.") (build-system gnu-build-system) (native-inputs `(("acpica" ,acpica) - ("gcc" ,gcc-5) + ("gcc@5" ,gcc-5) ("nasm" ,nasm) ("python-2" ,python-2) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) (arguments `(#:tests? #f ; No check target. #:phases (modify-phases %standard-phases + ;; Hide the default GCC from CPLUS_INCLUDE_PATH to prevent it from + ;; shadowing the version of GCC provided in native-inputs. + (add-after 'set-paths 'hide-gcc7 + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + #t))) (replace 'configure (lambda _ (let* ((cwd (getcwd)) diff --git a/gnu/packages/fltk.scm b/gnu/packages/fltk.scm index 573c0541bb..d0f20b20fd 100644 --- a/gnu/packages/fltk.scm +++ b/gnu/packages/fltk.scm @@ -56,7 +56,7 @@ (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libx11" ,libx11) ("libxft" ,libxft) @@ -129,7 +129,7 @@ UI builder called FLUID that can be used to create applications in minutes.") (assoc-ref outputs "out") "/lib")) #t))))) (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ("glu" ,glu) ("waf" ,python-waf))) ;; ntk.pc lists "x11" and "xft" in Requires.private, and "cairo" in diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index 21423baefd..6e9b080299 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com> ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> -;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016 Toni Reina <areina@riseup.net> ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com> @@ -236,6 +236,8 @@ The Lato 2.010 family supports more than 100 Latin-based languages, over (define-public font-gnu-freefont (package (name "font-gnu-freefont") + ;; Note: Remove the special FontForge input and package once the 2020 + ;; release is out. (version "20120503") (source (origin (method url-fetch) @@ -289,12 +291,8 @@ The Lato 2.010 family supports more than 100 Latin-based languages, over (lambda (file) (string-suffix? "woff" file)) (find-files "." ""))))))) #:test-target "tests")) - ;; replace python 3 with python 2 - ;; python 3 support commits aren't yet released in 20120503 - ;; so freefont needs python 2 support in fontforge - (native-inputs `(("fontforge" ,(package (inherit fontforge) - (inputs `(("python-2" ,python-2) - ,@(package-inputs fontforge))))))) + ;; FreeFont anno 2012 requires a FontForge built with Python 2. + (native-inputs `(("fontforge" ,fontforge-20190801))) (home-page "https://www.gnu.org/software/freefont/") (synopsis "Unicode-encoded outline fonts") (description diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 2dffc0b919..825362047f 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2020 Roel Janssen <roel@gnu.org> ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; @@ -60,7 +60,9 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) - #:use-module (guix build-system meson)) + #:use-module (guix build-system meson) + #:use-module (guix utils) + #:use-module (srfi srfi-1)) (define-public freetype (package @@ -296,13 +298,14 @@ fonts to/from the WOFF2 format.") (uri (string-append "https://www.freedesktop.org/software/fontconfig/release/fontconfig-" version ".tar.bz2")) + (patches (search-patches "fontconfig-hurd-path-max.patch")) (sha256 (base32 "0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn")))) (build-system gnu-build-system) ;; In Requires or Requires.private of fontconfig.pc. (propagated-inputs `(("expat" ,expat) ("freetype" ,freetype) - ("libuuid" ,util-linux))) + ("libuuid" ,util-linux "lib"))) (inputs `(("gs-fonts" ,gs-fonts))) (native-inputs `(("gperf" ,gperf) @@ -397,6 +400,8 @@ X11-system or any other graphical user interface.") (sha256 (base32 "0gbxyip4wdibirdg2pvzayzyy927vxyd6dfyfiflx8zg88qzn8v8")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs `(("zlib" ,zlib) ("expat" ,expat))) @@ -465,7 +470,7 @@ and returns a sequence of positioned glyphids from the font.") (define-public potrace (package (name "potrace") - (version "1.15") + (version "1.16") (source (origin (method url-fetch) @@ -473,8 +478,7 @@ and returns a sequence of positioned glyphids from the font.") "/potrace-" version ".tar.gz")) (sha256 (base32 - "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9")) - (patches (search-patches "potrace-tests.patch")))) + "1k3sxgjqq0jnpk9xxys05q32sl5hbf1lbk1gmfxcrmpdgnhli0my")))) (build-system gnu-build-system) (native-inputs `(("ghostscript" ,ghostscript))) ;for tests (inputs `(("zlib" ,zlib))) @@ -519,16 +523,18 @@ using the above tables.") (define-public libspiro (package (name "libspiro") - (version "0.5.20150702") + (version "20190731") (source (origin (method url-fetch) (uri (string-append "https://github.com/fontforge/libspiro/releases" - "/download/" version "/libspiro-dist-" version ".tar.gz")) + "/download/" version "/libspiro-" version ".tar.gz")) (sha256 (base32 - "153ckwj6h3wwlsgcppzqj8cymv1927hi8ar8fzpchq5q89cj2kai")))) + "0m63x97b7aciviijprvy85gm03p2jsgslxn323zl9zn7qz6d3ir4")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (synopsis "Clothoid to bezier conversion library") (description "Raph Levien's Spiro package as a library. A mechanism for drawing @@ -539,7 +545,7 @@ smooth contours with constant curvature at the spline joins.") (define-public libuninameslist (package (name "libuninameslist") - (version "20190701") + (version "20200313") (home-page "https://github.com/fontforge/libuninameslist") (source (origin @@ -548,7 +554,7 @@ smooth contours with constant curvature at the spline joins.") "/libuninameslist-dist-" version ".tar.gz")) (sha256 (base32 - "18c9pcz81wm26q2m7npmvh9j3ibjs2hycxfh5xic2xgjfw40v2qn")))) + "10ri80c64xb4rhbif3sr87y5vhi3m702zb0m02imvj1jib9rq0m8")))) (build-system gnu-build-system) (synopsis "Unicode names and annotation list") (description @@ -565,15 +571,15 @@ definitions.") (define-public fontforge (package (name "fontforge") - (version "20190801") + (version "20200314") (source (origin (method url-fetch) (uri (string-append "https://github.com/fontforge/fontforge/releases/download/" - version "/fontforge-" version ".tar.gz")) + version "/fontforge-" version ".tar.xz")) (sha256 - (base32 "0lh8yx01asbzxm6car5cfi64njh5p4lxc7iv8dldr5rwg357a86r")))) - (build-system gnu-build-system) + (base32 "0qf88wd6riycq56d24brybyc93ns74s0nyyavm43zp2kfcihn6fd")))) + (build-system cmake-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("cairo" ,cairo) @@ -584,7 +590,7 @@ definitions.") ("libSM" ,libsm) ("libX11" ,libx11) ("libXi" ,libxi) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libltdl" ,libltdl) ("libpng" ,libpng) ("libspiro" ,libspiro) @@ -598,8 +604,20 @@ definitions.") ("python" ,python) ("zlib" ,zlib))) (arguments - '(#:phases + '(#:configure-flags '(;; TODO: Provide GTK+ for the Wayland-friendly GDK + ;; backend, instead of the legacy X11 backend. + ;; Currently it introduces a circular dependency. + "-DENABLE_X11=ON") + #:phases (modify-phases %standard-phases + (add-after 'unpack 'do-not-override-RPATH + (lambda _ + ;; Do not attempt to set a default RPATH, as our ld-wrapper + ;; already does the right thing. + (substitute* "CMakeLists.txt" + (("^set_default_rpath\\(\\)") + "")) + #t)) (add-after 'install 'set-library-path (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) @@ -624,6 +642,31 @@ generate bitmaps.") (license license:gpl3+) (home-page "https://fontforge.github.io"))) +;; This is the last version that supports Python 2, which is needed for +;; GNU FreeFont. Remove once no longer required. +(define-public fontforge-20190801 + (package + (inherit fontforge) + (version "20190801") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/fontforge/fontforge/releases/download/" + version "/fontforge-" version ".tar.gz")) + (sha256 + (base32 "0lh8yx01asbzxm6car5cfi64njh5p4lxc7iv8dldr5rwg357a86r")))) + (build-system gnu-build-system) + (arguments + (substitute-keyword-arguments (package-arguments fontforge) + ((#:configure-flags _) + ''()) + ((#:phases phases) + `(modify-phases ,phases + (delete 'do-not-override-RPATH))))) + (inputs + `(("python" ,python-2) + ,@(alist-delete "python" (package-inputs fontforge)))))) + (define-public python2-ufolib (package (name "python2-ufolib") @@ -756,7 +799,7 @@ maintain the Noto Fonts project.") ("desktop-file-utils" ,desktop-file-utils))) (inputs `(("json-glib" ,json-glib) - ("sqlite-with-column-metadata" ,sqlite-with-column-metadata) + ("sqlite" ,sqlite) ("fonconfig" ,fontconfig) ("freetype" ,freetype) ("gtk+" ,gtk+))) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 75d0118f83..6d657815f4 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -532,7 +532,7 @@ of a the system to know what users are logged in, and where.") (find-files ".." "^(kbd-model-map|language-fallback-map)$")) #t))))))) (native-inputs (package-native-inputs elogind)) - (inputs `(("libmount" ,util-linux) + (inputs `(("libmount" ,util-linux "lib") ("xkeyboard-config" ,xkeyboard-config) ("kbd" ,kbd) ,@(package-inputs elogind))) @@ -743,7 +743,7 @@ applications, X servers (rootless or fullscreen) or other display servers.") ("lcms" ,lcms) ("libevdev" ,libevdev) ("libinput" ,libinput-minimal) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libunwind" ,libunwind) ("libva" ,libva) ("libwebp" ,libwebp) diff --git a/gnu/packages/fribidi.scm b/gnu/packages/fribidi.scm index 345529b73a..e213192aa6 100644 --- a/gnu/packages/fribidi.scm +++ b/gnu/packages/fribidi.scm @@ -27,18 +27,17 @@ (define-public fribidi (package - (replacement fribidi/fixed) (name "fribidi") - (version "1.0.5") + (version "1.0.9") (source (origin (method url-fetch) (uri (string-append "https://github.com/fribidi/fribidi/releases" "/download/v" version "/fribidi-" version - ".tar.bz2")) + ".tar.xz")) (sha256 - (base32 "1kp4b1hpx2ky20ixgy2xhj5iygfl7ps5k9kglh1z5i7mhykg4r3a")))) + (base32 "1iz06r6ha2nrgbzbn4141r58a60a9s5qiaadjjhhvdkg0alpxr65")))) (build-system gnu-build-system) (synopsis "Implementation of the Unicode bidirectional algorithm") (description @@ -48,13 +47,6 @@ or right-to-left ordering as necessary.") (home-page "https://github.com/fribidi/fribidi") (license lgpl2.1+))) -(define fribidi/fixed - (package - (inherit fribidi) - (source - (origin (inherit (package-source fribidi)) - (patches (search-patches "fribidi-CVE-2019-18397.patch")))))) - (define-public bidiv (package (name "bidiv") diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index c63aac082a..26aa4f714b 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -533,7 +533,7 @@ clone.") ("xcb-util-image" ,xcb-util-image) ("libxrandr" ,libxrandr) ("eudev" ,eudev) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libsndfile" ,libsndfile) ("stb-image" ,stb-image) ("stb-image-write" ,stb-image-write))) @@ -780,7 +780,7 @@ etc.") ("freetype" ,freetype) ("glu" ,glu) ("gtk" ,gtk+-2) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtheora" ,libtheora) ("libvorbis" ,libvorbis) @@ -862,7 +862,7 @@ etc.") ("curl" ,curl) ("freetype" ,freetype) ("giflib" ,giflib) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libwebp" ,libwebp) ("libx11" ,libx11) @@ -1014,7 +1014,7 @@ interface (API).") ("sdl-mixer" ,sdl-mixer) ("sdl-ttf" ,sdl-ttf) ("sdl-gfx" ,sdl-gfx) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libX11" ,libx11) ("libsmpeg" ,libsmpeg) @@ -1727,7 +1727,7 @@ scripted in a Python-like language.") ("libxft" ,libxft) ("libxinerama" ,libxinerama) ("libfontconfig" ,fontconfig) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("fltk" ,fltk) ("zlib" ,zlib))) @@ -1935,7 +1935,7 @@ of the others") (build-system gnu-build-system) (inputs `(("sdl2" ,sdl2) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("openal" ,openal) ("curl" ,curl) ("opusfile" ,opusfile) @@ -2289,7 +2289,7 @@ utilities frequently used in roguelikes.") ("curl" ,curl) ("freetype" ,freetype) ("ffmpeg" ,ffmpeg) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libogg" ,libogg) ("libpng" ,libpng) ("libtheora" ,libtheora) @@ -2300,7 +2300,7 @@ utilities frequently used in roguelikes.") ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) ("sdl2" ,sdl2) - ("uuid.h" ,util-linux) + ("uuid.h" ,util-linux "lib") ("zlib" ,zlib))) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index ff2ba65d96..b927ef4ab5 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -241,7 +241,7 @@ `(("expat" ,expat) ("freeglut" ,freeglut) ("glu" ,glu) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libogg" ,libogg) ("libtiff" ,libtiff) ("libvorbis" ,libvorbis) @@ -863,7 +863,7 @@ effects and music to make a completely free game.") `(("pkg-config" ,pkg-config))) (inputs `(("glu" ,glu) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libogg" ,libogg) ("libpng" ,libpng) ("libvorbis" ,libvorbis) @@ -2213,7 +2213,7 @@ are primarily in English, however some in other languages are provided.") #:make-flags '("CC=gcc" "sharedlib"))) (inputs `(("bzip2" ,bzip2) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libx11" ,libx11) ("libxxf86vm" ,libxxf86vm) @@ -2360,7 +2360,7 @@ match, cannon keep, and grave-itation pit.") ("gmp" ,gmp) ("irrlicht" ,irrlicht) ("jsoncpp" ,jsoncpp) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libogg" ,libogg) ("libvorbis" ,libvorbis) @@ -2497,6 +2497,7 @@ Widgets, and allows users to create more.") (uri (string-append "https://codeload.github.com/fifengine/" "fifengine/tar.gz/" version)) (file-name (string-append name "-" version ".tar.gz")) + (patches (search-patches "fifengine-swig-compat.patch")) (sha256 (base32 "1y4grw25cq5iqlg05rnbyxw1njl11ypidnlsm3qy4sm3xxdvb0p8")))) @@ -2513,7 +2514,9 @@ Widgets, and allows users to create more.") "/include/AL") (string-append "-DPYTHON_SITE_PACKAGES=" (assoc-ref %outputs "out") - "/lib/python3.7/site-packages")) + "/lib/python" + ,(version-major+minor (package-version python)) + "/site-packages")) #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-run_tests.py @@ -2602,7 +2605,7 @@ games using Python as well as C++.") `(("pkg-config" ,pkg-config))) (inputs `(("freetype" ,freetype) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libsndfile" ,libsndfile) ("libxml2" ,libxml2) @@ -2731,7 +2734,7 @@ This game is based on the GPL version of the famous game TuxRacer.") ("curl" ,curl) ;; The following input is needed to build the bundled and modified ;; version of irrlicht. - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("openssl" ,openssl) ("enet" ,enet))) (native-inputs @@ -2882,20 +2885,7 @@ falling, themeable graphics and sounds, and replays.") "1i8mz6gw3qar09bscczhki0g4scj8pl58v85rp0g55r4bcq41l5v")))) (build-system cmake-build-system) (arguments - `(#:tests? #f ;no check target - #:phases (modify-phases %standard-phases - (add-before 'configure 'treat-boost-as-system-header - (lambda* (#:key inputs #:allow-other-keys) - (let ((boost (assoc-ref inputs "boost"))) - ;; Ensure Boost is treated as "system headers" to - ;; pacify compiler warnings induced by Boost headers. - (for-each (lambda (variable) - (setenv variable - (string-append boost "/include:" - (or (getenv variable) - "")))) - '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH")) - #t)))))) + `(#:tests? #f)) ;no check target (native-inputs `(("gettext" ,gettext-minimal) ("pkg-config" ,pkg-config))) @@ -4391,7 +4381,7 @@ throwing people around in pseudo-randomly generated buildings.") (add-after 'set-paths 'set-sdl-paths (lambda* (#:key inputs #:allow-other-keys) (setenv "CPATH" - (string-append (getenv "CPATH") ":" + (string-append (or (getenv "CPATH") "") ":" (assoc-ref inputs "sdl-union") "/include/SDL")))) (replace 'configure @@ -4800,7 +4790,8 @@ over 100 user-created campaigns.") (string-append (assoc-ref inputs "sdl-union") "/include/SDL:" (assoc-ref inputs "python") - "/include/python2.7")) + "/include/python2.7:" + (or (getenv "CPLUS_INCLUDE_PATH") ""))) (substitute* "src/main/main.cpp" (("#include <SDL.h>" line) (string-append line " @@ -5577,7 +5568,7 @@ Crowther & Woods, its original authors, in 1995. It has been known as (setenv "CPATH" (string-append (assoc-ref inputs "sdl-union") "/include/SDL2:" - (getenv "CPATH"))) + (or (getenv "CPATH") ""))) #t)) (delete 'check) ;; premake doesn't provide install target @@ -5631,19 +5622,13 @@ Crowther & Woods, its original authors, in 1995. It has been known as (copy-recursively "game" (string-append data "/game")) ;; launcher (mkdir-p applications) - (with-output-to-file (string-append applications "/" - ,name ".desktop") - (lambda () - (display - (string-append - "[Desktop Entry] -Name=ToME4 -Comment=" ,synopsis "\n" -"Exec=" ,name "\n" -"Icon=" icon "\n" -"Terminal=false -Type=Application -Categories=Game;RolePlaying;\n"))))) + (make-desktop-entry-file + (string-append applications "/" ,name ".desktop") + #:name "ToME4" + #:comment ,synopsis + #:exec ,name + #:icon icon + #:categories '("Game" "RolePlaying"))) #t))))) (home-page "https://te4.org") (description "Tales of Maj’Eyal (ToME) RPG, featuring tactical turn-based @@ -6100,7 +6085,7 @@ You can save humanity and get programming skills!") ("fluidsynth" ,fluidsynth) ("gtk+3" ,gtk+) ("libgme" ,libgme) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libsndfile" ,libsndfile) ("mesa" ,mesa) ("mpg123" ,mpg123) @@ -6557,7 +6542,7 @@ quotation from a collection of quotes.") `(("xonotic-data" ,xonotic-data) ("alsa-lib" ,alsa-lib) ("curl" ,curl) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libmodplug" ,libmodplug) ("libvorbis" ,libvorbis) ("libogg" ,libogg) @@ -7988,22 +7973,18 @@ on items and player adaptability for character progression.") ;; game, so we borrow SCUMMVM's. (let ((apps (string-append out "/share/applications"))) (mkdir-p apps) - (with-output-to-file (string-append apps "/drascula.desktop") - (lambda _ - (format #t - "[Desktop Entry]~@ - Name=Drascula: The Vampire Strikes Back~@ - GenericName=Drascula~@ - Exec=~a/bin/drascula~@ - Icon=~a/share/icons/hicolor/scalable/apps/scummvm.svg~@ - Categories=AdventureGame;Game;RolePlaying;~@ - Keywords=game;adventure;roleplaying;2D,fantasy;~@ - Comment=Classic 2D point and click adventure game~@ - Comment[de]=klassisches 2D-Abenteuerspiel in Zeigen-und-Klicken-Manier~@ - Comment[fr]=Jeux classique d'aventure pointer-et-cliquer en 2D~@ - Comment[it]=Gioco classico di avventura punta e clicca 2D~@ - Type=Application~%" - out scummvm)))) + (make-desktop-entry-file + (string-append apps "/drascula.desktop") + #:name "Drascula: The Vampire Strikes Back" + #:generic-name "Drascula" + #:exec (string-append out "/bin/drascula") + #:icon (string-append scummvm "/share/icons/hicolor/scalable/apps/scummvm.svg") + #:categories '("AdventureGame" "Game" "RolePlaying") + #:keywords '("game" "adventure" "roleplaying" "2D" "fantasy") + #:comment '((#f "Classic 2D point and click adventure game") + ("de" "Klassisches 2D-Abenteuerspiel in Zeigen-und-Klicken-Manier") + ("fr" "Jeu classique d'aventure pointer-et-cliquer en 2D") + ("it" "Gioco classico di avventura punta e clicca 2D")))) #t)))) (native-inputs `(("bash" ,bash) @@ -10246,7 +10227,7 @@ This package is part of the KDE games module.") `(("curl" ,curl) ("font-dejavu" ,font-dejavu) ("glu" ,glu) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libxdg-basedir" ,libxdg-basedir) ("libxml2" ,libxml2) @@ -10565,7 +10546,7 @@ kingdom.") (native-inputs `(("gettext" ,gettext-minimal))) ;for msgfmt (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libvorbis" ,libvorbis) ("physfs" ,physfs) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 1155e3debb..0c5be69fbf 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz> ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org> ;;; @@ -342,7 +342,9 @@ where the OS part is overloaded to denote a specific ABI---into GCC (files '("include"))) (search-path-specification (variable "CPLUS_INCLUDE_PATH") - (files '("include"))) + ;; Add 'include/c++' here so that <cstdlib>'s "#include_next + ;; <stdlib.h>" finds GCC's <stdlib.h>, not libc's. + (files '("include/c++" "include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64"))))) @@ -402,6 +404,7 @@ Go. It also includes runtime support libraries for these languages.") "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc")) (patches (search-patches "gcc-4.9-libsanitizer-fix.patch" "gcc-4.9-libsanitizer-ustat.patch" + "gcc-4.9-libsanitizer-mode-size.patch" "gcc-arm-bug-71399.patch" "gcc-asan-missing-include.patch" "gcc-libvtv-runpath.patch" @@ -421,7 +424,33 @@ Go. It also includes runtime support libraries for these languages.") #t)))) ;; Override inherited texinfo-5 with latest version. (native-inputs `(("perl" ,perl) ;for manpages - ("texinfo" ,texinfo))))) + ("texinfo" ,texinfo))) + (arguments + (if (%current-target-system) + (package-arguments gcc-4.8) + ;; For native builds of GCC 4.9 and GCC 5, the C++ include path needs + ;; to be adjusted so it does not interfere with GCC's own build processes. + (substitute-keyword-arguments (package-arguments gcc-4.8) + ((#:modules modules %gnu-build-system-modules) + `((srfi srfi-1) + ,@modules)) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((libc (assoc-ref inputs "libc")) + (gcc (assoc-ref inputs "gcc"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join (fold delete + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:) + (list (string-append libc "/include") + (string-append gcc "/include/c++"))) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")) + #t)))))))))) (define-public gcc-5 ;; Note: GCC >= 5 ships with .info files but 'make install' fails to install @@ -441,7 +470,9 @@ Go. It also includes runtime support libraries for these languages.") "gcc-5.0-libvtv-runpath.patch" "gcc-5-source-date-epoch-1.patch" "gcc-5-source-date-epoch-2.patch" - "gcc-fix-texi2pod.patch")) + "gcc-6-libsanitizer-mode-size.patch" + "gcc-fix-texi2pod.patch" + "gcc-5-hurd.patch")) (modules '((guix build utils))) (snippet ;; Fix 'libcc1/configure' error when cross-compiling GCC. @@ -473,35 +504,31 @@ Go. It also includes runtime support libraries for these languages.") (base32 "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby")) (patches (search-patches "gcc-strmov-store-file-names.patch" + "gcc-6-libsanitizer-mode-size.patch" "gcc-6-source-date-epoch-1.patch" "gcc-6-source-date-epoch-2.patch" "gcc-5.0-libvtv-runpath.patch")))) + + ;; GCC 4.9 and 5 has a workaround that is not needed for GCC 6 and later. + (arguments (package-arguments gcc-4.8)) + (inputs `(("isl" ,isl) - ,@(package-inputs gcc-4.7))) - - (native-search-paths - ;; We have to use 'CPATH' for GCC > 5, not 'C_INCLUDE_PATH' & co., due to - ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129>. - (list (search-path-specification - (variable "CPATH") - (files '("include"))) - (search-path-specification - (variable "LIBRARY_PATH") - (files '("lib" "lib64"))))))) + ,@(package-inputs gcc-4.7))))) (define-public gcc-7 (package (inherit gcc-6) - (version "7.4.0") + (version "7.5.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gcc/gcc-" version "/gcc-" version ".tar.xz")) (sha256 (base32 - "0lgy170b0pp60j9cczqkmaqyjjb584vfamj4c30swd7k0j6y5pgd")) + "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq")) (patches (search-patches "gcc-strmov-store-file-names.patch" + "gcc-7-libsanitizer-mode-size.patch" "gcc-5.0-libvtv-runpath.patch")))) (description "GCC is the GNU Compiler Collection. It provides compiler front-ends @@ -628,12 +655,12 @@ as the 'native-search-paths' field." (native-search-paths search-paths) (properties (alist-delete 'hidden? (package-properties gcc))) (arguments - (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system) - (guix build utils) - (ice-9 regex) - (srfi srfi-1) - (srfi srfi-26)) - ,@(package-arguments gcc)) + (substitute-keyword-arguments (package-arguments gcc) + ((#:modules modules %gnu-build-system-modules) + `(,@modules + (srfi srfi-1) + (srfi srfi-26) + (ice-9 regex))) ((#:configure-flags flags) `(cons (string-append "--enable-languages=" ,(string-join languages ",")) @@ -911,7 +938,7 @@ as the 'native-search-paths' field." (define-public isl (package (name "isl") - (version "0.21") + (version "0.22.1") (source (origin (method url-fetch) (uri (list (string-append @@ -922,8 +949,27 @@ as the 'native-search-paths' field." name "-" version ".tar.bz2"))) (sha256 (base32 - "0ng8l3q1px9lkzb44nxnzhh6fhdbclrwng9xs2v9m8yii8gs336i")))) + "1kf54jib0nind1pvakblnfhimmwzm0y1llz8470ag0di5vwqwrhs")))) (build-system gnu-build-system) + (outputs '("out" "static")) + (arguments + '(#:phases (modify-phases %standard-phases + (add-after 'install 'move-static-library + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (static (assoc-ref outputs "static")) + (source (string-append out "/lib/libisl.a")) + (target (string-append static "/lib/libisl.a"))) + (mkdir-p (dirname target)) + (link source target) + (delete-file source) + + ;; Remove reference to libisl.a from the .la file so + ;; libtool looks for it in the usual locations. + (substitute* (string-append out "/lib/libisl.la") + (("^old_library=.*") + "old_library=''\n")) + #t)))))) (inputs `(("gmp" ,gmp))) (home-page "http://isl.gforge.inria.fr/") (synopsis diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm index 2d3ee4200d..c6a2e0117d 100644 --- a/gnu/packages/gd.scm +++ b/gnu/packages/gd.scm @@ -42,7 +42,7 @@ ;; Note: With libgd.org now pointing to github.com, genuine old ;; tarballs are no longer available. Notably, versions 2.0.x are ;; missing. - (version "2.2.5") + (version "2.3.0") (source (origin (method url-fetch) (uri (string-append @@ -50,19 +50,15 @@ version "/libgd-" version ".tar.xz")) (sha256 (base32 - "0lfy5f241sbv8s3splm2zqiaxv7lxrcshh875xryryk7yk5jqc4c")) - - (patches (search-patches "gd-CVE-2018-5711.patch" - "gd-CVE-2018-1000222.patch" - "gd-CVE-2019-6977.patch" - "gd-CVE-2019-6978.patch" - "gd-fix-tests-on-i686.patch" - "gd-freetype-test-failure.patch")))) + "0n5czhxzinvjvmhkf5l9fwjdx5ip69k5k7pj6zwb6zs1k9dibngc")) + (patches (search-patches "gd-fix-tests-on-i686.patch" + "gd-brect-bounds.patch")))) (build-system gnu-build-system) (arguments ;; As recommended by github.com/libgd/libgd/issues/278 to fix rounding ;; issues on aarch64 and other architectures. `(#:make-flags '("CFLAGS=-ffp-contract=off") + #:configure-flags '("--disable-static") #:phases (modify-phases %standard-phases ;; This test is known to fail on i686-linux: @@ -77,12 +73,11 @@ (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("freetype" ,freetype) + `(("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("zlib" ,zlib))) - (propagated-inputs - `(("fontconfig" ,fontconfig) - ("libjpeg" ,libjpeg))) (home-page "https://www.libgd.org/") (synopsis "Library for the dynamic creation of images by programmers") (description @@ -113,8 +108,10 @@ most common applications of GD involve website development.") ("freetype" ,freetype) ("gd" ,gd) ("libpng" ,libpng) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("zlib" ,zlib))) + (native-inputs + `(("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig))) (arguments `(#:make-maker-flags (list (string-append "--lib_jpeg_path=" diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 01f93f6def..3fa8e53884 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -92,7 +92,6 @@ ("readline" ,readline) ("ncurses" ,ncurses) ("guile" ,guile-2.0) - ("python" ,python) ("python-wrapper" ,python-wrapper) ("dejagnu" ,dejagnu) ("source-highlight" ,source-highlight) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index 384f274aee..6c68d4064d 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -140,7 +140,7 @@ topology functions.") (define-public gnome-maps (package (name "gnome-maps") - (version "3.32.2.1") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -148,7 +148,7 @@ topology functions.") name "-" version ".tar.xz")) (sha256 (base32 - "1m191iq1gjaqz79ci3dkbmwrkxp7pzknngimlf5bqib5x8yairlb")))) + "00xslcnhhwslqglgfv2im7vq3awa49y2jxzr8wsby7f713k28vf5")))) (build-system meson-build-system) (arguments `(#:glib-or-gtk? #t @@ -189,11 +189,12 @@ topology functions.") ,geocode-glib-path))) #t)))))) (native-inputs - `(("gobject-introspection" ,gobject-introspection) - ("intltool" ,intltool) + `(("gettext" ,gettext-minimal) + ("gobject-introspection" ,gobject-introspection) ("pkg-config" ,pkg-config))) (inputs - `(("folks" ,folks) + `(("evolution-data-server" ,evolution-data-server) + ("folks" ,folks) ("libchamplain" ,libchamplain) ("libgee" ,libgee) ("libsecret" ,libsecret) @@ -209,10 +210,9 @@ topology functions.") ("glib" ,glib) ("gnome-online-accounts:lib" ,gnome-online-accounts "lib") ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) + ("gtk+" ,gtk+) ("rest" ,rest) ("webkitgtk" ,webkitgtk))) - (propagated-inputs - `(("gtk+3" ,gtk+))) (synopsis "Graphical map viewer and wayfinding program") (description "GNOME Maps is a graphical map viewer. It uses map data from the OpenStreetMap project. It can provide directions for walking, bicycling, @@ -1444,7 +1444,7 @@ using the dataset of topographical information collected by ("qtwebengine" ,qtwebengine) ("quazip" ,quazip) ("routino" ,routino) - ("sqlite" ,sqlite-with-column-metadata) ; See wrap phase + ("sqlite" ,sqlite) ; See wrap phase ("zlib" ,zlib))) (arguments `(#:tests? #f @@ -1465,23 +1465,15 @@ using the dataset of topographical information collected by (invoke "patch" "-p1" "-i" "FindQuaZip5.patch") #t)) (add-after 'install 'wrap - ;; The program fails to run with the error: - ;; undefined symbol: sqlite3_column_table_name16 - ;; Forcing the program to use sqlite-with-column-metadata instead - ;; of sqlite using LD_LIBRARY_PATH solves the problem. - ;; - ;; The program also fails to find the QtWebEngineProcess program, + ;; The program fails to find the QtWebEngineProcess program, ;; so we set QTWEBENGINEPROCESS_PATH to help it. (lambda* (#:key inputs outputs #:allow-other-keys) (let ((bin (string-append (assoc-ref outputs "out") "/bin")) (qtwebengineprocess (string-append (assoc-ref inputs "qtwebengine") - "/lib/qt5/libexec/QtWebEngineProcess")) - (sqlite-lib (string-append (assoc-ref inputs "sqlite") - "/lib"))) + "/lib/qt5/libexec/QtWebEngineProcess"))) (for-each (lambda (program) (wrap-program program - `("LD_LIBRARY_PATH" ":" prefix (,sqlite-lib)) `("QTWEBENGINEPROCESS_PATH" = (,qtwebengineprocess)))) (find-files bin ".*"))) @@ -1993,7 +1985,7 @@ growing set of geoscientific methods.") ("qtwebkit" ,qtwebkit) ("qwt" ,qwt) ("saga" ,saga) - ("sqlite" ,sqlite-with-column-metadata))) + ("sqlite" ,sqlite))) (native-inputs `(("bison" ,bison) ("flex" ,flex) diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 3b74a96966..4d56f05cf2 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -7,7 +7,8 @@ ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017 Leo Famulari <leo@famulari.name> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,7 +58,9 @@ (sha256 (base32 "083xisy6z01zhm7p7rgk4bx9d6zlr8l20qkfv1g29ylnhgwzvij8")))) (build-system gnu-build-system) - (inputs `(("libjpeg" ,libjpeg) + (arguments + `(#:configure-flags '("--disable-static"))) + (inputs `(("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("zlib" ,zlib))) (synopsis "Little CMS, a small-footprint colour management engine") @@ -84,6 +87,25 @@ Consortium standard (ICC), approved as ISO 15076-1.") (sha256 (base32 "0zhcx67afb6b5r936w5jmaydj3ks8zh83n9rm5sv3m3k8q8jib1q")))) (build-system gnu-build-system) + (native-inputs + `(("automake" ,automake))) ; For up to date 'config.guess' and 'config.sub'. + (arguments + `(#:configure-flags '("--disable-static") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-configure + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.sub and config.guess: + (for-each (lambda (file) + (install-file + (string-append (assoc-ref + (or native-inputs inputs) "automake") + "/share/automake-" + ,(version-major+minor + (package-version automake)) + "/" file) ".")) + '("config.sub" "config.guess")) + #t))))) (synopsis "Library for handling paper sizes") (description "The paper library and accompanying files are intended to provide a simple @@ -137,13 +159,7 @@ printing, and psresize, for adjusting page sizes.") (define-public ghostscript (package (name "ghostscript") - (version "9.27") - - ;; The problems addressed by GHOSTSCRIPT/FIXED are not security-related, - ;; but they have a significant impact on usability, hence this graft. - ;; TODO: Ungraft on next update cycle. - (replacement ghostscript/fixed) - + (version "9.52") (source (origin (method url-fetch) @@ -153,7 +169,7 @@ printing, and psresize, for adjusting page sizes.") "/ghostscript-" version ".tar.xz")) (sha256 (base32 - "06dnj0mxyaryfbwlsjwaqf847w91w2h8f108kxxcc41nrnx1y3zw")) + "0z1w42y2jmcpl2m1l3z0sfii6zmvzcwcgzn6bydklia6ig7jli2p")) (patches (search-patches "ghostscript-no-header-creationdate.patch" "ghostscript-no-header-id.patch" "ghostscript-no-header-uuid.patch")) @@ -186,6 +202,10 @@ printing, and psresize, for adjusting page sizes.") (string-append "ZLIBDIR=" (assoc-ref %build-inputs "zlib") "/include") "--enable-dynamic" + "--disable-compile-inits" + (string-append "--with-fontpath=" + (assoc-ref %build-inputs "gs-fonts") + "/share/fonts/type1/ghostscript") ,@(if (%current-target-system) '(;; Specify the native compiler, which is used to build 'echogs' @@ -213,10 +233,6 @@ printing, and psresize, for adjusting page sizes.") (substitute* "base/gscdef.c" (("GS_DOCDIR") "\"~/.guix-profile/share/doc/ghostscript\"")) - ;; The docdir default changed in 9.23 and a compatibility - ;; symlink was added from datadir->docdir. Remove it. - (substitute* "base/unixinst.mak" - (("ln -s \\$\\(DESTDIR\\)\\$\\(docdir\\).*") "")) #t)) (add-after 'configure 'patch-config-files (lambda _ @@ -249,6 +265,7 @@ printing, and psresize, for adjusting page sizes.") #t)))))) (native-inputs `(("perl" ,perl) + ("pkg-config" ,pkg-config) ;needed for freetype ("python" ,python-wrapper) ("tcl" ,tcl) @@ -256,12 +273,14 @@ printing, and psresize, for adjusting page sizes.") ;; these libraries. ,@(if (%current-target-system) `(("zlib/native" ,zlib) - ("libjpeg/native" ,libjpeg)) + ("libjpeg/native" ,libjpeg-turbo)) '()))) (inputs - `(("freetype" ,freetype) + `(("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("gs-fonts" ,gs-fonts) ("jbig2dec" ,jbig2dec) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpaper" ,libpaper) ("libpng" ,libpng) ("libtiff" ,libtiff) @@ -275,25 +294,6 @@ output file formats and printers.") (home-page "https://www.ghostscript.com/") (license license:agpl3+))) -(define ghostscript/fixed - ;; This adds the Freetype dependency (among other things), which fixes the - ;; rendering issues described in <https://issues.guix.gnu.org/issue/34877>. - (package/inherit - ghostscript - (arguments - (substitute-keyword-arguments (package-arguments ghostscript) - ((#:configure-flags flags ''()) - `(append (list "--disable-compile-inits" - (string-append "--with-fontpath=" - (assoc-ref %build-inputs "gs-fonts") - "/share/fonts/type1/ghostscript")) - ,flags)))) - (native-inputs `(("pkg-config" ,pkg-config) ;needed for freetype - ,@(package-native-inputs ghostscript))) - (inputs `(("gs-fonts" ,gs-fonts) - ("fontconfig" ,fontconfig) - ,@(package-inputs ghostscript))))) - (define-public ghostscript/x (package/inherit ghostscript (name (string-append (package-name ghostscript) "-with-x")) diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm index d13390c214..2a0ca3ac25 100644 --- a/gnu/packages/gimp.scm +++ b/gnu/packages/gimp.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Leo Famulari <leo@famulari.name> ;;; Copyright © 2018 Thorsten Wilms <t_w_@freenet.de> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -117,7 +118,7 @@ provided, as well as a framework to add new color models and data types.") `(("cairo" ,cairo) ("pango" ,pango) ("libpng" ,libpng) - ("libjpeg" ,libjpeg))) + ("libjpeg" ,libjpeg-turbo))) (native-inputs `(("pkg-config" ,pkg-config) ("glib" ,glib "bin") ; for gtester @@ -151,9 +152,16 @@ buffers.") (list (string-append "--with-html-dir=" (assoc-ref %outputs "doc") "/share/gtk-doc/html") + + ;; Prevent the build system from running 'gtk-update-icon-cache' + ;; which is not needed during the build because Guix runs it at + ;; profile creation time. + "ac_cv_path_GTK_UPDATE_ICON_CACHE=true" + ;; Disable automatic network request on startup to check for ;; version updates. "--disable-check-update" + ;; ./configure requests not to annoy upstream with packaging bugs. "--with-bug-report-url=https://bugs.gnu.org/guix") #:phases @@ -178,7 +186,7 @@ buffers.") ("glib-networking" ,glib-networking) ("libtiff" ,libtiff) ("libwebp" ,libwebp) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("atk" ,atk) ("gexiv2" ,gexiv2) ("gtk+" ,gtk+-2) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index fd2e543461..941d0adcca 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -294,7 +294,7 @@ also known as DXTn or DXTC) for Mesa.") '(,@(match (%current-system) ((or "armhf-linux" "aarch64-linux") ;; TODO: Fix svga driver for aarch64 and armhf. - '("-Dgallium-drivers=etnaviv,freedreno,nouveau,r300,r600,swrast,tegra,v3d,vc4,virgl")) + '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl")) (_ '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl"))) ;; Enable various optional features. TODO: opencl requires libclc, diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 47410e0d8d..33da929ca1 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org> -;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -105,6 +105,9 @@ ;; Install the session bus socket under /tmp. "--with-session-socket-dir=/tmp" + ;; Build shared libraries only. + "--disable-static" + ;; Use /etc/dbus-1 for system-wide config. ;; Look for configuration file under ;; /etc/dbus-1. This is notably required by @@ -162,7 +165,7 @@ shared NFS home directories.") (define glib (package (name "glib") - (version "2.60.6") + (version "2.62.6") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" @@ -170,7 +173,7 @@ shared NFS home directories.") name "-" version ".tar.xz")) (sha256 (base32 - "0v7vpx2md1gn0wwiirn7g4bhf2csfvcr03y96q2zv97ain6sp3zz")) + "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh")) (patches (search-patches "glib-tests-timer.patch")) (modules '((guix build utils))) (snippet @@ -185,11 +188,9 @@ shared NFS home directories.") `(("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc ("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc ;; These are in the Requires.private field of gio-2.0.pc - ("util-linux" ,util-linux) ; for libmount + ("util-linux" ,util-linux "lib") ;for libmount ("libselinux" ,libselinux) ("zlib" ,zlib))) - (inputs - `(("coreutils" ,coreutils))) (native-inputs `(("gettext" ,gettext-minimal) ("m4" ,m4) ; for installing m4 macros @@ -199,11 +200,26 @@ shared NFS home directories.") ("perl" ,perl) ; needed by GIO tests ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c (arguments - `(;; TODO: Uncomment on the next rebuild cycle. - ;; #:disallowed-references (,tzdata-for-tests) - + `(#:disallowed-references (,tzdata-for-tests) #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-dbus-launch-path + (lambda* (#:key inputs #:allow-other-keys) + (let ((dbus (assoc-ref inputs "dbus"))) + (substitute* "gio/gdbusaddress.c" + (("command_line = g_strdup_printf \\(\"dbus-launch") + (string-append "command_line = g_strdup_printf (\"" + dbus "/bin/dbus-launch"))) + #t))) + (add-after 'unpack 'patch-gio-launch-desktop + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; See also <https://gitlab.gnome.org/GNOME/glib/issues/1633> + ;; for another future fix. + (substitute* "gio/gdesktopappinfo.c" + (("gio-launch-desktop") + (string-append out "/libexec/gio-launch-desktop"))) + #t))) (add-before 'build 'pre-build (lambda* (#:key inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. @@ -284,7 +300,7 @@ shared NFS home directories.") (;; Requires /etc/machine-id. "/gdbus/codegen-peer-to-peer")) - ("gio/tests/gdbus-unix-addresses.c" + ("gio/tests/gdbus-address-get-session.c" (;; Requires /etc/machine-id. "/gdbus/x11-autolaunch")) @@ -312,6 +328,13 @@ shared NFS home directories.") (mkdir-p bin) (rename-file (string-append out "/bin") (string-append bin "/bin")) + ;; This one is an implementation detail of glib. + ;; It is wrong that that's in "/bin" in the first place, + ;; but that's what upstream is doing right now. + ;; See <https://gitlab.gnome.org/GNOME/glib/issues/1633>. + (mkdir (string-append out "/libexec")) + (rename-file (string-append bin "/bin/gio-launch-desktop") + (string-append out "/libexec/gio-launch-desktop")) ;; Do not refer to "bindir", which points to "${prefix}/bin". ;; We don't patch "bindir" to point to "$bin/bin", because that ;; would create a reference cycle between the "out" and "bin" @@ -380,14 +403,14 @@ dynamic loading, and an object system.") (define gobject-introspection (package (name "gobject-introspection") - (version "1.60.2") + (version "1.62.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" "gobject-introspection/" (version-major+minor version) "/gobject-introspection-" version ".tar.xz")) (sha256 - (base32 "172ymc1vbg2rclq1rszx4y32vm900nn1mc4qg1a4mqxjiwvf5pzz")) + (base32 "18lhglg9v6y83lhqzyifc1z0wrlawzrhzzxx0a3h1g7xaz97xvmi")) (patches (search-patches "gobject-introspection-cc.patch" "gobject-introspection-girepository.patch" @@ -529,20 +552,10 @@ information in their documents, such as whether a particular element should be translated.") (license license:gpl3+))) -(define-public itstool/fixed - ;; This variant fixes a python-libxml2 crash when processing UTF-8 - ;; sequences: <https://bugs.gnu.org/37468>. Since the issue is quite rare, - ;; create this variant here to avoid a full rebuild. - (package/inherit - itstool - (inputs - `(("python-libxml2" ,python-libxml2/fixed) - ,@(alist-delete "python-libxml2" (package-inputs itstool)))))) - (define dbus-glib (package (name "dbus-glib") - (version "0.108") + (version "0.110") (source (origin (method url-fetch) (uri @@ -550,7 +563,7 @@ translated.") version ".tar.gz")) (sha256 (base32 - "0b307hw9j41npzr6niw1bs6ryp87m5yafg492gqwvsaj4dz0qd4z")))) + "09g8swvc95bk1z6j8sw463p2v0dqmgm2zjfndf7i8sbcyq67dr3w")))) (build-system gnu-build-system) (propagated-inputs ; according to dbus-glib-1.pc `(("dbus" ,dbus) @@ -570,7 +583,7 @@ by GDBus included in Glib.") (define libsigc++ (package (name "libsigc++") - (version "2.10.2") + (version "2.10.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/libsigc++/" @@ -578,7 +591,7 @@ by GDBus included in Glib.") name "-" version ".tar.xz")) (sha256 (base32 - "163s14d1rqp82gc1vsm3q0wzsbdicb9q6307kz0zk5lm6x9h5jmi")))) + "11j7j1jv4z58d9s7jvl42fnqa1dzl4idgil9r45cjv1w673dys0b")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("m4" ,m4))) @@ -597,7 +610,7 @@ has an ease of use unmatched by other C++ callback libraries.") (define glibmm (package (name "glibmm") - (version "2.60.0") + (version "2.62.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/glibmm/" @@ -605,7 +618,7 @@ has an ease of use unmatched by other C++ callback libraries.") "/glibmm-" version ".tar.xz")) (sha256 (base32 - "1g7jxqd270dv2d83r7pf5893mwpz7d5xib0q01na2yalh34v38d3")))) + "1ziwx6r7k7wbvg4qq1rgrv8zninapgrmhn1hs6926a3krh9ryr9n")))) (build-system gnu-build-system) (arguments `(#:phases @@ -679,7 +692,7 @@ useful for C++.") (define-public python-pygobject (package (name "python-pygobject") - (version "3.28.3") + (version "3.34.0") (source (origin (method url-fetch) @@ -688,24 +701,20 @@ useful for C++.") "/pygobject-" version ".tar.xz")) (sha256 (base32 - "1c6h3brzlyvzbpdsammnd957azmp6cbzqrd65r400vnh2l8f5lrx")))) - (build-system gnu-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-broken-tests - (lambda _ - ;; FIXME: this test freezes and times out. - (delete-file "tests/test_mainloop.py") - ;; FIXME: this test fails with this kind of error: - ;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler - (delete-file "tests/test_ossig.py") + "06i7ynnbvgpz0gw09zsjbvhgcp5qz4yzdifw27qjwdazg2mckql7")) + (modules '((guix build utils))) + (snippet + '(begin + ;; We disable these tests in a snippet so that they are inherited + ;; by the Python 2 variant which is built differently. + (with-directory-excursion "tests" + ;; FIXME: These tests require Gdk and/or Gtk 4. + (for-each delete-file + '("test_atoms.py" "test_overrides_gtk.py")) #t))))) + (build-system meson-build-system) (native-inputs - `(("which" ,which) - ;for tests: dbus-run-session and glib-compile-schemas - ("dbus" ,dbus) - ("glib-bin" ,glib "bin") + `(("glib-bin" ,glib "bin") ("pkg-config" ,pkg-config) ("python-pytest" ,python-pytest))) (inputs @@ -728,45 +737,31 @@ useful for C++.") (define-public python2-pygobject (package (inherit (strip-python2-variant python-pygobject)) (name "python2-pygobject") + + ;; Note: We use python-build-system here, because Meson only supports + ;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it + ;; difficult to use for Python 2 projects. + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'delete-broken-tests + (lambda _ + ;; FIXME: this test freezes and times out. + (delete-file "tests/test_mainloop.py") + ;; FIXME: this test fails with this kind of error: + ;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler + (delete-file "tests/test_ossig.py") + #t))))) (inputs - `(("python" ,python-2) - ("python-pycairo" ,python2-pycairo) + `(("python-pycairo" ,python2-pycairo) ("gobject-introspection" ,gobject-introspection))) (native-inputs - `(("which" ,which) - ;for tests: dbus-run-session and glib-compile-schemas - ("dbus" ,dbus) - ("glib-bin" ,glib "bin") + `(("glib-bin" ,glib "bin") ("pkg-config" ,pkg-config) ("python-pytest" ,python2-pytest))))) -;; Newer version of this core-updates package, for Lollypop. -(define-public python-pygobject-3.34 - (package/inherit - python-pygobject - (version "3.34.0") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/pygobject/" - (version-major+minor version) - "/pygobject-" version ".tar.xz")) - (sha256 - (base32 "06i7ynnbvgpz0gw09zsjbvhgcp5qz4yzdifw27qjwdazg2mckql7")))) - (build-system meson-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-broken-tests - (lambda _ - (with-directory-excursion "tests" - (for-each - delete-file - ;; FIXME: these tests require Gdk and/or Gtk 4. - '("test_atoms.py" - "test_overrides_gtk.py"))) - #t))))))) - (define-public perl-glib (package (name "perl-glib") @@ -810,6 +805,7 @@ up the Gnome environment, and are used in many unrelated projects.") "1symyzbjmxvksn2ifdkk50lafjm2llf2sbmky062gq2pz3cg23cy")) (patches (list + (search-patch "telepathy-glib-channel-memory-leak.patch") ;; Don't use the same test name for multiple tests. ;; <https://bugs.freedesktop.org/show_bug.cgi?id=92245> (origin @@ -829,7 +825,18 @@ up the Gnome environment, and are used in many unrelated projects.") ;; ;; EOFError: EOF read where object expected ;; make[2]: *** [Makefile:1906: _gen/register-dbus-glib-marshallers-body.h] Error 1 - #:parallel-build? #f)) + #:parallel-build? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-failing-tests + (lambda _ + ;; None of the tests below are able to find the org.gtk.vfs.Daemon + ;; service file provided by gvfs. + (substitute* "tests/dbus/Makefile.in" + (("test-contacts\\$\\(EXEEXT\\)") "") + (("test-file-transfer-channel\\$\\(EXEEXT\\)") "") + (("test-stream-tube\\$\\(EXEEXT\\)") "")) + #t))))) (native-inputs `(("glib" ,glib "bin") ; uses glib-mkenums ("gobject-introspection" ,gobject-introspection) @@ -915,7 +922,7 @@ programming language. It also contains the utility (propagated-inputs `(("gcab" ,gcab) ; for .pc file ("gdk-pixbuf" ,gdk-pixbuf) ; for .pc file - ("util-linux" ,util-linux))) ; for .pc file + ("libuuid" ,util-linux "lib"))) ; for .pc file (inputs `(("glib" ,glib) ("gperf" ,gperf) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 57dfbdfa68..d5a2032ccf 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1030,13 +1030,6 @@ useful as a tutorial and users' guide for new or less experienced users.") ("perl" ,perl) ("pkg-config" ,pkg-config) ("python-wrapper" ,python-wrapper))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'bootstrap 'dont-configure-during-bootstrap - (lambda _ - (setenv "NOCONFIGURE" "true") - #t))))) (home-page "https://wiki.gnome.org/Apps/Dia") (synopsis "Diagram creation for GNOME") (description "Dia can be used to draw different types of diagrams, and @@ -1198,7 +1191,7 @@ commonly used macros.") (define-public gnome-contacts (package (name "gnome-contacts") - (version "3.32.1") + (version "3.34") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/gnome-contacts/" @@ -1206,10 +1199,11 @@ commonly used macros.") name "-" version ".tar.xz")) (sha256 (base32 - "17g1gh8yj58cfpdx69h2szivlbjgvv982kmhnkkh0i5bwj0zs2yy")))) + "04igc9xvyc4kb5xf5g2missnvyvj9zv5cqxf5k4z7hb0sv42wq4r")))) (build-system meson-build-system) (arguments - `(#:phases + `(#:configure-flags '("-Dcheese=false") + #:phases (modify-phases %standard-phases (add-after 'unpack 'generate-vapis (lambda* (#:key inputs #:allow-other-keys) @@ -1220,14 +1214,18 @@ commonly used macros.") (invoke "vapigen" "--directory=vapi" "--pkg=gio-2.0" "--library=goa-1.0" (string-append goa "/share/gir-1.0/Goa-1.0.gir")) + #t)) + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "build-aux/meson_post_install.py" + (("gtk-update-icon-cache") "true")) #t))))) (native-inputs `(("glib:bin" ,glib "bin") - ("gtk+:bin" ,gtk+ "bin") ("pkg-config" ,pkg-config))) (inputs - `(("cheese" ,cheese) - ("docbook-xml" ,docbook-xml) + `(("docbook-xml" ,docbook-xml) ("dockbook-xsl" ,docbook-xsl) ("evolution-data-server" ,evolution-data-server) ("gettext" ,gettext-minimal) @@ -1253,7 +1251,7 @@ offline sources, providing a centralized place for managing your contacts.") (define-public gnome-desktop (package (name "gnome-desktop") - (version "3.32.2") + (version "3.34.2") (source (origin (method url-fetch) @@ -1262,7 +1260,7 @@ offline sources, providing a centralized place for managing your contacts.") name "-" version ".tar.xz")) (sha256 (base32 - "0bidx4626x7k2myv6f64qv4fzmxv8v475wibiz19kj8hjfr737q9")))) + "1v983xirwp1y6ggz97bh742ak6gff0hxb359dgn37nikjxhvm0a0")))) (build-system meson-build-system) (arguments '(#:phases @@ -1353,7 +1351,7 @@ and keep up to date translations of documentation.") (define-public gnome-disk-utility (package (name "gnome-disk-utility") - (version "3.32.1") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1361,10 +1359,11 @@ and keep up to date translations of documentation.") name "-" version ".tar.xz")) (sha256 (base32 - "08vwbji9m1nhjjdiyhhaqi8cncys7i89b4bpy095f8475v8y05bg")))) + "1mb7q90lnlp97dhxhnadhjagcfd12dfqzp0vj9h6b1r61pzhy97y")))) (build-system meson-build-system) (arguments - '(#:phases + '(#:configure-flags '("-Dlogind=libelogind") + #:phases (modify-phases %standard-phases (add-after 'unpack 'skip-gtk-update-icon-cache ;; Don't create 'icon-theme.cache'. @@ -1381,7 +1380,8 @@ and keep up to date translations of documentation.") ("libxml2" ,libxml2) ("libxslt" ,libxslt))) (inputs - `(("glib" ,glib) + `(("elogind" ,elogind) + ("glib" ,glib) ("appstream-glib" ,appstream-glib) ("gnome-settings-daemon" ,gnome-settings-daemon) ("gtk+" ,gtk+) @@ -1435,7 +1435,7 @@ the font would look under various sizes.") (define-public gcr (package (name "gcr") - (version "3.28.1") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1443,20 +1443,7 @@ the font would look under various sizes.") name "-" version ".tar.xz")) (sha256 (base32 - "12qn7mcmxb45lz1gq3s3b34rimiyrrshkrpvxdw1fc0w26i4l84m")) - (patches - (list - ;; This patch solves an ordering issue that showed up when - ;; running the test suite against newer Glib 2.60. See - ;; <https://gitlab.gnome.org/GNOME/gcr/merge_requests/9>. - (origin - (method url-fetch) - (uri (string-append "https://gitlab.gnome.org/GNOME/gcr/commit/" - "45d637578d7643ff96c0183ac267497a0b4c6344.diff")) - (file-name "gcr-hashtable-ordering.patch") - (sha256 - (base32 - "1vsqiys8fsm1f1vvds783wwf7zwi5v282rhsai8jrsm6x7h79gbi"))))))) + "0925snsixzkwh49xiayqmj6fcrmklqk8kyy0jkv7m64h9abm1pr9")))) (build-system gnu-build-system) (arguments '(#:phases @@ -1465,9 +1452,9 @@ the font would look under various sizes.") ;; build environment. (add-after 'unpack 'disable-failing-tests (lambda _ - (substitute* "gcr/test-system-prompt.c" - (("g_test_add") "//") - (("return.*") "return 0;")) + (substitute* "Makefile.in" + (("[[:blank:]]+test-system-prompt\\$\\(EXEEXT\\)") + "")) #t)) (add-before 'check 'pre-check (lambda _ @@ -1479,11 +1466,11 @@ the font would look under various sizes.") ("gnupg" ,gnupg) ;called as a child process during tests ("libgcrypt" ,libgcrypt))) (native-inputs - `(("python" ,python-2) ;for tests + `(("python" ,python-wrapper) ;for tests ("pkg-config" ,pkg-config) + ("gettext" ,gettext-minimal) ("glib" ,glib "bin") ("gobject-introspection" ,gobject-introspection) - ("intltool" ,intltool) ("libxml2" ,libxml2) ("vala" ,vala) ("xsltproc" ,libxslt))) @@ -1534,7 +1521,7 @@ GNOME Desktop.") (define-public gnome-keyring (package (name "gnome-keyring") - (version "3.28.2") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1542,7 +1529,7 @@ GNOME Desktop.") name "-" version ".tar.xz")) (sha256 (base32 - "0sk4las4ji8wv9nx8mldzqccmpmkvvr9pdwv9imj26r10xyin5w1")))) + "0hqrsh5g9q9lm190f0m85q4nki8k4ng7wphl6qbccdry59aakkg9")))) (build-system gnu-build-system) (arguments `(#:tests? #f ;48 of 603 tests fail because /var/lib/dbus/machine-id does @@ -1681,7 +1668,7 @@ on the GNOME Desktop with a single simple application.") (define-public gsettings-desktop-schemas (package (name "gsettings-desktop-schemas") - (version "3.32.0") + (version "3.34.0") (source (origin (method url-fetch) @@ -1690,7 +1677,7 @@ on the GNOME Desktop with a single simple application.") name "-" version ".tar.xz")) (sha256 (base32 - "0d8a6479vappgplq5crdr3ah0ykqcr3fw533wkx9v1a8lnrv8n9d")))) + "1bayr76aylawf2fhyjhv9zgk4kpv7ivrrmd80khb0h3h1wk092r8")))) (build-system meson-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -1792,7 +1779,7 @@ GNOME and KDE desktops to the icon names proposed in the specification.") (define-public adwaita-icon-theme (package (inherit gnome-icon-theme) (name "adwaita-icon-theme") - (version "3.32.0") + (version "3.34.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -1800,7 +1787,7 @@ GNOME and KDE desktops to the icon names proposed in the specification.") name "-" version ".tar.xz")) (sha256 (base32 - "11ij35na8nisvxx3qh527iz33h6z2q1a7iinqyp7p65v0zjbd3b9")))) + "025rj1fskw1y448hiar4a9icyzpyr242nlh9xhsmyp8jb71dihp7")))) (native-inputs `(("gtk-encode-symbolic-svg" ,gtk+ "bin"))))) @@ -1830,14 +1817,16 @@ guidelines.") (define-public shared-mime-info (package (name "shared-mime-info") - (version "1.10") + (version "1.15") (source (origin (method url-fetch) - (uri (string-append "https://freedesktop.org/~hadess/" - "shared-mime-info-" version ".tar.xz")) + (uri (string-append + "https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/" + "b27eb88e4155d8fccb8bb3cd12025d5b/shared-mime-info-" version + ".tar.xz")) (sha256 (base32 - "1gxyvwym3xgpmp262gfn8jg5sla6k5hy6m6dmy6grgiq90xsh9f6")))) + "146vynj78wcwdq0ms52jzm1r4m6dzi1rhyh3h4xyb6bw8ckv10pl")))) (build-system gnu-build-system) (arguments ;; The build system appears not to be parallel-safe. @@ -1846,7 +1835,8 @@ guidelines.") `(("glib" ,glib) ("libxml2" ,libxml2))) (native-inputs - `(("intltool" ,intltool) + `(("gettext" ,gettext-minimal) + ("itstool" ,itstool) ("pkg-config" ,pkg-config))) (home-page "https://www.freedesktop.org/wiki/Software/shared-mime-info") (synopsis "Database of common MIME types") @@ -2163,7 +2153,7 @@ XML/CSS rendering engine.") (define-public libgsf (package (name "libgsf") - (version "1.14.46") + (version "1.14.47") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -2171,14 +2161,19 @@ XML/CSS rendering engine.") name "-" version ".tar.xz")) (sha256 (base32 - "0bddmlzg719sjhlbzqlhb7chwk93qc7g68m2r9r8xz112jdradpa")))) + "0kbpp9ksl7977xiga37sk1gdw1r039v6zviqznl7alvvg39yp26i")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (native-inputs - `(("intltool" ,intltool) - ("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("gettext" ,gettext-minimal) + + ;; For tests. + ("perl" ,perl) + ("perl-xml-parser" ,perl-xml-parser))) (inputs - `(("python" ,python) - ("zlib" ,zlib) + `(("zlib" ,zlib) ("bzip2" ,bzip2))) (propagated-inputs `(("gdk-pixbuf" ,gdk-pixbuf) @@ -2195,9 +2190,8 @@ dealing with different structured file formats.") (define-public librsvg (package - (replacement librsvg/fixed) (name "librsvg") - (version "2.40.20") + (version "2.40.21") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -2205,7 +2199,7 @@ dealing with different structured file formats.") name "-" version ".tar.xz")) (sha256 (base32 - "0ay9himvw1l1swcf3h1312d2iqzfl65kpbfgiyfykgvq7cydvx6g")))) + "1fljkag2gr7c4k5mn798lgf9903xslz8h51bgvl89nnay42qjqpp")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -2243,7 +2237,9 @@ dealing with different structured file formats.") ("glib" ,glib "bin") ; glib-mkenums, etc. ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. (inputs - `(("pango" ,pango) + `(;; XXX: 1.44 causes some test failures, so we stick with 1.42 for + ;; this ancient version of librsvg. + ("pango" ,pango-1.42) ("libcroco" ,libcroco) ("bzip2" ,bzip2) ("libgsf" ,libgsf) @@ -2260,20 +2256,6 @@ dealing with different structured file formats.") library.") (license license:lgpl2.0+))) -(define librsvg/fixed - (package - (inherit librsvg) - (name "librsvg") - (version "2.40.21") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "1fljkag2gr7c4k5mn798lgf9903xslz8h51bgvl89nnay42qjqpp")))))) - (define-public librsvg-next (package (inherit librsvg) @@ -2451,7 +2433,9 @@ functionality was designed to be as reusable and portable as possible.") "0l3mhpyym9m5iz09fz0rgiqxl2ym6kpkwpsp1xrr4aa80nlh1jam")))) (build-system gnu-build-system) (arguments - `(#:configure-flags + `(;; The "timeout-server" test hangs when run in parallel. + #:parallel-tests? #f + #:configure-flags '(;; We don't need static libraries, plus they don't build reproducibly ;; (non-deterministic ordering of .o files in the archive.) "--disable-static" @@ -2784,7 +2768,7 @@ creating interactive structured graphics.") ("libgnome" ,libgnome) ("libgnomecanvas" ,libgnomecanvas) ("libgnome-keyring" ,libgnome-keyring))) - (inputs `(("libjpeg" ,libjpeg) + (inputs `(("libjpeg" ,libjpeg-turbo) ("popt" ,popt) ("libbonobo" ,libbonobo) ("libxml2" ,libxml2) @@ -3096,7 +3080,7 @@ Hints specification (EWMH).") `(("bison" ,bison) ("docbook-xml" ,docbook-xml) ("intltool" ,intltool) - ("itstool" ,itstool/fixed) ;see <https://bugs.gnu.org/37468> + ("itstool" ,itstool) ("glib:bin" ,glib "bin") ("pkg-config" ,pkg-config))) (home-page "http://www.gnumeric.org") @@ -3150,7 +3134,7 @@ engineering.") (define-public seahorse (package (name "seahorse") - (version "3.32.2") + (version "3.34") (source (origin (method url-fetch) @@ -3159,9 +3143,7 @@ engineering.") version ".tar.xz")) (sha256 (base32 - "0d8zdzmlz7fjv9xl20zl4ckidf465mvdjnbpxy3k08y9iw423q4x")) - (patches (search-patches - "seahorse-gkr-use-0-on-empty-flags.patch")))) + "16sfnqrdlr5xx6kixx2ln1mva7nngjlw1k3f5n454vyaigffjh2v")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t @@ -3201,7 +3183,7 @@ passwords in the GNOME keyring.") (define-public vala (package (name "vala") - (version "0.44.5") + (version "0.46.5") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3209,7 +3191,7 @@ passwords in the GNOME keyring.") name "-" version ".tar.xz")) (sha256 (base32 - "0zy2kfcvhikczfzhk5l7pkw6mvn3d6vw8cv7g08iah85p22q33xv")))) + "07fv895sp9wq74b20qig7hic0r4ynrr5pfaqba02r44xb794fy0s")))) (build-system gnu-build-system) (arguments '(#:phases @@ -3406,16 +3388,17 @@ and RDP protocols.") (define-public dconf (package (name "dconf") - (version "0.32.0") + (version "0.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) + (patches (search-patches "dconf-meson-0.52.patch")) (sha256 (base32 - "1azz4hb9z76yxn34yrrsiib3iqz5z4vpwn5q7cncp55w365ygg38")))) + "0lnsl85cp2vpzgp8pkf6l6yd2i3lp02jdvga1icfa78j2smr8fll")))) (build-system meson-build-system) (propagated-inputs ;; In Requires of dconf.pc. @@ -3491,13 +3474,7 @@ and objects.") (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'no-configure - (lambda* _ - (setenv "NOCONFIGURE" "1") - #t))) - #:configure-flags + '(#:configure-flags (list (string-append "--with-xkb-base=" (assoc-ref %build-inputs "xkeyboard-config") "/share/X11/xkb") @@ -3565,7 +3542,7 @@ library.") (define-public glib-networking (package (name "glib-networking") - (version "2.60.3") + (version "2.62.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/glib-networking/" @@ -3573,7 +3550,7 @@ library.") "glib-networking-" version ".tar.xz")) (sha256 (base32 - "1mfw44qpmwvz6yzj8c6spx6z357wrmkk15byrkc5byagd82860fm")))) + "0i2mw75297ql72h47vyvff3hqa0kcmqybblj52fqrarb0kfbhi06")))) (build-system meson-build-system) (arguments `(#:configure-flags '("-Dlibproxy_support=false"))) @@ -3842,7 +3819,7 @@ and other secrets. It communicates with the \"Secret Service\" using DBus.") (define-public gnome-mines (package (name "gnome-mines") - (version "3.32.2") + (version "3.34.0") (source (origin (method url-fetch) @@ -3851,7 +3828,7 @@ and other secrets. It communicates with the \"Secret Service\" using DBus.") name "-" version ".tar.xz")) (sha256 (base32 - "1nv966wkp2rqxzcdb76bwlbzpjqadcaqzrnkxpzwnvjjr167yx8g")))) + "1spxa6qr1y8s5rrsvpciywpvhk812ngn95s1apaxaigwy2g1iw54")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t @@ -3885,7 +3862,7 @@ floating in an ocean using only your brain and a little bit of luck.") (define-public gnome-sudoku (package (name "gnome-sudoku") - (version "3.32.0") + (version "3.34.1") (source (origin (method url-fetch) @@ -3894,7 +3871,7 @@ floating in an ocean using only your brain and a little bit of luck.") name "-" version ".tar.xz")) (sha256 (base32 - "1wwdjflw1lbx3cv6gvqcgp5jnjkrq37ld6mjbjj03g3vr90qaf0l")))) + "025y85r4qqardivvwiwhbmgarziykdy224m8zlrq8b79zv82793b")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t @@ -3931,7 +3908,7 @@ more fun.") (define-public gnome-terminal (package (name "gnome-terminal") - (version "3.32.2") + (version "3.34.2") (source (origin (method url-fetch) @@ -3940,7 +3917,7 @@ more fun.") name "-" version ".tar.xz")) (sha256 (base32 - "0shhpnagasyp1kxgjczfrivcxbgrrl3y8lzvp1z101m67h4jp6km")))) + "0gc004f9b5k94gkdanmqjz3wqgnpny0l3nqm8zd19h4f0ps27mrv")))) (build-system glib-or-gtk-build-system) (arguments '(#:configure-flags @@ -3965,7 +3942,7 @@ more fun.") ("vte" ,vte) ("gnutls" ,gnutls) ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) - ("util-linux" ,util-linux) + ("util-linux" ,util-linux "lib") ("vala" ,vala))) (home-page "https://wiki.gnome.org/Apps/Terminal") (synopsis "Terminal emulator") @@ -4203,7 +4180,7 @@ service via the system message bus.") (define-public libgweather (package (name "libgweather") - (version "3.28.3") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4211,7 +4188,7 @@ service via the system message bus.") name "-" version ".tar.xz")) (sha256 (base32 - "1xz60h59zgyk61y2wwzm0xlqav72i668g7v0x7rh9idz240hxls5")))) + "1fgiqswkhiaijanml3mb16ajn5aanrk7x6yiwagp9n9rssam6902")))) (build-system meson-build-system) (arguments `(#:tests? #f ; one of two tests requires network access @@ -4245,7 +4222,7 @@ services for numerous locations.") (define-public gnome-settings-daemon (package (name "gnome-settings-daemon") - (version "3.32.1") + (version "3.34.1") (source (origin (method url-fetch) @@ -4254,7 +4231,7 @@ services for numerous locations.") name "-" version ".tar.xz")) (sha256 (base32 - "02d0s0g2mmqfib44r3sf0499r08p61s8l2ndsjssbam1bi7x2dks")))) + "07y1gbicz0pbxmdgwrdzyc4byy30wfwpbqgvnx27gnpqmc5s50cr")))) (build-system meson-build-system) (arguments `(#:glib-or-gtk? #t @@ -4262,6 +4239,7 @@ services for numerous locations.") (list (string-append "-Dudev_dir=" (assoc-ref %outputs "out") "/lib/udev/rules.d/") + "-Dsystemd=false" ;; Otherwise, the RUNPATH will lack the final path component. (string-append "-Dc_link_args=-Wl,-rpath=" (assoc-ref %outputs "out") @@ -4299,7 +4277,9 @@ services for numerous locations.") ("librsvg" ,librsvg) ("xf86-input-wacom" ,xf86-input-wacom) ("wayland" ,wayland) - ("network-manager" ,network-manager))) + ("network-manager" ,network-manager) + ("gcr" ,gcr) + ("modem-manager" ,modem-manager))) (home-page "https://www.gnome.org") (synopsis "GNOME settings daemon") (description @@ -4414,7 +4394,7 @@ both a traditional UI or a modern UI with a GtkHeaderBar.") (define-public devhelp (package (name "devhelp") - (version "3.32.0") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4422,7 +4402,7 @@ both a traditional UI or a modern UI with a GtkHeaderBar.") name "-" version ".tar.xz")) (sha256 (base32 - "06sa83zggk29wcg75fl3gqh0rmi7cd3gsbk09a2z23r7vpy7xanq")))) + "0zpmn6fgkgiayvn4diia5df0s6s7dqrdnp3nrvpavsmgn0vhb4pg")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t @@ -4745,7 +4725,7 @@ GNOME Games, but it may be used by others.") (define-public gnome-klotski (package (name "gnome-klotski") - (version "3.32.0") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -4753,7 +4733,7 @@ GNOME Games, but it may be used by others.") name "-" version ".tar.xz")) (sha256 (base32 - "1p4s15gxj6gasix22z9vlx2yrx196fvcxr6v6qrl569idfgjbi72")))) + "0sbx0bzy32lh2c9jp8v7gz788wn9y1la8mr5a7gf7370szsl4d4f")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t @@ -4879,7 +4859,7 @@ discovery protocols.") (define-public totem (package (name "totem") - (version "3.32.1") + (version "3.34.1") (source (origin (method url-fetch) @@ -4888,7 +4868,7 @@ discovery protocols.") name "-" version ".tar.xz")) (sha256 (base32 - "0yra8apc7smpwf7d1k8crhrm8d4wix24ds6i9yxbch1v11jnhr3v")))) + "028sc6xbyi7rs884862d8f3di6zhcm0lhvlpc3r69ifzjsq9my3b")))) (build-system meson-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -5073,7 +5053,7 @@ supports playlists, song ratings, and any codecs installed through gstreamer.") (define-public eog (package (name "eog") - (version "3.32.2") + (version "3.34.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -5081,7 +5061,7 @@ supports playlists, song ratings, and any codecs installed through gstreamer.") name "-" version ".tar.xz")) (sha256 (base32 - "1bcxpqgzlk2cy4wfb3b5h66mhpj2fhrk1rrb5qqcv5xrr62ik5xy")))) + "0b7ld4azs9xbdjsk9b91ywhdzvxgajhndiwiivxjzbr0hjgp7c7x")))) (build-system meson-build-system) (arguments `(#:configure-flags @@ -5120,8 +5100,8 @@ supports playlists, song ratings, and any codecs installed through gstreamer.") ("lcms" ,lcms) ("libexif" ,libexif) ("libpeas" ,libpeas) - ("libjpeg" ,libjpeg) - ("librsvg" ,librsvg) + ("libjpeg" ,libjpeg-turbo) + ("librsvg" ,librsvg-next) ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) ("gtk+" ,gtk+))) (home-page "https://wiki.gnome.org/Apps/EyeOfGnome") @@ -5418,7 +5398,7 @@ a secret password store, an adblocker, and a modern UI.") (define-public epiphany (package (name "epiphany") - (version "3.32.5") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/epiphany/" @@ -5426,7 +5406,7 @@ a secret password store, an adblocker, and a modern UI.") "epiphany-" version ".tar.xz")) (sha256 (base32 - "1hj4yy53fwh96h17cqiw3gxc070vmc7yqwc7phvhnpyinkp9g5my")))) + "18d48vcp2nxs63bddkdplslgbnlfq79pm2ivl8hk38kkggy3dahf")))) (build-system meson-build-system) (arguments @@ -5543,7 +5523,7 @@ of running programs and invoke methods on those interfaces.") (define-public yelp-xsl (package (name "yelp-xsl") - (version "3.32.1") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -5551,10 +5531,10 @@ of running programs and invoke methods on those interfaces.") name "-" version ".tar.xz")) (sha256 (base32 - "013z2ixx9kfrs6hq79qpil093xfbc12y1p0mvsh6lpala30iphya")))) + "1bdpgkzawhqmw52l6zx8czzg1ndfgcf1p44m2bxjdpqkc4afcgqc")))) (build-system gnu-build-system) (native-inputs - `(("intltool" ,intltool) + `(("gettext-minimal" ,gettext-minimal) ("itstool" ,itstool) ("xmllint" ,libxml2))) (home-page "https://wiki.gnome.org/Apps/Yelp") @@ -5601,7 +5581,7 @@ freedesktop.org help system specification.") (define-public yelp-tools (package (name "yelp-tools") - (version "3.28.0") + (version "3.32.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -5609,7 +5589,7 @@ freedesktop.org help system specification.") name "-" version ".tar.xz")) (sha256 (base32 - "1b61dmlb1sd50fgq6zgnkcpx2s1py33q0x9cx67fzpsr4gmgxnw2")))) + "1yg8f5g5wadhmy4yfd9yjhvd8vll4gq4l86ibp0b42qbxnsmcf0q")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) @@ -5629,17 +5609,6 @@ lifting is done by packages like yelp-xsl and itstool. This package just wraps things up in a developer-friendly way.") (license license:gpl2+))) -(define-public yelp-tools/fixed - ;; This variant fixes a python-libxml2 crash when processing UTF-8 - ;; sequences: <https://bugs.gnu.org/37468>. TODO: Remove this in - ;; the next rebuild cycle. - (hidden-package - (package/inherit - yelp-tools - (propagated-inputs - `(("itstool" ,itstool/fixed) - ,@(alist-delete "itstool" (package-propagated-inputs yelp-tools))))))) - (define-public libgee (package (name "libgee") @@ -5803,7 +5772,7 @@ such as gzip tarballs.") (define-public gnome-session (package (name "gnome-session") - (version "3.32.0") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -5811,7 +5780,7 @@ such as gzip tarballs.") name "-" version ".tar.xz")) (sha256 (base32 - "0zrzkpd406i159mla7bfs5npa32fgqh66aip1rfq02rgsgmc9m5v")))) + "1qgqp97f8k2zi2ydvhds14zsjzfj7cv521r6wx5sw0qacn0p7dwb")))) (arguments '(#:glib-or-gtk? #t #:phases @@ -5874,7 +5843,7 @@ configuration program to choose applications starting on login.") (define-public gjs (package (name "gjs") - (version "1.56.2") + (version "1.58.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -5882,7 +5851,7 @@ configuration program to choose applications starting on login.") name "-" version ".tar.xz")) (sha256 (base32 - "1b5321krn89p3f7s2ik6gpfnc61apzljhlnbqky8c88f7n6832ac")))) + "1bkksx362007zs8c31ydygb29spwa5g5kch1ad2grc2sp53wv7ya")))) (build-system gnu-build-system) (arguments '(#:phases @@ -5912,6 +5881,7 @@ configuration program to choose applications starting on login.") ("xmllint" ,libxml2) ;; For testing ("dbus-launch" ,dbus) + ("dconf" ,dconf) ; required to properly store settings ("uuidgen" ,util-linux) ("xvfb" ,xorg-server-for-tests))) (propagated-inputs @@ -5932,7 +5902,7 @@ javascript engine and the GObject introspection framework.") (define-public gedit (package (name "gedit") - (version "3.32.2") + (version "3.34.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -5940,7 +5910,7 @@ javascript engine and the GObject introspection framework.") name "-" version ".tar.xz")) (sha256 (base32 - "1q2rk7fym542c7k3bn2wlnzgy384gxacbifsjny0spbg95gfybvl")))) + "1inm50sdfw63by1lf4f1swb59mpyxlly0g5rdg99j5l3357fzygb")))) (build-system meson-build-system) (arguments `(#:glib-or-gtk? #t @@ -6053,7 +6023,7 @@ to display dialog boxes from the commandline and shell scripts.") (define-public mutter (package (name "mutter") - (version "3.32.2") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -6061,7 +6031,7 @@ to display dialog boxes from the commandline and shell scripts.") name "-" version ".tar.xz")) (sha256 (base32 - "1h577i2ap7dpfy1jg101jvc6nzccc0csgvd55ahydlr8f94frcva")))) + "0b8bz5kvs7rlwvqsg87cf6jhrrj95vgd1l235mjx8rip35ipfvrd")))) ;; NOTE: Since version 3.21.x, mutter now bundles and exports forked ;; versions of cogl and clutter. As a result, many of the inputs, ;; propagated-inputs, and configure flags used in cogl and clutter are @@ -6073,10 +6043,12 @@ to display dialog boxes from the commandline and shell scripts.") #:tests? #f #:glib-or-gtk? #t #:configure-flags - ;; Otherwise, the RUNPATH will lack the final path component. - (list (string-append "-Dc_link_args=-Wl,-rpath=" + ;; TODO: Enable profiler when Sysprof is packaged. + (list "-Dprofiler=false" + ;; Otherwise, the RUNPATH will lack the final path component. + (string-append "-Dc_link_args=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib:" - (assoc-ref %outputs "out") "/lib/mutter-4") + (assoc-ref %outputs "out") "/lib/mutter-5") ;; The following flags are needed for the bundled clutter (string-append "-Dxwayland_path=" @@ -6086,27 +6058,10 @@ to display dialog boxes from the commandline and shell scripts.") ;; the remaining flags are needed for the bundled cogl (string-append "-Dopengl_libname=" (assoc-ref %build-inputs "mesa") - "/lib/libGL.so")) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-werror - (lambda _ - ;; XXX: build fails with [-Werror]: - ;; backends/meta-cursor-renderer.c:112:5: error: - ;; implicit declaration of function ?roundf? - (substitute* "meson.build" - (("'-Werror=.*',") "")) - #t)) - ;; Replace references to systemd libraries to elogind references. - (add-before 'configure 'use-elogind - (lambda _ - (substitute* (list "meson.build" - "src/backends/native/meta-launcher.c" - "src/core/main.c") - (("systemd") "elogind")) - #t))))) + "/lib/libGL.so")))) (native-inputs - `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. + `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database + ("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. ("gobject-introspection" ,gobject-introspection) ("intltool" ,intltool) ("pkg-config" ,pkg-config) @@ -6224,7 +6179,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.") (define-public evolution-data-server (package (name "evolution-data-server") - (version "3.32.4") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -6234,7 +6189,7 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.") "evolution-data-server-libical-compat.patch")) (sha256 (base32 - "0zsc9xwy6ixk3x0dx69ax5isrdw8qxjdxg2i5fr95s40nss7rxl3")))) + "16z85y6hhazcrp5ngw47w4x9r0j8zrj7awv5im58hhp0xs19zf1y")))) (build-system cmake-build-system) (arguments '(#:configure-flags @@ -6261,13 +6216,6 @@ Exchange, Last.fm, IMAP/SMTP, Jabber, SIP and Kerberos.") (delete-file-recursively "tests/book-migration") (substitute* "tests/CMakeLists.txt" (("add_subdirectory\\(book-migration\\)") "")) - ;; tests/libebook/client/test-book-client-view-operations:8077): - ;; e-data-server-WARNING **: - ;; (src/libedataserver/e-source-registry.c:264):thread_closure_free: - ;; runtime check failed: - ;; (!g_main_context_pending (closure->main_context)) - (substitute* "tests/libebook/client/CMakeLists.txt" - (("test-book-client-view-operations") "")) #t)) (add-after 'unpack 'patch-paths (lambda _ @@ -6471,6 +6419,10 @@ users.") (lambda _ ;; For the missing /etc/machine-id. (setenv "DBUS_FATAL_WARNINGS" "0") + + ;; XXX: Regenerate some of the tests that are dependent on Python version. + ;; Try removing this variable for newer versions of NetworkManager. + (setenv "NM_TEST_REGENERATE" "1") #t)) (replace 'install (lambda _ @@ -6799,7 +6751,7 @@ libxml2.") (define-public gdm (package (name "gdm") - (version "3.32.0") + (version "3.34.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -6807,7 +6759,7 @@ libxml2.") name "-" version ".tar.xz")) (sha256 (base32 - "12ypdz9i24hwbl1d1wnnxb8zlvfa4f49n9ac5cl9d6h8qp4b0gb4")) + "1lyqvcwxhwxklbxn4xjswjzr6fhjix6h28mi9ypn34wdm9bzcpg8")) (patches (search-patches "gdm-default-session.patch")))) (build-system glib-or-gtk-build-system) (arguments @@ -6849,6 +6801,7 @@ libxml2.") (("#include <systemd/sd-daemon\\.h>") "")) ;; Use elogind for sd-login. (substitute* '("common/gdm-common.c" + "daemon/gdm-local-display-factory.c" "daemon/gdm-manager.c" "libgdm/gdm-user-switching.c") (("#include <systemd/sd-login\\.h>") @@ -6896,7 +6849,8 @@ libxml2.") (substitute* '("daemon/gdm-server.c") (("\\(X_SERVER X_SERVER_ARG_FORMAT") "(\"%s\" X_SERVER_ARG_FORMAT, g_getenv (\"GDM_X_SERVER\")")) - (substitute* '("daemon/gdm-x-session.c") + (substitute* '("daemon/gdm-wayland-session.c" + "daemon/gdm-x-session.c") (("\"dbus-daemon\"") "g_getenv (\"GDM_DBUS_DAEMON\")") (("X_SERVER") @@ -7015,7 +6969,7 @@ usage and information about running processes.") (define-public gnome-bluetooth (package (name "gnome-bluetooth") - (version "3.32.1") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -7023,7 +6977,7 @@ usage and information about running processes.") name "-" version ".tar.xz")) (sha256 (base32 - "1am1gf0nzwg6x1s8ly13j0xnjzgrfj06j0dp52x4zy9s67ywlhb4")))) + "1bvbxcsjkyl0givy8nfm7112bq3c0vn1v89fdk2pip714dsfcrz8")))) (build-system meson-build-system) (native-inputs `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc. @@ -7050,7 +7004,7 @@ devices using the GNOME desktop.") (define-public gnome-control-center (package (name "gnome-control-center") - (version "3.32.2") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -7058,7 +7012,7 @@ devices using the GNOME desktop.") name "-" version ".tar.xz")) (sha256 (base32 - "03np0mhfl9kkdw4cb711pda0cli9zgh2bq2gqn2zwbdi3qnhk9gs")))) + "054igagvmyzpaa5nwzz98gv7bk7l5dwp6g813707132si3szlpx8")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t @@ -7099,10 +7053,15 @@ devices using the GNOME desktop.") (("DATADIR \"/gnome/gnome-version.xml\"") (string-append "\"" gnome-desktop "/share/gnome/gnome-version.xml\""))) - #t)))))) + #t))) + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "build-aux/meson/meson_post_install.py" + (("gtk-update-icon-cache") (which "true"))) + #t))))) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-mkenums, etc. - ("gtk+:bin" ,gtk+ "bin") ; for gtk-update-icon-cache ("intltool" ,intltool) ("pkg-config" ,pkg-config) ("xsltproc" ,libxslt) @@ -7158,7 +7117,7 @@ properties, screen resolution, and other GNOME parameters.") (define-public gnome-shell (package (name "gnome-shell") - (version "3.32.2") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -7166,8 +7125,9 @@ properties, screen resolution, and other GNOME parameters.") name "-" version ".tar.xz")) (sha256 (base32 - "0anlkdnqsp5fqvmg95rqjpp1ifcx5xzsvwcrdsvb1cqzbh6inmp5")) - (patches (search-patches "gnome-shell-theme.patch")) + "0k9vq2gh1nhdd6fpp7jnwx37qxaakawiqw1xnlfjvq5g5zdn8ckh")) + (patches (search-patches "gnome-shell-theme.patch" + "gnome-shell-disable-test.patch")) (modules '((guix build utils))) (snippet #~(begin @@ -7261,7 +7221,8 @@ properties, screen resolution, and other GNOME parameters.") '("inkscape" "intltool" "glib:bin")) #:outputs outputs))))))) (native-inputs - `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. + `(("asciidoc" ,asciidoc) + ("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. ("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database ("gobject-introspection" ,gobject-introspection) ("inkscape" ,inkscape) @@ -7282,6 +7243,7 @@ properties, screen resolution, and other GNOME parameters.") ("gdm" ,gdm) ("gdk-pixbuf" ,gdk-pixbuf+svg) ("gjs" ,gjs) + ("gnome-autoar" ,gnome-autoar) ("gnome-bluetooth" ,gnome-bluetooth) ("gnome-desktop" ,gnome-desktop) ("gnome-settings-daemon" ,gnome-settings-daemon) @@ -7354,7 +7316,7 @@ as SASL, TLS and VeNCrypt. Additionally it supports encoding extensions.") (define-public gnome-autoar (package (name "gnome-autoar") - (version "0.2.3") + (version "0.2.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -7362,14 +7324,13 @@ as SASL, TLS and VeNCrypt. Additionally it supports encoding extensions.") name "-" version ".tar.xz")) (sha256 (base32 - "02i4zgqqqj56h7bcys6dz7n78m4nj2x4dv1ggjmnrk98n06xpsax")))) + "0yk56ch46n3wfy633mq31kif9n7v06rlij4vqbsbn6l4z1vw6d0a")))) (build-system glib-or-gtk-build-system) (native-inputs - `(("gnome-common" ,gnome-common) - ("gobject-introspection" ,gobject-introspection) + `(("gobject-introspection" ,gobject-introspection) ("pkg-config" ,pkg-config))) (propagated-inputs - `(("libarchive" ,libarchive))) ; XXX document why + `(("libarchive" ,libarchive))) ; Required by gnome-autoar-0.pc (inputs `(("gtk+" ,gtk+))) (synopsis "Archives integration support for GNOME") @@ -7495,7 +7456,7 @@ endpoint and it understands SPARQL. ") ("libgsf" ,libgsf) ("libgxps" ,libgxps) ("libiptcdata" ,libiptcdata) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libosinfo" ,libosinfo) ("libpng" ,libpng) ("libseccomp" ,libseccomp) @@ -7523,7 +7484,7 @@ shared object databases, search tools and indexing.") (define-public nautilus (package (name "nautilus") - (version "3.32.3") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -7531,17 +7492,24 @@ shared object databases, search tools and indexing.") name "-" version ".tar.xz")) (sha256 (base32 - "1x9crzbj6rrrf8w5dkcx0c14j40byr4ijpzkwd5dcrbfvvdy1r01")))) + "19zqwq4qyyncc5wq3xls0f7rsavnw741k336p2h7kx35p4kf41mv")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "build-aux/meson/postinstall.py" + (("gtk-update-icon-cache") "true")) + #t))) ;; XXX: FAIL: check-nautilus ;; Settings schema 'org.gnome.nautilus.preferences' is not installed #:tests? #f)) (native-inputs `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database ("glib:bin" ,glib "bin") ; for glib-mkenums, etc. - ("gtk+:bin" ,gtk+ "bin") ; for gtk-update-icon-cache ("gobject-introspection" ,gobject-introspection) ("intltool" ,intltool) ("pkg-config" ,pkg-config))) @@ -7612,7 +7580,7 @@ is complete it provides a graphical representation of each selected folder.") (define-public gnome-backgrounds (package (name "gnome-backgrounds") - (version "3.32.0") + (version "3.34.0") (source (origin (method url-fetch) @@ -7621,7 +7589,7 @@ is complete it provides a graphical representation of each selected folder.") name "-" version ".tar.xz")) (sha256 (base32 - "1s5krdmd3md44p1fgr2lqm5ifxb8s1vzx6hm11sb4cgzr4dw6lrz")))) + "0zxlwy55fz7i582hch2wnj8zy1kzikssgaix0l2y41ccp5nzpdy2")))) (build-system meson-build-system) (native-inputs `(("intltool" ,intltool))) @@ -7640,7 +7608,7 @@ can add your own files to the collection.") (define-public gnome-screenshot (package (name "gnome-screenshot") - (version "3.32.0") + (version "3.34.0") (source (origin (method url-fetch) @@ -7649,11 +7617,19 @@ can add your own files to the collection.") name "-" version ".tar.xz")) (sha256 (base32 - "09ha7dizjm5ymqpjyrqd10ijfb3xlqc1mwg9ajkrbfry11q9yq4b")))) + "1rmiq890j7gfn5mcz31xy6jfnnxgc17dq67bhn2k9m5ylbvza2n8")))) (build-system meson-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "build-aux/postinstall.py" + (("gtk-update-icon-cache") "true")) + #t))))) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. - ("gtk+-bin" ,gtk+ "bin") ; for gtk-update-icon-cache ("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database ("intltool" ,intltool) ("appstream-glib" ,appstream-glib) @@ -7674,7 +7650,7 @@ beautifying border effects.") (define-public dconf-editor (package (name "dconf-editor") - (version "3.32.0") + (version "3.34.2") (source (origin (method url-fetch) @@ -7683,19 +7659,8 @@ beautifying border effects.") name "-" version ".tar.xz")) (sha256 (base32 - "1fmsmlh16njjm948grz20mzrsvb4wjj7pl1fvkrkxqi7mhr177gi")))) + "0pwxjada2vaf69ihpjgp9nky54iykvxq63lp1vl8pxjanif2mk6f")))) (build-system meson-build-system) - (arguments - '(#:phases (modify-phases %standard-phases - (add-before 'configure 'set-glib-minimum-version - (lambda _ - ;; Change the minimum required GLib version so that - ;; 'valac' is passed '--target-glib 2.60.0'; failing to - ;; do that, it complains that "55" is not an even - ;; number. See <https://bugs.gnu.org/37503>. - (substitute* "editor/meson.build" - (("2\\.55\\.1") "2.60.0")) - #t))))) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, gio-2.0. ("gtk+-bin" ,gtk+ "bin") ; for gtk-update-icon-cache @@ -7706,7 +7671,7 @@ beautifying border effects.") `(("dconf" ,dconf) ("gtk+" ,gtk+) ("libxml2" ,libxml2))) - (home-page "https://git.gnome.org/browse/dconf-editor") + (home-page "https://gitlab.gnome.org/GNOME/dconf-editor") (synopsis "Graphical editor for GNOME's dconf configuration system") (description "Dconf-editor is a graphical tool for browsing and editing the dconf @@ -7804,7 +7769,8 @@ associations for GNOME.") ("gnome-desktop" ,gnome-desktop) ("libgweather" ,libgweather))) (arguments - `(#:phases + `(#:glib-or-gtk? #t + #:phases (modify-phases %standard-phases (add-after 'install 'fix-desktop-file ;; FIXME: "gapplication launch org.gnome.Weather" fails for some reason. @@ -7813,7 +7779,16 @@ associations for GNOME.") (let* ((out (assoc-ref outputs "out")) (applications (string-append out "/share/applications"))) (substitute* (string-append applications "/org.gnome.Weather.desktop") - (("Exec=.*") "Exec=gnome-weather\n")))))))) + (("Exec=.*") "Exec=gnome-weather\n")) + #t))) + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) + ;; GNOME Weather needs the typelib files of GTK+, Pango etc at runtime. + (wrap-program (string-append out "/bin/gnome-weather") + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))) + #t)))))) (synopsis "Weather monitoring for GNOME desktop") (description "GNOME Weather is a small application that allows you to monitor the current weather conditions for your city, or anywhere in the @@ -7866,7 +7841,11 @@ world.") ;; GNOME-Core-Utilities ("baobab" ,baobab) ("cheese" ,cheese) - ("eog" ,eog) + ;; XXX: EoG requires librsvg-next, which depends on Rust, which currently + ;; only works on x86_64, so exclude it on other architectures. + ,@(if (string-prefix? "x86_64" (%current-system)) + `(("eog" ,eog)) + '()) ("epiphany" ,epiphany) ("evince" ,evince) ("file-roller" ,file-roller) @@ -7944,7 +7923,7 @@ documents and diagrams, playing media, scanning, and much more.") (arguments '(#:phases (modify-phases %standard-phases - (replace 'bootstrap + (add-before 'bootstrap 'build-without-Werror (lambda _ ;; The build system cleverly detects that we're not building from ;; a release tarball and turns on -Werror for GCC. @@ -7952,11 +7931,7 @@ documents and diagrams, playing media, scanning, and much more.") ;; causes the build to fail unnecessarily, so we remove the flag. (substitute* '("configure.ac") (("-Werror") "")) - ;; The autogen.sh script in gnome-common will run ./configure - ;; by default, which is problematic because source shebangs - ;; have not yet been patched. - (setenv "NOCONFIGURE" "t") - (zero? (system* "sh" "autogen.sh"))))))) + #t))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) @@ -8036,7 +8011,7 @@ Microsoft SkyDrive and Hotmail, using their REST protocols.") (define-public gnome-clocks (package (name "gnome-clocks") - (version "3.32.0") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -8044,15 +8019,22 @@ Microsoft SkyDrive and Hotmail, using their REST protocols.") name "-" version ".tar.xz")) (sha256 (base32 - "1w6lgjdak3x76c9gyhd1lqrdmjfh8q77sjnrkcimylsg0jq913bc")))) + "0g7hjk55smhkd09hwa9kag3h5a12l494wj89w9smpdk3ghsmy6b1")))) (build-system meson-build-system) (arguments - '(#:glib-or-gtk? #t)) + '(#:glib-or-gtk? #t + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "build-aux/post-install.py" + (("gtk-update-icon-cache") "true")) + #t))))) (native-inputs `(("vala" ,vala) ("pkg-config" ,pkg-config) ("glib" ,glib "bin") ; for glib-compile-resources - ("gtk+-bin" ,gtk+ "bin") ; for gtk-update-icon-cache ("desktop-file-utils" ,desktop-file-utils) ("gettext" ,gettext-minimal) ("itstool" ,itstool))) @@ -8074,7 +8056,7 @@ desktop. It supports world clock, stop watch, alarms, and count down timer.") (define-public gnome-calendar (package (name "gnome-calendar") - (version "3.32.2") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -8082,17 +8064,24 @@ desktop. It supports world clock, stop watch, alarms, and count down timer.") name "-" version ".tar.xz")) (sha256 (base32 - "07p73cvzj8idr80npja5yiv9pjfyi6qqfhaz5jwcgqspqbnhnl7k")))) + "1bnmd191044zn2kr6f5vg7sm5q59qf7z652awll1f7s6ahijr8rw")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t ;; gnome-calendar has to be installed before the tests can be run ;; https://bugzilla.gnome.org/show_bug.cgi?id=788224 - #:tests? #f)) + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "build-aux/meson/meson_post_install.py" + (("gtk-update-icon-cache") "true")) + #t))))) (native-inputs `(("gettext" ,gettext-minimal) ("glib-bin" ,glib "bin") ; For glib-compile-schemas - ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache ("pkg-config" ,pkg-config))) (inputs `(("gnome-online-accounts:lib" ,gnome-online-accounts "lib") @@ -8207,7 +8196,7 @@ existing databases over the internet.") (define-public gnome-tweaks (package (name "gnome-tweaks") - (version "3.32.0") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/gnome-tweaks/" @@ -8217,7 +8206,7 @@ existing databases over the internet.") (list (search-patch "gnome-tweaks-search-paths.patch"))) (sha256 (base32 - "037r35cw34ifcs676fq9n2v4mh1nkqx0qk474bznf18mr6r62h55")))) + "0l2j42ba7v866iknygamnkiq7igh0fjvq92r93cslvvfnkx2ccq0")))) (build-system meson-build-system) (arguments `(#:glib-or-gtk? #t @@ -8227,6 +8216,12 @@ existing databases over the internet.") ,@%meson-build-system-modules) #:phases (modify-phases %standard-phases + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "meson-postinstall.py" + (("gtk-update-icon-cache") "true")) + #t)) (add-after 'install 'wrap (@@ (guix build python-build-system) wrap)) (add-after 'wrap 'wrap-gi-typelib @@ -8237,14 +8232,14 @@ existing databases over the internet.") `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))) #t))))) (native-inputs - `(("gtk+:bin" ,gtk+ "bin") ; For gtk-update-icon-cache - ("intltool" ,intltool) + `(("intltool" ,intltool) ("pkg-config" ,pkg-config))) (inputs `(("gnome-desktop" ,gnome-desktop) ("gtk+" ,gtk+) ("gobject-introspection" ,gobject-introspection) ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) + ("libhandy" ,libhandy) ("libnotify" ,libnotify) ("libsoup" ,libsoup) ("nautilus" ,nautilus) @@ -8262,7 +8257,7 @@ GNOME Shell appearance and extension, etc.") (define-public gnome-shell-extensions (package (name "gnome-shell-extensions") - (version "3.32.1") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -8270,7 +8265,7 @@ GNOME Shell appearance and extension, etc.") name "-" version ".tar.xz")) (sha256 (base32 - "07libf6z24n42hpdsq163w0j8xyrav0lxqrwxrvq5kbz8zxv5ch2")))) + "1f5l35l3kdkzrv49xmg1sh11vwmgjbg7hx3gb91i39bfl1snxqd1")))) (build-system meson-build-system) (arguments '(#:configure-flags '("-Dextension_set=all"))) @@ -8422,7 +8417,7 @@ the Moka icon theme.") (define-public folks (package (name "folks") - (version "0.11.4") + (version "0.13.1") (source (origin (method url-fetch) (uri (string-append @@ -8431,17 +8426,28 @@ the Moka icon theme.") "folks-" version ".tar.xz")) (sha256 (base32 - "16hqh2gxlbx0b0hgq216hndr1m72vj54jvryzii9zqkk0g9kxc57")))) - (build-system glib-or-gtk-build-system) + "0pda8sx4ap3lyri5fdrnakl29la1zkhwlc9bmnp13qigp1iwdw9x")))) + (build-system meson-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'skip-gtk-update-icon-cache + ;; Don't create 'icon-theme.cache'. + (lambda _ + (substitute* "meson_post_install.py" + (("gtk-update-icon-cache") "true")) + #t))))) (inputs `(("bdb" ,bdb) ("dbus-glib" ,dbus-glib) ("evolution-data-server" ,evolution-data-server) ("glib" ,glib) ("libgee" ,libgee) + ("readline" ,readline) ("telepathy-glib" ,telepathy-glib))) (native-inputs - `(("gobject-introspection" ,gobject-introspection) + `(("glib:bin" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) ("intltool" ,intltool) ("pkg-config" ,pkg-config) ("vala" ,vala))) @@ -8559,7 +8565,7 @@ handling the startup notification side.") (define-public gnome-calculator (package (name "gnome-calculator") - (version "3.32.2") + (version "3.34.1") (source (origin (method url-fetch) @@ -8568,19 +8574,20 @@ handling the startup notification side.") name "-" version ".tar.xz")) (sha256 (base32 - "0fgpn3sc226s9fpzhik5rkkrf669037gc659ga2kn9jsyckj6p41")))) + "0lbh87255zzggqzai6543qg920y52bl4vs5m5h5087ghzg14hlsd")))) (build-system meson-build-system) (arguments '(#:glib-or-gtk? #t)) (native-inputs - `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, gio-2.0. + `(("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") ; for glib-compile-schemas, gio-2.0. ("gtk+:bin" ,gtk+ "bin") ; for gtk-update-icon-cache - ("intltool" ,intltool) ("itstool" ,itstool) ("vala" ,vala) ("pkg-config" ,pkg-config))) (inputs `(("glib" ,glib) ("gtksourceview" ,gtksourceview) + ("libgee" ,libgee) ("libsoup" ,libsoup) ("libxml2" ,libxml2) ("mpc" ,mpc) @@ -8811,7 +8818,7 @@ accessibility infrastructure.") (define-public orca (package (name "orca") - (version "3.32.0") + (version "3.34.1") (source (origin (method url-fetch) (uri (string-append @@ -8820,7 +8827,7 @@ accessibility infrastructure.") name "-" version ".tar.xz")) (sha256 (base32 - "05jqzlg0f1x53hyl0l9282ynmw37159g6dsbrid12b7sjs12cc1i")))) + "1q38n7hyshkiszmn361skxjynxr31lcms7a1iny6d0zlpmh1vnk4")))) (build-system glib-or-gtk-build-system) (arguments '(#:phases @@ -9027,7 +9034,7 @@ views can be printed as PDF or PostScript files, or exported to HTML.") ("python-gst" ,python-gst) ("python-pil" ,python-pillow) ("python-pycairo" ,python-pycairo) - ("python-pygobject" ,python-pygobject-3.34) + ("python-pygobject" ,python-pygobject) ("python-pylast" ,python-pylast) ("totem-pl-parser" ,totem-pl-parser) ("webkitgtk" ,webkitgtk))) @@ -9075,7 +9082,7 @@ photo-booth-like software, such as Cheese.") (define-public cheese (package (name "cheese") - (version "3.32.1") + (version "3.34.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -9083,16 +9090,17 @@ photo-booth-like software, such as Cheese.") version ".tar.xz")) (sha256 (base32 - "1xlmsm4zsx05ahvpd4mgy1hfhxbag0r5i6p63bksjxdligdd36kv")))) + "0wvyc9wb0avrprvm529m42y5fkv3lirdphqydc9jw0c8mh05d1ni")))) (arguments - ;; Tests require GDK. - `(#:tests? #f + `(#:glib-or-gtk? #t + ;; Tests require GDK. + #:tests? #f #:phases (modify-phases %standard-phases - (add-before 'install 'skip-gtk-update-icon-cache + (add-after 'unpack 'skip-gtk-update-icon-cache (lambda _ ;; Don't create 'icon-theme.cache' - (substitute* "Makefile" + (substitute* "meson_post_install.py" (("gtk-update-icon-cache") (which "true"))) #t)) (add-after 'install 'wrap-cheese @@ -9102,12 +9110,15 @@ photo-booth-like software, such as Cheese.") (wrap-program (string-append out "/bin/cheese") `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))) #t))))) - (build-system glib-or-gtk-build-system) + (build-system meson-build-system) (native-inputs - `(("glib:bin" ,glib "bin") + `(("docbook-xsl" ,docbook-xsl) + ("glib:bin" ,glib "bin") + ("gtk-doc" ,gtk-doc) ("intltool" ,intltool) ("itstool" ,itstool) ("libxml2" ,libxml2) + ("libxslt" ,libxslt) ("pkg-config" ,pkg-config) ("vala" ,vala))) (propagated-inputs @@ -9324,7 +9335,7 @@ hexadecimal or ASCII. It is useful for editing binary files in general.") (define-public libdazzle (package (name "libdazzle") - (version "3.33.90") + (version "3.34.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/libdazzle/" @@ -9332,7 +9343,7 @@ hexadecimal or ASCII. It is useful for editing binary files in general.") "libdazzle-" version ".tar.xz")) (sha256 (base32 - "189m7q88d1a7bq0yyal9f3yhm9kz46lb61379nn4wsnnhpa1d0qs")))) + "01cmcrd75b7ns7j2b4p6h7pv68vjhkcl9zbvzzx7pf4vknxir61x")))) (build-system meson-build-system) (arguments `(#:phases @@ -9365,7 +9376,7 @@ generic enough to work for everyone.") (define-public evolution (package (name "evolution") - (version "3.32.4") + (version "3.34.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/evolution/" @@ -9373,7 +9384,7 @@ generic enough to work for everyone.") "evolution-" version ".tar.xz")) (sha256 (base32 - "00hmmg4hfns8rq9rcilmy0gi1xkksld27lfbd9zmw2xw37wjmbqh")))) + "164vy8h432pjglafn8y2ms4gsvk3kbgc63h5qp0mk5dv4smsp29c")))) (build-system cmake-build-system) (arguments `(#:imported-modules (,@%cmake-build-system-modules @@ -9413,10 +9424,9 @@ generic enough to work for everyone.") ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) ("gnome-autoar" ,gnome-autoar) ("gnome-desktop" ,gnome-desktop) - ("gtkspell3" ,gtkspell3) + ("gspell" ,gspell) ("highlight" ,highlight) ("libcanberra" ,libcanberra) - ("libedataserverui" ,evolution-data-server) ("libgweather" ,libgweather) ("libnotify" ,libnotify) ("libsoup" ,libsoup) @@ -9472,7 +9482,7 @@ functionality.") ("clutter" ,clutter) ("clutter-gst" ,clutter-gst) ("clutter-gtk" ,clutter-gtk) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("libraw" ,libraw))) (home-page "https://wiki.gnome.org/Apps/Gthumb") diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index 9b030a2b52..d7ea498907 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -102,7 +102,7 @@ ("gtk+" ,gtk+) ("libarchive" ,libarchive) ("libgsf" ,libgsf) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libltdl" ,libltdl) ("libmpeg2" ,libmpeg2) ("libmp4v2" ,libmp4v2) @@ -270,7 +270,7 @@ supports HTTP, HTTPS and GnuTLS.") ("libextractor" ,libextractor) ("libidn" ,libidn2) ("libgcrypt" ,libgcrypt) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libltdl" ,libltdl) ("libmicrohttpd" ,libmicrohttpd) ("libogg" ,libogg) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 04bb705712..298f18a8cc 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -78,7 +79,7 @@ (define-public libgpg-error (package (name "libgpg-error") - (version "1.36") + (version "1.37") (source (origin (method url-fetch) @@ -86,17 +87,33 @@ version ".tar.bz2")) (sha256 (base32 - "0z696dmhfxm2n6pmr8b857wwljq9h633yi99bhbn7h88f91rigds")) - (patches (search-patches "libgpg-error-gawk-compat.patch")) - ;; XXX: Remove this snippet with the gawk patch above. It avoids having - ;; to call autoreconf for the Makefile.am change to take effect. - (modules '((guix build utils))) - (snippet - '(begin - (substitute* "src/Makefile.in" - (("namespace=errnos") "pkg_namespace=errnos")) - #t)))) + "0qwpx8mbc2l421a22l0l1hpzkip9jng06bbzgxwpkkvk5bvnybdk")))) (build-system gnu-build-system) + (arguments + (if (%current-target-system) + `(#:modules ((ice-9 match) + (guix build gnu-build-system) + (guix build utils)) + #:phases + (modify-phases %standard-phases + ;; When cross-compiling, some platform specific properties cannot + ;; be detected. Create a symlink to the appropriate platform + ;; file. See Cross-Compiling section at: + ;; https://github.com/gpg/libgpg-error/blob/master/README + (add-after 'unpack 'cross-symlinks + (lambda* (#:key target inputs #:allow-other-keys) + (let ((triplet + (match (string-take target + (string-index target #\-)) + ("armhf" "arm-unknown-linux-gnueabi") + (x + (string-append x "-unknown-linux-gnu"))))) + (symlink + (string-append "lock-obj-pub." triplet ".h") + "src/syscfg/lock-obj-pub.linux-gnu.h")) + #t)))) + '())) + (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") (synopsis "Library of error values for GnuPG components") (description @@ -111,15 +128,14 @@ Daemon and possibly more in the future.") (define-public libgcrypt (package (name "libgcrypt") - (version "1.8.4") - (replacement libgcrypt-1.8.5) + (version "1.8.5") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-" version ".tar.bz2")) (sha256 (base32 - "09r27ywj9zplq6n9qw3mn7zmvf6y2jdmwx5d1kg8yqkj0qx18f7n")))) + "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv")))) (build-system gnu-build-system) (propagated-inputs `(("libgpg-error-host" ,libgpg-error))) @@ -132,7 +148,10 @@ Daemon and possibly more in the future.") ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one. `(#:configure-flags (list (string-append "--with-gpg-error-prefix=" - (assoc-ref %build-inputs "libgpg-error-host"))))) + (assoc-ref %build-inputs "libgpg-error-host")) + ;; When cross-compiling, _gcry_mpih_lshift etc are undefined + ,@(if (%current-target-system) '("--disable-asm") + '())))) (outputs '("out" "debug")) (home-page "https://gnupg.org/") (synopsis "Cryptographic function library") @@ -145,18 +164,6 @@ generation.") (properties '((ftp-server . "ftp.gnupg.org") (ftp-directory . "/gcrypt/libgcrypt"))))) -(define-public libgcrypt-1.8.5 - (package - (inherit libgcrypt) - (version "1.8.5") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-" - version ".tar.bz2")) - (sha256 - (base32 - "1hvsazms1bfd769q0ngl0r9g5i4m9mpz9jmvvrdzyzk3rfa2ljiv")))))) - (define-public libassuan (package (name "libassuan") @@ -478,13 +485,28 @@ gpgpme starting with version 1.7.") "0n232iyayc46f7hywmjw0jr7pbmmz5h4b04jskhkzz9gxz0ci99c")) (file-name (git-file-name name version)))) (build-system gnu-build-system) + (arguments + ;; When cross-compiling, the bash script libgcrypt-config provided by + ;; libgcrypt must be accessible during configure phase. + `(,@(if (%current-target-system) + '(#:phases + (modify-phases %standard-phases + (add-before 'configure 'add-libgrypt-config + (lambda _ + (setenv "PATH" (string-append + (assoc-ref %build-inputs "libgcrypt") + "/bin:" + (getenv "PATH"))) + #t)))) + '()))) (native-inputs `(("pkg-config" ,pkg-config) ("autoconf" ,autoconf) ("automake" ,automake) - ("texinfo" ,texinfo))) + ("texinfo" ,texinfo) + ("guile" ,guile-3.0))) (inputs - `(("guile" ,guile-2.2) + `(("guile" ,guile-3.0) ("libgcrypt" ,libgcrypt))) (synopsis "Cryptography library for Guile using Libgcrypt") (description @@ -498,18 +520,27 @@ interface (FFI) of Guile.") (define-public guile2.0-gcrypt (package (inherit guile-gcrypt) (name "guile2.0-gcrypt") + (native-inputs + `(("guile" ,guile-2.0) + ,@(alist-delete "guile" (package-native-inputs guile-gcrypt)))) (inputs `(("guile" ,guile-2.0) ,@(alist-delete "guile" (package-inputs guile-gcrypt)))))) -(define-public guile3.0-gcrypt +(define-public guile2.2-gcrypt (package (inherit guile-gcrypt) - (name "guile3.0-gcrypt") + (name "guile2.2-gcrypt") + (native-inputs + `(("guile" ,guile-2.2) + ,@(alist-delete "guile" (package-native-inputs guile-gcrypt)))) (inputs - `(("guile" ,guile-next) + `(("guile" ,guile-2.2) ,@(alist-delete "guile" (package-inputs guile-gcrypt)))))) +(define-public guile3.0-gcrypt + (deprecated-package "guile3.0-gcrypt" guile-gcrypt)) + (define-public python-gpg (package (name "python-gpg") diff --git a/gnu/packages/gnustep.scm b/gnu/packages/gnustep.scm index e04755aa52..ce68fc77ed 100644 --- a/gnu/packages/gnustep.scm +++ b/gnu/packages/gnustep.scm @@ -139,7 +139,7 @@ to easily create cross-compiled binaries.") ("libx11" ,libx11) ("libxinerama" ,libxinerama) ("fontconfig" ,fontconfig) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("giflib" ,giflib) ("libpng" ,libpng) ("libtiff" ,libtiff))) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 05f1993222..8a926681e0 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -1022,20 +1022,6 @@ from forcing GEXP-PROMISE." (string-append name "\"" null-hash "\""))) (generate-all-checksums "third_party/rust")) #t)) - (add-before 'configure 'augment-CPLUS_INCLUDE_PATH - (lambda* (#:key build inputs #:allow-other-keys) - ;; Here, we add additional entries to CPLUS_INCLUDE_PATH, to work - ;; around a problem that otherwise occurs when attempting to - ;; build Stylo, which requires Rust and Clang. Without these - ;; additional entries, errors occur during the build indicating - ;; that the <cstddef> and "c++config.h" headers cannot be found. - ;; Note that the 'build' keyword argument contains the GNU - ;; triplet, e.g. "x86_64-unknown-linux-gnu". - (let ((gcc (assoc-ref inputs "gcc"))) - (setenv "CPLUS_INCLUDE_PATH" - (string-append gcc "/include/c++" ":" - gcc "/include/c++/" build))) - #t)) (replace 'configure ;; configure does not work followed by both "SHELL=..." and ;; "CONFIG_SHELL=..."; set environment variables instead diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm index 436c18449d..a999b1cdfa 100644 --- a/gnu/packages/graph.scm +++ b/gnu/packages/graph.scm @@ -531,6 +531,8 @@ of graphs.") (base32 "08yw3maxhn5fl1lff81gmcrpa4j9aas4mmby1g9w5qcr0np82d1w")))) (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) (inputs `(("gd" ,gd))) (home-page "http://www.mcternan.me.uk/mscgen/") diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index dd5041784c..16ab9d20a4 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -119,7 +119,7 @@ ("freetype" ,freetype) ("gl" ,mesa) ("glu" ,glu) - ("jpeg" ,libjpeg) + ("jpeg" ,libjpeg-turbo) ("png" ,libpng) ("tiff" ,libtiff) ("x11" ,libx11) @@ -172,11 +172,11 @@ objects!") "-DWITH_MOD_OCEANSIM=ON" "-DWITH_OPENSUBDIV=ON" "-DWITH_PYTHON_INSTALL=OFF" - (string-append "-DPYTHON_LIBRARY=python" ,python-version "m") + (string-append "-DPYTHON_LIBRARY=python" ,python-version) (string-append "-DPYTHON_LIBPATH=" (assoc-ref %build-inputs "python") "/lib") (string-append "-DPYTHON_INCLUDE_DIR=" (assoc-ref %build-inputs "python") - "/include/python" ,python-version "m") + "/include/python" ,python-version) (string-append "-DPYTHON_VERSION=" ,python-version) (string-append "-DPYTHON_NUMPY_PATH=" (assoc-ref %build-inputs "python-numpy") @@ -211,7 +211,7 @@ objects!") ("opensubdiv" ,opensubdiv) ("ilmbase" ,ilmbase) ("openjpeg" ,openjpeg) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("ffmpeg" ,ffmpeg) @@ -469,7 +469,7 @@ storage of the \"EXR\" file format for storing 16-bit floating-point images.") (inputs `(("boost" ,boost) ("libpng" ,libpng) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("giflib" ,giflib) ("openexr" ,openexr) @@ -531,7 +531,7 @@ visual effects work for film.") ("unzip" ,unzip))) (inputs `(("giflib" ,giflib) - ("libjpeg" ,libjpeg) ; required by the JPEG texture plugin + ("libjpeg" ,libjpeg-turbo) ; required for the JPEG texture plugin. ("jasper" ,jasper) ("librsvg" ,librsvg) ("libxrandr" ,libxrandr) @@ -570,7 +570,7 @@ virtual reality, scientific visualization and modeling.") "-DCMAKE_CXX_FLAGS=-fpermissive" ,flags)))) (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ,@(package-inputs openscenegraph))))) @@ -635,7 +635,7 @@ virtual reality, scientific visualization and modeling.") ("pkg-config" ,pkg-config))) (inputs `(("boost" ,boost) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("openexr" ,openexr) @@ -987,7 +987,7 @@ your terminal.") `(("imagemagick" ,imagemagick) ("lcms" ,lcms) ("fbida" ,fbida) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("zip" ,zip) ("perl" ,perl) ("perl-cpanel-json-xs" ,perl-cpanel-json-xs) diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm index 2d2bb11130..b887da1076 100644 --- a/gnu/packages/graphviz.scm +++ b/gnu/packages/graphviz.scm @@ -56,15 +56,15 @@ (define-public graphviz (package (name "graphviz") - (version "2.40.1") + (version "2.42.3") (source (origin (method url-fetch) (uri (string-append - "http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-" - version ".tar.gz")) + "https://www2.graphviz.org/Packages/stable/portable_source/" + "graphviz-" version ".tar.gz")) (sha256 (base32 - "08d4ygkxz2f553bxj6087da56a23kx1khv0j8ycxa102vvx1hlna")))) + "1pbswjbx3fjdlsxcm7cmlsl5bvaa3d6gcnr0cr8x3c8pag13zbwg")))) (build-system gnu-build-system) (arguments ;; FIXME: rtest/rtest.sh is a ksh script (!). Add ksh as an input. @@ -104,7 +104,7 @@ ("libltdl" ,libltdl) ("libXaw" ,libxaw) ("expat" ,expat) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng))) (native-inputs `(("bison" ,bison) diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 98f17914bf..5fe353a901 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,12 +56,28 @@ ;; from 'inputs'. (inputs `(("ghostscript" ,ghostscript))) - (native-inputs `(("bison" ,bison) + + ;; When cross-compiling, this package depends upon a native install of + ;; itself. + (native-inputs `(,@(if (%current-target-system) + `(("self" ,this-package)) + '()) + ("bison" ,bison) ("perl" ,perl) ("psutils" ,psutils) ("texinfo" ,texinfo))) (arguments `(#:parallel-build? #f ; parallel build fails + ,@(if (%current-target-system) + `(#:make-flags + ;; In groff-minimal package, that inherits from this package, + ;; we'll need to locate "groff" instead of "self". + (let ((groff (or (assoc-ref %build-host-inputs "groff") + (assoc-ref %build-host-inputs "self")))) + (list + (string-append "GROFF_BIN_PATH=" groff) + (string-append "GROFFBIN=" groff "/bin/groff")))) + '()) #:phases (modify-phases %standard-phases (add-after 'unpack 'disable-relocatability @@ -115,7 +132,8 @@ is usually the formatter of \"man\" documentation pages.") ;; Omit the DVI, PS, PDF, and HTML backends. (inputs '()) (native-inputs `(("bison" ,bison) - ("perl" ,perl))) + ("perl" ,perl) + ("groff" ,groff))) (arguments `(#:disallowed-references (,perl) diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 0709d8568b..7596796d68 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -265,7 +265,7 @@ for the GStreamer multimedia library.") ("libcaca" ,libcaca) ("libdv" ,libdv) ("libiec61883" ,libiec61883) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libshout" ,libshout) ("libsoup" ,libsoup) @@ -521,7 +521,9 @@ non-linear editors.") "gst-python-" version ".tar.xz")) (sha256 (base32 - "1a48ca66izmm8hnp608jv5isg3jxb0vlfmhns0bg9nbkilag7390")))) + "1a48ca66izmm8hnp608jv5isg3jxb0vlfmhns0bg9nbkilag7390")) + (patches + (search-patches "python-gst-fix-build-with-python-3.8.patch")))) (build-system meson-build-system) (arguments `(#:modules ((guix build meson-build-system) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index bea4850d15..f375ca9b82 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -16,7 +16,7 @@ ;;; Copyright © 2016 ng0 <ng0@n0.is> ;;; Copyright © 2017 Roel Janssen <roel@gnu.org> ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> @@ -148,7 +148,9 @@ tools have full access to view and control running applications.") ("python" ,python-wrapper))) (arguments `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html - #:configure-flags '("--enable-tee"))) ; needed for GNU Icecat + #:configure-flags '("--enable-tee" ;needed for GNU Icecat + "--enable-xml" ;for cairo-xml support + "--disable-static"))) (synopsis "2D graphics library") (description "Cairo is a 2D graphics library with support for multiple output devices. @@ -184,7 +186,7 @@ affine transformation (scale, rotation, shear, etc.).") (define-public harfbuzz (package (name "harfbuzz") - (version "2.5.3") + (version "2.6.4") (source (origin (method url-fetch) (uri (string-append "https://www.freedesktop.org/software/" @@ -192,7 +194,7 @@ affine transformation (scale, rotation, shear, etc.).") version ".tar.xz")) (sha256 (base32 - "0p45xk5bblsw8lfs7y7z80b4rvda9f2hlpr28flkrfmpjz3hvl7y")))) + "04iwq13w6zkdhljmsxrzgg4fyh04qnwfn57rgrl9kmijc7cvh4wl")))) (build-system gnu-build-system) (outputs '("out" "bin")) ; 160K, only hb-view depend on cairo @@ -224,16 +226,28 @@ affine transformation (scale, rotation, shear, etc.).") (define-public pango (package (name "pango") - (version "1.42.4") + (version "1.44.7") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/pango/" (version-major+minor version) "/" name "-" version ".tar.xz")) + (patches (search-patches "pango-skip-libthai-test.patch")) (sha256 (base32 - "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx")))) - (build-system gnu-build-system) + "07qvxa2sk90chp1l12han6vxvy098mc37sdqcznyywyv2g6bd9b6")))) + (build-system meson-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (add-after 'unpack 'disable-cantarell-tests + (lambda _ + (substitute* "tests/meson.build" + ;; XXX FIXME: These tests require "font-cantarell", but + ;; adding it here would introduce a circular dependency. + (("\\[ 'test-harfbuzz'.*") "") + (("\\[ 'test-itemize'.*") "") + (("\\[ 'test-layout'.*") "")) + #t))))) (propagated-inputs ;; These are all in Requires or Requires.private of the '.pc' files. `(("cairo" ,cairo) @@ -241,13 +255,13 @@ affine transformation (scale, rotation, shear, etc.).") ("fontconfig" ,fontconfig) ("freetype" ,freetype) ("glib" ,glib) - ("harfbuzz" ,harfbuzz))) - (inputs - `(("zlib" ,zlib) + ("harfbuzz" ,harfbuzz) ;; Some packages, such as Openbox, expect Pango to be built with the ;; optional libxft support. ("libxft" ,libxft))) + (inputs + `(("zlib" ,zlib))) (native-inputs `(("pkg-config" ,pkg-config) ("glib" ,glib "bin") ; glib-mkenums, etc. @@ -260,6 +274,21 @@ used throughout the world.") (license license:lgpl2.0+) (home-page "https://developer.gnome.org/pango/"))) +(define-public pango-1.42 + (package + (inherit pango) + (version "1.42.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/pango/" + (version-major+minor version) "/" + "pango-" version ".tar.xz")) + (sha256 + (base32 + "17bwb7dgbncrfsmchlib03k9n3xaalirb39g3yb43gg8cg6p8aqx")))) + (build-system gnu-build-system) + (arguments '()))) + (define-public pangox-compat (package (name "pangox-compat") @@ -275,7 +304,7 @@ used throughout the world.") (build-system gnu-build-system) (inputs `(("glib" ,glib) - ("pango" ,pango))) + ("pango" ,pango-1.42))) (native-inputs `(("intltool" ,intltool) ("pkg-config" ,pkg-config))) @@ -506,7 +535,7 @@ highlighting and other features typical of a source code editor.") ;; Used for testing and required at runtime. ("shared-mime-info" ,shared-mime-info))) (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("libx11" ,libx11))) (native-inputs @@ -609,10 +638,10 @@ in the GNOME project.") ("libxi" ,libxi) ("libxtst" ,libxtst))) (native-inputs - `(("gobject-introspection" ,gobject-introspection) + `(("gettext" ,gettext-minimal) + ("gobject-introspection" ,gobject-introspection) ("gtk-doc" ,gtk-doc) ("glib" ,glib "bin") - ("intltool" ,intltool) ("pkg-config" ,pkg-config))) (synopsis "Assistive Technology Service Provider Interface, core components") (description @@ -674,7 +703,7 @@ is part of the GNOME accessibility project.") "gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch" "gtk2-theme-paths.patch")))) (build-system gnu-build-system) - (outputs '("out" "doc")) + (outputs '("out" "bin" "doc")) (propagated-inputs `(("atk" ,atk) ("gdk-pixbuf" ,gdk-pixbuf+svg) @@ -701,14 +730,19 @@ is part of the GNOME accessibility project.") (assoc-ref %outputs "doc") "/share/gtk-doc/html")) #:phases - (alist-cons-before - 'configure 'disable-tests - (lambda _ - ;; FIXME: re-enable tests requiring an X server - (substitute* "gtk/Makefile.in" - (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")) - #t) - %standard-phases))) + (modify-phases %standard-phases + (add-before 'configure 'disable-tests + (lambda _ + ;; FIXME: re-enable tests requiring an X server + (substitute* "gtk/Makefile.in" + (("SUBDIRS = theme-bits . tests") "SUBDIRS = theme-bits .")) + #t)) + (add-after 'install 'remove-cache + (lambda* (#:key outputs #:allow-other-keys) + (for-each + delete-file + (find-files (assoc-ref outputs "out") "immodules.cache")) + #t))))) (native-search-paths (list (search-path-specification (variable "GUIX_GTK2_PATH") @@ -736,7 +770,6 @@ application suites.") "120yz5gxqbv7sgdbcy4i0b6ixm8jpjzialdrqs0gv15q7bwnjk8w")) (patches (search-patches "gtk3-respect-GUIX_GTK3_PATH.patch" "gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch")))) - (outputs '("out" "bin" "doc")) (propagated-inputs `(("at-spi2-atk" ,at-spi2-atk) ("atk" ,atk) @@ -844,10 +877,14 @@ application suites.") "#include <libguile.h>\n#include <string.h>\n")) #t))))) (build-system gnu-build-system) + (arguments + ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build + ;; because of them. + '(#:configure-flags '("--disable-Werror"))) (inputs `(("guile-lib" ,guile-lib) ("expat" ,expat) - ("guile" ,guile-2.2))) + ("guile" ,guile-3.0))) (propagated-inputs ;; The .pc file refers to 'cairo'. `(("cairo" ,cairo))) @@ -864,22 +901,19 @@ graphics library with all of the benefits of Scheme: memory management, exceptions, macros, and a dynamic programming environment.") (license license:lgpl3+))) -(define-public guile3.0-cairo +(define-public guile2.2-cairo (package (inherit guile-cairo) - (name "guile3.0-cairo") - (arguments - (substitute-keyword-arguments (package-arguments guile-cairo) - ((#:configure-flags flags ''()) - ;; Uses of 'scm_t_uint8' & co. are deprecated; don't stop the build - ;; because of them. - `(cons "--disable-Werror" ,flags)))) + (name "guile2.2-cairo") (inputs - `(("guile" ,guile-3.0) - ("guile-lib" ,guile3.0-lib) + `(("guile" ,guile-2.2) + ("guile-lib" ,guile2.2-lib) ,@(fold alist-delete (package-inputs guile-cairo) '("guile" "guile-lib")))))) +(define-public guile3.0-cairo + (deprecated-package "guile3.0-cairo" guile-cairo)) + (define-public guile-rsvg ;; Use a recent snapshot that supports Guile 2.2 and beyond. (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678") @@ -916,7 +950,7 @@ exceptions, macros, and a dynamic programming environment.") ("automake" ,automake) ("libtool" ,libtool) ("texinfo" ,texinfo))) - (inputs `(("guile" ,guile-2.2) + (inputs `(("guile" ,guile-3.0) ("librsvg" ,librsvg) ("guile-lib" ,guile-lib))) ;for (unit-test) (propagated-inputs `(("guile-cairo" ,guile-cairo))) @@ -927,16 +961,19 @@ images onto Cairo surfaces.") (home-page "https://wingolog.org/projects/guile-rsvg/") (license license:lgpl2.1+)))) -(define-public guile3.0-rsvg +(define-public guile2.2-rsvg (package (inherit guile-rsvg) - (name "guile3.0-rsvg") + (name "guile2.2-rsvg") (inputs - `(("guile" ,guile-3.0) - ("guile-lib" ,guile3.0-lib) + `(("guile" ,guile-2.2) + ("guile-lib" ,guile2.2-lib) ,@(fold alist-delete (package-inputs guile-rsvg) '("guile" "guile-lib")))) - (propagated-inputs `(("guile-cairo" ,guile3.0-cairo))))) + (propagated-inputs `(("guile-cairo" ,guile2.2-cairo))))) + +(define-public guile3.0-rsvg + (deprecated-package "guile3.0-rsvg" guile-rsvg)) (define-public guile-present (package @@ -982,7 +1019,7 @@ images onto Cairo surfaces.") out "/lib/guile/" version "/site-ccache ")))) #t))))) (native-inputs `(("pkg-config" ,pkg-config))) - (inputs `(("guile" ,guile-2.2))) + (inputs `(("guile" ,guile-3.0))) (propagated-inputs ;; These are used by the (present …) modules. `(("guile-lib" ,guile-lib) @@ -998,15 +1035,18 @@ includes a tools to generate PDF presentations out of Org mode and Texinfo documents.") (license license:lgpl3+))) -(define-public guile3.0-present +(define-public guile2.2-present (package (inherit guile-present) - (name "guile3.0-present") - (inputs `(("guile" ,guile-3.0))) + (name "guile2.2-present") + (inputs `(("guile" ,guile-2.2))) (propagated-inputs - `(("guile-lib" ,guile3.0-lib) - ("guile-cairo" ,guile3.0-cairo) - ("guile-rsvg" ,guile3.0-rsvg))))) + `(("guile-lib" ,guile2.2-lib) + ("guile-cairo" ,guile2.2-cairo) + ("guile-rsvg" ,guile2.2-rsvg))))) + +(define-public guile3.0-present + (deprecated-package "guile3.0-present" guile-present)) (define-public guile-gnome (package @@ -1041,9 +1081,9 @@ documents.") ("glib" ,glib))) (inputs `(("guile" ,guile-2.2))) (propagated-inputs - `(("guile-cairo" ,guile-cairo) + `(("guile-cairo" ,guile2.2-cairo) ("g-wrap" ,g-wrap) - ("guile-lib" ,guile-lib))) + ("guile-lib" ,guile2.2-lib))) (arguments `(#:tests? #f ;FIXME #:phases (modify-phases %standard-phases @@ -1248,7 +1288,7 @@ printing and other features typical of a source code editor.") (define-public python-pycairo (package (name "python-pycairo") - (version "1.17.1") + (version "1.19.0") (source (origin (method url-fetch) @@ -1256,7 +1296,7 @@ printing and other features typical of a source code editor.") version "/pycairo-" version ".tar.gz")) (sha256 (base32 - "165n0g7gp2a0qi8558snvfans17x83jv2lv7bx4vr1rxjbn3a2hg")))) + "176i283glkpycka8wwyndwld0zp1yn9xj9rpvllqgja698vsjnsg")))) (build-system python-build-system) (native-inputs `(("pkg-config" ,pkg-config) @@ -1270,14 +1310,21 @@ printing and other features typical of a source code editor.") (license license:lgpl3+) (properties `((python2-variant . ,(delay python2-pycairo)))))) +;; Pycairo no longer supports Python 2 since version 1.19.0, so we stick +;; with this older version here. (define-public python2-pycairo (let ((pycairo (package-with-python2 (strip-python2-variant python-pycairo)))) (package (inherit pycairo) - (propagated-inputs - `(("python2-funcsigs" ,python2-funcsigs) - ,@(package-propagated-inputs pycairo))) + (version "1.18.2") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/pygobject/pycairo/releases" + "/download/v" version "/pycairo-" version ".tar.gz")) + (sha256 + (base32 + "0cb5n4r4nl0k1g90b1gz9iyk4lp7hi03db98i1p52a870bym7f6w")))) ;; Dual-licensed under LGPL 2.1 or Mozilla Public License 1.1 (license (list license:lgpl2.1 license:mpl1.1))))) @@ -1301,6 +1348,11 @@ printing and other features typical of a source code editor.") `(("pkg-config" ,pkg-config))) (inputs `(("python" ,python-2) + + ;; XXX: The package fails to build with the latest Pango (propagated + ;; from GTK+2), so we provide it with this older version. + ("pango" ,pango-1.42) + ("libglade" ,libglade) ("glib" ,glib))) (propagated-inputs @@ -1862,6 +1914,14 @@ shell scripts. Example of how to use @code{yad} can be consulted at "/lib/girepository-1.0")) #:phases (modify-phases %standard-phases + (add-before 'configure 'do-not-treat-warnings-as-errors + (lambda _ + ;; Prevent the build from failing due to deprecation warnings + ;; from newer GLib and GTK versions. + (substitute* (find-files "." "^Makefile.in$") + ((" -Werror") + "")) + #t)) (add-before 'configure 'set-environment (lambda _ (setenv "HAVE_VALGRIND_TRUE" "") diff --git a/gnu/packages/guile-wm.scm b/gnu/packages/guile-wm.scm index 622fc560d9..3a6eebc91a 100644 --- a/gnu/packages/guile-wm.scm +++ b/gnu/packages/guile-wm.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016 Alex ter Weele <alex.ter.weele@gmail.com> ;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 ng0 <ng0@n0.is> +;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,7 +58,8 @@ "--with-guile-site-ccache-dir=" (assoc-ref %outputs "out") "/lib/guile/2.2/site-ccache")))) - (native-inputs `(("pkg-config" ,pkg-config) + (native-inputs `(("guile" ,guile-2.2) + ("pkg-config" ,pkg-config) ("texinfo" ,texinfo))) (inputs `(("guile" ,guile-2.2) ("xcb" ,xcb-proto))) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 8075e8c21a..45cc6b2326 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -153,7 +153,7 @@ ;; TODO: Add guile-dbi and guile-dbd optional dependencies. (propagated-inputs `(("guile-json" ,guile-json-1) - ("guile-readline" ,guile-readline) + ("guile-readline" ,guile2.2-readline) ("guile-redis" ,guile-redis))) (native-inputs `(("bash" ,bash) ;for the `source' builtin @@ -526,7 +526,9 @@ Unix-style DSV format and RFC 4180 format.") #t)))) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases + '(;; The code uses 'scm_t_uint64' et al., which are deprecated in 3.0. + #:configure-flags '("CFLAGS=-Wno-error=deprecated-declarations") + #:phases (modify-phases %standard-phases (add-after 'install 'mode-guile-objects (lambda* (#:key outputs #:allow-other-keys) ;; .go files are installed to "lib/guile/X.Y/cache". @@ -543,7 +545,7 @@ Unix-style DSV format and RFC 4180 format.") `(("texinfo" ,texinfo) ("pkg-config" ,pkg-config))) (inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (synopsis "Lightweight concurrency facility for Guile") (description "Fibers is a Guile library that implements a a lightweight concurrency @@ -559,15 +561,14 @@ is not available for Guile 2.0.") (home-page "https://github.com/wingo/fibers") (license license:lgpl3+))) -(define-public guile3.0-fibers +(define-public guile2.0-fibers (package (inherit guile-fibers) - (name "guile3.0-fibers") - (arguments - ;; The code uses 'scm_t_uint64' et al., which are deprecated in 3.0. - `(#:configure-flags '("CFLAGS=-Wno-error=deprecated-declarations") - ,@(package-arguments guile-fibers))) - (inputs `(("guile" ,guile-3.0))))) + (name "guile2.2-fibers") + (inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-fibers + (deprecated-package "guile3.0-fibers" guile-fibers)) (define-public guile-syntax-highlight (package @@ -594,7 +595,7 @@ is not available for Guile 2.0.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (synopsis "General-purpose syntax highlighter for GNU Guile") (description "Guile-syntax-highlight is a general-purpose syntax highlighting library for GNU Guile. It can parse code written in various @@ -603,11 +604,14 @@ HTML (via SXML) or any other format for rendering.") (home-page "https://dthompson.us/projects/guile-syntax-highlight.html") (license license:lgpl3+))) -(define-public guile3.0-syntax-highlight +(define-public guile2.2-syntax-highlight (package (inherit guile-syntax-highlight) - (name "guile3.0-syntax-highlight") - (inputs `(("guile" ,guile-3.0))))) + (name "guile2.2-syntax-highlight") + (inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-syntax-highlight + (deprecated-package "guile3.0-syntax-highlight" guile-syntax-highlight)) (define-public guile-sjson (package @@ -695,18 +699,21 @@ using Guile's foreign function interface.") (base32 "10mv8c63159r3qvwwdvsgnsvdg7nc2ghak85zapwqpv4ywrqp9zc")))) (build-system guile-build-system) (native-inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (home-page "https://gitlab.com/NalaGinrut/guile-colorized") (synopsis "Colorized REPL for Guile") (description "Guile-colorized provides you with a colorized REPL for GNU Guile.") (license license:gpl3+))) -(define-public guile3.0-colorized +(define-public guile2.2-colorized (package (inherit guile-colorized) - (name "guile3.0-colorized") - (native-inputs `(("guile" ,guile-next))))) + (name "guile2.2-colorized") + (native-inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-colorized + (deprecated-package "guile3.0-colorized" guile-colorized)) (define-public guile-pfds (package @@ -726,6 +733,14 @@ using Guile's foreign function interface.") (arguments '(#:source-directory "src" #:phases (modify-phases %standard-phases + (add-after 'unpack 'work-around-guile-bug + (lambda _ + ;; See bug #39210. + (substitute* '("fingertrees.sls" + "queues/private/condition.sls" + "deques/private/condition.sls") + (("&assertion") "&violation")) + #t)) (add-after 'unpack 'move-files-around (lambda _ ;; Move files under a pfds/ directory to reflect the @@ -759,7 +774,7 @@ using Guile's foreign function interface.") (find-files "." "\\.sls$")) #t))))) (native-inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (synopsis "Purely functional data structures for Guile") (description "This package provides purely functional data structures written in R6RS @@ -780,23 +795,19 @@ Vicare Scheme and IronScheme. Right now it contains: @end itemize\n") (license license:bsd-3))) -(define-public guile3.0-pfds +(define-public guile2.2-pfds (package (inherit guile-pfds) - (name "guile3.0-pfds") - (native-inputs `(("guile" ,guile-3.0))) + (name "guile2.2-pfds") + (native-inputs `(("guile" ,guile-2.2))) (arguments (substitute-keyword-arguments (package-arguments guile-pfds) ((#:phases phases) `(modify-phases ,phases - (add-after 'unpack 'work-around-guile-bug - (lambda _ - ;; See bug #39210. - (substitute* '("fingertrees.sls" - "queues/private/condition.sls" - "deques/private/condition.sls") - (("&assertion") "&violation")) - #t)))))))) + (delete 'work-around-guile-bug))))))) + +(define-public guile3.0-pfds + (deprecated-package "guile3.0-pfds" guile-pfds)) (define-public guile-aa-tree (package @@ -850,7 +861,7 @@ convenient nested tree operations.") (assoc-ref inputs "zeromq")))) #t))))) (native-inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (inputs `(("zeromq" ,zeromq))) (home-page "https://github.com/jerry40/guile-simple-zmq") @@ -860,11 +871,14 @@ convenient nested tree operations.") messaging library.") (license license:gpl3+)))) -(define-public guile3.0-simple-zmq +(define-public guile2.2-simple-zmq (package (inherit guile-simple-zmq) - (name "guile3.0-simple-zmq") - (native-inputs `(("guile" ,guile-next))))) + (name "guile2.2-simple-zmq") + (native-inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-simple-zmq + (deprecated-package "guile3.0-simple-zmq" guile-simple-zmq)) (define-public jupyter-guile-kernel (let ((commit "a7db9245a886e104138474df46c3e88b95cff629") @@ -1058,7 +1072,7 @@ format.") '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings (inputs - `(("guile" ,guile-2.2) + `(("guile" ,guile-3.0) ("newt" ,newt))) (native-inputs `(("autoconf" ,autoconf) @@ -1072,13 +1086,16 @@ Scheme by using Guile’s foreign function interface.") (home-page "https://gitlab.com/mothacehe/guile-newt") (license license:gpl3+))) -(define-public guile3.0-newt +(define-public guile2.2-newt (package (inherit guile-newt) - (name "guile3.0-newt") + (name "guile2.2-newt") (inputs `(("guile" ,guile-next) ,@(alist-delete "guile" (package-inputs guile-newt)))))) +(define-public guile3.0-newt + (deprecated-package "guile3.0-newt" guile-newt)) + (define-public guile-mastodon (package (name "guile-mastodon") @@ -1127,7 +1144,7 @@ microblogging service.") '(#:make-flags '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings (inputs - `(("guile" ,guile-2.2) + `(("guile" ,guile-3.0) ("parted" ,parted))) (propagated-inputs `(("guile-bytestructures" ,guile-bytestructures))) @@ -1143,14 +1160,17 @@ written in pure Scheme by using Guile's foreign function interface.") (home-page "https://gitlab.com/mothacehe/guile-parted") (license license:gpl3+))) -(define-public guile3.0-parted +(define-public guile2.2-parted (package (inherit guile-parted) - (name "guile3.0-parted") + (name "guile2.2-parted") (inputs `(("guile" ,guile-next) ,@(alist-delete "guile" (package-inputs guile-parted)))) (propagated-inputs - `(("guile-bytestructures" ,guile3.0-bytestructures))))) + `(("guile-bytestructures" ,guile2.2-bytestructures))))) + +(define-public guile3.0-parted + (deprecated-package "guile3.0-parted" guile-parted)) (define-public guile-xosd (package @@ -1337,7 +1357,7 @@ PostgreSQL.") ("automake" ,automake) ("pkg-config" ,pkg-config) ("texinfo" ,texinfo))) - (inputs `(("guile" ,guile-2.2))) + (inputs `(("guile" ,guile-3.0))) (synopsis "Guile application configuration parsing library.") (description @@ -1352,13 +1372,16 @@ above command-line parameters.") "https://gitlab.com/a-sassmannshausen/guile-config") (license license:gpl3+))) -(define-public guile3.0-config +(define-public guile2.2-config (package (inherit guile-config) - (name "guile3.0-config") - (inputs `(("guile" ,guile-next) + (name "guile2.2-config") + (inputs `(("guile" ,guile-2.2) ,@(alist-delete "guile" (package-inputs guile-config)))))) +(define-public guile3.0-config + (deprecated-package "guile3.0-config" guile-config)) + (define-public guile-hall (package (name "guile-hall") @@ -1425,7 +1448,7 @@ above command-line parameters.") ("automake" ,automake) ("pkg-config" ,pkg-config) ("texinfo" ,texinfo))) - (inputs `(("guile" ,guile-2.2))) + (inputs `(("guile" ,guile-3.0))) (propagated-inputs `(("guile-config" ,guile-config))) (synopsis "Guile project tooling") @@ -1437,17 +1460,20 @@ provides tight coupling to Guix.") (home-page "https://gitlab.com/a-sassmannshausen/guile-hall") (license license:gpl3+))) -(define-public guile3.0-hall +(define-public guile2.2-hall (package (inherit guile-hall) - (name "guile3.0-hall") - (inputs `(("guile" ,guile-next) + (name "guile2.2-hall") + (inputs `(("guile" ,guile-2.2) ,@(alist-delete "guile" (package-inputs guile-hall)))) (propagated-inputs - `(("guile-config" ,guile3.0-config) + `(("guile-config" ,guile2.2-config) ,@(alist-delete "guile-config" (package-propagated-inputs guile-hall)))))) +(define-public guile3.0-hall + (deprecated-package "guile3.0-hall" guile-hall)) + (define-public guile-ics (package (name "guile-ics") @@ -1477,7 +1503,7 @@ provides tight coupling to Guix.") ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'. ("gettext" ,gettext-minimal) ("pkg-config" ,pkg-config))) - (inputs `(("guile" ,guile-2.2) ("which" ,which))) + (inputs `(("guile" ,guile-3.0) ("which" ,which))) (propagated-inputs `(("guile-lib" ,guile-lib))) (home-page "https://github.com/artyom-poptsov/guile-ics") (synopsis "Guile parser library for the iCalendar format") @@ -1488,13 +1514,16 @@ pure Scheme. The library can be used to read and write iCalendar data. The library is shipped with documentation in Info format and usage examples.") (license license:gpl3+))) -(define-public guile3.0-ics +(define-public guile2.2-ics (package (inherit guile-ics) - (name "guile3.0-ics") - (inputs `(("guile" ,guile-3.0) + (name "guile2.2-ics") + (inputs `(("guile" ,guile-2.2) ,@(alist-delete "guile" (package-inputs guile-ics)))) - (propagated-inputs `(("guile-lib" ,guile3.0-lib))))) + (propagated-inputs `(("guile-lib" ,guile2.2-lib))))) + +(define-public guile3.0-ics + (deprecated-package "guile3.0-ics" guile-ics)) (define-public guile-wisp (package @@ -1521,6 +1550,12 @@ The library is shipped with documentation in Info format and usage examples.") (guix build emacs-utils)) #:phases (modify-phases %standard-phases + (add-after 'unpack 'support-guile-3.0 + (lambda _ + (substitute* "configure" + (("_guile_versions_to_search=\"2.2") + "_guile_versions_to_search=\"3.0 2.2")) + #t)) (add-before 'configure 'patch-/usr/bin/env (lambda _ (substitute* "Makefile.in" @@ -1559,7 +1594,7 @@ The library is shipped with documentation in Info format and usage examples.") (assoc-ref emacs:%standard-phases 'make-autoloads))))) (home-page "https://www.draketo.de/english/wisp") (inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (native-inputs `(("emacs" ,emacs-minimal) ("python" ,python) @@ -1570,21 +1605,14 @@ whitespace-significant language. It may be easier on the eyes for some users and in some situations.") (license license:gpl3+))) -(define-public guile3.0-wisp +(define-public guile2.2-wisp (package (inherit guile-wisp) - (name "guile3.0-wisp") - (inputs `(("guile" ,guile-3.0))) - (arguments - (substitute-keyword-arguments (package-arguments guile-wisp) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'support-guile-3.0 - (lambda _ - (substitute* "configure" - (("_guile_versions_to_search=\"2.2") - "_guile_versions_to_search=\"3.0 2.2")) - #t)))))))) + (name "guile2.2-wisp") + (inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-wisp + (deprecated-package "guile3.0-wisp" guile-wisp)) (define-public guile-sly (package @@ -1924,7 +1952,7 @@ library.") $(libdir)/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")) #t))))) (native-inputs `(("pkg-config" ,pkg-config))) - (inputs `(("guile" ,guile-2.2))) + (inputs `(("guile" ,guile-3.0))) (home-page "https://www.nongnu.org/guile-lib/") (synopsis "Collection of useful Guile Scheme modules") (description @@ -1944,11 +1972,14 @@ for Guile\".") (name "guile2.0-lib") (inputs `(("guile" ,guile-2.0))))) -(define-public guile3.0-lib +(define-public guile2.2-lib (package (inherit guile-lib) - (name "guile3.0-lib") - (inputs `(("guile" ,guile-3.0))))) + (name "guile2.2-lib") + (inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-lib + (deprecated-package "guile3.0-lib" guile-lib)) (define-public guile-minikanren (package @@ -1965,7 +1996,7 @@ for Guile\".") "0r50jlpzi940jlmxyy3ddqqwmj5r12gb4bcv0ssini9v8km13xz6")))) (build-system guile-build-system) (native-inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (home-page "https://github.com/ijp/minikanren") (synopsis "MiniKanren declarative logic system, packaged for Guile") (description @@ -1986,11 +2017,14 @@ See http://minikanren.org/ for more on miniKanren generally.") (name "guile2.0-minikanren") (native-inputs `(("guile" ,guile-2.0))))) -(define-public guile3.0-minikanren +(define-public guile2.2-minikanren (package (inherit guile-minikanren) - (name "guile3.0-minikanren") - (native-inputs `(("guile" ,guile-next))))) + (name "guile2.2-minikanren") + (native-inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-minikanren + (deprecated-package "guile3.0-minikanren" guile-minikanren)) (define-public guile-irregex (package @@ -2023,7 +2057,7 @@ See http://minikanren.org/ for more on miniKanren generally.") #t))) #:source-directory "src")) (native-inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (home-page "http://synthcode.com/scheme/irregex") (synopsis "S-expression based regular expressions") (description @@ -2038,11 +2072,14 @@ inspired by the SCSH regular expression system.") (name "guile2.0-irregex") (native-inputs `(("guile" ,guile-2.0))))) -(define-public guile3.0-irregex +(define-public guile2.2-irregex (package (inherit guile-irregex) - (name "guile3.0-irregex") - (native-inputs `(("guile" ,guile-next))))) + (name "guile2.2-irregex") + (native-inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-irregex + (deprecated-package "guile3.0-irregex" guile-irregex)) (define-public haunt (package @@ -2108,9 +2145,10 @@ inspired by the SCSH regular expression system.") `(("pkg-config" ,pkg-config) ("texinfo" ,texinfo))) (inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (propagated-inputs - `(("guile-reader" ,guile-reader) + ;; XXX: Guile-Reader is currently unavailable for Guile 2.2 so strip it. + `(;;("guile-reader" ,guile-reader) ("guile-commonmark" ,guile-commonmark))) (synopsis "Functional static site generator") (description "Haunt is a static site generator written in Guile @@ -2119,14 +2157,14 @@ interface for reading articles in any format.") (home-page "http://haunt.dthompson.us") (license license:gpl3+))) -(define-public guile3.0-haunt +(define-public guile2.2-haunt (package (inherit haunt) - (name "guile3.0-haunt") - (inputs `(("guile" ,guile-3.0))) + (name "guile2.2-haunt") + (inputs `(("guile" ,guile-2.2))) (propagated-inputs - ;; XXX: Guile-Reader is currently unavailable for Guile 3.0 so strip it. - `(("guile-commonmark" ,guile3.0-commonmark))))) + `(("guile-reader" ,guile-reader) + ("guile-commonmark" ,guile2.2-commonmark))))) (define-public guile2.0-haunt (package @@ -2134,6 +2172,9 @@ interface for reading articles in any format.") (name "guile2.0-haunt") (inputs `(("guile" ,guile-2.0))))) +(define-public guile3.0-haunt + (deprecated-package "guile3.0-haunt" haunt)) + (define-public guile-redis (package (name "guile-redis") @@ -2189,7 +2230,7 @@ key-value cache and store.") #t)))) (build-system gnu-build-system) (inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (native-inputs `(("pkg-config" ,pkg-config))) (synopsis "CommonMark parser for Guile") @@ -2202,11 +2243,11 @@ is no support for parsing block and inline level HTML.") (home-page "https://github.com/OrangeShark/guile-commonmark") (license license:lgpl3+))) -(define-public guile3.0-commonmark +(define-public guile2.2-commonmark (package (inherit guile-commonmark) - (name "guile3.0-commonmark") - (inputs `(("guile" ,guile-3.0))))) + (name "guile2.2-commonmark") + (inputs `(("guile" ,guile-2.2))))) (define-public guile2.0-commonmark (package @@ -2214,6 +2255,9 @@ is no support for parsing block and inline level HTML.") (name "guile2.0-commonmark") (inputs `(("guile" ,guile-2.0))))) +(define-public guile3.0-commonmark + (deprecated-package "guile3.0-commonmark" guile-commonmark)) + (define-public mcron (package (name "mcron") @@ -2246,7 +2290,7 @@ is no support for parsing block and inline level HTML.") #t))))) (native-inputs `(("pkg-config" ,pkg-config) ("tzdata" ,tzdata-for-tests))) - (inputs `(("guile" ,guile-2.2.7))) ;fix <https://bugs.gnu.org/37237> + (inputs `(("guile" ,guile-3.0))) (home-page "https://www.gnu.org/software/mcron/") (synopsis "Run jobs at scheduled times") (description @@ -2256,11 +2300,14 @@ Guile, so its configuration can be written in Scheme; the original cron format is also supported.") (license license:gpl3+))) -(define-public guile3.0-mcron +(define-public guile2.2-mcron (package (inherit mcron) - (name "guile3.0-mcron") - (inputs `(("guile" ,guile-3.0))))) + (name "guile2.2-mcron") + (inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-mcron + (deprecated-package "guile3.0-mcron" mcron)) (define-public guile-picture-language (let ((commit "91d10c96708d732145006dd2802acc4de08b632e") @@ -2279,7 +2326,7 @@ format is also supported.") "1ydvw9dvssdvlvhh1dr8inyzy2x6m41qgp8hsivca1xysr4gc23a")))) (build-system gnu-build-system) (inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) @@ -2293,11 +2340,15 @@ format is also supported.") The picture values can directly be displayed in Geiser.") (license license:lgpl3+)))) -(define-public guile3.0-picture-language +(define-public guile2.2-picture-language (package (inherit guile-picture-language) - (name "guile3.0-picture-language") - (inputs `(("guile" ,guile-3.0))))) + (name "guile2.2-picture-language") + (inputs `(("guile" ,guile-2.2))))) + +(define-public guile3.0-picture-language + (deprecated-package "guile3.0-picture-language" + guile-picture-language)) (define-public guile-studio (package @@ -2621,7 +2672,7 @@ list of components. This module takes care of that for you.") ("gtk+" ,gtk+) ("guile-lib" ,guile-lib) ("webkitgtk" ,webkitgtk))) - (inputs `(("guile" ,guile-2.2))) + (inputs `(("guile" ,guile-3.0))) (home-page "https://github.com/spk121/guile-gi") (synopsis "GObject bindings for Guile") (description @@ -2630,14 +2681,17 @@ libraries, such as GTK+3. Its README comes with the disclaimer: This is pre-alpha code.") (license license:gpl3+))) -(define-public guile3.0-gi +(define-public guile2.2-gi (package (inherit guile-gi) - (name "guile3.0-gi") + (name "guile2.2-gi") (native-inputs - `(("guile" ,guile-3.0) + `(("guile" ,guile-2.2) ,@(package-native-inputs guile-gi))))) +(define-public guile3.0-gi + (deprecated-package "guile3.0-gi" guile-gi)) + (define-public guile-srfi-159 (let ((commit "1bd98abda2ae4ef8f36761a167903e55c6bda7bb") (revision "0")) @@ -3114,7 +3168,7 @@ the style of the Node Package Manager (NPM).") (rename-file "private" "hashing/private") #t))))) (native-inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (synopsis "Cryprographic hash functions implemented in Scheme") (description "The @code{(hashing @dots{})} modules implement cryptographic hash @@ -3122,13 +3176,116 @@ functions in pure R6RS Scheme: CRC, HMAC, MD5, SHA-1, and SHA-2 (SHA-256, SHA-512).") (license license:expat))) -(define-public guile3.0-hashing +(define-public guile2.2-hashing (package (inherit guile-hashing) - (name "guile3.0-hashing") + (name "guile2.2-hashing") (native-inputs `(("guile" ,guile-next))))) +(define-public guile3.0-hashing + (deprecated-package "guile3.0-hashing" guile-hashing)) + +(define-public guile-packrat + (package + (name "guile-packrat") + (version "0.1.1") + (home-page "https://github.com/weinholt/packrat") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1aga17164fkhbgllqc7ni6fk5zl8mkmgkl5zcsy67x7ngpyalbby")))) + (build-system guile-build-system) + (arguments + `(#:implicit-inputs? #f ;needs nothing but Guile + #:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch") + #:not-compiled-file-regexp "/extensible\\.scm$" + #:phases (modify-phases %standard-phases + (add-before 'build 'no-srfi-23 + (lambda _ + (substitute* "packrat.sls" + (("\\(srfi :23 error\\)") + (object->string '(only (guile) error)))) + #t))))) + (native-inputs + `(("guile" ,guile-3.0))) + (synopsis "Packrat parser library in R6RS Scheme") + (description + "This is an R6RS Scheme adaptation of the +@uref{https://bford.info/packrat/, packrat parsing}. Packrat parsing is a +memoizing, backtracking, recursive-descent parsing technique that runs in time +and space linear in the size of the input text.") + (license license:expat))) + +(define-public guile-ac-d-bus + (package + (name "guile-ac-d-bus") + (version "1.0.0-alpha.0") + (home-page "https://gitlab.com/weinholt/ac-d-bus/") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "05cbp7slmzrx4cib2liysk31laknqiycw9ckgn65fylgz6c2y5x9")))) + (build-system guile-build-system) + (arguments + `(#:implicit-inputs? #f ;needs nothing but Guile + #:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch") + #:phases (modify-phases %standard-phases + (add-before 'build 'adjust-for-guile + (lambda _ + ;; Adjust source file names for Guile. + (define (guile-sls->sls file) + (string-append (string-drop-right + file (string-length ".guile.sls")) + ".sls")) + + ;; Remove files targeting other implementations: + ;; *.mosh.sls, etc. + (for-each delete-file + (find-files + "compat" + (lambda (file stat) + (not (string-contains file ".guile."))))) + + ;; Rename *.guile.sls to *.sls so the ".guile" bit does + ;; not appear in .go file names. + (for-each (lambda (file) + (rename-file file (guile-sls->sls file))) + (find-files "compat" "\\.guile\\.sls")) + + ;; Move directories under d-bus/ to match module names. + (mkdir "d-bus") + (for-each (lambda (directory) + (rename-file directory + (string-append "d-bus/" + directory))) + '("compat" "protocol")) + + #t))))) + (native-inputs + `(("guile" ,guile-3.0))) + (propagated-inputs + `(("guile-packrat" ,guile-packrat))) + (synopsis "D-Bus protocol implementation in R6RS Scheme") + (description + "AC/D-Bus is an implementation of the D-Bus wire protocol. D-Bus is an +interprocess communication protocol popular on GNU/Linux systems to +communicate with a variety of services. Originally designed for desktop +environments, it is now used by programs like VLC media player, BlueZ, +NetworkManager, Pulseaudio, systemd (including logind and resolved), Polkit, +gnome-keyring, and many more.") + (license license:expat))) + (define-public guile-webutils (let ((commit "8541904f761066dc9c27b1153e9a838be9a55299") (revision "0")) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 56dda89899..8665e2ef79 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -180,6 +180,20 @@ without requiring the source code to be rewritten.") `(#:configure-flags '("--disable-static") ; saves 3 MiB #:phases (modify-phases %standard-phases + ,@(if (hurd-system?) + '((add-after 'unpack 'disable-tests + (lambda _ + ;; Hangs at: "Running 00-repl-server.test" + (rename-file "test-suite/tests/00-repl-server.test" "00-repl-server.test") + ;; Sometimes Hangs at: "Running 00-socket.test" + (rename-file "test-suite/tests/00-socket.test" "00-socket.test") + ;; FAIL: srfi-18.test: thread-sleep!: thread sleeps fractions of a second + (rename-file "test-suite/tests/srfi-18.test" "srfi-18.test") + ;; failed to remove 't-guild-compile-7215.go.tdL7yC + (substitute* "test-suite/standalone/Makefile.in" + (("test-guild-compile ") "")) + #t))) + '()) (add-before 'configure 'pre-configure (lambda* (#:key inputs #:allow-other-keys) ;; Tell (ice-9 popen) the file name of Bash. @@ -217,7 +231,7 @@ without requiring the source code to be rewritten.") (define-public guile-2.2 (package (inherit guile-2.0) (name "guile") - (version "2.2.6") + (version "2.2.7") (source (origin (method url-fetch) @@ -227,7 +241,7 @@ without requiring the source code to be rewritten.") ".tar.xz")) (sha256 (base32 - "1269ymxm56j1z1lvq1y42rm961f2n7rinm3k6l00p9k52hrpcddk")) + "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd")) (modules '((guix build utils))) (patches (search-patches "guile-2.2-skip-oom-test.patch")) @@ -250,31 +264,8 @@ without requiring the source code to be rewritten.") (variable "GUILE_LOAD_COMPILED_PATH") (files '("lib/guile/2.2/site-ccache"))))))) -(define-public guile-2.2.7 - ;; This version contains a bug fix for a relatively rare crash that could - ;; affect shepherd as PID 1: <https://bugs.gnu.org/37757>. - (package - (inherit guile-2.2) - (version "2.2.7") - (source (origin - (inherit (package-source guile-2.2)) - (uri (string-append "mirror://gnu/guile/guile-" version - ".tar.xz")) - (sha256 - (base32 - "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd")))))) - -(define-deprecated guile-2.2/bug-fix guile-2.2.7) +(define-deprecated guile-2.2/bug-fix guile-2.2) -(define-public guile-2.2/fixed - ;; A package of Guile 2.2 that's rarely changed. It is the one used - ;; in the `base' module, and thus changing it entails a full rebuild. - (package - (inherit guile-2.2) - (properties '((hidden? . #t) ;people should install 'guile-2.2' - (timeout . 72000) ;20 hours - (max-silent-time . 36000))))) ;10 hours (needed on ARM - ; when heavily loaded) (define-public guile-2.2.4 (package/inherit guile-2.2 @@ -291,7 +282,7 @@ without requiring the source code to be rewritten.") ;; This is the latest Guile stable version. (package (inherit guile-2.2) - (name "guile-next") ;to be renamed to "guile" + (name "guile") (version "3.0.2") (source (origin (inherit (package-source guile-2.2)) @@ -300,6 +291,13 @@ without requiring the source code to be rewritten.") (sha256 (base32 "12lziar4j27j9whqp2n18427q45y9ghq7gdd8lqhmj1k0lr7vi2k")))) + (arguments + ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd. + (if (hurd-target?) + (substitute-keyword-arguments (package-arguments guile-2.2) + ((#:configure-flags flags ''()) + `(cons "--disable-jit" ,flags))) + (package-arguments guile-2.2))) (native-search-paths (list (search-path-specification (variable "GUILE_LOAD_PATH") @@ -311,6 +309,27 @@ without requiring the source code to be rewritten.") (define-public guile-next guile-3.0) +(define-public guile-3.0/libgc-7 + ;; Using libgc-7 avoid crashes that can occur, particularly when loading + ;; data in to the Guix Data Service: + ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40525 + (hidden-package + (package + (inherit guile-3.0) + (propagated-inputs + `(("bdw-gc" ,libgc-7) + ,@(srfi-1:alist-delete "bdw-gc" (package-propagated-inputs guile-3.0))))))) + +(define-public guile-3.0/fixed + ;; A package of Guile that's rarely changed. It is the one used in the + ;; `base' module, and thus changing it entails a full rebuild. + (package + (inherit guile-3.0) + (properties '((hidden? . #t) ;people should install 'guile-2.2' + (timeout . 72000) ;20 hours + (max-silent-time . 36000))))) ;10 hours (needed on ARM + ; when heavily loaded) + (define* (make-guile-readline guile #:optional (name "guile-readline")) (package (name name) @@ -368,10 +387,10 @@ GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its (license license:gpl3+))) (define-public guile-readline - (make-guile-readline guile-2.2)) + (make-guile-readline guile-3.0)) -(define-public guile3.0-readline - (make-guile-readline guile-next "guile3.0-readline")) +(define-public guile2.2-readline + (make-guile-readline guile-2.2 "guile2.2-readline")) (define (guile-variant-package-name prefix) (lambda (name) @@ -384,13 +403,38 @@ GNU@tie{}Guile. Use the @code{(ice-9 readline)} module and call its (define package-for-guile-2.0 ;; A procedure that rewrites the dependency tree of the given package to use - ;; GUILE-2.0 instead of GUILE-2.2. - (package-input-rewriting `((,guile-2.2 . ,guile-2.0)) + ;; GUILE-2.0 instead of GUILE-3.0. + (package-input-rewriting `((,guile-3.0 . ,guile-2.0)) (guile-variant-package-name "guile2.0"))) -(define package-for-guile-3.0 - (package-input-rewriting `((,guile-2.2 . ,guile-next)) - (guile-variant-package-name "guile3.0"))) +(define package-for-guile-2.2 + (package-input-rewriting `((,guile-3.0 . ,guile-2.2)) + (guile-variant-package-name "guile2.2"))) + +(define-syntax define-deprecated-guile3.0-package + (lambda (s) + "Define a deprecated package alias for \"guile3.0-something\"." + (syntax-case s () + ((_ name) + (and (identifier? #'name) + (string-prefix? "guile3.0-" (symbol->string (syntax->datum + #'name)))) + (let ((->guile (lambda (str) + (let ((base (string-drop str + (string-length "guile3.0-")))) + (string-append "guile-" base))))) + (with-syntax ((package-name (symbol->string (syntax->datum #'name))) + (package + (datum->syntax + #'name + (string->symbol + (->guile (symbol->string (syntax->datum #'name))))))) + #'(begin + (define-deprecated name package + (deprecated-package package-name package)) + (export name)))))))) + +(define-deprecated-guile3.0-package guile3.0-readline) (define-public guile-for-guile-emacs (let ((commit "15ca78482ac0dd2e3eb36dcb31765d8652d7106d") @@ -495,10 +539,16 @@ specification. These are the main features: version ".tar.gz")) (sha256 (base32 - "0nj0684qgh6ppkbdyxqfyjwsv2qbyairxpi8fzrhsi3xnc7jn4im")))))) + "0nj0684qgh6ppkbdyxqfyjwsv2qbyairxpi8fzrhsi3xnc7jn4im")))) + (native-inputs `(("pkg-config" ,pkg-config) + ("guile" ,guile-3.0))) + (inputs `(("guile" ,guile-3.0))))) + +(define-public guile2.2-json + (package-for-guile-2.2 guile-json-3)) (define-public guile3.0-json - (package-for-guile-3.0 guile-json-3)) + (deprecated-package "guile3.0-json" guile-json-3)) ;; There are two guile-gdbm packages, one using the FFI and one with ;; direct C bindings, hence the verbose name. @@ -539,7 +589,7 @@ specification. These are the main features: (assoc-ref inputs "gdbm")))) #t))))) (native-inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (inputs `(("gdbm" ,gdbm))) (home-page "https://github.com/ijp/guile-gdbm") @@ -552,8 +602,10 @@ Guile's foreign function interface.") (define-public guile2.0-gdbm-ffi (package-for-guile-2.0 guile-gdbm-ffi)) -(define-public guile3.0-gdbm-ffi - (package-for-guile-3.0 guile-gdbm-ffi)) +(define-public guile2.2-gdbm-ffi + (package-for-guile-2.2 guile-gdbm-ffi)) + +(define-deprecated-guile3.0-package guile3.0-gdbm-ffi) (define-public guile-sqlite3 (package @@ -569,6 +621,8 @@ Guile's foreign function interface.") (base32 "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp")) (file-name (string-append name "-" version "-checkout")) + (patches + (search-patches "guile-sqlite3-fix-cross-compilation.patch")) (modules '((guix build utils))) (snippet '(begin @@ -581,9 +635,10 @@ Guile's foreign function interface.") (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) + ("guile" ,guile-3.0) ("pkg-config" ,pkg-config))) (inputs - `(("guile" ,guile-2.2) + `(("guile" ,guile-3.0) ("sqlite" ,sqlite))) (synopsis "Access SQLite databases from Guile") (description @@ -593,8 +648,10 @@ Guile's foreign function interface.") (define-public guile2.0-sqlite3 (package-for-guile-2.0 guile-sqlite3)) -(define-public guile3.0-sqlite3 - (package-for-guile-3.0 guile-sqlite3)) +(define-public guile2.2-sqlite3 + (package-for-guile-2.2 guile-sqlite3)) + +(define-deprecated-guile3.0-package guile3.0-sqlite3) (define-public guile-bytestructures (package @@ -626,9 +683,9 @@ Guile's foreign function interface.") `(("autoconf" ,autoconf) ("automake" ,automake) ("pkg-config" ,pkg-config) - ("guile" ,guile-2.2))) + ("guile" ,guile-3.0))) (inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (synopsis "Structured access to bytevector contents for Guile") (description "Guile bytestructures offers a system imitating the type system @@ -642,8 +699,10 @@ type system, elevating types to first-class status.") (define-public guile2.0-bytestructures (package-for-guile-2.0 guile-bytestructures)) -(define-public guile3.0-bytestructures - (package-for-guile-3.0 guile-bytestructures)) +(define-public guile2.2-bytestructures + (package-for-guile-2.2 guile-bytestructures)) + +(define-deprecated-guile3.0-package guile3.0-bytestructures) (define-public guile-git (package @@ -661,10 +720,10 @@ type system, elevating types to first-class status.") (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) - ("guile" ,guile-2.2) + ("guile" ,guile-3.0) ("guile-bytestructures" ,guile-bytestructures))) (inputs - `(("guile" ,guile-2.2) + `(("guile" ,guile-3.0) ("libgit2" ,libgit2))) (propagated-inputs `(("guile-bytestructures" ,guile-bytestructures))) @@ -674,8 +733,8 @@ type system, elevating types to first-class status.") manipulate repositories of the Git version control system.") (license license:gpl3+))) -(define-public guile3.0-git - (package-for-guile-3.0 guile-git)) +(define-public guile2.2-git + (package-for-guile-2.2 guile-git)) (define-public guile2.0-git (let ((base (package-for-guile-2.0 guile-git))) @@ -688,5 +747,7 @@ manipulate repositories of the Git version control system.") ,@(srfi-1:alist-delete "libgit2" (package-inputs base))))))) +(define-deprecated-guile3.0-package guile3.0-git) + ;;; guile.scm ends here diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 8db650e6ae..982dced5d0 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -19,6 +19,7 @@ ;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com> ;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net> ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,10 +38,8 @@ (define-module (gnu packages haskell) #:use-module (gnu packages) - #:use-module (gnu packages base) #:use-module (gnu packages bootstrap) #:use-module (gnu packages elf) - #:use-module (gnu packages gcc) #:use-module (gnu packages ghostscript) #:use-module (gnu packages libffi) #:use-module (gnu packages lisp) @@ -172,10 +171,6 @@ top of CLISP.") ;; execution. #:parallel-tests? #f - ;; The DSOs use $ORIGIN to refer to each other, but (guix build - ;; gremlin) doesn't support it yet, so skip this phase. - #:validate-runpath? #f - ;; Don't pass --build=<triplet>, because the configure script ;; auto-detects slightly different triplets for --host and --target and ;; then complains that they don't match. @@ -321,9 +316,7 @@ interactive environment for the functional language Haskell.") (sha256 (base32 "1c8qc4fhkycynk4g1f9hvk53dj6a1vvqi6bklqznns6hw59m8qhi")) (patches - (search-patches - "ghc-dont-pass-linker-flags-via-response-files.patch" - "ghc-8.0-fall-back-to-madv_dontneed.patch")))) + (search-patches "ghc-8.0-fall-back-to-madv_dontneed.patch")))) (build-system gnu-build-system) (supported-systems '("i686-linux" "x86_64-linux")) (outputs '("out" "doc")) @@ -351,10 +344,6 @@ interactive environment for the functional language Haskell.") ;; execution. #:parallel-tests? #f - ;; The DSOs use $ORIGIN to refer to each other, but (guix build - ;; gremlin) doesn't support it yet, so skip this phase. - #:validate-runpath? #f - ;; Don't pass --build=<triplet>, because the configure script ;; auto-detects slightly different triplets for --host and --target and ;; then complains that they don't match. @@ -424,22 +413,18 @@ interactive environment for the functional language Haskell.") (define-public ghc-8.4 (package (inherit ghc-8.0) (name "ghc") - (version "8.4.3") + (version "8.4.4") (source (origin (method url-fetch) (uri (string-append "https://www.haskell.org/ghc/dist/" version "/" name "-" version "-src.tar.xz")) (sha256 - (base32 "1mk046vb561j75saz05rghhbkps46ym5aci4264dwc2qk3dayixf")))) + (base32 "1ch4j2asg7pr52ai1hwzykxyj553wndg7wq93i47ql4fllspf48i")))) (inputs `(("gmp" ,gmp) ("ncurses" ,ncurses) - ("libffi" ,libffi) - ("target-binutils" ,binutils) - ("target-gcc" ,gcc) - ("target-ld-wrapper" ,(make-ld-wrapper "ld-wrapper" - #:binutils binutils)))) + ("libffi" ,libffi))) (native-inputs `(("perl" ,perl) ("python" ,python) ; for tests @@ -454,17 +439,13 @@ interactive environment for the functional language Haskell.") version "/" name "-" version "-testsuite.tar.xz")) (sha256 (base32 - "1z55b1z0m3plqd2d1ks6w5wvx7igm7zsk3i4v7cms003z0as0hzz")))))) + "0s8lf9sxj7n89pjagi58b3fahnp34qvmwhnn0j1fbg6955vbrfj6")))))) (arguments `(#:test-target "test" ;; We get a smaller number of test failures by disabling parallel test ;; execution. #:parallel-tests? #f - ;; The DSOs use $ORIGIN to refer to each other, but (guix build - ;; gremlin) doesn't support it yet, so skip this phase. - #:validate-runpath? #f - ;; Don't pass --build=<triplet>, because the configure script ;; auto-detects slightly different triplets for --host and --target and ;; then complains that they don't match. @@ -514,9 +495,9 @@ interactive environment for the functional language Haskell.") ;; plain command names. (add-before 'configure 'set-target-programs (lambda* (#:key inputs #:allow-other-keys) - (let ((binutils (assoc-ref inputs "target-binutils")) - (gcc (assoc-ref inputs "target-gcc")) - (ld-wrapper (assoc-ref inputs "target-ld-wrapper"))) + (let ((binutils (assoc-ref inputs "binutils")) + (gcc (assoc-ref inputs "gcc")) + (ld-wrapper (assoc-ref inputs "ld-wrapper"))) (setenv "CC" (string-append gcc "/bin/gcc")) (setenv "CXX" (string-append gcc "/bin/g++")) (setenv "LD" (string-append ld-wrapper "/bin/ld")) @@ -573,6 +554,7 @@ interactive environment for the functional language Haskell.") (uri (string-append "https://www.haskell.org/ghc/dist/" version "/" name "-" version "-testsuite.tar.xz")) + (patches (search-patches "ghc-testsuite-dlopen-pie.patch")) (sha256 (base32 "0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91")))) @@ -588,10 +570,10 @@ interactive environment for the functional language Haskell.") ,make-flags)) ((#:phases phases '%standard-phases) `(modify-phases ,phases - ;; These two tests refer to the root user, which doesn't exist - ;; (see <https://bugs.gnu.org/36692>). (add-after 'unpack-testsuite 'skip-tests (lambda _ + ;; These two tests refer to the root user, which doesn't exist + ;; (see <https://bugs.gnu.org/36692>). (substitute* "libraries/unix/tests/all.T" (("^test\\('T8108'") "# guix skipped: test('T8108'")) (substitute* "libraries/unix/tests/libposix/all.T" diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index d483badbc5..55c40710fa 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -2,6 +2,10 @@ ;;; Copyright © 2014, 2015, 2016, 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> ;;; Copyright © 2018, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2020 Rene Saavedra <pacoon@protonmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,22 +23,33 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages hurd) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:hide (zlib)) #:use-module (guix download) #:use-module (guix packages) #:use-module (gnu packages) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (gnu packages autotools) + #:use-module (gnu packages compression) #:use-module (gnu packages flex) + #:use-module (gnu packages gawk) + #:use-module (gnu packages gnupg) #:use-module (gnu packages bison) + #:use-module (gnu packages libdaemon) + #:use-module (gnu packages linux) #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages texinfo) + #:use-module (gnu packages onc-rpc) + #:use-module (gnu packages xorg) ; libpciaccess #:use-module (guix git-download) - #:export (hurd-triplet? - hurd-target?)) + #:export (hurd-system? + hurd-target? + hurd-triplet?)) (define (hurd-triplet? triplet) (and (string-suffix? "-gnu" triplet) @@ -44,7 +59,12 @@ "Return true if the cross-compilation target or the current system is GNU/Hurd." (or (and=> (%current-target-system) hurd-triplet?) - (string-suffix? (%current-system) "-gnu"))) + (and (not (%current-target-system)) + (and=> (%current-system) hurd-triplet?)))) + +(define (hurd-system?) + "Return true if the current system is the Hurd." + (and=> (%current-system) hurd-triplet?)) (define (hurd-source-url version) (string-append "mirror://gnu/hurd/hurd-" @@ -129,11 +149,11 @@ communication.") (define-public hurd-headers ;; Resort to a post-0.9 snapshot that provides the 'file_utimens' and ;; 'file_exec_paths' RPCs that glibc 2.28 expects. - (let ((revision "0") - (commit "98b33905c89b7e5c309c74ae32302a5745901a6e")) + (let ((revision "1") + (commit "91a51672ff4cfe1f1a0712b4c542ded3081c825b")) (package (name "hurd-headers") - (version "0.9") + (version (git-version "0.9" revision commit)) (source (origin (method git-fetch) (uri (git-reference @@ -141,7 +161,7 @@ communication.") (commit commit))) (sha256 (base32 - "1mj22sxgscas2675vrbxr477mwbxdj68pqcrh65lbir8qlssrgrf")) + "16k9wkahz9wasviijz53n6i13nmiwa9fs64ikf1jqh8rl60hw7cz")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs @@ -167,6 +187,7 @@ communication.") "--disable-ncursesw" "--disable-test" "--without-libbz2" + "--without-libcrypt" "--without-libz" ;; Skip the clnt_create check because it expects ;; a working glibc causing a circular dependency. @@ -255,6 +276,8 @@ Hurd-minimal package which are needed for both glibc and GCC.") (name "gnumach") (arguments (substitute-keyword-arguments (package-arguments gnumach-headers) + ((#:configure-flags flags ''()) + `(cons "--enable-kdb" ,flags)) ;enable kernel debugger ((#:phases phases '%standard-phases) `(modify-phases %standard-phases (add-after 'install 'produce-image @@ -275,37 +298,268 @@ Hurd-minimal package which are needed for both glibc and GCC.") (description "GNU Mach is the microkernel upon which a GNU Hurd system is based."))) +(define unifont + ;; GNU Unifont, <http://gnu.org/s/unifont>. + ;; Used the the VGA driver of the Hurd's console client. + (origin + (method url-fetch) + (uri + "http://unifoundry.com/pub/unifont-7.0.06/font-builds/unifont-7.0.06.bdf.gz") + (sha256 + (base32 + "0p2vhnc18cnbmb39vq4m7hzv4mhnm2l0a2s7gx3ar277fwng3hys")))) + +(define (hurd-rc-script) + "Return a script to be installed as /libexec/rc in the 'hurd' package. The +script takes care of installing the relevant passive translators on the first +boot, since this cannot be done from GNU/Linux." + (define translators + '(("/servers/crash-dump-core" ("/hurd/crash" "--dump-core")) + ("/servers/crash-kill" ("/hurd/crash" "--kill")) + ("/servers/crash-suspend" ("/hurd/crash" "--suspend")) + ("/servers/password" ("/hurd/password")) + ("/servers/socket/1" ("/hurd/pflocal")) + ("/servers/socket/2" ("/hurd/pfinet" "--interface" "eth0" + "--address" "10.0.2.15" ;the default QEMU guest IP + "--netmask" "255.255.255.0" + "--gateway" "10.0.2.2" + "--ipv6" "/servers/socket/16")))) + + (define rc + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils) + (ice-9 match)) + + ;; "@HURD@" is a placeholder. + (setenv "PATH" "@HURD@/bin") + + (define (translated? node) + ;; Return true if a translator is installed on NODE. + (with-output-to-port (%make-void-port "w") + (lambda () + (with-error-to-port (%make-void-port "w") + (lambda () + (zero? (system* "showtrans" "-s" node))))))) + + (for-each (match-lambda + ((node command) + (unless (translated? node) + (mkdir-p (dirname node)) + (apply invoke "settrans" "-c" node command)))) + '#$translators) + + ;; Start the oh-so-fancy console client. + (mkdir-p "/var/run") ;for the PID file + (invoke "console" "--daemonize" "-c" "/dev/vcs" + "-d" "vga" "-d" "pc_kbd" "-d" "generic_speaker")))) + + ;; FIXME: We want the program to use the cross-compiled Guile when + ;; cross-compiling. But why do we need to be explicit here? + (with-parameters ((%current-target-system "i586-pc-gnu")) + (program-file "rc" rc))) + +(define dde-sources + ;; This is the current tip of the dde branch + (let ((commit "ac1c7eb7a8b24b7469bed5365be38a968d59a136")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/hurd/incubator.git") + (commit commit))) + (sha256 + (base32 + "1vryinbg75xpydfrv9dbgfnds6knlh8l8bk2rxp32y9dc58z0692")) + (file-name (git-file-name "dde" commit))))) + (define-public hurd (package (name "hurd") - (version "0.9") - (source (origin - (method url-fetch) - (uri (hurd-source-url version)) - (sha256 - (base32 - "1nw9gly0n7pyv3cpfm4mmxy4yccrx4g0lyrvd3vk2vil26jpbggw")) - (patches (search-patches "hurd-fix-eth-multiplexer-dependency.patch")))) + (version (package-version hurd-headers)) + (source (origin (inherit (package-source hurd-headers)) + (patches (search-patches "hurd-cross.patch")))) (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'prepare-dde + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (substitute* "Makefile" + (("libbpf ") + "libbpf libmachdev libmachdevdde libddekit")) + (for-each make-file-writable (find-files ".")) + (let ((dde (or (assoc-ref inputs "dde-sources") + (assoc-ref native-inputs "dde-sources")))) + (for-each (lambda (dir) + (copy-recursively + (string-append dde "/" dir ) dir)) + '("libmachdev" "libmachdevdde" "libddekit"))) + #t)) + (add-after 'unpack 'find-tirpc + (lambda* (#:key inputs #:allow-other-keys) + (for-each (lambda (var) + (setenv var + (string-append (assoc-ref inputs "libtirpc") + "/include/tirpc:" + (or (getenv var) "")))) + '("CROSS_C_INCLUDE_PATH" "C_INCLUDE_PATH" + "CROSS_CPATH" "CPATH")) + #t)) + (add-after 'unpack 'fix-rpc-headers + (lambda _ + (substitute* "nfs/mount.c" + (("#undef (TRUE|FALSE)") "") + (("#include <rpc/pmap_prot.h>" m) + (string-append "#include <rpc/xdr.h>\n" m))) + (substitute* '("nfsd/cache.c") + (("#undef (TRUE|FALSE)") "")) + (substitute* '("nfsd/loop.c" + "nfsd/main.c" + "nfsd/ops.c") + (("#include <rpc/pmap_prot.h>" m) + (string-append "#include <rpc/types.h>\n#include <rpc/xdr.h>\n" m))) + #t)) (add-before 'build 'pre-build - (lambda _ - ;; Don't change the ownership of any file at this time. - (substitute* '("daemons/Makefile" "utils/Makefile") - (("-o root -m 4755") "")) - #t))) + (lambda _ + ;; Don't change the ownership of any file at this time. + (substitute* '("daemons/Makefile" "utils/Makefile") + (("-o root -m 4755") "")) + #t)) + (add-before 'build 'set-file-names + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash (assoc-ref inputs "bash-minimal")) + (coreutils (assoc-ref inputs "coreutils")) + (sed (assoc-ref inputs "sed")) + (grep (assoc-ref inputs "grep")) + (util-linux (assoc-ref inputs "util-linux"))) + (substitute* '("daemons/runttys.c" "daemons/getty.c" "utils/login.c") + (("/bin/login") + (string-append out "/bin/login")) + (("/bin/bash") (string-append bash "/bin/bash"))) + (substitute* '("startup/startup.c" "init/init.c" "config/ttys") + (("/libexec/") + (string-append out "/libexec/"))) + (substitute* '("utils/uptime.sh") + (("/bin/w") + (string-append out "/bin/w"))) + (substitute* "daemons/console-run.c" + (("/hurd/") + (string-append out "/hurd/"))) + + (substitute* '("daemons/runsystem.sh" + "daemons/runsystem.hurd.sh" + "sutils/MAKEDEV.sh") + (("^PATH=.*") + (string-append "PATH=" out "/bin:" out "/sbin:" + coreutils "/bin:" + sed "/bin:" grep "/bin:" + util-linux "/bin\n")) + (("^SHELL=.*") + (string-append "SHELL=" bash "/bin/bash\n")) + (("/sbin/") (string-append out "/sbin/")) + (("/libexec/") (string-append out "/libexec/")) + (("/hurd/") (string-append out "/hurd/"))) + + (substitute* "daemons/runsystem.sh" + (("export PATH") + (string-append "export PATH\n" + "\ +fsysopts / --writable + +# MAKEDEV relies on pipes so this needs to be set up. +settrans -c /servers/socket/1 /hurd/pflocal + +(cd /dev; MAKEDEV -D /dev std vcs tty{1,2,3,4,5,6})\n"))) + + (substitute* "daemons/runsystem.hurd.sh" + (("export PATH") + "export PATH +fsysopts / --writable\n")) + #t))) + (add-after 'patch-shebangs 'patch-libexec-shebangs + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; XXX: Since the 'patch-shebangs' phase doesn't traverse + ;; /libexec, do it here. + (let* ((out (assoc-ref outputs "out")) + (bash (assoc-ref inputs "bash-minimal")) + (path (list (string-append bash "/bin")))) + (for-each (lambda (file) + (patch-shebang file path)) + (find-files (string-append out "/libexec"))) + #t))) + (add-after 'install 'install-goodies + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Install additional goodies. + ;; TODO: Build & install *.msgids for rpctrace. + (let* ((out (assoc-ref outputs "out")) + (datadir (string-append out "/share/hurd"))) + ;; Install the fancy UTF-8 motd. + (mkdir-p (string-append out "/etc")) + (copy-file "console/motd.UTF8" + (string-append out "/etc/motd")) + + ;; Install the BDF font for use by the console client. + (copy-file (assoc-ref inputs "unifont") + "unifont.gz") + (invoke "gunzip" "unifont.gz") + (mkdir-p datadir) + (copy-file "unifont" + (string-append datadir "/vga-system.bdf")) + #t))) + (add-after 'install 'install-rc-file + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (file (string-append out "/libexec/rc")) + (rc (assoc-ref inputs "hurd-rc"))) + (delete-file file) + (copy-file rc file) + (substitute* file + (("@HURD@") out)) + #t)))) #:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib") "--disable-ncursesw" "--without-libbz2" "--without-libz" - "--without-parted"))) + "--without-parted" + ;; This is needed to pass the configure check for + ;; clnt_create + "ac_func_search_save_LIBS=-ltirpc" + "ac_cv_search_clnt_create=false"))) (build-system gnu-build-system) - (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) + (inputs + `(("glibc-hurd-headers" ,glibc/hurd-headers) + ("hurd-rc" ,(hurd-rc-script)) + + ("libgcrypt" ,libgcrypt) ;for /hurd/random + ("libdaemon" ,libdaemon) ;for /bin/console --daemonize + ("unifont" ,unifont) + ("libpciaccess" ,libpciaccess) + + ;; For NFS support + ("libtirpc" ,libtirpc/hurd) + + ;; Tools for the /libexec/* scripts. + ("bash-minimal" ,bash-minimal) + ("coreutils" ,coreutils) + ("sed" ,sed) + ("grep" ,grep) + ("util-linux" ,util-linux))) (native-inputs - `(("mig" ,mig) - ("perl" ,perl))) + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libgcrypt" ,libgcrypt) ;for 'libgcrypt-config' + ("pkg-config" ,pkg-config) + ("mig" ,(if (%current-target-system) + ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG, + ;; hence this hack. + (package + (inherit mig) + (arguments `(#:system "i686-linux"))) + mig)) + ("perl" ,perl) + ("texinfo" ,texinfo-4) + ("dde-sources" ,dde-sources))) (supported-systems %hurd-systems) (home-page "https://www.gnu.org/software/hurd/hurd.html") (synopsis "The kernel servers for the GNU operating system") @@ -315,3 +569,87 @@ augmentation of standard Unix kernels. It is a collection of protocols for system interaction (file systems, networks, authentication), and servers implementing them.") (license gpl2+))) + +(define-public netdde + (let ((commit "4a1016f130b6f2065d3f088325e5fb0b2997ae12") + (revision "1")) + (package + (name "netdde") + ;; The version prefix corresponds to the version of Linux from which the + ;; drivers were taken. + (version (git-version "2.6.32.65" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/hurd/incubator.git") + (commit commit))) + (sha256 + (base32 + "1njv9dszq4lj05yq4v9j5v247hfghpzvvz4hzy0khjjr35mw7hr8")) + (file-name (git-file-name name commit)))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "SHELL=" (assoc-ref %build-inputs "bash") + "/bin/bash") + "PKGDIR=libdde_linux26" + ,@(if (%current-target-system) + (list "CC=i586-pc-gnu-gcc" + "LINK_PROGRAM=i586-pc-gnu-gcc") + (list "CC=gcc"))) + #:configure-flags + (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'prepare-dde + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (for-each make-file-writable (find-files ".")) + (let ((dde (or (assoc-ref inputs "dde-sources") + (assoc-ref native-inputs "dde-sources")))) + (for-each (lambda (dir) + (copy-recursively + (string-append dde "/" dir ) dir)) + '("libdde_linux26" "libddekit"))) + (substitute* "libdde_linux26/mk/rel2abs.sh" + (("/bin/bash") (which "bash"))) + #t)) + (add-after 'patch-generated-file-shebangs 'build-libdde-linux26 + (lambda* (#:key make-flags #:allow-other-keys) + (with-directory-excursion "libdde_linux26" + (apply invoke "make" + (delete "PKGDIR=libdde_linux26" make-flags))))) + (add-after 'build-libdde-linux26 'convert + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "convert" make-flags))) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + ;; no-common can be dropped with GCC 10+ where this is the + ;; default. + (apply invoke "make" "CFLAGS=-fno-common" make-flags))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (install-file "netdde" + (string-append (assoc-ref outputs "out") + "/bin")) + #t))))) + (inputs + `(("hurd" ,hurd) + ("libpciaccess" ,libpciaccess) + ("zlib" ,zlib))) + (native-inputs + `(("coreutils" ,coreutils) + ("gawk" ,gawk) + ("grep" ,grep) + ("perl" ,perl) + ("sed" ,sed) + ("dde-sources" ,dde-sources))) + (supported-systems %hurd-systems) + (home-page "https://www.gnu.org/software/hurd/hurd.html") + (synopsis "Linux network drivers glued by the DDE layer") + (description + "This package provides Linux 2.6 network drivers that can be embedded +in userland processes thanks to the DDE layer.") + ;; Some drivers are dually licensed with the options being GPLv2 or one + ;; of MPL/Expat/BSD-3 (dependent on the driver). + (license gpl2)))) diff --git a/gnu/packages/hyperledger.scm b/gnu/packages/hyperledger.scm index 86eb86d3b5..c1b8215584 100644 --- a/gnu/packages/hyperledger.scm +++ b/gnu/packages/hyperledger.scm @@ -188,7 +188,7 @@ link-time. New implementations can be added as well.") ("rxcpp" ,rxcpp) ("spdlog" ,spdlog))) (inputs - `(("boost" ,boost-1.69) + `(("boost" ,boost) ("gflags" ,gflags) ("grpc" ,grpc-1.16.1) ("hyperledger-iroha-ed25519" ,hyperledger-iroha-ed25519) diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm index 2014813466..cf76c6fe20 100644 --- a/gnu/packages/icu4c.scm +++ b/gnu/packages/icu4c.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,37 +28,15 @@ #:use-module (gnu packages python) #:use-module (guix licenses) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (guix download) #:use-module (guix build-system ant) #:use-module (guix build-system gnu)) -;; These patches are taken from ICUs 'maint-64' branch and will be included in -;; 64.3. The latter patch is needed because many packages use "invalid" -;; locales which misbehave with ICU 64.2. See discussion at -;; <https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00343.html>. -(define %icu4c-patches - (list (origin - (method url-fetch) - (uri (string-append "https://github.com/unicode-org/icu/commit/" - "7788f04eb9be0d7ecade6af46cf7b9825447763d.patch")) - (file-name "icu4c-datetime-regression.patch") - (sha256 - (base32 - "0gs2sbdfpzwwdjqcqr0c16fw3g7wy3gb1gbgvzs9k1ciw0bhpv4w"))) - (origin - (method url-fetch) - (uri (string-append "https://github.com/unicode-org/icu/commit/" - "cfb20862909ff105d4f2c43923c97561bc5a5815.patch")) - (file-name "icu4c-locale-mapping.patch") - (sha256 - (base32 - "0s5psb60aisj6icziblvlp9dqcz56n3887i8ib0yidbjnnrw5b97"))))) - (define-public icu4c (package (name "icu4c") - (replacement icu4c/fixed) - (version "64.2") + (version "66.1") (source (origin (method url-fetch) (uri (string-append @@ -66,18 +45,28 @@ "/icu4c-" (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version) "-src.tgz")) - (patches %icu4c-patches) (patch-flags '("-p2")) + (patches (search-patches "icu4c-CVE-2020-10531.patch")) (sha256 - (base32 "0v0xsf14xwlj125y9fd8lrhsaych4d8liv8gr746zng6g225szb2")))) + (base32 "0bharwzc9nzkbrcf405z2nb3h7q0711z450arz0mjmdrk8hg58sj")))) (build-system gnu-build-system) + ;; When cross-compiling, this package needs a source directory of a + ;; native-build of itself. (native-inputs - `(("python" ,python-minimal))) + `(("python" ,python-minimal) + ,@(if (%current-target-system) + `(("icu4c-build-root" ,icu4c-build-root)) + '()))) (inputs `(("perl" ,perl))) (arguments `(#:configure-flags - '("--enable-rpath") + (list + "--enable-rpath" + ,@(if (%current-target-system) + '((string-append "--with-cross-build=" + (assoc-ref %build-inputs "icu4c-build-root"))) + '())) #:phases (modify-phases %standard-phases (add-after 'unpack 'chdir-to-source @@ -106,34 +95,24 @@ C/C++ part.") (license x11) (home-page "http://site.icu-project.org/"))) -(define icu4c/fixed - (package - (inherit icu4c) - (source (origin - (inherit (package-source icu4c)) - (patch-flags '("-p2")) - (patches (append - (origin-patches (package-source icu4c)) - (search-patches - "icu4c-CVE-2020-10531.patch"))))))) - -(define-public icu4c-66.1 +(define-public icu4c-build-root (package (inherit icu4c) - (version "66.1") - (source (origin - (method url-fetch) - (uri (string-append - "https://github.com/unicode-org/icu/releases/download/release-" - (string-map (lambda (x) (if (char=? x #\.) #\- x)) version) - "/icu4c-" - (string-map (lambda (x) (if (char=? x #\.) #\_ x)) version) - "-src.tgz")) - (patch-flags '("-p2")) - (patches (search-patches "icu4c-CVE-2020-10531.patch")) - (sha256 - (base32 - "0bharwzc9nzkbrcf405z2nb3h7q0711z450arz0mjmdrk8hg58sj")))))) + (name "icu4c-build-root") + (arguments + (substitute-keyword-arguments (package-arguments icu4c) + ((#:tests? _ '()) + #f) + ((#:out-of-source? _ '()) + #t) + ((#:phases phases) + `(modify-phases ,phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively "../build" out) + #t))))))) + (native-inputs '()))) (define-public java-icu4j (package diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index 02d903a6a3..801dc70149 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -90,7 +90,7 @@ (inputs `(;; Our ICU is too recent: “error: ‘UChar’ does not name a type“. ;; ("icu4c" ,icu4c) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("libxml2" ,libxml2) @@ -138,7 +138,7 @@ licences similar to the Modified BSD licence.")))) ("gts" ,gts) ("hdf5" ,hdf5) ("itpp" ,itpp) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("libxml" ,libxml2) @@ -199,7 +199,7 @@ of external libraries that provide additional functionality.") ("expat" ,expat) ("freetype" ,freetype) ("hdf5" ,hdf5) - ("jpeg" ,libjpeg) + ("jpeg" ,libjpeg-turbo) ("jsoncpp" ,jsoncpp) ("libogg" ,libogg) ("libtheora" ,libtheora) @@ -394,7 +394,7 @@ integrates with various databases on GUI toolkits such as Qt and Tk.") (patches (search-patches "opencv-rgbd-aarch64-test-fix.patch")) (sha256 (base32 "1f334glf39nk42mpqq6j732h3ql2mpz89jd4mcl678s8n73nfjh2")))))) - (inputs `(("libjpeg" ,libjpeg) + (inputs `(("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("jasper" ,jasper) ;; ffmpeg 4.0 causes core dumps in tests. @@ -455,7 +455,7 @@ vision algorithms. It can be used to do things like: ("gobject-introspection" ,gobject-introspection))) (inputs `(("glib" ,glib) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("librsvg" ,librsvg) ("libtiff" ,libtiff) @@ -517,7 +517,7 @@ due to its architecture which automatically parallelises the image workflows.") ("gtk+-2" ,gtk+-2) ("libxml2" ,libxml2) ("libexif" ,libexif) - ("libjpeg" ,libjpeg) ; required by vips.pc + ("libjpeg" ,libjpeg-turbo) ;required by vips.pc ("librsvg" ,librsvg) ("fftw" ,fftw) ("libgsf" ,libgsf) @@ -574,7 +574,7 @@ recalculates.") (inputs `(("libgeotiff" ,libgeotiff) ("libtiff" ,libtiff) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("zlib" ,zlib))) (home-page "https://github.com/vxl/vxl/") @@ -651,7 +651,7 @@ libraries designed for computer vision research and implementation.") ("fftw" ,fftw) ("fftwf" ,fftwf) ("hdf5" ,hdf5) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("mesa" ,mesa-opencl) diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm index 12bf318b0a..b8b32de867 100644 --- a/gnu/packages/image-viewers.scm +++ b/gnu/packages/image-viewers.scm @@ -158,7 +158,6 @@ actions.") write-dummy-changelog) (call-with-output-file "ChangeLog.html" write-dummy-changelog) - (setenv "NOCONFIGURE" "true") ;; Don't try to run 'git' for the version number. (substitute* "configure.ac" @@ -207,7 +206,7 @@ collection. Geeqie was initially based on GQview.") "0hi9v0rdx47nys0wvm9xasdrafa34r5kq6crb074a0ipwmc60iiq")))) (build-system gnu-build-system) (inputs `(("gtk+" ,gtk+-2) - ("libjpeg" ,libjpeg))) + ("libjpeg" ,libjpeg-turbo))) (native-inputs `(("intltool" ,intltool) ("pkg-config" ,pkg-config))) (synopsis "Simple and fast image viewer for X") @@ -385,7 +384,7 @@ It supports JPEG, PNG and GIF formats.") ("zlib" ,zlib) ("exiv2" ,exiv2) ("libpng" ,libpng) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("lcms" ,lcms) ("openexr" ,openexr) ("fftw" ,fftwf) @@ -672,7 +671,7 @@ with tiling window managers. Features include: ("glib" ,glib) ("gtk+" ,gtk+-2) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("libexif" ,libexif) ("libx11" ,libx11) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index eef73d68ab..c6fc26f9b8 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net> ;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org> ;;; Copyright © 2016, 2017, 2018, 2020 Leo Famulari <leo@famulari.name> -;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net> @@ -19,7 +19,7 @@ ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com> ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz> -;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr> ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com> ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com> @@ -49,6 +49,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages cmake) #:use-module (gnu packages curl) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) @@ -81,11 +82,13 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (guix build-system scons) + #:use-module (guix deprecation) #:use-module (srfi srfi-1)) (define-public libpng @@ -363,7 +366,7 @@ Features: @end enumerate") (license license:gpl3+))) -(define-public libjpeg +(define-public ijg-libjpeg (package (name "libjpeg") (version "9c") @@ -392,8 +395,8 @@ lossless JPEG manipulations such as rotation, scaling or cropping: (license license:ijg) (home-page "https://www.ijg.org/"))) -(define-public libjpeg-8 - (package (inherit libjpeg) +(define-public ijg-libjpeg-8 + (package (inherit ijg-libjpeg) (version "8d") (source (origin (method url-fetch) @@ -499,7 +502,7 @@ official designation is ISO/IEC 29199-2). This library is an implementation of t (sha256 (base32 "1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8")))) (build-system gnu-build-system) - (inputs `(("libjpeg" ,libjpeg))) + (inputs `(("libjpeg" ,libjpeg-turbo))) (arguments '(#:tests? #f)) ; no tests (synopsis "Optimize JPEG images") @@ -544,7 +547,7 @@ extracting icontainer icon files.") (define-public libtiff (package (name "libtiff") - (version "4.0.10") + (version "4.1.0") (source (origin (method url-fetch) @@ -552,7 +555,7 @@ extracting icontainer icon files.") version ".tar.gz")) (sha256 (base32 - "1r4np635gr6zlc0bic38dzvxia6iqzcrary4n1ylarzpr8fd2lic")))) + "0d46bdvxdiv59lxnb0xz9ywm8arsr6xsapi5s6y6vnys2wjz6aax")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;1.3 MiB of HTML documentation @@ -561,9 +564,10 @@ extracting icontainer icon files.") `(#:configure-flags (list (string-append "--with-docdir=" (assoc-ref %outputs "doc") "/share/doc/" - ,name "-" ,version)))) + ,name "-" ,version) + "--disable-static"))) (inputs `(("zlib" ,zlib) - ("libjpeg" ,libjpeg))) + ("libjpeg" ,libjpeg-turbo))) (synopsis "Library for handling TIFF files") (description "Libtiff provides support for the Tag Image File Format (TIFF), a format @@ -596,7 +600,7 @@ collection of tools for doing simple manipulations of TIFF images.") ("pkg-config" ,pkg-config))) (inputs `(("giflib" ,giflib) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("libwebp" ,libwebp) @@ -636,18 +640,33 @@ arithmetic ops.") (define-public jbig2dec (package (name "jbig2dec") - (version "0.16") + (version "0.18") (source (origin (method url-fetch) (uri (string-append "https://github.com/ArtifexSoftware" "/ghostpdl-downloads/releases/download" - "/gs927/" name "-" version ".tar.gz")) + "/gs951/" name "-" version ".tar.gz")) (sha256 (base32 - "00h61y7bh3z6mqfzxyb318gyh0f8jwarg4hvlrm83rqps8avzxm4")) - (patches (search-patches "jbig2dec-ignore-testtest.patch")))) + "0pigfw2v0ppvr0lbysm69gx0zsa5q2q92yrb8af2j3im6x97f6cy")))) (build-system gnu-build-system) - (arguments '(#:configure-flags '("--disable-static"))) + (arguments '(#:configure-flags '("--disable-static") + #:phases (modify-phases %standard-phases + (add-before 'bootstrap 'force-bootstrap + (lambda _ + ;; XXX: jbig2dec 0.18 was released with + ;; a broken configure script, so we + ;; recreate the build system here. + ;; Remove the autoconf inputs below + ;; when deleting this code. + (delete-file "configure") + (delete-file "autogen.sh") + #t))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("python" ,python-wrapper))) ;for tests (synopsis "Decoder of the JBIG2 image compression format") (description "JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit @@ -789,31 +808,31 @@ error-resilience, a Java-viewer for j2k-images, ...") (define-public giflib (package (name "giflib") - (version "5.1.4") + (version "5.2.1") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/giflib/giflib-" - version ".tar.bz2")) + version ".tar.gz")) (sha256 (base32 - "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz")) - (patches (search-patches - "giflib-make-reallocarray-private.patch")))) + "1gbrg03z1b6rlrvjyc6d41bc8j1bsr7rm8206gb1apscyii5bnii")))) (build-system gnu-build-system) (outputs '("bin" ; utility programs "out")) ; library - (inputs `(("libx11" ,libx11) - ("libice" ,libice) - ("libsm" ,libsm) - ("perl" ,perl))) (arguments - `(#:phases + '(#:make-flags (list "CC=gcc" + (string-append "PREFIX=" + (assoc-ref %outputs "out")) + (string-append "BINDIR=" + (assoc-ref %outputs "bin") "/bin")) + #:phases (modify-phases %standard-phases (add-after 'unpack 'disable-html-doc-gen (lambda _ - (substitute* "doc/Makefile.in" + (substitute* "doc/Makefile" (("^all: allhtml manpages") "")) #t)) + (delete 'configure) (add-after 'install 'install-manpages (lambda* (#:key outputs #:allow-other-keys) (let* ((bin (assoc-ref outputs "bin")) @@ -877,7 +896,7 @@ compose, and analyze GIF images.") ("freetype" ,freetype) ("giflib" ,giflib) ("libid3tag" ,libid3tag) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("libx11" ,libx11) @@ -996,7 +1015,7 @@ supplies a generic doubly-linked list and some string functions.") `(("pkg-config" ,pkg-config) ("unzip" ,unzip))) (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ("libjxr" ,libjxr) ("libpng" ,libpng) ("libraw" ,libraw) @@ -1022,6 +1041,7 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.") (uri (string-append "https://github.com/ukoethe/vigra/releases/download/" "Version-" (string-join (string-split version #\.) "-") "/vigra-" version "-src.tar.gz")) + (patches (search-patches "vigra-python-compat.patch")) (sha256 (base32 "1bqs8vx5i1bzamvv563i24gx2xxdidqyxh9iaj46mbznhc84wmm5")))) (build-system cmake-build-system) @@ -1032,16 +1052,16 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.") ("hdf5" ,hdf5) ("ilmbase" ,ilmbase) ; propagated by openexr, but needed explicitly ; to create a configure-flag - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("openexr" ,openexr) - ("python" ,python-2) ; print syntax - ("python2-numpy" ,python2-numpy) + ("python" ,python-wrapper) + ("python-numpy" ,python-numpy) ("zlib" ,zlib))) (native-inputs `(("doxygen" ,doxygen) - ("python2-nose" ,python2-nose) + ("python-nose" ,python-nose) ("sphinx" ,python-sphinx))) (arguments `(#:test-target "check" @@ -1061,7 +1081,9 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.") (list "-Wno-dev" ; suppress developer mode with lots of warnings (string-append "-DVIGRANUMPY_INSTALL_DIR=" (assoc-ref %outputs "out") - "/lib/python2.7/site-packages") + "/lib/python" + ,(version-major+minor (package-version python)) + "/site-packages") ;; OpenEXR is not enabled by default. "-DWITH_OPENEXR=1" ;; Fix rounding error on 32-bit machines @@ -1134,7 +1156,7 @@ language bindings to VIGRA.") (inputs `(("freeglut" ,freeglut) ("giflib" ,giflib) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff))) (native-inputs @@ -1174,7 +1196,7 @@ channels.") (propagated-inputs ;; These are all in the 'Libs.private' field of libmng.pc. `(("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("zlib" ,zlib))) (home-page "https://www.libmng.com/") (synopsis "Library for handling MNG files") @@ -1290,7 +1312,7 @@ convert, manipulate, filter and display a wide variety of image formats.") (base32 "05l75yd1zsxwv25ykwwwjs8961szv7iywf16nc6vc6qpby27ckv6")))) (build-system cmake-build-system) - (inputs `(("libjpeg" ,libjpeg))) + (inputs `(("libjpeg" ,libjpeg-turbo))) (synopsis "JPEG-2000 library") (description "The JasPer Project is an initiative to provide a reference implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e., @@ -1378,7 +1400,7 @@ differences in file encoding, image quality, and other small variations.") (inputs `(("libmhash" ,libmhash) ("libmcrypt" ,libmcrypt) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("zlib" ,zlib))) (arguments `(#:make-flags '("CXXFLAGS=-fpermissive") ;required for MHashPP.cc @@ -1503,21 +1525,47 @@ is hereby granted.")))) (define-public libjpeg-turbo (package (name "libjpeg-turbo") - (version "2.0.2") - (replacement libjpeg-turbo/fixed) + (version "2.0.4") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/libjpeg-turbo/" version "/libjpeg-turbo-" version ".tar.gz")) (sha256 (base32 - "1v9gx1gdzgxf51nd55ncq7rghmj4x9x91rby50ag36irwngmkf5c")))) + "01ill8bgjyk582wipx7sh7gj2nidylpbzvwhx0wkcm6mxx3qbp9k")))) (build-system cmake-build-system) (native-inputs `(("nasm" ,nasm))) (arguments - '(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib" - "-DENABLE_STATIC=0"))) + `(#:configure-flags '("-DCMAKE_INSTALL_LIBDIR:PATH=lib" + "-DENABLE_STATIC=0" + ;; djpeg-shared-3x2-float-prog-cmp fails on 32-bit PPC. + ,@(if (string=? "powerpc-linux" (%current-system)) + `("-DFLOATTEST=NO") + '()) + ;; The build system probes for the current CPU, but + ;; that fails when cross-compiling. + ,@(let ((target (%current-target-system))) + (if target + (cond + ((string-prefix? "arm" target) + `("-DCMAKE_SYSTEM_PROCESSOR=arm")) + ((string-prefix? "aarch64" target) + `("-DCMAKE_SYSTEM_PROCESSOR=aarch64")) + ((string-prefix? "i686" target) + `("-DCMAKE_SYSTEM_PROCESSOR=x86")) + ((string-prefix? "x86_64" target) + `("-DCMAKE_SYSTEM_PROCESSOR=x86_64")) + ;; 32-bit and 64-bit + ((string-prefix? "powerpc" target) + `("-DCMAKE_SYSTEM_PROCESSOR=powerpc")) + (else '())) + '()))) + ,@(if (%current-target-system) + '() + ;; Use a special "bootstrap" CMake for the native build to work + ;; around a circular dependency between CMake and this package. + `(#:cmake ,cmake-bootstrap)))) (home-page "https://libjpeg-turbo.org/") (synopsis "SIMD-accelerated JPEG image handling library") (description "libjpeg-turbo is a JPEG image codec that accelerates baseline @@ -1534,19 +1582,8 @@ and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).") license:ijg ;the libjpeg library and associated tools license:zlib)))) ;the libjpeg-turbo SIMD extensions -;; Replacement package to fix CVE-2019-13960 and CVE-2019-2201. -(define libjpeg-turbo/fixed - (package - (inherit libjpeg-turbo) - (version "2.0.3") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/libjpeg-turbo/" - version "/libjpeg-turbo-" version ".tar.gz")) - (sha256 - (base32 - "1ds16bnj17v6hzd43w8pzijz3imd9am4hw75ir0fxm240m8dwij2")) - (patches (search-patches "libjpeg-turbo-CVE-2019-2201.patch")))))) +(define-deprecated libjpeg libjpeg-turbo) +(export libjpeg) (define-public niftilib (package @@ -1759,7 +1796,7 @@ identical visual appearance.") (build-system gnu-build-system) (inputs `(("curl" ,curl) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("ncurses" ,ncurses))) (home-page "https://csl.name/jp2a/") (synopsis "Convert JPEG images to ASCII") @@ -2013,7 +2050,7 @@ AOM, including with alpha.") ("libtiff" ,libtiff) ("libpng" ,libpng) ("libungif", libungif) - ("libjpeg", libjpeg) + ("libjpeg", libjpeg-turbo) ("libwebp" ,libwebp) ("openjpeg" ,openjpeg) ("lcms" ,lcms) diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm index 3c1fe012d0..6fc7e6d201 100644 --- a/gnu/packages/imagemagick.scm +++ b/gnu/packages/imagemagick.scm @@ -58,7 +58,11 @@ "0fcbcad95wn0q0pdfl0qgycm30f3a7xhskc0r5icldq6v6l4b3is")))) (build-system gnu-build-system) (arguments - `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch") + `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch" + + ;; Do not embed the build date in binaries. + "--enable-reproducible-build") + ;; FIXME: The test suite succeeded before version 6.9.6-2. ;; Try enabling it again with newer releases. #:tests? #f @@ -101,7 +105,7 @@ ("libxml2" ,libxml2) ("libtiff" ,libtiff) ("libpng" ,libpng) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("pango" ,pango) ("freetype" ,freetype) ("bzip2" ,bzip2) @@ -204,7 +208,7 @@ script.") ("libxml2" ,libxml2) ("libtiff" ,libtiff) ("libpng" ,libpng) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("freetype" ,freetype) ("bzip2" ,bzip2) ("xz" ,xz) diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm index 1ad23a92d4..26d4642547 100644 --- a/gnu/packages/inkscape.scm +++ b/gnu/packages/inkscape.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2014 John Darrington <jmd@gnu.org> ;;; Copyright © 2014, 2016 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net> -;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2017, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. @@ -88,12 +88,18 @@ (substitute* "share/icons/application/CMakeLists.txt" (("gtk-update-icon-cache") "true")) #t)) - (add-before 'configure 'dont-use-system-includes + (add-after 'unpack 'adjust-for-new-poppler (lambda _ - ;; Don't add redundant -isystem includes which confuses GCC7. - (substitute* "CMakeScripts/DefineDependsandFlags.cmake" - (("include_directories\\(SYSTEM") - "include_directories(")) + (substitute* (find-files "src/extension/internal/pdfinput") + ;; Needed for Poppler 0.82. + (("Unicode \\*u") "Unicode const *u") + ;; Needed for Poppler 0.83. + (("\\(GfxPath") "(const GfxPath") + (("GfxSubpath") "const GfxSubpath") + (("new GlobalParams\\(\\)") + "std::unique_ptr<GlobalParams>(new GlobalParams())") + (("new GlobalParams\\(poppler_datadir\\)") + "std::unique_ptr<GlobalParams>(new GlobalParams(poppler_datadir))")) #t))))) (home-page "https://inkscape.org/") (synopsis "Vector graphics editor") diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index cab90fb4e7..e2f79c3dc5 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -11,9 +11,9 @@ ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org> ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> - ;;; ;;; This file is part of GNU Guix. ;;; @@ -990,7 +990,7 @@ machine."))) ("grep" ,grep) ("jamvm" ,jamvm) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libnsl" ,libnsl) ("libpng" ,libpng) ("libtool" ,libtool) @@ -1610,7 +1610,7 @@ bootstrapping purposes.") ("libxi" ,libxi) ("libxinerama" ,libxinerama) ("libxrender" ,libxrender) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("mit-krb5" ,mit-krb5) ("nss" ,nss) @@ -1907,7 +1907,7 @@ new Date();")) ("giflib" ,giflib) ("lcms" ,lcms) ("libelf" ,libelf) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libice" ,libice) ("libpng" ,libpng) ("libx11" ,libx11) @@ -1920,6 +1920,9 @@ new Date();")) (native-inputs `(("icedtea-8" ,icedtea-8) ("icedtea-8:jdk" ,icedtea-8 "jdk") + ;; XXX: The build system is not particularly parallel safe and + ;; fails with newer versions of GNU Make. + ("make@4.2" ,gnu-make-4.2) ("unzip" ,unzip) ("which" ,which) ("zip" ,zip))) @@ -1976,6 +1979,7 @@ new Date();")) (native-inputs `(("openjdk9" ,openjdk9) ("openjdk9:jdk" ,openjdk9 "jdk") + ("make@4.2" ,gnu-make-4.2) ("unzip" ,unzip) ("which" ,which) ("zip" ,zip))))) @@ -2185,7 +2189,7 @@ new Date();")) ("freetype" ,freetype) ("giflib" ,giflib) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libx11" ,libx11) ("libxext" ,libxext) @@ -2196,6 +2200,7 @@ new Date();")) `(("autoconf" ,autoconf) ("openjdk10" ,openjdk10) ("openjdk10:jdk" ,openjdk10 "jdk") + ("make" ,gnu-make-4.2) ("pkg-config" ,pkg-config) ("unzip" ,unzip) ("which" ,which) @@ -2232,7 +2237,7 @@ new Date();")) ("freetype" ,freetype) ("giflib" ,giflib) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libx11" ,libx11) ("libxext" ,libxext) @@ -2244,6 +2249,7 @@ new Date();")) `(("autoconf" ,autoconf) ("openjdk11" ,openjdk11) ("openjdk11:jdk" ,openjdk11 "jdk") + ("make@4.2" ,gnu-make-4.2) ("pkg-config" ,pkg-config) ("unzip" ,unzip) ("which" ,which) @@ -10218,7 +10224,8 @@ that is part of the SWT Tools project.") "linux32") ((or "x86_64-linux" "aarch64-linux" "mips64el-linux") - "linux64"))))) + "linux64") + (_ "unknown-kernel"))))) (install-file "src/main/native-package/src/libjansi.so" dir)) #t)) (add-after 'install 'install-native diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm index aa8493fd1d..c4b87b540d 100644 --- a/gnu/packages/jemalloc.scm +++ b/gnu/packages/jemalloc.scm @@ -32,7 +32,7 @@ (define-public jemalloc (package (name "jemalloc") - (version "5.2.0") + (version "5.2.1") (source (origin (method url-fetch) (uri (string-append @@ -40,7 +40,7 @@ version "/jemalloc-" version ".tar.bz2")) (sha256 (base32 - "1d73a5c5qdrwck0fa5pxz0myizaf3s9alsvhiqwrjahdlr29zgkl")))) + "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl")))) (build-system gnu-build-system) (arguments `(#:phases @@ -59,6 +59,9 @@ '() '(#:configure-flags (list "--disable-thp"))))) (inputs `(("perl" ,perl))) + ;; Install the scripts to a separate output to avoid referencing Perl and + ;; Bash in the default output, saving ~75 MiB on the closure. + (outputs '("out" "bin")) (home-page "http://jemalloc.net/") (synopsis "General-purpose scalable concurrent malloc implementation") (description diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm index e65a8bd6c9..3f16bc27f1 100644 --- a/gnu/packages/jupyter.scm +++ b/gnu/packages/jupyter.scm @@ -171,7 +171,7 @@ Messaging Protocol}.") ("cppzmq" ,cppzmq) ("zeromq" ,zeromq) ("openssl" ,openssl) - ("util-linux" ,util-linux))) ;libuuid + ("util-linux" ,util-linux "lib"))) ;libuuid (home-page "https://quantstack.net/xeus") (synopsis "C++ implementation of the Jupyter Kernel protocol") (description diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm index dad50fad24..0c31709329 100644 --- a/gnu/packages/kde-frameworks.scm +++ b/gnu/packages/kde-frameworks.scm @@ -3663,7 +3663,7 @@ http://community.kde.org/Frameworks/Porting_Notes should help with this.") ("kwidgetsaddons" ,kwidgetsaddons) ("kwindowsystem" ,kwindowsystem) ("kxmlgui" ,kxmlgui) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("openssl" ,openssl) ("phonon" ,phonon) diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index c4576c8ba7..6eb02119a4 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -529,7 +529,7 @@ cards.") ("kwidgetsaddons" ,kwidgetsaddons) ("qtbase" ,qtbase) ("qca" ,qca) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) (home-page "https://community.kde.org/Frameworks") (synopsis "Library for managing partitions") (description "Library for managing partitions.") diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm index 34e70e7994..896d15f485 100644 --- a/gnu/packages/kerberos.scm +++ b/gnu/packages/kerberos.scm @@ -5,9 +5,11 @@ ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2012, 2017 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +35,7 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages gnupg) #:use-module (gnu packages libidn) + #:use-module (gnu packages hurd) #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages compression) @@ -49,7 +52,7 @@ (define-public mit-krb5 (package (name "mit-krb5") - (version "1.17") + (version "1.18") (source (origin (method url-fetch) (uri (list @@ -59,18 +62,34 @@ (string-append "https://kerberos.org/dist/krb5/" (version-major+minor version) "/krb5-" version ".tar.gz"))) + (patches (search-patches "mit-krb5-qualify-short-hostnames.patch" + "mit-krb5-hurd.patch")) (sha256 (base32 - "1xc1ly09697b7g2vngvx76szjqy9769kpgn27lnp1r9xln224vjs")))) + "121c5xsy3x0i4wdkrpw62yhvji6virbh6n30ypazkp0isws3k4bk")))) (build-system gnu-build-system) (native-inputs `(("bison" ,bison) ("perl" ,perl))) (arguments `(;; XXX: On 32-bit systems, 'kdb5_util' hangs on an fcntl/F_SETLKW call - ;; while running the tests in 'src/tests'. - #:tests? ,(string=? (%current-system) "x86_64-linux") + ;; while running the tests in 'src/tests'. Also disable tests when + ;; cross-compiling. + #:tests? ,(and (not (%current-target-system)) + (string=? (%current-system) "x86_64-linux")) + ,@(if (%current-target-system) + '(#:configure-flags + (list "--localstatedir=/var" + "krb5_cv_attr_constructor_destructor=yes" + "ac_cv_func_regcomp=yes" + "ac_cv_printf_positional=yes" + "ac_cv_file__etc_environment=yes" + "ac_cv_file__etc_TIMEZONE=no") + #:make-flags + (list "CFLAGS+=-DDESTRUCTOR_ATTR_WORKS=1")) + '(#:configure-flags + (list "--localstatedir=/var"))) #:phases (modify-phases %standard-phases (add-after 'unpack 'enter-source-directory @@ -78,8 +97,8 @@ (chdir "src") #t)) (add-before 'check 'pre-check - (lambda* (#:key inputs #:allow-other-keys) - (let ((perl (assoc-ref inputs "perl"))) + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((perl (assoc-ref (or native-inputs inputs) "perl"))) (substitute* "plugins/kdb/db2/libdb2/test/run.test" (("/bin/cat") (string-append perl "/bin/perl")) (("D/bin/sh") (string-append "D" (which "sh"))) diff --git a/gnu/packages/kodi.scm b/gnu/packages/kodi.scm index 2831d3d842..81294f4859 100644 --- a/gnu/packages/kodi.scm +++ b/gnu/packages/kodi.scm @@ -121,7 +121,7 @@ (string-append out "/lib")) #t)))))) (inputs - `(("util-linux" ,util-linux))) + `(("libuuid" ,util-linux "lib"))) (synopsis "Lightweight universal identifier library") (description "CrossGuid is a minimal GUID/UUID generator library for C++.") @@ -419,7 +419,7 @@ alternatives. In compilers, this can reduce the cascade of secondary errors.") ("libcdio" ,libcdio) ("libdrm" ,libdrm) ("libgcrypt" ,libgcrypt) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libltdl" ,libltdl) ("libmad" ,libmad) ("libmicrohttpd" ,libmicrohttpd) diff --git a/gnu/packages/ld-wrapper-next.in b/gnu/packages/ld-wrapper-next.in deleted file mode 100644 index 5d5756f6a3..0000000000 --- a/gnu/packages/ld-wrapper-next.in +++ /dev/null @@ -1,305 +0,0 @@ -#!@BASH@ -# -*- mode: scheme; coding: utf-8; -*- - -# XXX: We have to go through Bash because there's no command-line switch to -# augment %load-compiled-path, and because of the silly 127-byte limit for -# the shebang line in Linux. -# Use `load-compiled' because `load' (and `-l') doesn't otherwise load our -# .go file (see <http://bugs.gnu.org/12519>). -# Unset 'GUILE_LOAD_COMPILED_PATH' to make sure we do not stumble upon -# incompatible .go files. See -# <https://lists.gnu.org/archive/html/guile-devel/2016-03/msg00000.html>. - -unset GUILE_LOAD_COMPILED_PATH -main="(@ (gnu build-support ld-wrapper) ld-wrapper)" -exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@" -!# -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix 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 General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. - -(define-module (gnu build-support ld-wrapper) - #:use-module (srfi srfi-1) - #:use-module (ice-9 match) - #:autoload (ice-9 rdelim) (read-delimited) - #:export (ld-wrapper)) - -;;; Commentary: -;;; -;;; This is a wrapper for the linker. Its purpose is to inspect the -L and -;;; -l switches passed to the linker, add corresponding -rpath arguments, and -;;; invoke the actual linker with this new set of arguments. -;;; -;;; The alternatives to this hack would be: -;;; -;;; 1. Using $LD_RUN_PATH. However, that would tend to include more than -;;; needed in the RPATH; for instance, given a package with `libfoo' as -;;; an input, all its binaries would have libfoo in their RPATH, -;;; regardless of whether they actually NEED it. -;;; -;;; 2. Use a GCC "lib" spec string such as `%{L*:-rpath %*}', which adds a -;;; `-rpath LIBDIR' argument for each occurrence of `-L LIBDIR'. -;;; However, this doesn't work when $LIBRARY_PATH is used, because the -;;; additional `-L' switches are not matched by the above rule, because -;;; the rule only matches explicit user-provided switches. See -;;; <http://gcc.gnu.org/ml/gcc-help/2012-09/msg00110.html> for details. -;;; -;;; As a bonus, this wrapper checks for "impurities"--i.e., references to -;;; libraries outside the store. -;;; -;;; Code: - -(define %real-ld - ;; Name of the linker that we wrap. - "@LD@") - -(define %store-directory - ;; File name of the store. - (or (getenv "NIX_STORE") "/gnu/store")) - -(define %temporary-directory - ;; Temporary directory. - (or (getenv "TMPDIR") "/tmp")) - -(define %build-directory - ;; Top build directory when run from a builder. - (getenv "NIX_BUILD_TOP")) - -(define %allow-impurities? - ;; Whether to allow references to libraries outside the store. - ;; Allow them by default for convenience. - (let ((value (getenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES"))) - (or (not value) - (let ((value (string-downcase value))) - (cond ((member value '("yes" "y" "t" "true" "1")) - #t) - ((member value '("no" "n" "f" "false" "0")) - #f) - (else - (format (current-error-port) - "ld-wrapper: ~s: invalid value for \ -'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'~%" - value))))))) - -(define %debug? - ;; Whether to emit debugging output. - (getenv "GUIX_LD_WRAPPER_DEBUG")) - -(define %disable-rpath? - ;; Whether to disable automatic '-rpath' addition. - (getenv "GUIX_LD_WRAPPER_DISABLE_RPATH")) - -(define (readlink* file) - ;; Call 'readlink' until the result is not a symlink. - (define %max-symlink-depth 50) - - (let loop ((file file) - (depth 0)) - (define (absolute target) - (if (absolute-file-name? target) - target - (string-append (dirname file) "/" target))) - - (if (>= depth %max-symlink-depth) - file - (call-with-values - (lambda () - (catch 'system-error - (lambda () - (values #t (readlink file))) - (lambda args - (let ((errno (system-error-errno args))) - (if (or (= errno EINVAL) (= errno ENOENT)) - (values #f file) - (apply throw args)))))) - (lambda (success? target) - (if success? - (loop (absolute target) (+ depth 1)) - file)))))) - -(define (pure-file-name? file) - ;; Return #t when FILE is the name of a file either within the store - ;; (possibly via a symlink) or within the build directory. - (let ((file (readlink* file))) - (or (not (string-prefix? "/" file)) - (string-prefix? %store-directory file) - (string-prefix? %temporary-directory file) - (and %build-directory - (string-prefix? %build-directory file))))) - -(define (store-file-name? file) - ;; Return #t when FILE is a store file, possibly indirectly. - (string-prefix? %store-directory (readlink* file))) - -(define (shared-library? file) - ;; Return #t when FILE denotes a shared library. - (or (string-suffix? ".so" file) - (let ((index (string-contains file ".so."))) - ;; Since we cannot use regexps during bootstrap, roll our own. - (and index - (string-every (char-set-union (char-set #\.) char-set:digit) - (string-drop file (+ index 3))))))) - -(define (library-search-path args) - ;; Return the library search path as a list of directory names. The GNU ld - ;; manual notes that "[a]ll `-L' options apply to all `-l' options, - ;; regardless of the order in which the options appear", so we must compute - ;; the search path independently of the -l options. - (let loop ((args args) - (path '())) - (match args - (() - (reverse path)) - (("-L" directory . rest) - (loop rest (cons directory path))) - ((argument . rest) - (if (string-prefix? "-L" argument) ;augment the search path - (loop rest - (cons (string-drop argument 2) path)) - (loop rest path)))))) - -(define (library-files-linked args library-path) - ;; Return the absolute file names of shared libraries explicitly linked - ;; against via `-l' or with an absolute file name in ARGS, looking them up - ;; in LIBRARY-PATH. - (define files+args - (fold (lambda (argument result) - (match result - ((library-files ((and flag - (or "-dynamic-linker" "-plugin")) - . rest)) - ;; When passed '-dynamic-linker ld.so', ignore 'ld.so'; when - ;; passed '-plugin liblto_plugin.so', ignore - ;; 'liblto_plugin.so'. See <http://bugs.gnu.org/20102>. - (list library-files - (cons* argument flag rest))) - ((library-files previous-args) - (cond ((string-prefix? "-l" argument) ;add library - (let* ((lib (string-append "lib" - (string-drop argument 2) - ".so")) - (full (search-path library-path lib))) - (list (if full - (cons full library-files) - library-files) - (cons argument previous-args)))) - ((and (string-prefix? %store-directory argument) - (shared-library? argument)) ;add library - (list (cons argument library-files) - (cons argument previous-args))) - (else - (list library-files - (cons argument previous-args))))))) - (list '() '()) - args)) - - (match files+args - ((files arguments) - (reverse files)))) - -(define (rpath-arguments library-files) - ;; Return the `-rpath' argument list for each of LIBRARY-FILES, a list of - ;; absolute file names. - (fold-right (lambda (file args) - ;; Add '-rpath' if and only if FILE is in the store; we don't - ;; want to add '-rpath' for files under %BUILD-DIRECTORY or - ;; %TEMPORARY-DIRECTORY because that could leak to installed - ;; files. - (cond ((and (not %disable-rpath?) - (store-file-name? file)) - (cons* "-rpath" (dirname file) args)) - ((or %allow-impurities? - (pure-file-name? file)) - args) - (else - (begin - (format (current-error-port) - "ld-wrapper: error: attempt to use \ -library outside of ~a: ~s~%" - %store-directory file) - (exit 1))))) - '() - library-files)) - -(define (expand-arguments args) - ;; Expand ARGS such that "response file" arguments, such as "@args.txt", are - ;; expanded (info "(gcc) Overall Options"). - (define (response-file-arguments file) - (define (tokenize port) - ;; Return a list of all strings found in PORT. Quote characters are removed, - ;; but whitespaces within quoted strings are preserved. - (let loop ((words '())) - (let* ((word (read-delimited " '\"" port 'split)) - (token (car word)) - (delim (cdr word))) - (if (eof-object? delim) - (reverse words) - (case delim - ((#\") (loop (cons (read-delimited "\"" port) words))) - ((#\') (loop (cons (read-delimited "'" port) words))) - ((#\ ) (if (> 0 (string-length token)) - (loop (cons token words)) - (loop words))) - (else (loop words))))))) - - (when %debug? - (format (current-error-port) - "ld-wrapper: attempting to read arguments from '~a'~%" file)) - - (call-with-input-file file tokenize)) - - (define result - (fold-right (lambda (arg result) - (if (string-prefix? "@" arg) - (let ((file (string-drop arg 1))) - (append (catch 'system-error - (lambda () - (response-file-arguments file)) - (lambda args - ;; FILE doesn't exist or cannot be read so - ;; leave ARG as is. - (list arg))) - result)) - (cons arg result))) - '() - args)) - - ;; If there are "@" arguments in RESULT *and* we can expand them (they don't - ;; refer to nonexistent files), then recurse. - (if (equal? result args) - result - (expand-arguments result))) - -(define (ld-wrapper . args) - ;; Invoke the real `ld' with ARGS, augmented with `-rpath' switches. - (let* ((args (expand-arguments args)) - (path (library-search-path args)) - (libs (library-files-linked args path)) - (args (append args (rpath-arguments libs)))) - (when %debug? - (format (current-error-port) - "ld-wrapper: library search path: ~s~%" path) - (format (current-error-port) - "ld-wrapper: libraries linked: ~s~%" libs) - (format (current-error-port) - "ld-wrapper: invoking `~a' with ~s~%" - %real-ld args) - (force-output (current-error-port))) - (apply execl %real-ld (basename %real-ld) args))) - -;;; ld-wrapper.scm ends here diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index 16780c58f6..2b68b87fb9 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -16,6 +16,7 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)) !# ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -35,7 +36,7 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)) (define-module (gnu build-support ld-wrapper) #:use-module (srfi srfi-1) #:use-module (ice-9 match) - #:autoload (ice-9 rdelim) (read-string) + #:autoload (ice-9 rdelim) (read-delimited) #:export (ld-wrapper)) ;;; Commentary: @@ -239,13 +240,27 @@ library outside of ~a: ~s~%" ;; Expand ARGS such that "response file" arguments, such as "@args.txt", are ;; expanded (info "(gcc) Overall Options"). (define (response-file-arguments file) + (define (tokenize port) + ;; Return a list of all strings found in PORT. Quote characters are + ;; removed, but whitespaces within quoted strings are preserved. + (let loop ((tokens '())) + (let* ((token+delimiter (read-delimited " '\"\n" port 'split)) + (token (car token+delimiter)) + (delim (cdr token+delimiter))) + (if (eof-object? token) + (reverse tokens) + (case delim + ((#\") (loop (cons (read-delimited "\"" port) tokens))) + ((#\') (loop (cons (read-delimited "'" port) tokens))) + (else (if (> (string-length token) 0) + (loop (cons token tokens)) + (loop tokens)))))))) + (when %debug? (format (current-error-port) "ld-wrapper: attempting to read arguments from '~a'~%" file)) - ;; FIXME: Options can contain whitespace if they are protected by single - ;; or double quotes; this is not implemented here. - (string-tokenize (call-with-input-file file read-string))) + (call-with-input-file file tokenize)) (define result (fold-right (lambda (arg result) diff --git a/gnu/packages/less.scm b/gnu/packages/less.scm index 76a4d42dfd..d449e0729e 100644 --- a/gnu/packages/less.scm +++ b/gnu/packages/less.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; ;;; This file is part of GNU Guix. @@ -20,6 +21,7 @@ (define-module (gnu packages less) #:use-module (guix licenses) + #:use-module (gnu packages) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages file) @@ -39,6 +41,7 @@ version ".tar.gz") (string-append "http://www.greenwoodsoftware.com/less/less-" version ".tar.gz"))) + (patches (search-patches "less-hurd-path-max.patch")) (sha256 (base32 "0ggyjl3yzn7c450zk1rixi9ls6asdhgqynhk34zsd0ckhmsm45pz")))) (build-system gnu-build-system) diff --git a/gnu/packages/libbsd.scm b/gnu/packages/libbsd.scm index a616de70bd..16a7e8fd89 100644 --- a/gnu/packages/libbsd.scm +++ b/gnu/packages/libbsd.scm @@ -25,15 +25,17 @@ (define-public libbsd (package (name "libbsd") - (version "0.9.1") + (version "0.10.0") (source (origin (method url-fetch) (uri (string-append "https://libbsd.freedesktop.org/releases/" "libbsd-" version ".tar.xz")) (sha256 (base32 - "1957w2wi7iqar978qlfsm220dwywnrh5m58nrnn9zmi74ds3bn2n")))) + "11x8q45jvjvf2dvgclds64mscyg10lva33qinf2hwgc84v3svf1l")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (synopsis "Utility functions from BSD systems") (description "This library provides useful functions commonly found on BSD systems, and lacking on others like GNU systems, thus making it easier to port diff --git a/gnu/packages/libdaemon.scm b/gnu/packages/libdaemon.scm index 81cf6e58ba..e47d66cfa7 100644 --- a/gnu/packages/libdaemon.scm +++ b/gnu/packages/libdaemon.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2020 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,6 +45,20 @@ "0d5qlq5ab95wh1xc87rqrh1vx6i8lddka1w3f1zcqvcqdxgyn8zx")) (file-name (string-append name "-" version ".tar.gz")))) (build-system gnu-build-system) + (arguments + (if (%current-target-system) + ;; The 'setpgrp' test cannot provide an answer when cross-compiling, + ;; so provide the right one for glibc. + `(#:configure-flags (list "ac_cv_func_setpgrp_void=yes" + + ;; TODO: Move this globally on the next + ;; rebuild cycle. + ;; Set a valid localstatedir for the + ;; benefit of the default + ;; 'daemon_pid_file_proc', used by the + ;; Hurd's console client. + "--localstatedir=/var")) + '())) ;; XXX: Stale URL, missing replacement. See <http://bugs.gnu.org/18639>. (home-page "http://0pointer.de/lennart/projects/libdaemon/") diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm index 3754a5c427..dab574a155 100644 --- a/gnu/packages/libevent.scm +++ b/gnu/packages/libevent.scm @@ -76,7 +76,7 @@ loop.") (define-public libev (package (name "libev") - (version "4.25") + (version "4.31") (source (origin (method url-fetch) (uri (string-append "http://dist.schmorp.de/libev/Attic/libev-" @@ -84,8 +84,10 @@ loop.") ".tar.gz")) (sha256 (base32 - "1295q0lkkbrlpd5dl5i48bh1rm8mjzh9y795jlvjz3bp4wf7wxbq")))) + "0nkfqv69wfyy2bpga4d53iqydycpik8jp8x6q70353hia8mmv1gd")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (home-page "http://software.schmorp.de/pkg/libev.html") (synopsis "Event loop loosely modelled after libevent") (description @@ -100,17 +102,18 @@ limited support for fork events.") (define-public libuv (package (name "libuv") - (version "1.30.1") + (version "1.35.0") (source (origin (method url-fetch) (uri (string-append "https://dist.libuv.org/dist/v" version "/libuv-v" version ".tar.gz")) (sha256 (base32 - "12s7ifwgbfxblhv46inqa8c2lsnl8cgmvd37y4a4248xhkx1d0s6")))) + "0126mfmaw3s92dsga60sydgwjmzwg9cd36n127pydmisah17v50f")))) (build-system gnu-build-system) (arguments - '(;; XXX: Some tests want /dev/tty, attempt to make connections, etc. + '(#:configure-flags '("--disable-static") + ;; XXX: Some tests want /dev/tty, attempt to make connections, etc. #:tests? #f)) (native-inputs `(("autoconf" ,autoconf-wrapper) ("automake" ,automake) @@ -130,20 +133,6 @@ resolution, asynchronous file system operations, and threading primitives.") ;; details. Documentation is CC-BY 4.0 as of 1.12.0; see 'LICENSE-docs'. (license (list expat cc-by4.0)))) -;; This newer version of LibUV is required by 'node'. Package it separately -;; to avoid massive rebuilds. -(define-public libuv/latest - (package/inherit - libuv - (version "1.34.2") - (source (origin - (method url-fetch) - (uri (string-append "https://dist.libuv.org/dist/v" version - "/libuv-v" version ".tar.gz")) - (sha256 - (base32 - "0inzk8qpw78im3fiazrc54qi1gcapbs8dhf0hk3kwpzg0i2kpnb5")))))) - (define-public perl-anyevent (package (name "perl-anyevent") @@ -181,14 +170,14 @@ not rely on XS.") (define-public perl-ev (package (name "perl-ev") - (version "4.25") + (version "4.31") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/authors/id/M/ML/MLEHMANN/EV-" version ".tar.gz")) (sha256 (base32 - "0slw68zxrkfribf6lhggdhpay3mdng0nqxlglkwrk19myblchr9f")) + "1jxlhnvrqim39977zwavjrcbdf9bifb46pwaxvm0s8klq121kjwb")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index b61dbc8657..b0098389c0 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm @@ -41,7 +41,7 @@ (define-public libffi (package (name "libffi") - (version "3.2.1") + (version "3.3") (source (origin (method url-fetch) (uri @@ -49,21 +49,12 @@ name "-" version ".tar.gz")) (sha256 (base32 - "0dya49bnhianl0r65m65xndz6ls2jn1xngyn72gd28ls3n7bnvnh")) - (patches (search-patches "libffi-3.2.1-complex-alpha.patch")))) + "0mi0cpf8aa40ljjmzxb7im6dbj45bb0kllcd09xgmp834y9agyvj")))) (build-system gnu-build-system) (arguments `(;; Prevent the build system from passing -march and -mtune to the ;; compiler. See "ax_cc_maxopt.m4" and "ax_gcc_archflag.m4". - #:configure-flags '("--enable-portable-binary" "--without-gcc-arch") - #:phases - (modify-phases %standard-phases - (add-after 'install 'post-install - (lambda* (#:key outputs #:allow-other-keys) - (define out (assoc-ref outputs "out")) - (symlink (string-append out "/lib/libffi-3.2.1/include") - (string-append out "/include")) - #t))))) + #:configure-flags '("--enable-portable-binary" "--without-gcc-arch"))) (outputs '("out" "debug")) (synopsis "Foreign function call interface library") (description @@ -85,14 +76,13 @@ conversions for values passed between the two languages.") (define-public python-cffi (package (name "python-cffi") - (version "1.11.5") + (version "1.13.2") (source (origin (method url-fetch) (uri (pypi-uri "cffi" version)) (sha256 - (base32 "1x3lrj928dcxx1k8k9gf3s4s3jwvzv8mc3kkyg1g7c3a1sc1f3z9")) - (patches (search-patches "python-cffi-x87-stack-clean.patch")))) + (base32 "0iikq5rn9a405n94c7s2j6kq3jv5qs9q4xyik8657b2py27ix6jr")))) (build-system python-build-system) (inputs `(("libffi" ,libffi))) @@ -125,7 +115,7 @@ conversions for values passed between the two languages.") "compiler_so='gcc',linker_exe='gcc'," "linker_so='gcc -shared')"))) (substitute* "testing/cffi0/test_ownlib.py" - (("'cc testownlib") "'gcc testownlib")) + (("\"cc testownlib") "\"gcc testownlib")) (invoke "py.test" "-v" "c/" "testing/") #t)) (add-before 'check 'patch-paths-of-dynamically-loaded-libraries @@ -151,14 +141,7 @@ conversions for values passed between the two languages.") (substitute* "c/test_c.py" (("find_and_load_library\\(['\"]{1}c['\"]{1}") (format #f "find_and_load_library('~a'" libc))) - #t))) - (add-before 'check 'disable-failing-test - ;; This is assumed to be a libffi issue: - ;; https://bitbucket.org/cffi/cffi/issues/312/tests-failed-with-armv8 - (lambda _ - (substitute* "testing/cffi0/test_ownlib.py" - (("ret.left") "ownlib.left")) - #t))))) + #t)))))) (home-page "https://cffi.readthedocs.io/") (synopsis "Foreign function interface for Python") (description "Foreign Function Interface for Python calling C code.") diff --git a/gnu/packages/libidn.scm b/gnu/packages/libidn.scm index ea9ce70dfb..8731ed3f83 100644 --- a/gnu/packages/libidn.scm +++ b/gnu/packages/libidn.scm @@ -59,14 +59,14 @@ Java libraries.") (define-public libidn2 (package (name "libidn2") - (version "2.2.0") + (version "2.3.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libidn/" name "-" version ".tar.lz")) (sha256 (base32 - "1a5cv79q6b719jv4fpwjl3r0mmx9qcpla98v9dk64cgxn8f8di10")))) + "14yw4w37ya6rcqa7h6p44x6711dwgq2j22xg6k79ybbf04sj88kb")))) (native-inputs `(("lzip" ,lzip))) (inputs diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index f9dc6099e1..a3a6ea5d1a 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -539,6 +539,17 @@ library primarily intended for language guessing.") (sha256 (base32 "1b1lvqh68rwij1yvmxy02hsmh7i74ma5767mk8mg5nx6chajshhf")))) (build-system gnu-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (add-before 'build 'adjust-for-ICU-65 + (lambda _ + ;; Fix build with ICU 65 and later. Taken from this + ;; upstream commit, remove for libfreehand > 0.1.2: + ;; https://gerrit.libreoffice.org/#/c/80224/ + (substitute* "src/lib/libfreehand_utils.cpp" + (("U16_NEXT.*" all) + (string-append all ";\n"))) + #t))))) (native-inputs `(("cppunit" ,cppunit) ("doxygen" ,doxygen) @@ -995,6 +1006,7 @@ converting QuarkXPress file format. It supports versions 3.1 to 4.1.") (string-append "https://download.documentfoundation.org/libreoffice/src/" (version-prefix version 3) "/libreoffice-" version ".tar.xz")) + (patches (search-patches "libreoffice-poppler-compat.patch")) (sha256 (base32 "06acm41q9nda8r30b13cn9zafsw1gszjdphh6lx90s09d2sf7f23")))) diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 5f64b33df9..3842f3fead 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com> ;;; ;;; This file is part of GNU Guix. @@ -360,14 +361,7 @@ I2C and SPI devices attached to the USB Hub.") (base32 "02vraf4j46bp746s0gz7vga2gv2dy3zd1v1bsy9x8algg9fpcb7n")))) (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'bootstrap 'configure-later - ;; Don't run ./configure during bootstrap. - (lambda _ - (setenv "NOCONFIGURE" "set") - #t))) - ;; Tests fail randomly when run in parallel because several of them write + `(;; Tests fail randomly when run in parallel because several of them write ;; and read to/from the same file--e.g., "4.plist" is accessed by ;; 'large.test' and 'largecmp.test'. #:parallel-tests? #f)) @@ -407,6 +401,25 @@ connections from and to iOS devices by connecting to a socket provided by a @code{usbmuxd} daemon.") (license license:lgpl2.1+))) +;; These patches are needed to build with Python 3.8. +(define %libimobiledevice-patches + (list (origin + (method url-fetch) + (uri (string-append "https://github.com/libimobiledevice/libimobiledevice" + "/commit/1ff3448d2e27f1bac8d2f0af8b8e952854860278.patch")) + (file-name "libimobiledevice-python-config.patch") + (sha256 + (base32 + "1mkwhp8vvhajij29jk3w4rkgcfh8d8waf908drh3076k70hb6i8y"))) + (origin + (method url-fetch) + (uri (string-append "https://github.com/libimobiledevice/libimobiledevice" + "/commit/eea4f1be9107c8ab621fd71460e47d0d38e55d71.patch")) + (file-name "libimobiledevice-python-3.8-compat.patch") + (sha256 + (base32 + "1zz8v7kgwyq5ck1qp03l29pcmljygnjwls9d6q28nv5pkwa6848w"))))) + (define-public libimobiledevice (package (name "libimobiledevice") @@ -415,17 +428,19 @@ connections from and to iOS devices by connecting to a socket provided by a (method url-fetch) (uri (string-append "https://www.libimobiledevice.org/downloads/" "libimobiledevice-" version ".tar.bz2")) + ;; Note: Remove the 'force-bootstrap' phase and the autoconf + ;; inputs below when removing these patches. + (patches %libimobiledevice-patches) (sha256 (base32 "0dqhy4qwj30mw8pwckvjmgnj1qqrh6p8c6jknmhvylshhzh0ssvq")))) (build-system gnu-build-system) (arguments - `(#:configure-flags - (list (string-append "PYTHON_LDFLAGS=-L" - (assoc-ref %build-inputs "python") - "/lib -lpython" - ,(version-major+minor (package-version python)) - "m")))) + `(#:phases (modify-phases %standard-phases + (add-before 'bootstrap 'force-bootstrap + (lambda _ + (delete-file "configure") + #t))))) (propagated-inputs `(("openssl" ,openssl-1.0) ("libplist" ,libplist) @@ -435,6 +450,10 @@ connections from and to iOS devices by connecting to a socket provided by a (native-inputs `(("pkg-config" ,pkg-config) ("python-cython" ,python-cython) + + ;; These are required because we patch and bootstrap the build system. + ("autoconf" ,autoconf) + ("automake" ,automake) ("libtool" ,libtool))) (home-page "https://www.libimobiledevice.org/") (synopsis "Protocol library and tools to communicate with Apple devices") diff --git a/gnu/packages/lighting.scm b/gnu/packages/lighting.scm index b91f5c8834..18110420de 100644 --- a/gnu/packages/lighting.scm +++ b/gnu/packages/lighting.scm @@ -57,7 +57,7 @@ `(("libftdi" ,libftdi) ("libmicrohttpd" ,libmicrohttpd) ("libusb" ,libusb) - ("libuuid" ,util-linux) + ("libuuid" ,util-linux "lib") ("zlib" ,zlib))) (propagated-inputs ;; Ola 0.10.5 only supports protobuf 2.x, and building it with 3.x breaks. diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm index e7d3cf7aaf..f96fff2fc4 100644 --- a/gnu/packages/linphone.scm +++ b/gnu/packages/linphone.scm @@ -37,6 +37,7 @@ #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages qt) #:use-module (gnu packages java) #:use-module (gnu packages sqlite) #:use-module (gnu packages telephony) @@ -49,6 +50,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system cmake) + #:use-module (guix build-system qt) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu)) @@ -68,12 +70,11 @@ (arguments '(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=NO"))) ; Not required + (list "-DENABLE_STATIC=NO"))) ; Not required (synopsis "Belledonne Communications Unit Testing Framework") - (description "BCUnit is a fork of the defunct project CUnit, -with several fixes and patches applied. It is an unit testing -framework for writing, administering, and running unit tests in C.") + (description "BCUnit is a fork of the defunct project CUnit, with several +fixes and patches applied. It is an unit testing framework for writing, +administering, and running unit tests in C.") (home-page "https://gitlab.linphone.org/BC/public/bcunit") (license license:lgpl2.0+))) @@ -93,8 +94,7 @@ framework for writing, administering, and running unit tests in C.") (arguments '(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=OFF"))) ; Not required + (list "-DENABLE_STATIC=OFF"))) ; Not required (inputs `(("bcunit" ,bcunit) ("mbedtls" ,mbedtls-apache))) @@ -120,14 +120,14 @@ Communications software like belle-sip, mediastreamer2 and linphone.") (arguments `(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=OFF"))) ; Not required + (list "-DENABLE_STATIC=OFF"))) ; Not required (inputs `(("bctoolbox" ,bctoolbox))) (synopsis "Belledonne Communications Language Recognition Library") - (description "Belr is Belledonne Communications' language recognition library, -written in C++11. It parses text inputs formatted according to a language -defined by an ABNF grammar, such as the protocols standardized at IETF.") + (description "Belr is Belledonne Communications' language recognition +library, written in C++11. It parses text inputs formatted according to a +language defined by an ABNF grammar, such as the protocols standardized at +IETF.") (home-page "https://gitlab.linphone.org/BC/public/belr") (license license:gpl3+))) @@ -147,13 +147,13 @@ defined by an ABNF grammar, such as the protocols standardized at IETF.") (arguments `(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=OFF"))) ; Not required + (list "-DENABLE_STATIC=OFF"))) ; Not required (inputs `(("bctoolbox" ,bctoolbox) ("belr" ,belr))) (synopsis "Belledonne Communications VCard Library") - (description "Belcard is a C++ library to manipulate VCard standard format.") + (description "Belcard is a C++ library to manipulate VCard standard +format.") (home-page "https://gitlab.linphone.org/BC/public/belcard") (license license:gpl3+))) @@ -176,16 +176,16 @@ defined by an ABNF grammar, such as the protocols standardized at IETF.") (list "-DENABLE_STATIC=NO"))) ; Not required (synopsis "Belledonne Communications Media Container") - (description "BcMatroska is a free and open standard multi-media -container format. It can hold an unlimited number of video, audio, -picture, or subtitle tracks in one file. ") + (description "BcMatroska is a free and open standard multi-media container +format. It can hold an unlimited number of video, audio, picture, or subtitle +tracks in one file. ") (home-page "https://gitlab.linphone.org/BC/public/bcmatroska2") (license (list - ;; That license applies for Core C and LibEBML2. + ;; For Core C and LibEBML2. ;; https://www.matroska.org/node/47 license:bsd-4 - ;; That license applies for LibMatroska2. + ;; For LibMatroska2. ;; https://www.matroska.org/node/47 license:lgpl2.1+)))) @@ -205,8 +205,7 @@ picture, or subtitle tracks in one file. ") (arguments `(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=NO"))) ; Not required + (list "-DENABLE_STATIC=NO"))) ; Not required (synopsis "Belledonne Communications G729 Codec") (description "BcG729 is an implementation of both encoder and decoder of the ITU G729 speech codec. The library written in C 99 is fully portable and @@ -232,8 +231,7 @@ such as conferencing.") (arguments `(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=NO"))) ; Not required + (list "-DENABLE_STATIC=NO"))) ; Not required (native-inputs `(("dot" ,graphviz) ("doxygen" ,doxygen))) @@ -261,16 +259,15 @@ implements the RFC 3550 standard.") (arguments `(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=NO"))) + (list "-DENABLE_STATIC=NO"))) ; Not required (inputs `(("bctoolbox" ,bctoolbox) ("sqlite3" ,sqlite) ("xml2" ,libxml2))) (synopsis "Belledonne Communications ZRTP Library") - (description "BZRTP is an implementation of ZRTP keys exchange -protocol, written in C. It is fully portable and can be executed on many -platforms including both ARM and x86.") + (description "BZRTP is an implementation of ZRTP keys exchange protocol, +written in C. It is fully portable and can be executed on many platforms +including both ARM and x86.") (home-page "https://gitlab.linphone.org/BC/public/bzrtp") (license license:gpl2+))) @@ -290,16 +287,15 @@ platforms including both ARM and x86.") (arguments `(#:tests? #f ; Requires network access #:configure-flags - (list - "-DENABLE_STATIC=NO") + (list "-DENABLE_STATIC=NO") ; Not required #:phases (modify-phases %standard-phases (add-after 'unpack 'patch (lambda _ (substitute* "src/CMakeLists.txt" - ;; ANTLR would use multithreaded DFA generation - ;; otherwise--which would not be reproducible. - (("-Xmultithreaded ") "")) + ;; ANTLR would use multithreaded DFA generation otherwise, + ;; which would not be reproducible. + (("-Xmultithreaded ") "")) #t))))) (inputs `(("antlr3" ,antlr3-3.3) @@ -332,12 +328,11 @@ API. It also comprises a simple HTTP/HTTPS client implementation.") (arguments `(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=NO" ; Not required - "-DENABLE_STRICT=NO" ; Would otherwise treat warnings as err - "-DENABLE_BV16=NO" ; Not available - "-DCMAKE_C_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\"" - "-DCMAKE_CXX_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\"") + (list "-DENABLE_STATIC=NO" ; Not required + "-DENABLE_STRICT=NO" ; Would otherwise treat warnings as err + "-DENABLE_BV16=NO" ; Not available + "-DCMAKE_C_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\"" + "-DCMAKE_CXX_FLAGS=-DMS2_GIT_VERSION=\\\"unknown\\\"") #:phases (modify-phases %standard-phases (add-after 'install 'separate-outputs @@ -394,13 +389,12 @@ API. It also comprises a simple HTTP/HTTPS client implementation.") ("vpx" ,libvpx) ("x11" ,libx11) ("xv" ,libxv) - ("zrtp", bzrtp))) + ("zrtp" ,bzrtp))) (synopsis "Belledonne Communications Streaming Engine") - (description "Mediastreamer2 is a powerful and lightweight -streaming engine for telephony applications. This media processing -and streaming toolkit is responsible for receiving and sending all -multimedia streams in Linphone, including media capture, encoding and -decoding, and rendering.") + (description "Mediastreamer2 is a powerful and lightweight streaming engine +for telephony applications. This media processing and streaming toolkit is +responsible for receiving and sending all multimedia streams in Linphone, +including media capture, encoding and decoding, and rendering.") (home-page "https://gitlab.linphone.org/BC/public/mediastreamer2") (license license:gpl2+))) @@ -421,15 +415,15 @@ decoding, and rendering.") (arguments `(#:tests? #f ; No test target #:configure-flags - (list - (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR=" - (string-append (assoc-ref %build-inputs "gtk2") - "/lib/gtk-2.0/include")) - (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR=" - (string-append (assoc-ref %build-inputs "glib") - "/lib/glib-2.0/include")) - "-DENABLE_STATIC=NO" ; Not required - "-DENABLE_GTK_UI=YES") ; For Legacy UI + (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR=" + (string-append (assoc-ref %build-inputs "gtk2") + "/lib/gtk-2.0/include")) + (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR=" + (string-append (assoc-ref %build-inputs "glib") + "/lib/glib-2.0/include")) + "-DENABLE_STATIC=NO" ; Not required + "-DENABLE_STRICT=NO" + "-DENABLE_GTK_UI=YES") ; for legacy UI #:imported-modules (,@%cmake-build-system-modules (guix build glib-or-gtk-build-system)) #:modules ((guix build cmake-build-system) @@ -500,6 +494,90 @@ and video calls or instant messaging capabilities to an application.") (home-page "https://gitlab.linphone.org/BC/public/liblinphone") (license license:gpl2+))) +(define-public linphoneqt + (package + (name "linphoneqt") + (version "4.1.1") + (source + (origin + (method url-fetch) + (uri + (string-append "https://www.linphone.org/releases/sources/" name + "/" name "-" version ".tar.gz")) + (sha256 + (base32 "1g2zrr9li0g1hgs6vys06vr98h5dx36z22hx7a6ry231536c002a")) + (patches (search-patches "linphoneqt-tabbutton.patch")))) + (build-system qt-build-system) + (arguments + `(#:tests? #f ; No test target + #:phases + (modify-phases %standard-phases + (add-after 'set-paths 'set-qt-rcc-source-date-override + (lambda _ + ;; This fixes a reproducibility problem where the Qt Resource + ;; Compiler (RCC) includes timestamp of its source files + ;; (see: https://reproducible-builds.org/docs/ + ;; deterministic-build-systems/#cmake-notes). + (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") + #t)) + (add-after 'unpack 'fix-cmake-error + (lambda _ + ;; This is fixed in commit efed2fd8 of the master branch. + (substitute* "CMakeLists.txt" + (("js)\\$\"") + "js$\"")) + #t)) + (add-after 'unpack 'set-version-string + (lambda _ + (substitute* "src/app/AppController.cpp" + (("LINPHONE_QT_GIT_VERSION") + (format #f "~s" ,version))) + #t)) + (add-after 'install 'extend-shared-resources + ;; Not using the FHS exposes an issue where the client refers to + ;; its own "share" directory, which lacks sound files installed by + ;; liblinphone. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((liblinphone (assoc-ref inputs "linphone")) + (out (assoc-ref outputs "out"))) + (symlink (string-append liblinphone "/share/sounds") + (string-append out "/share/sounds")) + #t)))))) + (native-inputs + `(("qttools" ,qttools))) + (inputs + `(("bctoolbox" ,bctoolbox) + ("belcard" ,belcard) + ("bellesip" ,belle-sip) + ("linphone" ,liblinphone) + ("mediastreamer2" ,mediastreamer2) + ("qtbase" ,qtbase) + ("qtdeclarative" ,qtdeclarative) + ("qtgraphicaleffects" ,qtgraphicaleffects) + ("qtquickcontrols" ,qtquickcontrols) + ("qtquickcontrols2" ,qtquickcontrols2) + ("qtsvg" ,qtsvg))) + (synopsis "Desktop client for the Linphone SIP softphone") + (description "Linphone is a SIP softphone for voice and video over IP calling +(VoIP) and instant messaging. Amongst its features are: +@itemize +@item High Definition (HD) audio and video calls +@item Multiple call management (pause and resume) +@item Call transfer +@item Audio conferencing (merge calls into a conference call) +@item Call recording and replay (audio only) +@item Instant Messaging with message delivery status (IMDN) +@item Picture and file sharing +@item Echo cancellation +@item Secure user authentication using TLS client certificates +@item SRTP, zRTP and SRTP-DTLS voice and video encryption +@item Telephone tone (DTMF) support using SIP INFO or RFC 4733 +@item Audio codecs: opus, speex, g711, g729, gsm, iLBC, g722, SILK, etc. +@item Video codecs: VP8, H.264 and H.265 with resolutions up to 1080P, MPEG4 +@end itemize") + (home-page "https://gitlab.linphone.org/BC/public/linphone-desktop") + (license license:gpl2+))) + (define-public msopenh264 (package (name "msopenh264") @@ -518,17 +596,18 @@ and video calls or instant messaging capabilities to an application.") (origin (method url-fetch) (uri - (string-append "https://gitlab.linphone.org/BC/public/msopenh264/commit/" - "493d147d28c9a0f788ba4e50b47a1ce7b18bf326.diff")) + (string-append "https://gitlab.linphone.org/BC/public/msopenh264/" + "commit/493d147d28c9a0f788ba4e50b47a1ce7b18bf326" + ".diff")) (file-name "msopenh264-openh264.patch") (sha256 - (base32 "0mmd7nz5n9ian4rcwn200nldmy5j0dpdrna7r32rqnaw82bx3kdb"))))))) + (base32 + "0mmd7nz5n9ian4rcwn200nldmy5j0dpdrna7r32rqnaw82bx3kdb"))))))) (build-system cmake-build-system) (arguments `(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=NO"))) ; Not required + (list "-DENABLE_STATIC=NO"))) ; Not required (inputs `(("mediastreamer2" ,mediastreamer2) ("openh264" ,openh264) @@ -555,14 +634,13 @@ mediastreamer2 based on the openh264 library.") (arguments `(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=NO"))) ; Not required + (list "-DENABLE_STATIC=NO"))) ; Not required (inputs `(("mediastreamer2" ,mediastreamer2) ("ortp" ,ortp))) (synopsis "Media Streamer SILK Codec") - (description "MSSILK is a plugin of MediaStreamer, adding support for -AMR codec. It is based on the Skype's SILK implementation.") + (description "MSSILK is a plugin of MediaStreamer, adding support for AMR +codec. It is based on the Skype's SILK implementation.") (home-page "https://gitlab.linphone.org/BC/public/mssilk") (license license:gpl2+))) @@ -583,7 +661,7 @@ AMR codec. It is based on the Skype's SILK implementation.") `(#:tests? #f ; No test target #:configure-flags (list - "-DENABLE_STATIC=NO"))) + "-DENABLE_STATIC=NO"))) ; Not required (inputs `(("bctoolbox" ,bctoolbox) ("mediastreamer2" ,mediastreamer2) @@ -610,16 +688,15 @@ WebRTC codec. It includes features from WebRTC, such as, iSAC and AECM.") (arguments `(#:tests? #f ; No test target #:configure-flags - (list - "-DENABLE_STATIC=NO" ; Not required - "-DENABLE_WIDEBAND=YES"))) + (list "-DENABLE_STATIC=NO" ; Not required + "-DENABLE_WIDEBAND=YES"))) (inputs `(("mediastreamer2" ,mediastreamer2) ("opencoreamr" ,opencore-amr) ("ortp" ,ortp) ("voamrwbenc" ,vo-amrwbenc))) (synopsis "Media Streamer AMR Codec") - (description "MSAMR is a plugin of MediaStreamer, adding support for -AMR codec. It is based on the opencore-amr implementation.") + (description "MSAMR is a plugin of MediaStreamer, adding support for AMR +codec. It is based on the opencore-amr implementation.") (home-page "https://gitlab.linphone.org/BC/public/msamr") (license license:gpl3+))) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 40323a85d6..ae0f41ceed 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -22,7 +22,7 @@ ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name> ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.com> ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com> -;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com> ;;; Copyright © 2017 nee <nee-git@hidamari.blue> @@ -42,6 +42,7 @@ ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,7 +64,6 @@ #:use-module (gnu packages acl) #:use-module (gnu packages admin) #:use-module (gnu packages algebra) - #:use-module (gnu packages attr) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) @@ -579,11 +579,11 @@ corresponding UPSTREAM-SOURCE (an origin), using the given DEBLOB-SCRIPTS." ;; The following package is used in the early bootstrap, and thus must be kept ;; stable and with minimal build requirements. -(define-public linux-libre-headers-4.19.56 - (make-linux-libre-headers "4.19.56" - "1zqiic55viy065lhnkmhn33sz3bbbr2ykbm5f92yzd8lpc9zl7yx")) +(define-public linux-libre-headers-5.4.20 + (make-linux-libre-headers "5.4.20" + "1qxhf6dmcwjblzx8fgn6vr10p38xw10iwh6d1y1v1mxb25y30b47")) -(define-public linux-libre-headers linux-libre-headers-4.19.56) +(define-public linux-libre-headers linux-libre-headers-5.4.20) ;;; @@ -711,27 +711,6 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." #t)) (replace 'configure (lambda* (#:key inputs native-inputs target #:allow-other-keys) - ;; On AArch64 (at least), we need to remove glibc headers from - ;; CPATH (they are still available as "system headers"), so that - ;; the kernel can override uint64_t. See - ;; <https://bugs.gnu.org/37593>. This is also true when - ;; cross-compiling, except in that case, cross-libc must be - ;; removed from CROSS_CPATH. - (let ((var ,(if (%current-target-system) - "CROSS_CPATH" - "CPATH")) - (libc ,(if (%current-target-system) - "cross-libc" - "libc"))) - (setenv var - (string-join - (remove - (cut string-prefix? (assoc-ref inputs libc) <>) - (string-split (getenv var) #\:)) - ":")) - (format #t "environment variable `~a' changed to `~a'~%" - var (getenv var))) - ;; Avoid introducing timestamps (setenv "KCONFIG_NOTIMESTAMP" "1") (setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH")) @@ -1260,7 +1239,7 @@ providing the system administrator with some help in common tasks.") (define-public util-linux (package (name "util-linux") - (version "2.34") + (version "2.35.1") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/linux/utils/" @@ -1268,7 +1247,7 @@ providing the system administrator with some help in common tasks.") "util-linux-" version ".tar.xz")) (sha256 (base32 - "1db2kydkwjmvgd1glkcba3adhidxw0f1x735dcjdpdjjf869sgvl")) + "1yfpy6bkab4jw61mpx48gfy24yrqp4a7arvpis8csrkk53fkxpnr")) (patches (search-patches "util-linux-tests.patch")) (modules '((guix build utils))) (snippet @@ -1281,19 +1260,33 @@ providing the system administrator with some help in common tasks.") (("build_kill=yes") "build_kill=no")) #t)))) (build-system gnu-build-system) - (outputs '("out" - "static")) ;>2 MiB of static .a libraries + (outputs '("out" ;6.4 MiB executables and documentation + "lib" ;8.8 MiB shared libraries, headers and locales + "static")) ;2.9 MiB static .a libraries (arguments `(#:configure-flags (list "--disable-use-tty-group" "--enable-fs-paths-default=/run/current-system/profile/sbin" ;; Don't try to chown root:root mount and umount "--disable-makeinstall-chown" + "--localstatedir=/var" + (string-append "--localedir=" + (assoc-ref %outputs "lib") + "/share/locale") ;; Install completions where our ;; bash-completion package expects them. (string-append "--with-bashcompletiondir=" (assoc-ref %outputs "out") "/etc/bash_completion.d")) #:phases (modify-phases %standard-phases + (add-before 'configure 'patch-build-scripts + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "configure" + ;; The build system assumes that we want to install + ;; libraries below $exec_prefix when $libdir does not + ;; match any of the "usual" locations. Fix that. + (("usrlib_execdir='\\$\\{exec_prefix\\}'\\$libdir") + "usrlib_execdir=$libdir")) + #t)) (add-before 'build 'set-umount-file-name (lambda* (#:key outputs #:allow-other-keys) ;; Tell 'eject' the right file name of 'umount'. @@ -1310,13 +1303,34 @@ providing the system administrator with some help in common tasks.") (substitute* "tests/ts/misc/mcookie" (("/etc/services") (string-append net "/etc/services"))) + + ;; The C.UTF-8 locale does not exist in our libc. + (substitute* "tests/ts/column/invalid-multibyte" + (("C\\.UTF-8") "en_US.utf8")) #t))) + ;; TODO: Remove the conditional on the next rebuild cycle. + ,@(if (string-prefix? "arm" (%current-system)) + '((add-before 'check 'disable-setarch-test + (lambda _ + ;; The setarch tests are unreliable in QEMU's + ;; user-mode emulation, which is our primary + ;; method of building ARMv7 packages. + ;; <https://github.com/karelzak/util-linux/issues/601> + (substitute* "tests/ts/misc/setarch" + (("ts_init_subtest.*" all) + (string-append + all "\n" + "ts_skip \"setarch tests are unreliable under QEMU\""))) + #t))) + '()) (add-after 'install 'move-static-libraries (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) + (let ((lib (assoc-ref outputs "lib")) (static (assoc-ref outputs "static"))) + + ;; Move static libraries to the "static" output. (mkdir-p (string-append static "/lib")) - (with-directory-excursion out + (with-directory-excursion lib (for-each (lambda (file) (rename-file file (string-append static "/" @@ -1329,7 +1343,16 @@ providing the system administrator with some help in common tasks.") (substitute* (find-files "lib" "\\.la$") (("old_library=.*") "old_library=''\n"))) - #t)))))) + #t))) + (add-after 'install 'adjust-pkg-config-files + (lambda* (#:key outputs #:allow-other-keys) + (let ((lib (assoc-ref outputs "lib"))) + ;; Drop the unused "prefix=" and "exec_prefix=" variables from + ;; the pkg-config files to avoid a cyclic reference on "out". + (substitute* (find-files (string-append lib "/lib/pkgconfig") + "\\.pc$") + (("^(exec_)?prefix=.*") ""))) + #t))))) (inputs `(("zlib" ,zlib) ("ncurses" ,ncurses) @@ -1453,10 +1476,16 @@ parameters.") "1br0g93ysqhlv13i1k4lfbimsgxnpy5rgs4lxfc9rkzdbpbaqplj")))) (build-system gnu-build-system) (arguments - '(#:modules ((guix build utils) + `(#:modules ((guix build utils) (guix build gnu-build-system) (srfi srfi-1) (srfi srfi-26)) + ,@(if (%current-target-system) + '(#:configure-flags + (list + "ac_cv_func_malloc_0_nonnull=yes" + "ac_cv_func_realloc_0_nonnull=yes")) + '()) #:phases (modify-phases %standard-phases (add-after @@ -1546,7 +1575,7 @@ slabtop, and skill.") (base32 "0mj2yizwygs7xww8jfy5mxjn8ww4pvc0b1hg1p2vsnirailsx9zz")))) (build-system gnu-build-system) - (inputs `(("util-linux" ,util-linux))) + (inputs `(("util-linux" ,util-linux "lib"))) (native-inputs `(("pkg-config" ,pkg-config) ("texinfo" ,texinfo) ;for the libext2fs Info manual @@ -1830,12 +1859,13 @@ MIDI functionality to the Linux-based operating system.") (("\\$\\(MKDIR_P\\) .*ASOUND_STATE_DIR.*") "true\n")) #t))))) + (native-inputs + `(("gettext" ,gettext-minimal))) (inputs `(("libsamplerate" ,libsamplerate) ("ncurses" ,ncurses) ("alsa-lib" ,alsa-lib) - ("xmlto" ,xmlto) - ("gettext" ,gettext-minimal))) + ("xmlto" ,xmlto))) (home-page "http://www.alsa-project.org/") (synopsis "Utilities for the Advanced Linux Sound Architecture (ALSA)") (description @@ -2122,6 +2152,7 @@ inadequately in modern network environments, and both should be deprecated.") (string-append "mandir=/share/man"))))) (native-inputs `(("gettext" ,gettext-minimal) ("unzip" ,unzip))) + (supported-systems (delete "i586-gnu" %supported-systems)) (synopsis "Tools for controlling the network subsystem in Linux") (description "This package includes the important tools for controlling the network @@ -2134,7 +2165,7 @@ configuration (iptunnel, ipmaddr).") (define-public libcap (package (name "libcap") - (version "2.27") + (version "2.31") (source (origin (method url-fetch) (uri (string-append @@ -2142,7 +2173,7 @@ configuration (iptunnel, ipmaddr).") "libcap2/libcap-" version ".tar.xz")) (sha256 (base32 - "0sj8kidl7qgf2qwxcbw1vadnlb30y4zvjzxswsmfdghq04npkhfs")))) + "0ikwm0kngrqa4ci80lqnrkk17kg09q7dxrz28y0gm5qw3vj8s266")))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -2154,13 +2185,13 @@ configuration (iptunnel, ipmaddr).") (string-append "LDFLAGS := -Wl,-rpath=" %output "/lib"))) #t))) - #:tests? #f ; no 'check' target + #:test-target "test" #:make-flags (list "lib=lib" (string-append "prefix=" (assoc-ref %outputs "out")) "RAISE_SETFCAP=no"))) (native-inputs `(("perl" ,perl))) - (inputs `(("attr" ,attr))) + (supported-systems (delete "i586-gnu" %supported-systems)) (home-page "https://sites.google.com/site/fullycapable/") (synopsis "Library for working with POSIX capabilities") (description @@ -2170,6 +2201,21 @@ Linux-based operating systems.") ;; License is BSD-3 or GPLv2, at the user's choice. (license license:gpl2))) +;; libcap 2.31 causes problems for 'fakeroot', so provide this newer variant. +;; To be merged with libcap on the next rebuild cycle. +(define-public libcap/next + (package + (inherit libcap) + (version "2.34") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://kernel.org/linux/libs/security/linux-privs/" + "libcap2/libcap-" version ".tar.xz")) + (sha256 + (base32 + "048n1gy2p48vl9hkrr9wymfxxcpwj2aslz2bv79nhl4m2lhd9kdf")))))) + (define-public bridge-utils (package (name "bridge-utils") @@ -2243,35 +2289,18 @@ transparently through a bridge.") "/libnl-doc-" version ".tar.gz")) (sha256 (base32 "19p5y8q3cm5wqvamqc4s5syxnnkvzxy3gw8ivxk6fv9ybn8jm35h")))))) - (inputs - `(("python-2" ,python-2) - ("python-3" ,python-3))) - (outputs '("out" "doc" "python2" "python3")) + (outputs `("out" "doc")) (arguments - `(#:modules ((guix build gnu-build-system) - (guix build utils) - (srfi srfi-1)) - #:phases + `(#:phases (modify-phases %standard-phases - (add-after 'install 'install-python - (lambda* (#:key outputs #:allow-other-keys) - (define (python-inst python) - (invoke python "setup.py" "build") - (invoke python "setup.py" "install" - (string-append "--prefix=" - (assoc-ref %outputs python))) - (invoke python "setup.py" "clean")) - (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib" - (assoc-ref %outputs "out"))) - (with-directory-excursion "./python" - (for-each python-inst '("python2" "python3"))) - #t)) (add-after 'install 'install-doc - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs outputs #:allow-other-keys) (let ((dest (string-append (assoc-ref outputs "doc") "/share/doc/libnl"))) (mkdir-p dest) - (invoke "tar" "xf" (assoc-ref inputs "libnl3-doc") + (invoke "tar" "xf" (assoc-ref + (or native-inputs inputs) + "libnl3-doc") "--strip-components=1" "-C" dest))))))) (home-page "https://www.infradead.org/~tgr/libnl/") (synopsis "NetLink protocol library suite") @@ -2286,6 +2315,43 @@ configuration and monitoring interfaces.") ;; 'nl-addr-add.c'), so the result is GPLv2-only. (license license:gpl2))) +;; libnl python extensions used to be outputs of libnl. However, as +;; cross-compiling python extensions is currently broken, create separate +;; packages for libnl python extensions. +(define (libnl-python-package python) + (let ((name (string-append "libnl-" python))) + (package + (inherit libnl) + (name name) + (inputs `(,@(cond + ((string=? python "python2") + `(("python-2" ,python-2))) + ((string=? python "python3") + `(("python-3" ,python-3)))))) + (propagated-inputs `(("libnl" ,libnl))) + (outputs '("out")) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1)) + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (define (python-inst python) + (invoke python "setup.py" "build") + (invoke python "setup.py" "install" + (string-append "--prefix=" + (assoc-ref %outputs "out"))) + (invoke python "setup.py" "clean")) + (setenv "LDFLAGS" (format #f "-Wl,-rpath=~a/lib" + (assoc-ref inputs "libnl"))) + (with-directory-excursion "./python" (python-inst ,python)) + #t)))))))) + +(define-public libnl-python2 (libnl-python-package "python2")) +(define-public libnl-python3 (libnl-python-package "python3")) + (define-public iw (package (name "iw") @@ -2472,6 +2538,7 @@ processes currently causing I/O.") (("-DFUSERMOUNT_DIR=[[:graph:]]+") "-DFUSERMOUNT_DIR=\\\"/var/empty\\\"")) #t))))) + (supported-systems (delete "i586-gnu" %supported-systems)) (home-page "https://github.com/libfuse/libfuse") (synopsis "Support file systems implemented in user space") (description @@ -2854,6 +2921,7 @@ to use Linux' inotify mechanism, which allows file accesses to be monitored.") '("insmod" "rmmod" "lsmod" "modprobe" "modinfo" "depmod")) #t)))))) + (supported-systems (delete "i586-gnu" %supported-systems)) (home-page "https://www.kernel.org/") (synopsis "Kernel module tools") (description "Kmod is a set of tools to handle common tasks with Linux @@ -2925,7 +2993,7 @@ to the in-kernel OOM killer.") (patches (search-patches "eudev-rules-directory.patch")))) (build-system gnu-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases (add-after 'unpack 'make-source-writable (lambda _ @@ -2934,12 +3002,23 @@ to the in-kernel OOM killer.") (for-each make-file-writable (find-files ".")) #t)) (add-before 'bootstrap 'patch-file-names - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs #:allow-other-keys) (substitute* "man/make.sh" (("/usr/bin/xsltproc") - (string-append (assoc-ref inputs "xsltproc") + (string-append (assoc-ref + (or native-inputs inputs) "xsltproc") "/bin/xsltproc"))) #t)) + (add-before 'configure 'patch-bindir-in-btrfs-rules + (lambda* (#:key outputs #:allow-other-keys) + ;; The "@bindir@" substitution incorrectly expands to a literal + ;; "${exec_prefix}" (see <https://bugs.gnu.org/39926>). Work + ;; around it. + (let ((out (assoc-ref outputs "out"))) + (substitute* "rules/64-btrfs.rules.in" + (("@bindir@") + (string-append out "/bin"))) + #t))) (add-after 'install 'move-static-library (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -2959,9 +3038,14 @@ to the in-kernel OOM killer.") (lambda* (#:key outputs #:allow-other-keys) ;; Build OUT/etc/udev/hwdb.bin. This allows 'lsusb' and ;; similar tools to display product names. + ;; + ;; XXX: This can't be done when cross-compiling. Find another way + ;; to generate hwdb.bin for cross-built systems. (let ((out (assoc-ref outputs "out"))) - (invoke (string-append out "/bin/udevadm") - "hwdb" "--update"))))) + ,@(if (%current-target-system) + '(#t) + '((invoke (string-append out "/bin/udevadm") + "hwdb" "--update"))))))) #:configure-flags (list "--enable-manpages"))) (native-inputs `(("autoconf" ,autoconf) @@ -2981,7 +3065,7 @@ to the in-kernel OOM killer.") ;; When linked against libblkid, eudev can populate /dev/disk/by-label ;; and similar; it also installs the '60-persistent-storage.rules' file, ;; which contains the rules to do that. - `(("util-linux" ,util-linux) ;for blkid + `(("util-linux" ,util-linux "lib") ;for blkid ("kmod" ,kmod))) (outputs '("out" "static")) (home-page "https://wiki.gentoo.org/wiki/Project:Eudev") @@ -2991,26 +3075,6 @@ device nodes from /dev/, handles hotplug events and loads drivers at boot time.") (license license:gpl2+))) -;; TODO: Merge with eudev on the next rebuild cycle. -(define-public eudev/btrfs-fix - (package/inherit - eudev - (version (string-append (package-version eudev) "-1")) - (arguments - (substitute-keyword-arguments (package-arguments eudev) - ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (add-before 'configure 'patch-bindir-in-btrfs-rules - (lambda* (#:key outputs #:allow-other-keys) - ;; The "@bindir@" substitution incorrectly expands to a literal - ;; "${exec_prefix}" (see <https://bugs.gnu.org/39926>). Work - ;; around it. - (let ((out (assoc-ref outputs "out"))) - (substitute* "rules/64-btrfs.rules.in" - (("@bindir@") - (string-append out "/bin"))) - #t))))))))) - (define-public python-evdev (package (name "python-evdev") @@ -3082,7 +3146,7 @@ devices that can inject events directly into the input subsystem.") `(("libaio" ,libaio) ("udev" ,eudev))) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases (add-after 'configure 'set-makefile-shell (lambda _ @@ -3109,10 +3173,16 @@ devices that can inject events directly into the input subsystem.") (assoc-ref %outputs "out") "/lib,-rpath=" (assoc-ref %outputs "out") - "/lib/device-mapper")) + "/lib/device-mapper") + ;; This is needed when cross-compiling. + ,@(if (%current-target-system) + '("ac_cv_func_malloc_0_nonnull=yes" + "ac_cv_func_realloc_0_nonnull=yes") + '())) ;; The tests use 'mknod', which requires root access. #:tests? #f)) + (supported-systems (delete "i586-gnu" %supported-systems)) (home-page "https://sourceware.org/lvm2/") (synopsis "Logical volume management for Linux") (description @@ -3223,13 +3293,23 @@ interface.") (patches (search-patches "crda-optional-gcrypt.patch")))) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases + `(#:phases (modify-phases %standard-phases (delete 'configure) (add-after 'unpack 'gzip-determinism (lambda _ (substitute* "Makefile" (("gzip") "gzip --no-name")) #t)) + ,@(if (%current-target-system) + '((add-after + 'unpack 'fix-pkg-config + (lambda* (#:key target #:allow-other-keys) + (substitute* + "Makefile" + (("pkg-config") + (string-append target "-pkg-config"))) + #t))) + '()) (add-before 'build 'no-werror-no-ldconfig (lambda _ @@ -3239,37 +3319,44 @@ interface.") #t)) (add-before 'build 'set-regulator-db-file-name - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs #:allow-other-keys) ;; Tell CRDA where to find our database. - (let ((regdb (assoc-ref inputs "wireless-regdb"))) + (let ((regdb (assoc-ref (or native-inputs inputs) + "wireless-regdb"))) (substitute* "crda.c" (("\"/lib/crda/regulatory.bin\"") (string-append "\"" regdb "/lib/crda/regulatory.bin\""))) #t)))) #:test-target "verify" - #:make-flags (let ((out (assoc-ref %outputs "out")) - (regdb (assoc-ref %build-inputs "wireless-regdb"))) - (list "CC=gcc" "V=1" - - ;; Disable signature-checking on 'regulatory.bin'. - ;; The reason is that this simplifies maintenance - ;; on our side (no need to manage a distro key - ;; pair), and we can guarantee integrity of - ;; 'regulatory.bin' by other means anyway, such as - ;; 'guix gc --verify'. See - ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb> - ;; for a discssion. - "USE_OPENSSL=0" - - (string-append "PREFIX=" out) - (string-append "SBINDIR=" out "/sbin/") - (string-append "UDEV_RULE_DIR=" - out "/lib/udev/rules.d") - (string-append "LDFLAGS=-Wl,-rpath=" - out "/lib -L.") - (string-append "REG_BIN=" regdb - "/lib/crda/regulatory.bin"))))) + #:make-flags (let ((out (assoc-ref %outputs "out")) + (regdb (assoc-ref %build-inputs "wireless-regdb")) + (target ,(%current-target-system))) + (list + (string-append + "CC=" (if target + (string-append target "-gcc") "gcc")) + "V=1" + + ;; Disable signature-checking on 'regulatory.bin'. + ;; The reason is that this simplifies maintenance + ;; on our side (no need to manage a distro key + ;; pair), and we can guarantee integrity of + ;; 'regulatory.bin' by other means anyway, such as + ;; 'guix gc --verify'. See + ;; <https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb> + ;; for a discssion. + "USE_OPENSSL=0" + + (string-append "PREFIX=" out) + (string-append "SBINDIR=" out "/sbin/") + (string-append "UDEV_RULE_DIR=" + out "/lib/udev/rules.d") + (string-append "LDFLAGS=-Wl,-rpath=" + out "/lib -L.") + (string-append "REG_BIN=" regdb + "/lib/crda/regulatory.bin") + "all_noverify")))) (native-inputs `(("pkg-config" ,pkg-config) ("wireless-regdb" ,wireless-regdb))) (inputs `(("libnl" ,libnl))) @@ -3990,8 +4077,9 @@ MPEG-2 and audio over Linux IEEE 1394.") #:phases (modify-phases %standard-phases (add-before 'build 'patch-program-paths - (lambda* (#:key inputs #:allow-other-keys) - (let ((coreutils (assoc-ref inputs "coreutils"))) + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (let ((coreutils (assoc-ref (or native-inputs inputs) + "coreutils"))) (substitute* "udev-md-raid-arrays.rules" (("/usr/bin/(readlink|basename)" all program) (string-append coreutils "/bin/" program)))) @@ -4006,6 +4094,7 @@ MPEG-2 and audio over Linux IEEE 1394.") (delete 'configure)) ;;tests must be done as root #:tests? #f)) + (supported-systems (delete "i586-gnu" %supported-systems)) (home-page "http://neil.brown.name/blog/mdadm") (synopsis "Tool for managing Linux Software RAID arrays") (description @@ -4072,12 +4161,6 @@ arrays when needed.") (string-append "DESTDIR=" (assoc-ref %outputs "out")) "SYSTEMDPATH=lib" - ;; Add the libaio headers to GCCs system header - ;; search path to suppress -Werror=cast-qual on - ;; the included headers. - (string-append "C_INCLUDE_PATH=" - (assoc-ref %build-inputs "libaio") - "/include") (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib")) @@ -4139,8 +4222,14 @@ Linux Device Mapper multipathing driver: "14mlqdapjqq1dhpkdgy5z83mvsaz36fcxca7a4z6hinmr7r6415b")))) (build-system gnu-build-system) (arguments - '(#:make-flags - (list "CC=gcc" (string-append "prefix=" %output)) + `(#:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "prefix=" %output) + (string-append + "CC=" (if target + (string-append (assoc-ref %build-inputs "cross-gcc") + "/bin/" target "-gcc") + "gcc")))) #:test-target "partcheck" ; need root for a full 'check' #:phases (modify-phases %standard-phases (delete 'configure)))) ; no configure script @@ -4220,13 +4309,13 @@ Bluetooth audio output devices like headphones or loudspeakers.") (define-public bluez (package (name "bluez") - (replacement bluez/fixed) (version "5.53") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/linux/bluetooth/bluez-" version ".tar.xz")) + (patches (search-patches "bluez-CVE-2020-0556.patch")) (sha256 (base32 "1g1qg6dz6hl3csrmz75ixr12lwv836hq3ckb259svvrg62l2vaiq")))) @@ -4286,14 +4375,6 @@ Bluetooth audio output devices like headphones or loudspeakers.") is flexible, efficient and uses a modular implementation.") (license license:gpl2+))) -(define bluez/fixed - (package - (inherit bluez) - (source (origin - (inherit (package-source bluez)) - (patches (append (origin-patches (package-source bluez)) - (search-patches "bluez-CVE-2020-0556.patch"))))))) - (define-public fuse-exfat (package (name "fuse-exfat") @@ -4434,11 +4515,9 @@ and copy/paste text in the console and in xterm.") #:test-target "test" #:parallel-tests? #f)) ; tests fail when run in parallel (inputs `(("e2fsprogs" ,e2fsprogs) ; for btrfs-convert - ("libblkid" ,util-linux) - ("libblkid:static" ,util-linux "static") - ("libuuid" ,util-linux) - ("libuuid:static" ,util-linux "static") ("lzo" ,lzo) + ("util-linux:lib" ,util-linux "lib") ;for libblkid and libuuid + ("util-linux:static" ,util-linux "static") ;ditto ("zlib" ,zlib) ("zlib:static" ,zlib "static") ("zstd" ,zstd "lib") @@ -4604,7 +4683,7 @@ obviously it can be shared with files outside our set).") ("libtool" ,libtool) ("pkg-config" ,pkg-config))) (inputs - `(("libuuid" ,util-linux) + `(("libuuid" ,util-linux "lib") ("libselinux" ,libselinux))) (home-page "https://f2fs.wiki.kernel.org/") (synopsis "Userland tools for f2fs") @@ -4630,7 +4709,7 @@ disks and SD cards. This package provides the userland utilities.") (base32 "0z9c0y3qq75iyqknl5k0v7v46l8c3pcifpqb0yqalrs24blkm7dk")))) (inputs - `(("libuuid" ,util-linux))))) + `(("libuuid" ,util-linux "lib"))))) (define-public f2fs-tools/static (static-package @@ -4668,7 +4747,7 @@ disks and SD cards. This package provides the userland utilities.") #t))))) (inputs `(("libuuid:static" ,util-linux "static") - ("libuuid" ,util-linux)))))) ; for include files + ("libuuid" ,util-linux "lib")))))) ; for include files (define-public f2fs-fsck/static (package @@ -5369,7 +5448,7 @@ are exceeded.") ("pkg-config" ,pkg-config))) (inputs `(("acl" ,acl) ; extended attributes (xattr) - ("libuuid" ,util-linux) + ("libuuid" ,util-linux "lib") ("lzo" ,lzo) ("openssl" ,openssl) ; optional crypto support ("zlib" ,zlib) @@ -5477,14 +5556,7 @@ under OpenGL graphics workloads.") (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")) #:phases (modify-phases %standard-phases - (delete 'configure) - (add-before 'build 'kernel-headers-are-system-headers - (lambda* (#:key inputs #:allow-other-keys) - (let ((kernel-headers (assoc-ref inputs "kernel-headers"))) - ;; Make sure the kernel headers are treated as system headers - ;; to suppress a conflict between "util.h" and <linux/fs.h>. - (setenv "C_INCLUDE_PATH" (string-append kernel-headers "/include")) - #t)))))) + (delete 'configure)))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs @@ -5517,12 +5589,7 @@ interface to the variable facility of UEFI boot firmware.") ;; installed (known as OS_VENDOR in the code). ;; GRUB overrides this, as such it's only used if ;; nothing else is specified on the command line. - "EFIDIR=gnu" - ;; Treat kernel headers as system headers to prevent - ;; warnings about conflicting types. - (string-append "C_INCLUDE_PATH=" - (assoc-ref %build-inputs "kernel-headers") - "/include")) + "EFIDIR=gnu") #:phases (modify-phases %standard-phases (delete 'configure)))) (native-inputs `(("pkg-config" ,pkg-config))) @@ -6168,7 +6235,7 @@ libraries, which are often integrated directly into libfabric.") "psm-disable-memory-stats.patch")))) (build-system gnu-build-system) (outputs '("out" "debug")) - (inputs `(("libuuid" ,util-linux))) + (inputs `(("libuuid" ,util-linux "lib"))) (arguments '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR=" ,(string-append "INSTALL_PREFIX=" %output) @@ -6545,7 +6612,7 @@ IP addresses and routes, and configure IPsec.") (native-inputs `(("gettext" ,gettext-minimal))) (inputs - `(("libuuid" ,util-linux) + `(("libuuid" ,util-linux "lib") ("python" ,python-wrapper))) (home-page "https://xfs.wiki.kernel.org/") (synopsis "XFS file system tools") @@ -6643,13 +6710,21 @@ the superuser to make device nodes.") ;; We don't have an /etc/passwd entry for "root" - use numeric IDs. (substitute* "test/compare-tar" (("tar -tvf") "tar --numeric-owner -tvf")) + + ;; coreutils 8.32 changed 'ls' to use the statx() syscall instead + ;; of lstat(). fakeroot 1.24 does not support the former, so + ;; adjust these tests to use 'test -b' instead of 'ls' to test for + ;; block device. See <https://bugs.gnu.org/41090>. + (substitute* '("test/t.mknod" "test/t.chmod_dev") + (("ls -ld? \\$tmp/hda3") + "test -b $tmp/hda3 && echo block || echo fail")) #t))))) (native-inputs `(("acl" ,acl) ("sharutils" ,sharutils) ; for the tests ("xz" ,xz))) ; for the tests (inputs - `(("libcap" ,libcap) + `(("libcap" ,libcap/next) ("util-linux" ,util-linux))) (synopsis "Provides a fake root environment") (description "@command{fakeroot} runs a command in an environment where diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 4f406ded66..d0a0065957 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -2542,7 +2542,7 @@ non-consing thread safe queues and fibonacci priority queues.") (add-after 'unpack 'fix-paths (lambda* (#:key inputs #:allow-other-keys) (substitute* "libffi/libffi.lisp" - (("libffi.so.6" all) (string-append + (("libffi.so.7" all) (string-append (assoc-ref inputs "libffi") "/lib/" all))) (substitute* "toolchain/c-toolchain.lisp" @@ -5210,11 +5210,17 @@ high-level way. This library provides such operators.") (let ((python (assoc-ref inputs "python"))) (setenv "BB_PYTHON3_INCLUDE_DIR" (string-append python "/include/python" - (python-version python) - "m")) + (python-version python))) (setenv "BB_PYTHON3_DYLIB" (string-append python "/lib/libpython3.so")) - #t)))))) + #t))) + (add-after 'unpack 'adjust-for-python-3.8 + (lambda _ + ;; This method is no longer part of the public API. + (substitute* "ffi-interface.lisp" + ((".*PyEval_ReInitThreads.*") + "")) + #t))))) (native-inputs `(("sbcl-cl-fad" ,sbcl-cl-fad) ("sbcl-lift" ,sbcl-lift) diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 219bc4dcf9..619794ae71 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2019, 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com> ;;; Copyright © 2019 Jesse Gildersleve <jessejohngildersleve@protonmail.com> ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 33d863ae11..15e15281a7 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -76,7 +76,8 @@ as \"x86_64-linux\"." ("powerpc" => "PowerPC") ("riscv" => "RISCV") ("x86_64" => "X86") - ("i686" => "X86")))) + ("i686" => "X86") + ("i586" => "X86")))) (define (llvm-download-uri component version) (if (version>=? version "9.0.1") @@ -97,6 +98,7 @@ as \"x86_64-linux\"." (base32 "1pwgm6cr0xr5a0hrbqs1zvsvvjvy0yq1y47c96804wcs795s90yz")))) (build-system cmake-build-system) + (outputs '("out" "opt-viewer")) (native-inputs `(("python" ,python-2) ;bytes->str conversion in clang>=3.7 needs python-2 ("perl" ,perl))) @@ -114,16 +116,27 @@ as \"x86_64-linux\"." ;; Don't use '-g' during the build, to save space. #:build-type "Release" - #:phases (modify-phases %standard-phases - (add-before 'build 'shared-lib-workaround - ;; Even with CMAKE_SKIP_BUILD_RPATH=FALSE, llvm-tblgen - ;; doesn't seem to get the correct rpath to be able to run - ;; from the build directory. Set LD_LIBRARY_PATH as a - ;; workaround. - (lambda _ - (setenv "LD_LIBRARY_PATH" - (string-append (getcwd) "/lib")) - #t))))) + #:phases + (modify-phases %standard-phases + (add-before 'build 'shared-lib-workaround + ;; Even with CMAKE_SKIP_BUILD_RPATH=FALSE, llvm-tblgen + ;; doesn't seem to get the correct rpath to be able to run + ;; from the build directory. Set LD_LIBRARY_PATH as a + ;; workaround. + (lambda _ + (setenv "LD_LIBRARY_PATH" + (string-append (getcwd) "/lib")) + #t)) + (add-after 'install 'install-opt-viewer + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (opt-viewer-out (assoc-ref outputs "opt-viewer")) + (opt-viewer-share-dir (string-append opt-viewer-out "/share")) + (opt-viewer-dir (string-append opt-viewer-share-dir "/opt-viewer"))) + (mkdir-p opt-viewer-share-dir) + (rename-file (string-append out "/share/opt-viewer") + opt-viewer-dir)) + #t))))) (home-page "https://www.llvm.org") (synopsis "Optimizing compiler infrastructure") (description @@ -153,7 +166,28 @@ of programming tools as well as libraries with equivalent functionality.") (arguments `(;; Don't use '-g' during the build to save space. #:build-type "Release" - #:tests? #f)) ; Tests require gtest + #:tests? #f ; Tests require gtest + #:modules ((srfi srfi-1) + (ice-9 match) + ,@%cmake-build-system-modules) + #:phases (modify-phases (@ (guix build cmake-build-system) %standard-phases) + (add-after 'set-paths 'hide-glibc + ;; Work around https://issues.guix.info/issue/36882. We need to + ;; remove glibc from CPLUS_INCLUDE_PATH so that the one hardcoded + ;; in GCC, at the bottom of GCC include search-path is used. + (lambda* (#:key inputs #:allow-other-keys) + (let* ((filters '("libc")) + (input-directories + (filter-map (lambda (input) + (match input + ((name . dir) + (and (not (member name filters)) + dir)))) + inputs))) + (set-path-environment-variable "CPLUS_INCLUDE_PATH" + '("include") + input-directories) + #t)))))) (home-page "https://compiler-rt.llvm.org") (synopsis "Runtime library for Clang/LLVM") (description @@ -307,9 +341,12 @@ compiler. In LLVM this library is called \"compiler-rt\".") ;; Clang supports the same environment variables as GCC. (native-search-paths (list (search-path-specification - (variable "CPATH") + (variable "C_INCLUDE_PATH") (files '("include"))) (search-path-specification + (variable "CPLUS_INCLUDE_PATH") + (files '("include/c++" "include"))) + (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64"))))) @@ -397,7 +434,8 @@ output), and Binutils.") (define-public clang-runtime-9 (clang-runtime-from-llvm llvm-9 - "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2")) + "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2" + '("clang-runtime-9-libsanitizer-mode-field.patch"))) (define-public clang-9 (clang-from-llvm llvm-9 clang-runtime-9 @@ -428,7 +466,8 @@ output), and Binutils.") (define-public clang-runtime-8 (clang-runtime-from-llvm llvm-8 - "1c919wsm17xnv7lr8bhpq2wkq8113lzlw6hzhfr737j59x3wfddl")) + "1c919wsm17xnv7lr8bhpq2wkq8113lzlw6hzhfr737j59x3wfddl" + '("clang-runtime-9-libsanitizer-mode-field.patch"))) (define-public clang-8 (clang-from-llvm llvm-8 clang-runtime-8 @@ -452,7 +491,8 @@ output), and Binutils.") (define-public clang-runtime-7 (clang-runtime-from-llvm llvm-7 - "065ybd8fsc4h2hikbdyricj6pyv4r7r7kpcikhb2y5zf370xybkq")) + "065ybd8fsc4h2hikbdyricj6pyv4r7r7kpcikhb2y5zf370xybkq" + '("clang-runtime-9-libsanitizer-mode-field.patch"))) (define-public clang-7 (clang-from-llvm llvm-7 clang-runtime-7 @@ -476,7 +516,8 @@ output), and Binutils.") (define-public clang-runtime-6 (clang-runtime-from-llvm llvm-6 - "1fcr3jn24yr8lh36nc0c4ikli4744i2q9m1ik67p1jymwwaixkgl")) + "1fcr3jn24yr8lh36nc0c4ikli4744i2q9m1ik67p1jymwwaixkgl" + '("clang-runtime-9-libsanitizer-mode-field.patch"))) (define-public clang-6 (clang-from-llvm llvm-6 clang-runtime-6 @@ -496,13 +537,20 @@ output), and Binutils.") (uri (llvm-download-uri "llvm" version)) (sha256 (base32 - "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z")))))) + "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z")))) + (outputs '("out")) + (arguments + (substitute-keyword-arguments (package-arguments llvm) + ((#:phases phases) + `(modify-phases ,phases + (delete 'install-opt-viewer))))))) (define-public clang-runtime-3.9.1 (clang-runtime-from-llvm llvm-3.9.1 "16gc2gdmp5c800qvydrdhsp0bzb97s8wrakl6i8a4lgslnqnf2fk" - '("clang-runtime-asan-build-fixes.patch" + '("clang-runtime-3.9-libsanitizer-mode-field.patch" + "clang-runtime-asan-build-fixes.patch" "clang-runtime-esan-build-fixes.patch" "clang-3.5-libsanitizer-ustat-fix.patch"))) @@ -528,6 +576,7 @@ output), and Binutils.") llvm-3.8 "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d" '("clang-runtime-asan-build-fixes.patch" + "clang-runtime-3.8-libsanitizer-mode-field.patch" "clang-3.5-libsanitizer-ustat-fix.patch"))) (define-public clang-3.8 @@ -551,6 +600,7 @@ output), and Binutils.") llvm-3.7 "10c1mz2q4bdq9bqfgr3dirc6hz1h3sq8573srd5q5lr7m7j6jiwx" '("clang-runtime-asan-build-fixes.patch" + "clang-runtime-3.8-libsanitizer-mode-field.patch" "clang-3.5-libsanitizer-ustat-fix.patch"))) (define-public clang-3.7 @@ -573,7 +623,7 @@ output), and Binutils.") (clang-runtime-from-llvm llvm-3.6 "11qx8d3pbfqjaj2x207pvlvzihbs1z2xbw4crpz7aid6h1yz6bqg" - '("clang-runtime-asan-build-fixes.patch"))) + '("clang-runtime-asan-build-fixes.patch"))) (define-public clang-3.6 (clang-from-llvm llvm-3.6 clang-runtime-3.6 @@ -653,6 +703,23 @@ output), and Binutils.") (base32 "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089")))) (build-system cmake-build-system) + (arguments + `(#:phases + (modify-phases (@ (guix build cmake-build-system) %standard-phases) + (add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Hide GCC's C++ headers so that they do not interfere with + ;; the ones we are attempting to build. + (setenv "CPLUS_INCLUDE_PATH" + (string-join (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH")) + #t)))))) (native-inputs `(("clang" ,clang) ("llvm" ,llvm))) diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm index 8496b6256d..9139dc440e 100644 --- a/gnu/packages/logging.scm +++ b/gnu/packages/logging.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -53,6 +54,17 @@ (base32 "07gmr3jyaf2239n9sp6h7hwdz1pv7b7aka8n06gmr2fnlmaymfrc")))) (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'do-not-call-stime + (lambda _ + ;; Patch out use of 'stime' which was removed from glibc 2.31. + ;; The test would not work in the build container anyway. + (substitute* "tests/testDailyRollingFileAppender.cpp" + (("if \\(stime\\(&now\\) == -1\\)") + "if (1)")) + #t))))) (synopsis "Log library for C++") (description "Log4cpp is library of C++ classes for flexible logging to files, syslog, diff --git a/gnu/packages/lxqt.scm b/gnu/packages/lxqt.scm index a440491633..a5a15e583b 100644 --- a/gnu/packages/lxqt.scm +++ b/gnu/packages/lxqt.scm @@ -994,8 +994,7 @@ components to build desktop file managers which belongs to LXDE.") (base32 "0x3c25inlxll965xszx37mnl5gp3smm2h7x04f67z0qlh3vsbrjq")))) (build-system cmake-build-system) (inputs - `(("glib:bin" ,glib "bin") - ("libfm-qt" ,libfm-qt) + `(("libfm-qt" ,libfm-qt) ("qtbase" ,qtbase) ("qtx11extras" ,qtx11extras))) (native-inputs @@ -1011,17 +1010,7 @@ components to build desktop file managers which belongs to LXDE.") (substitute* '("autostart/CMakeLists.txt") (("DESTINATION \"\\$\\{LXQT_ETC_XDG_DIR\\}") "DESTINATION \"etc/xdg")) - #t)) - (add-after 'install 'wrap-glib - (lambda* (#:key outputs inputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (glib (assoc-ref inputs "glib:bin")) - (gio-exe-path (string-append glib "/bin/gio-launch-desktop"))) - (if (file-exists? gio-exe-path) - (wrap-program (string-append out "/bin/pcmanfm-qt") - `("GIO_LAUNCH_DESKTOP" = (,gio-exe-path))) - (error "could not find gio-launch-desktop")) - #t)))))) + #t))))) (home-page "https://lxqt.org/") (synopsis "File manager and desktop icon manager") (description "PCManFM-Qt is the Qt port of PCManFM, the file manager of diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 8c817d3e3b..6552d171bf 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -781,7 +781,7 @@ than 8 bits, and at the end only some significant 8 bits are kept.") (inputs `(("giflib" ,giflib) ("lapack" ,lapack) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libx11" ,libx11) ("openblas" ,openblas) @@ -1768,7 +1768,7 @@ INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n"))) ("eigen" ,eigen-for-tensorflow) ("gemmlowp" ,gemmlowp-for-tensorflow) ("lmdb" ,lmdb) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("giflib" ,giflib) ("grpc" ,grpc-1.16.1 "static") diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index e6e531c1d3..b90e1706d7 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -228,7 +228,7 @@ ("dejagnu" ,dejagnu))) (inputs `(("m4" ,m4) - ("guile" ,guile-2.2) + ("guile" ,guile-3.0) ("gsasl" ,gsasl) ("gnutls" ,gnutls) ("ncurses" ,ncurses) @@ -252,14 +252,17 @@ software.") ;; Libraries are under LGPLv3+, and programs under GPLv3+. (list gpl3+ lgpl3+)))) -(define-public guile3.0-mailutils +(define-public guile2.2-mailutils (package (inherit mailutils) - (name "guile3.0-mailutils") + (name "guile2.2-mailutils") (inputs - `(("guile" ,guile-3.0) + `(("guile" ,guile-2.2) ,@(alist-delete "guile" (package-inputs mailutils)))))) +(define-public guile3.0-mailutils + (deprecated-package "guile3.0-mailutils" mailutils)) + (define-public nullmailer (package (name "nullmailer") @@ -1116,13 +1119,7 @@ useful features.") ("expat" ,expat) ("zlib" ,zlib))) (arguments - '(#:phases - (modify-phases %standard-phases - (replace 'bootstrap - (lambda _ - (setenv "NOCONFIGURE" "true") - (invoke "sh" "autogen.sh")))) - #:configure-flags + '(#:configure-flags '("--disable-static" "--disable-db"))) (home-page "https://www.etpan.org/libetpan.html") (synopsis "Portable middleware for email access") diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index b8d1b2af3e..fe86f810bf 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -1,10 +1,11 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018, 2019 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2018, 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> -;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,7 +55,8 @@ %mes-bootstrap-tarball %bootstrap-tarballs - %guile-static-stripped)) + %guile-static-stripped + %guile-3.0-static-stripped)) ;;; Commentary: ;;; @@ -92,34 +94,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (mlambdaq (glibc) "Return a variant of GCC that uses the bootstrap variant of GLIBC." (package - (inherit gcc) + (inherit gcc-5) (outputs '("out")) ;all in one so libgcc_s is easily found - (native-search-paths - ;; Set CPLUS_INCLUDE_PATH so GCC is able to find the libc - ;; C++ headers. - (cons (search-path-specification - (variable "CPLUS_INCLUDE_PATH") - (files '("include"))) - (package-native-search-paths gcc))) (inputs `( ;; Distinguish the name so we can refer to it below. ("bootstrap-libc" ,(glibc-for-bootstrap glibc)) ("libc:static" ,(glibc-for-bootstrap glibc) "static") - ,@(package-inputs gcc))) - (arguments - (substitute-keyword-arguments (package-arguments gcc) - ((#:phases phases) - `(modify-phases ,phases - (add-before 'configure 'treat-glibc-as-system-header - (lambda* (#:key inputs #:allow-other-keys) - (let ((libc (assoc-ref inputs "bootstrap-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)))))))))) + ,@(package-inputs gcc-5)))))) (define (package-with-relocatable-glibc p) "Return a variant of P that uses the libc as defined by @@ -137,7 +118,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (define (inputs) (if (%current-target-system) ; is this package cross built? `(("cross-libc" - ,(cross-bootstrap-libc (%current-target-system)))) + ,(cross-bootstrap-libc (%current-target-system))) + ("cross-libc:static" + ,(cross-bootstrap-libc (%current-target-system)) + "static")) '())) (define (native-inputs) @@ -155,7 +139,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (cons (search-path-specification (variable "CROSS_CPLUS_INCLUDE_PATH") (files '("include"))) - (package-search-paths gcc))))) + (package-search-paths gcc-5))))) ("cross-binutils" ,(cross-binutils target)) ,@(%final-inputs))) `(("libc" ,(glibc-for-bootstrap glibc)) @@ -167,15 +151,6 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (current-source-location) #:native-inputs native-inputs)) -(define static-bash-for-bootstrap - (package - (inherit static-bash) - (source (origin - (inherit (package-source static-bash)) - (patches - (cons (search-patch "bash-reproducible-linux-pgrp-pipe.patch") - (origin-patches (package-source static-bash)))))))) - (define %static-inputs ;; Packages that are to be used as %BOOTSTRAP-INPUTS. (let ((coreutils (package (inherit coreutils) @@ -252,7 +227,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (("-Wl,-export-dynamic") "")) #t))))))) (inputs (if (%current-target-system) - `(("bash" ,static-bash-for-bootstrap)) + `(("bash" ,static-bash)) '())))) (tar (package (inherit tar) (arguments @@ -298,7 +273,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ("sed" ,sed) ("grep" ,grep) ("gawk" ,gawk))) - ("bash" ,static-bash-for-bootstrap)))) + ("bash" ,static-bash)))) (define %static-binaries (package @@ -400,6 +375,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (package-arguments binutils)) ((#:configure-flags flags _ ...) flags))) + #:make-flags ,(match (memq #:make-flags (package-arguments binutils)) + ((#:make-flags flags _ ...) + flags) + (_ ''())) #:strip-flags '("--strip-all") #:phases (modify-phases %standard-phases (add-before 'configure 'all-static @@ -427,7 +406,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (begin (use-modules (guix build utils)) - (setvbuf (current-output-port) _IOLBF) + (setvbuf (current-output-port) + (cond-expand (guile-2.0 _IOLBF) (else 'line))) (let* ((in (assoc-ref %build-inputs "binutils")) (out (assoc-ref %outputs "out")) (bin (string-append out "/bin"))) @@ -481,61 +461,62 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (define %gcc-static ;; A statically-linked GCC, with stripped-down functionality. (package-with-relocatable-glibc - (package (inherit gcc) + (package (inherit gcc-5) (name "gcc-static") (outputs '("out")) ; all in one (arguments - `(#:modules ((guix build utils) - (guix build gnu-build-system) - (srfi srfi-1) - (srfi srfi-26) - (ice-9 regex)) - ,@(substitute-keyword-arguments (package-arguments gcc) - ((#:guile _) #f) - ((#:implicit-inputs? _) #t) - ((#:configure-flags flags) - `(append (list - ;; We don't need a full bootstrap here. - "--disable-bootstrap" - - ;; Make sure '-static' is passed where it matters. - "--with-stage1-ldflags=-static" - - ;; GCC 4.8+ requires a C++ compiler and library. - "--enable-languages=c,c++" - - ;; Make sure gcc-nm doesn't require liblto_plugin.so. - "--disable-lto" - - "--disable-shared" - "--disable-plugin" - "--disable-libmudflap" - "--disable-libatomic" - "--disable-libsanitizer" - "--disable-libitm" - "--disable-libgomp" - "--disable-libcilkrts" - "--disable-libvtv" - "--disable-libssp" - "--disable-libquadmath") - (remove (cut string-match "--(.*plugin|enable-languages)" <>) - ,flags))) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'pre-configure 'remove-lgcc_s - (lambda _ - ;; Remove the '-lgcc_s' added to GNU_USER_TARGET_LIB_SPEC in - ;; the 'pre-configure phase of our main gcc package, because - ;; that shared library is not present in this static gcc. See - ;; <https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00008.html>. - (substitute* (cons "gcc/config/rs6000/sysv4.h" - (find-files "gcc/config" - "^gnu-user.*\\.h$")) - ((" -lgcc_s}}") "}}")) - #t))))))) + (substitute-keyword-arguments (package-arguments gcc-5) + ((#:modules modules %gnu-build-system-modules) + `((srfi srfi-1) + (srfi srfi-26) + (ice-9 regex) + ,@modules)) + ((#:guile _) #f) + ((#:implicit-inputs? _) #t) + ((#:configure-flags flags) + `(append (list + ;; We don't need a full bootstrap here. + "--disable-bootstrap" + + ;; Make sure '-static' is passed where it matters. + "--with-stage1-ldflags=-static" + + ;; GCC 4.8+ requires a C++ compiler and library. + "--enable-languages=c,c++" + + ;; Make sure gcc-nm doesn't require liblto_plugin.so. + "--disable-lto" + + "--disable-shared" + "--disable-plugin" + "--disable-libmudflap" + "--disable-libatomic" + "--disable-libsanitizer" + "--disable-libitm" + "--disable-libgomp" + "--disable-libcilkrts" + "--disable-libvtv" + "--disable-libssp" + "--disable-libquadmath") + (remove (cut string-match "--(.*plugin|enable-languages)" <>) + ,flags))) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'pre-configure 'remove-lgcc_s + (lambda _ + ;; Remove the '-lgcc_s' added to GNU_USER_TARGET_LIB_SPEC in + ;; the 'pre-configure phase of our main gcc package, because + ;; that shared library is not present in this static gcc. See + ;; <https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00008.html>. + (substitute* (cons "gcc/config/rs6000/sysv4.h" + (find-files "gcc/config" + "^gnu-user.*\\.h$")) + ((" -lgcc_s}}") "}}")) + #t)))))) (inputs `(("zlib:static" ,zlib "static") - ,@(package-inputs gcc))) + ("isl:static" ,isl-0.18 "static") + ,@(package-inputs gcc-5))) (native-inputs (if (%current-target-system) `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both @@ -548,12 +529,12 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ("gmp-native" ,gmp) ("mpfr-native" ,mpfr) ("mpc-native" ,mpc) - ,@(package-native-inputs gcc)) - (package-native-inputs gcc)))))) + ,@(package-native-inputs gcc-5)) + (package-native-inputs gcc-5)))))) (define %gcc-stripped ;; The subset of GCC files needed for bootstrap. - (package (inherit gcc) + (package (inherit gcc-5) (name "gcc-stripped") (build-system trivial-build-system) (source #f) @@ -566,7 +547,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (srfi srfi-26) (guix build utils)) - (setvbuf (current-output-port) _IOLBF) + (setvbuf (current-output-port) + (cond-expand (guile-2.0 _IOLBF) (else 'line))) (let* ((out (assoc-ref %outputs "out")) (bindir (string-append out "/bin")) (libdir (string-append out "/lib")) @@ -695,95 +677,99 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." #t)))) (inputs `(("mes" ,%mes-minimal))))) +(define* (make-guile-static guile patches) + (package-with-relocatable-glibc + (static-package + (package + (inherit guile) + (source + (origin (inherit (package-source guile)) + (patches (append (map search-patch patches) + (origin-patches (package-source guile)))))) + (name (string-append (package-name guile) "-static")) + (synopsis "Statically-linked and relocatable Guile") + + ;; Remove the 'debug' output (see above for the reason.) + (outputs (delete "debug" (package-outputs guile))) + + (inputs + `(("libunistring:static" ,libunistring "static") + ,@(package-inputs guile))) + + (propagated-inputs + `(("bdw-gc" ,libgc/static-libs) + ,@(alist-delete "bdw-gc" + (package-propagated-inputs guile)))) + (arguments + (substitute-keyword-arguments (package-arguments guile) + ((#:configure-flags flags '()) + ;; When `configure' checks for ltdl availability, it + ;; doesn't try to link using libtool, and thus fails + ;; because of a missing -ldl. Work around that. + ''("LDFLAGS=-ldl")) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + + ;; Do not record the absolute file name of 'sh' in + ;; (ice-9 popen). This makes 'open-pipe' unusable in + ;; a build chroot ('open-pipe*' is fine) but avoids + ;; keeping a reference to Bash. + (delete 'pre-configure) + + (add-before 'configure 'static-guile + (lambda _ + (substitute* "libguile/Makefile.in" + ;; Create a statically-linked `guile' + ;; executable. + (("^guile_LDFLAGS =") + "guile_LDFLAGS = -all-static") + + ;; Add `-ldl' *after* libguile-2.0.la. + (("^guile_LDADD =(.*)$" _ ldadd) + (string-append "guile_LDADD = " + (string-trim-right ldadd) + " -ldl\n"))))))) + ((#:tests? _ #f) + ;; There are uses of `dynamic-link' in + ;; {foreign,coverage}.test that don't fly here. + #f) + ((#:parallel-build? _ #f) + ;; Work around the fact that the Guile build system is + ;; not deterministic when parallel-build is enabled. + #f))))))) + (define %guile-static ;; A statically-linked Guile that is relocatable--i.e., it can search ;; .scm and .go files relative to its installation directory, rather ;; than in hard-coded configure-time paths. - (let* ((patches (cons* (search-patch "guile-relocatable.patch") - (search-patch "guile-2.2-default-utf8.patch") - (search-patch "guile-linux-syscalls.patch") - (origin-patches (package-source guile-2.2)))) - (source (origin (inherit (package-source guile-2.2)) - (patches patches))) - (guile (package (inherit guile-2.2) - (name (string-append (package-name guile-2.2) "-static")) - (source source) - (synopsis "Statically-linked and relocatable Guile") - - ;; Remove the 'debug' output (see above for the reason.) - (outputs (delete "debug" (package-outputs guile-2.2))) - - (inputs - `(("libunistring:static" ,libunistring "static") - ,@(package-inputs guile-2.2))) - - (propagated-inputs - `(("bdw-gc" ,libgc) - ,@(alist-delete "bdw-gc" - (package-propagated-inputs guile-2.2)))) - (arguments - (substitute-keyword-arguments (package-arguments guile-2.2) - ((#:configure-flags flags '()) - ;; When `configure' checks for ltdl availability, it - ;; doesn't try to link using libtool, and thus fails - ;; because of a missing -ldl. Work around that. - ''("LDFLAGS=-ldl")) - ((#:phases phases '%standard-phases) - `(modify-phases ,phases - - ;; Do not record the absolute file name of 'sh' in - ;; (ice-9 popen). This makes 'open-pipe' unusable in - ;; a build chroot ('open-pipe*' is fine) but avoids - ;; keeping a reference to Bash. - (delete 'pre-configure) - - (add-before 'configure 'static-guile - (lambda _ - (substitute* "libguile/Makefile.in" - ;; Create a statically-linked `guile' - ;; executable. - (("^guile_LDFLAGS =") - "guile_LDFLAGS = -all-static") - - ;; Add `-ldl' *after* libguile-2.2.la. - (("^guile_LDADD =(.*)$" _ ldadd) - (string-append "guile_LDADD = " - (string-trim-right ldadd) - " -ldl\n"))))))) - ((#:tests? _ #f) - ;; There are uses of `dynamic-link' in - ;; {foreign,coverage}.test that don't fly here. - #f) - ((#:parallel-build? _ #f) - ;; Work around the fact that the Guile build system is - ;; not deterministic when parallel-build is enabled. - #f)))))) - (package-with-relocatable-glibc (static-package guile)))) + (make-guile-static guile-2.0 '("guile-relocatable.patch" + "guile-default-utf8.patch" + "guile-linux-syscalls.patch"))) -(define %guile-static-stripped - ;; A stripped static Guile binary, for use during bootstrap. - (package (inherit %guile-static) - (name "guile-static-stripped") +(define* (make-guile-static-stripped static-guile) + (package + (inherit static-guile) + (name (string-append (package-name static-guile) "-stripped")) (build-system trivial-build-system) (arguments ;; The end result should depend on nothing but itself. `(#:allowed-references ("out") #:modules ((guix build utils)) #:builder - (let () + (let ((version ,(version-major+minor (package-version static-guile)))) (use-modules (guix build utils)) (let* ((in (assoc-ref %build-inputs "guile")) (out (assoc-ref %outputs "out")) (guile1 (string-append in "/bin/guile")) (guile2 (string-append out "/bin/guile"))) - (mkdir-p (string-append out "/share/guile/2.2")) - (copy-recursively (string-append in "/share/guile/2.2") - (string-append out "/share/guile/2.2")) + (mkdir-p (string-append out "/share/guile/" version)) + (copy-recursively (string-append in "/share/guile/" version) + (string-append out "/share/guile/" version)) - (mkdir-p (string-append out "/lib/guile/2.2/ccache")) - (copy-recursively (string-append in "/lib/guile/2.2/ccache") - (string-append out "/lib/guile/2.2/ccache")) + (mkdir-p (string-append out "/lib/guile/" version "/ccache")) + (copy-recursively (string-append in "/lib/guile/" version "/ccache") + (string-append out "/lib/guile/" version "/ccache")) (mkdir (string-append out "/bin")) (copy-file guile1 guile2) @@ -804,10 +790,22 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." '((invoke guile2 "--version"))) #t)))) - (inputs `(("guile" ,%guile-static))) + (inputs `(("guile" ,static-guile))) (outputs '("out")) (synopsis "Minimal statically-linked and relocatable Guile"))) +(define %guile-static-stripped + ;; A stripped static Guile binary, for use during bootstrap. + (make-guile-static-stripped %guile-static)) + +(define %guile-3.0-static-stripped + ;; A stripped static Guile 3.0 binary, for use in initrds. + (make-guile-static-stripped + (make-guile-static guile-3.0 + '("guile-2.2-default-utf8.patch" + "guile-3.0-linux-syscalls.patch" + "guile-3.0-relocatable.patch")))) + (define (tarball-package pkg) "Return a package containing a tarball of PKG." (package (inherit pkg) @@ -890,7 +888,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (ice-9 match) (srfi srfi-26)) - (setvbuf (current-output-port) _IOLBF) + (setvbuf (current-output-port) + (cond-expand (guile-2.0 _IOLBF) (else 'line))) (mkdir out) (chdir out) (for-each (match-lambda @@ -910,8 +909,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ,%linux-libre-headers-bootstrap-tarball))) (_ `(("gcc-tarball" ,%gcc-bootstrap-tarball) ("binutils-tarball" ,%binutils-bootstrap-tarball) - ("glibc-tarball" ,(%glibc-bootstrap-tarball))))) - ("coreutils&co-tarball" ,%bootstrap-binaries-tarball))) + ("glibc-tarball" ,(%glibc-bootstrap-tarball)) + ("coreutils&co-tarball" ,%bootstrap-binaries-tarball)))))) (synopsis "Tarballs containing all the bootstrap binaries") (description synopsis) (home-page #f) diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm index ae795ecba6..4dfac4f87b 100644 --- a/gnu/packages/man.scm +++ b/gnu/packages/man.scm @@ -200,7 +200,7 @@ Linux kernel and C library interfaces employed by user-space programs.") (define-public help2man (package (name "help2man") - (version "1.47.10") + (version "1.47.13") (source (origin (method url-fetch) @@ -208,7 +208,7 @@ Linux kernel and C library interfaces employed by user-space programs.") version ".tar.xz")) (sha256 (base32 - "1yywli520246aba12vpgj7bhr1r13swad3xm49a0cygqcgywnwgk")))) + "08q5arxz4j4pyx5q4712c2rn7p7dw7as9xg38yvmsh1c3ynvpy5p")))) (build-system gnu-build-system) (arguments `(;; There's no `check' target. #:tests? #f)) @@ -218,6 +218,8 @@ Linux kernel and C library interfaces employed by user-space programs.") ;; ("perl-LocaleGettext" ,perl-LocaleGettext) ;; ("gettext" ,gettext-minimal) )) + (native-inputs + `(("perl" ,perl))) (home-page "https://www.gnu.org/software/help2man/") (synopsis "Automatically generate man pages from program --help") (description @@ -226,18 +228,6 @@ Linux kernel and C library interfaces employed by user-space programs.") automatically.") (license gpl3+))) -(define-public help2man/latest - (package - (inherit help2man) - (version "1.47.13") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/help2man/help2man-" - version ".tar.xz")) - (sha256 - (base32 - "08q5arxz4j4pyx5q4712c2rn7p7dw7as9xg38yvmsh1c3ynvpy5p")))))) - (define-public scdoc (package (name "scdoc") diff --git a/gnu/packages/markup.scm b/gnu/packages/markup.scm index c1fc71b0a2..240bb9e8f4 100644 --- a/gnu/packages/markup.scm +++ b/gnu/packages/markup.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017 ng0 <ng0@n0.is> ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -205,7 +206,16 @@ implementation. (file-name (git-file-name name version)) (sha256 (base32 - "0r7jpqhgnssq444i8pwji2g36058vfzwkl70wbiwj13h4w5rfc8f")))) + "0r7jpqhgnssq444i8pwji2g36058vfzwkl70wbiwj13h4w5rfc8f")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Mimic upstream commit 68c3a91166347 to fix a test failure + ;; when using Python 3.8. Remove for versions > 0.29. + ;; See <https://github.com/commonmark/cmark/issues/313>. + (substitute* "test/normalize.py" + (("cgi") "html")) + #t)))) (build-system cmake-build-system) (arguments '(#:test-target "test")) diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm index f5d0b834b6..d913836825 100644 --- a/gnu/packages/mate.scm +++ b/gnu/packages/mate.scm @@ -548,7 +548,7 @@ assorted menu related utility programs.") `(("pkg-config" ,pkg-config) ("intltool" ,intltool) ("libxslt" ,libxslt) - ("yelp-tools" ,yelp-tools/fixed) + ("yelp-tools" ,yelp-tools) ("scrollkeeper" ,scrollkeeper) ("gettext" ,gettext-minimal) ("docbook-xml" ,docbook-xml) @@ -792,7 +792,7 @@ infamous 'Wanda the Fish'.") ("libice" ,libice) ("libsm" ,libsm) ("libgxps" ,libgxps) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libxml2" ,libxml2) ("dogtail" ,python2-dogtail) ("shared-mime-info" ,shared-mime-info) @@ -1277,7 +1277,7 @@ can be used as backgrounds in the MATE Desktop environment.") ("pkg-config" ,pkg-config) ("scrollkeeper" ,scrollkeeper) ("xorgproto" ,xorgproto) - ("yelp-tools" ,yelp-tools/fixed))) + ("yelp-tools" ,yelp-tools))) (inputs `(("atk" ,atk) ("cairo" ,cairo) @@ -1344,7 +1344,7 @@ can be used as backgrounds in the MATE Desktop environment.") ("libpeas" ,libpeas) ("libxml2" ,libxml2) ("libexif" ,libexif) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("librsvg" ,librsvg) ("lcms" ,lcms) ("mate-desktop" ,mate-desktop) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index d7ce900682..8fbce15418 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com> ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com> -;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Eric Brown <brown@fastmail.com> ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org> @@ -460,23 +460,45 @@ precision floating point numbers.") (define-public gsl (package (name "gsl") - (version "2.5") + (version "2.6") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gsl/gsl-" version ".tar.gz")) (sha256 (base32 - "1395y9hlhqadn5g9j8q22224fds5sd92jxi9czfavjj24myasq04")) - (patches (search-patches "gsl-test-i686.patch")))) + "1a460zj9xmbgvcymkdhqh313c4l29mn9cffbi5vf33x3qygk70mp")))) (build-system gnu-build-system) (arguments - `(;; Currently there are numerous tests that fail on "exotic" - ;; architectures such as aarch64 and ppc64le. - ,@(if (string-prefix? "aarch64-linux" - (or (%current-target-system) (%current-system))) - '(#:tests? #f) - '()))) + (let ((system (%current-system))) + (cond + ((string-prefix? "aarch64" system) + ;; Some sparse matrix tests are failing on AArch64: + ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html + '(#:phases (modify-phases %standard-phases + (add-before 'check 'disable-failing-tests + (lambda _ + (substitute* "spmatrix/test.c" + ((".*test_complex.*") "\n")) + #t))))) + ((string-prefix? "i686" system) + ;; There are rounding issues with these tests on i686: + ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html + ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html + '(#:phases (modify-phases %standard-phases + (add-before 'check 'disable-failing-tests + (lambda _ + (substitute* "linalg/test.c" + ((".*gsl_test\\(test_LU_decomp.*") "\n") + ((".*gsl_test\\(test_LUc_decomp.*") "\n") + ((".*gsl_test\\(test_cholesky_decomp.*") "\n") + ((".*gsl_test\\(test_COD_lssolve2.*") "\n")) + (substitute* "spmatrix/test.c" + ((".*test_all.*") "\n") + ((".*test_float.*") "\n") + ((".*test_complex.*") "\n")) + #t))))) + (else '())))) (home-page "https://www.gnu.org/software/gsl/") (synopsis "Numerical library for C and C++") (description @@ -856,7 +878,7 @@ computations.") ("flex" ,flex))) (inputs `(("zlib" ,zlib) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtirpc" ,libtirpc))) (arguments `(#:parallel-tests? #f @@ -1096,7 +1118,7 @@ extremely large and complex data collections.") `(("hdf4" ,hdf4) ("hdf5" ,hdf5) ("zlib" ,zlib) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("slf4j-api" ,java-slf4j-api))) (arguments `(#:configure-flags @@ -1213,7 +1235,7 @@ implemented in C.") `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API ;; XXX: These inputs are really dependencies of hdf4. ("zlib" ,zlib) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtirpc" ,libtirpc) ("gctp" ,gctp))) @@ -1412,7 +1434,7 @@ similar to MATLAB, GNU Octave or SciPy.") `(("hdf4" ,hdf4-alt) ("hdf5" ,hdf5) ("zlib" ,zlib) - ("libjpeg" ,libjpeg))) + ("libjpeg" ,libjpeg-turbo))) (arguments `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4") @@ -1685,6 +1707,12 @@ can solve two kinds of problems: ("glpk" ,glpk) ("glu" ,glu) ("graphicsmagick" ,graphicsmagick) + + ;; TODO: libjpeg-turbo is indirectly required through libtiff. In + ;; the next rebuild cycle, add an absolute reference for -ljpeg in + ;; libtiff.la instead of having to provide it here. + ("libjpeg" ,libjpeg-turbo) + ("hdf5" ,hdf5) ("lapack" ,lapack) ("libsndfile" ,libsndfile) @@ -1723,7 +1751,12 @@ can solve two kinds of problems: `(#:configure-flags (list (string-append "--with-shell=" (assoc-ref %build-inputs "bash") - "/bin/sh")) + "/bin/sh") + + ;; XXX: Without this flag, linking octave-cli fails with + ;; undefined references to 'logf@GLIBCXX_3.4' et.al. due to + ;; not pulling in liboctinterp.la for -lstdc++. + "--enable-link-all-dependencies") #:phases (modify-phases %standard-phases (add-after 'configure 'configure-makeinfo @@ -3282,7 +3315,7 @@ parts of it.") (define-public openblas (package (name "openblas") - (version "0.3.7") + (version "0.3.9") (source (origin (method url-fetch) @@ -3291,7 +3324,7 @@ parts of it.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0jbdjsi0qsxahdcm42agnn1y7xpmg0hrhwjsxg0zbhs9wwy3p568")))) + "14iz9xnrb9xiwgj84j94mc74gg0zn2vsy9fmsijxxma1n7dck4w3")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -4872,6 +4905,18 @@ This package contains the basic DUNE grid classes.") (arguments `(#:phases (modify-phases %standard-phases + ;; XXX: istl/test/matrixtest.cc includes <fenv.h> and fails to find + ;; the stdlib types when the gfortran header is used. Remove gfortran + ;; from CPLUS_INCLUDE_PATH as a workaround. + (add-after 'set-paths 'hide-gfortran + (lambda* (#:key inputs #:allow-other-keys) + (let ((gfortran (assoc-ref inputs "gfortran"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gfortran "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":")) + #t))) (add-after 'build 'build-tests (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "build_tests" make-flags)))))) @@ -4918,6 +4963,18 @@ aggregation-based algebraic multigrid.") (arguments `(#:phases (modify-phases %standard-phases + ;; XXX: localfunctions/test/lagrangeshapefunctiontest.cc includes <fenv.h> + ;; and fails to find the stdlib types when the gfortran header is used. + ;; Hide gfortran from CPLUS_INCLUDE_PATH to ensure we get the GCC header. + (add-after 'set-paths 'hide-gfortran + (lambda* (#:key inputs #:allow-other-keys) + (let ((gfortran (assoc-ref inputs "gfortran"))) + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gfortran "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":")) + #t))) (add-after 'build 'build-tests (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "build_tests" make-flags)))))) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index f14a4fd179..1930eb63aa 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -804,7 +804,7 @@ on Axolotl and PEP.") ("libgcrypt" ,libgcrypt) ("libsoup" ,libsoup) ("qrencode" ,qrencode) - ("sqlite" ,sqlite-with-column-metadata) + ("sqlite" ,sqlite) ("gpgme" ,gpgme) ("gtk+" ,gtk+) ("glib-networking" ,glib-networking) diff --git a/gnu/packages/mono.scm b/gnu/packages/mono.scm index 5447dd2300..a01b63f08a 100644 --- a/gnu/packages/mono.scm +++ b/gnu/packages/mono.scm @@ -153,7 +153,7 @@ Java.") ("cairo" ,cairo) ("fontconfig" ,fontconfig) ("libtiff" ,libtiff) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libexif" ,libexif) ("libungif" ,libungif))) (arguments diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index 9a0b042dc0..2848e63d60 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -37,7 +37,7 @@ (define-public gmp (package (name "gmp") - (version "6.1.2") + (version "6.2.0") (source (origin (method url-fetch) (uri @@ -45,7 +45,7 @@ version ".tar.xz")) (sha256 (base32 - "04hrwahdxyqdik559604r7wrj9ffklwvipgfxgj4ys4skbl6bdc7")) + "09hmg8k63mbfrx1x3yy6y1yzbbq85kw5avbibhcgrg9z3ganr3i5")) (patches (search-patches "gmp-faulty-test.patch")))) (build-system gnu-build-system) (native-inputs `(("m4" ,m4))) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index b653b96906..e0b6f6c0c1 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -301,7 +301,7 @@ score, keyboard, guitar, drum and controller views.") ("pulseaudio" ,pulseaudio) ("qtbase" ,qtbase) ("qtx11extras" ,qtx11extras) - ("sqlite" ,sqlite-with-column-metadata) + ("sqlite" ,sqlite) ("sparsehash" ,sparsehash) ("taglib" ,taglib))) (home-page "https://clementine-player.org") @@ -2306,7 +2306,7 @@ improves on support for JACK features, such as JACK MIDI.") "1zs5yy124bymfyapsnljr6rv2lnn5inwchm0xnwiw44b2d39l8hn")))) (build-system gnu-build-system) (inputs - `(("libuuid" ,util-linux) + `(("libuuid" ,util-linux "lib") ("libsndfile" ,libsndfile))) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm index a969f3ffd6..ec0fc6a6b7 100644 --- a/gnu/packages/ncurses.scm +++ b/gnu/packages/ncurses.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016 ng0 <ng0@n0.is> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> -;;; Copyright © 2017, 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; @@ -41,7 +41,7 @@ (define-public ncurses (package (name "ncurses") - (version "6.1-20190609") + (version "6.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/ncurses/ncurses-" @@ -49,7 +49,7 @@ ".tar.gz")) (sha256 (base32 - "05qdmbmrrn88ii9f66rkcmcyzp1kb1ymkx7g040lfkd1nkp7w1da")))) + "17bcm2z1rdx5gmzj5fb8cp7f28aw5b4g2z4qvvqg3yg0fq66wc1h")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;1 MiB of man pages @@ -185,12 +185,16 @@ ;; around this. ,@(if (%current-target-system) '("--disable-stripping") '()) + ;; Do not assume a default search path in ld, even if it is only to + ;; filter it out in ncurses-config. Mainly because otherwise it ends + ;; up using the libdir from binutils, which makes little sense and + ;; causes an unnecessary runtime dependency. + "cf_cv_ld_searchpath=/no-ld-searchpath" + ;; MinGW: Use term-driver created for the MinGW port. ,@(if (target-mingw?) '("--enable-term-driver") '())))) #:tests? #f ; no "check" target #:phases (modify-phases %standard-phases - (add-after 'unpack 'apply-rollup-patch - ,apply-rollup-patch-phase) (replace 'configure ,configure-phase) (add-after 'install 'post-install ,post-install-phase) @@ -202,18 +206,6 @@ `(,@(if (%current-target-system) `(("self" ,this-package)) ;for `tic' '()) - - ("rollup-patch" - ,(origin - (method url-fetch) - (uri (string-append - "https://invisible-mirror.net/archives/ncurses/" - (car (string-split version #\-)) - "/ncurses-" version "-patch.sh.bz2")) - (sha256 - (base32 - "0hqlqdqmh7lfs6dwj763qksb4j9nk0pv6crzx5gnp6n4caz3i46g")))) - ("pkg-config" ,pkg-config))) (native-search-paths (list (search-path-specification diff --git a/gnu/packages/netpbm.scm b/gnu/packages/netpbm.scm index 126f29f06f..96025661ca 100644 --- a/gnu/packages/netpbm.scm +++ b/gnu/packages/netpbm.scm @@ -102,7 +102,7 @@ (build-system gnu-build-system) (inputs `(("ghostscript" ,ghostscript) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("libxml2" ,libxml2) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index d7720724cc..76b0fc1559 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -1066,12 +1066,6 @@ live network and disk I/O bandwidth monitor.") (("/bin/sh") (which "sh"))) #t)) - (replace 'bootstrap - (lambda _ - ;; Patch shebangs in generated files before running - ;; ./configure. - (setenv "NOCONFIGURE" "please") - (invoke "bash" "./autogen.sh"))) (add-after 'build 'absolutize-tools (lambda* (#:key inputs #:allow-other-keys) (let ((ethtool (string-append (assoc-ref inputs "ethtool") @@ -2266,12 +2260,6 @@ remotely.") (base32 "0qz2730bng1gs9xbqxhkw88qbsmszgmmrl2g9k6xrg6r3bqvsdc7")))) (build-system gnu-build-system) - (arguments - `(;; Ensure the kernel headers are treated as system headers to suppress - ;; harmless -Werror=pedantic warnings. - #:make-flags (list (string-append "C_INCLUDE_PATH=" - (assoc-ref %build-inputs "kernel-headers") - "/include")))) (inputs `(("zeromq" ,zeromq) ("czmq" ,czmq) ("libsodium" ,libsodium))) @@ -2536,15 +2524,7 @@ Ethernet and TAP interfaces is supported. Packet capture is also supported.") #:tests? #f ; no test suite #:phases (modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'set-environment - (lambda* (#:key inputs #:allow-other-keys) - (setenv "C_INCLUDE_PATH" - (string-append (assoc-ref inputs "curl") "/include:" - (assoc-ref inputs "libpcap") "/include:" - (assoc-ref inputs "openssl") "/include:" - (assoc-ref inputs "zlib") "/include")) - #t))))) + (delete 'configure)))) (home-page "https://github.com/ZerBea/hcxtools") (synopsis "Capture wlan traffic to hashcat and John the Ripper") (description diff --git a/gnu/packages/nfs.scm b/gnu/packages/nfs.scm index 81eabef493..45ed181b03 100644 --- a/gnu/packages/nfs.scm +++ b/gnu/packages/nfs.scm @@ -114,7 +114,7 @@ ("rpcsvc-proto" ,rpcsvc-proto) ;for 'rpcgen' ("sqlite" ,sqlite) ("lvm2" ,lvm2) - ("util-linux" ,util-linux) + ("util-linux" ,util-linux "lib") ("mit-krb5" ,mit-krb5) ("libtirpc" ,libtirpc) ("python-wrapper" ,python-wrapper))) ;for the Python based tools diff --git a/gnu/packages/ninja.scm b/gnu/packages/ninja.scm index a8ad6430ba..11ee472d56 100644 --- a/gnu/packages/ninja.scm +++ b/gnu/packages/ninja.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,7 +23,7 @@ (define-module (gnu packages ninja) #:use-module ((guix licenses) #:select (asl2.0)) #:use-module (guix packages) - #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages python)) @@ -30,15 +31,16 @@ (define-public ninja (package (name "ninja") - (version "1.9.0") + (version "1.10.0") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/martine/ninja/" - "archive/v" version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/ninja-build/ninja") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1ffmzj5s9h98qhl94d9i23zcv057rsqbac9g1hdgvlzq51ccfzjx")))) + "1fbzl7mrcrwp527sgkc1npfl3k6bbpydpiq98xcf1a1hkrx0z5x4")))) (build-system gnu-build-system) (inputs `(("python" ,python-wrapper))) (arguments diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index eb8c83d831..a3cf3c9199 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -183,8 +183,8 @@ `(("c-ares" ,c-ares) ("http-parser" ,http-parser) ("icu4c" ,icu4c) - ("libuv" ,libuv/latest) - ("nghttp2" ,nghttp2-1.40 "lib") + ("libuv" ,libuv) + ("nghttp2" ,nghttp2 "lib") ("openssl" ,openssl) ("zlib" ,zlib))) (synopsis "Evented I/O for V8 JavaScript") diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index 9112206c81..e423bdd3a2 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; diff --git a/gnu/packages/nvi.scm b/gnu/packages/nvi.scm index 187de31720..c34b1cad72 100644 --- a/gnu/packages/nvi.scm +++ b/gnu/packages/nvi.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Marek Benc <merkur32@gmail.com> +;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,6 +41,7 @@ (patches (search-patches "nvi-assume-preserve-path.patch" "nvi-dbpagesize-binpower.patch" "nvi-db4.patch")) + (modules '((guix build utils))) (snippet ;; Create a wrapper for the configure script, make it executable. '(let ((conf-wrap (open-output-file "configure"))) @@ -51,6 +53,12 @@ (newline conf-wrap) (close-output-port conf-wrap) (chmod "configure" #o0755) + + ;; Glibc 2.30 removed the deprecated <sys/stropts.h>, so fall back + ;; to the internal PTY allocation logic. + (substitute* "ex/ex_script.c" + (("#ifdef HAVE_SYS5_PTY") + "#if defined(HAVE_SYS5_PTY) && !defined(__GLIBC__)")) #t)))) (build-system gnu-build-system) diff --git a/gnu/packages/onc-rpc.scm b/gnu/packages/onc-rpc.scm index 5849b8deb4..cd31dfd910 100644 --- a/gnu/packages/onc-rpc.scm +++ b/gnu/packages/onc-rpc.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,8 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages kerberos) #:use-module (gnu packages pkg-config) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix utils)) (define-public libtirpc (package @@ -72,6 +74,21 @@ procedure calls) protocol in a transport-independent manner. It supports both IPv4 and IPv6. ONC RPC is notably used by the network file system (NFS).") (license bsd-3))) +(define-public libtirpc/hurd + (package + (inherit libtirpc) + (name "libtirpc-hurd") + (source (origin (inherit (package-source libtirpc)) + (patches (search-patches "libtirpc-hurd.patch" + "libtirpc-hurd-client.patch")))) + (arguments + (substitute-keyword-arguments (package-arguments libtirpc) + ((#:configure-flags flags ''()) + ;; When cross-building the target system's krb5-config should be used. + `(list (string-append "ac_cv_prog_KRB5_CONFIG=" + (assoc-ref %build-inputs "mit-krb5") + "/bin/krb5-config"))))))) + (define-public rpcbind (package (name "rpcbind") diff --git a/gnu/packages/opencog.scm b/gnu/packages/opencog.scm index c3b89d41dc..18aba64aec 100644 --- a/gnu/packages/opencog.scm +++ b/gnu/packages/opencog.scm @@ -234,7 +234,7 @@ tasks.") ("cogutil" ,cogutil) ("gmp" ,gmp) ("guile" ,guile-2.2) - ("libuuid" ,util-linux) + ("libuuid" ,util-linux "lib") ("link-grammar" ,link-grammar))) (native-inputs `(("cxxtest" ,cxxtest) diff --git a/gnu/packages/openldap.scm b/gnu/packages/openldap.scm index 53c57e846f..14bf874f48 100644 --- a/gnu/packages/openldap.scm +++ b/gnu/packages/openldap.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> ;;; @@ -52,6 +53,7 @@ #:use-module (gnu packages) #:use-module ((guix licenses) #:select (openldap2.8 lgpl2.1+ gpl3+ psfl expat)) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix build-system python)) @@ -60,7 +62,7 @@ (package (name "openldap") (replacement openldap-2.4.50) - (version "2.4.47") + (version "2.4.49") (source (origin (method url-fetch) @@ -77,21 +79,34 @@ "openldap-release/openldap-" version ".tgz"))) (sha256 (base32 - "02sj0p1pq12hqq29b22m3f5zs2rykgvc0q3wlynxjcsjhrvmhk7m")))) + "0vp524rsngdcykf6ki7vprsyg7gj8z7hszg8xwxz50219fa1gcg3")))) (build-system gnu-build-system) (inputs `(("bdb" ,bdb-5.3) ("cyrus-sasl" ,cyrus-sasl) ("gnutls" ,gnutls) - ("groff" ,groff) - ("icu4c" ,icu4c) ("libgcrypt" ,libgcrypt) ("zlib" ,zlib))) - (native-inputs `(("libtool" ,libtool))) + (native-inputs `(("libtool" ,libtool) + ("groff" ,groff) + ("bdb" ,bdb-5.3))) (arguments `(#:tests? #f - #:configure-flags '("--disable-static") + #:configure-flags + '("--disable-static" + ,@(if (%current-target-system) + '("--with-yielding_select=yes" + "ac_cv_func_memcmp_working=yes") + '())) + ;; Disable install stripping as it breaks cross-compiling. + #:make-flags '("STRIP=") #:phases (modify-phases %standard-phases + ,@(if (%current-target-system) + '((add-before 'configure 'fix-cross-gcc + (lambda* (#:key target #:allow-other-keys) + (setenv "CC" (string-append target "-gcc")) + #t))) + '()) (add-after 'install 'patch-sasl-path ;; Give -L arguments for cyrus-sasl to avoid propagation. (lambda* (#:key inputs outputs #:allow-other-keys) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 1fbc2baf33..3b5c707057 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -11,6 +11,8 @@ ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de> +;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> ;;; ;;; This file is part of GNU Guix. @@ -36,6 +38,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages bison) #:use-module (gnu packages boost) @@ -56,6 +59,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages hurd) #:use-module (gnu packages libedit) #:use-module (gnu packages linux) #:use-module (gnu packages lisp) @@ -113,8 +117,8 @@ ;; Note: the 'update-guix-package.scm' script expects this definition to ;; start precisely like this. (let ((version "1.1.0") - (commit "619f9181a363576894a433206008b139255062dd") - (revision 2)) + (commit "52b01cb7007b793c5b21456ac8cdd9f9df5b8b16") + (revision 3)) (package (name "guix") @@ -130,7 +134,7 @@ (commit commit))) (sha256 (base32 - "1lk0h9zgry7m78nv70gxwb57pw1d5yzay477gxsc43v1aa7zg8sp")) + "0rz5vnqvcrccbnrirhrsx3iw4jj75znh3ma9g7szjn313ii3hl1d")) (file-name (string-append "guix-" version "-checkout")))) (build-system gnu-build-system) (arguments @@ -150,7 +154,8 @@ ;; To avoid problems with the length of shebangs, ;; choose a fixed-width and short directory name ;; for tests. - "ac_cv_guix_test_root=/tmp/guix-tests") + "ac_cv_guix_test_root=/tmp/guix-tests" + ,@(if (hurd-target?) '("--with-courage") '())) #:parallel-tests? #f ;work around <http://bugs.gnu.org/21097> #:modules ((guix build gnu-build-system) @@ -181,10 +186,25 @@ $(prefix)/etc/init.d\n"))) (invoke "sh" "bootstrap"))) + (add-before 'build 'use-host-compressors + (lambda* (#:key inputs target #:allow-other-keys) + (when target + ;; Use host compressors. + (let ((bzip2 (assoc-ref inputs "bzip2")) + (gzip (assoc-ref inputs "gzip")) + (xz (assoc-ref inputs "xz"))) + (substitute* "guix/config.scm" + (("\"[^\"]*/bin/bzip2") + (string-append "\"" bzip2 "/bin/bzip2")) + (("\"[^\"]*/bin/gzip") gzip + (string-append "\"" gzip "/bin/gzip")) + (("\"[^\"]*/bin//xz") + (string-append "\"" xz "/bin/xz"))))) + #t)) (add-before 'check 'copy-bootstrap-guile - (lambda* (#:key system inputs #:allow-other-keys) - ;; Copy the bootstrap guile tarball in the store used - ;; by the test suite. + (lambda* (#:key system target inputs #:allow-other-keys) + ;; Copy the bootstrap guile tarball in the store + ;; used by the test suite. (define (intern file recursive?) ;; Note: don't use 'guix download' here because we ;; need to set the 'recursive?' argument. @@ -208,20 +228,21 @@ $(prefix)/etc/init.d\n"))) (invoke "./test-env" "guile" "-c" (object->string code))) - (intern (assoc-ref inputs "boot-guile") #f) + (unless target + (intern (assoc-ref inputs "boot-guile") #f) - ;; On x86_64 some tests need the i686 Guile. - ,@(if (and (not (%current-target-system)) - (string=? (%current-system) - "x86_64-linux")) - '((intern (assoc-ref inputs "boot-guile/i686") #f)) - '()) + ;; On x86_64 some tests need the i686 Guile. + ,@(if (and (not (%current-target-system)) + (string=? (%current-system) + "x86_64-linux")) + '((intern (assoc-ref inputs "boot-guile/i686") #f)) + '()) - ;; Copy the bootstrap executables. - (for-each (lambda (input) - (intern (assoc-ref inputs input) #t)) - '("bootstrap/bash" "bootstrap/mkdir" - "bootstrap/tar" "bootstrap/xz")) + ;; Copy the bootstrap executables. + (for-each (lambda (input) + (intern (assoc-ref inputs input) #t)) + '("bootstrap/bash" "bootstrap/mkdir" + "bootstrap/tar" "bootstrap/xz"))) #t)) (add-after 'unpack 'disable-failing-tests ;; XXX FIXME: These tests fail within the build container. @@ -244,11 +265,14 @@ $(prefix)/etc/init.d\n"))) (setenv "SHELL" (which "sh")) #t)) (add-after 'install 'wrap-program - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs outputs target + #:allow-other-keys) ;; Make sure the 'guix' command finds GnuTLS, ;; Guile-JSON, and Guile-Git automatically. (let* ((out (assoc-ref outputs "out")) - (guile (assoc-ref inputs "guile")) + (guile ,@(if (%current-target-system) + '((assoc-ref native-inputs "guile")) + '((assoc-ref inputs "guile")))) (gcrypt (assoc-ref inputs "guile-gcrypt")) (json (assoc-ref inputs "guile-json")) (sqlite (assoc-ref inputs "guile-sqlite3")) @@ -284,9 +308,24 @@ $(prefix)/etc/init.d\n"))) `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath)) `("GUIX_LOCPATH" ":" suffix (,locpath))) + (when target + ;; XXX Touching wrap-program rebuilds world + (let ((bash (assoc-ref inputs "bash"))) + (substitute* (string-append out "/bin/guix") + (("^#!.*/bash") (string-append "#! " bash "/bin/bash"))))) #t)))))) (native-inputs `(("pkg-config" ,pkg-config) + ;; Guile libraries are needed here for + ;; cross-compilation. + ("guile" ,guile-3.0) + ("gnutls" ,gnutls) + ("guile-gcrypt" ,guile-gcrypt) + ("guile-json" ,guile-json-3) + ("guile-sqlite3" ,guile-sqlite3) + ("guile-ssh" ,guile-ssh) + ("guile-git" ,guile-git) + ;; XXX: Keep the development inputs here even though ;; they're unnecessary, just so that 'guix environment ;; guix' always contains them. @@ -306,7 +345,7 @@ $(prefix)/etc/init.d\n"))) ("sqlite" ,sqlite) ("libgcrypt" ,libgcrypt) - ("guile" ,guile-2.2) + ("guile" ,guile-3.0) ;; Some of the tests use "unshare" when it is available. ("util-linux" ,util-linux) @@ -318,6 +357,10 @@ $(prefix)/etc/init.d\n"))) (string=? (%current-system) "x86_64-linux")) `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux"))) '()) + ,@(if (%current-target-system) + `(("bash" ,bash-minimal) + ("xz" ,xz)) + '()) ;; Tests also rely on these bootstrap executables. ("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system))) @@ -327,7 +370,7 @@ $(prefix)/etc/init.d\n"))) ("glibc-utf8-locales" ,glibc-utf8-locales))) (propagated-inputs - `(("gnutls" ,gnutls) + `(("gnutls" ,(if (%current-target-system) gnutls-3.6.13 guile3.0-gnutls)) ("guile-gcrypt" ,guile-gcrypt) ("guile-json" ,guile-json-3) ("guile-sqlite3" ,guile-sqlite3) @@ -359,7 +402,7 @@ the Nix package manager.") (fold alist-delete (package-native-inputs guix) '("po4a" "graphviz" "help2man"))) (inputs - `(("gnutls" ,gnutls) + `(("gnutls" ,guile3.0-gnutls) ("guile-git" ,guile-git) ("guile-json" ,guile-json-3) ("guile-gcrypt" ,guile-gcrypt) @@ -404,20 +447,35 @@ the Nix package manager.") (invoke "make" "install-binPROGRAMS"))) (delete 'wrap-program))))))) -(define-public guile3.0-guix + +(define-public guile2.2-guix (package (inherit guix) - (name "guile3.0-guix") + (name "guile2.2-guix") + (native-inputs + `(("guile" ,guile-2.2) + ("gnutls" ,guile2.2-gnutls) + ("guile-gcrypt" ,guile2.2-gcrypt) + ("guile-json" ,guile2.2-json) + ("guile-sqlite3" ,guile2.2-sqlite3) + ("guile-ssh" ,guile2.2-ssh) + ("guile-git" ,guile2.2-git) + ,@(fold alist-delete (package-native-inputs guix) + '("guile" "gnutls" "guile-gcrypt" "guile-json" + "guile-sqlite3" "guile-ssh" "guile-git")))) (inputs - `(("guile" ,guile-3.0) + `(("guile" ,guile-2.2) ,@(alist-delete "guile" (package-inputs guix)))) (propagated-inputs - `(("gnutls" ,guile3.0-gnutls) - ("guile-gcrypt" ,guile3.0-gcrypt) - ("guile-json" ,guile3.0-json) - ("guile-sqlite3" ,guile3.0-sqlite3) - ("guile-ssh" ,guile3.0-ssh) - ("guile-git" ,guile3.0-git))))) + `(("gnutls" ,gnutls) + ("guile-gcrypt" ,guile2.2-gcrypt) + ("guile-json" ,guile2.2-json) + ("guile-sqlite3" ,guile2.2-sqlite3) + ("guile-ssh" ,guile2.2-ssh) + ("guile-git" ,guile2.2-git))))) + +(define-public guile3.0-guix + (deprecated-package "guile3.0-guix" guix)) (define-public guix-minimal ;; A version of Guix which is built with the minimal set of dependencies, as @@ -825,12 +883,12 @@ written entirely in Python."))) (inputs `(("guile" ,guile-3.0))) (propagated-inputs - `(("guix" ,guile3.0-guix) - ("guile-commonmark" ,guile3.0-commonmark) - ("guile-gcrypt" ,guile3.0-gcrypt) - ("guile-pfds" ,guile3.0-pfds) - ("guile-syntax-highlight" ,guile3.0-syntax-highlight) - ("guile-wisp" ,guile3.0-wisp))) + `(("guix" ,guix) + ("guile-commonmark" ,guile-commonmark) + ("guile-gcrypt" ,guile-gcrypt) + ("guile-pfds" ,guile-pfds) + ("guile-syntax-highlight" ,guile-syntax-highlight) + ("guile-wisp" ,guile-wisp))) (home-page "https://workflows.guix.info") (synopsis "Workflow management extension for GNU Guix") (description "The @dfn{Guix Workflow Language} (GWL) provides an @@ -855,6 +913,14 @@ environments.") (sha256 (base32 "01z7jjkc7r7lj6637rcgpz40v8xqqyfp6871h94yvcnwm7zy9h1n")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Allow builds with Guile 3.0. + (substitute* "configure.ac" + (("^GUILE_PKG.*") + "GUILE_PKG([3.0 2.2])\n")) + #t)) (file-name (string-append "guix-jupyter-" version "-checkout")))) (build-system gnu-build-system) (arguments @@ -913,7 +979,7 @@ environments.") ("python-ipykernel" ,python-ipykernel))) (inputs `(("guix" ,guix) - ("guile" ,guile-2.2))) + ("guile" ,guile-3.0))) (propagated-inputs `(("guile-json" ,guile-json-3) ("guile-simple-zmq" ,guile-simple-zmq) @@ -981,7 +1047,7 @@ Microsoft cabinet (.@dfn{CAB}) files.") ("glib" ,glib) ("libgsf" ,libgsf) ("libxml2" ,libxml2) - ("uuid" ,util-linux))) + ("uuid" ,util-linux "lib"))) (home-page "https://wiki.gnome.org/msitools") (synopsis "Windows Installer file manipulation tool") (description diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index 3cc82e8ced..4f5ac1029f 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -215,7 +215,7 @@ algorithms AES or Twofish.") ("zip" ,zip))) (inputs `(("curl" ,curl) ("file" ,file) - ("libuuid" ,util-linux) + ("libuuid" ,util-linux "lib") ("libxt" ,libxt) ("libxtst" ,libxtst) ("openssl" ,openssl) diff --git a/gnu/packages/patches/aegisub-make43.patch b/gnu/packages/patches/aegisub-make43.patch new file mode 100644 index 0000000000..32f9d7749c --- /dev/null +++ b/gnu/packages/patches/aegisub-make43.patch @@ -0,0 +1,20 @@ +Fix build with GNU Make 4.3: + +https://github.com/Aegisub/Aegisub/issues/171 + +Patch taken from upstream: + +https://github.com/Aegisub/Aegisub/commit/6bd3f4c26b8fc1f76a8b797fcee11e7611d59a39 + +diff --git a/Makefile.target b/Makefile.target +--- a/Makefile.target ++++ b/Makefile.target +@@ -112,7 +112,7 @@ POST_FLAGS = $($@_FLAGS) -c -o $@ $< + # Libraries contain all object files they depend on (but they may depend on other files) + # Not using libtool on OS X because it has an unsilenceable warning about a + # compatibility issue with BSD 4.3 (wtf) +-lib%.a: $$($$*_OBJ) ++lib%.a: $$($$(*F)_OBJ) + @$(BIN_MKDIR_P) $(dir $@) + $(BIN_AR) cru $@ $(filter %.o,$^) + $(BIN_RANLIB) $@ diff --git a/gnu/packages/patches/aspell-default-dict-dir.patch b/gnu/packages/patches/aspell-default-dict-dir.patch index 17a6ff606f..5f759a66d9 100644 --- a/gnu/packages/patches/aspell-default-dict-dir.patch +++ b/gnu/packages/patches/aspell-default-dict-dir.patch @@ -8,12 +8,34 @@ However it is necessary for applications that use libaspell since --- a/common/config.cpp +++ b/common/config.cpp +@@ -651,7 +651,20 @@ namespace acommon { + } else { // sep == '|' + assert(replace[0] == '$'); + const char * env = getenv(replace.c_str()+1); +- final_str += env ? env : second; ++ if (env) { ++ final_str += env; ++ } else if (second[0] == '$') { ++ // Expand the right-hand side of '|', which starts with a ++ // reference to an environment variable. ++ auto slash = second.find('/'); ++ String variable = second.substr(1, slash - 1); ++ const char * env = getenv(variable.c_str()); ++ String value = env ? String(env) : ""; ++ value += second.substr(slash, second.size() - slash); ++ final_str += value; ++ } else { ++ final_str += second; ++ } + } + replace = ""; + in_replace = false; @@ -1349,6 +1349,9 @@ namespace acommon { # define REPL ".aspell.<lang>.prepl" #endif +#undef DICT_DIR -+#define DICT_DIR "<$ASPELL_DICT_DIR|home-dir/.guix-profile/lib/aspell>" ++#define DICT_DIR "<$ASPELL_DICT_DIR|$HOME/.guix-profile/lib/aspell>" + static const KeyInfo config_keys[] = { // the description should be under 50 chars diff --git a/gnu/packages/patches/aspell-gcc-compat.patch b/gnu/packages/patches/aspell-gcc-compat.patch deleted file mode 100644 index 94c44f8fb6..0000000000 --- a/gnu/packages/patches/aspell-gcc-compat.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix GCC7 warnings. - -Taken from upstream: -https://git.savannah.gnu.org/cgit/aspell.git/commit/?id=8089fa02122fed0a6394eba14bbedcb1d18e2384 - -diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp -index a979539..19ab63c 100644 ---- a/modules/filter/tex.cpp -+++ b/modules/filter/tex.cpp -@@ -174,7 +174,7 @@ namespace { - - if (c == '{') { - -- if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0') -+ if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0') - push_command(Parm); - - top.in_what = Parm; -diff --git a/prog/check_funs.cpp b/prog/check_funs.cpp -index db54f3d..89ee09d 100644 ---- a/prog/check_funs.cpp -+++ b/prog/check_funs.cpp -@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) { - } - } - if (i == width-1) { -- if (word == '\0') -+ if (*word == '\0') - put(out,' '); - else if (word[len] == '\0') - put(out, word, len); diff --git a/gnu/packages/patches/avahi-CVE-2018-1000845.patch b/gnu/packages/patches/avahi-CVE-2018-1000845.patch deleted file mode 100644 index e5b13e0bee..0000000000 --- a/gnu/packages/patches/avahi-CVE-2018-1000845.patch +++ /dev/null @@ -1,42 +0,0 @@ -From e111def44a7df4624a4aa3f85fe98054bffb6b4f Mon Sep 17 00:00:00 2001 -From: Trent Lloyd <trent@lloyd.id.au> -Date: Sat, 22 Dec 2018 09:06:07 +0800 -Subject: [PATCH] Drop legacy unicast queries from address not on local link - -When handling legacy unicast queries, ensure that the source IP is -inside a subnet on the local link, otherwise drop the packet. - -Fixes #145 -Fixes #203 -CVE-2017-6519 -CVE-2018-100084 ---- - avahi-core/server.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/avahi-core/server.c b/avahi-core/server.c -index a2cb19a8..a2580e38 100644 ---- a/avahi-core/server.c -+++ b/avahi-core/server.c -@@ -930,6 +930,7 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres - - if (avahi_dns_packet_is_query(p)) { - int legacy_unicast = 0; -+ char t[AVAHI_ADDRESS_STR_MAX]; - - /* For queries EDNS0 might allow ARCOUNT != 0. We ignore the - * AR section completely here, so far. Until the day we add -@@ -947,6 +948,13 @@ static void dispatch_packet(AvahiServer *s, AvahiDnsPacket *p, const AvahiAddres - legacy_unicast = 1; - } - -+ if (!is_mdns_mcast_address(dst_address) && -+ !avahi_interface_address_on_link(i, src_address)) { -+ -+ avahi_log_debug("Received non-local unicast query from host %s on interface '%s.%i'.", avahi_address_snprint(t, sizeof(t), src_address), i->hardware->name, i->protocol); -+ return; -+ } -+ - if (legacy_unicast) - reflect_legacy_unicast_query_packet(s, p, i, src_address, port); - diff --git a/gnu/packages/patches/bash-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-linux-pgrp-pipe.patch new file mode 100644 index 0000000000..234a55e897 --- /dev/null +++ b/gnu/packages/patches/bash-linux-pgrp-pipe.patch @@ -0,0 +1,32 @@ +Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of +the kernel version in use on the build machine. + +--- configure.ac.orig 2019-01-02 09:38:44.000000000 -0500 ++++ configure.ac 2019-08-15 16:40:24.271758379 -0400 +@@ -1108,10 +1108,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[[0123]]*) : ;; +- *) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; +--- configure.orig 2019-01-02 09:43:04.000000000 -0500 ++++ configure 2019-08-15 16:41:44.440155912 -0400 +@@ -16312,11 +16312,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[0123]*) : ;; +- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[67]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; diff --git a/gnu/packages/patches/bc-fix-cross-compilation.patch b/gnu/packages/patches/bc-fix-cross-compilation.patch new file mode 100644 index 0000000000..14dfecdbde --- /dev/null +++ b/gnu/packages/patches/bc-fix-cross-compilation.patch @@ -0,0 +1,171 @@ +Patch taken from nix. + +commit fdda59736ddc048cf38a2c7103f4f5d9eeaf995e +Author: Ben Gamari <ben@smart-cactus.org> +Date: Tue Oct 17 10:51:34 2017 -0400 + + Try implementing cross-compilation + +diff --git a/bc/Makefile.am b/bc/Makefile.am +index d9d412e..fdef633 100644 +--- a/bc/Makefile.am ++++ b/bc/Makefile.am +@@ -17,6 +17,7 @@ MAINTAINERCLEANFILES = Makefile.in bc.c bc.h scan.c \ + + AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../h + LIBBC = ../lib/libbc.a ++LIBBC_HOST = ../lib/libbc_host.a + LIBL = @LEXLIB@ + LDADD = $(LIBBC) $(LIBL) @READLINELIB@ + +@@ -29,12 +30,20 @@ $(PROGRAMS): libmath.h $(LIBBC) + scan.o: bc.h + global.o: libmath.h ++ ++main_host.c : main.c ++ cp $< $@ + +-fbcOBJ = main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o ++fbcOBJ = $(addsuffix _host,main.o bc.o scan.o execute.o load.o storage.o util.o warranty.o) ++ ++%.o_host : CC:=$(CC_FOR_BUILD) ++ ++%.o_host : %.c ++ $(COMPILE) -c $(CFLAGS) $(INCLUDES) -o $@ $< + +-libmath.h: libmath.b $(fbcOBJ) $(LIBBC) ++libmath.h: libmath.b $(fbcOBJ) $(LIBBC_HOST) + echo '{0}' > libmath.h +- $(MAKE) global.o +- $(LINK) -o fbc $(fbcOBJ) global.o $(LIBBC) $(LIBL) $(READLINELIB) $(LIBS) ++ $(MAKE) global.o_host ++ $(CC_FOR_BUILD) -o fbc $(fbcOBJ) global.o_host $(LIBBC_HOST) $(LIBL) ${READLINELIB} $(LIBS) + ./fbc -c $(srcdir)/libmath.b </dev/null >libmath.h + $(srcdir)/fix-libmath_h + rm -f ./fbc ./global.o +diff --git a/configure.ac b/configure.ac +index fc74573..5cabb73 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,6 +20,7 @@ m4_define([dc_version], 1.4.1) + + AC_INIT([bc],[bc_version]) + AC_CONFIG_SRCDIR(doc/bc.1) ++AC_CONFIG_MACRO_DIR([m4]) + AM_INIT_AUTOMAKE([dist-bzip2]) + AC_CONFIG_HEADERS(config.h) + +@@ -35,6 +36,7 @@ AC_DEFINE([DC_COPYRIGHT], + [Define the dc copyright line.]) + + AC_PROG_CC ++AX_CC_FOR_BUILD + AC_USE_SYSTEM_EXTENSIONS + + AM_PROG_LEX +diff --git a/lib/Makefile.am b/lib/Makefile.am +index ec4bf59..c670f5b 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -1,5 +1,5 @@ + ## Process this file with automake to produce Makefile.in +-noinst_LIBRARIES = libbc.a ++noinst_LIBRARIES = libbc.a libbc_host.a + + AM_CPPFLAGS = -I. -I.. -I$(srcdir)/../h + +@@ -24,3 +24,11 @@ testmul: testmul.o number.o + + specialnumber: newnumber.o + cp newnumber.o number.o ++ ++%.o_host : CC:=$(CC_FOR_BUILD) ++%.o_host : %.c ++ $(COMPILE) -c $(CFLAGS) $(INCLUDES) -o $@ $< ++ ++libbc_host.a : $(addsuffix _host,$(libbc_a_OBJECTS)) ++ ar cru $@ $+ ++ ranlib $@ +diff --git a/m4/cc_for_build.m4 b/m4/cc_for_build.m4 +new file mode 100644 +index 0000000..c62ffad +--- /dev/null ++++ b/m4/cc_for_build.m4 +@@ -0,0 +1,77 @@ ++# =========================================================================== ++# https://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CC_FOR_BUILD ++# ++# DESCRIPTION ++# ++# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD. ++# ++# LICENSE ++# ++# Copyright (c) 2010 Reuben Thomas <rrt@sc3d.org> ++# Copyright (c) 1999 Richard Henderson <rth@redhat.com> ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program 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 General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see <https://www.gnu.org/licenses/>. ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 3 ++ ++dnl Get a default for CC_FOR_BUILD to put into Makefile. ++AC_DEFUN([AX_CC_FOR_BUILD], ++[# Put a plausible default for CC_FOR_BUILD in Makefile. ++if test -z "$CC_FOR_BUILD"; then ++ if test "x$cross_compiling" = "xno"; then ++ CC_FOR_BUILD='$(CC)' ++ else ++ CC_FOR_BUILD=gcc ++ fi ++fi ++AC_SUBST(CC_FOR_BUILD) ++# Also set EXEEXT_FOR_BUILD. ++if test "x$cross_compiling" = "xno"; then ++ EXEEXT_FOR_BUILD='$(EXEEXT)' ++else ++ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext, ++ [rm -f conftest* ++ echo 'int main () { return 0; }' > conftest.c ++ bfd_cv_build_exeext= ++ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 ++ for file in conftest.*; do ++ case $file in ++ *.c | *.o | *.obj | *.ilk | *.pdb) ;; ++ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; ++ esac ++ done ++ rm -f conftest* ++ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) ++ EXEEXT_FOR_BUILD="" ++ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} ++fi ++AC_SUBST(EXEEXT_FOR_BUILD)])dnl diff --git a/gnu/packages/patches/behave-skip-a-couple-of-tests.patch b/gnu/packages/patches/behave-skip-a-couple-of-tests.patch new file mode 100644 index 0000000000..e3d4e15241 --- /dev/null +++ b/gnu/packages/patches/behave-skip-a-couple-of-tests.patch @@ -0,0 +1,462 @@ +Fix build with Python 3.8, this is a patch based on upstream commit [1]. + +1: c000c88eb5239b87f299c85e83b349b0ef387ae7 + + +diff --git a/behave.ini b/behave.ini +index 45c0f0d7..952240d6 100644 +--- a/behave.ini ++++ b/behave.ini +@@ -15,8 +15,9 @@ show_skipped = false + format = rerun + progress3 + outfiles = rerun.txt +- reports/report_progress3.txt ++ build/behave.reports/report_progress3.txt + junit = true ++junit_directory = build/behave.reports + logging_level = INFO + # logging_format = LOG.%(levelname)-8s %(name)-10s: %(message)s + # logging_format = LOG.%(levelname)-8s %(asctime)s %(name)-10s: %(message)s +diff --git a/features/environment.py b/features/environment.py +index 4744e89a..3769ee40 100644 +--- a/features/environment.py ++++ b/features/environment.py +@@ -1,5 +1,7 @@ + # -*- coding: UTF-8 -*- ++# FILE: features/environemnt.py + ++from __future__ import absolute_import, print_function + from behave.tag_matcher import ActiveTagMatcher, setup_active_tag_values + from behave4cmd0.setup_command_shell import setup_command_shell_processors4behave + import platform +@@ -20,6 +22,15 @@ + } + active_tag_matcher = ActiveTagMatcher(active_tag_value_provider) + ++ ++def print_active_tags_summary(): ++ active_tag_data = active_tag_value_provider ++ print("ACTIVE-TAG SUMMARY:") ++ print("use.with_python.version=%s" % active_tag_data.get("python.version")) ++ # print("use.with_os=%s" % active_tag_data.get("os")) ++ print() ++ ++ + # ----------------------------------------------------------------------------- + # HOOKS: + # ----------------------------------------------------------------------------- +@@ -30,11 +41,14 @@ def before_all(context): + setup_python_path() + setup_context_with_global_params_test(context) + setup_command_shell_processors4behave() ++ print_active_tags_summary() ++ + + def before_feature(context, feature): + if active_tag_matcher.should_exclude_with(feature.tags): + feature.skip(reason=active_tag_matcher.exclude_reason) + ++ + def before_scenario(context, scenario): + if active_tag_matcher.should_exclude_with(scenario.effective_tags): + scenario.skip(reason=active_tag_matcher.exclude_reason) +diff --git a/features/step.duplicated_step.feature b/features/step.duplicated_step.feature +index 59888b0f..396cca27 100644 +--- a/features/step.duplicated_step.feature ++++ b/features/step.duplicated_step.feature +@@ -32,11 +32,11 @@ Feature: Duplicated Step Definitions + AmbiguousStep: @given('I call Alice') has already been defined in + existing step @given('I call Alice') at features/steps/alice_steps.py:3 + """ +- And the command output should contain: +- """ +- File "features/steps/alice_steps.py", line 7, in <module> +- @given(u'I call Alice') +- """ ++ # -- DISABLED: Python 3.8 traceback line numbers differ w/ decorators (+1). ++ # And the command output should contain: ++ # """ ++ # File "features/steps/alice_steps.py", line 7, in <module> ++ # """ + + + Scenario: Duplicated Step Definition in another File +@@ -70,11 +70,11 @@ Feature: Duplicated Step Definitions + AmbiguousStep: @given('I call Bob') has already been defined in + existing step @given('I call Bob') at features/steps/bob1_steps.py:3 + """ +- And the command output should contain: +- """ +- File "features/steps/bob2_steps.py", line 3, in <module> +- @given('I call Bob') +- """ ++ # -- DISABLED: Python 3.8 traceback line numbers differ w/ decorators (+1). ++ # And the command output should contain: ++ # """ ++ # File "features/steps/bob2_steps.py", line 3, in <module> ++ # """ + + @xfail + Scenario: Duplicated Same Step Definition via import from another File +diff --git a/issue.features/environment.py b/issue.features/environment.py +index 2dfec751..7e48ee03 100644 +--- a/issue.features/environment.py ++++ b/issue.features/environment.py +@@ -1,5 +1,5 @@ + # -*- coding: UTF-8 -*- +-# FILE: features/environment.py ++# FILE: issue.features/environemnt.py + # pylint: disable=unused-argument + """ + Functionality: +@@ -7,17 +7,20 @@ + * active tags + """ + +-from __future__ import print_function ++ ++from __future__ import absolute_import, print_function + import sys + import platform + import os.path + import six + from behave.tag_matcher import ActiveTagMatcher + from behave4cmd0.setup_command_shell import setup_command_shell_processors4behave +-# PREPARED: +-# from behave.tag_matcher import setup_active_tag_values ++# PREPARED: from behave.tag_matcher import setup_active_tag_values + + ++# --------------------------------------------------------------------------- ++# TEST SUPPORT: For Active Tags ++# --------------------------------------------------------------------------- + def require_tool(tool_name): + """Check if a tool (an executable program) is provided on this platform. + +@@ -45,12 +48,14 @@ def require_tool(tool_name): + # print("TOOL-NOT-FOUND: %s" % tool_name) + return False + ++ + def as_bool_string(value): + if bool(value): + return "yes" + else: + return "no" + ++ + def discover_ci_server(): + # pylint: disable=invalid-name + ci_server = "none" +@@ -67,11 +72,17 @@ def discover_ci_server(): + return ci_server + + ++# --------------------------------------------------------------------------- ++# BEHAVE SUPPORT: Active Tags ++# --------------------------------------------------------------------------- + # -- MATCHES ANY TAGS: @use.with_{category}={value} + # NOTE: active_tag_value_provider provides category values for active tags. ++python_version = "%s.%s" % sys.version_info[:2] + active_tag_value_provider = { ++ "platform": sys.platform, + "python2": str(six.PY2).lower(), + "python3": str(six.PY3).lower(), ++ "python.version": python_version, + # -- python.implementation: cpython, pypy, jython, ironpython + "python.implementation": platform.python_implementation().lower(), + "pypy": str("__pypy__" in sys.modules).lower(), +@@ -82,17 +92,33 @@ def discover_ci_server(): + } + active_tag_matcher = ActiveTagMatcher(active_tag_value_provider) + ++ ++def print_active_tags_summary(): ++ active_tag_data = active_tag_value_provider ++ print("ACTIVE-TAG SUMMARY:") ++ print("use.with_python.version=%s" % active_tag_data.get("python.version")) ++ # print("use.with_platform=%s" % active_tag_data.get("platform")) ++ # print("use.with_os=%s" % active_tag_data.get("os")) ++ print() ++ ++ ++# --------------------------------------------------------------------------- ++# BEHAVE HOOKS: ++# --------------------------------------------------------------------------- + def before_all(context): + # -- SETUP ACTIVE-TAG MATCHER (with userdata): + # USE: behave -D browser=safari ... +- # NOT-NEEDED: setup_active_tag_values(active_tag_value_provider, +- # context.config.userdata) ++ # NOT-NEEDED: ++ # setup_active_tag_values(active_tag_value_provider, context.config.userdata) + setup_command_shell_processors4behave() ++ print_active_tags_summary() ++ + + def before_feature(context, feature): + if active_tag_matcher.should_exclude_with(feature.tags): + feature.skip(reason=active_tag_matcher.exclude_reason) + ++ + def before_scenario(context, scenario): + if active_tag_matcher.should_exclude_with(scenario.effective_tags): + scenario.skip(reason=active_tag_matcher.exclude_reason) +diff --git a/issue.features/issue0330.feature b/issue.features/issue0330.feature +index dc1ebe75..81cb6e29 100644 +--- a/issue.features/issue0330.feature ++++ b/issue.features/issue0330.feature +@@ -70,6 +70,7 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s + And note that "bob.feature is skipped" + + ++ @not.with_python.version=3.8 + Scenario: Junit report for skipped feature is created with --show-skipped + When I run "behave --junit -t @tag1 --show-skipped @alice_and_bob.featureset" + Then it should pass with: +@@ -83,6 +84,23 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s + <testsuite errors="0" failures="0" name="bob.Bob" skipped="1" tests="1" time="0.0"> + """ + ++ @use.with_python.version=3.8 ++ Scenario: Junit report for skipped feature is created with --show-skipped ++ When I run "behave --junit -t @tag1 --show-skipped @alice_and_bob.featureset" ++ Then it should pass with: ++ """ ++ 1 feature passed, 0 failed, 1 skipped ++ """ ++ And a file named "test_results/TESTS-alice.xml" exists ++ And a file named "test_results/TESTS-bob.xml" exists ++ And the file "test_results/TESTS-bob.xml" should contain: ++ """ ++ <testsuite name="bob.Bob" tests="1" errors="0" failures="0" skipped="1" time="0.0"> ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # <testsuite errors="0" failures="0" name="bob.Bob" skipped="1" tests="1" time="0.0"> ++ ++ @not.with_python.version=3.8 + Scenario: Junit report for skipped scenario is neither shown nor counted with --no-skipped + When I run "behave --junit -t @tag1 --no-skipped" + Then it should pass with: +@@ -102,7 +120,30 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s + """ + And note that "Charly2 is the skipped scenarion in charly.feature" + ++ @use.with_python.version=3.8 ++ Scenario: Junit report for skipped scenario is neither shown nor counted with --no-skipped ++ When I run "behave --junit -t @tag1 --no-skipped" ++ Then it should pass with: ++ """ ++ 2 features passed, 0 failed, 1 skipped ++ 2 scenarios passed, 0 failed, 2 skipped ++ """ ++ And a file named "test_results/TESTS-alice.xml" exists ++ And a file named "test_results/TESTS-charly.xml" exists ++ And the file "test_results/TESTS-charly.xml" should contain: ++ """ ++ <testsuite name="charly.Charly" tests="1" errors="0" failures="0" skipped="0" ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # <testsuite errors="0" failures="0" name="charly.Charly" skipped="0" tests="1" ++ And the file "test_results/TESTS-charly.xml" should not contain: ++ """ ++ <testcase classname="charly.Charly" name="Charly2" ++ """ ++ And note that "Charly2 is the skipped scenarion in charly.feature" ++ + ++ @not.with_python.version=3.8 + Scenario: Junit report for skipped scenario is shown and counted with --show-skipped + When I run "behave --junit -t @tag1 --show-skipped" + Then it should pass with: +@@ -122,3 +163,26 @@ Feature: Issue #330: Skipped scenarios are included in junit reports when --no-s + """ + And note that "Charly2 is the skipped scenarion in charly.feature" + ++ ++ @use.with_python.version=3.8 ++ Scenario: Junit report for skipped scenario is shown and counted with --show-skipped ++ When I run "behave --junit -t @tag1 --show-skipped" ++ Then it should pass with: ++ """ ++ 2 features passed, 0 failed, 1 skipped ++ 2 scenarios passed, 0 failed, 2 skipped ++ """ ++ And a file named "test_results/TESTS-alice.xml" exists ++ And a file named "test_results/TESTS-charly.xml" exists ++ And the file "test_results/TESTS-charly.xml" should contain: ++ """ ++ <testsuite name="charly.Charly" tests="2" errors="0" failures="0" skipped="1" ++ """ ++ # HINT: Python < 3.8 ++ # <testsuite errors="0" failures="0" name="charly.Charly" skipped="1" tests="2" ++ And the file "test_results/TESTS-charly.xml" should contain: ++ """ ++ <testcase classname="charly.Charly" name="Charly2" status="skipped" ++ """ ++ And note that "Charly2 is the skipped scenarion in charly.feature" ++ +diff --git a/issue.features/issue0446.feature b/issue.features/issue0446.feature +index a2ed892d..901bdec5 100644 +--- a/issue.features/issue0446.feature ++++ b/issue.features/issue0446.feature +@@ -58,6 +58,7 @@ Feature: Issue #446 -- Support scenario hook-errors with JUnitReporter + behave.reporter.junit.show_hostname = False + """ + ++ @not.with_python.version=3.8 + Scenario: Hook error in before_scenario() + When I run "behave -f plain --junit features/before_scenario_failure.feature" + Then it should fail with: +@@ -86,6 +87,40 @@ Feature: Issue #446 -- Support scenario hook-errors with JUnitReporter + And note that "the traceback is contained in the XML element <error/>" + + ++ @use.with_python.version=3.8 ++ Scenario: Hook error in before_scenario() ++ When I run "behave -f plain --junit features/before_scenario_failure.feature" ++ Then it should fail with: ++ """ ++ 0 scenarios passed, 1 failed, 0 skipped ++ """ ++ And the command output should contain: ++ """ ++ HOOK-ERROR in before_scenario: RuntimeError: OOPS ++ """ ++ And the file "reports/TESTS-before_scenario_failure.xml" should contain: ++ """ ++ <testsuite name="before_scenario_failure.Alice" tests="1" errors="1" failures="0" skipped="0" ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # <testsuite errors="1" failures="0" name="before_scenario_failure.Alice" skipped="0" tests="1" ++ And the file "reports/TESTS-before_scenario_failure.xml" should contain: ++ """ ++ <error type="RuntimeError" message="HOOK-ERROR in before_scenario: RuntimeError: OOPS"> ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # <error message="HOOK-ERROR in before_scenario: RuntimeError: OOPS" type="RuntimeError"> ++ And the file "reports/TESTS-before_scenario_failure.xml" should contain: ++ """ ++ File "features/environment.py", line 6, in before_scenario ++ cause_hook_failure() ++ File "features/environment.py", line 2, in cause_hook_failure ++ raise RuntimeError("OOPS") ++ """ ++ And note that "the traceback is contained in the XML element <error/>" ++ ++ ++ @not.with_python.version=3.8 + Scenario: Hook error in after_scenario() + When I run "behave -f plain --junit features/after_scenario_failure.feature" + Then it should fail with: +@@ -114,3 +149,38 @@ Feature: Issue #446 -- Support scenario hook-errors with JUnitReporter + raise RuntimeError("OOPS") + """ + And note that "the traceback is contained in the XML element <error/>" ++ ++ ++ @use.with_python.version=3.8 ++ Scenario: Hook error in after_scenario() ++ When I run "behave -f plain --junit features/after_scenario_failure.feature" ++ Then it should fail with: ++ """ ++ 0 scenarios passed, 1 failed, 0 skipped ++ """ ++ And the command output should contain: ++ """ ++ Scenario: B1 ++ Given another step passes ... passed ++ HOOK-ERROR in after_scenario: RuntimeError: OOPS ++ """ ++ And the file "reports/TESTS-after_scenario_failure.xml" should contain: ++ """ ++ <testsuite name="after_scenario_failure.Bob" tests="1" errors="1" failures="0" skipped="0" ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # <testsuite errors="1" failures="0" name="after_scenario_failure.Bob" skipped="0" tests="1" ++ And the file "reports/TESTS-after_scenario_failure.xml" should contain: ++ """ ++ <error type="RuntimeError" message="HOOK-ERROR in after_scenario: RuntimeError: OOPS"> ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # <error message="HOOK-ERROR in after_scenario: RuntimeError: OOPS" type="RuntimeError"> ++ And the file "reports/TESTS-after_scenario_failure.xml" should contain: ++ """ ++ File "features/environment.py", line 10, in after_scenario ++ cause_hook_failure() ++ File "features/environment.py", line 2, in cause_hook_failure ++ raise RuntimeError("OOPS") ++ """ ++ And note that "the traceback is contained in the XML element <error/>" +diff --git a/issue.features/issue0457.feature b/issue.features/issue0457.feature +index f80640e9..46f96e9c 100644 +--- a/issue.features/issue0457.feature ++++ b/issue.features/issue0457.feature +@@ -24,6 +24,7 @@ Feature: Issue #457 -- Double-quotes in error messages of JUnit XML reports + """ + + ++ @not.with_python.version=3.8 + Scenario: Use failing assertation in a JUnit XML report + Given a file named "features/fails1.feature" with: + """ +@@ -44,6 +45,31 @@ Feature: Issue #457 -- Double-quotes in error messages of JUnit XML reports + <failure message="FAILED: My name is "Alice"" + """ + ++ @use.with_python.version=3.8 ++ Scenario: Use failing assertation in a JUnit XML report ++ Given a file named "features/fails1.feature" with: ++ """ ++ Feature: ++ Scenario: Alice ++ Given a step fails with message: ++ ''' ++ My name is "Alice" ++ ''' ++ """ ++ When I run "behave --junit features/fails1.feature" ++ Then it should fail with: ++ """ ++ 0 scenarios passed, 1 failed, 0 skipped ++ """ ++ And the file "reports/TESTS-fails1.xml" should contain: ++ """ ++ <failure type="AssertionError" message="FAILED: My name is "Alice""> ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # <failure message="FAILED: My name is "Alice"" ++ ++ ++ @not.with_python.version=3.8 + Scenario: Use exception in a JUnit XML report + Given a file named "features/fails2.feature" with: + """ +@@ -63,3 +89,26 @@ Feature: Issue #457 -- Double-quotes in error messages of JUnit XML reports + """ + <error message="My name is "Bob" and <here> I am" + """ ++ ++ @use.with_python.version=3.8 ++ Scenario: Use exception in a JUnit XML report ++ Given a file named "features/fails2.feature" with: ++ """ ++ Feature: ++ Scenario: Bob ++ Given a step fails with error and message: ++ ''' ++ My name is "Bob" and <here> I am ++ ''' ++ """ ++ When I run "behave --junit features/fails2.feature" ++ Then it should fail with: ++ """ ++ 0 scenarios passed, 1 failed, 0 skipped ++ """ ++ And the file "reports/TESTS-fails2.xml" should contain: ++ """ ++ <error type="RuntimeError" message="My name is "Bob" and <here> I am"> ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # <error message="My name is "Bob" and <here> I am" diff --git a/gnu/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch b/gnu/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch new file mode 100644 index 0000000000..f4bca3ecb1 --- /dev/null +++ b/gnu/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch @@ -0,0 +1,50 @@ +Adjust libsanitizer to ABI change in glibc 2.31. + +Adapted to 3.x from this upstream commit: +https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce + +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1130,8 +1130,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); + #ifndef __GLIBC_PREREQ + #define __GLIBC_PREREQ(x, y) 0 + #endif +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -188,17 +188,16 @@ namespace __sanitizer { + unsigned __seq; + u64 __unused1; + u64 __unused2; +-#elif defined(__mips__) || defined(__aarch64__) +- unsigned int mode; +- unsigned short __seq; +- unsigned short __pad1; +- unsigned long __unused1; +- unsigned long __unused2; ++#elif defined(__sparc__) ++ unsigned mode; ++ unsigned short __pad2; ++ unsigned short __seq; ++ unsigned long long __unused1; ++ unsigned long long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; +- unsigned short __seq; +- unsigned short __pad2; ++ unsigned int mode; ++ unsigned short __seq; ++ unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) + u64 __unused1; + u64 __unused2; diff --git a/gnu/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch b/gnu/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch new file mode 100644 index 0000000000..2598a1bdeb --- /dev/null +++ b/gnu/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch @@ -0,0 +1,50 @@ +Adjust libsanitizer to ABI change in glibc 2.31. + +Adapted to 3.x from this upstream commit: +https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce + +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1139,8 +1139,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -194,17 +194,16 @@ namespace __sanitizer { + unsigned __seq; + u64 __unused1; + u64 __unused2; +-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) +- unsigned int mode; +- unsigned short __seq; +- unsigned short __pad1; +- unsigned long __unused1; +- unsigned long __unused2; ++#elif defined(__sparc__) ++ unsigned mode; ++ unsigned short __pad2; ++ unsigned short __seq; ++ unsigned long long __unused1; ++ unsigned long long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; +- unsigned short __seq; +- unsigned short __pad2; ++ unsigned int mode; ++ unsigned short __seq; ++ unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) + u64 __unused1; + u64 __unused2; diff --git a/gnu/packages/patches/clang-runtime-9-libsanitizer-mode-field.patch b/gnu/packages/patches/clang-runtime-9-libsanitizer-mode-field.patch new file mode 100644 index 0000000000..ebb080ed9d --- /dev/null +++ b/gnu/packages/patches/clang-runtime-9-libsanitizer-mode-field.patch @@ -0,0 +1,60 @@ +Adjust libsanitizer to ABI change in glibc 2.31. + +Taken from this upstream commit: +https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce + +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1126,8 +1126,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -203,28 +203,15 @@ namespace __sanitizer { + u64 __unused1; + u64 __unused2; + #elif defined(__sparc__) +-#if defined(__arch64__) +- unsigned mode; +- unsigned short __pad1; +-#else +- unsigned short __pad1; +- unsigned short mode; +- unsigned short __pad2; +-#endif +- unsigned short __seq; +- unsigned long long __unused1; +- unsigned long long __unused2; +-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) +- unsigned int mode; +- unsigned short __seq; +- unsigned short __pad1; +- unsigned long __unused1; +- unsigned long __unused2; ++ unsigned mode; ++ unsigned short __pad2; ++ unsigned short __seq; ++ unsigned long long __unused1; ++ unsigned long long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; +- unsigned short __seq; +- unsigned short __pad2; ++ unsigned int mode; ++ unsigned short __seq; ++ unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) + u64 __unused1; + u64 __unused2; diff --git a/gnu/packages/patches/cmake-curl-certificates.patch b/gnu/packages/patches/cmake-curl-certificates.patch index 36252083f8..7fe2615271 100644 --- a/gnu/packages/patches/cmake-curl-certificates.patch +++ b/gnu/packages/patches/cmake-curl-certificates.patch @@ -6,19 +6,19 @@ as well as /etc/ssl/certs. --- cmake-3.13.1/Source/cmCurl.cxx 2019-09-10 17:27:36.926907260 +0200 +++ cmake-3.13.1/Source/cmCurl.cxx 2019-09-10 17:52:35.475903919 +0200 -@@ -4,11 +4,8 @@ - - #include "cmThirdParty.h" +@@ -2,11 +2,8 @@ + file Copyright.txt or https://cmake.org/licensing for details. */ + #include "cmCurl.h" -#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ - !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) # define CMAKE_FIND_CAFILE # include "cmSystemTools.h" -#endif + #include "cmStringAlgorithms.h" // curl versions before 7.21.5 did not provide this error code - #if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505 -@@ -29,6 +26,19 @@ std::string cmCurlSetCAInfo(::CURL* curl +@@ -30,6 +27,19 @@ ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile); check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); } diff --git a/gnu/packages/patches/coreutils-ls.patch b/gnu/packages/patches/coreutils-ls.patch new file mode 100644 index 0000000000..59cbbf00b5 --- /dev/null +++ b/gnu/packages/patches/coreutils-ls.patch @@ -0,0 +1,117 @@ +Patch taken from upstream to fix cross-compilation for aarch64. This can be +removed on the next coreutils release. + +From 10fcb97bd728f09d4a027eddf8ad2900f0819b0a Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Thu, 5 Mar 2020 17:25:29 -0800 +Subject: [PATCH] ls: restore 8.31 behavior on removed directories + +* NEWS: Mention this. +* src/ls.c: Do not include <sys/sycall.h> +(print_dir): Don't worry about whether the directory is removed. +* tests/ls/removed-directory.sh: Adjust to match new (i.e., old) +behavior. +--- + NEWS | 6 ++++++ + src/ls.c | 22 ---------------------- + tests/ls/removed-directory.sh | 10 ++-------- + 3 files changed, 8 insertions(+), 30 deletions(-) + +diff --git a/NEWS b/NEWS +index fdc8bf5db..653e7178b 100644 +--- a/NEWS ++++ b/NEWS +@@ -2,6 +2,12 @@ GNU coreutils NEWS -*- outline -*- + + * Noteworthy changes in release ?.? (????-??-??) [?] + ++** Changes in behavior ++ ++ On GNU/Linux systems, ls no longer issues an error message on ++ directory merely because it was removed. This reverts a change ++ that was made in release 8.32. ++ + + * Noteworthy changes in release 8.32 (2020-03-05) [stable] + +diff --git a/src/ls.c b/src/ls.c +index 24b983287..4acf5f44d 100644 +--- a/src/ls.c ++++ b/src/ls.c +@@ -49,10 +49,6 @@ + # include <sys/ptem.h> + #endif + +-#ifdef __linux__ +-# include <sys/syscall.h> +-#endif +- + #include <stdio.h> + #include <assert.h> + #include <setjmp.h> +@@ -2896,7 +2892,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) + struct dirent *next; + uintmax_t total_blocks = 0; + static bool first = true; +- bool found_any_entries = false; + + errno = 0; + dirp = opendir (name); +@@ -2972,7 +2967,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) + next = readdir (dirp); + if (next) + { +- found_any_entries = true; + if (! file_ignored (next->d_name)) + { + enum filetype type = unknown; +@@ -3018,22 +3012,6 @@ print_dir (char const *name, char const *realname, bool command_line_arg) + if (errno != EOVERFLOW) + break; + } +-#ifdef __linux__ +- else if (! found_any_entries) +- { +- /* If readdir finds no directory entries at all, not even "." or +- "..", then double check that the directory exists. */ +- if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1 +- && errno != EINVAL) +- { +- /* We exclude EINVAL as that pertains to buffer handling, +- and we've passed NULL as the buffer for simplicity. +- ENOENT is returned if appropriate before buffer handling. */ +- file_failure (command_line_arg, _("reading directory %s"), name); +- } +- break; +- } +-#endif + else + break; + +diff --git a/tests/ls/removed-directory.sh b/tests/ls/removed-directory.sh +index e8c835dab..fe8f929a1 100755 +--- a/tests/ls/removed-directory.sh ++++ b/tests/ls/removed-directory.sh +@@ -26,20 +26,14 @@ case $host_triplet in + *) skip_ 'non linux kernel' ;; + esac + +-LS_FAILURE=2 +- +-cat <<\EOF >exp-err || framework_failure_ +-ls: reading directory '.': No such file or directory +-EOF +- + cwd=$(pwd) + mkdir d || framework_failure_ + cd d || framework_failure_ + rmdir ../d || framework_failure_ + +-returns_ $LS_FAILURE ls >../out 2>../err || fail=1 ++ls >../out 2>../err || fail=1 + cd "$cwd" || framework_failure_ + compare /dev/null out || fail=1 +-compare exp-err err || fail=1 ++compare /dev/null err || fail=1 + + Exit $fail diff --git a/gnu/packages/patches/curl-use-ssl-cert-env.patch b/gnu/packages/patches/curl-use-ssl-cert-env.patch new file mode 100644 index 0000000000..c8e80b4445 --- /dev/null +++ b/gnu/packages/patches/curl-use-ssl-cert-env.patch @@ -0,0 +1,64 @@ +Make libcurl respect the SSL_CERT_{DIR,FILE} variables by default. The variables +are fetched during initialization to preserve thread-safety (curl_global_init(3) +must be called when no other threads exist). + +This fixes network functionality in rust:cargo, and probably removes the need +for other future workarounds. +=================================================================== +--- curl-7.66.0.orig/lib/easy.c 2020-01-02 15:43:11.883921171 +0100 ++++ curl-7.66.0/lib/easy.c 2020-01-02 16:18:54.691882797 +0100 +@@ -134,6 +134,9 @@ + # pragma warning(default:4232) /* MSVC extension, dllimport identity */ + #endif + ++char * Curl_ssl_cert_dir = NULL; ++char * Curl_ssl_cert_file = NULL; ++ + /** + * curl_global_init() globally initializes curl given a bitwise set of the + * different features of what to initialize. +@@ -155,6 +158,9 @@ + #endif + } + ++ Curl_ssl_cert_dir = curl_getenv("SSL_CERT_DIR"); ++ Curl_ssl_cert_file = curl_getenv("SSL_CERT_FILE"); ++ + if(!Curl_ssl_init()) { + DEBUGF(fprintf(stderr, "Error: Curl_ssl_init failed\n")); + return CURLE_FAILED_INIT; +@@ -260,6 +266,9 @@ + Curl_ssl_cleanup(); + Curl_resolver_global_cleanup(); + ++ free(Curl_ssl_cert_dir); ++ free(Curl_ssl_cert_file); ++ + #ifdef WIN32 + Curl_win32_cleanup(init_flags); + #endif +diff -ur curl-7.66.0.orig/lib/url.c curl-7.66.0/lib/url.c +--- curl-7.66.0.orig/lib/url.c 2020-01-02 15:43:11.883921171 +0100 ++++ curl-7.66.0/lib/url.c 2020-01-02 16:21:11.563880346 +0100 +@@ -524,6 +524,21 @@ + if(result) + return result; + #endif ++ extern char * Curl_ssl_cert_dir; ++ extern char * Curl_ssl_cert_file; ++ if(Curl_ssl_cert_dir) { ++ if(result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_ORIG], Curl_ssl_cert_dir)) ++ return result; ++ if(result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY], Curl_ssl_cert_dir)) ++ return result; ++ } ++ ++ if(Curl_ssl_cert_file) { ++ if(result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_ORIG], Curl_ssl_cert_file)) ++ return result; ++ if(result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY], Curl_ssl_cert_file)) ++ return result; ++ } + } + + set->wildcard_enabled = FALSE; diff --git a/gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch b/gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch new file mode 100644 index 0000000000..8662e812e9 --- /dev/null +++ b/gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch @@ -0,0 +1,12 @@ +--- a/m4/sasl2.m4 2018-11-18 22:33:29.902625600 +0300 ++++ b/m4/sasl2.m4 2018-11-18 22:33:59.828746176 +0300 +@@ -339,7 +339,8 @@ + ], + [ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO]) + AC_MSG_RESULT(yes) ], +- AC_MSG_RESULT(no)) ++ AC_MSG_RESULT(no), ++ AC_MSG_RESULT(no)) + LIBS="$cmu_save_LIBS" + + else diff --git a/gnu/packages/patches/datefudge-gettimeofday.patch b/gnu/packages/patches/datefudge-gettimeofday.patch new file mode 100644 index 0000000000..11c7640869 --- /dev/null +++ b/gnu/packages/patches/datefudge-gettimeofday.patch @@ -0,0 +1,13 @@ +Add the 'restrict' qualifier to match the 'gettimeofday' declaration found +in glibc 2.31. + +--- datefudge-1.23/datefudge.c 2020-02-17 22:35:21.343341725 +0100 ++++ datefudge-1.23/datefudge.c 2020-02-17 22:35:49.619117874 +0100 +@@ -78,6 +78,6 @@ + return 0; + } + +-int gettimeofday(struct timeval *x, struct timezone *y) { ++int gettimeofday(struct timeval *restrict x, void *restrict y) { + return __gettimeofday(x,y); + } diff --git a/gnu/packages/patches/dconf-meson-0.52.patch b/gnu/packages/patches/dconf-meson-0.52.patch new file mode 100644 index 0000000000..c636edc108 --- /dev/null +++ b/gnu/packages/patches/dconf-meson-0.52.patch @@ -0,0 +1,19 @@ +Fix build failure with Meson 0.52. + +Taken from upstream: +https://gitlab.gnome.org/GNOME/dconf/commit/7ad890fb7a2ec90a777a756a1fa20a615ec7245e +https://gitlab.gnome.org/GNOME/dconf/merge_requests/54 + +diff --git a/client/meson.build b/client/meson.build +index f3b7122cb05bfa7bb481c487e3cd052aa1ad58e5..de6387e2cac2aba12b83f2614c277bada434fd16 100644 +--- a/client/meson.build ++++ b/client/meson.build +@@ -28,7 +28,7 @@ libdconf_client = static_library( + + libdconf_client_dep = declare_dependency( + dependencies: gio_dep, +- link_whole: libdconf_client, ++ link_with: libdconf_client, + ) + + libdconf = shared_library( diff --git a/gnu/packages/patches/doxygen-1.8.17-runtests.patch b/gnu/packages/patches/doxygen-1.8.17-runtests.patch new file mode 100644 index 0000000000..0340c72448 --- /dev/null +++ b/gnu/packages/patches/doxygen-1.8.17-runtests.patch @@ -0,0 +1,73 @@ +1.8.17 was released with a broken test runner. + +https://github.com/doxygen/doxygen/issues/7464 + +Taken from upstream: +https://github.com/doxygen/doxygen/commit/cd9dee013dc749a10bbe019c350e0e62b6635795 + +diff --git a/testing/runtests.py b/testing/runtests.py +index a4118b865..10fe50214 100755 +--- a/testing/runtests.py ++++ b/testing/runtests.py +@@ -3,6 +3,7 @@ + from __future__ import print_function + import argparse, glob, itertools, re, shutil, os, sys + import subprocess ++import shlex + + config_reg = re.compile('.*\/\/\s*(?P<name>\S+):\s*(?P<value>.*)$') + +@@ -28,10 +29,10 @@ def xpopen(cmd, cmd1="",encoding='utf-8-sig', getStderr=False): + return os.popen(cmd).read() # Python 2 without encoding + else: + if (getStderr): +- proc = subprocess.run(cmd1,encoding=encoding,capture_output=True) # Python 3 with encoding +- return proc.stderr ++ proc = subprocess.Popen(shlex.split(cmd1),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding ++ return proc.stderr.read() + else: +- proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding ++ proc = subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding + return proc.stdout.read() + + class Tester: +@@ -137,7 +138,7 @@ def prepare_test(self): + print('GENERATE_DOCBOOK=NO', file=f) + if (self.args.xhtml): + print('GENERATE_HTML=YES', file=f) +- # HTML_OUTPUT can also be set locally ++ # HTML_OUTPUT can also have been set locally + print('HTML_OUTPUT=%s/html' % self.test_out, file=f) + print('HTML_FILE_EXTENSION=.xhtml', file=f) + if (self.args.pdf): +@@ -184,7 +185,7 @@ def update_test(self,testmgr): + print('Non-existing file %s after \'check:\' statement' % check_file) + return + # convert output to canonical form +- data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read() ++ data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)) + if data: + # strip version + data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n') +@@ -326,7 +327,7 @@ def perform_test(self,testmgr): + tests.append(glob.glob('%s/*.xml' % (docbook_output))) + tests.append(glob.glob('%s/*/*/*.xml' % (docbook_output))) + tests = ' '.join(list(itertools.chain.from_iterable(tests))).replace(self.args.outputdir +'/','').replace('\\','/') +- exe_string = '%s --nonet --postvalid %s' % (self.args.xmllint,tests) ++ exe_string = '%s --noout --nonet --postvalid %s' % (self.args.xmllint,tests) + exe_string1 = exe_string + exe_string += ' %s' % (redirx) + exe_string += ' %s more "%s/temp"' % (separ,docbook_output) +@@ -346,7 +347,11 @@ def perform_test(self,testmgr): + redirx=' 2> %s/temp >nul:'%html_output + else: + redirx='2>%s/temp >/dev/null'%html_output +- exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml' % (self.args.xmllint,html_output) ++ check_file = [] ++ check_file.append(glob.glob('%s/*.xhtml' % (html_output))) ++ check_file.append(glob.glob('%s/*/*/*.xhtml' % (html_output))) ++ check_file = ' '.join(list(itertools.chain.from_iterable(check_file))).replace(self.args.outputdir +'/','').replace('\\','/') ++ exe_string = '%s --noout --path dtd --nonet --postvalid %s' % (self.args.xmllint,check_file) + exe_string1 = exe_string + exe_string += ' %s' % (redirx) + exe_string += ' %s more "%s/temp"' % (separ,html_output) diff --git a/gnu/packages/patches/doxygen-test.patch b/gnu/packages/patches/doxygen-test.patch index 8ccb9ec3c4..1c0d4eb946 100644 --- a/gnu/packages/patches/doxygen-test.patch +++ b/gnu/packages/patches/doxygen-test.patch @@ -5,19 +5,40 @@ test. diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012/citelist.xml --- doxygen-1.8.7.orig/testing/012/citelist.xml 2014-04-24 23:43:34.000000000 +0200 +++ doxygen-1.8.7/testing/012/citelist.xml 2014-04-24 23:49:43.000000000 +0200 -@@ -6,17 +6,6 @@ +@@ -6,38 +6,6 @@ <briefdescription> </briefdescription> <detaileddescription> - <para> - <variablelist> - <varlistentry> -- <term><anchor id="citelist_1CITEREF_knuth79"/>[1]</term> +- <term><anchor id="citelist_1CITEREF_Be09"/>[1]</term> +- </varlistentry> +- <listitem> +- <para>P.<nonbreakablespace/>Belotti. <ulink url="http://doi.org/10.1007/978-1-4614-1927-3_5">Disjunctive cuts for non-convex MINLP</ulink>. In <ulink url="#CITEREF_LeLe12">Lee and Leyffer</ulink> <ulink url="#CITEREF_LeLe12">[4]</ulink>, pages 117<ndash/>144.</para> +- <para/> +- </listitem> +- <varlistentry> +- <term><anchor id="citelist_1CITEREF_BertholdHeinzVigerske2009"/>[2]</term> +- </varlistentry> +- <listitem> +- <para>T.<nonbreakablespace/>Berthold, S.<nonbreakablespace/>Heinz, and S.<nonbreakablespace/>Vigerske. <ulink url="http://doi.org/10.1007/978-1-4614-1927-3_15">Extending a CIP framework to solve MIQCPs</ulink>. In <ulink url="#CITEREF_LeLe12">Lee and Leyffer</ulink> <ulink url="#CITEREF_LeLe12">[4]</ulink>, pages 427<ndash/>444.</para> +- <para/> +- </listitem> +- <varlistentry> +- <term><anchor id="citelist_1CITEREF_knuth79"/>[3]</term> - </varlistentry> - <listitem> - <para>Donald<nonbreakablespace/>E. Knuth. <emphasis>Tex and Metafont, New Directions in Typesetting</emphasis>. American Mathematical Society and Digital Press, Stanford, 1979.</para> - <para/> - </listitem> +- <varlistentry> +- <term><anchor id="citelist_1CITEREF_LeLe12"/>[4]</term> +- </varlistentry> +- <listitem> +- <para>Jon Lee and Sven Leyffer, editors. <ulink url="http://doi.org/10.1007/978-1-4614-1927-3"><emphasis>Mixed Integer Nonlinear Programming</emphasis></ulink>, volume 154 of <emphasis>The IMA Volumes in Mathematics and its Applications</emphasis>. Springer, 2012.</para> +- <para/> +- </listitem> - </variablelist> - </para> </detaileddescription> @@ -26,13 +47,14 @@ diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012 diff -u -r doxygen-1.8.7.orig/testing/012/indexpage.xml doxygen-1.8.7/testing/012/indexpage.xml --- doxygen-1.8.7.orig/testing/012/indexpage.xml 2014-04-24 23:43:34.000000000 +0200 +++ doxygen-1.8.7/testing/012/indexpage.xml 2014-04-24 23:44:05.000000000 +0200 -@@ -4,7 +4,7 @@ - <compoundname>index</compoundname> - <title>My Project</title> +@@ -6,8 +6,8 @@ + <briefdescription> + </briefdescription> <detaileddescription> -- <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[1]</ref> for more info. </para> -+ <para>See knuth79 for more info. </para> +- <para>See <ref refid="citelist_1CITEREF_knuth79" kindref="member">[3]</ref> for more info.</para> +- <para>Other references with cross references see <ref refid="citelist_1CITEREF_Be09" kindref="member">[1]</ref> and <ref refid="citelist_1CITEREF_BertholdHeinzVigerske2009" kindref="member">[2]</ref> for more info. </para> ++ <para>See knuth79 for more info.</para> ++ <para>Other references with cross references see Be09 and BertholdHeinzVigerske2009 for more info. </para> </detaileddescription> </compounddef> </doxygen> - diff --git a/gnu/packages/patches/evolution-data-server-libical-compat.patch b/gnu/packages/patches/evolution-data-server-libical-compat.patch index a988519ea0..da4302d42e 100644 --- a/gnu/packages/patches/evolution-data-server-libical-compat.patch +++ b/gnu/packages/patches/evolution-data-server-libical-compat.patch @@ -8,29 +8,29 @@ Adapted from upstream: https://gitlab.gnome.org/GNOME/evolution-data-server/commit/77384ab552c19bf374dbeda53dc37f98d07bd4ec diff --git a/CMakeLists.txt b/CMakeLists.txt +index e16b8b225..b3c881967 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -108,7 +108,7 @@ +@@ -111,7 +111,7 @@ add_definitions(-DSOUP_VERSION_MIN_REQUIRED=${soup_encoded_version}) set(gcr_minimum_version 3.4) set(libgdata_minimum_version 0.15.1) --set(libical_minimum_version 2.0) -+set(libical_minimum_version 3.0.7) +-set(libical_glib_minimum_version 3.0.5) ++set(libical_glib_minimum_version 3.0.7) set(libsecret_minimum_version 0.5) set(libxml_minimum_version 2.0.0) set(sqlite_minimum_version 3.7.17) diff --git a/src/calendar/libedata-cal/e-cal-meta-backend.c b/src/calendar/libedata-cal/e-cal-meta-backend.c -index 7501f2a43dcc3af91e93e89751caf76e77c2ac23..93f4806ba2c5193f746e9fae5bf74d08ad05f8bf 100644 +index 7501f2a43..93f4806ba 100644 --- a/src/calendar/libedata-cal/e-cal-meta-backend.c +++ b/src/calendar/libedata-cal/e-cal-meta-backend.c -@@ -3958,9 +3958,8 @@ +@@ -4067,8 +4067,7 @@ e_cal_meta_backend_inline_local_attachments_sync (ECalMetaBackend *meta_backend, gchar *base64; base64 = g_base64_encode ((const guchar *) content, len); -- new_attach = icalattach_new_from_data (base64, NULL, NULL); -+ new_attach = icalattach_new_from_data (base64, (GFunc) g_free, NULL); +- new_attach = i_cal_attach_new_from_data (base64, NULL, NULL); ++ new_attach = i_cal_attach_new_from_data (base64, (GFunc) g_free, NULL); g_free (content); - g_free (base64); ecmb_remove_all_but_filename_parameter (prop); - diff --git a/gnu/packages/patches/fifengine-swig-compat.patch b/gnu/packages/patches/fifengine-swig-compat.patch new file mode 100644 index 0000000000..85cd05f835 --- /dev/null +++ b/gnu/packages/patches/fifengine-swig-compat.patch @@ -0,0 +1,17 @@ +Fix build failure when using Swig 4. + +Taken from upstream: +https://github.com/fifengine/fifengine/commit/d14f232f4cd9a00b05d6872957070e8c020f515d + +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -893,7 +893,7 @@ if(build-python) + find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT) + include_directories(${PYTHON_INCLUDE_PATH}) + +- set(CMAKE_SWIG_FLAGS -modern -fastdispatch -dirvtable -nosafecstrings -noproxydel -fastproxy -fastinit -fastunpack -fastquery -modernargs -nobuildnone -keyword -w511 -w473 -w404 -w314) ++ set(CMAKE_SWIG_FLAGS -modern -fastdispatch -dirvtable -noproxydel -fastproxy -fastinit -fastunpack -fastquery -modernargs -keyword -w511 -w473 -w404 -w314) + + set_source_files_properties("${PROJECT_BINARY_DIR}/fife.i" PROPERTIES CPLUSPLUS ON) + set(FIFE_SOURCES ${FIFE_CORE_SRC}) diff --git a/gnu/packages/patches/file-CVE-2018-10360.patch b/gnu/packages/patches/file-CVE-2018-10360.patch deleted file mode 100644 index 9285611c04..0000000000 --- a/gnu/packages/patches/file-CVE-2018-10360.patch +++ /dev/null @@ -1,27 +0,0 @@ -https://github.com/file/file/commit/a642587a9c9e2dd7feacdf513c3643ce26ad3c22.patch -The leading part of the patch starting at line 27 was trimmed off. -This patch should be OK to drop with file@5.35. - -From a642587a9c9e2dd7feacdf513c3643ce26ad3c22 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Sat, 9 Jun 2018 16:00:06 +0000 -Subject: [PATCH] Avoid reading past the end of buffer (Rui Reis) - ---- - src/readelf.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/readelf.c b/src/readelf.c -index 79c83f9f5..1f41b4611 100644 ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -842,7 +842,8 @@ do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, - - cname = (unsigned char *) - &nbuf[doff + prpsoffsets(i)]; -- for (cp = cname; *cp && isprint(*cp); cp++) -+ for (cp = cname; cp < nbuf + size && *cp -+ && isprint(*cp); cp++) - continue; - /* - * Linux apparently appends a space at the end diff --git a/gnu/packages/patches/findutils-gnulib-libio.patch b/gnu/packages/patches/findutils-gnulib-libio.patch deleted file mode 100644 index 79f9fd914d..0000000000 --- a/gnu/packages/patches/findutils-gnulib-libio.patch +++ /dev/null @@ -1,114 +0,0 @@ -Adjust to removal of libio interface in glibc 2.28. - -Based on this gnulib commit: -https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4af4a4a71827c0bc5e0ec67af23edef4f15cee8e - -diff --git a/gl/lib/fflush.c b/gl/lib/fflush.c -index 5ae3e41..7a82470 100644 ---- a/gl/lib/fflush.c -+++ b/gl/lib/fflush.c -@@ -33,7 +33,7 @@ - #undef fflush - - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - /* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */ - static void -@@ -72,7 +72,7 @@ clear_ungetc_buffer (FILE *fp) - - #endif - --#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) -+#if ! (defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */) - - # if (defined __sferror || defined __DragonFly__ || defined __ANDROID__) && defined __SNPT - /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */ -@@ -148,7 +148,7 @@ rpl_fflush (FILE *stream) - if (stream == NULL || ! freading (stream)) - return fflush (stream); - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - - clear_ungetc_buffer_preserving_position (stream); - -diff --git a/gl/lib/fpurge.c b/gl/lib/fpurge.c -index f313b22..ecdf82d 100644 ---- a/gl/lib/fpurge.c -+++ b/gl/lib/fpurge.c -@@ -62,7 +62,7 @@ fpurge (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - <stdio.h>, because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_IO_read_end = fp->_IO_read_ptr; - fp->_IO_write_ptr = fp->_IO_write_base; - /* Avoid memory leak when there is an active ungetc buffer. */ -diff --git a/gl/lib/freadahead.c b/gl/lib/freadahead.c -index 094daab..3f8101e 100644 ---- a/gl/lib/freadahead.c -+++ b/gl/lib/freadahead.c -@@ -25,7 +25,7 @@ - size_t - freadahead (FILE *fp) - { --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_write_ptr > fp->_IO_write_base) - return 0; - return (fp->_IO_read_end - fp->_IO_read_ptr) -diff --git a/gl/lib/freading.c b/gl/lib/freading.c -index 0512b19..8c48fe4 100644 ---- a/gl/lib/freading.c -+++ b/gl/lib/freading.c -@@ -31,7 +31,7 @@ freading (FILE *fp) - /* Most systems provide FILE as a struct and the necessary bitmask in - <stdio.h>, because they need it for implementing getc() and putc() as - fast macros. */ --# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+# if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - return ((fp->_flags & _IO_NO_WRITES) != 0 - || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0 - && fp->_IO_read_base != NULL)); -diff --git a/gl/lib/fseeko.c b/gl/lib/fseeko.c -index 1c65d2a..9026408 100644 ---- a/gl/lib/fseeko.c -+++ b/gl/lib/fseeko.c -@@ -47,7 +47,7 @@ fseeko (FILE *fp, off_t offset, int whence) - #endif - - /* These tests are based on fpurge.c. */ --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - if (fp->_IO_read_end == fp->_IO_read_ptr - && fp->_IO_write_ptr == fp->_IO_write_base - && fp->_IO_save_base == NULL) -@@ -123,7 +123,7 @@ fseeko (FILE *fp, off_t offset, int whence) - return -1; - } - --#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ -+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ - fp->_flags &= ~_IO_EOF_SEEN; - fp->_offset = pos; - #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ -diff --git a/gl/lib/stdio-impl.h b/gl/lib/stdio-impl.h -index 502d891..ea38ee2 100644 ---- a/gl/lib/stdio-impl.h -+++ b/gl/lib/stdio-impl.h -@@ -18,6 +18,12 @@ - the same implementation of stdio extension API, except that some fields - have different naming conventions, or their access requires some casts. */ - -+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this -+ problem by defining it ourselves. FIXME: Do not rely on glibc -+ internals. */ -+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN -+# define _IO_IN_BACKUP 0x100 -+#endif - - /* BSD stdio derived implementations. */ - diff --git a/gnu/packages/patches/findutils-makedev.patch b/gnu/packages/patches/findutils-makedev.patch deleted file mode 100644 index 2f16c625d8..0000000000 --- a/gnu/packages/patches/findutils-makedev.patch +++ /dev/null @@ -1,22 +0,0 @@ -Include <sys/sysmacros.h> for "makedev". - -Taken from this gnulib commit: -https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=4da63c5881f60f71999a943612da9112232b9161 - -diff --git a/gl/lib/mountlist.c b/gl/lib/mountlist.c -index bb4e4ee21..cf4020e2a 100644 ---- a/gl/lib/mountlist.c -+++ b/gl/lib/mountlist.c -@@ -37,6 +37,12 @@ - # include <sys/param.h> - #endif - -+#if MAJOR_IN_MKDEV -+# include <sys/mkdev.h> -+#elif MAJOR_IN_SYSMACROS -+# include <sys/sysmacros.h> -+#endif -+ - #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ - # if HAVE_SYS_UCRED_H - # include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS, diff --git a/gnu/packages/patches/findutils-test-rwlock-threads.patch b/gnu/packages/patches/findutils-test-rwlock-threads.patch new file mode 100644 index 0000000000..3062577c21 --- /dev/null +++ b/gnu/packages/patches/findutils-test-rwlock-threads.patch @@ -0,0 +1,38 @@ +Skip "test-rwlock1" when multithreading is disabled, which is the case +during bootstrapping on architectures not supported by GNU Mes. + +Taken from upstream gnulib: +https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=fdff8bd09a7f053381f8bdb107ab5280b7c95959 + +diff --git a/gnulib-tests/test-rwlock1.c b/gnulib-tests/test-rwlock1.c +--- a/gnulib-tests/test-rwlock1.c ++++ b/gnulib-tests/test-rwlock1.c +@@ -21,6 +21,8 @@ + + #include <config.h> + ++#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS ++ + #include "glthread/lock.h" + + #include <errno.h> +@@ -151,3 +153,18 @@ main () + sleep (1); + } + } ++ ++#else ++ ++/* No multithreading available. */ ++ ++#include <stdio.h> ++ ++int ++main () ++{ ++ fputs ("Skipping test: multithreading not enabled\n", stderr); ++ return 77; ++} ++ ++#endif + diff --git a/gnu/packages/patches/findutils-test-xargs.patch b/gnu/packages/patches/findutils-test-xargs.patch deleted file mode 100644 index 10c7bed28d..0000000000 --- a/gnu/packages/patches/findutils-test-xargs.patch +++ /dev/null @@ -1,22 +0,0 @@ -This test relies on 'xargs' being available in $PATH, which is not -the case when we build the initial Findutils doing bootstrapping. -Reported at <https://savannah.gnu.org/bugs/index.php?46786>. - ---- findutils-4.6.0/find/testsuite/sv-34976-execdir-fd-leak.sh 2015-12-31 19:37:59.401526288 +0100 -+++ findutils-4.6.0/find/testsuite/sv-34976-execdir-fd-leak.sh 2015-12-31 19:38:36.061770693 +0100 -@@ -50,13 +50,14 @@ die() { - # Create test files, each 98 in the directories ".", "one" and "two". - make_test_data() { - d="$1" -+ xargs="`cd ../../xargs; pwd -P`/xargs" - ( - cd "$1" || exit 1 - mkdir one two || exit 1 - for i in ${three_to_hundred} ; do - printf "./%03d one/%03d two/%03d " $i $i $i - done \ -- | xargs touch || exit 1 -+ | "$xargs" touch || exit 1 - ) \ - || die "failed to set up the test in ${outdir}" - } diff --git a/gnu/packages/patches/fontconfig-hurd-path-max.patch b/gnu/packages/patches/fontconfig-hurd-path-max.patch new file mode 100644 index 0000000000..f804e6801f --- /dev/null +++ b/gnu/packages/patches/fontconfig-hurd-path-max.patch @@ -0,0 +1,17 @@ +Avoid usage of PATH_MAX. + +Taken from https://salsa.debian.org/freedesktop-team/fontconfig/-/blob/master/debian/patches/path_max.patch + +Index: fontconfig-2.13.1/src/fccfg.c +=================================================================== +--- fontconfig-2.13.1.orig/src/fccfg.c ++++ fontconfig-2.13.1/src/fccfg.c +@@ -2231,7 +2231,7 @@ FcConfigRealFilename (FcConfig *config, + + if (n) + { +- FcChar8 buf[PATH_MAX]; ++ FcChar8 buf[FC_PATH_MAX]; + ssize_t len; + + if (sysroot) diff --git a/gnu/packages/patches/fribidi-CVE-2019-18397.patch b/gnu/packages/patches/fribidi-CVE-2019-18397.patch deleted file mode 100644 index aff1a669b2..0000000000 --- a/gnu/packages/patches/fribidi-CVE-2019-18397.patch +++ /dev/null @@ -1,26 +0,0 @@ -https://github.com/fribidi/fribidi/commit/034c6e9a1d296286305f4cfd1e0072b879f52568.patch - -From 034c6e9a1d296286305f4cfd1e0072b879f52568 Mon Sep 17 00:00:00 2001 -From: Dov Grobgeld <dov.grobgeld@gmail.com> -Date: Thu, 24 Oct 2019 09:37:29 +0300 -Subject: [PATCH] Truncate isolate_level to FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL - ---- - lib/fribidi-bidi.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/lib/fribidi-bidi.c b/lib/fribidi-bidi.c -index 6c84392..d384878 100644 ---- a/lib/fribidi-bidi.c -+++ b/lib/fribidi-bidi.c -@@ -747,7 +747,9 @@ fribidi_get_par_embedding_levels_ex ( - } - - RL_LEVEL (pp) = level; -- RL_ISOLATE_LEVEL (pp) = isolate_level++; -+ RL_ISOLATE_LEVEL (pp) = isolate_level; -+ if (isolate_level < FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL-1) -+ isolate_level++; - base_level_per_iso_level[isolate_level] = new_level; - - if (!FRIBIDI_IS_NEUTRAL (override)) diff --git a/gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..7df22c21aa --- /dev/null +++ b/gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch @@ -0,0 +1,52 @@ +Fix assertion failure in libsanitizer when using glibc 2.31 and later. + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154 +https://reviews.llvm.org/D69104 + +Adapted from these upstream revision: + +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=277981 +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=279653 + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 196eb3b3c64..b588e07e5ab 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -928,7 +928,11 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); ++#endif + CHECK_SIZE_AND_OFFSET(ipc_perm, __seq); + + CHECK_TYPE_SIZE(shmid_ds); +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index aec950454b3..6d94fc65c28 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -154,20 +154,13 @@ namespace __sanitizer { + u64 __unused1; + u64 __unused2; + #elif defined(__sparc__) +-# if defined(__arch64__) + unsigned mode; +- unsigned short __pad1; +-# else +- unsigned short __pad1; +- unsigned short mode; + unsigned short __pad2; +-# endif + unsigned short __seq; + unsigned long long __unused1; + unsigned long long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) diff --git a/gnu/packages/patches/gcc-5-hurd.patch b/gnu/packages/patches/gcc-5-hurd.patch new file mode 100644 index 0000000000..ae66424243 --- /dev/null +++ b/gnu/packages/patches/gcc-5-hurd.patch @@ -0,0 +1,63 @@ +This patch is needed to build gcc-5.5.0 on the Hurd. + +Backported from upstream: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=6cd9cb89ebdc1e1394b81c4a418c2b3b0eb86c57 + +commit b590b96ebc3f5b42a4829170e069722dd940e2543 +Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Sat May 9 04:50:23 2015 +0000 + + * src/c++98/Makefile.am (AM_CXXFLAGS): Add -std=gnu++98. + * src/c++98/Makefile.in: Regenerate. + * src/Makefile.am (AM_CXXFLAGS): Add -std=gnu++98. + * src/Makefile.in: Regenerate. + + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222964 138bc75d-0d04-0410-961f-82ee72b054a4 + +diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am +index a5f48b22c6d..cd07ccd81bc 100644 +--- a/libstdc++-v3/src/Makefile.am ++++ b/libstdc++-v3/src/Makefile.am +@@ -168,6 +168,7 @@ compatibility-condvar.o: compatibility-condvar.cc + # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden + # as the occasion calls for it. + AM_CXXFLAGS = \ ++ -std=gnu++98 \ + $(glibcxx_compiler_pic_flag) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) +diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in +index 433f9ea121a..31b56282e26 100644 +--- a/libstdc++-v3/src/Makefile.in ++++ b/libstdc++-v3/src/Makefile.in +@@ -429,6 +429,7 @@ libstdc___la_LINK = $(CXXLINK) $(libstdc___la_LDFLAGS) + # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden + # as the occasion calls for it. + AM_CXXFLAGS = \ ++ -std=gnu++98 \ + $(glibcxx_compiler_pic_flag) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) +diff --git a/libstdc++-v3/src/c++98/Makefile.am b/libstdc++-v3/src/c++98/Makefile.am +index e348dfb1205..a5b68a19a8b 100644 +--- a/libstdc++-v3/src/c++98/Makefile.am ++++ b/libstdc++-v3/src/c++98/Makefile.am +@@ -215,6 +215,7 @@ parallel_settings.o: parallel_settings.cc + # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden + # as the occasion calls for it. + AM_CXXFLAGS = \ ++ -std=gnu++98 \ + $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) +diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in +index 3c69791bb66..ce86136906b 100644 +--- a/libstdc++-v3/src/c++98/Makefile.in ++++ b/libstdc++-v3/src/c++98/Makefile.in +@@ -421,6 +421,7 @@ PARALLEL_FLAGS = -D_GLIBCXX_PARALLEL + # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden + # as the occasion calls for it. + AM_CXXFLAGS = \ ++ -std=gnu++98 \ + $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \ + $(XTEMPLATE_FLAGS) $(VTV_CXXFLAGS) \ + $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) diff --git a/gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..005e3c4079 --- /dev/null +++ b/gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch @@ -0,0 +1,53 @@ +Fix assertion failure in libsanitizer when using glibc 2.31 and later. + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154 +https://reviews.llvm.org/D69104 + +Adapted from these upstream revision: + +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=277981 +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=279653 + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 069d8d557de..c49c28c6e07 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1130,8 +1130,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); + #ifndef __GLIBC_PREREQ + #define __GLIBC_PREREQ(x, y) 0 + #endif +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index 304d04e3935..6dee89c97e1 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -207,20 +207,13 @@ namespace __sanitizer { + unsigned long __unused1; + unsigned long __unused2; + #elif defined(__sparc__) +-# if defined(__arch64__) + unsigned mode; +- unsigned short __pad1; +-# else +- unsigned short __pad1; +- unsigned short mode; + unsigned short __pad2; +-# endif + unsigned short __seq; + unsigned long long __unused1; + unsigned long long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) + diff --git a/gnu/packages/patches/gcc-7-cross-toolexeclibdir.patch b/gnu/packages/patches/gcc-7-cross-toolexeclibdir.patch new file mode 100644 index 0000000000..49982c3474 --- /dev/null +++ b/gnu/packages/patches/gcc-7-cross-toolexeclibdir.patch @@ -0,0 +1,1041 @@ +From 46339bdf619b93dfa05d5f004d062671d3dc26d2 Mon Sep 17 00:00:00 2001 +From: Mathieu Othacehe <m.othacehe@gmail.com> +Date: Tue, 24 Mar 2020 13:50:56 +0100 +Subject: [PATCH] toolexec + +--- + gcc/doc/install.texi | 4 ++++ + libatomic/configure | 33 ++++++++++++++++++++++--- + libffi/configure | 33 ++++++++++++++++++++++--- + libgcc/configure | 38 +++++++++++++++++++++++++++-- + libgomp/configure | 33 ++++++++++++++++++++++--- + libhsail-rt/configure | 33 ++++++++++++++++++++++--- + libitm/configure | 33 ++++++++++++++++++++++--- + liboffloadmic/configure | 33 ++++++++++++++++++++++--- + liboffloadmic/plugin/configure | 33 ++++++++++++++++++++++--- + libquadmath/configure | 33 ++++++++++++++++++++++--- + libsanitizer/configure | 33 ++++++++++++++++++++++--- + libssp/configure | 33 ++++++++++++++++++++++--- + libstdc++-v3/configure | 44 ++++++++++++++++++++++++++-------- + 13 files changed, 374 insertions(+), 42 deletions(-) + +diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi +index 77ba08d3f21..28cb6d88da8 100644 +--- a/gcc/doc/install.texi ++++ b/gcc/doc/install.texi +@@ -2083,6 +2083,10 @@ shorthand for + The following options only apply to building cross compilers. + + @table @code ++@item --with-toolexeclibdir=@var{dir} ++Specify the installation directory for libraries built with a cross compiler. ++The default is @option{$@{gcc_tooldir@}/lib}. ++ + @item --with-sysroot + @itemx --with-sysroot=@var{dir} + Tells GCC to consider @var{dir} as the root of a tree that contains +diff --git a/libatomic/configure b/libatomic/configure +index 2ae9b8d40f3..0fa531ec4a3 100755 +--- a/libatomic/configure ++++ b/libatomic/configure +@@ -755,6 +755,7 @@ enable_option_checking + enable_version_specific_runtime_libs + enable_generated_files_in_srcdir + enable_multilib ++with_toolexeclibdir + enable_dependency_tracking + enable_shared + enable_static +@@ -1414,6 +1415,9 @@ Optional Features: + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] +@@ -3185,6 +3189,22 @@ fi + ac_config_commands="$ac_config_commands default-1" + + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${enable_version_specific_runtime_libs} in +@@ -3200,7 +3220,14 @@ case ${enable_version_specific_runtime_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +@@ -11115,7 +11142,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11118 "configure" ++#line 11145 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11221,7 +11248,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11224 "configure" ++#line 11251 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +diff --git a/libffi/configure b/libffi/configure +index 790a291011f..6e37039e84c 100755 +--- a/libffi/configure ++++ b/libffi/configure +@@ -777,6 +777,7 @@ enable_debug + enable_structs + enable_raw_api + enable_purify_safety ++with_toolexeclibdir + enable_symvers + with_gcc_major_version_only + ' +@@ -1436,6 +1437,9 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-gcc-major-version-only + use only GCC major number in filesystem paths + +@@ -11390,7 +11394,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11393 "configure" ++#line 11397 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11496,7 +11500,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11499 "configure" ++#line 11507 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -16002,10 +16006,33 @@ $as_echo "#define USING_PURIFY 1" >>confdefs.h + fi + + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +diff --git a/libgcc/configure b/libgcc/configure +index 441601a1f76..976827dc57e 100644 +--- a/libgcc/configure ++++ b/libgcc/configure +@@ -669,6 +669,7 @@ enable_shared + enable_vtable_verify + with_aix_soname + enable_version_specific_runtime_libs ++with_toolexeclibdir + with_slibdir + enable_maintainer_mode + with_build_libsubdir +@@ -1329,6 +1330,9 @@ Optional Packages: + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-slibdir=DIR shared libraries in DIR LIBDIR + --with-build-libsubdir=DIR Directory where to find libraries for build system + --with-system-libunwind use installed libunwind +@@ -2403,6 +2407,22 @@ fi + $as_echo "$version_specific_libs" >&6; } + + ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ ++ + # Check whether --with-slibdir was given. + if test "${with_slibdir+set}" = set; then : + withval=$with_slibdir; slibdir="$with_slibdir" +@@ -2410,7 +2430,14 @@ else + if test "${version_specific_libs}" = yes; then + slibdir='$(libsubdir)' + elif test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then +- slibdir='$(exec_prefix)/$(host_noncanonical)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ slibdir='$(exec_prefix)/$(host_noncanonical)/lib' ++ ;; ++ *) ++ slibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + slibdir='$(libdir)' + fi +@@ -2640,7 +2667,14 @@ case ${version_specific_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_noncanonical)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' + toolexeclibdir='$(libdir)' +diff --git a/libgomp/configure b/libgomp/configure +index 06166c66120..6b3beae0f63 100755 +--- a/libgomp/configure ++++ b/libgomp/configure +@@ -782,6 +782,7 @@ enable_option_checking + enable_version_specific_runtime_libs + enable_generated_files_in_srcdir + enable_multilib ++with_toolexeclibdir + enable_dependency_tracking + enable_shared + enable_static +@@ -1455,6 +1456,9 @@ Optional Features: + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] +@@ -3338,6 +3342,22 @@ fi + ac_config_commands="$ac_config_commands default-1" + + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${enable_version_specific_runtime_libs} in +@@ -3353,7 +3373,14 @@ case ${enable_version_specific_runtime_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +@@ -11155,7 +11182,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11158 "configure" ++#line 11185 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11261,7 +11288,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11264 "configure" ++#line 11295 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +diff --git a/libhsail-rt/configure b/libhsail-rt/configure +index a4fcc10c1f9..1b4f2a953d0 100755 +--- a/libhsail-rt/configure ++++ b/libhsail-rt/configure +@@ -737,6 +737,7 @@ enable_option_checking + enable_maintainer_mode + enable_dependency_tracking + enable_version_specific_runtime_libs ++with_toolexeclibdir + enable_shared + enable_static + with_pic +@@ -1395,6 +1396,9 @@ Optional Features: + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] +@@ -4418,6 +4422,22 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_version_specific_runtime_libs" >&5 + $as_echo "$enable_version_specific_runtime_libs" >&6; } + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${enable_version_specific_runtime_libs} in +@@ -4433,7 +4453,14 @@ case ${enable_version_specific_runtime_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +@@ -10973,7 +11000,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10976 "configure" ++#line 11003 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11079,7 +11106,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11082 "configure" ++#line 11113 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +diff --git a/libitm/configure b/libitm/configure +index 96c494d4a3f..ed47fab3c83 100644 +--- a/libitm/configure ++++ b/libitm/configure +@@ -766,6 +766,7 @@ enable_option_checking + enable_version_specific_runtime_libs + enable_generated_files_in_srcdir + enable_multilib ++with_toolexeclibdir + enable_dependency_tracking + enable_shared + enable_static +@@ -1430,6 +1431,9 @@ Optional Features: + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] +@@ -3371,6 +3375,22 @@ fi + ac_config_commands="$ac_config_commands default-1" + + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${enable_version_specific_runtime_libs} in +@@ -3386,7 +3406,14 @@ case ${enable_version_specific_runtime_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +@@ -11794,7 +11821,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11797 "configure" ++#line 11824 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11900,7 +11927,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11903 "configure" ++#line 11934 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +diff --git a/liboffloadmic/configure b/liboffloadmic/configure +index f873716991b..6dfe9e37642 100644 +--- a/liboffloadmic/configure ++++ b/liboffloadmic/configure +@@ -739,6 +739,7 @@ enable_maintainer_mode + enable_dependency_tracking + enable_multilib + enable_version_specific_runtime_libs ++with_toolexeclibdir + enable_shared + enable_static + with_pic +@@ -1397,6 +1398,9 @@ Optional Features: + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] +@@ -5003,6 +5007,22 @@ else + fi + + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + # Calculate toolexeclibdir. + # Also toolexecdir, though it's only used in toolexeclibdir. + case ${enable_version_specific_runtime_libs} in +@@ -5018,7 +5038,14 @@ case ${enable_version_specific_runtime_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +@@ -11108,7 +11135,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11111 "configure" ++#line 11138 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11214,7 +11241,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11217 "configure" ++#line 11248 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +diff --git a/liboffloadmic/plugin/configure b/liboffloadmic/plugin/configure +index c031eb3e7fa..570758344b4 100644 +--- a/liboffloadmic/plugin/configure ++++ b/liboffloadmic/plugin/configure +@@ -735,6 +735,7 @@ enable_maintainer_mode + enable_dependency_tracking + enable_multilib + enable_version_specific_runtime_libs ++with_toolexeclibdir + enable_shared + enable_static + with_pic +@@ -1394,6 +1395,9 @@ Optional Features: + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] +@@ -4311,6 +4315,22 @@ fi + $as_echo "$enable_version_specific_runtime_libs" >&6; } + + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + # Calculate toolexeclibdir. + # Also toolexecdir, though it's only used in toolexeclibdir. + case ${enable_version_specific_runtime_libs} in +@@ -4326,7 +4346,14 @@ case ${enable_version_specific_runtime_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +@@ -10815,7 +10842,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10818 "configure" ++#line 10845 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10921,7 +10948,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10924 "configure" ++#line 10955 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +diff --git a/libquadmath/configure b/libquadmath/configure +index 76a2c20b7e1..e887071aeb2 100755 +--- a/libquadmath/configure ++++ b/libquadmath/configure +@@ -749,6 +749,7 @@ enable_fast_install + with_gnu_ld + enable_libtool_lock + enable_maintainer_mode ++with_toolexeclibdir + enable_symvers + enable_generated_files_in_srcdir + with_gcc_major_version_only +@@ -1408,6 +1409,9 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-gcc-major-version-only + use only GCC major number in filesystem paths + +@@ -10572,7 +10576,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10575 "configure" ++#line 10579 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10678,7 +10682,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10681 "configure" ++#line 10689 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11917,6 +11921,22 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in +@@ -11932,7 +11952,14 @@ case ${version_specific_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +diff --git a/libsanitizer/configure b/libsanitizer/configure +index a3a08d635f4..5f4cdcad38d 100755 +--- a/libsanitizer/configure ++++ b/libsanitizer/configure +@@ -767,6 +767,7 @@ enable_multilib + enable_version_specific_runtime_libs + enable_dependency_tracking + enable_maintainer_mode ++with_toolexeclibdir + enable_shared + enable_static + with_pic +@@ -1425,6 +1426,9 @@ Optional Features: + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] +@@ -4773,6 +4777,22 @@ fi + + + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in +@@ -4788,7 +4808,14 @@ case ${version_specific_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +@@ -12032,7 +12059,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12035 "configure" ++#line 12062 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12138,7 +12165,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12141 "configure" ++#line 12168 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +diff --git a/libssp/configure b/libssp/configure +index ee1751d20db..3273cd40ab1 100755 +--- a/libssp/configure ++++ b/libssp/configure +@@ -743,6 +743,7 @@ with_pic + enable_fast_install + with_gnu_ld + enable_libtool_lock ++with_toolexeclibdir + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1389,6 +1390,9 @@ Optional Packages: + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-gcc-major-version-only + use only GCC major number in filesystem paths + +@@ -10671,7 +10675,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10674 "configure" ++#line 10678 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10777,7 +10781,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10780 "configure" ++#line 10784 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11039,6 +11043,22 @@ esac + + + ++ ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ ++ ++ + # Calculate toolexeclibdir + # Also toolexecdir, though it's only used in toolexeclibdir + case ${version_specific_libs} in +@@ -11054,7 +11074,14 @@ case ${version_specific_libs} in + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_alias)' +- toolexeclibdir='$(toolexecdir)/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ toolexeclibdir='$(toolexecdir)/lib' ++ ;; ++ *) ++ toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + toolexecdir='$(libdir)/gcc-lib/$(target_alias)' + toolexeclibdir='$(libdir)' +diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure +index de8390703e2..88de3f728d4 100755 +--- a/libstdc++-v3/configure ++++ b/libstdc++-v3/configure +@@ -903,6 +903,7 @@ enable_libstdcxx_threads + enable_libstdcxx_filesystem_ts + with_gxx_include_dir + enable_version_specific_runtime_libs ++with_toolexeclibdir + with_gcc_major_version_only + ' + ac_precious_vars='build_alias +@@ -1623,6 +1624,9 @@ Optional Packages: + set the std::string ABI to use by default + --with-gxx-include-dir=DIR + installation directory for include files ++ --with-toolexeclibdir=DIR ++ install libraries built with a cross compiler within ++ DIR + --with-gcc-major-version-only + use only GCC major number in filesystem paths + +@@ -11606,7 +11610,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11609 "configure" ++#line 11613 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11712,7 +11716,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11715 "configure" ++#line 11723 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -15398,7 +15402,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } + # Fake what AC_TRY_COMPILE does. + + cat > conftest.$ac_ext << EOF +-#line 15401 "configure" ++#line 15409 "configure" + int main() + { + typedef bool atomic_type; +@@ -15433,7 +15437,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 15436 "configure" ++#line 15440 "configure" + int main() + { + typedef short atomic_type; +@@ -15468,7 +15472,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 15471 "configure" ++#line 15475 "configure" + int main() + { + // NB: _Atomic_word not necessarily int. +@@ -15504,7 +15508,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 15507 "configure" ++#line 15511 "configure" + int main() + { + typedef long long atomic_type; +@@ -15585,7 +15589,7 @@ $as_echo "$as_me: WARNING: Performance of certain classes will degrade as a resu + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 15588 "configure" ++#line 15592 "configure" + int main() + { + _Decimal32 d1; +@@ -15627,7 +15631,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + # unnecessary for this test. + + cat > conftest.$ac_ext << EOF +-#line 15630 "configure" ++#line 15634 "configure" + template<typename T1, typename T2> + struct same + { typedef T2 type; }; +@@ -15661,7 +15665,7 @@ $as_echo "$enable_int128" >&6; } + rm -f conftest* + + cat > conftest.$ac_ext << EOF +-#line 15664 "configure" ++#line 15668 "configure" + template<typename T1, typename T2> + struct same + { typedef T2 type; }; +@@ -81674,6 +81678,19 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $version_specific_libs" >&5 + $as_echo "$version_specific_libs" >&6; } + ++# Check whether --with-toolexeclibdir was given. ++if test "${with_toolexeclibdir+set}" = set; then : ++ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in ++ /) ++ ;; ++ */) ++ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'` ++ ;; ++esac ++else ++ with_toolexeclibdir=no ++fi ++ + # Default case for install directory for include files. + if test $version_specific_libs = no && test $gxx_include_dir = no; then + gxx_include_dir='include/c++/${gcc_version}' +@@ -81704,7 +81721,14 @@ $as_echo "$version_specific_libs" >&6; } + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + glibcxx_toolexecdir='${exec_prefix}/${host_alias}' +- glibcxx_toolexeclibdir='${toolexecdir}/lib' ++ case ${with_toolexeclibdir} in ++ no) ++ glibcxx_toolexeclibdir='${toolexecdir}/lib' ++ ;; ++ *) ++ glibcxx_toolexeclibdir=${with_toolexeclibdir} ++ ;; ++ esac + else + glibcxx_toolexecdir='${libdir}/gcc/${host_alias}' + glibcxx_toolexeclibdir='${libdir}' +-- +2.24.0 + diff --git a/gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..41b4a4cac6 --- /dev/null +++ b/gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch @@ -0,0 +1,53 @@ +Fix assertion failure in libsanitizer when using glibc 2.31 and later. + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92154 +https://reviews.llvm.org/D69104 + +Adapted from these upstream revision: + +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=277981 +https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=279653 + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index 97eae3fc7bc..4089d4695e2 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1145,8 +1145,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index c139322839a..7c3c2d866e5 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -211,20 +211,13 @@ namespace __sanitizer { + unsigned long __unused1; + unsigned long __unused2; + #elif defined(__sparc__) +-# if defined(__arch64__) + unsigned mode; +- unsigned short __pad1; +-# else +- unsigned short __pad1; +- unsigned short mode; + unsigned short __pad2; +-# endif + unsigned short __seq; + unsigned long long __unused1; + unsigned long long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) + diff --git a/gnu/packages/patches/gcc-boot-4.7.4.patch b/gnu/packages/patches/gcc-boot-4.6.4.patch index 3e51e31fdf..4ab0bf8641 100644 --- a/gnu/packages/patches/gcc-boot-4.7.4.patch +++ b/gnu/packages/patches/gcc-boot-4.6.4.patch @@ -1,4 +1,4 @@ -This patch enables building gcc-4.7.4 using gcc-2.95.3 and glibc-2.2.5 +This patch enables building gcc-4.6.4 using gcc-2.95.3 and glibc-2.2.5 * Tweak Makefile to allow overriding NATIVE_SYSTEM_HEADER_DIR using #:makeflags * Add missing limits.h include. @@ -14,12 +14,12 @@ diff --git a/gcc/Makefile.in b/gcc/Makefile.in index f3cc49fdb18..bc5718fc9a6 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in -@@ -458,7 +458,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h +@@ -440,7 +440,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h LTO_SYMTAB_H = $(srcdir)/../include/lto-symtab.h # Default native SYSTEM_HEADER_DIR, to be overridden by targets. --NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@ -+# NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@ +-NATIVE_SYSTEM_HEADER_DIR = /usr/include ++# NATIVE_SYSTEM_HEADER_DIR = /usr/include # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ @@ -40,24 +40,11 @@ index 94b7a0b89a7..ab2baab55ca 100644 /* Linux has a feature called exec-shield-randomize that perturbs the address of non-fixed mapped segments by a (relatively) small amount. -diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in -index c301ff03cae..f86318c3bd5 100644 ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -225,7 +225,7 @@ endif - LIBGCC2_DEBUG_CFLAGS = -g - LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ - $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \ -- -fbuilding-libgcc -fno-stack-protector \ -+ -fno-stack-protector \ - $(INHIBIT_LIBC_CFLAGS) - - # Additional options to use when compiling libgcc2.a. diff --git a/libgcc/generic-morestack-thread.c b/libgcc/generic-morestack-thread.c index bbe6dd12b5a..1d1d48223d7 100644 --- a/libgcc/generic-morestack-thread.c +++ b/libgcc/generic-morestack-thread.c -@@ -35,7 +35,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +@@ -34,7 +34,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see will want to define inhibit_libc while building a compiler which can build glibc. */ diff --git a/gnu/packages/patches/gd-CVE-2018-1000222.patch b/gnu/packages/patches/gd-CVE-2018-1000222.patch deleted file mode 100644 index 7e94295bb6..0000000000 --- a/gnu/packages/patches/gd-CVE-2018-1000222.patch +++ /dev/null @@ -1,87 +0,0 @@ -Fix CVE-2018-1000222: - -https://github.com/libgd/libgd/issues/447 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1000222 - -Patch copied from upstream source repository: - -https://github.com/libgd/libgd/commit/4b1e18a00ce7c4b7e6919c3b3109a034393b805a - -From 4b1e18a00ce7c4b7e6919c3b3109a034393b805a Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Sat, 14 Jul 2018 13:54:08 -0400 -Subject: [PATCH] bmp: check return value in gdImageBmpPtr - -Closes #447. - -(cherry picked from commit ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5) ---- - src/gd_bmp.c | 17 ++++++++++++++--- - 1 file changed, 14 insertions(+), 3 deletions(-) - -diff --git a/src/gd_bmp.c b/src/gd_bmp.c -index ccafdcd..d625da1 100644 ---- a/src/gd_bmp.c -+++ b/src/gd_bmp.c -@@ -48,6 +48,8 @@ static int bmp_read_4bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp - static int bmp_read_8bit(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info, bmp_hdr_t *header); - static int bmp_read_rle(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info); - -+static int _gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression); -+ - #define BMP_DEBUG(s) - - static int gdBMPPutWord(gdIOCtx *out, int w) -@@ -88,8 +90,10 @@ BGD_DECLARE(void *) gdImageBmpPtr(gdImagePtr im, int *size, int compression) - void *rv; - gdIOCtx *out = gdNewDynamicCtx(2048, NULL); - if (out == NULL) return NULL; -- gdImageBmpCtx(im, out, compression); -- rv = gdDPExtractData(out, size); -+ if (!_gdImageBmpCtx(im, out, compression)) -+ rv = gdDPExtractData(out, size); -+ else -+ rv = NULL; - out->gd_free(out); - return rv; - } -@@ -142,6 +146,11 @@ BGD_DECLARE(void) gdImageBmp(gdImagePtr im, FILE *outFile, int compression) - compression - whether to apply RLE or not. - */ - BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) -+{ -+ _gdImageBmpCtx(im, out, compression); -+} -+ -+static int _gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) - { - int bitmap_size = 0, info_size, total_size, padding; - int i, row, xpos, pixel; -@@ -149,6 +158,7 @@ BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) - unsigned char *uncompressed_row = NULL, *uncompressed_row_start = NULL; - FILE *tmpfile_for_compression = NULL; - gdIOCtxPtr out_original = NULL; -+ int ret = 1; - - /* No compression if its true colour or we don't support seek */ - if (im->trueColor) { -@@ -326,6 +336,7 @@ BGD_DECLARE(void) gdImageBmpCtx(gdImagePtr im, gdIOCtxPtr out, int compression) - out_original = NULL; - } - -+ ret = 0; - cleanup: - if (tmpfile_for_compression) { - #ifdef _WIN32 -@@ -339,7 +350,7 @@ cleanup: - if (out_original) { - out_original->gd_free(out_original); - } -- return; -+ return ret; - } - - static int compress_row(unsigned char *row, int length) --- -2.18.0 - diff --git a/gnu/packages/patches/gd-CVE-2018-5711.patch b/gnu/packages/patches/gd-CVE-2018-5711.patch deleted file mode 100644 index 83b12cde63..0000000000 --- a/gnu/packages/patches/gd-CVE-2018-5711.patch +++ /dev/null @@ -1,61 +0,0 @@ -This patch is adapted from commit a11f47475e6443b7f32d21f2271f28f417e2ac04 and -fixes CVE-2018-5711. - -From a11f47475e6443b7f32d21f2271f28f417e2ac04 Mon Sep 17 00:00:00 2001 -From: "Christoph M. Becker" <cmbecker69@gmx.de> -Date: Wed, 29 Nov 2017 19:37:38 +0100 -Subject: [PATCH] Fix #420: Potential infinite loop in gdImageCreateFromGifCtx - -Due to a signedness confusion in `GetCode_` a corrupt GIF file can -trigger an infinite loop. Furthermore we make sure that a GIF without -any palette entries is treated as invalid *after* open palette entries -have been removed. - -CVE-2018-5711 - -See also https://bugs.php.net/bug.php?id=75571. ---- - src/gd_gif_in.c | 12 ++++++------ - 1 file changed, 38 insertions(+), 6 deletions(-) - -diff --git a/src/gd_gif_in.c b/src/gd_gif_in.c -index daf26e7..0a8bd71 100644 ---- a/src/gd_gif_in.c -+++ b/src/gd_gif_in.c -@@ -335,11 +335,6 @@ terminated: - return 0; - } - -- if(!im->colorsTotal) { -- gdImageDestroy(im); -- return 0; -- } -- - /* Check for open colors at the end, so - * we can reduce colorsTotal and ultimately - * BitsPerPixel */ -@@ -351,6 +346,11 @@ terminated: - } - } - -+ if(!im->colorsTotal) { -+ gdImageDestroy(im); -+ return 0; -+ } -+ - return im; - } - -@@ -447,7 +447,7 @@ static int - GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) - { - int i, j, ret; -- unsigned char count; -+ int count; - - if(flag) { - scd->curbit = 0; - --- -2.13.6 - diff --git a/gnu/packages/patches/gd-CVE-2019-6977.patch b/gnu/packages/patches/gd-CVE-2019-6977.patch deleted file mode 100644 index b21a8ac619..0000000000 --- a/gnu/packages/patches/gd-CVE-2019-6977.patch +++ /dev/null @@ -1,36 +0,0 @@ -Fix CVE-2019-6977: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6977 - -Patch copied from Debian: - -https://salsa.debian.org/debian/libgd2/commit/2d7d3b68bb79843e5271a05543e996fd5a3a8cd1 - -Description: Heap-based buffer overflow in gdImageColorMatch -Origin: other, https://gist.github.com/cmb69/1f36d285eb297ed326f5c821d7aafced -Bug-PHP: https://bugs.php.net/bug.php?id=77270 -Bug-Debian: https://bugs.debian.org/920645 -Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2019-6977 -Forwarded: no -Author: "Christoph M. Becker" <cmbecker69@gmx.de> -Last-Update: 2019-02-01 - -At least some of the image reading functions may return images which -use color indexes greater than or equal to im->colorsTotal. We cater -to this by always using a buffer size which is sufficient for -`gdMaxColors` in `gdImageColorMatch()`. ---- - ---- a/src/gd_color_match.c -+++ b/src/gd_color_match.c -@@ -31,8 +31,8 @@ BGD_DECLARE(int) gdImageColorMatch (gdIm - return -4; /* At least 1 color must be allocated */ - } - -- buf = (unsigned long *)gdMalloc(sizeof(unsigned long) * 5 * im2->colorsTotal); -- memset (buf, 0, sizeof(unsigned long) * 5 * im2->colorsTotal ); -+ buf = (unsigned long *)gdMalloc(sizeof(unsigned long) * 5 * gdMaxColors); -+ memset (buf, 0, sizeof(unsigned long) * 5 * gdMaxColors ); - - for (x=0; x < im1->sx; x++) { - for( y=0; y<im1->sy; y++ ) { diff --git a/gnu/packages/patches/gd-CVE-2019-6978.patch b/gnu/packages/patches/gd-CVE-2019-6978.patch deleted file mode 100644 index 69fc5056fc..0000000000 --- a/gnu/packages/patches/gd-CVE-2019-6978.patch +++ /dev/null @@ -1,301 +0,0 @@ -Fix CVE-2019-6978: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-6978 - -Patch copied from upstream source repository: - -https://github.com/libgd/libgd/commit/553702980ae89c83f2d6e254d62cf82e204956d0 - -From 553702980ae89c83f2d6e254d62cf82e204956d0 Mon Sep 17 00:00:00 2001 -From: "Christoph M. Becker" <cmbecker69@gmx.de> -Date: Thu, 17 Jan 2019 11:54:55 +0100 -Subject: [PATCH] Fix #492: Potential double-free in gdImage*Ptr() - -Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we -must not call `gdDPExtractData()`; otherwise a double-free would -happen. Since `gdImage*Ctx()` are void functions, and we can't change -that for BC reasons, we're introducing static helpers which are used -internally. - -We're adding a regression test for `gdImageJpegPtr()`, but not for -`gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to -trigger failure of the respective `gdImage*Ctx()` calls. - -This potential security issue has been reported by Solmaz Salimi (aka. -Rooney). ---- - src/gd_gif_out.c | 18 +++++++++++++++--- - src/gd_jpeg.c | 20 ++++++++++++++++---- - src/gd_wbmp.c | 21 ++++++++++++++++++--- - tests/jpeg/.gitignore | 1 + - tests/jpeg/CMakeLists.txt | 1 + - tests/jpeg/Makemodule.am | 3 ++- - tests/jpeg/jpeg_ptr_double_free.c | 31 +++++++++++++++++++++++++++++++ - 7 files changed, 84 insertions(+), 11 deletions(-) - create mode 100644 tests/jpeg/jpeg_ptr_double_free.c - -diff --git a/src/gd_gif_out.c b/src/gd_gif_out.c -index 298a581..d5a9534 100644 ---- a/src/gd_gif_out.c -+++ b/src/gd_gif_out.c -@@ -99,6 +99,7 @@ static void char_init(GifCtx *ctx); - static void char_out(int c, GifCtx *ctx); - static void flush_char(GifCtx *ctx); - -+static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out); - - - -@@ -131,8 +132,11 @@ BGD_DECLARE(void *) gdImageGifPtr(gdImagePtr im, int *size) - void *rv; - gdIOCtx *out = gdNewDynamicCtx(2048, NULL); - if (out == NULL) return NULL; -- gdImageGifCtx(im, out); -- rv = gdDPExtractData(out, size); -+ if (!_gdImageGifCtx(im, out)) { -+ rv = gdDPExtractData(out, size); -+ } else { -+ rv = NULL; -+ } - out->gd_free(out); - return rv; - } -@@ -220,6 +224,12 @@ BGD_DECLARE(void) gdImageGif(gdImagePtr im, FILE *outFile) - - */ - BGD_DECLARE(void) gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) -+{ -+ _gdImageGifCtx(im, out); -+} -+ -+/* returns 0 on success, 1 on failure */ -+static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) - { - gdImagePtr pim = 0, tim = im; - int interlace, BitsPerPixel; -@@ -231,7 +241,7 @@ BGD_DECLARE(void) gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) - based temporary image. */ - pim = gdImageCreatePaletteFromTrueColor(im, 1, 256); - if(!pim) { -- return; -+ return 1; - } - tim = pim; - } -@@ -247,6 +257,8 @@ BGD_DECLARE(void) gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) - /* Destroy palette based temporary image. */ - gdImageDestroy( pim); - } -+ -+ return 0; - } - - -diff --git a/src/gd_jpeg.c b/src/gd_jpeg.c -index fc05842..96ef430 100644 ---- a/src/gd_jpeg.c -+++ b/src/gd_jpeg.c -@@ -117,6 +117,8 @@ static void fatal_jpeg_error(j_common_ptr cinfo) - exit(99); - } - -+static int _gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality); -+ - /* - * Write IM to OUTFILE as a JFIF-formatted JPEG image, using quality - * QUALITY. If QUALITY is in the range 0-100, increasing values -@@ -231,8 +233,11 @@ BGD_DECLARE(void *) gdImageJpegPtr(gdImagePtr im, int *size, int quality) - void *rv; - gdIOCtx *out = gdNewDynamicCtx(2048, NULL); - if (out == NULL) return NULL; -- gdImageJpegCtx(im, out, quality); -- rv = gdDPExtractData(out, size); -+ if (!_gdImageJpegCtx(im, out, quality)) { -+ rv = gdDPExtractData(out, size); -+ } else { -+ rv = NULL; -+ } - out->gd_free(out); - return rv; - } -@@ -253,6 +258,12 @@ void jpeg_gdIOCtx_dest(j_compress_ptr cinfo, gdIOCtx *outfile); - - */ - BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) -+{ -+ _gdImageJpegCtx(im, outfile, quality); -+} -+ -+/* returns 0 on success, 1 on failure */ -+static int _gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) - { - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; -@@ -287,7 +298,7 @@ BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) - if(row) { - gdFree(row); - } -- return; -+ return 1; - } - - cinfo.err->emit_message = jpeg_emit_message; -@@ -328,7 +339,7 @@ BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) - if(row == 0) { - gd_error("gd-jpeg: error: unable to allocate JPEG row structure: gdCalloc returns NULL\n"); - jpeg_destroy_compress(&cinfo); -- return; -+ return 1; - } - - rowptr[0] = row; -@@ -405,6 +416,7 @@ BGD_DECLARE(void) gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality) - jpeg_finish_compress(&cinfo); - jpeg_destroy_compress(&cinfo); - gdFree(row); -+ return 0; - } - - -diff --git a/src/gd_wbmp.c b/src/gd_wbmp.c -index f19a1c9..a49bdbe 100644 ---- a/src/gd_wbmp.c -+++ b/src/gd_wbmp.c -@@ -88,6 +88,8 @@ int gd_getin(void *in) - return (gdGetC((gdIOCtx *)in)); - } - -+static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out); -+ - /* - Function: gdImageWBMPCtx - -@@ -100,6 +102,12 @@ int gd_getin(void *in) - out - the stream where to write - */ - BGD_DECLARE(void) gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) -+{ -+ _gdImageWBMPCtx(image, fg, out); -+} -+ -+/* returns 0 on success, 1 on failure */ -+static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) - { - int x, y, pos; - Wbmp *wbmp; -@@ -107,7 +115,7 @@ BGD_DECLARE(void) gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) - /* create the WBMP */ - if((wbmp = createwbmp(gdImageSX(image), gdImageSY(image), WBMP_WHITE)) == NULL) { - gd_error("Could not create WBMP\n"); -- return; -+ return 1; - } - - /* fill up the WBMP structure */ -@@ -123,11 +131,15 @@ BGD_DECLARE(void) gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out) - - /* write the WBMP to a gd file descriptor */ - if(writewbmp(wbmp, &gd_putout, out)) { -+ freewbmp(wbmp); - gd_error("Could not save WBMP\n"); -+ return 1; - } - - /* des submitted this bugfix: gdFree the memory. */ - freewbmp(wbmp); -+ -+ return 0; - } - - /* -@@ -271,8 +283,11 @@ BGD_DECLARE(void *) gdImageWBMPPtr(gdImagePtr im, int *size, int fg) - void *rv; - gdIOCtx *out = gdNewDynamicCtx(2048, NULL); - if (out == NULL) return NULL; -- gdImageWBMPCtx(im, fg, out); -- rv = gdDPExtractData(out, size); -+ if (!_gdImageWBMPCtx(im, fg, out)) { -+ rv = gdDPExtractData(out, size); -+ } else { -+ rv = NULL; -+ } - out->gd_free(out); - return rv; - } -#diff --git a/tests/jpeg/.gitignore b/tests/jpeg/.gitignore -#index c28aa87..13bcf04 100644 -#--- a/tests/jpeg/.gitignore -#+++ b/tests/jpeg/.gitignore -#@@ -3,5 +3,6 @@ -# /jpeg_empty_file -# /jpeg_im2im -# /jpeg_null -#+/jpeg_ptr_double_free -# /jpeg_read -# /jpeg_resolution -diff --git a/tests/jpeg/CMakeLists.txt b/tests/jpeg/CMakeLists.txt -index 19964b0..a8d8162 100644 ---- a/tests/jpeg/CMakeLists.txt -+++ b/tests/jpeg/CMakeLists.txt -@@ -2,6 +2,7 @@ IF(JPEG_FOUND) - LIST(APPEND TESTS_FILES - jpeg_empty_file - jpeg_im2im -+ jpeg_ptr_double_free - jpeg_null - ) - -diff --git a/tests/jpeg/Makemodule.am b/tests/jpeg/Makemodule.am -index 7e5d317..b89e169 100644 ---- a/tests/jpeg/Makemodule.am -+++ b/tests/jpeg/Makemodule.am -@@ -2,7 +2,8 @@ if HAVE_LIBJPEG - libgd_test_programs += \ - jpeg/jpeg_empty_file \ - jpeg/jpeg_im2im \ -- jpeg/jpeg_null -+ jpeg/jpeg_null \ -+ jpeg/jpeg_ptr_double_free - - if HAVE_LIBPNG - libgd_test_programs += \ -diff --git a/tests/jpeg/jpeg_ptr_double_free.c b/tests/jpeg/jpeg_ptr_double_free.c -new file mode 100644 -index 0000000..df5a510 ---- /dev/null -+++ b/tests/jpeg/jpeg_ptr_double_free.c -@@ -0,0 +1,31 @@ -+/** -+ * Test that failure to convert to JPEG returns NULL -+ * -+ * We are creating an image, set its width to zero, and pass this image to -+ * `gdImageJpegPtr()` which is supposed to fail, and as such should return NULL. -+ * -+ * See also <https://github.com/libgd/libgd/issues/381> -+ */ -+ -+ -+#include "gd.h" -+#include "gdtest.h" -+ -+ -+int main() -+{ -+ gdImagePtr src, dst; -+ int size; -+ -+ src = gdImageCreateTrueColor(1, 10); -+ gdTestAssert(src != NULL); -+ -+ src->sx = 0; /* this hack forces gdImageJpegPtr() to fail */ -+ -+ dst = gdImageJpegPtr(src, &size, 0); -+ gdTestAssert(dst == NULL); -+ -+ gdImageDestroy(src); -+ -+ return gdNumFailures(); -+} --- -2.20.1 - diff --git a/gnu/packages/patches/gd-brect-bounds.patch b/gnu/packages/patches/gd-brect-bounds.patch new file mode 100644 index 0000000000..575e4dc2ad --- /dev/null +++ b/gnu/packages/patches/gd-brect-bounds.patch @@ -0,0 +1,63 @@ +Revert upstream commit 04bb9a08b3c25f8e3c0c235f9cefc0f94df59a5a because it +causes a test failure on i686 and possibly other architectures. + +See <https://github.com/libgd/libgd/issues/613>. + +diff --git a/src/gdft.c b/src/gdft.c +--- a/src/gdft.c ++++ b/src/gdft.c +@@ -1579,6 +1579,12 @@ BGD_DECLARE(char *) gdImageStringFTEx (gdImage * im, int *brect, int fg, const c + double scalex = (double)hdpi / (64 * METRIC_RES); + double scaley = (double)vdpi / (64 * METRIC_RES); + ++ /* increase by 1 pixel to allow for rounding */ ++ total_min.x -= METRIC_RES; ++ total_min.y -= METRIC_RES; ++ total_max.x += METRIC_RES; ++ total_max.y += METRIC_RES; ++ + /* rotate bounding rectangle, scale and round to int pixels, and translate */ + brect[0] = x + (total_min.x * cos_a + total_max.y * sin_a)*scalex; + brect[1] = y - (total_min.x * sin_a - total_max.y * cos_a)*scaley; +diff --git a/tests/gdimagestringft/gdimagestringft_bbox.c b/tests/gdimagestringft/gdimagestringft_bbox.c +--- a/tests/gdimagestringft/gdimagestringft_bbox.c ++++ b/tests/gdimagestringft/gdimagestringft_bbox.c +@@ -8,22 +8,22 @@ + #define DELTA (PI/8) + + static int EXPECT[16][8] = { +- {500, 400, 628, 400, 628, 376, 500, 376}, +- {492, 362, 611, 312, 601, 290, 483, 339}, +- {470, 330, 561, 239, 544, 221, 453, 312}, +- {437, 308, 486, 189, 464, 180, 414, 299}, +- {400, 301, 400, 173, 376, 173, 376, 301}, +- {363, 309, 313, 190, 291, 200, 340, 318}, +- {332, 331, 241, 240, 223, 257, 314, 348}, +- {311, 363, 192, 314, 183, 336, 302, 386}, +- {304, 399, 176, 399, 176, 423, 304, 423}, +- {312, 435, 193, 485, 203, 507, 321, 458}, +- {333, 465, 242, 556, 259, 574, 350, 483}, +- {364, 486, 315, 605, 337, 614, 387, 495}, +- {399, 492, 399, 620, 423, 620, 423, 492}, +- {434, 484, 484, 603, 506, 593, 457, 475}, +- {463, 464, 554, 555, 572, 538, 481, 447}, +- {483, 434, 602, 483, 611, 461, 492, 411}, ++ {498, 401, 630, 401, 630, 374, 498, 374}, ++ {491, 364, 613, 313, 602, 288, 481, 338}, ++ {470, 332, 563, 239, 544, 219, 451, 312}, ++ {438, 310, 488, 189, 463, 178, 412, 300}, ++ {401, 303, 401, 171, 374, 171, 374, 303}, ++ {365, 310, 314, 188, 289, 199, 339, 320}, ++ {334, 331, 241, 238, 221, 257, 314, 350}, ++ {313, 362, 192, 312, 181, 337, 303, 388}, ++ {306, 398, 174, 398, 174, 425, 306, 425}, ++ {313, 433, 191, 484, 202, 509, 323, 459}, ++ {333, 463, 240, 556, 259, 576, 352, 483}, ++ {363, 484, 313, 605, 338, 616, 389, 494}, ++ {398, 490, 398, 622, 425, 622, 425, 490}, ++ {432, 483, 483, 605, 508, 594, 458, 473}, ++ {461, 464, 554, 557, 574, 538, 481, 445}, ++ {481, 435, 602, 485, 613, 460, 491, 409}, + }; + + int main() diff --git a/gnu/packages/patches/gd-fix-tests-on-i686.patch b/gnu/packages/patches/gd-fix-tests-on-i686.patch index 280893c1d4..7ec8e7fee9 100644 --- a/gnu/packages/patches/gd-fix-tests-on-i686.patch +++ b/gnu/packages/patches/gd-fix-tests-on-i686.patch @@ -38,7 +38,7 @@ diff -ru libgd-2.2.3.orig/tests/gdimagecopyresampled/bug00201.c libgd-2.2.3/test @@ -65,7 +66,8 @@ gdImageDestroy(background); gdImageDestroy(scaled_logo); - + - gdAssertImageEqualsToFile("gdimagecopyresampled/bug00201_exp.png", img); + if (FLT_EVAL_METHOD != 2) + gdAssertImageEqualsToFile("gdimagecopyresampled/bug00201_exp.png", img); diff --git a/gnu/packages/patches/gd-freetype-test-failure.patch b/gnu/packages/patches/gd-freetype-test-failure.patch deleted file mode 100644 index 49c16ca089..0000000000 --- a/gnu/packages/patches/gd-freetype-test-failure.patch +++ /dev/null @@ -1,59 +0,0 @@ -Fix a test failure with freetype 2.7: - -https://github.com/libgd/libgd/commit/a5570d3ed30ff76c2a8bdd54f4ab1825acca0143 - -Patch copied from upstream source repository: - -https://github.com/libgd/libgd/commit/a5570d3ed30ff76c2a8bdd54f4ab1825acca0143 - -From a5570d3ed30ff76c2a8bdd54f4ab1825acca0143 Mon Sep 17 00:00:00 2001 -From: "Christoph M. Becker" <cmbecker69@gmx.de> -Date: Sun, 29 Jan 2017 17:07:50 +0100 -Subject: [PATCH] Fix #302: Test suite fails with freetype 2.7 - -Actually, the test failures are not necessarily related to freetype -2.7, but rather are caused by subpixel hinting which is enabled by -default in freetype 2.7. Subpixel hinting is, however, already -available in freetype 2.5 and in versions having the "Infinality" -patch. - -To get the expected results in all environments, we have to disable -subpixel hinting, what is easily done by setting a respective -environment variable. - -See also: -* https://www.freetype.org/freetype2/docs/subpixel-hinting.html -* https://www.freetype.org/freetype2/docs/reference/ft2-tt_driver.html ---- - tests/freetype/bug00132.c | 3 +++ - tests/gdimagestringft/gdimagestringft_bbox.c | 3 +++ - 2 files changed, 6 insertions(+) - -diff --git a/tests/freetype/bug00132.c b/tests/freetype/bug00132.c -index 713dd2d..42ed5b1 100644 ---- a/tests/freetype/bug00132.c -+++ b/tests/freetype/bug00132.c -@@ -11,6 +11,9 @@ int main() - char *path; - char *ret = NULL; - -+ /* disable subpixel hinting */ -+ putenv("FREETYPE_PROPERTIES=truetype:interpreter-version=35"); -+ - im = gdImageCreateTrueColor(50, 30); - - if (!im) { -diff --git a/tests/gdimagestringft/gdimagestringft_bbox.c b/tests/gdimagestringft/gdimagestringft_bbox.c -index 0161ec8..1596a9e 100644 ---- a/tests/gdimagestringft/gdimagestringft_bbox.c -+++ b/tests/gdimagestringft/gdimagestringft_bbox.c -@@ -38,6 +38,9 @@ int main() - int error = 0; - FILE *fp; - -+ /* disable subpixel hinting */ -+ putenv("FREETYPE_PROPERTIES=truetype:interpreter-version=35"); -+ - path = gdTestFilePath("freetype/DejaVuSans.ttf"); - im = gdImageCreate(800, 800); - gdImageColorAllocate(im, 0xFF, 0xFF, 0xFF); /* allocate white for background color */ diff --git a/gnu/packages/patches/gdm-default-session.patch b/gnu/packages/patches/gdm-default-session.patch index 4839a04de4..9ab2829cdb 100644 --- a/gnu/packages/patches/gdm-default-session.patch +++ b/gnu/packages/patches/gdm-default-session.patch @@ -5,11 +5,10 @@ and not in the directories listed in $XDG_DATA_DIRS. The latter includes Fixes <https://bugs.gnu.org/37831>. -diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c -index 6a116a8..02c1458 100644 ---- a/daemon/gdm-session.c -+++ b/daemon/gdm-session.c -@@ -348,24 +348,18 @@ get_system_session_dirs (GdmSession *self) +diff -ur a/daemon/gdm-session.c b/daemon/gdm-session.c +--- a/daemon/gdm-session.c 2019-09-25 10:40:24.000000000 -0400 ++++ b/daemon/gdm-session.c 2020-04-18 18:30:02.671856808 -0400 +@@ -348,24 +348,18 @@ GArray *search_array = NULL; char **search_dirs; int i; @@ -35,7 +34,7 @@ index 6a116a8..02c1458 100644 g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs)); #ifdef ENABLE_WAYLAND_SUPPORT -@@ -373,16 +367,7 @@ get_system_session_dirs (GdmSession *self) +@@ -373,16 +367,7 @@ #ifdef ENABLE_USER_DISPLAY_SERVER g_array_prepend_val (search_array, wayland_search_dir); @@ -52,40 +51,39 @@ index 6a116a8..02c1458 100644 g_array_append_val (search_array, wayland_search_dir); #endif } -diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c -index afbc5c0..bb5e3e6 100644 ---- a/libgdm/gdm-sessions.c -+++ b/libgdm/gdm-sessions.c -@@ -238,19 +238,11 @@ collect_sessions (void) +diff -ur a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c +--- a/libgdm/gdm-sessions.c 2019-10-07 04:53:35.000000000 -0400 ++++ b/libgdm/gdm-sessions.c 2020-04-18 18:31:42.491348691 -0400 +@@ -245,19 +245,12 @@ "/etc/X11/sessions/", DMCONFDIR "/Sessions/", DATADIR "/gdm/BuiltInSessions/", - DATADIR "/xsessions/", -- NULL + "/run/current-system/profile/share/xsessions/" }; - xorg_search_array = g_array_new (TRUE, TRUE, sizeof (char *)); + names_seen_before = g_hash_table_new (g_str_hash, g_str_equal); + xorg_search_array = g_ptr_array_new_with_free_func (g_free); - const gchar * const *system_data_dirs = g_get_system_data_dirs (); - - for (i = 0; system_data_dirs[i]; i++) { - session_dir = g_build_filename (system_data_dirs[i], "xsessions", NULL); -- g_array_append_val (xorg_search_array, session_dir); +- g_ptr_array_add (xorg_search_array, session_dir); - } - - g_array_append_vals (xorg_search_array, xorg_search_dirs, G_N_ELEMENTS (xorg_search_dirs)); - - #ifdef ENABLE_WAYLAND_SUPPORT -@@ -261,11 +253,6 @@ collect_sessions (void) + for (i = 0; i < G_N_ELEMENTS (xorg_search_dirs); i++) { + g_ptr_array_add (xorg_search_array, g_strdup (xorg_search_dirs[i])); + } +@@ -269,11 +262,6 @@ - wayland_search_array = g_array_new (TRUE, TRUE, sizeof (char *)); + wayland_search_array = g_ptr_array_new_with_free_func (g_free); - for (i = 0; system_data_dirs[i]; i++) { - session_dir = g_build_filename (system_data_dirs[i], "wayland-sessions", NULL); -- g_array_append_val (wayland_search_array, session_dir); +- g_ptr_array_add (wayland_search_array, session_dir); - } - - g_array_append_vals (wayland_search_array, wayland_search_dirs, G_N_ELEMENTS (wayland_search_dirs)); - #endif - + for (i = 0; i < G_N_ELEMENTS (wayland_search_dirs); i++) { + g_ptr_array_add (wayland_search_array, g_strdup (wayland_search_dirs[i])); + } diff --git a/gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch b/gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch deleted file mode 100644 index 40aae7a9d7..0000000000 --- a/gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch +++ /dev/null @@ -1,27 +0,0 @@ -Don’t add linker flags via ‘response files’ since ld-wrapper -doesn’t handle them. -See https://github.com/NixOS/nixpkgs/commit/a421e7bd4a28c69bded8b17888325e31554f61a1 -https://gcc.gnu.org/ml/gcc/2016-10/msg00151.html - -diff --git a/compiler/main/SysTools.hs.orig b/compiler/main/SysTools.hs -index 1ab5b13..99270fc 100644 ---- a/compiler/main/SysTools.hs.orig -+++ b/compiler/main/SysTools.hs -@@ -424,7 +424,7 @@ runCc dflags args = do - args1 = map Option (getOpts dflags opt_c) - args2 = args0 ++ args1 ++ args - mb_env <- getGccEnv args2 -- runSomethingResponseFile dflags cc_filter "C Compiler" p args2 mb_env -+ runSomethingFiltered dflags cc_filter "C Compiler" p args2 mb_env - where - -- discard some harmless warnings from gcc that we can't turn off - cc_filter = unlines . doFilter . lines -@@ -945,7 +945,7 @@ runLink dflags args = do - args1 = map Option (getOpts dflags opt_l) - args2 = args0 ++ linkargs ++ args1 ++ args - mb_env <- getGccEnv args2 -- runSomethingResponseFile dflags ld_filter "Linker" p args2 mb_env -+ runSomethingFiltered dflags ld_filter "Linker" p args2 mb_env - where - ld_filter = case (platformOS (targetPlatform dflags)) of - OSSolaris2 -> sunos_ld_filter diff --git a/gnu/packages/patches/ghc-testsuite-dlopen-pie.patch b/gnu/packages/patches/ghc-testsuite-dlopen-pie.patch new file mode 100644 index 0000000000..99ba3ac42f --- /dev/null +++ b/gnu/packages/patches/ghc-testsuite-dlopen-pie.patch @@ -0,0 +1,54 @@ +Do not attempt to dlopen PIE objects, which was disallowed with glibc 2.30. + +https://gitlab.haskell.org/ghc/ghc/issues/17952 +https://sourceware.org/bugzilla/show_bug.cgi?id=24323 + +Patch submitted upstream: +https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2947 + +diff --git a/testsuite/tests/dynlibs/Makefile b/testsuite/tests/dynlibs/Makefile +--- a/testsuite/tests/dynlibs/Makefile ++++ b/testsuite/tests/dynlibs/Makefile +@@ -60,6 +60,4 @@ T5373: + .PHONY: T13702 + T13702: + '$(TEST_HC)' -v0 -dynamic -rdynamic -fPIC -pie T13702.hs +- '$(TEST_HC)' -v0 -dynamic T13702a.hs +- ./T13702 # first make sure executable itself works +- ./T13702a # then try dynamically loading it as library ++ ./T13702 +diff --git a/testsuite/tests/dynlibs/T13702.hs b/testsuite/tests/dynlibs/T13702.hs +--- a/testsuite/tests/dynlibs/T13702.hs ++++ b/testsuite/tests/dynlibs/T13702.hs +@@ -2,8 +2,3 @@ + + main :: IO () + main = putStrLn "hello world" +- +-foreign export ccall "hello" hello :: IO () +- +-hello :: IO () +-hello = putStrLn "hello world again" +diff --git a/testsuite/tests/dynlibs/T13702.stdout b/testsuite/tests/dynlibs/T13702.stdout +--- a/testsuite/tests/dynlibs/T13702.stdout ++++ b/testsuite/tests/dynlibs/T13702.stdout +@@ -1,2 +1 @@ + hello world +-hello world again +diff --git a/testsuite/tests/dynlibs/T13702a.hs b/testsuite/tests/dynlibs/T13702a.hs +deleted file mode 100644 +--- a/testsuite/tests/dynlibs/T13702a.hs ++++ /dev/null +@@ -1,12 +0,0 @@ +-{-# LANGUAGE ForeignFunctionInterface #-} +- +-import Foreign +-import System.Posix.DynamicLinker +- +-main :: IO () +-main = do +- dl <- dlopen "./T13702" [RTLD_NOW] +- funptr <- dlsym dl "hello" :: IO (FunPtr (IO ())) +- mkAction funptr +- +-foreign import ccall "dynamic" mkAction :: FunPtr (IO ()) -> IO () diff --git a/gnu/packages/patches/ghostscript-no-header-id.patch b/gnu/packages/patches/ghostscript-no-header-id.patch index da1aa5530f..45fc95fd6e 100644 --- a/gnu/packages/patches/ghostscript-no-header-id.patch +++ b/gnu/packages/patches/ghostscript-no-header-id.patch @@ -9,10 +9,10 @@ See: https://bugs.ghostscript.com/show_bug.cgi?id=698208 diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c --- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c 2017-07-09 23:30:28.960479189 +0200 +++ gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c 2017-07-09 23:34:34.306524488 +0200 -@@ -1785,8 +1785,11 @@ +@@ -1810,8 +1810,11 @@ * +1 for the linearisation dict and +1 for the primary hint stream. */ - linear_params->FirsttrailerOffset = gp_ftell_64(linear_params->Lin_File.file); + linear_params->FirsttrailerOffset = gp_ftell(linear_params->Lin_File.file); - gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R/ID[%s%s]/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n \n", - linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber, fileID, fileID, 0); + gs_sprintf(LDict, "\ntrailer\n<</Size %ld/Info %d 0 R/Root %d 0 R", @@ -20,10 +20,10 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9. + if (pdev->OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 && strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */ + gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID); + gs_sprintf(LDict, "/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n \n", 0); - fwrite(LDict, strlen(LDict), 1, linear_params->Lin_File.file); + gp_fwrite(LDict, strlen(LDict), 1, linear_params->Lin_File.file); /* Write document catalog (Part 4) */ -@@ -2321,8 +2324,11 @@ +@@ -2346,8 +2349,11 @@ if (code != 0) return_error(gs_error_ioerror); @@ -34,10 +34,10 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9. + if (pdev->OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 || strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */ + gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID); + gs_sprintf(LDict, "/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n", mainxref); - fwrite(LDict, strlen(LDict), 1, linear_params->sfile); + gp_fwrite(LDict, strlen(LDict), 1, linear_params->sfile); - code = gp_fseek_64(linear_params->sfile, pdev->ResourceUsage[HintStreamObj].LinearisedOffset, SEEK_SET); -@@ -3016,10 +3022,12 @@ + code = gp_fseek(linear_params->sfile, pdev->ResourceUsage[HintStreamObj].LinearisedOffset, SEEK_SET); +@@ -3012,10 +3018,12 @@ stream_puts(s, "trailer\n"); pprintld3(s, "<< /Size %ld /Root %ld 0 R /Info %ld 0 R\n", pdev->next_id, Catalog_id, Info_id); diff --git a/gnu/packages/patches/ghostscript-no-header-uuid.patch b/gnu/packages/patches/ghostscript-no-header-uuid.patch index 473531220c..f4b55764c8 100644 --- a/gnu/packages/patches/ghostscript-no-header-uuid.patch +++ b/gnu/packages/patches/ghostscript-no-header-uuid.patch @@ -11,7 +11,7 @@ See: https://bugs.ghostscript.com/show_bug.cgi?id=698208 diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c aa/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c --- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c 2017-07-09 23:30:28.960479189 +0200 +++ gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c 2017-07-10 01:04:12.252478276 +0200 -@@ -617,7 +617,7 @@ +@@ -620,7 +620,7 @@ return code; /* PDF/A XMP reference recommends setting UUID to empty. If not empty must be a URI */ @@ -20,13 +20,12 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c aa/gnu-ghostscrip instance_uuid[0] = 0x00; cre_date_time_len = pdf_get_docinfo_item(pdev, "/CreationDate", cre_date_time, sizeof(cre_date_time)); -@@ -719,15 +719,18 @@ +@@ -720,14 +720,17 @@ pdf_xml_tag_close(s, "rdf:Description"); pdf_xml_newline(s); - pdf_xml_tag_open_beg(s, "rdf:Description"); -- pdf_xml_attribute_name(s, "rdf:about"); -- pdf_xml_attribute_value(s, instance_uuid); +- pdf_xml_copy(s, " rdf:about=\"\""); - pdf_xml_attribute_name(s, "xmlns:xapMM"); - pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/mm/"); - pdf_xml_attribute_name(s, "xapMM:DocumentID"); @@ -36,8 +35,7 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c aa/gnu-ghostscrip + if (!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 && strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0)) + { + pdf_xml_tag_open_beg(s, "rdf:Description"); -+ pdf_xml_attribute_name(s, "rdf:about"); -+ pdf_xml_attribute_value(s, instance_uuid); ++ pdf_xml_copy(s, " rdf:about=\"\""); + pdf_xml_attribute_name(s, "xmlns:xapMM"); + pdf_xml_attribute_value(s, "http://ns.adobe.com/xap/1.0/mm/"); + pdf_xml_attribute_name(s, "xapMM:DocumentID"); @@ -47,4 +45,4 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdfe.c aa/gnu-ghostscrip + } pdf_xml_tag_open_beg(s, "rdf:Description"); - pdf_xml_attribute_name(s, "rdf:about"); + pdf_xml_copy(s, " rdf:about=\"\""); diff --git a/gnu/packages/patches/giflib-make-reallocarray-private.patch b/gnu/packages/patches/giflib-make-reallocarray-private.patch deleted file mode 100644 index 69228c5be8..0000000000 --- a/gnu/packages/patches/giflib-make-reallocarray-private.patch +++ /dev/null @@ -1,120 +0,0 @@ -Move the declaration from gif_lib.h to gif_lib_private.h to solve -conflicts when some .c-file #includes both stdlib.h and gif_lib.h. -See also https://sourceforge.net/p/giflib/bugs/110/ - -diff -ur giflib-5.1.4.orig/lib/dgif_lib.c giflib-5.1.4/lib/dgif_lib.c ---- giflib-5.1.4.orig/lib/dgif_lib.c 2018-02-28 20:31:02.294682673 +0100 -+++ giflib-5.1.4/lib/dgif_lib.c 2018-02-28 22:38:11.659126414 +0100 -@@ -396,7 +396,7 @@ - - if (GifFile->SavedImages) { - SavedImage* new_saved_images = -- (SavedImage *)reallocarray(GifFile->SavedImages, -+ (SavedImage *)giflib_private_reallocarray(GifFile->SavedImages, - (GifFile->ImageCount + 1), sizeof(SavedImage)); - if (new_saved_images == NULL) { - GifFile->Error = D_GIF_ERR_NOT_ENOUGH_MEM; -@@ -1108,7 +1108,7 @@ - if (ImageSize > (SIZE_MAX / sizeof(GifPixelType))) { - return GIF_ERROR; - } -- sp->RasterBits = (unsigned char *)reallocarray(NULL, ImageSize, -+ sp->RasterBits = (unsigned char *)giflib_private_reallocarray(NULL, ImageSize, - sizeof(GifPixelType)); - - if (sp->RasterBits == NULL) { -diff -ur giflib-5.1.4.orig/lib/gifalloc.c giflib-5.1.4/lib/gifalloc.c ---- giflib-5.1.4.orig/lib/gifalloc.c 2018-02-28 20:31:02.294682673 +0100 -+++ giflib-5.1.4/lib/gifalloc.c 2018-02-28 22:38:11.657126423 +0100 -@@ -8,7 +8,7 @@ - #include <stdio.h> - #include <string.h> - --#include "gif_lib.h" -+#include "gif_lib_private.h" - - #define MAX(x, y) (((x) > (y)) ? (x) : (y)) - -@@ -188,7 +188,7 @@ - - /* perhaps we can shrink the map? */ - if (RoundUpTo < ColorUnion->ColorCount) { -- GifColorType *new_map = (GifColorType *)reallocarray(Map, -+ GifColorType *new_map = (GifColorType *)giflib_private_reallocarray(Map, - RoundUpTo, sizeof(GifColorType)); - if( new_map == NULL ) { - GifFreeMapObject(ColorUnion); -@@ -232,7 +232,7 @@ - if (*ExtensionBlocks == NULL) - *ExtensionBlocks=(ExtensionBlock *)malloc(sizeof(ExtensionBlock)); - else { -- ExtensionBlock* ep_new = (ExtensionBlock *)reallocarray -+ ExtensionBlock* ep_new = (ExtensionBlock *)giflib_private_reallocarray - (*ExtensionBlocks, (*ExtensionBlockCount + 1), - sizeof(ExtensionBlock)); - if( ep_new == NULL ) -@@ -325,7 +325,7 @@ - if (GifFile->SavedImages == NULL) - GifFile->SavedImages = (SavedImage *)malloc(sizeof(SavedImage)); - else -- GifFile->SavedImages = (SavedImage *)reallocarray(GifFile->SavedImages, -+ GifFile->SavedImages = (SavedImage *)giflib_private_reallocarray(GifFile->SavedImages, - (GifFile->ImageCount + 1), sizeof(SavedImage)); - - if (GifFile->SavedImages == NULL) -@@ -355,7 +355,7 @@ - } - - /* next, the raster */ -- sp->RasterBits = (unsigned char *)reallocarray(NULL, -+ sp->RasterBits = (unsigned char *)giflib_private_reallocarray(NULL, - (CopyFrom->ImageDesc.Height * - CopyFrom->ImageDesc.Width), - sizeof(GifPixelType)); -@@ -369,7 +369,7 @@ - - /* finally, the extension blocks */ - if (sp->ExtensionBlocks != NULL) { -- sp->ExtensionBlocks = (ExtensionBlock *)reallocarray(NULL, -+ sp->ExtensionBlocks = (ExtensionBlock *)giflib_private_reallocarray(NULL, - CopyFrom->ExtensionBlockCount, - sizeof(ExtensionBlock)); - if (sp->ExtensionBlocks == NULL) { -diff -ur giflib-5.1.4.orig/lib/gif_lib.h giflib-5.1.4/lib/gif_lib.h ---- giflib-5.1.4.orig/lib/gif_lib.h 2018-02-28 20:31:02.294682673 +0100 -+++ giflib-5.1.4/lib/gif_lib.h 2018-02-28 20:31:43.135716712 +0100 -@@ -244,9 +244,6 @@ - GifPixelType ColorTransIn2[]); - extern int GifBitSize(int n); - --extern void * --reallocarray(void *optr, size_t nmemb, size_t size); -- - /****************************************************************************** - Support for the in-core structures allocation (slurp mode). - ******************************************************************************/ -diff -ur giflib-5.1.4.orig/lib/gif_lib_private.h giflib-5.1.4/lib/gif_lib_private.h ---- giflib-5.1.4.orig/lib/gif_lib_private.h 2018-02-28 20:31:02.294682673 +0100 -+++ giflib-5.1.4/lib/gif_lib_private.h 2018-02-28 22:38:11.657126423 +0100 -@@ -54,6 +54,9 @@ - bool gif89; - } GifFilePrivateType; - -+extern void * -+giflib_private_reallocarray(void *optr, size_t nmemb, size_t size); -+ - #endif /* _GIF_LIB_PRIVATE_H */ - - /* end */ -diff -ur giflib-5.1.4.orig/lib/openbsd-reallocarray.c giflib-5.1.4/lib/openbsd-reallocarray.c ---- giflib-5.1.4.orig/lib/openbsd-reallocarray.c 2018-02-28 20:31:02.295682659 +0100 -+++ giflib-5.1.4/lib/openbsd-reallocarray.c 2018-02-28 22:38:11.656126428 +0100 -@@ -27,7 +27,7 @@ - #define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) - - void * --reallocarray(void *optr, size_t nmemb, size_t size) -+giflib_private_reallocarray(void *optr, size_t nmemb, size_t size) - { - if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && - nmemb > 0 && SIZE_MAX / nmemb < size) { diff --git a/gnu/packages/patches/glibc-2.29-supported-locales.patch b/gnu/packages/patches/glibc-2.29-supported-locales.patch new file mode 100644 index 0000000000..05865dc7be --- /dev/null +++ b/gnu/packages/patches/glibc-2.29-supported-locales.patch @@ -0,0 +1,33 @@ +This patch is taken from debian's glibc package (generate-supported.mk). +It install the localedata/SUPPORTED file of the glibc. This file lists +all the supported locales of the glibc. + +diff --git a/localedata/Makefile b/localedata/Makefile +index 65079f9eb8..14818f84e0 100644 +--- a/localedata/Makefile ++++ b/localedata/Makefile +@@ -169,7 +169,8 @@ endif + # Files to install. + install-others := $(addprefix $(inst_i18ndir)/, \ + $(addsuffix .gz, $(charmaps)) \ +- $(locales)) ++ $(locales)) \ ++ $(inst_i18ndir)/SUPPORTED + + tests: $(objdir)/iconvdata/gconv-modules + +@@ -380,6 +381,14 @@ endif + + include SUPPORTED + ++$(inst_i18ndir)/SUPPORTED: SUPPORTED $(+force) ++ for locale in $(SUPPORTED-LOCALES); do \ ++ [ $$locale = true ] && continue; \ ++ echo $$locale | sed 's,/, ,' >> LOCALES; \ ++ done ++ $(make-target-directory) ++ $(INSTALL_DATA) LOCALES $@ ++ + INSTALL-SUPPORTED-LOCALE-ARCHIVE=$(addprefix install-archive-, $(SUPPORTED-LOCALES)) + INSTALL-SUPPORTED-LOCALE-FILES=$(addprefix install-files-, $(SUPPORTED-LOCALES)) +
\ No newline at end of file diff --git a/gnu/packages/patches/glibc-CVE-2019-19126.patch b/gnu/packages/patches/glibc-CVE-2019-19126.patch new file mode 100644 index 0000000000..5b9ac58ab7 --- /dev/null +++ b/gnu/packages/patches/glibc-CVE-2019-19126.patch @@ -0,0 +1,22 @@ +Fix CVE-2019-19126: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-19126 +https://sourceware.org/bugzilla/show_bug.cgi?id=25204 + +Taken from upstream: +https://sourceware.org/git/?p=glibc.git;a=commit;h=37c90e117310728a4ad1eb998c0bbe7d79c4a398 + +diff --git a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h +index 975cbe2..df2cdfd 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h ++++ b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h +@@ -31,7 +31,8 @@ + environment variable, LD_PREFER_MAP_32BIT_EXEC. */ + #define EXTRA_LD_ENVVARS \ + case 21: \ +- if (memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \ ++ if (!__libc_enable_secure \ ++ && memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \ + GLRO(dl_x86_cpu_features).feature[index_arch_Prefer_MAP_32BIT_EXEC] \ + |= bit_arch_Prefer_MAP_32BIT_EXEC; \ + break; diff --git a/gnu/packages/patches/glibc-bootstrap-system-2.2.5.patch b/gnu/packages/patches/glibc-bootstrap-system-2.2.5.patch new file mode 100644 index 0000000000..d11fc00c75 --- /dev/null +++ b/gnu/packages/patches/glibc-bootstrap-system-2.2.5.patch @@ -0,0 +1,30 @@ +We want to allow builds in chroots that lack /bin/sh. Thus, system(3) +and popen(3) need to be tweaked to use the right shell. For the bootstrap +glibc, we just use whatever `sh' can be found in $PATH. The final glibc +instead uses the hard-coded absolute file name of `bash'. + +--- a/sysdeps/posix/system.c ++++ b/sysdeps/posix/system.c +@@ -106,8 +106,8 @@ do_system (const char *line) + (void) UNBLOCK; + + /* Exec the shell. */ +- (void) __execve (SHELL_PATH, (char *const *) new_argv, __environ); ++ (void) execvp (SHELL_NAME, (char *const *) new_argv); + _exit (127); + } + else if (pid < (pid_t) 0) + /* The fork failed. */ +--- a/libio/iopopen.c ++++ b/libio/iopopen.c +@@ -170,7 +170,7 @@ _IO_new_proc_open (fp, command, mode) + for (p = proc_file_chain; p; p = p->next) + _IO_close (_IO_fileno ((_IO_FILE *) p)); + +- _IO_execl ("/bin/sh", "sh", "-c", command, (char *) 0); ++ execlp ("sh", "sh", "-c", command, (char *) 0); + _IO__exit (127); + } + _IO_close (child_end); + + diff --git a/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch new file mode 100644 index 0000000000..1c3fe427f9 --- /dev/null +++ b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch @@ -0,0 +1,84 @@ +This is needed to run Python on the Hurd, especially during the build of +python-boot0. + +Adapted from https://salsa.debian.org/glibc-team/glibc/-/blob/glibc-2.31/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff + +Use the realtime clock for the monotonic clock. This is of course not a proper +implementation (which is being done in Mach), but will permit to fix at least +the iceweasel stack. + +vlc however doesn't build when _POSIX_CLOCK_SELECTION is enabled but +_POSIX_TIMERS is not, and they refuse to fix that (see #765578), so disable the +former. + +From 0aa1dfd580cf9ad7b812c307b128decb782b825f Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Mon, 2 Mar 2020 18:59:04 +0100 +Subject: [PATCH 2/2] Use realtime clock for the monotonic clock. + +--- + sysdeps/mach/clock_gettime.c | 2 +- + sysdeps/mach/hurd/bits/posix_opt.h | 6 +++--- + sysdeps/posix/clock_getres.c | 1 + + sysdeps/pthread/timer_create.c | 2 +- + 4 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c +index ac3547df3c..af8681ba4e 100644 +--- a/sysdeps/mach/clock_gettime.c ++++ b/sysdeps/mach/clock_gettime.c +@@ -25,7 +25,7 @@ + int + __clock_gettime (clockid_t clock_id, struct timespec *ts) + { +- if (clock_id != CLOCK_REALTIME) ++ if (clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_REALTIME) + { + errno = EINVAL; + return -1; +diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h +index 0050151332..27b3a28ab7 100644 +--- a/sysdeps/mach/hurd/bits/posix_opt.h ++++ b/sysdeps/mach/hurd/bits/posix_opt.h +@@ -163,10 +163,10 @@ + #define _POSIX_THREAD_PROCESS_SHARED -1 + + /* The monotonic clock might be available. */ +-#define _POSIX_MONOTONIC_CLOCK 0 ++#define _POSIX_MONOTONIC_CLOCK 200809L + +-/* The clock selection interfaces are available. */ +-#define _POSIX_CLOCK_SELECTION 200809L ++/* The clock selection interfaces are not really available yet. */ ++#define _POSIX_CLOCK_SELECTION -1 + + /* Advisory information interfaces could be available in future. */ + #define _POSIX_ADVISORY_INFO 0 +diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c +index fcd79fd554..1dd02aa449 100644 +--- a/sysdeps/posix/clock_getres.c ++++ b/sysdeps/posix/clock_getres.c +@@ -52,6 +52,7 @@ __clock_getres (clockid_t clock_id, struct timespec *res) + switch (clock_id) + { + case CLOCK_REALTIME: ++ case CLOCK_MONOTONIC: + retval = realtime_getres (res); + break; + +diff --git a/sysdeps/pthread/timer_create.c b/sysdeps/pthread/timer_create.c +index 9d8a9ea8ae..3430582c09 100644 +--- a/sysdeps/pthread/timer_create.c ++++ b/sysdeps/pthread/timer_create.c +@@ -48,7 +48,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid) + return -1; + } + +- if (clock_id != CLOCK_REALTIME) ++ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC) + { + __set_errno (EINVAL); + return -1; +-- +2.24.0 + diff --git a/gnu/packages/patches/glibc-hurd-clock_t_centiseconds.patch b/gnu/packages/patches/glibc-hurd-clock_t_centiseconds.patch new file mode 100644 index 0000000000..8f9676c873 --- /dev/null +++ b/gnu/packages/patches/glibc-hurd-clock_t_centiseconds.patch @@ -0,0 +1,90 @@ +This is needed to run Python on the Hurd, especially during the build of +python-boot0. + +Adapted from https://salsa.debian.org/glibc-team/glibc/-/blob/glibc-2.31/debian/patches/hurd-i386/unsubmitted-clock_t_centiseconds.diff + + commit d57f2f9b4bd007846af2fb4217486ea572579010 + Author: Richard Braun <rbraun@sceen.net> + Date: Tue Aug 27 11:35:31 2013 +0200 + + Express CPU time (clock_t of times(2)) in centiseconds + +From 170c292b643fdc1eb56881e6592b07c0c019993e Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Mon, 2 Mar 2020 18:28:54 +0100 +Subject: [PATCH 1/2] Express CPU time (clock_t) in centiseconds + +--- + sysdeps/mach/hurd/clock.c | 8 ++++---- + sysdeps/mach/hurd/getclktck.c | 5 ++--- + sysdeps/mach/hurd/setitimer.c | 2 +- + sysdeps/mach/hurd/times.c | 2 +- + 4 files changed, 8 insertions(+), 9 deletions(-) + +diff --git a/sysdeps/mach/hurd/clock.c b/sysdeps/mach/hurd/clock.c +index 7cb42df786..4db49b579d 100644 +--- a/sysdeps/mach/hurd/clock.c ++++ b/sysdeps/mach/hurd/clock.c +@@ -44,10 +44,10 @@ clock (void) + if (err) + return __hurd_fail (err); + +- total = bi.user_time.seconds * 1000000 + bi.user_time.microseconds; +- total += tti.user_time.seconds * 1000000 + tti.user_time.microseconds; +- total += bi.system_time.seconds * 1000000 + bi.system_time.microseconds; +- total += tti.system_time.seconds * 1000000 + tti.system_time.microseconds; ++ total = bi.user_time.seconds * 100 + bi.user_time.microseconds / 10000; ++ total += tti.user_time.seconds * 100 + tti.user_time.microseconds / 10000; ++ total += bi.system_time.seconds * 100 + bi.system_time.microseconds / 10000; ++ total += tti.system_time.seconds * 100 + tti.system_time.microseconds / 10000; + + return total; + } +diff --git a/sysdeps/mach/hurd/getclktck.c b/sysdeps/mach/hurd/getclktck.c +index 943e36e805..5a3cf0930b 100644 +--- a/sysdeps/mach/hurd/getclktck.c ++++ b/sysdeps/mach/hurd/getclktck.c +@@ -18,12 +18,11 @@ + + #include <time.h> + +-/* Return frequency of `times'. +- Since Mach reports CPU times in microseconds, we always use 1 million. */ ++/* Return frequency of `times'. */ + int + __getclktck (void) + { +- return 1000000; ++ return 100; + } + + /* Before glibc 2.2, the Hurd actually did this differently, so we +diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c +index b16f4ddd5d..8bf1464830 100644 +--- a/sysdeps/mach/hurd/setitimer.c ++++ b/sysdeps/mach/hurd/setitimer.c +@@ -43,7 +43,7 @@ quantize_timeval (struct timeval *tv) + static time_t quantum = -1; + + if (quantum == -1) +- quantum = 1000000 / __getclktck (); ++ quantum = 100 / __getclktck (); + + tv->tv_usec = ((tv->tv_usec + (quantum - 1)) / quantum) * quantum; + if (tv->tv_usec >= 1000000) +diff --git a/sysdeps/mach/hurd/times.c b/sysdeps/mach/hurd/times.c +index 23ed992783..cbf6039b19 100644 +--- a/sysdeps/mach/hurd/times.c ++++ b/sysdeps/mach/hurd/times.c +@@ -29,7 +29,7 @@ + static inline clock_t + clock_from_time_value (const time_value_t *t) + { +- return t->seconds * 1000000 + t->microseconds; ++ return t->seconds * 100 + t->microseconds / 10000; + } + + /* Store the CPU time used by this process and all its +-- +2.24.0 + diff --git a/gnu/packages/patches/glibc-hurd-gettyent.patch b/gnu/packages/patches/glibc-hurd-gettyent.patch new file mode 100644 index 0000000000..721a8d4fa8 --- /dev/null +++ b/gnu/packages/patches/glibc-hurd-gettyent.patch @@ -0,0 +1,34 @@ +From d6d2caef3e44d0713bb6625f697a1ec615abae70 Mon Sep 17 00:00:00 2001 +From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> +Date: Sun, 5 Apr 2020 16:29:54 +0200 +Subject: [PATCH 4/4] misc: Choose a longer arbitrary line length. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows running specifying a `getty' in the GNU Guix store. + +* misc/getttyent.c (MAXLINELENGTH): Use 512 (instead of 100) as +another "great" arbitrary limit. + +Co-Authored-By: Ludovic Courtès <ludo@gnu.org> +--- + misc/getttyent.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/misc/getttyent.c b/misc/getttyent.c +index 92d92b026f..508d296291 100644 +--- a/misc/getttyent.c ++++ b/misc/getttyent.c +@@ -66,7 +66,7 @@ __getttyent (void) + static struct ttyent tty; + int c; + char *p; +-#define MAXLINELENGTH 100 ++#define MAXLINELENGTH 512 + static char line[MAXLINELENGTH]; + + if (!tf && !__setttyent()) +-- +2.26.0 + diff --git a/gnu/packages/patches/glibc-hurd-mach-print.patch b/gnu/packages/patches/glibc-hurd-mach-print.patch new file mode 100644 index 0000000000..7fdf6733d0 --- /dev/null +++ b/gnu/packages/patches/glibc-hurd-mach-print.patch @@ -0,0 +1,23 @@ +Provide a 'mach_print' symbol in libc. + +--- a/sysdeps/mach/hurd/i386/libc.abilist 2020-04-01 19:22:44.710088821 +0200 ++++ b/sysdeps/mach/hurd/i386/libc.abilist 2020-04-01 19:22:52.062051161 +0200 +@@ -338,6 +338,7 @@ + GLIBC_2.2.6 __mach_port_allocate F + GLIBC_2.2.6 __mach_port_deallocate F + GLIBC_2.2.6 __mach_port_insert_right F ++GLIBC_2.21 __mach_print F + GLIBC_2.2.6 __mach_reply_port F + GLIBC_2.2.6 __mach_task_self_ D 0x4 + GLIBC_2.2.6 __mach_thread_self F + +--- a/mach/Versions ++++ b/mach/Versions +@@ -56,6 +56,7 @@ + } + GLIBC_2.21 { + __mach_host_self_; ++ mach_print; + } + + HURD_CTHREADS_0.3 { diff --git a/gnu/packages/patches/glibc-hurd-signal-sa-siginfo.patch b/gnu/packages/patches/glibc-hurd-signal-sa-siginfo.patch new file mode 100644 index 0000000000..36ea55e188 --- /dev/null +++ b/gnu/packages/patches/glibc-hurd-signal-sa-siginfo.patch @@ -0,0 +1,637 @@ +This patch is needed to build e2fsprogs, util-linux. + +Taken from https://salsa.debian.org/glibc-team/glibc/-/blob/glibc-2.31/debian/patches/hurd-i386/tg-hurdsig-SA_SIGINFO.diff + +From: Jeremie Koenig <jk@jk.fr.eu.org> +Subject: [PATCH] implement SA_SIGINFO signal handlers. + + 52baaca Hurd signals: Copy bits/sigaction.h + 4232c66 Hurd signals: SA_SIGINFO support + 1831cfe Hurd signals: Use POSIX sigcodes + +--- + hurd/hurd/signal.h | 5 + + hurd/hurdfault.c | 2 + hurd/hurdinit.c | 2 + hurd/hurdsig.c | 6 - + sysdeps/mach/hurd/bits/sigaction.h | 86 +++++++++++++++++++++ + sysdeps/mach/hurd/i386/bits/sigcontext.h | 4 + sysdeps/mach/hurd/i386/exc2signal.c | 123 +++++++++++++++++++----------- + sysdeps/mach/hurd/i386/trampoline.c | 125 ++++++++++++++++++++++++++++--- + sysdeps/mach/hurd/kill.c | 2 + sysdeps/mach/hurd/setitimer.c | 2 + 10 files changed, 293 insertions(+), 64 deletions(-) + +Index: glibc-2.31/hurd/hurd/signal.h +=================================================================== +--- glibc-2.31.orig/hurd/hurd/signal.h ++++ glibc-2.31/hurd/hurd/signal.h +@@ -290,6 +290,11 @@ extern int _hurd_raise_signal (struct hu + extern void _hurd_exception2signal (struct hurd_signal_detail *detail, + int *signo); + ++/* Translate a Mach exception into a signal with a legacy sigcode. */ ++ ++extern void _hurd_exception2signal_legacy (struct hurd_signal_detail *detail, ++ int *signo); ++ + + /* Make the thread described by SS take the signal described by SIGNO and + DETAIL. If the process is traced, this will in fact stop with a SIGNO +Index: glibc-2.31/hurd/hurdfault.c +=================================================================== +--- glibc-2.31.orig/hurd/hurdfault.c ++++ glibc-2.31/hurd/hurdfault.c +@@ -70,7 +70,7 @@ _hurdsig_fault_catch_exception_raise (ma + codes into a signal number and subcode. */ + _hurd_exception2signal (&d, &signo); + +- return HURD_PREEMPT_SIGNAL_P (&_hurdsig_fault_preemptor, signo, d.code) ++ return HURD_PREEMPT_SIGNAL_P (&_hurdsig_fault_preemptor, signo, d.exc_subcode) + ? 0 : EGREGIOUS; + } + +Index: glibc-2.31/hurd/hurdinit.c +=================================================================== +--- glibc-2.31.orig/hurd/hurdinit.c ++++ glibc-2.31/hurd/hurdinit.c +@@ -177,7 +177,7 @@ _hurd_new_proc_init (char **argv, + /* This process is "traced", meaning it should stop on signals or exec. + We are all set up now to handle signals. Stop ourselves, to inform + our parent (presumably a debugger) that the exec has completed. */ +- __msg_sig_post (_hurd_msgport, SIGTRAP, 0, __mach_task_self ()); ++ __msg_sig_post (_hurd_msgport, SIGTRAP, TRAP_TRACE, __mach_task_self ()); + } + + #include <shlib-compat.h> +Index: glibc-2.31/hurd/hurdsig.c +=================================================================== +--- glibc-2.31.orig/hurd/hurdsig.c ++++ glibc-2.31/hurd/hurdsig.c +@@ -730,7 +730,7 @@ post_signal (struct hurd_sigstate *ss, + { /* PE cannot be null. */ + do + { +- if (HURD_PREEMPT_SIGNAL_P (pe, signo, detail->code)) ++ if (HURD_PREEMPT_SIGNAL_P (pe, signo, detail->exc_subcode)) + { + if (pe->preemptor) + { +@@ -1374,7 +1374,7 @@ _S_msg_sig_post (mach_port_t me, + if (err = signal_allowed (signo, refport)) + return err; + +- d.code = sigcode; ++ d.code = d.exc_subcode = sigcode; + d.exc = 0; + + /* Post the signal to a global receiver thread (or mark it pending in +@@ -1403,7 +1403,7 @@ _S_msg_sig_post_untraced (mach_port_t me + if (err = signal_allowed (signo, refport)) + return err; + +- d.code = sigcode; ++ d.code = d.exc_subcode = sigcode; + d.exc = 0; + + /* Post the signal to the designated signal-receiving thread. This will +Index: glibc-2.31/sysdeps/mach/hurd/bits/sigaction.h +=================================================================== +--- /dev/null ++++ glibc-2.31/sysdeps/mach/hurd/bits/sigaction.h +@@ -0,0 +1,86 @@ ++/* Copyright (C) 1991-2015 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, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#ifndef _BITS_SIGACTION_H ++#define _BITS_SIGACTION_H 1 ++ ++#ifndef _SIGNAL_H ++# error "Never include <bits/sigaction.h> directly; use <signal.h> instead." ++#endif ++ ++/* These definitions match those used by the 4.4 BSD kernel. ++ If the operating system has a `sigaction' system call that correctly ++ implements the POSIX.1 behavior, there should be a system-dependent ++ version of this file that defines `struct sigaction' and the `SA_*' ++ constants appropriately. */ ++ ++/* Structure describing the action to be taken when a signal arrives. */ ++struct sigaction ++ { ++ /* Signal handler. */ ++#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED ++ union ++ { ++ /* Used if SA_SIGINFO is not set. */ ++ __sighandler_t sa_handler; ++ /* Used if SA_SIGINFO is set. */ ++ void (*sa_sigaction) (int, siginfo_t *, void *); ++ } ++ __sigaction_handler; ++# define sa_handler __sigaction_handler.sa_handler ++# define sa_sigaction __sigaction_handler.sa_sigaction ++#else ++ __sighandler_t sa_handler; ++#endif ++ ++ /* Additional set of signals to be blocked. */ ++ __sigset_t sa_mask; ++ ++ /* Special flags. */ ++ int sa_flags; ++ }; ++ ++/* Bits in `sa_flags'. */ ++#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC ++# define SA_ONSTACK 0x0001 /* Take signal on signal stack. */ ++#endif ++#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 ++# define SA_RESTART 0x0002 /* Restart syscall on signal return. */ ++# define SA_NODEFER 0x0010 /* Don't automatically block the signal when ++ its handler is being executed. */ ++# define SA_RESETHAND 0x0004 /* Reset to SIG_DFL on entry to handler. */ ++#endif ++#define SA_NOCLDSTOP 0x0008 /* Don't send SIGCHLD when children stop. */ ++#define SA_SIGINFO 0x0040 /* Signal handler with SA_SIGINFO args */ ++ ++#ifdef __USE_MISC ++# define SA_INTERRUPT 0 /* Historical no-op ("not SA_RESTART"). */ ++ ++/* Some aliases for the SA_ constants. */ ++# define SA_NOMASK SA_NODEFER ++# define SA_ONESHOT SA_RESETHAND ++# define SA_STACK SA_ONSTACK ++#endif ++ ++ ++/* Values for the HOW argument to `sigprocmask'. */ ++#define SIG_BLOCK 1 /* Block signals. */ ++#define SIG_UNBLOCK 2 /* Unblock signals. */ ++#define SIG_SETMASK 3 /* Set the set of blocked signals. */ ++ ++#endif +Index: glibc-2.31/sysdeps/mach/hurd/i386/bits/sigcontext.h +=================================================================== +--- glibc-2.31.orig/sysdeps/mach/hurd/i386/bits/sigcontext.h ++++ glibc-2.31/sysdeps/mach/hurd/i386/bits/sigcontext.h +@@ -97,6 +97,10 @@ struct sigcontext + #define sc_ps sc_efl + + ++/* The deprecated sigcode values below are passed as an extra, non-portable ++ argument to regular signal handlers. You should use SA_SIGINFO handlers ++ instead, which use the standard POSIX signal codes. */ ++ + /* Codes for SIGFPE. */ + #define FPE_INTOVF_TRAP 0x1 /* integer overflow */ + #define FPE_INTDIV_FAULT 0x2 /* integer divide by zero */ +Index: glibc-2.31/sysdeps/mach/hurd/i386/exc2signal.c +=================================================================== +--- glibc-2.31.orig/sysdeps/mach/hurd/i386/exc2signal.c ++++ glibc-2.31/sysdeps/mach/hurd/i386/exc2signal.c +@@ -23,8 +23,8 @@ + /* Translate the Mach exception codes, as received in an `exception_raise' RPC, + into a signal number and signal subcode. */ + +-void +-_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) ++static void ++exception2signal (struct hurd_signal_detail *detail, int *signo, int posix) + { + detail->error = 0; + +@@ -36,44 +36,62 @@ _hurd_exception2signal (struct hurd_sign + break; + + case EXC_BAD_ACCESS: +- if (detail->exc_code == KERN_INVALID_ADDRESS +- || detail->exc_code == KERN_PROTECTION_FAILURE +- || detail->exc_code == KERN_WRITE_PROTECTION_FAILURE) +- *signo = SIGSEGV; +- else +- *signo = SIGBUS; +- detail->code = detail->exc_subcode; ++ switch (detail->exc_code) ++ { ++ case KERN_INVALID_ADDRESS: ++ case KERN_MEMORY_FAILURE: ++ *signo = SIGSEGV; ++ detail->code = posix ? SEGV_MAPERR : detail->exc_subcode; ++ break; ++ ++ case KERN_PROTECTION_FAILURE: ++ case KERN_WRITE_PROTECTION_FAILURE: ++ *signo = SIGSEGV; ++ detail->code = posix ? SEGV_ACCERR : detail->exc_subcode; ++ break; ++ ++ default: ++ *signo = SIGBUS; ++ detail->code = posix ? BUS_ADRERR : detail->exc_subcode; ++ break; ++ } + detail->error = detail->exc_code; + break; + + case EXC_BAD_INSTRUCTION: + *signo = SIGILL; +- if (detail->exc_code == EXC_I386_INVOP) +- detail->code = ILL_INVOPR_FAULT; +- else if (detail->exc_code == EXC_I386_STKFLT) +- detail->code = ILL_STACK_FAULT; +- else +- detail->code = 0; ++ switch (detail->exc_code) ++ { ++ case EXC_I386_INVOP: ++ detail->code = posix ? ILL_ILLOPC : ILL_INVOPR_FAULT; ++ break; ++ ++ case EXC_I386_STKFLT: ++ detail->code = posix ? ILL_BADSTK : ILL_STACK_FAULT; ++ break; ++ ++ default: ++ detail->code = 0; ++ break; ++ } + break; + + case EXC_ARITHMETIC: ++ *signo = SIGFPE; + switch (detail->exc_code) + { + case EXC_I386_DIV: /* integer divide by zero */ +- *signo = SIGFPE; +- detail->code = FPE_INTDIV_FAULT; ++ detail->code = posix ? FPE_INTDIV : FPE_INTDIV_FAULT; + break; + + case EXC_I386_INTO: /* integer overflow */ +- *signo = SIGFPE; +- detail->code = FPE_INTOVF_TRAP; ++ detail->code = posix ? FPE_INTOVF : FPE_INTOVF_TRAP; + break; + + /* These aren't anywhere documented or used in Mach 3.0. */ + case EXC_I386_NOEXT: + case EXC_I386_EXTOVR: + default: +- *signo = SIGFPE; + detail->code = 0; + break; + +@@ -82,51 +100,43 @@ _hurd_exception2signal (struct hurd_sign + Give an error code corresponding to the first bit set. */ + if (detail->exc_subcode & FPS_IE) + { +- *signo = SIGILL; +- detail->code = ILL_FPEOPR_FAULT; ++ /* NB: We used to send SIGILL here but we can't distinguish ++ POSIX vs. legacy with respect to what signal we send. */ ++ detail->code = posix ? FPE_FLTINV : 0 /*ILL_FPEOPR_FAULT*/; + } + else if (detail->exc_subcode & FPS_DE) + { +- *signo = SIGFPE; +- detail->code = FPE_FLTDNR_FAULT; ++ detail->code = posix ? FPE_FLTUND : FPE_FLTDNR_FAULT; + } + else if (detail->exc_subcode & FPS_ZE) + { +- *signo = SIGFPE; +- detail->code = FPE_FLTDIV_FAULT; ++ detail->code = posix ? FPE_FLTDIV : FPE_FLTDIV_FAULT; + } + else if (detail->exc_subcode & FPS_OE) + { +- *signo = SIGFPE; +- detail->code = FPE_FLTOVF_FAULT; ++ detail->code = posix ? FPE_FLTOVF : FPE_FLTOVF_FAULT; + } + else if (detail->exc_subcode & FPS_UE) + { +- *signo = SIGFPE; +- detail->code = FPE_FLTUND_FAULT; ++ detail->code = posix ? FPE_FLTUND : FPE_FLTUND_FAULT; + } + else if (detail->exc_subcode & FPS_PE) + { +- *signo = SIGFPE; +- detail->code = FPE_FLTINX_FAULT; ++ detail->code = posix ? FPE_FLTRES : FPE_FLTINX_FAULT; + } + else + { +- *signo = SIGFPE; + detail->code = 0; + } + break; + + /* These two can only be arithmetic exceptions if we +- are in V86 mode, which sounds like emulation to me. +- (See Mach 3.0 i386/trap.c.) */ ++ are in V86 mode. (See Mach 3.0 i386/trap.c.) */ + case EXC_I386_EMERR: +- *signo = SIGFPE; +- detail->code = FPE_EMERR_FAULT; ++ detail->code = posix ? 0 : FPE_EMERR_FAULT; + break; + case EXC_I386_BOUND: +- *signo = SIGFPE; +- detail->code = FPE_EMBND_FAULT; ++ detail->code = posix ? FPE_FLTSUB : FPE_EMBND_FAULT; + break; + } + break; +@@ -143,7 +153,7 @@ _hurd_exception2signal (struct hurd_sign + if (detail->exc_code == EXC_I386_BOUND) + { + *signo = SIGFPE; +- detail->code = FPE_SUBRNG_FAULT; ++ detail->code = posix ? FPE_FLTSUB : FPE_SUBRNG_FAULT; + } + else + { +@@ -154,13 +164,34 @@ _hurd_exception2signal (struct hurd_sign + + case EXC_BREAKPOINT: + *signo = SIGTRAP; +- if (detail->exc_code == EXC_I386_SGL) +- detail->code = DBG_SINGLE_TRAP; +- else if (detail->exc_code == EXC_I386_BPT) +- detail->code = DBG_BRKPNT_FAULT; +- else +- detail->code = 0; ++ switch (detail->exc_code) ++ { ++ case EXC_I386_SGL: ++ detail->code = posix ? TRAP_BRKPT : DBG_SINGLE_TRAP; ++ break; ++ ++ case EXC_I386_BPT: ++ detail->code = posix ? TRAP_BRKPT : DBG_BRKPNT_FAULT; ++ break; ++ ++ default: ++ detail->code = 0; ++ break; ++ } + break; + } + } + libc_hidden_def (_hurd_exception2signal) ++ ++void ++_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) ++{ ++ exception2signal (detail, signo, 1); ++} ++ ++void ++_hurd_exception2signal_legacy (struct hurd_signal_detail *detail, int *signo) ++{ ++ exception2signal (detail, signo, 0); ++} ++ +Index: glibc-2.31/sysdeps/mach/hurd/i386/trampoline.c +=================================================================== +--- glibc-2.31.orig/sysdeps/mach/hurd/i386/trampoline.c ++++ glibc-2.31/sysdeps/mach/hurd/i386/trampoline.c +@@ -19,13 +19,66 @@ + #include <hurd/signal.h> + #include <hurd/userlink.h> + #include <thread_state.h> ++#include <mach/exception.h> + #include <mach/machine/eflags.h> + #include <assert.h> + #include <errno.h> + #include "hurdfault.h" + #include <intr-msg.h> ++#include <sys/ucontext.h> + + ++/* Fill in a siginfo_t structure for SA_SIGINFO-enabled handlers. */ ++static void fill_siginfo (siginfo_t *si, int signo, ++ const struct hurd_signal_detail *detail, ++ const struct machine_thread_all_state *state) ++{ ++ si->si_signo = signo; ++ si->si_errno = detail->error; ++ si->si_code = detail->code; ++ ++ /* XXX We would need a protocol change for sig_post to include ++ * this information. */ ++ si->si_pid = -1; ++ si->si_uid = -1; ++ ++ /* Address of the faulting instruction or memory access. */ ++ if (detail->exc == EXC_BAD_ACCESS) ++ si->si_addr = (void *) detail->exc_subcode; ++ else ++ si->si_addr = (void *) state->basic.eip; ++ ++ /* XXX On SIGCHLD, this should be the exit status of the child ++ * process. We would need a protocol change for the proc server ++ * to send this information along with the signal. */ ++ si->si_status = 0; ++ ++ si->si_band = 0; /* SIGPOLL is not supported yet. */ ++ si->si_value.sival_int = 0; /* sigqueue() is not supported yet. */ ++} ++ ++/* Fill in a ucontext_t structure SA_SIGINFO-enabled handlers. */ ++static void fill_ucontext (ucontext_t *uc, const struct sigcontext *sc) ++{ ++ uc->uc_flags = 0; ++ uc->uc_link = NULL; ++ uc->uc_sigmask = sc->sc_mask; ++ uc->uc_stack.ss_sp = (__ptr_t) sc->sc_esp; ++ uc->uc_stack.ss_size = 0; ++ uc->uc_stack.ss_flags = 0; ++ ++ /* Registers. */ ++ memcpy (&uc->uc_mcontext.gregs[REG_GS], &sc->sc_gs, ++ (REG_TRAPNO - REG_GS) * sizeof (int)); ++ uc->uc_mcontext.gregs[REG_TRAPNO] = 0; ++ uc->uc_mcontext.gregs[REG_ERR] = 0; ++ memcpy (&uc->uc_mcontext.gregs[REG_EIP], &sc->sc_eip, ++ (NGREG - REG_EIP) * sizeof (int)); ++ ++ /* XXX FPU state. */ ++ memset (&uc->uc_mcontext.fpregs, 0, sizeof (fpregset_t)); ++} ++ + struct sigcontext * + _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler, + int signo, struct hurd_signal_detail *detail, +@@ -43,15 +96,38 @@ _hurd_setup_sighandler (struct hurd_sigs + struct + { + int signo; +- long int sigcode; +- struct sigcontext *scp; /* Points to ctx, below. */ ++ union ++ { ++ /* Extra arguments for traditional signal handlers */ ++ struct ++ { ++ long int sigcode; ++ struct sigcontext *scp; /* Points to ctx, below. */ ++ } legacy; ++ ++ /* Extra arguments for SA_SIGINFO handlers */ ++ struct ++ { ++ siginfo_t *siginfop; /* Points to siginfo, below. */ ++ ucontext_t *uctxp; /* Points to uctx, below. */ ++ } posix; ++ }; + void *sigreturn_addr; + void *sigreturn_returns_here; + struct sigcontext *return_scp; /* Same; arg to sigreturn. */ ++ ++ /* NB: sigreturn assumes link is next to ctx. */ + struct sigcontext ctx; + struct hurd_userlink link; ++ ucontext_t ucontext; ++ siginfo_t siginfo; + } *stackframe; + ++ /* sigaction for preemptors */ ++ static const struct sigaction legacy_sigaction = { ++ .sa_flags = SA_RESTART ++ }; ++ + if (ss->context) + { + /* We have a previous sigcontext that sigreturn was about +@@ -94,9 +170,13 @@ _hurd_setup_sighandler (struct hurd_sigs + the SP on sigreturn. */ + state->basic.uesp = state->basic.ecx; + +- /* XXX what if handler != action->handler (for instance, if a signal +- * preemptor took over) ? */ + action = & _hurd_sigstate_actions (ss) [signo]; ++ if ( (action->sa_flags & SA_SIGINFO) ++ && handler != (__sighandler_t) action->sa_sigaction ++ || !(action->sa_flags & SA_SIGINFO) ++ && handler != action->sa_handler) ++ /* A signal preemptor took over, use legacy semantic. */ ++ action = &legacy_sigaction; + + if ((action->sa_flags & SA_ONSTACK) + && !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK))) +@@ -140,15 +220,9 @@ _hurd_setup_sighandler (struct hurd_sigs + = &stackframe->link.thread.next; + ss->active_resources = &stackframe->link; + +- /* Set up the arguments for the signal handler. */ +- stackframe->signo = signo; +- stackframe->sigcode = detail->code; +- stackframe->scp = stackframe->return_scp = scp = &stackframe->ctx; +- stackframe->sigreturn_addr = &__sigreturn; +- stackframe->sigreturn_returns_here = firewall; /* Crash on return. */ +- + /* Set up the sigcontext from the current state of the thread. */ + ++ scp = &stackframe->ctx; + scp->sc_onstack = ss->sigaltstack.ss_flags & SS_ONSTACK ? 1 : 0; + + /* struct sigcontext is laid out so that starting at sc_gs mimics a +@@ -162,6 +236,35 @@ _hurd_setup_sighandler (struct hurd_sigs + &state->fpu, &scp->sc_i386_float_state, + sizeof (state->fpu)); + ++ /* Set up the arguments for the signal handler. */ ++ stackframe->signo = signo; ++ if (action->sa_flags & SA_SIGINFO) ++ { ++ stackframe->posix.siginfop = &stackframe->siginfo; ++ stackframe->posix.uctxp = &stackframe->ucontext; ++ fill_siginfo (&stackframe->siginfo, signo, detail, state); ++ fill_ucontext (&stackframe->ucontext, scp); ++ } ++ else ++ { ++ if (detail->exc) ++ { ++ int nsigno; ++ _hurd_exception2signal_legacy (detail, &nsigno); ++ assert (nsigno == signo); ++ } ++ else ++ detail->code = 0; ++ ++ stackframe->legacy.sigcode = detail->code; ++ stackframe->legacy.scp = &stackframe->ctx; ++ } ++ ++ /* Set up the bottom of the stack. */ ++ stackframe->sigreturn_addr = &__sigreturn; ++ stackframe->sigreturn_returns_here = firewall; /* Crash on return. */ ++ stackframe->return_scp = &stackframe->ctx; ++ + _hurdsig_end_catch_fault (); + + if (! ok) +Index: glibc-2.31/sysdeps/mach/hurd/kill.c +=================================================================== +--- glibc-2.31.orig/sysdeps/mach/hurd/kill.c ++++ glibc-2.31/sysdeps/mach/hurd/kill.c +@@ -64,7 +64,7 @@ __kill (pid_t pid, int sig) + { + if (msgport != MACH_PORT_NULL) + /* Send a signal message to his message port. */ +- return __msg_sig_post (msgport, sig, 0, refport); ++ return __msg_sig_post (msgport, sig, SI_USER, refport); + + /* The process has no message port. Perhaps try direct + frobnication of the task. */ +Index: glibc-2.31/sysdeps/mach/hurd/setitimer.c +=================================================================== +--- glibc-2.31.orig/sysdeps/mach/hurd/setitimer.c ++++ glibc-2.31/sysdeps/mach/hurd/setitimer.c +@@ -105,7 +105,7 @@ timer_thread (void) + __msg_sig_post_request (_hurd_msgport, + _hurd_itimer_port, + MACH_MSG_TYPE_MAKE_SEND_ONCE, +- SIGALRM, 0, __mach_task_self ()); ++ SIGALRM, SI_TIMER, __mach_task_self ()); + break; + + case MACH_RCV_INTERRUPTED: +Index: glibc-2.31/sysdeps/mach/hurd/i386/sigcontextinfo.h +=================================================================== +--- glibc-2.31.orig/sysdeps/mach/hurd/i386/sigcontextinfo.h ++++ glibc-2.31/sysdeps/mach/hurd/i386/sigcontextinfo.h +@@ -18,11 +18,10 @@ + #ifndef _SIGCONTEXTINFO_H + #define _SIGCONTEXTINFO_H + +-#define SIGCONTEXT struct sigcontext + static inline uintptr_t +-sigcontext_get_pc (struct sigcontext ctx) ++sigcontext_get_pc (struct ucontext_t *ctx) + { +- return ctx.sc_eip; ++ return ctx->uc_mcontext.gregs[REG_EIP]; + } + + #endif diff --git a/gnu/packages/patches/glibc-supported-locales.patch b/gnu/packages/patches/glibc-supported-locales.patch index 05865dc7be..28577c75c0 100644 --- a/gnu/packages/patches/glibc-supported-locales.patch +++ b/gnu/packages/patches/glibc-supported-locales.patch @@ -3,20 +3,19 @@ It install the localedata/SUPPORTED file of the glibc. This file lists all the supported locales of the glibc. diff --git a/localedata/Makefile b/localedata/Makefile -index 65079f9eb8..14818f84e0 100644 --- a/localedata/Makefile +++ b/localedata/Makefile -@@ -169,7 +169,8 @@ endif - # Files to install. +@@ -176,7 +176,8 @@ + else install-others := $(addprefix $(inst_i18ndir)/, \ $(addsuffix .gz, $(charmaps)) \ - $(locales)) + $(locales)) \ + $(inst_i18ndir)/SUPPORTED + endif tests: $(objdir)/iconvdata/gconv-modules - -@@ -380,6 +381,14 @@ endif +@@ -401,6 +402,14 @@ include SUPPORTED @@ -30,4 +29,4 @@ index 65079f9eb8..14818f84e0 100644 + INSTALL-SUPPORTED-LOCALE-ARCHIVE=$(addprefix install-archive-, $(SUPPORTED-LOCALES)) INSTALL-SUPPORTED-LOCALE-FILES=$(addprefix install-files-, $(SUPPORTED-LOCALES)) -
\ No newline at end of file + diff --git a/gnu/packages/patches/gnome-shell-disable-test.patch b/gnu/packages/patches/gnome-shell-disable-test.patch new file mode 100644 index 0000000000..b4c7e73cd7 --- /dev/null +++ b/gnu/packages/patches/gnome-shell-disable-test.patch @@ -0,0 +1,25 @@ +This test seems to require a D-Bus connection not available in the build +environment. + +diff -ur /tmp/guix-build-gnome-shell-3.34.2.drv-0/gnome-shell-3.34.2/src/st/meson.build b/src/st/meson.build +--- /tmp/guix-build-gnome-shell-3.34.2.drv-0/gnome-shell-3.34.2/src/st/meson.build 1969-12-31 19:00:00.000000000 -0500 ++++ b/src/st/meson.build 2019-12-23 00:46:14.721198022 -0500 +@@ -132,18 +132,6 @@ + sources: st_enums[1] + ) + +-test_theme = executable('test-theme', +- sources: 'test-theme.c', +- c_args: st_cflags, +- dependencies: [mutter_dep, gtk_dep], +- build_rpath: mutter_typelibdir, +- link_with: libst +-) +- +-test('CSS styling support', test_theme, +- workdir: meson.current_source_dir() +-) +- + libst_gir = gnome.generate_gir(libst, + sources: st_gir_sources, + nsversion: '1.0', diff --git a/gnu/packages/patches/gnome-shell-theme.patch b/gnu/packages/patches/gnome-shell-theme.patch index fc7f7caf0f..3fa0670c43 100644 --- a/gnu/packages/patches/gnome-shell-theme.patch +++ b/gnu/packages/patches/gnome-shell-theme.patch @@ -2,25 +2,23 @@ Adjust GNOME-Shell so that it uses a Guix theme by default. Patch by Ludovic Courtès <ludo@gnu.org>. -diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml -index 76aeaa5..8eaf32e 100644 ---- a/data/gnome-shell-theme.gresource.xml -+++ b/data/gnome-shell-theme.gresource.xml -@@ -22,6 +22,8 @@ +diff -ur a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml +--- a/data/gnome-shell-theme.gresource.xml 2019-12-11 15:06:31.000000000 -0500 ++++ b/data/gnome-shell-theme.gresource.xml 2019-12-21 00:31:55.895866241 -0500 +@@ -19,6 +19,8 @@ <file>no-events.svg</file> <file>no-notifications.svg</file> <file>noise-texture.png</file> + <file>guix-background.png</file> + <file>guix-logo.png</file> <file>pad-osd.css</file> - <file>page-indicator-active.svg</file> - <file>page-indicator-inactive.svg</file> -diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss -index 54d9f39..b9badd0 100644 ---- a/data/theme/gnome-shell-sass/_common.scss -+++ b/data/theme/gnome-shell-sass/_common.scss -@@ -1742,7 +1742,16 @@ $legacy_icon_size: 24px; - + <file alias="icons/pointer-double-click-symbolic.svg">pointer-double-click-symbolic.svg</file> + <file alias="icons/pointer-drag-symbolic.svg">pointer-drag-symbolic.svg</file> +diff -ur a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss +--- a/data/theme/gnome-shell-sass/_common.scss 2019-12-11 15:06:31.000000000 -0500 ++++ b/data/theme/gnome-shell-sass/_common.scss 2019-12-21 00:33:49.495832135 -0500 +@@ -1994,7 +1994,16 @@ + } } - .login-dialog-logo-bin { padding: 24px 0px; } @@ -37,14 +35,14 @@ index 54d9f39..b9badd0 100644 .login-dialog-banner { color: darken($osd_fg_color,10%); } .login-dialog-button-box { spacing: 5px; } .login-dialog-message-warning { color: $warning_color; } -@@ -1889,9 +1898,10 @@ $legacy_icon_size: 24px; +@@ -2143,9 +2152,10 @@ } #lockDialogGroup { -- background: #2e3436 url(resource:///org/gnome/shell/theme/noise-texture.png); +- background: lighten(#2e3436, 8%) url(resource:///org/gnome/shell/theme/noise-texture.png); - background-repeat: repeat; -} -+ background: #2e3436 url(resource:///org/gnome/shell/theme/guix-background.png); ++ background: lighten(#2e3436, 8%) url(resource:///org/gnome/shell/theme/guix-background.png); + background-repeat: no-repeat; + background-size: cover; + background-position: center; } diff --git a/gnu/packages/patches/gnutls-cross.patch b/gnu/packages/patches/gnutls-cross.patch new file mode 100644 index 0000000000..82d08da24e --- /dev/null +++ b/gnu/packages/patches/gnutls-cross.patch @@ -0,0 +1,82 @@ +Not sent upstream. + +From e23de62e28f64599148ff06e439fac116a391299 Mon Sep 17 00:00:00 2001 +From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> +Date: Fri, 10 Apr 2020 07:24:48 +0200 +Subject: [PATCH] guile: Cross build fix. + +To cross-build, both the host guile and the native guile-for-build +must be available. If the native guile is not available, no snarfing +is done and the guile cross build is skipped. + +During the cross-build gnutls.scm does not load when compliling +extra.scm, becase of missing definitions from guile-gnutls-v-2. + +* guile/modules/gnutls.in (protocol/ssl-3 protocol/tls-1.0, +protocol/tls-1.1, credentials/anonymous, cipher/rijndael-256-cbc, +cipher/rijndael-128-cbc, cipher/rijndael-cbc, cipher/arcfour-128, +certificate-verify/allow-any-x509-v1-ca-certificate, +certificate-verify/allow-x509-v1-ca-certificate): Define to #f +initially. When "GNUTLS_GUILE_CROSS_COMPILING" not set, set! to value +from "guile-gnutls-v-2" load-extension C module. +--- + guile/modules/gnutls.in | 40 +++++++++++++++++++++++++++------------- + 1 file changed, 27 insertions(+), 13 deletions(-) + +diff --git a/guile/modules/gnutls.in b/guile/modules/gnutls.in +index 6461c404a..954e315de 100644 +--- a/guile/modules/gnutls.in ++++ b/guile/modules/gnutls.in +@@ -564,22 +564,36 @@ This defines 'variable' as an alias for 'alias', and emits a warning when + (identifier? #'id) + #'alias)))))))))) + +- + ;; Renaming. +-(define protocol/ssl-3 protocol/ssl3) +-(define protocol/tls-1.0 protocol/tls1-0) +-(define protocol/tls-1.1 protocol/tls1-1) ++(define protocol/ssl-3 #f) ++(define protocol/tls-1.0 #f) ++(define protocol/tls-1.1 #f) + + ;; Aliases. +-(define credentials/anonymous credentials/anon) +-(define cipher/rijndael-256-cbc cipher/aes-256-cbc) +-(define cipher/rijndael-128-cbc cipher/aes-128-cbc) +-(define cipher/rijndael-cbc cipher/aes-128-cbc) +-(define cipher/arcfour-128 cipher/arcfour) +-(define certificate-verify/allow-any-x509-v1-ca-certificate +- certificate-verify/allow-any-x509-v1-ca-crt) +-(define certificate-verify/allow-x509-v1-ca-certificate +- certificate-verify/allow-x509-v1-ca-crt) ++(define credentials/anonymous #f) ++(define cipher/rijndael-256-cbc #f) ++(define cipher/rijndael-128-cbc #f) ++(define cipher/rijndael-cbc #f) ++(define cipher/arcfour-128 #f) ++(define certificate-verify/allow-any-x509-v1-ca-certificate #f) ++(define certificate-verify/allow-x509-v1-ca-certificate #f) ++ ++(unless (getenv "GNUTLS_GUILE_CROSS_COMPILING") ++ ;; Renaming. ++ (set! protocol/ssl-3 protocol/ssl3) ++ (set! protocol/tls-1.0 protocol/tls1-0) ++ (set! protocol/tls-1.1 protocol/tls1-1) ++ ++ ;; Aliases. ++ (set! credentials/anonymous credentials/anon) ++ (set! cipher/rijndael-256-cbc cipher/aes-256-cbc) ++ (set! cipher/rijndael-128-cbc cipher/aes-128-cbc) ++ (set! cipher/rijndael-cbc cipher/aes-128-cbc) ++ (set! cipher/arcfour-128 cipher/arcfour) ++ (set! certificate-verify/allow-any-x509-v1-ca-certificate ++ certificate-verify/allow-any-x509-v1-ca-crt) ++ (set! certificate-verify/allow-x509-v1-ca-certificate ++ certificate-verify/allow-x509-v1-ca-crt)) + + ;; Deprecated OpenPGP bindings. + (define-deprecated certificate-type/openpgp) +-- +2.26.0 + diff --git a/gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch b/gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch new file mode 100644 index 0000000000..2bea74ea95 --- /dev/null +++ b/gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch @@ -0,0 +1,41 @@ +This patch is needed to build Grub on the Hurd. + +Taken from upstream: https://git.savannah.gnu.org/cgit/grub.git/commit//?id=dabdfa1c6a80639197d05f683a445fa8615517fe + +From 7606547586b2d6ca1b384e15e0358d3a3ddc48a6 Mon Sep 17 00:00:00 2001 +From: David Michael <fedora.dm0@gmail.com> +Date: Fri, 5 Jul 2019 07:45:59 -0400 +Subject: verifiers: Blocklist fallout cleanup + +Blocklist fallout cleanup after commit 5c6f9bc15 (generic/blocklist: Fix +implicit declaration of function grub_file_filter_disable_compression()). + +Signed-off-by: David Michael <fedora.dm0@gmail.com> +Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> + +--- + grub-core/osdep/generic/blocklist.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/grub-core/osdep/generic/blocklist.c b/grub-core/osdep/generic/blocklist.c +index ea2a511b6..2d9040302 100644 +--- a/grub-core/osdep/generic/blocklist.c ++++ b/grub-core/osdep/generic/blocklist.c +@@ -59,7 +59,7 @@ grub_install_get_blocklist (grub_device_t root_dev, + + grub_disk_cache_invalidate_all (); + +- file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | FILE_TYPE_NO_DECOMPRESS); ++ file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | GRUB_FILE_TYPE_NO_DECOMPRESS); + if (file) + { + if (grub_file_size (file) != core_size) +@@ -116,7 +116,7 @@ grub_install_get_blocklist (grub_device_t root_dev, + + grub_file_t file; + /* Now read the core image to determine where the sectors are. */ +- file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | FILE_TYPE_NO_DECOMPRESS); ++ file = grub_file_open (core_path_dev, GRUB_FILE_TYPE_NONE | GRUB_FILE_TYPE_NO_DECOMPRESS); + if (! file) + grub_util_error ("%s", grub_errmsg); + diff --git a/gnu/packages/patches/gsl-test-i686.patch b/gnu/packages/patches/gsl-test-i686.patch deleted file mode 100644 index 8828c08614..0000000000 --- a/gnu/packages/patches/gsl-test-i686.patch +++ /dev/null @@ -1,17 +0,0 @@ -Work around a test failure due to a rounding issue on 32-bit -platforms, as reported at: - - https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html - ---- gsl-2.2.1/linalg/test.c 2016-10-05 13:27:42.464059730 +0200 -+++ gsl-2.2.1/linalg/test.c 2016-10-05 13:27:46.988095882 +0200 -@@ -4843,9 +4843,6 @@ main(void) - gsl_test(test_cholesky_decomp_unit(), "Cholesky Decomposition [unit triangular]"); - gsl_test(test_cholesky_solve(), "Cholesky Solve"); - -- gsl_test(test_cholesky_decomp(r), "Cholesky Decomposition"); -- gsl_test(test_cholesky_invert(r), "Cholesky Inverse"); -- gsl_test(test_pcholesky_decomp(r), "Pivoted Cholesky Decomposition"); - gsl_test(test_pcholesky_solve(r), "Pivoted Cholesky Solve"); - gsl_test(test_pcholesky_invert(r), "Pivoted Cholesky Inverse"); - gsl_test(test_mcholesky_decomp(r), "Modified Cholesky Decomposition"); diff --git a/gnu/packages/patches/guile-3.0-linux-syscalls.patch b/gnu/packages/patches/guile-3.0-linux-syscalls.patch new file mode 100644 index 0000000000..0d27f77ee2 --- /dev/null +++ b/gnu/packages/patches/guile-3.0-linux-syscalls.patch @@ -0,0 +1,345 @@ +This patch adds bindings to Linux syscalls for which glibc has symbols. + +Using the FFI would have been nice, but that's not an option when using +a statically-linked Guile in an initrd that doesn't have libc.so around. + +diff --git a/libguile/posix.c b/libguile/posix.c +--- a/libguile/posix.c ++++ b/libguile/posix.c +@@ -2375,6 +2375,336 @@ scm_init_popen (void) + } + #endif /* HAVE_START_CHILD */ + ++ ++/* Linux! */ ++#ifdef __linux__ ++ ++#include <sys/mount.h> ++#include <sys/syscall.h> ++ ++#include "libguile/foreign.h" ++#include "libguile/bytevectors.h" ++#include <libguile/variable.h> ++ ++SCM_DEFINE (scm_mount, "mount", 3, 2, 0, ++ (SCM source, SCM target, SCM type, SCM flags, SCM data), ++ "Mount file system of @var{type} specified by @var{source} " ++ "on @var{target}.") ++#define FUNC_NAME s_scm_mount ++{ ++ int err; ++ char *c_source, *c_target, *c_type, *c_data; ++ unsigned long c_flags; ++ ++ c_source = scm_to_locale_string (source); ++ c_target = scm_to_locale_string (target); ++ c_type = scm_to_locale_string (type); ++ c_flags = SCM_UNBNDP (flags) ? 0 : scm_to_ulong (flags); ++ ++ if (SCM_UNBNDP (data) || scm_is_false (data)) ++ c_data = NULL; ++ else ++ c_data = scm_to_locale_string (data); ++ ++ err = mount (c_source, c_target, c_type, c_flags, c_data); ++ if (err != 0) ++ err = errno; ++ ++ free (c_source); ++ free (c_target); ++ free (c_type); ++ ++ if (c_data != NULL) ++ free (c_data); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++SCM_DEFINE (scm_umount, "umount", 1, 0, 0, ++ (SCM target), ++ "Unmount the file system on @var{target}.") ++#define FUNC_NAME s_scm_umount ++{ ++ int err; ++ char *c_target; ++ ++ c_target = scm_to_locale_string (target); ++ ++ err = umount (c_target); ++ if (err != 0) ++ err = errno; ++ ++ free (c_target); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++/* Linux's module installation syscall. See `kernel/module.c' in Linux; ++ the function itself is part of the GNU libc. ++ ++ Load the LEN bytes at MODULE as a kernel module, with arguments from ++ ARGS, a space-separated list of options. */ ++extern long init_module (void *module, unsigned long len, const char *args); ++ ++/* Load a kernel module from FD. FLAGS must be a bitwise or of ++ MODULE_INIT_* constants. The GNU libc doesn't provide a wrapper for ++ this one so we use 'syscall'. */ ++static int ++finit_module (int fd, const char *args, int flags) ++{ ++ return syscall (SYS_finit_module, fd, args, flags); ++} ++ ++ ++SCM_DEFINE (scm_load_linux_module, "load-linux-module", 1, 1, 0, ++ (SCM data, SCM options), ++ "Load the Linux kernel module whose contents are in bytevector " ++ "DATA (the contents of a @code{.ko} file), with the arguments " ++ "from the OPTIONS string.") ++#define FUNC_NAME s_scm_load_linux_module ++{ ++ long err; ++ void *c_data; ++ unsigned long c_len; ++ char *c_options; ++ ++ SCM_VALIDATE_BYTEVECTOR (SCM_ARG1, data); ++ ++ c_data = SCM_BYTEVECTOR_CONTENTS (data); ++ c_len = SCM_BYTEVECTOR_LENGTH (data); ++ c_options = ++ scm_to_locale_string (SCM_UNBNDP (options) ? scm_nullstr : options); ++ ++ err = init_module (c_data, c_len, c_options); ++ ++ free (c_options); ++ ++ if (err != 0) ++ SCM_SYSERROR; ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++SCM_DEFINE (scm_load_linux_module_fd, "load-linux-module/fd", 1, 2, 0, ++ (SCM fd, SCM options, SCM flags), ++ "Load the Linux kernel module from the file at FD, " ++ "with the arguments from the OPTIONS string, and " ++ "optionally the given FLAGS.") ++#define FUNC_NAME s_scm_load_linux_module_fd ++{ ++ long err; ++ int c_fd, c_flags; ++ char *c_options; ++ ++ c_fd = scm_to_int (fd); ++ c_options = ++ scm_to_locale_string (SCM_UNBNDP (options) ? scm_nullstr : options); ++ c_flags = SCM_UNBNDP (flags) ? 0 : scm_to_int (flags); ++ ++ err = finit_module (c_fd, c_options, c_flags); ++ ++ free (c_options); ++ ++ if (err != 0) ++ SCM_SYSERROR; ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++ ++/* Rebooting, halting, and all that. */ ++ ++#include <sys/reboot.h> ++ ++SCM_VARIABLE_INIT (flag_RB_AUTOBOOT, "RB_AUTOBOOT", ++ scm_from_int (RB_AUTOBOOT)); ++SCM_VARIABLE_INIT (flag_RB_HALT_SYSTEM, "RB_HALT_SYSTEM", ++ scm_from_int (RB_HALT_SYSTEM)); ++SCM_VARIABLE_INIT (flag_RB_ENABLE_CAD, "RB_ENABLE_CAD", ++ scm_from_int (RB_ENABLE_CAD)); ++SCM_VARIABLE_INIT (flag_RB_DISABLE_CAD, "RB_DISABLE_CAD", ++ scm_from_int (RB_DISABLE_CAD)); ++SCM_VARIABLE_INIT (flag_RB_POWER_OFF, "RB_POWER_OFF", ++ scm_from_int (RB_POWER_OFF)); ++SCM_VARIABLE_INIT (flag_RB_SW_SUSPEND, "RB_SW_SUSPEND", ++ scm_from_int (RB_SW_SUSPEND)); ++SCM_VARIABLE_INIT (flag_RB_KEXEC, "RB_KEXEC", ++ scm_from_int (RB_KEXEC)); ++ ++SCM_DEFINE (scm_reboot, "reboot", 0, 1, 0, ++ (SCM command), ++ "Reboot the system. @var{command} must be one of the @code{RB_} " ++ "constants; if omitted, @var{RB_AUTOBOOT} is used, thus " ++ "performing a hard reset.") ++#define FUNC_NAME s_scm_reboot ++{ ++ int c_command; ++ ++ if (SCM_UNBNDP (command)) ++ c_command = RB_AUTOBOOT; ++ else ++ c_command = scm_to_int (command); ++ ++ reboot (c_command); ++ ++ return SCM_UNSPECIFIED; /* likely unreached */ ++} ++#undef FUNC_NAME ++ ++/* Linux network interfaces. See <linux/if.h>. */ ++ ++#include <linux/if.h> ++#include <linux/sockios.h> ++#include "libguile/socket.h" ++ ++SCM_VARIABLE_INIT (flag_IFF_UP, "IFF_UP", ++ scm_from_int (IFF_UP)); ++SCM_VARIABLE_INIT (flag_IFF_BROADCAST, "IFF_BROADCAST", ++ scm_from_int (IFF_BROADCAST)); ++SCM_VARIABLE_INIT (flag_IFF_DEBUG, "IFF_DEBUG", ++ scm_from_int (IFF_DEBUG)); ++SCM_VARIABLE_INIT (flag_IFF_LOOPBACK, "IFF_LOOPBACK", ++ scm_from_int (IFF_LOOPBACK)); ++SCM_VARIABLE_INIT (flag_IFF_POINTOPOINT, "IFF_POINTOPOINT", ++ scm_from_int (IFF_POINTOPOINT)); ++SCM_VARIABLE_INIT (flag_IFF_NOTRAILERS, "IFF_NOTRAILERS", ++ scm_from_int (IFF_NOTRAILERS)); ++SCM_VARIABLE_INIT (flag_IFF_RUNNING, "IFF_RUNNING", ++ scm_from_int (IFF_RUNNING)); ++SCM_VARIABLE_INIT (flag_IFF_NOARP, "IFF_NOARP", ++ scm_from_int (IFF_NOARP)); ++SCM_VARIABLE_INIT (flag_IFF_PROMISC, "IFF_PROMISC", ++ scm_from_int (IFF_PROMISC)); ++SCM_VARIABLE_INIT (flag_IFF_ALLMULTI, "IFF_ALLMULTI", ++ scm_from_int (IFF_ALLMULTI)); ++ ++SCM_DEFINE (scm_set_network_interface_address, "set-network-interface-address", ++ 3, 0, 0, ++ (SCM socket, SCM name, SCM address), ++ "Configure network interface @var{name}.") ++#define FUNC_NAME s_scm_set_network_interface_address ++{ ++ char *c_name; ++ struct ifreq ifr; ++ struct sockaddr *c_address; ++ size_t sa_len; ++ int fd, err; ++ ++ socket = SCM_COERCE_OUTPORT (socket); ++ SCM_VALIDATE_OPFPORT (1, socket); ++ fd = SCM_FPORT_FDES (socket); ++ ++ memset (&ifr, 0, sizeof ifr); ++ c_name = scm_to_locale_string (name); ++ c_address = scm_to_sockaddr (address, &sa_len); ++ ++ strncpy (ifr.ifr_name, c_name, sizeof ifr.ifr_name - 1); ++ memcpy (&ifr.ifr_addr, c_address, sa_len); ++ ++ err = ioctl (fd, SIOCSIFADDR, &ifr); ++ if (err != 0) ++ err = errno; ++ ++ free (c_name); ++ free (c_address); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++SCM_DEFINE (scm_set_network_interface_flags, "set-network-interface-flags", ++ 3, 0, 0, ++ (SCM socket, SCM name, SCM flags), ++ "Change the flags of network interface @var{name} to " ++ "@var{flags}.") ++#define FUNC_NAME s_scm_set_network_interface_flags ++{ ++ struct ifreq ifr; ++ char *c_name; ++ int fd, err; ++ ++ socket = SCM_COERCE_OUTPORT (socket); ++ SCM_VALIDATE_OPFPORT (1, socket); ++ fd = SCM_FPORT_FDES (socket); ++ ++ memset (&ifr, 0, sizeof ifr); ++ c_name = scm_to_locale_string (name); ++ strncpy (ifr.ifr_name, c_name, sizeof ifr.ifr_name - 1); ++ ifr.ifr_flags = scm_to_short (flags); ++ ++ err = ioctl (fd, SIOCSIFFLAGS, &ifr); ++ if (err != 0) ++ err = errno; ++ ++ free (c_name); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return SCM_UNSPECIFIED; ++} ++#undef FUNC_NAME ++ ++SCM_DEFINE (scm_network_interface_flags, "network-interface-flags", ++ 2, 0, 0, ++ (SCM socket, SCM name), ++ "Return the flags of network interface @var{name}.") ++#define FUNC_NAME s_scm_network_interface_flags ++{ ++ struct ifreq ifr; ++ char *c_name; ++ int fd, err; ++ ++ socket = SCM_COERCE_OUTPORT (socket); ++ SCM_VALIDATE_OPFPORT (1, socket); ++ fd = SCM_FPORT_FDES (socket); ++ ++ memset (&ifr, 0, sizeof ifr); ++ c_name = scm_to_locale_string (name); ++ strncpy (ifr.ifr_name, c_name, sizeof ifr.ifr_name - 1); ++ ++ err = ioctl (fd, SIOCGIFFLAGS, &ifr); ++ if (err != 0) ++ err = errno; ++ ++ free (c_name); ++ ++ if (err != 0) ++ { ++ errno = err; ++ SCM_SYSERROR; ++ } ++ ++ return scm_from_short (ifr.ifr_flags); ++} ++#undef FUNC_NAME ++#endif ++ + void + scm_init_posix () + { diff --git a/gnu/packages/patches/guile-3.0-relocatable.patch b/gnu/packages/patches/guile-3.0-relocatable.patch new file mode 100644 index 0000000000..3d101636dc --- /dev/null +++ b/gnu/packages/patches/guile-3.0-relocatable.patch @@ -0,0 +1,69 @@ +This patch changes Guile to use a default search path relative to the +location of the `guile' binary, allowing it to be relocated. + +diff --git a/libguile/load.c b/libguile/load.c +--- a/libguile/load.c ++++ b/libguile/load.c +@@ -27,6 +27,7 @@ + #include <stat-time.h> + #include <string.h> + #include <stdio.h> ++#include <libgen.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> +@@ -334,6 +335,32 @@ scm_init_load_path () + SCM cpath = SCM_EOL; + + #ifdef SCM_LIBRARY_DIR ++ char *program, *bin_dir, *prefix, *module_dir, *ccache_dir; ++ ++ /* Determine the source and compiled module directories at run-time, ++ relative to the executable's location. ++ ++ Note: Use /proc/self/exe instead of argv[0] because the latter is ++ not necessarily an absolute, nor a valid file name. */ ++ ++ program = scm_gc_malloc_pointerless (256, "string"); ++ readlink ("/proc/self/exe", program, 256); ++ ++ bin_dir = dirname (strdupa (program)); ++ ++ prefix = scm_gc_malloc_pointerless (strlen (bin_dir) + 4, "string"); ++ strcpy (prefix, bin_dir); ++ strcat (prefix, "/.."); ++ prefix = canonicalize_file_name (prefix); ++ ++ module_dir = scm_gc_malloc_pointerless (strlen (prefix) + 50, "string"); ++ strcpy (module_dir, prefix); ++ strcat (module_dir, "/share/guile/" SCM_EFFECTIVE_VERSION); ++ ++ ccache_dir = scm_gc_malloc_pointerless (strlen (prefix) + 50, "string"); ++ strcpy (ccache_dir, prefix); ++ strcat (ccache_dir, "/lib/guile/" SCM_EFFECTIVE_VERSION "/ccache"); ++ + env = scm_i_mirror_backslashes (getenv ("GUILE_SYSTEM_PATH")); + if (env && strcmp (env, "") == 0) + /* special-case interpret system-path=="" as meaning no system path instead +@@ -342,10 +369,7 @@ scm_init_load_path () + else if (env) + path = scm_parse_path (scm_from_locale_string (env), path); + else +- path = scm_list_4 (scm_from_utf8_string (SCM_LIBRARY_DIR), +- scm_from_utf8_string (SCM_SITE_DIR), +- scm_from_utf8_string (SCM_GLOBAL_SITE_DIR), +- scm_from_utf8_string (SCM_PKGDATA_DIR)); ++ path = scm_list_1 (scm_from_locale_string (module_dir)); + + env = scm_i_mirror_backslashes (getenv ("GUILE_SYSTEM_COMPILED_PATH")); + if (env && strcmp (env, "") == 0) +@@ -355,8 +379,7 @@ scm_init_load_path () + cpath = scm_parse_path (scm_from_locale_string (env), cpath); + else + { +- cpath = scm_list_2 (scm_from_utf8_string (SCM_CCACHE_DIR), +- scm_from_utf8_string (SCM_SITE_CCACHE_DIR)); ++ cpath = scm_list_1 (scm_from_locale_string (ccache_dir)); + } + + #endif /* SCM_LIBRARY_DIR */ diff --git a/gnu/packages/patches/guile-relocatable.patch b/gnu/packages/patches/guile-relocatable.patch index 464333880c..d8726b4807 100644 --- a/gnu/packages/patches/guile-relocatable.patch +++ b/gnu/packages/patches/guile-relocatable.patch @@ -1,6 +1,17 @@ -This patch changes Guile to use a default search path relative to the -location of the `guile' binary, allowing it to be relocated. +From 501ad55982a8f92a7a95c76c75944d644870181d Mon Sep 17 00:00:00 2001 +From: Ludovic Courtès <ludo@gnu.org> +Date: Thu, 12 Mar 2020 15:16:04 +0100 +Subject: [PATCH] load: Make Guile run-time relocatable using /proc/self/exe. +Import from + + http://git.savannah.gnu.org/cgit/guix.git/commit/?id=920f2c42ce3345dc1355a41377ebf01a33fdae51 +--- + libguile/load.c | 35 +++++++++++++++++++++++++++++------ + 1 file changed, 29 insertions(+), 6 deletions(-) + +diff --git a/libguile/load.c b/libguile/load.c +index c2ee5093a..128cdf95a 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -26,6 +26,7 @@ @@ -11,7 +22,7 @@ location of the `guile' binary, allowing it to be relocated. #include "libguile/_scm.h" #include "libguile/alist.h" -@@ -326,6 +327,32 @@ scm_init_load_path () +@@ -325,6 +326,32 @@ scm_init_load_path () SCM cpath = SCM_EOL; #ifdef SCM_LIBRARY_DIR @@ -44,25 +55,28 @@ location of the `guile' binary, allowing it to be relocated. env = scm_i_mirror_backslashes (getenv ("GUILE_SYSTEM_PATH")); if (env && strcmp (env, "") == 0) /* special-case interpret system-path=="" as meaning no system path instead -@@ -334,10 +361,7 @@ scm_init_load_path () +@@ -333,10 +360,7 @@ scm_init_load_path () else if (env) path = scm_parse_path (scm_from_locale_string (env), path); else -- path = scm_list_4 (scm_from_utf8_string (SCM_LIBRARY_DIR), -- scm_from_utf8_string (SCM_SITE_DIR), -- scm_from_utf8_string (SCM_GLOBAL_SITE_DIR), -- scm_from_utf8_string (SCM_PKGDATA_DIR)); +- path = scm_list_4 (scm_from_locale_string (SCM_LIBRARY_DIR), +- scm_from_locale_string (SCM_SITE_DIR), +- scm_from_locale_string (SCM_GLOBAL_SITE_DIR), +- scm_from_locale_string (SCM_PKGDATA_DIR)); + path = scm_list_1 (scm_from_locale_string (module_dir)); env = scm_i_mirror_backslashes (getenv ("GUILE_SYSTEM_COMPILED_PATH")); if (env && strcmp (env, "") == 0) -@@ -347,8 +371,7 @@ scm_init_load_path () +@@ -346,8 +370,7 @@ scm_init_load_path () cpath = scm_parse_path (scm_from_locale_string (env), cpath); else { -- cpath = scm_list_2 (scm_from_utf8_string (SCM_CCACHE_DIR), -- scm_from_utf8_string (SCM_SITE_CCACHE_DIR)); +- cpath = scm_list_2 (scm_from_locale_string (SCM_CCACHE_DIR), +- scm_from_locale_string (SCM_SITE_CCACHE_DIR)); + cpath = scm_list_1 (scm_from_locale_string (ccache_dir)); } #endif /* SCM_LIBRARY_DIR */ +-- +2.24.0 + diff --git a/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch b/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch new file mode 100644 index 0000000000..9ea9a47677 --- /dev/null +++ b/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch @@ -0,0 +1,55 @@ +From a6e9e62a77ecc5012929613e20da23b2636450a5 Mon Sep 17 00:00:00 2001 +From: Mathieu Othacehe <mathieu.othacehe@parrot.com> +Date: Mon, 25 Mar 2019 11:00:38 +0100 +Subject: [PATCH] cross compile + +--- + build-aux/guile.am | 2 +- + configure.ac | 19 ++++++++++++------- + 2 files changed, 13 insertions(+), 8 deletions(-) + +diff --git a/build-aux/guile.am b/build-aux/guile.am +index dc1e63f..3126372 100644 +--- a/build-aux/guile.am ++++ b/build-aux/guile.am +@@ -16,4 +16,4 @@ EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES) + GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat + SUFFIXES = .scm .go + .scm.go: +- $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<" ++ $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_TARGET) $(GUILE_WARNINGS) -o "$@" "$<" +diff --git a/configure.ac b/configure.ac +index f648fcb..2d34d0a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -21,15 +21,20 @@ PKG_CHECK_MODULES([SQLITE], [sqlite3]) + SQLITE_LIBDIR="`"$PKG_CONFIG" sqlite3 --variable libdir`" + AC_SUBST([SQLITE_LIBDIR]) + +-AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable]) +-GUILE_CHECK([retval], +- [(dynamic-func \"sqlite3_open_v2\" ++if test "$cross_compiling" = "no"; then ++ AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable]) ++ GUILE_CHECK([retval], ++ [(dynamic-func \"sqlite3_open_v2\" + (dynamic-link \"$SQLITE_LIBDIR/libsqlite3\"))]) +-if test "$retval" != 0; then +- AC_MSG_RESULT([no]) +- AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3']) ++ if test "$retval" != 0; then ++ AC_MSG_RESULT([no]) ++ AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3']) ++ else ++ AC_MSG_RESULT([yes]) ++ fi + else +- AC_MSG_RESULT([yes]) ++ GUILE_TARGET="--target=$host_alias" ++ AC_SUBST([GUILE_TARGET]) + fi + + AC_CONFIG_FILES([Makefile sqlite3.scm]) +-- +2.17.1 + diff --git a/gnu/packages/patches/hurd-cross.patch b/gnu/packages/patches/hurd-cross.patch new file mode 100644 index 0000000000..cc95dddccc --- /dev/null +++ b/gnu/packages/patches/hurd-cross.patch @@ -0,0 +1,33 @@ +This fixes linking libfstest/test-fcntl (and others). + +As discussed with upstream: https://lists.gnu.org/archive/html/bug-hurd/2020-03/msg00018.html + +From 96a9f67a8685e713f25259c18306797d54cc27a5 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Sat, 14 Mar 2020 11:28:31 +0100 +Subject: [PATCH] build: Fix cross build on Guix. + +As discussed in https://lists.gnu.org/archive/html/bug-hurd/2020-03/msg00018.html. + +* Makeconf (lpath): Add -Wl,-rpath-link=<dir> next to -L<dir>. +--- + Makeconf | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makeconf b/Makeconf +index 67f7ab1c..f68ff6e3 100644 +--- a/Makeconf ++++ b/Makeconf +@@ -325,7 +325,8 @@ _libsubst=${libsubst$(patsubst %,-override,${libsubst-override})} + + # Direct the linker where to find shared objects specified in the + # dependencies of other shared objects it encounters. +-lpath := -L. $(patsubst %,-L%,$(dir $(wildcard ../lib*/lib*.so))) ++lib_dirs := $(dir $(wildcard ../lib*/lib*.so)) ++lpath := -L. $(lib_dirs:%=-L%) $(lib_dirs:%=-Wl,-rpath-link=%) + + # Main rule to link executables + # +-- +2.24.0 + diff --git a/gnu/packages/patches/hurd-fix-eth-multiplexer-dependency.patch b/gnu/packages/patches/hurd-fix-eth-multiplexer-dependency.patch deleted file mode 100644 index 5f0da3eab3..0000000000 --- a/gnu/packages/patches/hurd-fix-eth-multiplexer-dependency.patch +++ /dev/null @@ -1,26 +0,0 @@ -From ef0399bad41e60cb30d5073129abeb206076394a Mon Sep 17 00:00:00 2001 -From: Manolis Ragkousis <manolis837@gmail.com> -Date: Sat, 8 Apr 2017 16:44:52 +0300 -Subject: [PATCH] eth-multiplexer: Fix iohelp missing dependency. - -* eth-multiplexer/Makefile (HURDLIBS): Add iohelp. ---- - eth-multiplexer/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile -index 07f909e7..cefa0abd 100644 ---- a/eth-multiplexer/Makefile -+++ b/eth-multiplexer/Makefile -@@ -26,7 +26,7 @@ MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h - device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name" - OBJS = $(SRCS:.c=.o) $(MIGSTUBS) - LCLHDRS = ethernet.h util.h vdev.h netfs_impl.h --HURDLIBS = ports ihash fshelp shouldbeinlibc netfs bpf -+HURDLIBS = ports ihash iohelp fshelp shouldbeinlibc netfs bpf - LDLIBS = -lpthread - - CFLAGS += -I$(top_srcdir)/libbpf --- -2.12.2 - diff --git a/gnu/packages/patches/inetutils-hurd.patch b/gnu/packages/patches/inetutils-hurd.patch new file mode 100644 index 0000000000..bd65c4feb1 --- /dev/null +++ b/gnu/packages/patches/inetutils-hurd.patch @@ -0,0 +1,583 @@ +Support compiling on the Hurd. + +Taken from https://git.hadrons.org/cgit/debian/pkgs/inetutils.git/tree/debian/patches/0002-ifconfig-Improve-the-support-for-GNU-Hurd.patch + +From 9a90d9b9119906df23cb2db1503cb0f099942dd9 Mon Sep 17 00:00:00 2001 +From: Mats Erik Andersson <gnu@gisladisker.se> +Date: Sat, 18 Jul 2015 01:12:41 +0200 +Subject: [PATCH 02/35] ifconfig: Improve the support for GNU/Hurd. + +Use system specific code instead of generic code. +This provides abilities similar to other systems. +--- + ChangeLog | 17 +++ + ifconfig/system.c | 10 +- + ifconfig/system.h | 2 + + ifconfig/system/Makefile.am | 4 +- + ifconfig/system/generic.c | 14 +- + ifconfig/system/hurd.c | 292 ++++++++++++++++++++++++++++++++++++ + ifconfig/system/hurd.h | 50 ++++++ + 7 files changed, 381 insertions(+), 8 deletions(-) + create mode 100644 ifconfig/system/hurd.c + create mode 100644 ifconfig/system/hurd.h + +diff --git a/ifconfig/system.c b/ifconfig/system.c +index 30677e41..e108dc2e 100644 +--- a/ifconfig/system.c ++++ b/ifconfig/system.c +@@ -25,10 +25,12 @@ + # include "system/solaris.c" + #elif defined __QNX__ + # include "system/qnx.c" +-# elif defined __DragonFly__ || defined __FreeBSD__ || \ +- defined __FreeBSD_kernel__ || \ +- defined __NetBSD__ || defined __OpenBSD__ +-# include "system/bsd.c" ++#elif defined __DragonFly__ || defined __FreeBSD__ || \ ++ defined __FreeBSD_kernel__ || \ ++ defined __NetBSD__ || defined __OpenBSD__ ++# include "system/bsd.c" ++#elif defined __GNU__ ++# include "system/hurd.c" + #else + # include "system/generic.c" + #endif +diff --git a/ifconfig/system.h b/ifconfig/system.h +index 8521ad95..66878d3a 100644 +--- a/ifconfig/system.h ++++ b/ifconfig/system.h +@@ -97,6 +97,8 @@ extern struct if_nameindex* (*system_if_nameindex) (void); + defined __FreeBSD_kernel__ || \ + defined __NetBSD__ || defined __OpenBSD__ + # include "system/bsd.h" ++# elif defined __GNU__ ++# include "system/hurd.h" + # else + # include "system/generic.h" + # endif +diff --git a/ifconfig/system/Makefile.am b/ifconfig/system/Makefile.am +index 954c6774..62a9f1c4 100644 +--- a/ifconfig/system/Makefile.am ++++ b/ifconfig/system/Makefile.am +@@ -26,8 +26,10 @@ noinst_HEADERS = \ + linux.h \ + solaris.h \ + qnx.h \ ++ hurd.h \ + bsd.c \ + generic.c \ + linux.c \ + solaris.c \ +- qnx.c ++ qnx.c \ ++ hurd.c +diff --git a/ifconfig/system/generic.c b/ifconfig/system/generic.c +index 9a2bda55..20a78bde 100644 +--- a/ifconfig/system/generic.c ++++ b/ifconfig/system/generic.c +@@ -22,6 +22,8 @@ + #include <config.h> + + #include "../ifconfig.h" ++ ++#include <unused-parameter.h> + + + /* Output format stuff. */ +@@ -36,19 +38,25 @@ const char *system_help; + struct argp_child system_argp_child; + + int +-system_parse_opt (struct ifconfig **ifp, char option, char *optarg) ++system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER, ++ char option _GL_UNUSED_PARAMETER, ++ char *optarg _GL_UNUSED_PARAMETER) + { + return 0; + } + + int +-system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[]) ++system_parse_opt_rest (struct ifconfig **ifp _GL_UNUSED_PARAMETER, ++ int argc _GL_UNUSED_PARAMETER, ++ char *argv[] _GL_UNUSED_PARAMETER) + { + return 0; + } + + int +-system_configure (int sfd, struct ifreq *ifr, struct system_ifconfig *ifs) ++system_configure (int sfd _GL_UNUSED_PARAMETER, ++ struct ifreq *ifr _GL_UNUSED_PARAMETER, ++ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER) + { + return 0; + } +diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c +new file mode 100644 +index 00000000..3bd19775 +--- /dev/null ++++ b/ifconfig/system/hurd.c +@@ -0,0 +1,292 @@ ++/* hurd.c -- Code for ifconfig specific to GNU/Hurd. ++ Copyright (C) 2015 Free Software Foundation, Inc. ++ ++ This file is part of GNU Inetutils. ++ ++ GNU Inetutils is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or (at ++ your option) any later version. ++ ++ GNU Inetutils 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 ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see `http://www.gnu.org/licenses/'. */ ++ ++/* Mostly written by Marcus Brinkmann. ++ Adaptions to GNU/Hurd by Mats Erik Andersson. */ ++ ++#include <config.h> ++ ++#include <stdlib.h> ++#include <sys/ioctl.h> ++#include <net/if_arp.h> ++#include "../ifconfig.h" ++ ++#include <unused-parameter.h> ++ ++ ++/* Output format stuff. */ ++ ++const char *system_default_format = "gnu"; ++ ++ ++/* Argument parsing stuff. */ ++ ++const char *system_help = "NAME [ADDR]\ ++ [broadcast BRDADDR] [netmask MASK]\ ++ [mtu N] [up|down] [FLAGS]"; ++ ++struct argp_child system_argp_child; ++ ++int ++system_parse_opt (struct ifconfig **ifp _GL_UNUSED_PARAMETER, ++ char option _GL_UNUSED_PARAMETER, ++ char *optarg _GL_UNUSED_PARAMETER) ++{ ++ return 0; ++} ++ ++int ++system_parse_opt_rest (struct ifconfig **ifp, int argc, char *argv[]) ++{ ++ int i = 0, mask, rev; ++ enum { ++ EXPECT_NOTHING, ++ EXPECT_AF, ++ EXPECT_BROADCAST, ++ EXPECT_NETMASK, ++ EXPECT_METRIC, ++ EXPECT_MTU ++ } expect = EXPECT_AF; ++ ++ *ifp = parse_opt_new_ifs (argv[0]); ++ ++ while (++i < argc) ++ { ++ switch (expect) ++ { ++ case EXPECT_BROADCAST: ++ parse_opt_set_brdaddr (*ifp, argv[i]); ++ break; ++ ++ case EXPECT_NETMASK: ++ parse_opt_set_netmask (*ifp, argv[i]); ++ break; ++ ++ case EXPECT_MTU: ++ parse_opt_set_mtu (*ifp, argv[i]); ++ break; ++ ++ /* XXX: 2015-07-18, GNU/Hurd does not yet support ++ ioctl(SIOCSIFMETRIC), but we let the code ++ handle this standard ability anyway! ++ */ ++ case EXPECT_METRIC: ++ parse_opt_set_metric (*ifp, argv[i]); ++ break; ++ ++ case EXPECT_AF: ++ expect = EXPECT_NOTHING; ++ if (!strcmp (argv[i], "inet")) ++ continue; ++ else if (!strcmp (argv[i], "inet6")) ++ { ++ error (0, 0, "%s is not a supported address family", argv[i]); ++ return 0; ++ } ++ break; ++ ++ case EXPECT_NOTHING: ++ break; ++ } ++ ++ if (expect != EXPECT_NOTHING) ++ expect = EXPECT_NOTHING; ++ else if (!strcmp (argv[i], "broadcast")) ++ expect = EXPECT_BROADCAST; ++ else if (!strcmp (argv[i], "netmask")) ++ expect = EXPECT_NETMASK; ++ else if (!strcmp (argv[i], "metric")) ++ expect = EXPECT_METRIC; ++ else if (!strcmp (argv[i], "mtu")) ++ expect = EXPECT_MTU; ++ else if (!strcmp (argv[i], "up")) ++ parse_opt_set_flag (*ifp, IFF_UP | IFF_RUNNING, 0); ++ else if (!strcmp (argv[i], "down")) ++ parse_opt_set_flag (*ifp, IFF_UP, 1); ++ else if (((mask = if_nameztoflag (argv[i], &rev)) ++ & ~IU_IFF_CANTCHANGE) != 0) ++ parse_opt_set_flag (*ifp, mask, rev); ++ else ++ { ++ if (!((*ifp)->valid & IF_VALID_ADDR)) ++ parse_opt_set_address (*ifp, argv[i]); ++ else if (!((*ifp)->valid & IF_VALID_DSTADDR)) ++ parse_opt_set_dstaddr (*ifp, argv[i]); ++ } ++ } ++ ++ switch (expect) ++ { ++ case EXPECT_BROADCAST: ++ error (0, 0, "option `broadcast' requires an argument"); ++ break; ++ ++ case EXPECT_NETMASK: ++ error (0, 0, "option `netmask' requires an argument"); ++ break; ++ ++ case EXPECT_METRIC: ++ error (0, 0, "option `metric' requires an argument"); ++ break; ++ ++ case EXPECT_MTU: ++ error (0, 0, "option `mtu' requires an argument"); ++ break; ++ ++ case EXPECT_AF: ++ case EXPECT_NOTHING: ++ return 1; ++ } ++ ++ return 0; ++} ++ ++int ++system_configure (int sfd _GL_UNUSED_PARAMETER, ++ struct ifreq *ifr _GL_UNUSED_PARAMETER, ++ struct system_ifconfig *ifs _GL_UNUSED_PARAMETER) ++{ ++ return 0; ++} ++ ++struct if_nameindex* (*system_if_nameindex) (void) = if_nameindex; ++ ++static void ++print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER, ++ unsigned char *data) ++{ ++ *column += printf ("%02X:%02X:%02X:%02X:%02X:%02X", ++ data[0], data[1], data[2], data[3], data[4], data[5]); ++ had_output = 1; ++} ++ ++struct arphrd_symbol ++{ ++ const char *name; ++ const char *title; ++ int value; ++ void (*print_hwaddr) (format_data_t form, unsigned char *data); ++} arphrd_symbols[] = ++ { ++#ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */ ++ { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether}, ++#endif ++#ifdef ARPHRD_LOOPBACK /* Loopback device. */ ++ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL}, ++#endif ++ /* XXX: The image debian-hurd-20150424 returns the value 4 ++ instead of expected ARPHRD_LOOPBACK. This has been ++ discussed in the list debian-hurd, where I was asked ++ to resist the temptation of a work around! ++ */ ++ { NULL, NULL, 0, NULL} ++ }; ++ ++struct arphrd_symbol * ++arphrd_findvalue (int value) ++{ ++ struct arphrd_symbol *arp = arphrd_symbols; ++ while (arp->name != NULL) ++ { ++ if (arp->value == value) ++ break; ++ arp++; ++ } ++ if (arp->name) ++ return arp; ++ else ++ return NULL; ++} ++ ++void ++system_fh_hwaddr_query (format_data_t form, int argc, char *argv[]) ++{ ++#ifdef SIOCGIFHWADDR ++ struct arphrd_symbol *arp; ++ ++ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0) ++ select_arg (form, argc, argv, 1); ++ ++ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family); ++ select_arg (form, argc, argv, (arp && arp->print_hwaddr) ? 0 : 1); ++#else ++ select_arg (form, argc, argv, 1); ++#endif ++} ++ ++void ++system_fh_hwaddr (format_data_t form, int argc _GL_UNUSED_PARAMETER, ++ char *argv[] _GL_UNUSED_PARAMETER) ++{ ++#ifdef SIOCGIFHWADDR ++ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0) ++ error (EXIT_FAILURE, errno, ++ "SIOCGIFHWADDR failed for interface `%s'", ++ form->ifr->ifr_name); ++ else ++ { ++ struct arphrd_symbol *arp; ++ ++ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family); ++ if (arp && arp->print_hwaddr) ++ arp->print_hwaddr (form, ++ (unsigned char *) form->ifr->ifr_hwaddr.sa_data); ++ else ++ put_string (form, "(hwaddr unknown)"); ++ } ++#else ++ *column += printf ("(not available)"); ++ had_output = 1; ++#endif ++} ++ ++void ++system_fh_hwtype_query (format_data_t form, int argc, char *argv[]) ++{ ++#ifdef SIOCGIFHWADDR ++ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) >= 0) ++ select_arg (form, argc, argv, 0); ++ else ++#endif ++ select_arg (form, argc, argv, 1); ++} ++ ++void ++system_fh_hwtype (format_data_t form, int argc _GL_UNUSED_PARAMETER, ++ char *argv[] _GL_UNUSED_PARAMETER) ++{ ++#ifdef SIOCGIFHWADDR ++ if (ioctl (form->sfd, SIOCGIFHWADDR, form->ifr) < 0) ++ error (EXIT_FAILURE, errno, ++ "SIOCGIFHWADDR failed for interface `%s'", ++ form->ifr->ifr_name); ++ else ++ { ++ struct arphrd_symbol *arp; ++ ++ arp = arphrd_findvalue (form->ifr->ifr_hwaddr.sa_family); ++ if (arp) ++ put_string (form, arp->title); ++ else ++ put_string (form, "(hwtype unknown)"); ++ } ++#else ++ *column += printf ("(not available)"); ++ had_output = 1; ++#endif ++} +diff --git a/ifconfig/system/hurd.h b/ifconfig/system/hurd.h +new file mode 100644 +index 00000000..bab14565 +--- /dev/null ++++ b/ifconfig/system/hurd.h +@@ -0,0 +1,50 @@ ++/* ++ Copyright (C) 2015 Free Software Foundation, Inc. ++ ++ This file is part of GNU Inetutils. ++ ++ GNU Inetutils is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or (at ++ your option) any later version. ++ ++ GNU Inetutils 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 ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see `http://www.gnu.org/licenses/'. */ ++ ++/* Written by Mats Erik Andersson. */ ++ ++#ifndef IFCONFIG_SYSTEM_HURD_H ++# define IFCONFIG_SYSTEM_HURD_H ++ ++# include "../printif.h" ++# include "../options.h" ++ ++ ++/* Option support. */ ++ ++struct system_ifconfig ++{ ++ int valid; ++}; ++ ++ ++/* Output format support. */ ++ ++# define SYSTEM_FORMAT_HANDLER \ ++ { "hurd", fh_nothing}, \ ++ { "hwaddr?", system_fh_hwaddr_query}, \ ++ { "hwaddr", system_fh_hwaddr}, \ ++ { "hwtype?", system_fh_hwtype_query}, \ ++ { "hwtype", system_fh_hwtype}, ++ ++void system_fh_hwaddr_query (format_data_t form, int argc, char *argv[]); ++void system_fh_hwaddr (format_data_t form, int argc, char *argv[]); ++void system_fh_hwtype_query (format_data_t form, int argc, char *argv[]); ++void system_fh_hwtype (format_data_t form, int argc, char *argv[]); ++ ++#endif /* !IFCONFIG_SYSTEM_HURD_H */ +-- +2.23.0.rc1.170.gbd704faa3e + +From 589dab9c7d3119da82837dabae34c8a3d16cbe49 Mon Sep 17 00:00:00 2001 +From: Mats Erik Andersson <gnu@gisladisker.se> +Date: Thu, 30 Jul 2015 01:06:42 +0200 +Subject: [PATCH 07/35] ifconfig: Hardware detection in GNU/Hurd. + +A work-around needed to distinguish hardware type. +--- + ChangeLog | 10 ++++++++++ + ifconfig/system/hurd.c | 19 ++++++++++++------- + 2 files changed, 22 insertions(+), 7 deletions(-) + +diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c +index 3bd19775..b6261a00 100644 +--- a/ifconfig/system/hurd.c ++++ b/ifconfig/system/hurd.c +@@ -175,6 +175,16 @@ print_hwaddr_ether (format_data_t form _GL_UNUSED_PARAMETER, + had_output = 1; + } + ++/* GNU/Hurd and Mach are using a mixture of BSD definitions ++ * and GNU/Linux interface headers, which in this situation ++ * means that sa_family_t is an unsigned char, from BSD, while ++ * all ARPHRD_* come from GNU/Linux and are thus 16 bits wide. ++ * We must account for this. The following bitmask will ++ * adapt to any future change! ++ */ ++ ++#define _ARP_MASK ((sizeof (sa_family_t) == 1) ? 0xff : 0xffff) ++ + struct arphrd_symbol + { + const char *name; +@@ -184,16 +194,11 @@ struct arphrd_symbol + } arphrd_symbols[] = + { + #ifdef ARPHRD_ETHER /* Ethernet 10/100Mbps. */ +- { "ETHER", "Ethernet", ARPHRD_ETHER, print_hwaddr_ether}, ++ { "ETHER", "Ethernet", ARPHRD_ETHER & _ARP_MASK, print_hwaddr_ether}, + #endif + #ifdef ARPHRD_LOOPBACK /* Loopback device. */ +- { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK, NULL}, ++ { "LOOPBACK", "Local Loopback", ARPHRD_LOOPBACK & _ARP_MASK, NULL}, + #endif +- /* XXX: The image debian-hurd-20150424 returns the value 4 +- instead of expected ARPHRD_LOOPBACK. This has been +- discussed in the list debian-hurd, where I was asked +- to resist the temptation of a work around! +- */ + { NULL, NULL, 0, NULL} + }; + +-- +2.23.0.rc1.170.gbd704faa3e + +From d379784b4461d17b2536effd1b52bae21cd28a32 Mon Sep 17 00:00:00 2001 +From: Guillem Jover <guillem@hadrons.org> +Date: Fri, 16 Aug 2019 00:34:03 +0200 +Subject: [PATCH 35/35] telnet: Several ioctls have been disabled in the Hurd's + glibc + +But not the related option macros. inetutils uses those macros to decide +whether the ioctls are available, so it is FTBFS now. The Hurd's glibc +is being fixed, but we'll use this for now to get the builds going. +--- + telnet/sys_bsd.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c +index 662536ab..5eb35cb5 100644 +--- a/telnet/sys_bsd.c ++++ b/telnet/sys_bsd.c +@@ -63,6 +63,7 @@ + #include <errno.h> + #include <arpa/telnet.h> + #include <sys/select.h> ++#include <sys/ioctl.h> + #include <unused-parameter.h> + + #include "ring.h" +@@ -157,7 +158,7 @@ TerminalRead (char *buf, int n) + int + TerminalAutoFlush (void) + { +-#if defined LNOFLSH ++#if defined TIOCLGET && defined LNOFLSH + int flush; + + ioctl (0, TIOCLGET, (char *) &flush); +@@ -260,7 +261,9 @@ TerminalSaveState (void) + ioctl (0, TIOCGETP, (char *) &ottyb); + ioctl (0, TIOCGETC, (char *) &otc); + ioctl (0, TIOCGLTC, (char *) &oltc); ++#ifdef TIOCLGET + ioctl (0, TIOCLGET, (char *) &olmode); ++#endif + + ntc = otc; + nltc = oltc; +@@ -755,7 +758,9 @@ TerminalNewMode (register int f) + #endif + } + #ifndef USE_TERMIO ++#ifdef TIOCLSET + ioctl (tin, TIOCLSET, (char *) &lmode); ++#endif + ioctl (tin, TIOCSLTC, (char *) <c); + ioctl (tin, TIOCSETC, (char *) &tc); + ioctl (tin, TIOCSETN, (char *) &sb); +-- +2.23.0.rc1.170.gbd704faa3e + diff --git a/gnu/packages/patches/jbig2dec-ignore-testtest.patch b/gnu/packages/patches/jbig2dec-ignore-testtest.patch deleted file mode 100644 index 7c80c545e9..0000000000 --- a/gnu/packages/patches/jbig2dec-ignore-testtest.patch +++ /dev/null @@ -1,16 +0,0 @@ -Do not run the test 'test_jbig2dec.py'. It doesn't seem to do anything -and reports failure. TODO: Actually fix the test instead of ignoring it. - -diff --git a/Makefile.in b/Makefile.in -index 63982d4..8af1d61 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -93,7 +93,7 @@ host_triplet = @host@ - bin_PROGRAMS = jbig2dec$(EXEEXT) - noinst_PROGRAMS = test_sha1$(EXEEXT) test_huffman$(EXEEXT) \ - test_arith$(EXEEXT) --TESTS = test_sha1$(EXEEXT) test_jbig2dec.py test_huffman$(EXEEXT) \ -+TESTS = test_sha1$(EXEEXT) test_huffman$(EXEEXT) \ - test_arith$(EXEEXT) - subdir = . - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 diff --git a/gnu/packages/patches/less-hurd-path-max.patch b/gnu/packages/patches/less-hurd-path-max.patch new file mode 100644 index 0000000000..4d23a08788 --- /dev/null +++ b/gnu/packages/patches/less-hurd-path-max.patch @@ -0,0 +1,36 @@ +Avoid usage of PATH_MAX. + +Submitted to bug-less@gnu.org. + +From ef652341ed8b2c14ac40312ccd4ed329cb69fd0c Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Sat, 7 Mar 2020 14:57:19 +0100 +Subject: [PATCH] Avoid usage of PATH_MAX. + +* filename.c (lrealpath): Have realpath allocate the buffer. Fixes +compilation on the Hurd and avoids possible buffer overflow on other +systems. +--- + filename.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/filename.c b/filename.c +index e420837..faa71b0 100644 +--- a/filename.c ++++ b/filename.c +@@ -795,9 +795,9 @@ lrealpath(path) + char *path; + { + #if HAVE_REALPATH +- char rpath[PATH_MAX]; +- if (realpath(path, rpath) != NULL) +- return (save(rpath)); ++ char *rpath = NULL; ++ if ((rpath = realpath(path, rpath)) != NULL) ++ return (rpath); + #endif + return (save(path)); + } +-- +2.24.0 + diff --git a/gnu/packages/patches/libffi-3.2.1-complex-alpha.patch b/gnu/packages/patches/libffi-3.2.1-complex-alpha.patch deleted file mode 100644 index ebbc0635a5..0000000000 --- a/gnu/packages/patches/libffi-3.2.1-complex-alpha.patch +++ /dev/null @@ -1,28 +0,0 @@ -The patch fixes build failure of form: - ../src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h" -Upstream fixed the bug in a more invasive way -but didn't have releases since 3.2.1. - -The patch is taken from Gentoo: -https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/libffi/files/libffi-3.2.1-complex_alpha.patch - ---- libffi-3.2.1/src/alpha/osf.S 2015-01-16 10:46:15.000000000 +0100 -+++ libffi-3.2.1/src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100 -@@ -279,6 +279,7 @@ - .gprel32 $load_64 # FFI_TYPE_SINT64 - .gprel32 $load_none # FFI_TYPE_STRUCT - .gprel32 $load_64 # FFI_TYPE_POINTER -+ .gprel32 $load_none # FFI_TYPE_COMPLEX - - /* Assert that the table above is in sync with ffi.h. */ - -@@ -294,7 +295,8 @@ - || FFI_TYPE_SINT64 != 12 \ - || FFI_TYPE_STRUCT != 13 \ - || FFI_TYPE_POINTER != 14 \ -- || FFI_TYPE_LAST != 14 -+ || FFI_TYPE_COMPLEX != 15 \ -+ || FFI_TYPE_LAST != 15 - #error "osf.S out of sync with ffi.h" - #endif - diff --git a/gnu/packages/patches/libgpg-error-gawk-compat.patch b/gnu/packages/patches/libgpg-error-gawk-compat.patch deleted file mode 100644 index 85477b0be6..0000000000 --- a/gnu/packages/patches/libgpg-error-gawk-compat.patch +++ /dev/null @@ -1,155 +0,0 @@ -From 7865041c77f4f7005282f10f9b6666b19072fbdf Mon Sep 17 00:00:00 2001 -From: NIIBE Yutaka <gniibe@fsij.org> -Date: Mon, 15 Apr 2019 15:10:44 +0900 -Subject: [PATCH] awk: Prepare for Gawk 5.0. - -* src/Makefile.am: Use pkg_namespace (instead of namespace). -* src/mkerrnos.awk: Likewise. -* lang/cl/mkerrcodes.awk: Don't escape # in regexp. -* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto. - --- - -In Gawk 5.0, regexp routines are replaced by Gnulib implementation, -which only allows escaping specific characters. - -GnuPG-bug-id: 4459 -Reported-by: Marius Schamschula -Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> ---- - lang/cl/mkerrcodes.awk | 2 +- - src/Makefile.am | 2 +- - src/mkerrcodes.awk | 2 +- - src/mkerrcodes1.awk | 2 +- - src/mkerrcodes2.awk | 2 +- - src/mkerrnos.awk | 2 +- - src/mkstrtable.awk | 10 +++++----- - 7 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk -index ae29043..9a1fc18 100644 ---- a/lang/cl/mkerrcodes.awk -+++ b/lang/cl/mkerrcodes.awk -@@ -122,7 +122,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/Makefile.am b/src/Makefile.am -index ce1b882..f2590cb 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -293,7 +293,7 @@ code-from-errno.h: mkerrcodes$(EXEEXT_FOR_BUILD) Makefile - - errnos-sym.h: Makefile mkstrtable.awk errnos.in - $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \ -- -v prefix=GPG_ERR_ -v namespace=errnos_ \ -+ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \ - $(srcdir)/errnos.in >$@ - - -diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk -index 46d436c..e9c857c 100644 ---- a/src/mkerrcodes.awk -+++ b/src/mkerrcodes.awk -@@ -85,7 +85,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk -index a771a73..4578e29 100644 ---- a/src/mkerrcodes1.awk -+++ b/src/mkerrcodes1.awk -@@ -81,7 +81,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk -index ea58503..188f7a4 100644 ---- a/src/mkerrcodes2.awk -+++ b/src/mkerrcodes2.awk -@@ -91,7 +91,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk -index f79df66..15b1aad 100644 ---- a/src/mkerrnos.awk -+++ b/src/mkerrnos.awk -@@ -83,7 +83,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk -index c9de9c1..285e45f 100644 ---- a/src/mkstrtable.awk -+++ b/src/mkstrtable.awk -@@ -77,7 +77,7 @@ - # - # The variable prefix can be used to prepend a string to each message. - # --# The variable namespace can be used to prepend a string to each -+# The variable pkg_namespace can be used to prepend a string to each - # variable and macro name. - - BEGIN { -@@ -102,7 +102,7 @@ header { - print "/* The purpose of this complex string table is to produce"; - print " optimal code with a minimum of relocations. */"; - print ""; -- print "static const char " namespace "msgstr[] = "; -+ print "static const char " pkg_namespace "msgstr[] = "; - header = 0; - } - else -@@ -110,7 +110,7 @@ header { - } - - !header { -- sub (/\#.+/, ""); -+ sub (/#.+/, ""); - sub (/[ ]+$/, ""); # Strip trailing space and tab characters. - - if (/^$/) -@@ -150,7 +150,7 @@ END { - else - print " gettext_noop (\"" last_msgstr "\");"; - print ""; -- print "static const int " namespace "msgidx[] ="; -+ print "static const int " pkg_namespace "msgidx[] ="; - print " {"; - for (i = 0; i < coded_msgs; i++) - print " " pos[i] ","; -@@ -158,7 +158,7 @@ END { - print " };"; - print ""; - print "static GPG_ERR_INLINE int"; -- print namespace "msgidxof (int code)"; -+ print pkg_namespace "msgidxof (int code)"; - print "{"; - print " return (0 ? 0"; - diff --git a/gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch b/gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch deleted file mode 100644 index 35f2bf5963..0000000000 --- a/gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix integer overflow which can potentially lead to RCE. - -https://www.openwall.com/lists/oss-security/2019/11/11/1 -https://nvd.nist.gov/vuln/detail/CVE-2019-2201 - -The problem was partially fixed in 2.0.3. This patch is a follow-up. -https://github.com/libjpeg-turbo/libjpeg-turbo/issues/388 -https://github.com/libjpeg-turbo/libjpeg-turbo/commit/c30b1e72dac76343ef9029833d1561de07d29bad - -diff --git a/tjbench.c b/tjbench.c -index a7d397318..13a5bde62 100644 ---- a/tjbench.c -+++ b/tjbench.c -@@ -171,7 +171,7 @@ static int decomp(unsigned char *srcBuf, unsigned char **jpegBuf, - } - /* Set the destination buffer to gray so we know whether the decompressor - attempted to write to it */ -- memset(dstBuf, 127, pitch * scaledh); -+ memset(dstBuf, 127, (size_t)pitch * scaledh); - - if (doYUV) { - int width = doTile ? tilew : scaledw; -@@ -193,7 +193,7 @@ static int decomp(unsigned char *srcBuf, unsigned char **jpegBuf, - double start = getTime(); - - for (row = 0, dstPtr = dstBuf; row < ntilesh; -- row++, dstPtr += pitch * tileh) { -+ row++, dstPtr += (size_t)pitch * tileh) { - for (col = 0, dstPtr2 = dstPtr; col < ntilesw; - col++, tile++, dstPtr2 += ps * tilew) { - int width = doTile ? min(tilew, w - col * tilew) : scaledw; diff --git a/gnu/packages/patches/libreoffice-poppler-compat.patch b/gnu/packages/patches/libreoffice-poppler-compat.patch new file mode 100644 index 0000000000..8dc0b60a12 --- /dev/null +++ b/gnu/packages/patches/libreoffice-poppler-compat.patch @@ -0,0 +1,19 @@ +Fix type mismatch with Poppler 0.86. + +Taken from Arch Linux: +https://git.archlinux.org/svntogit/packages.git/tree/trunk/libreoffice-poppler-0.86.patch?h=packages/libreoffice-fresh + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -563,7 +563,9 @@ void PDFOutDev::processLink(Link* link, Catalog*) + if (!(pAction && pAction->getKind() == actionURI)) + return; + +-#if POPPLER_CHECK_VERSION(0, 72, 0) ++#if POPPLER_CHECK_VERSION(0, 86, 0) ++ const char* pURI = static_cast<LinkURI*>(pAction)->getURI().c_str(); ++#elif POPPLER_CHECK_VERSION(0, 72, 0) + const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->c_str(); + #else + const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString(); diff --git a/gnu/packages/patches/libtirpc-hurd-client.patch b/gnu/packages/patches/libtirpc-hurd-client.patch new file mode 100644 index 0000000000..526ad262d2 --- /dev/null +++ b/gnu/packages/patches/libtirpc-hurd-client.patch @@ -0,0 +1,50 @@ +Taken from https://salsa.debian.org/debian/libtirpc/-/raw/master/debian/patches/06-hurd-client-port.diff + +Description: Fix client code for hurd, avoiding malloc overflow + When trying to setup a inet connection, it happens the following: + - in libtirp, src/clnt_vc.c, clnt_vc_create gets called + - when trying to allocate vc_fd_locks, __rpc_dtbsize() is used as size + for that array of fd locks + - __rpc_dtbsize(), in src/rpc_generic.c, queries using rlimit the + maximum (rlim_max) number of file descriptors (RLIMIT_NOFILE): + - on Linux, the default is { rlim_cur = 1024, rlim_max = 4096 } + - on kFreeBSD, the default is { rlim_cur = 1024, rlim_max = 1024 } + - on Hurd, the default is { rlim_cur = 1024, rlim_max = RLIM_INFINITY } + meaning that on Hurd the memory allocation fails (as + __rpc_dtbsize() * sizeof(int) overflows and is negative) + + Change libtiprc so __rpc_dtbsize falls back on rlim_cur if rlim_max + is unlimited. + + This patch fixes the client connection using inet sockets; local unix + sockets are not working, for two reasons so far: + - getpeername on them gives EOPNOTSUPP + - SO_REUSEADDR is not implemented for them +Author: Pino Toscano <pino@debian.org> + +Bug-Debian: http://bugs.debian.org/739674 +Forwarded: no +Reviewed-By: Petter Reinholdtsen +Last-Update: 2014-03-03 + +--- a/src/rpc_generic.c ++++ b/src/rpc_generic.c +@@ -107,12 +107,17 @@ + { + static int tbsize; + struct rlimit rl; ++ rlim_t lim; + + if (tbsize) { + return (tbsize); + } + if (getrlimit(RLIMIT_NOFILE, &rl) == 0) { +- return (tbsize = (int)rl.rlim_max); ++ lim = rl.rlim_max; ++ if (lim == RLIM_INFINITY) { ++ lim = rl.rlim_cur; ++ } ++ return (tbsize = (int)lim); + } + /* + * Something wrong. I'll try to save face by returning a diff --git a/gnu/packages/patches/libtirpc-hurd.patch b/gnu/packages/patches/libtirpc-hurd.patch new file mode 100644 index 0000000000..cd625d696f --- /dev/null +++ b/gnu/packages/patches/libtirpc-hurd.patch @@ -0,0 +1,172 @@ +This is a combination of two patches: + +1) Taken from https://salsa.debian.org/debian/libtirpc/-/raw/master/debian/patches/03-kfreebsd.diff + +Description: Fix build on non Linux architectures +Author: Andreas Beckmann <anbe@debian.org> +Last-Update: 2019-09-01 + +2) Taken from https://salsa.debian.org/debian/libtirpc/-/raw/master/debian/patches/05-hurd-port.diff + +Description: Get source building on Hurd + - Look for <sys/user.h> before using it. + - Define MAXHOSTNAMELEN to 64 if missing. + - Bind sockets on Hurd like on Linux. +Author: Petter Reinholdtsen <pere@hungry.com> + +--- a/src/svc_dg.c ++++ b/src/svc_dg.c +@@ -648,6 +648,7 @@ + void + svc_dg_enable_pktinfo(int fd, const struct __rpc_sockinfo *si) + { ++#ifdef __linux__ + int val = 1; + + switch (si->si_af) { +@@ -660,6 +661,7 @@ + break; + #endif + } ++#endif + } + + /* +@@ -670,6 +672,7 @@ + int + svc_dg_valid_pktinfo(struct msghdr *msg) + { ++#ifdef __linux__ + struct cmsghdr *cmsg; + + if (!msg->msg_name) +@@ -716,4 +719,7 @@ + } + + return 1; ++#else ++ return 0; ++#endif + } +--- a/src/clnt_vc.c ++++ b/src/clnt_vc.c +@@ -71,10 +71,12 @@ + #define MCALL_MSG_SIZE 24 + + #define CMGROUP_MAX 16 +-#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ + + #undef rpc_createerr /* make it clear it is a thread safe variable */ + ++#ifndef SCM_CREDS ++#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ ++ + /* + * Credentials structure, used to verify the identity of a peer + * process that has sent us a message. This is allocated by the +@@ -90,6 +92,7 @@ + short cmcred_ngroups; /* number or groups */ + gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ + }; ++#endif + + struct cmessage { + struct cmsghdr cmsg; +--- a/src/getpeereid.c ++++ b/src/getpeereid.c +@@ -25,9 +25,14 @@ + */ + + ++#include "config.h" ++ + #include <sys/param.h> + #include <sys/socket.h> + #include <sys/un.h> ++#ifdef HAVE_SYS_USER_H ++# include <sys/user.h> ++#endif /* HAVE_SYS_USER_H */ + + #include <errno.h> + #include <unistd.h> +--- a/src/getpeereid.c ++++ b/src/getpeereid.c +@@ -35,12 +36,25 @@ + int + getpeereid(int s, uid_t *euid, gid_t *egid) + { ++#ifndef HAVE_SYS_USER_H ++ return(-1); ++#else ++#ifdef XUCRED_VERSION ++ struct xucred uc; ++#define uid cr_uid ++#define gid cr_gid ++#else + struct ucred uc; ++#endif + socklen_t uclen; + int error; + + uclen = sizeof(uc); ++#ifdef XUCRED_VERSION ++ error = getsockopt(s, 0, LOCAL_PEERCRED, &uc, &uclen); ++#else + error = getsockopt(s, SOL_SOCKET, SO_PEERCRED, &uc, &uclen); /* SCM_CREDENTIALS */ ++#endif + if (error != 0) + return (error); + // if (uc.cr_version != XUCRED_VERSION) +@@ -59,4 +66,5 @@ + *euid = uc.uid; + *egid = uc.gid; + return (0); ++#endif /* HAVE_SYS_USER_H */ + } +--- a/tirpc/reentrant.h ++++ b/tirpc/reentrant.h +@@ -36,7 +36,7 @@ + * These definitions are only guaranteed to be valid on Linux. + */ + +-#if defined(__linux__) ++#if defined(__linux__) || defined(__GLIBC__) + + #include <pthread.h> + +--- a/configure.ac ++++ b/configure.ac +@@ -93,7 +93,7 @@ + AC_PROG_LIBTOOL + AC_HEADER_DIRENT + AC_PREFIX_DEFAULT(/usr) +-AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h]) ++AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h features.h gssapi/gssapi_ext.h sys/user.h]) + AC_CHECK_LIB([pthread], [pthread_create]) + AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent]) + +--- a/src/auth_unix.c ++++ b/src/auth_unix.c +@@ -56,6 +56,11 @@ + #include <rpc/auth.h> + #include <rpc/auth_unix.h> + ++/* Workaround for Hurd */ ++#ifndef MAXHOSTNAMELEN ++# define MAXHOSTNAMELEN 64 ++#endif ++ + /* auth_unix.c */ + static void authunix_nextverf (AUTH *); + static bool_t authunix_marshal (AUTH *, XDR *); +--- a/src/bindresvport.c ++++ b/src/bindresvport.c +@@ -64,7 +64,7 @@ + return bindresvport_sa(sd, (struct sockaddr *)sin); + } + +-#ifdef __linux__ ++#if defined(__linux__) || defined(__GNU__) + + #define STARTPORT 600 + #define LOWPORT 512 diff --git a/gnu/packages/patches/libxslt-generated-ids.patch b/gnu/packages/patches/libxslt-generated-ids.patch index 4273875c7c..1cd2363d6a 100644 --- a/gnu/packages/patches/libxslt-generated-ids.patch +++ b/gnu/packages/patches/libxslt-generated-ids.patch @@ -162,10 +162,10 @@ diff --git a/libxslt/xsltInternals.h b/libxslt/xsltInternals.h index 95e8fe6..8eedae4 100644 --- a/libxslt/xsltInternals.h +++ b/libxslt/xsltInternals.h -@@ -1786,6 +1786,8 @@ struct _xsltTransformContext { - int funcLevel; /* Needed to catch recursive functions issues */ - int maxTemplateDepth; +@@ -1782,6 +1782,8 @@ struct _xsltTransformContext { int maxTemplateVars; + unsigned long opLimit; + unsigned long opCount; + + unsigned long nextid;/* for generating stable ids */ }; diff --git a/gnu/packages/patches/linphoneqt-tabbutton.patch b/gnu/packages/patches/linphoneqt-tabbutton.patch new file mode 100644 index 0000000000..6b3214026e --- /dev/null +++ b/gnu/packages/patches/linphoneqt-tabbutton.patch @@ -0,0 +1,96 @@ +From ecaab0f73d0b74bbfbf150286305fa6e12970037 Mon Sep 17 00:00:00 2001 +From: Ronan Abhamon <ronan.abhamon@belledonne-communications.com> +Date: Fri, 19 Jan 2018 14:42:01 +0100 +Subject: [PATCH] fix(SettingsWindow): rename icon property of TabButton to + iconName (issue with Qt 5.10 and new icon property) + +--- + ui/modules/Common/Form/Tab/TabButton.qml | 8 ++++---- + ui/views/App/Settings/SettingsWindow.qml | 14 +++++++------- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/ui/modules/Common/Form/Tab/TabButton.qml b/ui/modules/Common/Form/Tab/TabButton.qml +index ad220ab2..a47bb20b 100644 +--- a/ui/modules/Common/Form/Tab/TabButton.qml ++++ b/ui/modules/Common/Form/Tab/TabButton.qml +@@ -12,8 +12,8 @@ Controls.TabButton { + + // --------------------------------------------------------------------------- + +- property string icon + property int iconSize: TabButtonStyle.icon.size ++ property string iconName + + readonly property bool _isSelected: parent.parent.currentItem === button + +@@ -66,9 +66,9 @@ Controls.TabButton { + Layout.leftMargin: TabButtonStyle.text.leftPadding + + icon: { +- var icon = button.icon +- return icon.length +- ? (icon + '_' + (button._isSelected ? 'selected' : 'normal')) ++ var iconName = button.iconName ++ return iconName.length ++ ? (iconName + '_' + (button._isSelected ? 'selected' : 'normal')) + : '' + } + iconSize: button.iconSize +diff --git a/ui/views/App/Settings/SettingsWindow.qml b/ui/views/App/Settings/SettingsWindow.qml +index b8f5a80f..58909544 100644 +--- a/ui/views/App/Settings/SettingsWindow.qml ++++ b/ui/views/App/Settings/SettingsWindow.qml +@@ -48,43 +48,43 @@ ApplicationWindow { + id: tabBar + + TabButton { +- icon: 'settings_sip_accounts' ++ iconName: 'settings_sip_accounts' + text: qsTr('sipAccountsTab') + width: implicitWidth + } + + TabButton { +- icon: 'settings_audio' ++ iconName: 'settings_audio' + text: qsTr('audioTab') + width: implicitWidth + } + + TabButton { +- icon: 'settings_video' ++ iconName: 'settings_video' + text: qsTr('videoTab') + width: implicitWidth + } + + TabButton { +- icon: 'settings_call' ++ iconName: 'settings_call' + text: qsTr('callsAndChatTab') + width: implicitWidth + } + + TabButton { +- icon: 'settings_network' ++ iconName: 'settings_network' + text: qsTr('networkTab') + width: implicitWidth + } + + TabButton { +- icon: 'settings_advanced' ++ iconName: 'settings_advanced' + text: qsTr('uiTab') + width: implicitWidth + } + + TabButton { +- icon: 'settings_advanced' ++ iconName: 'settings_advanced' + text: qsTr('uiAdvanced') + width: implicitWidth + } +-- +2.21.0 + diff --git a/gnu/packages/patches/make-glibc-compat.patch b/gnu/packages/patches/make-glibc-compat.patch deleted file mode 100644 index 9ce7f2b5bf..0000000000 --- a/gnu/packages/patches/make-glibc-compat.patch +++ /dev/null @@ -1,52 +0,0 @@ -Work with the new glob interface in glibc 2.27. - -Taken from this upstream commit: -https://git.savannah.gnu.org/cgit/make.git/commit/?id=193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4 - -diff --git a/dir.c b/dir.c -index adbb8a9..c343e4c 100644 ---- a/dir.c -+++ b/dir.c -@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf) - } - #endif - -+/* Similarly for lstat. */ -+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS) -+# ifndef VMS -+# ifndef HAVE_SYS_STAT_H -+int lstat (const char *path, struct stat *sbuf); -+# endif -+# else -+ /* We are done with the fake lstat. Go back to the real lstat */ -+# ifdef lstat -+# undef lstat -+# endif -+# endif -+# define local_lstat lstat -+#elif defined(WINDOWS32) -+/* Windows doesn't support lstat(). */ -+# define local_lstat local_stat -+#else -+static int -+local_lstat (const char *path, struct stat *buf) -+{ -+ int e; -+ EINTRLOOP (e, lstat (path, buf)); -+ return e; -+} -+#endif -+ - void - dir_setup_glob (glob_t *gl) - { - gl->gl_opendir = open_dirstream; - gl->gl_readdir = read_dirstream; - gl->gl_closedir = free; -+ gl->gl_lstat = local_lstat; - gl->gl_stat = local_stat; -- /* We don't bother setting gl_lstat, since glob never calls it. -- The slot is only there for compatibility with 4.4 BSD. */ - } - - void diff --git a/gnu/packages/patches/make-impure-dirs.patch b/gnu/packages/patches/make-impure-dirs.patch index 83a5fbe3a5..89595b06ec 100644 --- a/gnu/packages/patches/make-impure-dirs.patch +++ b/gnu/packages/patches/make-impure-dirs.patch @@ -4,9 +4,9 @@ don't look in /usr/include and friends. Patch from Nixpkgs, by Eelco Dolstra. -diff -rc make-3.81-orig/read.c make-3.81/read.c -*** make-3.81-orig/read.c 2006-03-17 15:24:20.000000000 +0100 ---- make-3.81/read.c 2007-05-24 17:16:31.000000000 +0200 +diff -rc make-3.81-orig/src/read.c make-3.81/src/read.c +*** make-3.81-orig/src/read.c 2006-03-17 15:24:20.000000000 +0100 +--- make-3.81/src/read.c 2007-05-24 17:16:31.000000000 +0200 *************** *** 99,107 **** --- 99,109 ---- @@ -21,9 +21,9 @@ diff -rc make-3.81-orig/read.c make-3.81/read.c #endif 0 }; -diff -rc make-3.81-orig/remake.c make-3.81/remake.c -*** make-3.81-orig/remake.c 2006-03-20 03:36:37.000000000 +0100 ---- make-3.81/remake.c 2007-05-24 17:06:54.000000000 +0200 +diff -rc make-3.81-orig/src/remake.c make-3.81/src/remake.c +*** make-3.81-orig/src/remake.c 2006-03-20 03:36:37.000000000 +0100 +--- make-3.81/src/remake.c 2007-05-24 17:06:54.000000000 +0200 *************** *** 1452,1460 **** --- 1452,1462 ---- diff --git a/gnu/packages/patches/mit-krb5-hurd.patch b/gnu/packages/patches/mit-krb5-hurd.patch new file mode 100644 index 0000000000..d4962b1e60 --- /dev/null +++ b/gnu/packages/patches/mit-krb5-hurd.patch @@ -0,0 +1,165 @@ +Avoid using MAXPATHLEN and MAXHOSTLEN on the Hurd. + +Taken from https://salsa.debian.org/debian/krb5/-/blob/master/debian/patches/debian-local/0001-Debian-HURD-compatibility.patch + +From: Sam Hartman <hartmans@debian.org> +Date: Mon, 26 Dec 2011 18:05:13 -0500 +Subject: Debian: HURD compatibility + +HURD has no MAXPATHLEN or MAXHOSTLEN. + +Patch-Category: debian-local +--- + src/clients/ksu/ksu.h | 4 ++++ + src/include/k5-int.h | 3 +++ + src/kadmin/ktutil/ktutil_funcs.c | 4 ++++ + src/kprop/kprop_util.c | 4 ++++ + src/lib/gssapi/spnego/spnego_mech.c | 3 +++ + src/lib/krb5/os/sn2princ.c | 4 ++++ + src/plugins/kdb/db2/libdb2/include/db-int.h | 4 ++++ + src/tests/resolve/resolve.c | 4 ++++ + 8 files changed, 30 insertions(+) + +$ diff -u krb5-1.18/src/util/ss/help.c.orig krb5-1.18/src/util/ss/help.c +--- krb5-1.18/src/util/ss/help.c.orig 2020-03-07 23:25:52.712418587 +0100 ++++ krb5-1.18/src/util/ss/help.c 2020-03-07 23:26:25.764941122 +0100 +@@ -6,6 +6,9 @@ + */ + + #include <sys/param.h> ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif + #include <sys/types.h> + #include <errno.h> + #include <sys/file.h> +$ diff -u krb5-1.18/src/lib/krb5/os/hostrealm.c.orig krb5-1.18/src/lib/krb5/os/hostrealm.c +--- krb5-1.18/src/lib/krb5/os/hostrealm.c.orig 2020-03-07 23:33:19.931420994 +0100 ++++ krb5-1.18/src/lib/krb5/os/hostrealm.c 2020-03-07 23:33:58.628026424 +0100 +@@ -42,6 +42,10 @@ + #endif + #endif + ++#ifndef MAXHOSTNAMELEN ++#define MAXHOSTNAMELEN 256 ++#endif ++ + struct hostrealm_module_handle { + struct krb5_hostrealm_vtable_st vt; + krb5_hostrealm_moddata data; +diff --git a/src/clients/ksu/ksu.h b/src/clients/ksu/ksu.h +index 3bf0bd4..f680b33 100644 +--- a/src/clients/ksu/ksu.h ++++ b/src/clients/ksu/ksu.h +@@ -56,6 +56,10 @@ + #define MAX_CMD 2048 /* this is temp, should use realloc instead, + as done in most of the code */ + ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif ++ + + extern int optind; + extern char * optarg; +diff --git a/src/include/k5-int.h b/src/include/k5-int.h +index 6522422..e4f1678 100644 +--- a/src/include/k5-int.h ++++ b/src/include/k5-int.h +@@ -589,6 +589,9 @@ extern char *strdup (const char *); + #ifdef HAVE_SYS_PARAM_H + #include <sys/param.h> /* MAXPATHLEN */ + #endif ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif + + #ifdef HAVE_SYS_FILE_H + #include <sys/file.h> /* prototypes for file-related +diff --git a/src/kadmin/ktutil/ktutil_funcs.c b/src/kadmin/ktutil/ktutil_funcs.c +index 6d119a2..fb7fa22 100644 +--- a/src/kadmin/ktutil/ktutil_funcs.c ++++ b/src/kadmin/ktutil/ktutil_funcs.c +@@ -34,6 +34,10 @@ + #include <string.h> + #include <ctype.h> + ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif ++ + /* + * Free a kt_list + */ +diff --git a/src/kprop/kprop_util.c b/src/kprop/kprop_util.c +index c32d174..d72ab18 100644 +--- a/src/kprop/kprop_util.c ++++ b/src/kprop/kprop_util.c +@@ -32,6 +32,10 @@ + #include <sys/types.h> + #include <sys/socket.h> + ++#ifndef MAXHOSTNAMELEN ++#define MAXHOSTNAMELEN 256 ++#endif ++ + /* + * Convert an IPv4 or IPv6 socket address to a newly allocated krb5_address. + * There is similar code elsewhere in the tree, so this should possibly become +diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c +index 9d6027c..585d8a6 100644 +--- a/src/lib/gssapi/spnego/spnego_mech.c ++++ b/src/lib/gssapi/spnego/spnego_mech.c +@@ -65,6 +65,9 @@ + #include "gssapiP_spnego.h" + #include <gssapi_err_generic.h> + ++#ifndef MAXHOSTNAMELEN ++#define MAXHOSTNAMELEN 256 ++#endif + + #undef g_token_size + #undef g_verify_token_header +diff --git a/src/lib/krb5/os/sn2princ.c b/src/lib/krb5/os/sn2princ.c +index 5932fd9..187daa8 100644 +--- a/src/lib/krb5/os/sn2princ.c ++++ b/src/lib/krb5/os/sn2princ.c +@@ -126,6 +126,10 @@ find_trailer(const char *hostname) + return p; + } + ++#ifndef MAXHOSTNAMELEN ++# define MAXHOSTNAMELEN 256 ++#endif ++ + krb5_error_code KRB5_CALLCONV + krb5_sname_to_principal(krb5_context context, const char *hostname, + const char *sname, krb5_int32 type, +diff --git a/src/plugins/kdb/db2/libdb2/include/db-int.h b/src/plugins/kdb/db2/libdb2/include/db-int.h +index 7e981d4..d83b3b6 100644 +--- a/src/plugins/kdb/db2/libdb2/include/db-int.h ++++ b/src/plugins/kdb/db2/libdb2/include/db-int.h +@@ -280,4 +280,8 @@ void __dbpanic __P((DB *dbp)); + #ifndef O_BINARY + #define O_BINARY 0 /* Needed for Win32 compiles */ + #endif ++ ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif + #endif /* _DB_INT_H_ */ +diff --git a/src/tests/resolve/resolve.c b/src/tests/resolve/resolve.c +index 7339d21..38f7253 100644 +--- a/src/tests/resolve/resolve.c ++++ b/src/tests/resolve/resolve.c +@@ -73,6 +73,10 @@ char *strchr(); + #include <netinet/in.h> + #include <netdb.h> + ++#ifndef MAXHOSTNAMELEN ++# define MAXHOSTNAMELEN 256 ++#endif ++ + int + main(argc, argv) + int argc; diff --git a/gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch b/gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch new file mode 100644 index 0000000000..491a358731 --- /dev/null +++ b/gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch @@ -0,0 +1,29 @@ +Fix a null pointer dereference when no DNS search path is configured. +This showed up as a segfault while running the gsasl test suite. + +Taken from upstream: +https://github.com/krb5/krb5/commit/cd82bf377e7fad2409c76bf8b241920692f34fda + +diff --git a/src/lib/krb5/os/dnsglue.c b/src/lib/krb5/os/dnsglue.c +index e35ca9d76c..0cd213fdd7 100644 +--- a/src/lib/krb5/os/dnsglue.c ++++ b/src/lib/krb5/os/dnsglue.c +@@ -91,7 +91,7 @@ static int initparse(struct krb5int_dns_state *); + #define DECLARE_HANDLE(h) struct __res_state h + #define INIT_HANDLE(h) (memset(&h, 0, sizeof(h)), res_ninit(&h) == 0) + #define SEARCH(h, n, c, t, a, l) res_nsearch(&h, n, c, t, a, l) +-#define PRIMARY_DOMAIN(h) strdup(h.dnsrch[0]) ++#define PRIMARY_DOMAIN(h) ((h.dnsrch[0] == NULL) ? NULL : strdup(h.dnsrch[0])) + #if HAVE_RES_NDESTROY + #define DESTROY_HANDLE(h) res_ndestroy(&h) + #else +@@ -104,7 +104,8 @@ static int initparse(struct krb5int_dns_state *); + #define DECLARE_HANDLE(h) + #define INIT_HANDLE(h) (res_init() == 0) + #define SEARCH(h, n, c, t, a, l) res_search(n, c, t, a, l) +-#define PRIMARY_DOMAIN(h) strdup(_res.defdname) ++#define PRIMARY_DOMAIN(h) \ ++ ((_res.defdname == NULL) ? NULL : strdup(_res.defdname)) + #define DESTROY_HANDLE(h) + + #endif diff --git a/gnu/packages/patches/openssh-hurd.patch b/gnu/packages/patches/openssh-hurd.patch new file mode 100644 index 0000000000..1ad09a7ee6 --- /dev/null +++ b/gnu/packages/patches/openssh-hurd.patch @@ -0,0 +1,30 @@ +Author: Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> +Not upstreamed. + +From 1ddae040d67e9a4ebcc3e1b95af1bff12c0f086b Mon Sep 17 00:00:00 2001 +From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> +Date: Tue, 7 Apr 2020 17:41:05 +0200 +Subject: [PATCH] Build fix for the Hurd. + +* gss-serv.c (ssh_gssapi_acquire_cred): Use HOST_NAME_MAX instead of +MAXHOSTNAMELEN. +--- + gss-serv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gss-serv.c b/gss-serv.c +index 1d47870e7..22081c6f1 100644 +--- a/gss-serv.c ++++ b/gss-serv.c +@@ -107,7 +107,7 @@ ssh_gssapi_acquire_cred(Gssctxt *ctx) + gss_create_empty_oid_set(&status, &oidset); + gss_add_oid_set_member(&status, ctx->oid, &oidset); + +- if (gethostname(lname, MAXHOSTNAMELEN)) { ++ if (gethostname(lname, HOST_NAME_MAX)) { + gss_release_oid_set(&status, &oidset); + return (-1); + } +-- +2.26.0 + diff --git a/gnu/packages/patches/pango-skip-libthai-test.patch b/gnu/packages/patches/pango-skip-libthai-test.patch new file mode 100644 index 0000000000..98732b5391 --- /dev/null +++ b/gnu/packages/patches/pango-skip-libthai-test.patch @@ -0,0 +1,23 @@ +Skip Thai character test when libthai is unavailable. + +Taken from upstream bug tracker: +https://gitlab.gnome.org/GNOME/pango/merge_requests/161 +https://gitlab.gnome.org/GNOME/pango/commit/b73284747ac937e31dc9191f84ed6e24284c88ee + +diff --git a/tests/test-break.c b/tests/test-break.c +index 8549b678bba69360d07dce3af21d915412f20d51..47fa3009165e19a331aa04a0df4351ae2323933b 100644 +--- a/tests/test-break.c ++++ b/tests/test-break.c +@@ -305,6 +305,12 @@ main (int argc, char *argv[]) + if (!strstr (name, "break")) + continue; + ++#ifndef HAVE_LIBTHAI ++ /* four.break involves Thai, so only test it when we have libthai */ ++ if (strstr (name, "four.break")) ++ continue; ++#endif ++ + path = g_strdup_printf ("/break/%s", name); + g_test_add_data_func_full (path, g_test_build_filename (G_TEST_DIST, "breaks", name, NULL), + test_break, g_free); diff --git a/gnu/packages/patches/pciutils-hurd-configure.patch b/gnu/packages/patches/pciutils-hurd-configure.patch new file mode 100644 index 0000000000..226891a995 --- /dev/null +++ b/gnu/packages/patches/pciutils-hurd-configure.patch @@ -0,0 +1,35 @@ +Add ability to detect GNU/Hurd when configuring. + +Adapted from https://git.hadrons.org/cgit/debian/pkgs/pciutils.git/tree/debian/patches/00-configure-hurd.patch + +From e39a3af22501234a91cf28e8c57b45f9379f9101 Mon Sep 17 00:00:00 2001 +From: Damien Zammit <damien@zamaudio.com> +Date: Fri, 26 Oct 2018 09:24:04 -0400 +Subject: [PATCH 2/2] Add ability to detect GNU/Hurd when configuring + +--- + lib/configure | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/lib/configure ++++ b/lib/configure +@@ -25,7 +25,7 @@ if [ -z "$HOST" ] ; then + proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1` + cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'` + else +- cpu=`uname -m | sed 's/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'` ++ cpu=`uname -m | sed 's/^i.86-AT386/i386/;s/^i.86$/i386/;s/^sun4u$/sparc64/;s/^i86pc$/i386/;s/^BePC$/i386/;s/^BeMac$/powerpc/;s/^BeBox$/powerpc/'` + fi + if [ "$sys" = "DragonFly" ] + then +@@ -39,6 +39,10 @@ if [ -z "$HOST" ] ; then + then + sys=cygwin + fi ++ if [ "$sys" = "GNU" ] ++ then ++ sys=gnu ++ fi + HOST=${3:-$cpu-$sys} + fi + [ -n "$RELEASE" ] && rel="${RELEASE}" diff --git a/gnu/packages/patches/perl-cross.patch b/gnu/packages/patches/perl-cross.patch new file mode 100644 index 0000000000..a7d10b4e1f --- /dev/null +++ b/gnu/packages/patches/perl-cross.patch @@ -0,0 +1,60 @@ +Submitted upstream. + +From 4c3eb19a11dfe5c88c902481a8294c4f675fcd03 Mon Sep 17 00:00:00 2001 +From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> +Date: Sun, 19 Apr 2020 23:33:28 +0200 +Subject: [PATCH] Support cross-compiling to the Hurd. + +* cnf/hints/gnu: New file. +* cnf/configure_tool.sh: Guess it. +--- + cnf/configure_tool.sh | 4 ++++ + cnf/hints/gnu | 21 +++++++++++++++++++++ + 2 files changed, 25 insertions(+) + create mode 100644 cnf/hints/gnu + +diff --git a/cnf/configure_tool.sh b/cnf/configure_tool.sh +index 32201c0..7b0baa4 100644 +--- a/cnf/configure_tool.sh ++++ b/cnf/configure_tool.sh +@@ -266,6 +266,10 @@ if not hinted 'osname'; then + define osname "bsd" + result "BSD" + ;; ++ *-gnu*) ++ define osname "gnu" ++ result "GNU" ++ ;; + *) + result "no" + ;; +diff --git a/cnf/hints/gnu b/cnf/hints/gnu +new file mode 100644 +index 0000000..a0583a2 +--- /dev/null ++++ b/cnf/hints/gnu +@@ -0,0 +1,21 @@ ++# Hurd syscalls ++d_voidsig='define' ++d_nanosleep='undef' ++d_clock_gettime='define' ++d_clock_getres='define' ++d_clock_nanosleep='define' ++d_clock='define' ++ ++# From the original linux.sh ++usemallocwrap='define' ++ ++# libraries to test ++libswanted='m crypt pthread nm ndbm gdbm dbm db dl gdbm_compat' ++ ++d_procselfexe='undef' ++procselfexe='"undef"' ++ ++st_ino_sign=1 ++st_ino_size=8 ++ ++d_fcntl_can_lock='define' +-- +2.26.0 + diff --git a/gnu/packages/patches/potrace-tests.patch b/gnu/packages/patches/potrace-tests.patch deleted file mode 100644 index 407be98dab..0000000000 --- a/gnu/packages/patches/potrace-tests.patch +++ /dev/null @@ -1,50 +0,0 @@ -This relaxes the comparison threshold between the reference data -and the bitmaps produced by Ghostscript interpreting the vectorized -image. Apparently the threshold has become too low with the switch -to from Ghostscript 2.21 to 2.22. - ---- potrace-1.15/check/postscript-check.sh 2018-01-06 19:47:26.194900686 +0100 -+++ potrace-1.15/check/postscript-check.sh 2018-01-06 19:51:35.937503739 +0100 -@@ -70,15 +70,15 @@ if test $? -ne 0; then - echo "Something is wrong with $GS; skipping this test" >& 2 - exit 77 - fi --actiondiff "$TMP2" "$REFDATA" 1000 -+actiondiff "$TMP2" "$REFDATA" 1500 - - action $POTRACE -r50 -p -L 0 -B 0 --opaque -o "$TMP1" "$DATA" - action "$GS" -q -dNOPAUSE -sDEVICE=pbmraw -g460x394 -r100x100 -sOutputFile="$TMP2" -- "$TMP1" --actiondiff "$TMP2" "$REFDATA" 1200 -+actiondiff "$TMP2" "$REFDATA" 1500 - - action $POTRACE -r50 -p -L 0 -B 0 -A 160 -o "$TMP1" "$DATA" - action "$GS" -q -dNOPAUSE -sDEVICE=pbmraw -g568x528 -r100x100 -sOutputFile="$TMP2" -- "$TMP1" --actiondiff "$TMP2" "$REFDATAROT" 1200 -+actiondiff "$TMP2" "$REFDATAROT" 1500 - - action rm -f "$TMP1" - action rm -f "$TMP2" - ---- potrace-1.15/check/pdf-check.sh 2018-01-06 19:47:28.698886663 +0100 -+++ potrace-1.15/check/pdf-check.sh 2018-01-06 20:54:14.895460329 +0100 -@@ -72,15 +72,15 @@ if test $? -ne 0 -o ! -f "$TMP2"; then - echo "GS does not understand PDF; skipping this test" >& 2 - exit 77 - fi --actiondiff "$TMP2" "$REFDATA" 1000 -+actiondiff "$TMP2" "$REFDATA" 1500 - - action $POTRACE -r50 -p -L 0 -B 0 --opaque -b pdf -o "$TMP1" "$DATA" - action "$GS" -q -dNOPAUSE -sDEVICE=pbmraw -g460x394 -r100x100 -sOutputFile="$TMP2" -- "$TMP1" --actiondiff "$TMP2" "$REFDATA" 1200 -+actiondiff "$TMP2" "$REFDATA" 1500 - - action $POTRACE -r50 -p -L 0 -B 0 -A 160 -b pdf -o "$TMP1" "$DATA" - action "$GS" -q -dNOPAUSE -sDEVICE=pbmraw -g568x528 -r100x100 -sOutputFile="$TMP2" -- "$TMP1" --actiondiff "$TMP2" "$REFDATAROT" 1200 -+actiondiff "$TMP2" "$REFDATAROT" 1500 - - action rm -f "$TMP1" - action rm -f "$TMP2" - -Diff finished. Sat Jan 6 20:54:50 2018 diff --git a/gnu/packages/patches/python-2.7-search-paths.patch b/gnu/packages/patches/python-2.7-search-paths.patch index a012bc8fe0..3318f44d23 100644 --- a/gnu/packages/patches/python-2.7-search-paths.patch +++ b/gnu/packages/patches/python-2.7-search-paths.patch @@ -1,15 +1,19 @@ -Make sure the build system honors CPATH and LIBRARY_PATH when +Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when looking for headers and libraries. --- Python-2.7.10/setup.py 2015-10-07 18:33:18.125153186 +0200 +++ Python-2.7.10/setup.py 2015-10-07 18:33:47.497347552 +0200 -@@ -526,6 +526,10 @@ class PyBuildExt(build_ext): +@@ -526,6 +526,14 @@ class PyBuildExt(build_ext): inc_dirs += ['/system/include', '/atheos/autolnk/include'] inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) + # Always honor these variables. -+ lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep) -+ inc_dirs += os.getenv('CPATH', '').split(os.pathsep) ++ if not cross_compiling: ++ lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep) ++ inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) ++ else: ++ lib_dirs = os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) ++ inc_dirs = os.getenv('CROSS_CPATH', '').split(os.pathsep) + # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) if host_platform in ['osf1', 'unixware7', 'openunix8']: diff --git a/gnu/packages/patches/python-3-arm-alignment.patch b/gnu/packages/patches/python-3-arm-alignment.patch new file mode 100644 index 0000000000..065c1a7bb2 --- /dev/null +++ b/gnu/packages/patches/python-3-arm-alignment.patch @@ -0,0 +1,21 @@ +Ensure memory accesses in the sha3 module are aligned on ARM as it causes +problems when running 32-bit code on a 64-bit kernel. + +Patch taken from upstream bug report: +https://bugs.python.org/issue36515 + +--- a/Modules/_sha3/sha3module.c ++++ b/Modules/_sha3/sha3module.c +@@ -64,6 +64,12 @@ + #define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN + #endif + ++/* Bus error on 32-bit ARM due to un-aligned memory accesses; 64-bit ARM ++ * doesn't complain but un-aligned memory accesses are sub-optimal */ ++#if defined(__arm__) || defined(__aarch64__) ++#define NO_MISALIGNED_ACCESSES ++#endif ++ + /* mangle names */ + #define KeccakF1600_FastLoop_Absorb _PySHA3_KeccakF1600_FastLoop_Absorb + #define Keccak_HashFinal _PySHA3_Keccak_HashFinal diff --git a/gnu/packages/patches/python-3-search-paths.patch b/gnu/packages/patches/python-3-search-paths.patch index 5fea9c66b6..df01d3b933 100644 --- a/gnu/packages/patches/python-3-search-paths.patch +++ b/gnu/packages/patches/python-3-search-paths.patch @@ -1,16 +1,25 @@ -Make sure the build system honors CPATH and LIBRARY_PATH when +Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when looking for headers and libraries. --- a/setup.py 2015-10-07 23:32:58.891329173 +0200 +++ b/setup.py 2015-10-07 23:46:29.653349924 +0200 -@@ -575,8 +575,8 @@ +@@ -676,15 +676,15 @@ # if a file is found in one of those directories, it can # be assumed that no additional -I,-L directives are needed. - if not cross_compiling: -- lib_dirs = self.compiler.library_dirs + system_lib_dirs -- inc_dirs = self.compiler.include_dirs + system_include_dirs -+ lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) -+ inc_dirs = os.getenv('CPATH', '').split(os.pathsep) + if not CROSS_COMPILING: +- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs +- self.inc_dirs = self.compiler.include_dirs + system_include_dirs ++ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) ++ self.inc_dirs = os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) else: # Add the sysroot paths. 'sysroot' is a compiler option used to # set the logical path of the standard system headers and + # libraries. +- self.lib_dirs = (self.compiler.library_dirs + ++ self.lib_dirs = (os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) + + sysroot_paths(('LDFLAGS', 'CC'), system_lib_dirs)) +- self.inc_dirs = (self.compiler.include_dirs + ++ self.inc_dirs = (os.getenv('CROSS_C_INCLUDE_PATH', '').split(os.pathsep) + + sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'), + system_include_dirs)) + diff --git a/gnu/packages/patches/python-3.8-search-paths.patch b/gnu/packages/patches/python-3.8-search-paths.patch deleted file mode 100644 index 88f19850bf..0000000000 --- a/gnu/packages/patches/python-3.8-search-paths.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/setup.py b/setup.py -index 20d7f35..5751083 100644 ---- a/setup.py -+++ b/setup.py -@@ -676,8 +676,8 @@ class PyBuildExt(build_ext): - # if a file is found in one of those directories, it can - # be assumed that no additional -I,-L directives are needed. - if not CROSS_COMPILING: -- self.lib_dirs = self.compiler.library_dirs + system_lib_dirs -- self.inc_dirs = self.compiler.include_dirs + system_include_dirs -+ self.lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) -+ self.inc_dirs = os.getenv('CPATH', '').split(os.pathsep) - else: - # Add the sysroot paths. 'sysroot' is a compiler option used to - # set the logical path of the standard system headers and --- -2.23.0 diff --git a/gnu/packages/patches/python-cffi-x87-stack-clean.patch b/gnu/packages/patches/python-cffi-x87-stack-clean.patch deleted file mode 100644 index 50243505ee..0000000000 --- a/gnu/packages/patches/python-cffi-x87-stack-clean.patch +++ /dev/null @@ -1,29 +0,0 @@ -Fix test that fails on i686: - -https://bitbucket.org/cffi/cffi/issues/382 - -This is a squashed version of these commits: -https://bitbucket.org/cffi/cffi/commits/ef09637b2314 -https://bitbucket.org/cffi/cffi/commits/7a76a3815340 - -diff -r 99940f1f5402 testing/cffi0/test_function.py ---- a/testing/cffi0/test_function.py Tue Feb 27 21:18:33 2018 +0100 -+++ b/testing/cffi0/test_function.py Sun Nov 11 16:26:23 2018 +0100 -@@ -45,14 +45,14 @@ - assert x != math.sin(1.23) # rounding effects - assert abs(x - math.sin(1.23)) < 1E-6 - -- def test_sin_no_return_value(self): -+ def test_lround_no_return_value(self): - # check that 'void'-returning functions work too - ffi = FFI(backend=self.Backend()) - ffi.cdef(""" -- void sin(double x); -+ void lround(double x); - """) - m = ffi.dlopen(lib_m) -- x = m.sin(1.23) -+ x = m.lround(1.23) - assert x is None - - def test_dlopen_filename(self): diff --git a/gnu/packages/patches/python-cross-compile.patch b/gnu/packages/patches/python-cross-compile.patch new file mode 100644 index 0000000000..5a470e1852 --- /dev/null +++ b/gnu/packages/patches/python-cross-compile.patch @@ -0,0 +1,145 @@ +Patch taken from https://bugs.python.org/issue22724 and augmented with +following Nix patch +https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/cpython/2.7/cross-compile.patch +to fix the whole cross-compilation circus. + +--- + Makefile.pre.in | 14 +++++++------- + configure | 5 ++++- + setup.py | 9 ++++++--- + 3 files changed, 17 insertions(+), 11 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 2a14f3323b..6239fc32fc 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -492,7 +492,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) + $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + + platform: $(BUILDPYTHON) pybuilddir.txt +- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform ++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform + + # Create build directory and generate the sysconfig build-time data there. + # pybuilddir.txt contains the name of the build dir and is used for +@@ -503,7 +503,7 @@ platform: $(BUILDPYTHON) pybuilddir.txt + # or removed in case of failure. + pybuilddir.txt: $(BUILDPYTHON) + @echo "none" > ./pybuilddir.txt +- $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\ ++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars ;\ + if test $$? -ne 0 ; then \ + echo "generate-posix-vars failed" ; \ + rm -f ./pybuilddir.txt ; \ +@@ -525,7 +525,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o + esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ +- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build ++ $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + + # Build static library + # avoid long command lines, same as LIBRARY_OBJS +@@ -928,7 +928,7 @@ install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKI + upgrade) ensurepip="--upgrade" ;; \ + install|*) ensurepip="" ;; \ + esac; \ +- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ ++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -m ensurepip \ + $$ensurepip --root=$(DESTDIR)/ ; \ + fi + +@@ -939,7 +939,7 @@ altinstall: commoninstall + upgrade) ensurepip="--altinstall --upgrade --no-default-pip" ;; \ + install|*) ensurepip="--altinstall --no-default-pip" ;; \ + esac; \ +- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \ ++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) -m ensurepip \ + $$ensurepip --root=$(DESTDIR)/ ; \ + fi + +@@ -1270,7 +1270,7 @@ libainstall: @DEF_MAKE_RULE@ python-config + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: sharedmods +- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ ++ $(RUNSHARED) $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ +@@ -1344,7 +1344,7 @@ frameworkinstallextras: + # This installs a few of the useful scripts in Tools/scripts + scriptsinstall: + SRCDIR=$(srcdir) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \ ++ $(PY_BUILD_ENVIRON) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/scripts/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --root=$(DESTDIR)/ +diff --git a/configure b/configure +index 67300fe2b6..6050f588c5 100755 +--- a/configure ++++ b/configure +@@ -741,6 +741,7 @@ CONFIG_ARGS + SOVERSION + VERSION + PYTHON_FOR_BUILD ++PY_BUILD_ENVIRON + PYTHON_FOR_REGEN + host_os + host_vendor +@@ -2964,7 +2965,8 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; } + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 + $as_echo "$interp" >&6; } +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp ++ PY_BUILD_ENVIRON='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR)' ++ PYTHON_FOR_BUILD=$interp + fi + elif test "$cross_compiling" = maybe; then + as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5 +@@ -2974,6 +2976,7 @@ fi + + + ++ + if test "$prefix" != "/"; then + prefix=`echo "$prefix" | sed -e 's/\/$//g'` + fi +diff --git a/setup.py b/setup.py +index cb47a2339c..472e7e2b26 100644 +--- a/setup.py ++++ b/setup.py +@@ -497,8 +497,6 @@ class PyBuildExt(build_ext): + if not cross_compiling: + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') +- if cross_compiling: +- self.add_gcc_paths() + self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and +@@ -556,7 +554,10 @@ class PyBuildExt(build_ext): + # be assumed that no additional -I,-L directives are needed. + inc_dirs = self.compiler.include_dirs[:] + lib_dirs = self.compiler.library_dirs[:] +- if not cross_compiling: ++ if cross_compiling: ++ inc_dirs = [] ++ lib_dirs = [] ++ else: + for d in ( + '/usr/include', + ): +@@ -621,6 +622,8 @@ class PyBuildExt(build_ext): + # Some modules that are normally always on: + #exts.append( Extension('_weakref', ['_weakref.c']) ) + ++ self.compiler.library_dirs = lib_dirs + [ '.' ] ++ + # array objects + exts.append( Extension('array', ['arraymodule.c']) ) + +-- +2.17.1 + diff --git a/gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch b/gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch new file mode 100644 index 0000000000..affa0e1317 --- /dev/null +++ b/gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch @@ -0,0 +1,36 @@ +Fix build with Python 3.8 by also checking for python-3.X-embed.pc. Since +Python 3.8 the normal checks don't include the Python libraries anymore and +linking of the gst-python module would fail. + +See also https://github.com/mesonbuild/meson/issues/5629 +Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28 + +Patch based on upstream commit: + +https://gitlab.freedesktop.org/gstreamer/gst-python/-/commit/10707f437f2fc3632067c6a0efa4432f7ebaf362 + +diff --git a/meson.build b/meson.build +index 5f13b48..d7c7e66 100644 +--- a/meson.build ++++ b/meson.build +@@ -23,7 +23,17 @@ pygobject_dep = dependency('pygobject-3.0', fallback: ['pygobject', 'pygobject_d + + pymod = import('python') + python = pymod.find_installation(get_option('python')) +-python_dep = python.dependency(required : true) ++pythonver = python.language_version() ++if pythonver.version_compare('<3.0') ++ error('Python2 is not supported anymore, please port your code to python3 (@0@ specified)'.format(python.language_version())) ++endif ++ ++# Workaround for https://github.com/mesonbuild/meson/issues/5629 ++# https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28 ++python_dep = dependency('python-@0@-embed'.format(pythonver), version: '>=3', required: false) ++if not python_dep.found() ++ python_dep = python.dependency(required : true) ++endif + + python_abi_flags = python.get_variable('ABIFLAGS', '') + pylib_loc = get_option('libpython-dir') +-- +2.26.2 diff --git a/gnu/packages/patches/python-pycrypto-time-clock.patch b/gnu/packages/patches/python-pycrypto-time-clock.patch new file mode 100644 index 0000000000..9b7a8232a2 --- /dev/null +++ b/gnu/packages/patches/python-pycrypto-time-clock.patch @@ -0,0 +1,23 @@ +Drop use of the deprecated time.clock which was removed in Python 3.8. + +Adapted from upstream pull request: + +https://github.com/dlitz/pycrypto/pull/296 + +diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py +--- a/lib/Crypto/Random/_UserFriendlyRNG.py ++++ b/lib/Crypto/Random/_UserFriendlyRNG.py +@@ -73,8 +73,11 @@ class _EntropyCollector(object): + t = time.time() + self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t))))) + +- # Add the fractional part of time.clock() +- t = time.clock() ++ # Add the fractional part of time.process_time() ++ try: ++ t = time.process_time() ++ except AttributeError: ++ t = time.clock() + self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t))))) + + diff --git a/gnu/packages/patches/qtbase-moc-ignore-gcc-macro.patch b/gnu/packages/patches/qtbase-moc-ignore-gcc-macro.patch new file mode 100644 index 0000000000..b296cf0b72 --- /dev/null +++ b/gnu/packages/patches/qtbase-moc-ignore-gcc-macro.patch @@ -0,0 +1,17 @@ +The moc executable loops through headers on CPLUS_INCLUDE_PATH and stumbles +on the GCC internal _GLIBCXX_VISIBILITY macro. Tell it to ignore it as it is +not supposed to be looking there to begin with. + +Upstream report: https://bugreports.qt.io/browse/QTBUG-83160 + +diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp +--- a/src/tools/moc/main.cpp ++++ b/src/tools/moc/main.cpp +@@ -188,6 +188,7 @@ int runMoc(int argc, char **argv) + dummyVariadicFunctionMacro.arguments += Symbol(0, PP_IDENTIFIER, "__VA_ARGS__"); + pp.macros["__attribute__"] = dummyVariadicFunctionMacro; + pp.macros["__declspec"] = dummyVariadicFunctionMacro; ++ pp.macros["_GLIBCXX_VISIBILITY"] = dummyVariadicFunctionMacro; + + QString filename; + QString output; diff --git a/gnu/packages/patches/screen-hurd-path-max.patch b/gnu/packages/patches/screen-hurd-path-max.patch new file mode 100644 index 0000000000..e906f154f3 --- /dev/null +++ b/gnu/packages/patches/screen-hurd-path-max.patch @@ -0,0 +1,42 @@ +Workaround for PATH_MAX usage on the Hurd. + +Taken from https://salsa.debian.org/debian/screen/-/blob/master/debian/patches/61-default-PATH_MAX-if-undefined-for-hurd.patch + +Description: Set PATH_MAX to 4096 if undefined + Fixes FTBFS since 4.4.0 on GNU/Hurd. Updated to add one more occurrence for 4.5.0. +Author: Axel Beckert <abe@debian.org> +Bug: https://savannah.gnu.org/bugs/?50089 +Last-Updated: 2017-01-18 + +--- a/tty.sh ++++ b/tty.sh +@@ -1478,6 +1478,13 @@ + return 0; + } + ++/* ++ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd ++ */ ++ ++#ifndef PATH_MAX ++#define PATH_MAX 4096 ++#endif + + int CheckTtyname (char *tty) + { +--- a/screen.h ++++ b/screen.h +@@ -109,6 +109,13 @@ + # define DEFAULT_BUFFERFILE "/tmp/screen-exchange" + #endif + ++/* ++ * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd ++ */ ++ ++#ifndef PATH_MAX ++#define PATH_MAX 4096 ++#endif + + #if defined(hpux) && !(defined(VSUSP) && defined(VDSUSP) && defined(VWERASE) && defined(VLNEXT)) + # define HPUX_LTCHARS_HACK diff --git a/gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch b/gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch deleted file mode 100644 index 55866d2973..0000000000 --- a/gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch +++ /dev/null @@ -1,32 +0,0 @@ -Patch from <https://gitlab.gnome.org/GNOME/seahorse/commit/d9db29db567012b7c72e85e1be1fbf55fcc9b667>. - -From d9db29db567012b7c72e85e1be1fbf55fcc9b667 Mon Sep 17 00:00:00 2001 -From: Niels De Graef <nielsdegraef@gmail.com> -Date: Sat, 11 May 2019 09:02:34 +0200 -Subject: [PATCH] gkr: Use 0 on empty flags - -A Flags-type variable without any flag set can be replaced with 0, so -this is a safe thing to do. It also prevents us from having to deal with -the accidental API break in libsecret (see -https://gitlab.gnome.org/GNOME/libsecret/merge_requests/19) ---- - gkr/gkr-keyring-add.vala | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/gkr/gkr-keyring-add.vala b/gkr/gkr-keyring-add.vala -index 4e92a520..f60c9a22 100644 ---- a/gkr/gkr-keyring-add.vala -+++ b/gkr/gkr-keyring-add.vala -@@ -41,8 +41,7 @@ public class Seahorse.Gkr.KeyringAdd : Gtk.Dialog { - - var cancellable = Dialog.begin_request(this); - var service = Backend.instance().service; -- Secret.Collection.create.begin(service, this.name_entry.text, null, -- Secret.CollectionCreateFlags.COLLECTION_CREATE_NONE, -+ Secret.Collection.create.begin(service, this.name_entry.text, null, 0, - cancellable, (obj, res) => { - /* Clear the operation without cancelling it since it is complete */ - Dialog.complete_request(this, false); --- -2.23.0 - diff --git a/gnu/packages/patches/shadow-hurd-pctrl.patch b/gnu/packages/patches/shadow-hurd-pctrl.patch new file mode 100644 index 0000000000..2e376e19a9 --- /dev/null +++ b/gnu/packages/patches/shadow-hurd-pctrl.patch @@ -0,0 +1,16 @@ +Avoid including sys/prctl.h on the Hurd. + +Upstream status: Not submitted. + +--- shadow-4.8.1/libmisc/idmapping.c.orig 2020-03-07 16:32:05.000000000 -0500 ++++ shadow-4.8.1/libmisc/idmapping.c 2020-03-07 16:32:27.000000000 -0500 +@@ -36,8 +36,8 @@ + #include <stdio.h> + #include "prototypes.h" + #include "idmapping.h" +-#include <sys/prctl.h> + #if HAVE_SYS_CAPABILITY_H ++#include <sys/prctl.h> + #include <sys/capability.h> + #endif + diff --git a/gnu/packages/patches/swig-guile-gc.patch b/gnu/packages/patches/swig-guile-gc.patch deleted file mode 100644 index 0e745a6247..0000000000 --- a/gnu/packages/patches/swig-guile-gc.patch +++ /dev/null @@ -1,76 +0,0 @@ -Fix garbage collection for Guile versions >= 2.0.12. This issue showed -up when running the tests on i686-linux. - -Taken from this upstream commit: -https://github.com/swig/swig/commit/38f2ab0c30e369e63bbd0a6152108488d0de68e1 - -diff --git a/Lib/guile/guile_scm_run.swg b/Lib/guile/guile_scm_run.swg -index 274f197158..0d04cb7c62 100644 ---- a/Lib/guile/guile_scm_run.swg -+++ b/Lib/guile/guile_scm_run.swg -@@ -99,6 +99,7 @@ SWIG_Guile_scm2newstr(SCM str, size_t *len) { - static int swig_initialized = 0; - static scm_t_bits swig_tag = 0; - static scm_t_bits swig_collectable_tag = 0; -+static scm_t_bits swig_finalized_tag = 0; - static scm_t_bits swig_destroyed_tag = 0; - static scm_t_bits swig_member_function_tag = 0; - static SCM swig_make_func = SCM_EOL; -@@ -163,7 +164,19 @@ SWIG_Guile_PointerType(SCM object) - } - else scm_wrong_type_arg("SWIG-Guile-PointerType", 1, object); - } -- -+ -+SWIGINTERN int -+SWIG_Guile_IsValidSmob(SCM smob) -+{ -+ /* We do not accept smobs representing destroyed pointers, but we have to -+ allow finalized smobs because Guile >= 2.0.12 sets all smob instances -+ to the 'finalized' type before calling their 'free' function. This change -+ was introduced to Guile in commit 8dff3af087c6eaa83ae0d72aa8b22aef5c65d65d */ -+ return SCM_SMOB_PREDICATE(swig_tag, smob) -+ || SCM_SMOB_PREDICATE(swig_collectable_tag, smob) -+ || SCM_SMOB_PREDICATE(swig_finalized_tag, smob); -+} -+ - SWIGINTERN int - SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags) - { -@@ -179,8 +192,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags) - *result = SCM_POINTER_VALUE(s); - return SWIG_OK; - #endif /* if SCM_MAJOR_VERSION >= 2 */ -- } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { -- /* we do not accept smobs representing destroyed pointers */ -+ } else if (SWIG_Guile_IsValidSmob(smob)) { - from = (swig_type_info *) SCM_CELL_WORD_2(smob); - if (!from) return SWIG_ERROR; - if (type) { -@@ -239,7 +251,7 @@ SWIG_Guile_MarkPointerNoncollectable(SCM s) - { - SCM smob = SWIG_Guile_GetSmob(s); - if (!SCM_NULLP(smob)) { -- if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { -+ if (SWIG_Guile_IsValidSmob(smob)) { - SCM_SET_CELL_TYPE(smob, swig_tag); - } - else scm_wrong_type_arg(NULL, 0, s); -@@ -252,7 +264,7 @@ SWIG_Guile_MarkPointerDestroyed(SCM s) - { - SCM smob = SWIG_Guile_GetSmob(s); - if (!SCM_NULLP(smob)) { -- if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) { -+ if (SWIG_Guile_IsValidSmob(smob)) { - SCM_SET_CELL_TYPE(smob, swig_destroyed_tag); - } - else scm_wrong_type_arg(NULL, 0, s); -@@ -419,6 +431,8 @@ SWIG_Guile_Init () - scm_set_smob_print(swig_collectable_tag, print_collectable_swig); - scm_set_smob_equalp(swig_collectable_tag, equalp_swig); - scm_set_smob_free(swig_collectable_tag, free_swig); -+ /* For Guile >= 2.0.12. See libguile/smob.c:clear_smobnum */ -+ swig_finalized_tag = swig_collectable_tag & ~0xff00; - } - if (ensure_smob_tag(swig_module, &swig_destroyed_tag, - "destroyed-swig-pointer", "destroyed-swig-pointer-tag")) { diff --git a/gnu/packages/patches/tcl-fix-cross-compilation.patch b/gnu/packages/patches/tcl-fix-cross-compilation.patch new file mode 100644 index 0000000000..00c36b8f27 --- /dev/null +++ b/gnu/packages/patches/tcl-fix-cross-compilation.patch @@ -0,0 +1,39 @@ +From f7fa48c4c75a1e748dc5071e709c0b62ff739eaa Mon Sep 17 00:00:00 2001 +From: "jan.nijtmans" <nijtmans@users.sourceforge.net> +Date: Mon, 9 Dec 2019 10:02:20 +0000 +Subject: [PATCH] Fix [abd4abedd2]: Failed to build tk 8.6.10 with cross + compile + +Patch taken from upstream to fix cross-compilation. To be removed on next Tcl release. + +--- + compat/strtol.c | 2 +- + compat/strtoul.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/compat/strtol.c b/compat/strtol.c +index b7f69196ce2..811006a64c3 100644 +--- a/compat/strtol.c ++++ b/compat/strtol.c +@@ -53,7 +53,7 @@ strtol( + */ + + p = string; +- while (TclIsSpaceProc(*p)) { ++ while (isspace(UCHAR(*p))) { + p += 1; + } + +diff --git a/compat/strtoul.c b/compat/strtoul.c +index e37eb05f823..15587f1da1a 100644 +--- a/compat/strtoul.c ++++ b/compat/strtoul.c +@@ -74,7 +74,7 @@ strtoul( + */ + + p = string; +- while (TclIsSpaceProc(*p)) { ++ while (isspace(UCHAR(*p))) { + p += 1; + } + if (*p == '-') { diff --git a/gnu/packages/patches/tcsh-fix-autotest.patch b/gnu/packages/patches/tcsh-fix-autotest.patch index 78444a1b2a..200867cb9b 100644 --- a/gnu/packages/patches/tcsh-fix-autotest.patch +++ b/gnu/packages/patches/tcsh-fix-autotest.patch @@ -63,38 +63,14 @@ AT_DATA([comment2.csh], [[echo testing...@%:@\ -@@ -567,10 +567,10 @@ run=3 -# Adapt to changes in sed 4.3: -# https://github.com/tcsh-org/tcsh/commit/2ad4fc1705893207598ed5cd21713ddf3f17bba0 - ]]) - AT_DATA([uniformity_test.csh], - [[ --set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'` -+set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'` - echo -n "$SERVICE_NAME_LOG" > ./output1 - --cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2 -+cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2 - - diff -uprN ./output1 ./output2 >& /dev/null - -@@ -587,7 +587,7 @@ AT_DATA([quoting_result_test.csh], - echo "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP\)(HOST=db\)(PORT=1521\)\)(CONNECT_DATA=(SERVER=DEDICATED\)(SERVICE_NAME=bns03\)\)\)" > ./expected_result - - set string = "jdbc_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=bns03)))" --set SERVICE_NAME_LOG = `echo "$string" | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\)/\\\)/g'` -+set SERVICE_NAME_LOG = `echo "$string" | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\)/\\\)/g'` - - echo "$SERVICE_NAME_LOG" > ./actual_result - --- tests/subst.at +++ tests/subst.at -@@ -54,7 +54,7 @@ AT_CHECK([echo 'echo ~; echo "$HOME"' | tcsh -f | uniq | wc -l | tr -d ' \t'], +@@ -54,7 +54,7 @@ AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }') , [1 ]) --AT_CHECK([echo "echo ~$(id -un)/foo; echo \"$HOME/foo\"" | tcsh -f | uniq dnl -+AT_CHECK([echo "echo ~$(id -un)/foo; echo \"$HOME/foo\"" | tcsh -f | grep -v "/homeless-shelter" | uniq dnl +-AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)/foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl ++AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)//foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl | wc -l | tr -d ' \t'], , [1 ]) @@ -110,21 +86,6 @@ ]]) chmod a+x args.sh AT_CHECK([tcsh -f listflags.csh], , -@@ -704,9 +705,9 @@ AT_CHECK([tcsh -f mail.csh], , -# This test fails by trying to change to the build user's home -# directory, which does not exist. - AT_CLEANUP - - --AT_SETUP([$ cdtohome]) --AT_CHECK([tcsh -f -c 'cd'], 0) --AT_CLEANUP -+#AT_SETUP([$ cdtohome]) -+#AT_CHECK([tcsh -f -c 'cd'], 0) -+#AT_CLEANUP - AT_SETUP([$ noimplicithome]) - AT_CHECK([tcsh -f -c 'unset cdtohome; cd'], 1, , [cd: Too few arguments. - ]) @@ -728,55 +729,57 @@ TCSH_UNTESTED([$ oid]) AT_SETUP([$ owd]) diff --git a/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch b/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch deleted file mode 100644 index 48c294f78e..0000000000 --- a/gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch +++ /dev/null @@ -1,31 +0,0 @@ -Fix out-of-bounds read in c_substitute(): - -http://seclists.org/oss-sec/2016/q4/612 - -Patch copied from upstream source repository: - -https://github.com/tcsh-org/tcsh/commit/6a542dc4fb2ba26518a47e9b3a9bcd6a91b94596 - -From 6a542dc4fb2ba26518a47e9b3a9bcd6a91b94596 Mon Sep 17 00:00:00 2001 -From: christos <christos> -Date: Fri, 2 Dec 2016 16:59:28 +0000 -Subject: [PATCH] Fix out of bounds read (Brooks Davis) (reproduce by starting - tcsh and hitting tab at the prompt) - ---- - ed.chared.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ed.chared.c b/ed.chared.c -index 1277e53..310393e 100644 ---- ed.chared.c -+++ ed.chared.c -@@ -750,7 +750,7 @@ c_substitute(void) - /* - * If we found a history character, go expand it. - */ -- if (HIST != '\0' && *p == HIST) -+ if (p >= InputBuf && HIST != '\0' && *p == HIST) - nr_exp = c_excl(p); - else - nr_exp = 0; diff --git a/gnu/packages/patches/telepathy-glib-channel-memory-leak.patch b/gnu/packages/patches/telepathy-glib-channel-memory-leak.patch new file mode 100644 index 0000000000..fe07548ec0 --- /dev/null +++ b/gnu/packages/patches/telepathy-glib-channel-memory-leak.patch @@ -0,0 +1,19 @@ +Prevent a memory leak in call-channel, which otherwise would cause a +test failure in file-transfer-channel.c. + +Taken from upstream: +https://gitlab.freedesktop.org/telepathy/telepathy-glib/commit/2e8b2cc0db09b781d99e3755bb6d01548037fe7b + +diff --git a/telepathy-glib/call-channel.c b/telepathy-glib/call-channel.c +index 8ed76323be32f83c5f4d6045a50bc1698d8093fd..2a1fa203d4be9f0c8b99344225f4ba9900666ffc 100644 +--- a/telepathy-glib/call-channel.c ++++ b/telepathy-glib/call-channel.c +@@ -525,6 +525,8 @@ update_call_members (TpCallChannel *self, + + _tp_channel_contacts_queue_prepare_async ((TpChannel *) self, + contacts, update_call_members_prepared_cb, data); ++ ++ g_ptr_array_unref (contacts); + } + + static void diff --git a/gnu/packages/patches/texlive-bin-CVE-2018-17407.patch b/gnu/packages/patches/texlive-bin-CVE-2018-17407.patch deleted file mode 100644 index 63646d420c..0000000000 --- a/gnu/packages/patches/texlive-bin-CVE-2018-17407.patch +++ /dev/null @@ -1,249 +0,0 @@ -This patch adds support for newer versions of Poppler and some upstream -TexLive fixes, including one for CVE-2018-17407. - -It is taken from Linux From Scratch: -<http://www.linuxfromscratch.org/patches/blfs/svn/texlive-20180414-source-upstream_fixes-3.patch>. - -Submitted By: Ken Moffat <ken at linuxfromscratch dot org> -Date: 2018-12-26 -Initial Package Version: 20180414 -Upstream Status: Applied -Origin: Upstream -Description: Two fixes, cherry-picked from svn plus a CVE fix. -I have removed the partial fixes for various system versions of poppler. - -r47469 Fix segfault in dvipdfm-x (XeTeX) on 1/2/4-bit transparent indexed PNGs. - -r47477 Fix a ptex regression for discontinuous kinsoku table. - -Also, via fedora (I got lost in svn) a critical fix for CVE-2018-17407 - -"A buffer overflow in the handling of Type 1 fonts allows arbitrary code -execution when a malicious font is loaded by one of the vulnerable tools: -pdflatex, pdftex, dvips, or luatex." - -diff -Naur a/texk/dvipdfm-x/pngimage.c b/texk/dvipdfm-x/pngimage.c ---- a/texk/dvipdfm-x/pngimage.c 2018-02-17 08:41:35.000000000 +0000 -+++ b/texk/dvipdfm-x/pngimage.c 2018-10-09 01:52:01.648670875 +0100 -@@ -964,12 +964,16 @@ - png_bytep trans; - int num_trans; - png_uint_32 i; -+ png_byte bpc, mask, shift; - - if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) || - !png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, NULL)) { - WARN("%s: PNG does not have valid tRNS chunk but tRNS is requested.", PNG_DEBUG_STR); - return NULL; - } -+ bpc = png_get_bit_depth(png_ptr, info_ptr); -+ mask = 0xff >> (8 - bpc); -+ shift = 8 - bpc; - - smask = pdf_new_stream(STREAM_COMPRESS); - dict = pdf_stream_dict(smask); -@@ -981,7 +985,8 @@ - pdf_add_dict(dict, pdf_new_name("ColorSpace"), pdf_new_name("DeviceGray")); - pdf_add_dict(dict, pdf_new_name("BitsPerComponent"), pdf_new_number(8)); - for (i = 0; i < width*height; i++) { -- png_byte idx = image_data_ptr[i]; -+ /* data is packed for 1/2/4 bpc formats, msb first */ -+ png_byte idx = (image_data_ptr[bpc * i / 8] >> (shift - bpc * i % 8)) & mask; - smask_data_ptr[i] = (idx < num_trans) ? trans[idx] : 0xff; - } - pdf_add_stream(smask, (char *)smask_data_ptr, width*height); -diff -Naur a/texk/dvipsk/writet1.c b/texk/dvipsk/writet1.c ---- a/texk/dvipsk/writet1.c 2016-11-25 18:24:26.000000000 +0000 -+++ b/texk/dvipsk/writet1.c 2018-10-09 01:52:01.648670875 +0100 -@@ -1449,7 +1449,9 @@ - *(strend(t1_buf_array) - 1) = ' '; - - t1_getline(); -+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE); - strcat(t1_buf_array, t1_line_array); -+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); - strcpy(t1_line_array, t1_buf_array); - t1_line_ptr = eol(t1_line_array); - } -diff -Naur a/texk/web2c/luatexdir/font/writet1.w b/texk/web2c/luatexdir/font/writet1.w ---- a/texk/web2c/luatexdir/font/writet1.w 2016-11-25 18:24:34.000000000 +0000 -+++ b/texk/web2c/luatexdir/font/writet1.w 2018-10-09 01:52:01.648670875 +0100 -@@ -1625,7 +1625,9 @@ - if (sscanf(p, "%i", &i) != 1) { - strcpy(t1_buf_array, t1_line_array); - t1_getline(); -+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE); - strcat(t1_buf_array, t1_line_array); -+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); - strcpy(t1_line_array, t1_buf_array); - t1_line_ptr = eol(t1_line_array); - } -diff -Naur a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w ---- a/texk/web2c/luatexdir/image/pdftoepdf.w 2018-01-17 18:00:12.000000000 +0000 -+++ b/texk/web2c/luatexdir/image/pdftoepdf.w 2018-10-09 01:52:01.648670875 +0100 -@@ -472,10 +472,10 @@ - break; - */ - case objString: -- copyString(pdf, obj->getString()); -+ copyString(pdf, (GooString *)obj->getString()); - break; - case objName: -- copyName(pdf, obj->getName()); -+ copyName(pdf, (char *)obj->getName()); - break; - case objNull: - pdf_add_null(pdf); -diff -Naur a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc ---- a/texk/web2c/luatexdir/lua/lepdflib.cc 2018-02-14 14:44:38.000000000 +0000 -+++ b/texk/web2c/luatexdir/lua/lepdflib.cc 2018-10-09 01:52:01.649670868 +0100 -@@ -674,7 +674,7 @@ - uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \ - if (uin->pd != NULL && uin->pd->pc != uin->pc) \ - pdfdoc_changed_error(L); \ -- gs = ((in *) uin->d)->function(); \ -+ gs = (GooString *)((in *) uin->d)->function(); \ - if (gs != NULL) \ - lua_pushlstring(L, gs->getCString(), gs->getLength()); \ - else \ -@@ -1813,7 +1813,7 @@ - if (uin->pd != NULL && uin->pd->pc != uin->pc) - pdfdoc_changed_error(L); - if (((Object *) uin->d)->isString()) { -- gs = ((Object *) uin->d)->getString(); -+ gs = (GooString *)((Object *) uin->d)->getString(); - lua_pushlstring(L, gs->getCString(), gs->getLength()); - } else - lua_pushnil(L); -diff -Naur a/texk/web2c/pdftexdir/writet1.c b/texk/web2c/pdftexdir/writet1.c ---- a/texk/web2c/pdftexdir/writet1.c 2016-11-25 18:24:37.000000000 +0000 -+++ b/texk/web2c/pdftexdir/writet1.c 2018-10-09 01:52:01.649670868 +0100 -@@ -1598,7 +1598,9 @@ - *(strend(t1_buf_array) - 1) = ' '; - - t1_getline(); -+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE); - strcat(t1_buf_array, t1_line_array); -+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE); - strcpy(t1_line_array, t1_buf_array); - t1_line_ptr = eol(t1_line_array); - } -diff -Naur a/texk/web2c/ptexdir/ptex_version.h b/texk/web2c/ptexdir/ptex_version.h ---- a/texk/web2c/ptexdir/ptex_version.h 2018-01-21 03:48:06.000000000 +0000 -+++ b/texk/web2c/ptexdir/ptex_version.h 2018-10-09 01:52:01.649670868 +0100 -@@ -1 +1 @@ --#define PTEX_VERSION "p3.8.0" -+#define PTEX_VERSION "p3.8.1" -diff -Naur a/texk/web2c/ptexdir/tests/free_ixsp.tex b/texk/web2c/ptexdir/tests/free_ixsp.tex ---- a/texk/web2c/ptexdir/tests/free_ixsp.tex 1970-01-01 01:00:00.000000000 +0100 -+++ b/texk/web2c/ptexdir/tests/free_ixsp.tex 2018-10-09 01:52:01.649670868 +0100 -@@ -0,0 +1,53 @@ -+%#!eptex -ini -etex -+\let\dump\relax -+\batchmode -+\input plain -+ -+\errorstopmode -+\catcode`@=11 -+\newcount\@tempcnta -+\newcount\@tempcntb -+\newcount\@tempcntc -+\mathchardef\LIM=256 -+ -+\def\MYCHAR#1{% -+ \@tempcntc=\numexpr7*#1+"101\relax -+ \@tempcnta=\@tempcntc\divide\@tempcnta 94 -+ \@tempcntb=\numexpr\@tempcntc-94*\@tempcnta+1\relax -+ \ifnum\@tempcntb<0\advance\@tempcntb94 \advance\@tempcnta-1\fi -+ \advance\@tempcnta18 % 18区以降 -+ \CNTA=\kuten\numexpr"100*\@tempcnta+\@tempcntb\relax -+} -+ -+\newcount\CNT\newcount\CNTA -+\CNT=0 -+\loop -+ \MYCHAR\CNT -+ \message{\the\CNT.} -+ \inhibitxspcode\CNTA=1\relax -+ \advance\CNT1\relax -+ \ifnum\CNT<\LIM -+\repeat -+ -+\newcount\CNTB -+ -+\loop -+ \MYCHAR\CNTB -+ \global\inhibitxspcode\CNTA=3 -+{% -+\CNT=0 -+\loop -+ \MYCHAR\CNT -+ \count@=\numexpr 1-\inhibitxspcode\CNTA\relax -+ \ifnum\count@=0\else\ifnum\CNTB=\CNT\else -+ \errmessage{<\the\CNTB, \the\CNT, \the\inhibitxspcode\CNTA>}\fi\fi -+ \advance\CNT1\relax -+ \ifnum\CNT<\LIM -+\repeat -+} -+ \MYCHAR\CNTB -+ \global\inhibitxspcode\CNTA=1\relax -+ \advance\CNTB1\relax -+ \ifnum\CNTB<\LIM -+\repeat -+\bye -diff -Naur a/texk/web2c/ptexdir/tests/free_pena.tex b/texk/web2c/ptexdir/tests/free_pena.tex ---- a/texk/web2c/ptexdir/tests/free_pena.tex 1970-01-01 01:00:00.000000000 +0100 -+++ b/texk/web2c/ptexdir/tests/free_pena.tex 2018-10-09 01:52:01.649670868 +0100 -@@ -0,0 +1,52 @@ -+%#!eptex -ini -etex -+\let\dump\relax -+\batchmode -+\input plain -+ -+\errorstopmode -+\catcode`@=11 -+\newcount\@tempcnta -+\newcount\@tempcntb -+\newcount\@tempcntc -+\mathchardef\LIM=256 -+ -+\def\MYCHAR#1{% -+ \@tempcntc=\numexpr7*#1+"101\relax -+ \@tempcnta=\@tempcntc\divide\@tempcnta 94 -+ \@tempcntb=\numexpr\@tempcntc-94*\@tempcnta+1\relax -+ \ifnum\@tempcntb<0\advance\@tempcntb94 \advance\@tempcnta-1\fi -+ \advance\@tempcnta18 % 18区以降 -+ \CNTA=\kuten\numexpr"100*\@tempcnta+\@tempcntb\relax -+} -+ -+\newcount\CNT\newcount\CNTA -+\CNT=0 -+\loop -+ \MYCHAR\CNT -+ \message{\the\CNT.} -+ \prebreakpenalty\CNTA=\numexpr\CNT+1\relax -+ \advance\CNT1\relax -+ \ifnum\CNT<\LIM -+\repeat -+ -+\newcount\CNTB -+ -+\loop -+ \MYCHAR\CNTB -+ \global\prebreakpenalty\CNTA=0 -+{% -+\CNT=0 -+\loop -+ \MYCHAR\CNT -+ \count@=\numexpr -\CNT-1+\prebreakpenalty\CNTA\relax -+ \ifnum\count@=0\else\ifnum\CNTB=\CNT\else\errmessage{<\the\CNTB, \the\CNT>}\fi\fi -+ \advance\CNT1\relax -+ \ifnum\CNT<\LIM -+\repeat -+} -+ \MYCHAR\CNTB -+ \global\prebreakpenalty\CNTA=\numexpr\CNTB+1\relax -+ \advance\CNTB1\relax -+ \ifnum\CNTB<\LIM -+\repeat -+\bye diff --git a/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch b/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch deleted file mode 100644 index 024ff416af..0000000000 --- a/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch +++ /dev/null @@ -1,293 +0,0 @@ -Fix LuaTeX compatibility with Poppler 0.75. - -Upstream LuaTeX have moved from Poppler to "pplib" and thus upstream -fixes are unavailable. This is based on Archs patch, with minor -tweaks to comply with texlive-bin-CVE-2018-17407.patch. -https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/texlive-bin&id=418dd6f008c3d41a461353fdb60f2d73d87c58ed - -diff --git a/texk/web2c/luatexdir/image/pdftoepdf.w b/texk/web2c/luatexdir/image/pdftoepdf.w ---- a/texk/web2c/luatexdir/image/pdftoepdf.w -+++ b/texk/web2c/luatexdir/image/pdftoepdf.w -@@ -363,7 +363,7 @@ void copyReal(PDF pdf, double d) - - static void copyString(PDF pdf, GooString * string) - { -- char *p; -+ const char *p; - unsigned char c; - size_t i, l; - p = string->getCString(); -@@ -393,7 +393,7 @@ static void copyString(PDF pdf, GooString * string) - pdf->cave = true; - } - --static void copyName(PDF pdf, char *s) -+static void copyName(PDF pdf, const char *s) - { - pdf_out(pdf, '/'); - for (; *s != 0; s++) { -@@ -412,7 +412,7 @@ static void copyArray(PDF pdf, PdfDocument * pdf_doc, Array * array) - Object obj1; - pdf_begin_array(pdf); - for (i = 0, l = array->getLength(); i < l; ++i) { -- obj1 = array->getNF(i); -+ obj1 = array->getNF(i).copy(); - copyObject(pdf, pdf_doc, &obj1); - } - pdf_end_array(pdf); -@@ -425,7 +425,7 @@ static void copyDict(PDF pdf, PdfDocument * pdf_doc, Dict * dict) - pdf_begin_dict(pdf); - for (i = 0, l = dict->getLength(); i < l; ++i) { - copyName(pdf, dict->getKey(i)); -- obj1 = dict->getValNF(i); -+ obj1 = dict->getValNF(i).copy(); - copyObject(pdf, pdf_doc, &obj1); - } - pdf_end_dict(pdf); -@@ -475,7 +475,7 @@ static void copyObject(PDF pdf, PdfDocument * pdf_doc, Object * obj) - copyString(pdf, (GooString *)obj->getString()); - break; - case objName: -- copyName(pdf, (char *)obj->getName()); -+ copyName(pdf, obj->getName()); - break; - case objNull: - pdf_add_null(pdf); -@@ -531,22 +531,22 @@ static PDFRectangle *get_pagebox(Page * page, int pagebox_spec) - { - switch (pagebox_spec) { - case PDF_BOX_SPEC_MEDIA: -- return page->getMediaBox(); -+ return (PDFRectangle *) page->getMediaBox(); - break; - case PDF_BOX_SPEC_CROP: -- return page->getCropBox(); -+ return (PDFRectangle *) page->getCropBox(); - break; - case PDF_BOX_SPEC_BLEED: -- return page->getBleedBox(); -+ return (PDFRectangle *) page->getBleedBox(); - break; - case PDF_BOX_SPEC_TRIM: -- return page->getTrimBox(); -+ return (PDFRectangle *) page->getTrimBox(); - break; - case PDF_BOX_SPEC_ART: -- return page->getArtBox(); -+ return (PDFRectangle *) page->getArtBox(); - break; - default: -- return page->getMediaBox(); -+ return (PDFRectangle *) page->getMediaBox(); - break; - } - } -@@ -788,12 +788,12 @@ void write_epdf(PDF pdf, image_dict * idict, int suppress_optional_info) - Now all relevant parts of the Page dictionary are copied. Metadata validity - check is needed(as a stream it must be indirect). - */ -- obj1 = pageDict->lookupNF("Metadata"); -+ obj1 = pageDict->lookupNF("Metadata").copy(); - if (!obj1.isNull() && !obj1.isRef()) - formatted_warning("pdf inclusion","/Metadata must be indirect object"); - /* copy selected items in Page dictionary */ - for (i = 0; pagedictkeys[i] != NULL; i++) { -- obj1 = pageDict->lookupNF(pagedictkeys[i]); -+ obj1 = pageDict->lookupNF(pagedictkeys[i]).copy(); - if (!obj1.isNull()) { - pdf_add_name(pdf, pagedictkeys[i]); - /* preserves indirection */ -@@ -806,13 +806,13 @@ void write_epdf(PDF pdf, image_dict * idict, int suppress_optional_info) - PDF file, climbing up the tree until the Resources are found. - (This fixes a problem with Scribus 1.3.3.14.) - */ -- obj1 = pageDict->lookupNF("Resources"); -+ obj1 = pageDict->lookupNF("Resources").copy(); - if (obj1.isNull()) { - op1 = &pagesobj1; - op2 = &pagesobj2; - *op1 = pageDict->lookup("Parent"); - while (op1->isDict()) { -- obj1 = op1->dictLookupNF("Resources"); -+ obj1 = op1->dictLookupNF("Resources").copy(); - if (!obj1.isNull()) { - pdf_add_name(pdf, "Resources"); - copyObject(pdf, pdf_doc, &obj1); -diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lepdflib.cc ---- a/texk/web2c/luatexdir/lua/lepdflib.cc -+++ b/texk/web2c/luatexdir/lua/lepdflib.cc -@@ -240,7 +240,7 @@ static int l_new_Attribute(lua_State * L) - if (uobj->pd != NULL && uobj->pd->pc != uobj->pc) - pdfdoc_changed_error(L); - uout = new_Attribute_userdata(L); -- uout->d = new Attribute(n, nlen, (Object *)uobj->d); -+ uout->d = new Attribute((GooString)n, (Object *)uobj->d); - uout->atype = ALLOC_LEPDF; - uout->pc = uobj->pc; - uout->pd = uobj->pd; -@@ -496,7 +496,7 @@ static int l_new_Object(lua_State * L) - double numA = lua_tonumber(L,1); - double genA = lua_tonumber(L,2); - if ( ((numA)==(int)(numA)) && ((genA)==(int)(genA)) ){ -- uout->d = new Object((int)(numA), (int)(genA)); -+ uout->d = new Object({(int)(numA), (int)(genA)}); - uout->atype = ALLOC_LEPDF; - uout->pc = 0; - uout->pd = NULL; -@@ -596,7 +596,7 @@ static int m_##in##_##function(lua_State * L) \ - uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \ - if (uin->pd != NULL && uin->pd->pc != uin->pc) \ - pdfdoc_changed_error(L); \ -- o = ((in *) uin->d)->function(); \ -+ o = (out *) ((in *) uin->d)->function(); \ - if (o != NULL) { \ - uout = new_##out##_userdata(L); \ - uout->d = o; \ -@@ -889,7 +889,7 @@ static int m_Array_getNF(lua_State * L) - if (i > 0 && i <= len) { - uout = new_Object_userdata(L); - uout->d = new Object(); -- *((Object *) uout->d) = ((Array *) uin->d)->getNF(i - 1); -+ *((Object *) uout->d) = ((Array *) uin->d)->getNF(i - 1).copy(); - uout->atype = ALLOC_LEPDF; - uout->pc = uin->pc; - uout->pd = uin->pd; -@@ -1125,12 +1125,12 @@ m_poppler_get_INT(Dict, getLength); - - static int m_Dict_add(lua_State * L) - { -- char *s; -+ const char *s; - udstruct *uin, *uobj; - uin = (udstruct *) luaL_checkudata(L, 1, M_Dict); - if (uin->pd != NULL && uin->pd->pc != uin->pc) - pdfdoc_changed_error(L); -- s = copyString(luaL_checkstring(L, 2)); -+ s = luaL_checkstring(L, 2); - uobj = (udstruct *) luaL_checkudata(L, 3, M_Object); - ((Dict *) uin->d)->add(s, std::move(*((Object *) uobj->d))); - return 0; -@@ -1190,7 +1190,7 @@ static int m_Dict_lookupNF(lua_State * L) - s = luaL_checkstring(L, 2); - uout = new_Object_userdata(L); - uout->d = new Object(); -- *((Object *) uout->d) = ((Dict *) uin->d)->lookupNF(s); -+ *((Object *) uout->d) = ((Dict *) uin->d)->lookupNF(s).copy(); - uout->atype = ALLOC_LEPDF; - uout->pc = uin->pc; - uout->pd = uin->pd; -@@ -1263,7 +1263,7 @@ static int m_Dict_getValNF(lua_State * L) - if (i > 0 && i <= len) { - uout = new_Object_userdata(L); - uout->d = new Object(); -- *((Object *) uout->d) = ((Dict *) uin->d)->getValNF(i - 1); -+ *((Object *) uout->d) = ((Dict *) uin->d)->getValNF(i - 1).copy(); - uout->atype = ALLOC_LEPDF; - uout->pc = uin->pc; - uout->pd = uin->pd; -@@ -1653,7 +1653,7 @@ static int m_Object_initRef(lua_State * L) - pdfdoc_changed_error(L); - num = luaL_checkint(L, 2); - gen = luaL_checkint(L, 3); -- *((Object *) uin->d) = Object(num, gen); -+ *((Object *) uin->d) = Object({num, gen}); - return 0; - } - -@@ -2011,7 +2011,7 @@ static int m_Object_arrayGetNF(lua_State * L) - if (i > 0 && i <= len) { - uout = new_Object_userdata(L); - uout->d = new Object(); -- *((Object *) uout->d) = ((Object *) uin->d)->arrayGetNF(i - 1); -+ *((Object *) uout->d) = ((Object *) uin->d)->arrayGetNF(i - 1).copy(); - uout->atype = ALLOC_LEPDF; - uout->pc = uin->pc; - uout->pd = uin->pd; -@@ -2051,7 +2051,7 @@ static int m_Object_dictAdd(lua_State * L) - pdfdoc_changed_error(L); - if (!((Object *) uin->d)->isDict()) - luaL_error(L, "Object is not a Dict"); -- ((Object *) uin->d)->dictAdd(copyString(s), std::move(*((Object *) uobj->d))); -+ ((Object *) uin->d)->dictAdd(s, std::move(*((Object *) uobj->d))); - return 0; - } - -@@ -2104,7 +2104,7 @@ static int m_Object_dictLookupNF(lua_State * L) - if (((Object *) uin->d)->isDict()) { - uout = new_Object_userdata(L); - uout->d = new Object(); -- *((Object *) uout->d) = ((Object *) uin->d)->dictLookupNF(s); -+ *((Object *) uout->d) = ((Object *) uin->d)->dictLookupNF(s).copy(); - uout->atype = ALLOC_LEPDF; - uout->pc = uin->pc; - uout->pd = uin->pd; -@@ -2169,7 +2169,7 @@ static int m_Object_dictGetValNF(lua_State * L) - if (i > 0 && i <= len) { - uout = new_Object_userdata(L); - uout->d = new Object(); -- *((Object *) uout->d) = ((Object *) uin->d)->dictGetValNF(i - 1); -+ *((Object *) uout->d) = ((Object *) uin->d)->dictGetValNF(i - 1).copy(); - uout->atype = ALLOC_LEPDF; - uout->pc = uin->pc; - uout->pd = uin->pd; -@@ -2470,7 +2470,7 @@ static int m_PDFDoc_getFileName(lua_State * L) - uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc); - if (uin->pd != NULL && uin->pd->pc != uin->pc) - pdfdoc_changed_error(L); -- gs = ((PdfDocument *) uin->d)->doc->getFileName(); -+ gs = (GooString *) ((PdfDocument *) uin->d)->doc->getFileName(); - if (gs != NULL) - lua_pushlstring(L, gs->getCString(), gs->getLength()); - else -@@ -2559,7 +2559,7 @@ static int m_PDFDoc_readMetadata(lua_State * L) - if (uin->pd != NULL && uin->pd->pc != uin->pc) - pdfdoc_changed_error(L); - if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { -- gs = ((PdfDocument *) uin->d)->doc->readMetadata(); -+ gs = (GooString *) ((PdfDocument *) uin->d)->doc->readMetadata(); - if (gs != NULL) - lua_pushlstring(L, gs->getCString(), gs->getLength()); - else -@@ -2577,7 +2577,7 @@ static int m_PDFDoc_getStructTreeRoot(lua_State * L) - if (uin->pd != NULL && uin->pd->pc != uin->pc) - pdfdoc_changed_error(L); - if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { -- obj = ((PdfDocument *) uin->d)->doc->getStructTreeRoot(); -+ obj = (StructTreeRoot *) ((PdfDocument *) uin->d)->doc->getStructTreeRoot(); - uout = new_StructTreeRoot_userdata(L); - uout->d = obj; - uout->pc = uin->pc; ---- texlive-source/texk/web2c/luatexdir/lua/lepdflib.cc.orig 2019-04-24 09:41:05.090522664 +0000 -+++ texlive-source/texk/web2c/luatexdir/lua/lepdflib.cc 2019-04-24 09:43:37.119184926 +0000 -@@ -994,7 +994,8 @@ - pdfdoc_changed_error(L); - num = luaL_checkint(L, 2); - gen = luaL_checkint(L, 3); -- i = ((Catalog *) uin->d)->findPage(num, gen); -+ Ref numgen = {num, gen}; -+ i = ((Catalog *) uin->d)->findPage(numgen); - if (i > 0) - lua_pushinteger(L, i); - else -@@ -2596,8 +2597,9 @@ - pdfdoc_changed_error(L); - num = luaL_checkint(L, 2); - gen = luaL_checkint(L, 3); -+ Ref numgen = {num, gen}; - if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) { -- i = ((PdfDocument *) uin->d)->doc->findPage(num, gen); -+ i = ((PdfDocument *) uin->d)->doc->findPage(numgen); - if (i > 0) - lua_pushinteger(L, i); - else ---- texlive-source/texk/web2c/luatexdir/image/pdftoepdf.w.orig 2019-04-24 09:56:38.406498975 +0000 -+++ texlive-source/texk/web2c/luatexdir/image/pdftoepdf.w 2019-04-24 09:56:57.020081327 +0000 -@@ -630,7 +630,7 @@ - if (link == NULL || !link->isOk()) - formatted_error("pdf inclusion","invalid destination '%s'",img_pagename(idict)); - Ref ref = link->getPageRef(); -- img_pagenum(idict) = catalog->findPage(ref.num, ref.gen); -+ img_pagenum(idict) = catalog->findPage(ref); - if (img_pagenum(idict) == 0) - formatted_error("pdf inclusion","destination is not a page '%s'",img_pagename(idict)); - delete link; diff --git a/gnu/packages/patches/texlive-bin-poppler-0.83.patch b/gnu/packages/patches/texlive-bin-poppler-0.83.patch new file mode 100644 index 0000000000..5e57e3efac --- /dev/null +++ b/gnu/packages/patches/texlive-bin-poppler-0.83.patch @@ -0,0 +1,52 @@ +Fix build with Poppler 0.83 and later. + +Taken from Arch Linux, but adjusted to patch the versioned Poppler +files, as upstream applies it after copying them in place. +https://git.archlinux.org/svntogit/packages.git/tree/trunk/texlive-poppler-0.83.patch?h=packages/texlive-bin + +diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc +--- texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc ++++ texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc +@@ -723,7 +723,7 @@ + #endif + // initialize + if (!isInit) { +- globalParams = new GlobalParams(); ++ globalParams.reset(new GlobalParams()); + globalParams->setErrQuiet(false); + isInit = true; + } +@@ -1108,6 +1108,5 @@ + delete_document(p); + } + // see above for globalParams +- delete globalParams; + } + } +diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc +--- texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc ++++ texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc +@@ -79,7 +79,7 @@ + exit(1); + } + fileName = new GString(argv[1]); +- globalParams = new GlobalParams(); ++ globalParams.reset(new GlobalParams()); + doc = new PDFDoc(fileName); + if (!doc->isOk()) { + fprintf(stderr, "Invalid PDF file\n"); +@@ -100,7 +100,7 @@ + if (objnum == 0) { + srcStream = catalogDict.dictLookup("SourceObject"); + static char const_SourceFile[] = "SourceFile"; +- if (!srcStream.isStream(const_SourceFile)) { ++ if (!srcStream.isDict(const_SourceFile)) { + fprintf(stderr, "No SourceObject found\n"); + exit(1); + } +@@ -202,5 +202,4 @@ + fprintf(stderr, "Cross-reference table extracted to %s\n", outname); + fclose(outfile); + delete doc; +- delete globalParams; + } diff --git a/gnu/packages/patches/texlive-bin-poppler-0.86.patch b/gnu/packages/patches/texlive-bin-poppler-0.86.patch new file mode 100644 index 0000000000..b1adca657b --- /dev/null +++ b/gnu/packages/patches/texlive-bin-poppler-0.86.patch @@ -0,0 +1,17 @@ +Fix build with Poppler 0.86 and later. + +Taken from Arch Linux, but adjusted to patch the versioned Poppler +files, as upstream applies it after copying them in place. +https://git.archlinux.org/svntogit/packages.git/tree/trunk/texlive-poppler-0.86.patch?h=packages/texlive-bin + +--- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc 2020-03-03 21:11:35.102711802 +0000 ++++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc 2020-03-03 21:13:13.057420111 +0000 +@@ -757,7 +757,7 @@ + if (page_name) { + // get page by name + GString name(page_name); +- LinkDest *link = pdf_doc->doc->findDest(&name); ++ LinkDest *link = pdf_doc->doc->findDest(&name).get(); + if (link == 0 || !link->isOk()) + pdftex_fail("PDF inclusion: invalid destination <%s>", page_name); + Ref ref = link->getPageRef(); diff --git a/gnu/packages/patches/vigra-python-compat.patch b/gnu/packages/patches/vigra-python-compat.patch new file mode 100644 index 0000000000..63c6abb326 --- /dev/null +++ b/gnu/packages/patches/vigra-python-compat.patch @@ -0,0 +1,18 @@ +Fix build with Boost + Python 3.7. + +Taken from upstream: +https://github.com/ukoethe/vigra/commit/a6fa62663c6a6b752ed0707e95f643e25867a0f9 + +diff --git a/vigranumpy/src/core/vigranumpycore.cxx b/vigranumpy/src/core/vigranumpycore.cxx +index ec38d3636..c81c6ae52 100644 +--- a/vigranumpy/src/core/vigranumpycore.cxx ++++ b/vigranumpy/src/core/vigranumpycore.cxx +@@ -61,7 +61,7 @@ UInt32 pychecksum(python::str const & s) + return checksum(data, size); + #else + Py_ssize_t size = 0; +- char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size); ++ const char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size); + return checksum(data, size); + #endif + } diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm index dbec76715d..c992988437 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm @@ -2,6 +2,8 @@ ;;; Copyright © 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,9 +24,12 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages hurd) #:use-module (gnu packages linux) #:use-module (gnu packages base)) @@ -37,17 +42,32 @@ (uri (string-append "mirror://kernel.org/software/utils/pciutils/pciutils-" version ".tar.xz")) + (patches (search-patches "pciutils-hurd-configure.patch")) (sha256 (base32 "0mb0f2phdcmp4kfiqsszn2k6nlln0w160ffzrjjv4bbfjwrgfzzn")))) (build-system gnu-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs #:allow-other-keys) ;; There's no 'configure' script, just a raw makefile. (substitute* "Makefile" + ,@(if (%current-target-system) + `((("^CROSS_COMPILE=.*$") + (string-append "CROSS_COMPILE=" + ,(%current-target-system) "-" + "\n")) + (("^HOST=.*$") + (string-append "HOST=" + ,(gnu-triplet->nix-system + (%current-target-system)) "\n")) + ;; Disable 'install' strip option, that would fail when + ;; we are cross-compiling. + (("^STRIP=.*$") + "STRIP=\n")) + '()) (("^PREFIX=.*$") (string-append "PREFIX := " (assoc-ref outputs "out") "\n")) @@ -84,7 +104,11 @@ `(("which" ,which) ("pkg-config" ,pkg-config))) (inputs - `(("kmod" ,kmod) + `(,@(if (member (or (%current-target-system) + (%current-system)) + (package-supported-systems kmod)) + `(("kmod" ,kmod)) + '()) ("zlib" ,zlib))) (home-page "https://mj.ucw.cz/sw/pciutils/") (synopsis "Programs for inspecting and manipulating PCI devices") diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm index ea45a3d06b..ce2a6e91db 100644 --- a/gnu/packages/pcre.scm +++ b/gnu/packages/pcre.scm @@ -35,7 +35,7 @@ (define-public pcre (package (name "pcre") - (version "8.43") + (version "8.44") (source (origin (method url-fetch) (uri (list @@ -46,7 +46,7 @@ version "/pcre-" version ".tar.bz2"))) (sha256 (base32 - "0sxg1wlknq05ryq63h21cchjmcjkin9lmnqsmhs3h08301965rwi")))) + "0v9nk51wh55pcbnf2jr36yarz8ayajn6d7ywiq2wagivn9c8c40r")))) (build-system gnu-build-system) (outputs '("out" ;library & headers "bin" ;depends on Readline (adds 20MiB to the closure) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 71b8177582..de94b7c951 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -168,14 +168,14 @@ please install the @code{flyer-composer-gui} package."))) (define-public poppler (package (name "poppler") - (version "0.79.0") + (version "0.86.1") (source (origin (method url-fetch) (uri (string-append "https://poppler.freedesktop.org/poppler-" version ".tar.xz")) (sha256 (base32 - "1j18jlv1q6h21azb939gqjsgcbsh5qcd8dwxdmad54p5ixha91gr")))) + "0v3z4mk1rr8i0c4cfkab7pnxdbil30j4cm4w6cqlq6cfghkhlqxg")))) (build-system cmake-build-system) ;; FIXME: ;; use libcurl: no @@ -512,7 +512,7 @@ using the DjVuLibre library.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("jbig2dec" ,jbig2dec) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("mujs" ,mujs) ("mupdf" ,mupdf) ("openjpeg" ,openjpeg) @@ -652,7 +652,7 @@ interaction.") `(("cppunit" ,cppunit) ("pkg-config" ,pkg-config))) (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("fontconfig" ,fontconfig) ("freetype" ,freetype) @@ -711,7 +711,7 @@ extracting content or merging files.") ("freetype" ,freetype) ("harfbuzz" ,harfbuzz) ("jbig2dec" ,jbig2dec) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libx11" ,libx11) ("libxext" ,libxext) ("mujs" ,mujs) @@ -1032,7 +1032,7 @@ the PDF pages.") #:tests? #f #:make-flags (list "CC=gcc" (string-append "prefix=" (assoc-ref %outputs "out"))))) - (inputs `(("libjpeg" ,libjpeg) + (inputs `(("libjpeg" ,libjpeg-turbo) ("curl" ,curl) ("libtiff" ,libtiff) ("libudev" ,eudev) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 7c9a1d37ca..a47cc6b254 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2016 Alex Sassmannshausen <alex@pompo.co> ;;; Copyright © 2016, 2018, 2020 Roel Janssen <roel@gnu.org> ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> -;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> +;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2017 Raoul J.P. Bonnal <ilpuccio.febo@gmail.com> ;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com> @@ -22,6 +22,7 @@ ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz> ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net> ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2019 Stephen J. Scheck <sscheck@cpan.org> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com> ;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com> @@ -47,14 +48,17 @@ #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gd) + #:use-module (gnu packages hurd) #:use-module (gnu packages less) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl-check) @@ -74,14 +78,14 @@ ;; Yeah, Perl... It is required early in the bootstrap process by Linux. (package (name "perl") - (version "5.30.0") + (version "5.30.2") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/src/5.0/perl-" version ".tar.gz")) (sha256 (base32 - "1wkmz6xn3fswpqhz29akiklcxclnlykhp96a8bqcz36rak3i64l5")) + "128nfdxcvxfn5kq55qcfrx2851ys8hv794dcdxbyny8rm7w7vnv6")) (patches (search-patches "perl-no-sys-dirs.patch" "perl-autosplit-default-time.patch" @@ -89,7 +93,7 @@ "perl-reproducible-build-date.patch")))) (build-system gnu-build-system) (arguments - '(#:tests? #f + `(#:tests? #f #:configure-flags (let ((out (assoc-ref %outputs "out")) (libc (assoc-ref %build-inputs "libc"))) @@ -109,6 +113,8 @@ (add-before 'configure 'setup-configure (lambda _ ;; Use the right path for `pwd'. + ;; TODO: use coreutils from INPUTS instead of 'which' + ;; in next rebuild cycle, see fixup below. (substitute* "dist/PathTools/Cwd.pm" (("/bin/pwd") (which "pwd"))) @@ -119,26 +125,86 @@ (("-std=c89") "-std=gnu89")) #t)) - (replace 'configure - (lambda* (#:key configure-flags #:allow-other-keys) - (format #t "Perl configure flags: ~s~%" configure-flags) - (apply invoke "./Configure" configure-flags))) - (add-before - 'strip 'make-shared-objects-writable - (lambda* (#:key outputs #:allow-other-keys) - ;; The 'lib/perl5' directory contains ~50 MiB of .so. Make them - ;; writable so that 'strip' actually strips them. - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - (for-each (lambda (dso) - (chmod dso #o755)) - (find-files lib "\\.so$")) - #t))) - + ,@(if (%current-target-system) + `((add-after 'unpack 'unpack-cross + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (let ((cross-checkout + (assoc-ref native-inputs "perl-cross")) + (cross-patch + (assoc-ref native-inputs "perl-cross-patch"))) + (rename-file "Artistic" "Artistic.perl") + (rename-file "Copying" "Copying.perl") + (copy-recursively cross-checkout ".") + (format #t "Applying ~a\n" cross-patch) + (invoke "patch" "-p1" "-i" cross-patch)) + (let ((bash (assoc-ref inputs "bash"))) + (substitute* '("Makefile.config.SH" + "cnf/config.guess" + "cnf/config.sub" + "cnf/configure" + "cnf/configure_misc.sh" + "miniperl_top") + (("! */bin/sh") (string-append "! " bash "/bin/bash")) + ((" /bin/sh") (string-append bash "/bin/bash"))) + (substitute* '("ext/Errno/Errno_pm.PL") + (("\\$cpp < errno.c") "$Config{cc} -E errno.c"))) + #t)) + (replace 'configure + (lambda* (#:key configure-flags outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (store-directory (%store-directory)) + (configure-flags + (cons* + ;; `perl-cross' confuses target and host + (string-append "--target=" ,(%current-target-system)) + (string-append "--prefix=" out) + (string-append "-Dcc=" ,(%current-target-system) "-gcc") + "-Dbyteorder=1234" + (filter (negate + (lambda (x) (or (string-prefix? "-d" x) + (string-prefix? "-Dcc=" x)))) + configure-flags))) + (bash (assoc-ref inputs "bash")) + (coreutils (assoc-ref inputs "coreutils"))) + (format (current-error-port) + "running ./configure ~a\n" (string-join configure-flags)) + (apply invoke (cons "./configure" configure-flags)) + (substitute* "config.sh" + (((string-append store-directory "/[^/]*-bash-[^/]*")) + bash)) + (substitute* '("config.h") + (("^#define SH_PATH .*") + (string-append "#define SH_PATH \"" bash "/bin/bash\"\n"))) + ;;TODO: fix this in setup-configure next rebuild cycle + (substitute* "dist/PathTools/Cwd.pm" + (((string-append store-directory "/[^/]*-coreutils-[^/]*")) + coreutils)) + #t))) + (add-after 'build 'touch-non-built-files-for-install + (lambda _ + ;; `make install' wants to install these although they do + ;; not get built... + (with-directory-excursion "cpan" + (mkdir-p "Pod-Usage/blib/script") + (mkdir-p "Pod-Parser/blib/script") + (for-each (lambda (file) + (call-with-output-file file + (lambda (port) (display "" port)))) + '("Pod-Usage/blib/script/pod2text" + "Pod-Usage/blib/script/pod2usage" + "Pod-Checker/blib/script/podchecker" + "Pod-Parser/blib/script/podselect"))) + #t))) + `((replace 'configure + (lambda* (#:key configure-flags #:allow-other-keys) + (format #t "Perl configure flags: ~s~%" configure-flags) + (apply invoke "./Configure" configure-flags))))) (add-after 'install 'remove-extra-references (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (libc (assoc-ref inputs "libc")) + (libc (assoc-ref inputs + ,(if (%current-target-system) + "cross-libc" "libc"))) (config1 (car (find-files (string-append out "/lib/perl5") "^Config_heavy\\.pl$"))) (config2 (find-files (string-append out "/lib/perl5") @@ -161,6 +227,24 @@ "/lib',\n")))) config2) #t)))))) + (inputs + (if (%current-target-system) + `(("bash" ,bash-minimal) + ("coreutils" ,coreutils)) + '())) + (native-inputs + (if (%current-target-system) + `(("perl-cross" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/arsv/perl-cross") + (commit "1.3.3"))) + (file-name (git-file-name "perl-cross" "1.3.3")) + (sha256 + (base32 "065qbl1x44maykaj8p8za0b6qxj74bz7fi2zsrlydir1mqb1js3d")))) + ("perl-cross-patch" ,@(search-patches "perl-cross.patch"))) + '())) (native-search-paths (list (search-path-specification (variable "PERL5LIB") (files '("lib/perl5/site_perl"))))) diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm index ef46c00385..04e37a3b85 100644 --- a/gnu/packages/perl6.scm +++ b/gnu/packages/perl6.scm @@ -74,10 +74,9 @@ ;; These should be inputs but moar.h can't find them when building rakudo (propagated-inputs `(("libatomic-ops" ,libatomic-ops) + ("libffi" ,libffi) ("libtommath" ,libtommath-1.0) ("libuv" ,libuv))) - (inputs - `(("libffi" ,libffi))) (native-inputs `(("pkg-config" ,pkg-config))) (synopsis "VM for NQP And Rakudo Perl 6") diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm index 1e9fab6ef3..59947964a3 100644 --- a/gnu/packages/photo.scm +++ b/gnu/packages/photo.scm @@ -177,7 +177,7 @@ cards and generate meaningful file and folder names.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs - `(("libjpeg" ,libjpeg))) ;for lossy DNGs and old Kodak cameras + `(("libjpeg" ,libjpeg-turbo))) ;for lossy DNGs and old Kodak cameras (propagated-inputs `(("lcms" ,lcms))) ;for color profiles (home-page "https://www.libraw.org") @@ -354,7 +354,7 @@ and a wide variety of other metadata.") "1a4m3plmfcrrplqs9zfzhc5apibn10m5sajpizm1sd3q74w5fwq3")))) (build-system cmake-build-system) (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("zlib" ,zlib))) @@ -396,7 +396,7 @@ overlapping images, as well as some command line tools.") `(("boost" ,boost) ("gsl" ,gsl) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("openexr" ,openexr) @@ -494,7 +494,7 @@ photographic equipment.") ("pugixml" ,pugixml) ("gtk+" ,gtk+) ("sqlite" ,sqlite) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("cairo" ,cairo) ("lcms" ,lcms) @@ -547,7 +547,7 @@ and enhance them.") ("freeglut" ,freeglut) ("glew" ,glew) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpano13" ,libpano13) ("libpng" ,libpng) ("libtiff" ,libtiff) @@ -632,7 +632,7 @@ a complete panorama and stitch any series of overlapping pictures.") ("lensfun" ,lensfun) ("libcanberra" ,libcanberra) ("libiptcdata" ,libiptcdata) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("librsvg" ,librsvg) ("libsigc++" ,libsigc++) diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm index 438e9fca83..a461a2b9dc 100644 --- a/gnu/packages/php.scm +++ b/gnu/packages/php.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019 Oleg Pykhalov <go.wigust@gmail.com> +;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -210,6 +211,13 @@ "ext/standard/tests/strings/setlocale_basic2.phpt" "ext/standard/tests/strings/setlocale_basic3.phpt" "ext/standard/tests/strings/setlocale_variation1.phpt" + ;; This failing test is skipped on PHP's Travis CI as it is + ;; supposedly inaccurate. + "ext/standard/tests/file/disk_free_space_basic.phpt" + ;; The following test erroneously expect the link + ;; count of a sub-directory to increase compared to + ;; its parent. + "ext/standard/tests/file/lstat_stat_variation8.phpt" ;; XXX: These gd tests fails. Likely because our version ;; is different from the (patched) bundled one. @@ -224,6 +232,21 @@ ;; This bug should have been fixed in gd 2.2.2. ;; Is it a regression? "ext/gd/tests/bug65148.phpt" + ;; This bug should have been fixed in the gd 2.2 + ;; series. Perhaps a regression introduced by gd + ;; 2.3.0? + "ext/gd/tests/bug66590.phpt" + ;; This bug should have been fixed in the php-5.5 + ;; series. Perhaps a regression introduced by gd + ;; 2.3.0? + "ext/gd/tests/bug70102.phpt" + ;; This bug should have been fixed in the php-5.6 + ;; series. Perhaps a regression introduced by gd + ;; 2.3.0? + "ext/gd/tests/bug73869.phpt" + ;; Some WebP related tests fail. + "ext/gd/tests/webp_basic.phpt" + "ext/gd/tests/imagecreatefromstring_webp.phpt" ;; Expected error message, but from the wrong function "ext/gd/tests/bug77269.phpt" ;; TODO: Enable these when libgd is built with xpm support. @@ -237,8 +260,11 @@ ;; complete. It's a warning in both cases and test ;; result is the same. "ext/gd/tests/bug77973.phpt" - ;; New test failures added with 7.4.3 + ;; Test expects uninitialized value to be false, but + ;; instead gets "resource(5) of type (gd)". "ext/gd/tests/bug79067.phpt" + ;; The following test fails with "The image size + ;; differs: expected 114x115, got 117x117". "ext/gd/tests/bug79068.phpt" ;; XXX: These iconv tests have the expected outcome, diff --git a/gnu/packages/pkg-config.scm b/gnu/packages/pkg-config.scm index c3bc3025a3..9c632532be 100644 --- a/gnu/packages/pkg-config.scm +++ b/gnu/packages/pkg-config.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,7 +50,17 @@ (base32 "14fmwzki1rlz8bs2p810lk6jqdxsk966d8drgsjmi54cd00rrikg")))) (build-system gnu-build-system) - (arguments `(#:configure-flags '("--with-internal-glib"))) + (arguments + `(#:configure-flags + '("--with-internal-glib" + ;; Those variables are guessed incorrectly when cross-compiling. + ;; See: https://developer.gimp.org/api/2.0/glib/glib-cross-compiling.html. + ,@(if (%current-target-system) + '("glib_cv_stack_grows=no" + "glib_cv_uscore=no" + "ac_cv_func_posix_getpwuid_r=yes" + "ac_cv_func_posix_getgrgid_r=yes") + '())))) (native-search-paths (list (search-path-specification (variable "PKG_CONFIG_PATH") diff --git a/gnu/packages/plotutils.scm b/gnu/packages/plotutils.scm index 09fe2cb36e..a1e32eb398 100644 --- a/gnu/packages/plotutils.scm +++ b/gnu/packages/plotutils.scm @@ -112,7 +112,7 @@ scientific data.") #t)))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) - (inputs `(("guile" ,guile-2.2))) + (inputs `(("guile" ,guile-3.0))) (propagated-inputs `(("guile-cairo" ,guile-cairo))) (home-page "http://wingolog.org/software/guile-charting/") (synopsis "Create charts and graphs in Guile") @@ -121,12 +121,15 @@ scientific data.") using the Cairo drawing library.") (license license:lgpl2.1+))) -(define-public guile3.0-charting +(define-public guile2.2-charting (package (inherit guile-charting) - (name "guile3.0-charting") - (inputs `(("guile" ,guile-3.0))) - (propagated-inputs `(("guile-cairo" ,guile3.0-cairo))))) + (name "guile2.2-charting") + (inputs `(("guile" ,guile-2.2))) + (propagated-inputs `(("guile-cairo" ,guile2.2-cairo))))) + +(define-public guile3.0-charting + (deprecated-package "guile3.0-charting" guile-charting)) (define-public ploticus (package diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index 00b471fb6a..bf992f6bd6 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -137,7 +137,7 @@ manner. It also features an interactive interpreter.") ("texinfo" ,texinfo) ("libarchive" ,libarchive) ("libunwind" ,libunwind) - ("libjpeg", libjpeg) + ("libjpeg", libjpeg-turbo) ("libxft" ,libxft) ("fontconfig" ,fontconfig) ("perl" ,perl) diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index a1500392fc..b4a8d981a2 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com> ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Amin Bandali <bandali@gnu.org> ;;; ;;; This file is part of GNU Guix. @@ -30,6 +31,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix utils) #:use-module ((guix licenses) #:prefix l:) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) @@ -43,12 +45,14 @@ #:use-module (gnu packages check) #:use-module (gnu packages dbm) #:use-module (gnu packages glib) + #:use-module (gnu packages gettext) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages libcanberra) #:use-module (gnu packages web) #:use-module (gnu packages linux) #:use-module (gnu packages m4) + #:use-module (gnu packages perl) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) @@ -108,10 +112,28 @@ for reading and writing new sound file formats.") "1ha46i0nbibq0pl0pjwcqiyny4hj8lp1bnl4dpxm64zjw9lb2zha")))) (build-system gnu-build-system) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("automake" ,automake))) ;For up to date 'config.guess' and 'config.sub'. (propagated-inputs `(("libsndfile" ,libsndfile) ("fftw" ,fftw))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-configure + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.sub and config.guess: + (with-directory-excursion "Cfg" + (for-each (lambda (file) + (install-file (string-append + (assoc-ref + (or native-inputs inputs) "automake") + "/share/automake-" + ,(version-major+minor + (package-version automake)) + "/" file) ".")) + '("config.sub" "config.guess"))) + #t))))) (home-page "http://www.mega-nerd.com/SRC/index.html") (synopsis "Audio sample rate conversion library") (description @@ -198,9 +220,11 @@ rates.") ("eudev" ,eudev))) ;for the detection of hardware audio devices (native-inputs `(("check" ,check) + ("gettext" ,gettext-minimal) ("glib:bin" ,glib "bin") - ("intltool" ,intltool) ("m4" ,m4) + ("perl" ,perl) + ("perl-xml-parser" ,perl-xml-parser) ("pkg-config" ,pkg-config))) (propagated-inputs ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them. diff --git a/gnu/packages/python-compression.scm b/gnu/packages/python-compression.scm index 7a0f3ae6ac..2eb0933116 100644 --- a/gnu/packages/python-compression.scm +++ b/gnu/packages/python-compression.scm @@ -254,6 +254,17 @@ wrapper. It provides a backport of the @code{Path} object.") ("python-unittest2" ,python2-unittest2) ,@(package-native-inputs base)))))) +;; This package is used to bootstrap pytest, via importlib-metadata. +(define-public python2-zipp-bootstrap + (hidden-package + (package/inherit + python2-zipp + (arguments + `(#:tests? #f + ,@(package-arguments python2-zipp))) + (native-inputs + `(("python-setuptools-scm" ,python2-setuptools-scm)))))) + (define-public python-zstandard (package (name "python-zstandard") diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 80160301dd..eb57f2bbd9 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -280,7 +280,8 @@ making them easy to handle and incorporate into other protocols.") (origin (method url-fetch) (uri (pypi-uri "pycrypto" version)) - (patches (search-patches "python-pycrypto-CVE-2013-7459.patch")) + (patches (search-patches "python-pycrypto-CVE-2013-7459.patch" + "python-pycrypto-time-clock.patch")) (sha256 (base32 "0g0ayql5b9mkjam8hym6zyg6bv77lbh66rv1fyvgqb17kfc1xkpj")))) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 76a2c57701..56887ef9d4 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net> ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2016, 2017, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Roel Janssen <roel@gnu.org> ;;; Copyright © 2016, 2017, 2020 Julien Lepiller <julien@lepiller.eu> @@ -93,7 +93,6 @@ (base32 "09pkw6f1790prnrq0k8cqgnf1qy57ll8lpmc6kld09q7zw4vi6i5")) (patches (search-patches "python-aiohttp-3.6.2-no-warning-fail.patch")))) - (build-system python-build-system) (arguments '(#:phases @@ -107,6 +106,17 @@ ;; make sure the timestamp of this file is > 1990, because a few ;; tests like test_static_file_if_modified_since_past_date depend on it (invoke "touch" "-d" "2020-01-01" "tests/data.unknown_mime_type") + + ;; FIXME: These tests are failing due to deprecation warnings + ;; in Python 3.8. Remove this when updating to aiohttp >= 3.7. + ;; https://github.com/aio-libs/aiohttp/issues/4477 + ;; https://github.com/aio-libs/aiohttp/issues/4525 + (with-directory-excursion "tests" + (for-each delete-file '("test_client_session.py" + "test_multipart.py" + "test_web_middleware.py" + "test_web_protocol.py" + "test_web_urldispatcher.py"))) #t))))) (propagated-inputs `(("python-aiodns" ,python-aiodns) @@ -2002,14 +2012,16 @@ library.") (lambda _ (delete-file "src/geventhttpclient/tests/test_client.py") #t)) - (delete 'check) - (add-after 'install 'check + (replace 'check (lambda* (#:key inputs outputs #:allow-other-keys) (add-installed-pythonpath inputs outputs) (invoke "py.test" "src/geventhttpclient/tests" "-v" ;; Append the test modules to sys.path to avoid ;; namespace conflict which breaks SSL tests. - "--import-mode=append") + "--import-mode=append" + ;; XXX: Disable test fails with Python 3.8: + ;; https://github.com/gwik/geventhttpclient/issues/119 + "-k" (string-append "not test_cookielib_compatibility")) #t))))) (native-inputs `(("python-pytest" ,python-pytest))) @@ -2192,6 +2204,15 @@ Betamax.") (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda _ + ;; There's a small issue with one test with Python 3.8, this + ;; change has been suggested upstream: + ;; https://github.com/boto/s3transfer/pull/164 + (substitute* "tests/unit/test_s3transfer.py" + (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)") + "futures.Future()")) + #t)) (replace 'check (lambda _ ;; Some of the 'integration' tests require network access or diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 037bc4ed5a..e953dc456a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -67,6 +67,7 @@ ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz> ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org> ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de> +;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com> ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org> @@ -707,7 +708,7 @@ Expressions are constructed from parsed strings or directly in Python.") (propagated-inputs `(("numpy" ,python-numpy))) (inputs `(("hdf4" ,hdf4) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("zlib" ,zlib))) (arguments `(#:phases @@ -1588,14 +1589,14 @@ from the Python interpreter, or as a small part of a larger application.") (define-public python-six (package (name "python-six") - (version "1.12.0") + (version "1.14.0") (source (origin (method url-fetch) (uri (pypi-uri "six" version)) (sha256 (base32 - "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni")))) + "02lw67hprv57hyg3cfy02y3ixjk3nzwc0dx3c4ynlvkfwkfdnsr3")))) (build-system python-build-system) (arguments `(#:phases @@ -1604,8 +1605,7 @@ from the Python interpreter, or as a small part of a larger application.") (lambda _ (invoke "py.test" "-v")))))) (native-inputs - `(("python-py" ,python-py) - ("python-pytest" ,python-pytest-bootstrap))) + `(("python-pytest" ,python-pytest-bootstrap))) (home-page "https://pypi.org/project/six/") (synopsis "Python 2 and 3 compatibility utilities") (description @@ -2187,14 +2187,14 @@ server.") (define-public python-py (package (name "python-py") - (version "1.8.0") + (version "1.8.1") (source (origin (method url-fetch) (uri (pypi-uri "py" version)) (sha256 (base32 - "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw")))) + "1ajjazg3913n0sp3vjyva9c2qh5anx8ziryng935f89604a0h9sy")))) (build-system python-build-system) (arguments ;; FIXME: "ImportError: 'test' module incorrectly imported from @@ -2289,6 +2289,16 @@ from git information. (base32 "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8")))) (build-system python-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + ;; The package works fine with newer Pytest and Hypothesis, but + ;; has pinned older versions to stay compatible with Python 2. + (add-before 'check 'loosen-pytest-requirement + (lambda _ + (substitute* "setup.py" + (("pytest<5") "pytest") + (("hypothesis<5") "hypothesis")) + #t))))) (native-inputs `(("python-hypothesis" ,python-hypothesis) ("python-pytest" ,python-pytest) @@ -2680,10 +2690,20 @@ memory usage and transliteration quality.") (find-files "." "\\.pyc$")) #t)))) (build-system python-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + ;; Mimic upstream commit 3a20892442b34c7 to get + ;; rid of dependency on pytest-runner < 5.0. + ;; Remove substitution for PyJWT > 1.7.1. + (substitute* "setup.py" + ((".*pytest-runner.*") + "")) + (invoke "pytest" "-vv")))))) (native-inputs `(("python-pytest" ,python-pytest) - ("python-pytest-cov" ,python-pytest-cov) - ("python-pytest-runner" ,python-pytest-runner))) + ("python-pytest-cov" ,python-pytest-cov))) (home-page "https://github.com/progrium/pyjwt") (synopsis "JSON Web Token implementation in Python") (description @@ -3975,7 +3995,13 @@ provides additional functionality on the produced Mallard documents.") (setenv "CFLAGS" "-O0") (invoke "python" "runtests.py" "-vv" - "-j" (number->string (parallel-job-count)))))))) + "-j" (number->string (parallel-job-count)) + ;; XXX: On 32-bit architectures, running the parallel tests + ;; fails on many-core systems, see + ;; <https://github.com/cython/cython/issues/2807>. + ,@(if (not (target-64bit?)) + '("-x" "run.parallel") + '()))))))) (home-page "https://cython.org/") (synopsis "C extensions for Python") (description "Cython is an optimising static compiler for both the Python @@ -3995,18 +4021,6 @@ writing C extensions for Python as easy as Python itself.") (substitute-keyword-arguments (package-arguments base) ((#:phases phases) `(modify-phases ,phases - ;; XXX: On i686-linux, running the parallel tests fails on many-core - ;; systems, see <https://github.com/cython/cython/issues/2807>. - ;; TODO: Move this logic to the regular check phase in a future - ;; rebuild cycle. - ,@(if (string-prefix? "i686" (%current-system)) - '((replace 'check - (lambda _ - (setenv "CFLAGS" "-O0") - (invoke "python" "runtests.py" "-vv" - "-j" (number->string (parallel-job-count)) - "-x" "run.parallel")))) - '()) (add-before 'check 'adjust-test_embed (lambda _ (substitute* "runtests.py" @@ -4428,13 +4442,13 @@ library, libgit2 implements Git plumbing.") (define-public python-pyparsing (package (name "python-pyparsing") - (version "2.3.1") + (version "2.4.6") (source (origin (method url-fetch) (uri (pypi-uri "pyparsing" version)) (sha256 - (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6")))) + (base32 "17wn5zlijc9m9zj26gy3f541y7smpj8rfhl51d025c2gm210b0sc")))) (build-system python-build-system) (outputs '("out" "doc")) (arguments @@ -5233,7 +5247,7 @@ the OleFileIO module from PIL, the Python Image Library.") (inputs `(("freetype" ,freetype) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("libwebp" ,libwebp) ("openjpeg" ,openjpeg) @@ -5735,13 +5749,13 @@ child application and control it as if a human were typing commands.") (define-public python-setuptools-scm (package (name "python-setuptools-scm") - (version "3.2.0") + (version "3.4.3") (source (origin (method url-fetch) (uri (pypi-uri "setuptools_scm" version)) (sha256 (base32 - "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj")))) + "083k93wi7mrmp1cn28hcbnr6sivbgls0y7zz2m5qzn1wg04a3f16")))) (build-system python-build-system) (home-page "https://github.com/pypa/setuptools_scm/") (synopsis "Manage Python package versions in SCM metadata") @@ -5751,18 +5765,6 @@ child application and control it as if a human were typing commands.") them as the version argument or in a SCM managed file.") (license license:expat))) -;; Needed by python-lazy-object-proxy, remove on next update cycle. -(define-public python-setuptools-scm-3.3 - (package - (inherit python-setuptools-scm) - (version "3.3.3") - (source (origin - (method url-fetch) - (uri (pypi-uri "setuptools_scm" version)) - (sha256 - (base32 - "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx")))))) - (define-public python2-setuptools-scm (package-with-python2 python-setuptools-scm)) @@ -5801,9 +5803,17 @@ older Python versions.") "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk")))) (build-system python-build-system) (arguments - `(#:python ,python-2)) - (native-inputs - `(("python-wheel" ,python2-wheel))) + `(#:python ,python-2 + #:phases (modify-phases %standard-phases + ;; The build system tests for python-wheel, but it is + ;; not required for Guix nor the test suite. Just drop + ;; it to make bootstrapping pytest easier. + (add-after 'unpack 'drop-wheel-dependency + (lambda _ + (substitute* "setup.cfg" + (("^[[:blank:]]+wheel") + "")) + #t))))) (propagated-inputs `(("python-pathlib2" ,python2-pathlib2) ("python-typing" ,python2-typing))) @@ -5814,21 +5824,33 @@ older Python versions.") for older versions of Python.") (license license:asl2.0))) +;; For importlib-metadata-bootstrap below. +(define-public python2-importlib-resources-bootstrap + (hidden-package + (package/inherit + python2-importlib-resources + (name "python2-importlib-resources-bootstrap") + (propagated-inputs + `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap) + ("python-typing" ,python2-typing)))))) + (define-public python-importlib-metadata (package (name "python-importlib-metadata") - (version "1.4.0") + (version "1.5.0") (source (origin (method url-fetch) (uri (pypi-uri "importlib_metadata" version)) (sha256 - (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i")))) + (base32 + "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86")))) (build-system python-build-system) (propagated-inputs `(("python-zipp" ,python-zipp))) (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm) + ("python-pyfakefs" ,python-pyfakefs) ("python-packaging" ,python-packaging))) (home-page "https://importlib-metadata.readthedocs.io/") (synopsis "Read metadata from Python packages") @@ -5848,6 +5870,10 @@ need to use the older and less efficient @code{pkg_resources} package.") (package/inherit base (name "python2-importlib-metadata") + (native-inputs + `(("python-setuptools-scm" ,python2-setuptools-scm) + ("python-pyfakefs" ,python2-pyfakefs-bootstrap) + ("python-packaging" ,python2-packaging-bootstrap))) (propagated-inputs `(("python-configparser" ,python2-configparser) ("python-contextlib2" ,python2-contextlib2) @@ -5855,6 +5881,22 @@ need to use the older and less efficient @code{pkg_resources} package.") ("python-pathlib2" ,python2-pathlib2) ,@(package-propagated-inputs base)))))) +;; This package is used by python2-pytest, and thus must not depend on it. +(define-public python2-importlib-metadata-bootstrap + (hidden-package + (package/inherit + python2-importlib-metadata + (name "python2-importlib-metadata-bootstrap") + (arguments + `(#:tests? #f + ,@(package-arguments python2-importlib-metadata))) + (propagated-inputs + `(("python-zipp" ,python2-zipp-bootstrap) + ("python-pathlib2" ,python2-pathlib2-bootstrap) + ("python-configparser" ,python2-configparser) + ("python-contextlib2" ,python2-contextlib2-bootstrap) + ("python-importlib-resources" ,python2-importlib-resources-bootstrap)))))) + (define-public python-jaraco-packaging (package (name "python-jaraco-packaging") @@ -7260,6 +7302,8 @@ Python 2 and Python 3.") (modify-phases %standard-phases (replace 'check (lambda _ + (setenv "PYTHONPATH" (string-append "./build/lib:" + (getenv "PYTHONPATH"))) (invoke "py.test" "-v")))))) (native-inputs `(("python2-pytest" ,python2-pytest))) @@ -7476,13 +7520,13 @@ complexity of Python source code.") (define-public python-flake8 (package (name "python-flake8") - (version "3.7.7") + (version "3.7.9") (source (origin (method url-fetch) (uri (pypi-uri "flake8" version)) (sha256 (base32 - "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5")))) + "1yscj6avirm6m12bjh4fn2lfgxaamqsjh9pirdqfi0fcgq8ils25")))) (build-system python-build-system) (arguments `(#:phases @@ -7500,8 +7544,7 @@ complexity of Python source code.") ("python-mccabe" ,python-mccabe))) (native-inputs `(("python-mock" ,python-mock) - ("python-pytest" ,python-pytest-bootstrap) - ("python-pytest-runner" ,python-pytest-runner))) + ("python-pytest" ,python-pytest-bootstrap))) (home-page "https://gitlab.com/pycqa/flake8") (synopsis "The modular source code checker: pep8, pyflakes and co") @@ -7776,13 +7819,13 @@ add functionality and customization to your projects with their own plugins.") (define-public python-fonttools (package (name "python-fonttools") - (version "3.38.0") + (version "4.6.0") (source (origin (method url-fetch) (uri (pypi-uri "fonttools" version ".zip")) (sha256 (base32 - "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh")))) + "1mq9kdzhcsp96bhv7smnrpdg1s4z5wh70bsl99c0jmcrahqdisqq")))) (build-system python-build-system) (native-inputs `(("unzip" ,unzip) @@ -7798,8 +7841,18 @@ also contains a tool called “TTX” which converts TrueType/OpenType fonts to from an XML-based format.") (license license:expat))) +;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here. (define-public python2-fonttools - (package-with-python2 python-fonttools)) + (let ((base (package-with-python2 (strip-python2-variant python-fonttools)))) + (package/inherit + base + (version "3.44.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "fonttools" version ".zip")) + (sha256 + (base32 + "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p"))))))) (define-public python-ly (package @@ -9325,6 +9378,18 @@ the standard library.") (native-inputs `(("python2-unittest2" ,python2-unittest2)))))) +;; This package is used by python2-pytest via python2-importlib-metadata, +;; and thus can not depend on python-unittest2 (which depends on pytest). +(define-public python2-contextlib2-bootstrap + (hidden-package + (package/inherit + python2-contextlib2 + (name "python2-contextlib2-bootstrap") + (arguments + `(#:tests? #f + ,@(package-arguments python2-contextlib2))) + (native-inputs '())))) + (define-public python-texttable (package (name "python-texttable") @@ -9798,14 +9863,14 @@ library as well as on the command line.") (define-public python-pluggy (package (name "python-pluggy") - (version "0.11.0") + (version "0.13.1") (source (origin (method url-fetch) (uri (pypi-uri "pluggy" version)) (sha256 (base32 - "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895")))) + "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm")))) (build-system python-build-system) (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm))) @@ -9813,10 +9878,30 @@ library as well as on the command line.") (description "Pluggy is an extraction of the plugin manager as used by Pytest but stripped of Pytest specific details.") (home-page "https://pypi.org/project/pluggy/") + (properties `((python2-variant . ,(delay python2-pluggy)))) (license license:expat))) (define-public python2-pluggy - (package-with-python2 python-pluggy)) + (let ((base (package-with-python2 (strip-python2-variant + python-pluggy)))) + (package/inherit + base + (propagated-inputs + `(("python-importlib-metadata" ,python2-importlib-metadata)))))) + +;; This package requires python2-importlib-metadata, but that package +;; ends up needing python2-pluggy via python2-pytest, so we need this +;; variant to solve the circular dependency. +(define-public python2-pluggy-bootstrap + (hidden-package + (package/inherit + python2-pluggy + (name "python2-pluggy-bootstrap") + (arguments + `(#:tests? #f + ,@(package-arguments python2-pluggy))) + (propagated-inputs + `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap)))))) (define-public python-tox (package @@ -9970,13 +10055,16 @@ python-xdo for newer bindings.)") (arguments `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ - (invoke "pytest" "-vv")))))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "nosetests" "-v") + (format #t "test suite not run~%")) + #t))))) (propagated-inputs `(("python-markupsafe" ,python-markupsafe))) (native-inputs `(("python-mock" ,python-mock) - ("python-pytest" ,python-pytest))) + ("python-nose" ,python-nose))) (home-page "https://www.makotemplates.org/") (synopsis "Templating language for Python") (description "Mako is a templating language for Python that compiles @@ -10501,13 +10589,13 @@ anymore.") (define-public python2-pathlib2 (package (name "python2-pathlib2") - (version "2.3.3") + (version "2.3.5") (source (origin (method url-fetch) (uri (pypi-uri "pathlib2" version)) (sha256 (base32 - "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695")))) + "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc")))) (build-system python-build-system) ;; We only need the the Python 2 variant, since for Python 3 our minimum ;; version is 3.4 which already includes this package as part of the @@ -11074,13 +11162,13 @@ graphviz.") (define-public python-gevent (package (name "python-gevent") - (version "1.4.0") + (version "1.5.0") (source (origin (method url-fetch) (uri (pypi-uri "gevent" version)) (sha256 (base32 - "1lchr4akw2jkm5v4kz7bdm4wv3knkfhbfn9vkkz4s5yrkcxzmdqy")) + "0aac3d4vhv5n4rsb6cqzq0d1xx9immqz4fmpddw35yxkwdc450dj")) (modules '((guix build utils))) (snippet '(begin @@ -11106,14 +11194,16 @@ graphviz.") (find-files "src/greentest" "\\.py$")) #t)) (add-before 'build 'do-not-use-bundled-sources - (lambda* (#:key inputs #:allow-other-keys) + (lambda _ (setenv "GEVENTSETUP_EMBED" "0") ;; Prevent building bundled libev. (substitute* "setup.py" (("run_make=_BUILDING") "run_make=False")) - + #t)) + (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) (let ((greenlet (string-append (assoc-ref inputs "python-greenlet") "/include"))) @@ -11164,9 +11254,6 @@ graphviz.") "test_thread.py" "test_threading.py" "test__threading_2.py" - ;; FIXME: test_patch_twice_warning_events fails for - ;; no apparent reason. Needs more investigation! - "test__monkey.py" ;; These tests rely on KeyboardInterrupts which do not ;; work inside the build container for some reason ;; (lack of controlling terminal?). @@ -11174,12 +11261,15 @@ graphviz.") "test__issues461_471.py" ;; TODO: Patch out the tests that use getprotobyname, etc ;; instead of disabling all the tests from these files. + "test__resolver_dnspython.py" + "test__doctests.py" "test__all__.py" "test___config.py" "test__execmodules.py"))) (call-with-output-file "skipped_tests.txt" (lambda (port) - (display (string-join disabled-tests "\n") port))) + (format port "~a~%" + (string-join disabled-tests "\n")))) #t))) (replace 'check (lambda _ @@ -11762,7 +11852,7 @@ it will manage (install/update) them for you.") (base32 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k")))) (native-inputs - `(("python-setuptools-scm" ,python-setuptools-scm-3.3))) + `(("python-setuptools-scm" ,python-setuptools-scm))) (build-system python-build-system) (home-page "https://github.com/ionelmc/python-lazy-object-proxy") (synopsis "Lazy object proxy for python") @@ -12028,6 +12118,14 @@ characters, mouse support, and auto suggestions.") (arguments `(#:phases (modify-phases %standard-phases + (add-before 'check 'adjust-test-for-python-3.8 + (lambda _ + ;; Mimic upstream commit e7feeef64 to allow for extra output lines + ;; in TestSetupReadline on Python 3.8. Remove for jedi > 0.17.0. + (substitute* "test/test_utils.py" + (("assert len\\(difference\\) < 20") + "assert len(difference) < 22")) + #t)) (replace 'check (lambda _ (setenv "HOME" "/tmp") @@ -13523,13 +13621,13 @@ and bit flag values.") (define-public python-attrs (package (name "python-attrs") - (version "19.1.0") + (version "19.3.0") (source (origin (method url-fetch) (uri (pypi-uri "attrs" version)) (sha256 (base32 - "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h")))) + "0wky4h28n7xnr6xv69p9z6kv8bzn50d10c3drmd9ds8gawbcxdzp")))) (build-system python-build-system) (arguments `(#:modules ((guix build utils) @@ -13871,14 +13969,16 @@ of @code{functools.lru_cache} from python 3.3.") (define-public python-configparser (package (name "python-configparser") - (version "3.7.1") + (version "4.0.2") (source (origin (method url-fetch) (uri (pypi-uri "configparser" version)) (sha256 (base32 - "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav")))) + "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7")))) + (native-inputs + `(("python-setuptools_scm" ,python-setuptools-scm))) (build-system python-build-system) (home-page "https://github.com/jaraco/configparser/") (synopsis "Backport of configparser from python 3.5") @@ -14103,13 +14203,13 @@ It supports both normal and Unicode strings.") (define-public python-scandir (package (name "python-scandir") - (version "1.9.0") + (version "1.10.0") (source (origin (method url-fetch) (uri (pypi-uri "scandir" version)) (sha256 - (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4")))) + (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -14244,7 +14344,11 @@ several utilities, as well as an API for building localization tools.") (arguments `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ (invoke "py.test" "-vv")))))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (invoke "py.test" "-vv") + (format #t "test suite not run~%")) + #t))))) (native-inputs `(("python-pretend" ,python-pretend) ("python-pytest" ,python-pytest))) @@ -14265,6 +14369,29 @@ information.") (define-public python2-packaging (package-with-python2 python-packaging)) +;; Variants with minimal dependencies, for bootstrapping Pytest. +(define-public python-packaging-bootstrap + (hidden-package + (package/inherit + python-packaging + (name "python-packaging-bootstrap") + (native-inputs '()) + (propagated-inputs + `(("python-pyparsing" ,python-pyparsing))) + (arguments '(#:tests? #f))))) + +(define-public python2-packaging-bootstrap + (hidden-package + (package/inherit + python2-packaging + (name "python2-packaging-bootstrap") + (native-inputs '()) + (propagated-inputs + `(("python-pyparsing" ,python2-pyparsing))) + (arguments + `(#:tests? #f + ,@(package-arguments python2-packaging)))))) + (define-public python-relatorio (package (name "python-relatorio") @@ -16027,14 +16154,14 @@ based on the CPython 2.7 and 3.7 parsers.") (define-public python-typing (package (name "python-typing") - (version "3.6.6") + (version "3.7.4.1") (source (origin (method url-fetch) (uri (pypi-uri "typing" version)) (sha256 (base32 - "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0")))) + "08xs7s5pyq99hbrzw23inczmidz90krvpv9q5p1qrvh6yzrydpwi")))) (build-system python-build-system) (home-page "https://docs.python.org/3/library/typing.html") (synopsis "Type hints for Python") @@ -16255,14 +16382,14 @@ file system events on Linux.") (define-public python-more-itertools (package (name "python-more-itertools") - (version "7.1.0") + (version "8.2.0") (source (origin (method url-fetch) (uri (pypi-uri "more-itertools" version)) (sha256 (base32 - "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b")))) + "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi")))) (build-system python-build-system) (home-page "https://github.com/erikrose/more-itertools") (synopsis "More routines for operating on iterables, beyond itertools") @@ -16286,7 +16413,7 @@ working with iterables.") (base32 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q")))) (arguments - `(#:python ,python2-minimal)) + `(#:python ,python-2)) (propagated-inputs `(("python2-six" ,python2-six-bootstrap))))) @@ -17208,14 +17335,15 @@ that is accessible to other projects developed in Cython.") (base32 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp")))) (build-system python-build-system) - (native-inputs - `(("python-tox" ,python-tox))) + (arguments + ;; FIXME: Tests require many extra dependencies, and would introduce + ;; a circular dependency on hypothesis, which uses this package. + '(#:tests? #f)) (propagated-inputs `(("python-appdirs" ,python-appdirs) ("python-distlib" ,python-distlib) ("python-filelock" ,python-filelock) - ("python-importlib-metadata" ,python-importlib-metadata) ;; python < 3.8 - ("python-six" ,python-six))) + ("python-six" ,python-six-bootstrap))) (home-page "http://www.grantjenks.com/docs/sortedcontainers/") (synopsis "Sorted List, Sorted Dict, Sorted Set") (description @@ -17223,6 +17351,9 @@ that is accessible to other projects developed in Cython.") pure-Python.") (license license:asl2.0))) +(define-public python2-sortedcontainers + (package-with-python2 python-sortedcontainers)) + (define-public python-cloudpickle (package (name "python-cloudpickle") diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 048941e8a9..a30ad6fb6e 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is> ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> ;;; Copyright © 2016 David Craven <david@craven.ch> -;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at> ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org> ;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com> @@ -38,7 +38,7 @@ ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com> ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com> ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au> -;;; Copyright © 2017, 2018 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org> ;;; Copyright © 2017 Roel Janssen <roel@gnu.org> ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net> @@ -58,6 +58,7 @@ ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com> ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org> ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,6 +82,7 @@ #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages dbm) + #:use-module (gnu packages hurd) #:use-module (gnu packages libffi) #:use-module (gnu packages pkg-config) #:use-module (gnu packages readline) @@ -92,12 +94,14 @@ #:use-module (guix download) #:use-module (guix utils) #:use-module (guix build-system gnu) - #:use-module (guix build-system trivial)) + #:use-module (guix build-system trivial) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26)) (define-public python-2.7 (package (name "python2") - (version "2.7.16") + (version "2.7.17") (source (origin (method url-fetch) @@ -105,12 +109,13 @@ version "/Python-" version ".tar.xz")) (sha256 (base32 - "1mqfcqp5y8r0bfyr7ppl74n0lig45p9mc4b8adlcpvj74rhfy8pj")) + "0hds28cg226m8j8sr394nm9yc4gxhvlv109w0avsf2mxrlrz0hsd")) (patches (search-patches "python-2.7-search-paths.patch" "python-2-deterministic-build-info.patch" "python-2.7-site-prefixes.patch" "python-2.7-source-date-epoch.patch" - "python-2.7-adjust-tests.patch")) + "python-2.7-adjust-tests.patch" + "python-cross-compile.patch")) (modules '((guix build utils))) (snippet '(begin @@ -151,6 +156,13 @@ "INSTALL=install -c" "MKDIR_P=mkdir -p" + ;; Disable runtime check failing if cross-compiling, see: + ;; https://lists.yoctoproject.org/pipermail/poky/2013-June/008997.html + ,@(if (%current-target-system) + '("ac_cv_buggy_getaddrinfo=no" + "ac_cv_file__dev_ptmx=no" + "ac_cv_file__dev_ptc=no") + '()) (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib")) ;; With no -j argument tests use all available cpus, so provide one. @@ -171,6 +183,12 @@ (add-before 'configure 'patch-lib-shells (lambda _ + ;; This variable is used in setup.py to enable cross compilation + ;; specific switches. As it is not set properly by configure + ;; script, set it manually. + ,@(if (%current-target-system) + '((setenv "_PYTHON_HOST_PLATFORM" "")) + '()) ;; Filter for existing files, since some may not exist in all ;; versions of python that are built with this recipe. (substitute* (filter file-exists? @@ -181,6 +199,14 @@ "Lib/test/test_subprocess.py")) (("/bin/sh") (which "sh"))) #t)) + ,@(if (hurd-system?) + `((add-before 'build 'patch-regen-for-hurd + (lambda* (#:key inputs #:allow-other-keys) + (let ((libc (assoc-ref inputs "libc"))) + (substitute* "Lib/plat-generic/regen" + (("/usr/include/") (string-append libc "/include/"))) + #t)))) + '()) (add-before 'configure 'do-not-record-configure-flags (lambda* (#:key configure-flags #:allow-other-keys) ;; Remove configure flags from the installed '_sysconfigdata.py' @@ -250,7 +276,9 @@ (if (null? opt) "none" (car opt))) (for-each (lambda (file) (apply invoke - `(,(string-append out "/bin/python") + `(,,(if (%current-target-system) + "python2" + '(string-append out "/bin/python")) ,@opt "-m" "compileall" "-f" ; force rebuild @@ -293,7 +321,12 @@ ("tcl" ,tcl) ("tk" ,tk))) ; for tkinter (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ;; When cross-compiling, a native version of Python itself is needed. + ,@(if (%current-target-system) + `(("python2" ,this-package) + ("which" ,which)) + '()))) (native-search-paths (list (search-path-specification (variable "PYTHONPATH") @@ -323,27 +356,28 @@ data types.") (name "python") (properties `((superseded . ,python-2))))) -(define-public python-3.7 +(define-public python-3.8 (package (inherit python-2) (name "python") - (version "3.7.4") + (version "3.8.2") (source (origin (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) (patches (search-patches "python-3-fix-tests.patch" + "python-3.8-fix-tests.patch" "python-3-deterministic-build-info.patch" "python-3-search-paths.patch")) (sha256 (base32 - "0gxiv5617zd7dnqm5k9r4q2188lk327nf9jznwq9j6b8p0s92ygv")) + "1ps5v323cp5czfshqjmbsqw7nvrdpcbk06f62jbzaqik4gfffii6")) (modules '((guix build utils))) (snippet '(begin ;; Delete the bundled copy of libexpat. (delete-file-recursively "Modules/expat") - (substitute* "Modules/Setup.dist" + (substitute* "Modules/Setup" ;; Link Expat instead of embedding the bundled one. (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) #t)))) @@ -356,19 +390,18 @@ data types.") " --exclude test_mmap" ;; test_socket may hang and eventually run out of memory ;; on some systems: <https://bugs.python.org/issue34587>. - " test_socket" - ;; XXX: test_ctypes fails on some platforms due to a problem in - ;; libffi 3.2.1: <https://bugs.python.org/issue23249>. - ,@(if (string-prefix? "aarch64" (%current-system)) - '(" test_ctypes") - '())))) + " test_socket"))) ((#:phases phases) `(modify-phases ,phases + ,@(if (hurd-system?) + `((delete 'patch-regen-for-hurd)) ;regen was removed after 3.5.9 + '()) (add-before 'check 'set-TZDIR - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs #:allow-other-keys) ;; test_email requires the Olson time zone database. (setenv "TZDIR" - (string-append (assoc-ref inputs "tzdata") + (string-append (assoc-ref + (or native-inputs inputs) "tzdata") "/share/zoneinfo")) #t)) ;; Unset SOURCE_DATE_EPOCH while running the test-suite and set it @@ -389,18 +422,48 @@ data types.") (if (null? opt) "none" (car opt))) (for-each (lambda (file) (apply invoke - `(,(string-append out "/bin/python3") - ,@opt - "-m" "compileall" - "-f" ; force rebuild - ;; Don't build lib2to3, because it's Python 2 code. - "-x" "lib2to3/.*" - ,file))) + `(,,(if (%current-target-system) + "python3" + '(string-append out + "/bin/python3")) + ,@opt + "-m" "compileall" + "-f" ; force rebuild + ;; Don't build lib2to3, because it's Python 2 code. + "-x" "lib2to3/.*" + ,file))) (find-files out "\\.py$"))) (list '() '("-O") '("-OO"))) - #t))))))) + #t))) + ;; XXX: Apply patch on ARM platforms only to avoid a full rebuild. + ;; Remove this phase in the next rebuild cycle. + ,@(let ((system (or (%current-target-system) + (%current-system)))) + (if (any (cute string-prefix? <> system) + '("arm" "aarch64")) + '((add-after 'unpack 'apply-alignment-patch + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (invoke "patch" "-p1" "--force" "--input" + (assoc-ref (or native-inputs inputs) + "arm-alignment.patch"))))) + '())))))) (native-inputs `(("tzdata" ,tzdata-for-tests) + + ;; Disable unaligned accesses in the sha3 module on ARM as + ;; it causes a test failure when building 32-bit Python on a + ;; 64-bit kernel. See <https://bugs.python.org/issue36515>. + ;; TODO: make this a regular patch in the next rebuild cycle. + ,@(let ((system (or (%current-target-system) + (%current-system)))) + (if (any (cute string-prefix? <> system) + '("arm" "aarch64")) + `(("arm-alignment.patch" ,(search-patch "python-3-arm-alignment.patch"))) + '())) + + ,@(if (%current-target-system) + `(("python3" ,this-package)) + '()) ,@(package-native-inputs python-2))) (native-search-paths (list (search-path-specification @@ -409,33 +472,8 @@ data types.") (version-major+minor version) "/site-packages")))))))) -(define-public python-3.8 - (package - (inherit python-3.7) - (name "python-next") - (version "3.8.0") - (source - (origin - (inherit (package-source python-3.7)) - (uri (string-append "https://www.python.org/ftp/python/" - version "/Python-" version ".tar.xz")) - (sha256 (base32 "110d0did9rxn7rg85kf2fwli5hqq44xv2d8bi7d92m7v2d728mmk")) - (patches (search-patches - "python-3.8-search-paths.patch" - "python-3-fix-tests.patch" - "python-3.8-fix-tests.patch" - "python-3-deterministic-build-info.patch")) - (snippet - '(begin - ;; Delete the bundled copy of libexpat. - (delete-file-recursively "Modules/expat") - (substitute* "Modules/Setup" - ;; Link Expat instead of embedding the bundled one. - (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) - #t)))))) - ;; Current 3.x version. -(define-public python-3 python-3.7) +(define-public python-3 python-3.8) ;; Current major version. (define-public python python-3) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index c9ac750cc5..8a57127771 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -206,7 +206,7 @@ system, and the core design of Django is reused in Grantlee.") ("postgresql" ,postgresql) ("pulseaudio" ,pulseaudio) ("pcre2" ,pcre2) - ("sqlite" ,sqlite-with-column-metadata) + ("sqlite" ,sqlite) ("udev" ,eudev) ("unixodbc" ,unixodbc) ("wayland" ,wayland) @@ -223,7 +223,7 @@ system, and the core design of Django is reused in Grantlee.") `(;; XXX: The JavaScriptCore engine does not build with the C++11 standard. ;; We could build it with -std=gnu++98, but then we'll get in trouble with ;; ICU later. Just keep using GCC 5 for now. - ("gcc" ,gcc-5) + ("gcc@5" ,gcc-5) ("bison" ,bison) ("flex" ,flex) ("gperf" ,gperf) @@ -240,6 +240,17 @@ system, and the core design of Django is reused in Grantlee.") (arguments `(#:phases (modify-phases %standard-phases + (add-after 'set-paths 'hide-default-gcc + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent + ;; conflicts with the GCC 5 input. + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":")) + #t))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -352,6 +363,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") "0pb68d30clksdhgy8n6rrs838bb3qcsfq4pv463yy2nr4p5kk2di")) ;; Use TZDIR to avoid depending on package "tzdata". (patches (search-patches "qtbase-use-TZDIR.patch" + "qtbase-moc-ignore-gcc-macro.patch" "qtbase-QTBUG-81715.patch")) (modules '((guix build utils))) (snippet @@ -381,7 +393,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("harfbuzz" ,harfbuzz) ("icu4c" ,icu4c) ("libinput" ,libinput-minimal) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libmng" ,libmng) ("libpng" ,libpng) ("libx11" ,libx11) @@ -404,7 +416,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") ("pcre2" ,pcre2) ("postgresql" ,postgresql) ("pulseaudio" ,pulseaudio) - ("sqlite" ,sqlite-with-column-metadata) + ("sqlite" ,sqlite) ("unixodbc" ,unixodbc) ("xcb-util" ,xcb-util) ("xcb-util-image" ,xcb-util-image) @@ -1798,6 +1810,14 @@ message."))) (substitute-keyword-arguments (package-arguments qtsvg) ((#:phases phases) `(modify-phases ,phases + (add-after 'unpack 'patch-ninja-version-check + (lambda _ + ;; The build system assumes the system Ninja is too old because + ;; it only checks for versions 1.7 through 1.9. We have 1.10. + (substitute* "configure.pri" + (("1\\.\\[7-9\\]\\.\\*") + "1.([7-9]|1[0-9]).*")) + #t)) (add-before 'configure 'substitute-source (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) @@ -2396,10 +2416,10 @@ different kinds of sliders, and much more.") `(("icu" ,icu4c) ("glib" ,glib) ("gst-plugins-base" ,gst-plugins-base) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libwebp" ,libwebp) - ("sqlite" ,sqlite-with-column-metadata) + ("sqlite" ,sqlite) ("fontconfig" ,fontconfig) ("libxrender" ,libxrender) ("qtbase" ,qtbase) diff --git a/gnu/packages/rdesktop.scm b/gnu/packages/rdesktop.scm index 71464237f4..2e364b2b8e 100644 --- a/gnu/packages/rdesktop.scm +++ b/gnu/packages/rdesktop.scm @@ -103,7 +103,7 @@ to remotely control a user's Windows desktop.") `(("alsa-lib" ,alsa-lib) ("cups" ,cups) ("ffmpeg" ,ffmpeg) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libx11" ,libx11) ("libxkbcommon" ,libxkbcommon) ("libxkbfile" ,libxkbfile) diff --git a/gnu/packages/rdf.scm b/gnu/packages/rdf.scm index df15593d5d..999c1e10f0 100644 --- a/gnu/packages/rdf.scm +++ b/gnu/packages/rdf.scm @@ -219,7 +219,7 @@ taxonomic inference capability.") ("libxml2" ,libxml2) ("mpfr" ,mpfr) ("pcre" ,pcre) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) (propagated-inputs `(("raptor2" ,raptor2))) ; stipulated by rasqal.pc (arguments diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index 57d550d67f..5f61dcb735 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,22 +31,32 @@ #:use-module (guix utils) #:use-module (ice-9 format)) -(define (patch-url seqno) - (format #f "mirror://gnu/readline/readline-7.0-patches/readline70-~3,'0d" seqno)) +(define (patch-url version seqno) + (format #f "mirror://gnu/readline/readline-~a-patches/readline~a-~3,'0d" + version (string-join (string-split version #\.) "") seqno)) -(define (readline-patch seqno sha256) +(define (readline-patch version seqno sha256) "Return the origin of Readline patch SEQNO, with expected hash SHA256" (origin (method url-fetch) - (uri (patch-url seqno)) + (uri (patch-url version seqno)) (sha256 sha256))) -(define-syntax-rule (patch-series (seqno hash) ...) - (list (readline-patch seqno (base32 hash)) +(define-syntax-rule (patch-series version (seqno hash) ...) + (list (readline-patch version seqno (base32 hash)) ...)) +(define %patch-series-8.0 + (patch-series + "8.0" + (1 "0sfh7wn0pr743xspnb1zndxndlv9rc0hcg14cbw5cmyg6f4ykrfq") + (2 "1xy8mv8xm8hsfixwp3ci9kfx3dii3y92cq27wwd0jq75y6zzxc1n") + (3 "1vza7sxjcsr2z295ij12nzgncdil1vb6as3mqy4m7svi1chv5pcl") + (4 "0k1rfx9w32lglxg564yvp0mw6jg6883p8ac2f2lxxqpf80m3vami"))) + (define %patch-series-7.0 (patch-series + "7.0" (1 "0xm3sxvwmss7ddyfb11n6pgcqd1aglnpy15g143vzcf75snb7hcs") (2 "0n1dxmqsbjgrfxb1hgk5c6lsraw4ncbnzxlsx7m35nym6lncjiw7") (3 "1027kmymniizcy0zbdlrczxfx3clxcdln5yq05q9yzlc6y9slhwy") @@ -55,7 +66,8 @@ (define-public readline (package (name "readline") - (version "8.0") + (version (string-append "8.0." + (number->string (length %patch-series-8.0)))) (source (origin (method url-fetch) (uri (string-append "mirror://gnu/readline/readline-" @@ -63,7 +75,8 @@ (sha256 (base32 "0qg4924hf4hg0r0wbx2chswsr08734536fh5iagkd3a7f4czafg3")) - (patches (search-patches "readline-link-ncurses.patch")) + (patches (append %patch-series-8.0 + (search-patches "readline-link-ncurses.patch"))) (patch-flags '("-p0")))) (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) diff --git a/gnu/packages/rpc.scm b/gnu/packages/rpc.scm index e73695b613..28c61b54f9 100644 --- a/gnu/packages/rpc.scm +++ b/gnu/packages/rpc.scm @@ -23,6 +23,7 @@ #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system cmake) #:use-module (guix build-system python) #:use-module (gnu packages adns) @@ -122,7 +123,23 @@ browsers to backend services.") (file-name (git-file-name "grpc" version)) (sha256 (base32 - "1jimqz3115f9pli5w6ik9wi7mjc7ix6y7yrq4a1ab9fc3dalj7p2")))))) + "1jimqz3115f9pli5w6ik9wi7mjc7ix6y7yrq4a1ab9fc3dalj7p2")))) + (arguments + (substitute-keyword-arguments (package-arguments grpc) + ((#:phases phases) + `(modify-phases ,phases + ;; Note: This would be nicer as a snippet, but that creates a tarball + ;; instead of a checkout and breaks assumptions made by the builder. + (add-after 'unpack 'rename-gettid + (lambda _ + ;; Rename custom gettid() syscall wrapper to avoid conflict + ;; with gettid() from glibc 2.30. + (substitute* '("src/core/lib/gpr/log_linux.cc" + "src/core/lib/gpr/log_posix.cc" + "src/core/lib/iomgr/ev_epollex_linux.cc") + (("gettid\\(") + "sys_gettid(")) + #t)))))))) (define-public python-grpcio (package diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 4d6d323442..b1adf80693 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2015, 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <donttrustben@gmail.com> ;;; Copyright © 2017 ng0 <ng0@n0.is> -;;; Copyright © 2017, 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> @@ -19,6 +19,7 @@ ;;; Copyright © 2019 Brian Leung <bkleung89@gmail.com> ;;; Copyright © 2019 Collin J. Doering <collin@rekahsoft.ca> ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de> +;;; Copyright © 2019 Brett Gilio <brettg@posteo.de> ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,7 +78,7 @@ (define-public ruby (package (name "ruby") - (version "2.5.3") + (version "2.6.5") (source (origin (method url-fetch) @@ -86,7 +87,7 @@ "/ruby-" version ".tar.xz")) (sha256 (base32 - "0vrhrw7kcz9mg0jkqnihkcxqy5k05v8k1j0y2735z8wfk8sx1j8w")) + "0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm")) (modules '((guix build utils))) (snippet `(begin ;; Remove bundled libffi @@ -95,6 +96,7 @@ (build-system gnu-build-system) (arguments `(#:test-target "test" + #:configure-flags '("--enable-shared") ; dynamic linking #:phases (modify-phases %standard-phases (add-before 'configure 'replace-bin-sh-and-remove-libffi @@ -116,8 +118,9 @@ `(("readline" ,readline) ("openssl" ,openssl) ("libffi" ,libffi) - ("gdbm" ,gdbm) - ("zlib" ,zlib))) + ("gdbm" ,gdbm))) + (propagated-inputs + `(("zlib" ,zlib))) (native-search-paths (list (search-path-specification (variable "GEM_PATH") @@ -128,10 +131,29 @@ a focus on simplicity and productivity.") (home-page "https://www.ruby-lang.org") (license license:ruby))) +(define-public ruby-2.5 + (package + (inherit ruby) + (version "2.5.7") + (source + (origin + (method url-fetch) + (uri (string-append "http://cache.ruby-lang.org/pub/ruby/" + (version-major+minor version) + "/ruby-" version ".tar.xz")) + (sha256 + (base32 + "159zka4sbx1p4ayxqi7a5ybbzxvn3n5mivrz4d1damw9ypl70610")) + (modules '((guix build utils))) + (snippet `(begin + ;; Remove bundled libffi + (delete-file-recursively "ext/fiddle/libffi-3.2.1") + #t)))))) + (define-public ruby-2.4 (package (inherit ruby) - (version "2.4.3") + (version "2.4.9") (source (origin (method url-fetch) @@ -140,8 +162,7 @@ a focus on simplicity and productivity.") "/ruby-" version ".tar.xz")) (sha256 (base32 - "0l9bv67dgsphk42lmiskhrnh47hbyj6rfg2rcjx22xivpx07srr3")) - (patches (search-patches "ruby-rubygems-276-for-ruby24.patch")) + "0546ymj2h3iai679fvx17bb2hksrqyhh22llxgz8fwggac100khc")) (modules '((guix build utils))) (snippet `(begin ;; Remove bundled libffi @@ -297,14 +318,32 @@ a menu system for providing multiple options to the user.") (define-public ruby-hoe (package (name "ruby-hoe") - (version "3.16.2") + (version "3.21.0") (source (origin (method url-fetch) (uri (rubygems-uri "hoe" version)) (sha256 (base32 - "12q6dn2irsfamdbjpqvs0dwl4i1vl7wflxrcg972h9jw0ds38f3a")))) + "0qid0n56mgsjvq5ksxajv0gb92akky8imwgvw22ajms5g4fd6nf4")))) (build-system ruby-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + ;; One of the tests fails if the SOURCE_DATE_EPOCH environment + ;; variable is set, so unset it for the duration of the tests. + ;; + ;; TestHoe#test_possibly_better + ;; [/tmp/guix-build-ruby-hoe-3.20.0.drv-0/gem/test/test_hoe.rb:250]: + ;; Expected: 2019-11-12 00:00:00 UTC + ;; Actual: 1970-01-01 00:00:00 UTC + (add-before 'check 'unset-SOURCE-DATE-EPOCH + (lambda _ + (unsetenv "SOURCE_DATE_EPOCH") + #t)) + (add-after 'check 'set-SOURCE-DATE-EPOCH-again + (lambda _ + (setenv "SOURCE_DATE_EPOCH" "1") + #t))))) (synopsis "Ruby project management helper") (description "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage, @@ -1950,6 +1989,40 @@ two hashes.") (home-page "https://github.com/liufengyun/hashdiff") (license license:expat))) +(define-public ruby-hydra + ;; No releases yet. + (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525") + (revision "0")) + (package + (name "ruby-hydra") + (version (git-version "0.0" revision commit)) + (home-page "https://github.com/hyphenation/hydra") + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f")))) + (build-system ruby-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (add-after 'unpack 'make-files-writable + (lambda _ + (for-each make-file-writable (find-files ".")) + #t)) + (replace 'check + (lambda _ + (invoke "rspec")))))) + (native-inputs + `(("ruby-rspec" ,ruby-rspec))) + (propagated-inputs + `(("ruby-byebug" ,ruby-byebug))) + (synopsis "Ruby hyphenation patterns") + (description + "ruby-hydra is a Ruby library for working with hyphenation patterns.") + (license license:expat)))) + (define-public ruby-shindo (package (name "ruby-shindo") @@ -2237,14 +2310,16 @@ using Net::HTTP, supporting reconnection and retry according to RFC 2616.") (define-public ruby-power-assert (package (name "ruby-power-assert") - (version "0.2.7") + (version "1.1.5") (source (origin (method url-fetch) (uri (rubygems-uri "power_assert" version)) (sha256 (base32 - "0ka6w71lcan4wgf111xi3pcn9ma9lhakv31jg8w007nwzi0xfjbi")))) + "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s")))) (build-system ruby-build-system) + (arguments + '(#:tests? #f)) ; No included tests (native-inputs `(("bundler" ,bundler))) (synopsis "Assert library with descriptive assertion messages") @@ -4051,6 +4126,16 @@ utilities for Ruby.") (base32 "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp")))) (build-system ruby-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'skip-safe-tests + (lambda _ + (substitute* "test/test_utils.rb" + (("def safe_test\\(options = \\{\\}\\)") + "def safe_test(options = {}) + skip('The Guix build environment has an unsafe load path')")) + #t))))) (propagated-inputs `(("ruby-thread-safe" ,ruby-thread-safe))) (synopsis "Time zone library for Ruby") @@ -4441,13 +4526,13 @@ a native C extension.") (define-public ruby-json-pure (package (name "ruby-json-pure") - (version "2.1.0") + (version "2.2.0") (source (origin (method url-fetch) (uri (rubygems-uri "json_pure" version)) (sha256 (base32 - "12yf9fmhr4c2jm3xl20vf1qyz5i63vc8a6ngz9j0f86nqwhmi2as")))) + "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439")))) (build-system ruby-build-system) (arguments `(#:phases @@ -4481,7 +4566,7 @@ a native C extension.") (synopsis "JSON implementation in pure Ruby") (description "This package provides a JSON implementation written in pure Ruby.") - (home-page "https://flori.github.com/json") + (home-page "https://flori.github.com/json/") (license license:ruby))) (define-public ruby-jwt @@ -4547,7 +4632,7 @@ a native C extension.") (define-public ruby-listen (package (name "ruby-listen") - (version "3.1.5") + (version "3.2.0") (source (origin ;; The gem does not include a Rakefile, so fetch from the Git @@ -4559,7 +4644,7 @@ a native C extension.") (file-name (git-file-name name version)) (sha256 (base32 - "1hqmkfa9f2xb5jlvqbafdxjd5ax75jm8gqj5nh3k22xq0kacsvgg")))) + "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24")))) (build-system ruby-build-system) (arguments `(#:test-target "spec" @@ -5411,14 +5496,14 @@ It is intended be used by all Cucumber implementations to parse (define-public ruby-aruba (package (name "ruby-aruba") - (version "0.14.8") + (version "0.14.14") (source (origin (method url-fetch) (uri (rubygems-uri "aruba" version)) (sha256 (base32 - "0zdd81l1lp0x78sxa6kkfqclpj5il3xl70nz05wqv2sfzzhqydxh")))) + "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn")))) (build-system ruby-build-system) (arguments '(#:test-target "spec" @@ -5450,11 +5535,7 @@ It is intended be used by all Cucumber implementations to parse ((".*cucumber.*") "\n") ((".*license_finder.*") "\n") ((".*rake.*") "gem 'rake'\n") - ((".*simplecov.*") "\n") ((".*relish.*") "\n")) - (substitute* "spec/spec_helper.rb" - ((".*simplecov.*") "") - (("^SimpleCov.*") "")) (substitute* "aruba.gemspec" (("spec\\.add\\_runtime\\_dependency 'cucumber'.*") "spec.add_runtime_dependency 'cucumber'")) @@ -5464,7 +5545,8 @@ It is intended be used by all Cucumber implementations to parse (native-inputs `(("bundler" ,bundler) ("ruby-rspec" ,ruby-rspec) - ("ruby-fuubar" ,ruby-fuubar))) + ("ruby-fuubar" ,ruby-fuubar) + ("ruby-simplecov" ,ruby-simplecov))) (propagated-inputs `(("ruby-childprocess" ,ruby-childprocess) ("ruby-contracts" ,ruby-contracts) @@ -5756,7 +5838,7 @@ A modified copy of yajl is used, and included in the package.") (define-public ruby-yard (package (name "ruby-yard") - (version "0.9.16") + (version "0.9.20") (source (origin (method git-fetch) @@ -5767,20 +5849,24 @@ A modified copy of yajl is used, and included in the package.") (file-name (git-file-name name version)) (sha256 (base32 - "0a4r1pfs0ms4vlccsf1x2jckx35lqm8b8lh6rdjxqfr5fia5izpf")))) + "1v48zz8hzazrg79jksj9siys21d2axvzijvkxw2j42zh86syi1wi")))) (build-system ruby-build-system) (arguments `(#:phases (modify-phases %standard-phases (replace 'check (lambda _ + ;; Delete the Gemfile to avoid errors relating to it + (delete-file "Gemfile") ;; $HOME needs to be set to somewhere writeable for tests to run (setenv "HOME" "/tmp") ;; Run tests without using 'rake' to avoid dependencies. (invoke "rspec")))))) (native-inputs `(("ruby-rspec" ,ruby-rspec) - ("ruby-rack" ,ruby-rack))) + ("ruby-rack" ,ruby-rack) + ("ruby-redcloth" ,ruby-redcloth) + ("ruby-asciidoc" ,ruby-asciidoctor))) (synopsis "Documentation generation tool for Ruby") (description "YARD is a documentation generation tool for the Ruby programming @@ -6094,13 +6180,6 @@ neither too verbose nor too minimal.") (arguments `(#:phases (modify-phases %standard-phases - (add-before 'check 'adjust-failing-test - (lambda _ - ;; XXX: This test fails with SQLite versions >= 3.21. - ;; See <https://github.com/sparklemotion/sqlite3-ruby/issues/226>. - (substitute* "test/test_integration_resultset.rb" - (("\"integer\", \"text\"") "\"INTEGER\", \"text\"")) - #t)) (add-before 'check 'add-gemtest-file ;; This file exists in the repository but is not distributed. (lambda _ (invoke "touch" ".gemtest")))))) @@ -7433,17 +7512,17 @@ in standard Ruby syntax.") (home-page "https://github.com/ruby/rake") (license license:expat))) -(define-public ruby-childprocess-0.6 +(define-public ruby-childprocess (package (name "ruby-childprocess") - (version "0.6.3") + (version "3.0.0") (source (origin (method url-fetch) (uri (rubygems-uri "childprocess" version)) (sha256 (base32 - "1p3f43scdzx9zxmy2kw5zsc3az6v46nq4brwcxmnscjy4w4racbv")))) + "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5")))) (build-system ruby-build-system) (arguments `(#:tests? #f)) @@ -7455,22 +7534,9 @@ in standard Ruby syntax.") (synopsis "Control external programs running in the background, in Ruby") (description "@code{childprocess} provides a gem to control external programs running in the background, in Ruby.") - (home-page "http://github.com/enkessler/childprocess") + (home-page "https://github.com/enkessler/childprocess") (license license:expat))) -(define-public ruby-childprocess - (package - (inherit ruby-childprocess-0.6) - (name "ruby-childprocess") - (version "0.9.0") - (source - (origin - (method url-fetch) - (uri (rubygems-uri "childprocess" version)) - (sha256 - (base32 - "0a61922kmvcxyj5l70fycapr87gz1dzzlkfpq85rfqk5vdh3d28p")))))) - (define-public ruby-public-suffix (package (name "ruby-public-suffix") diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 11522b933e..5e5748f199 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -439,9 +439,12 @@ test = { path = \"../libtest\" } ;; modules (see <https://bugs.gnu.org/31392>). (native-search-paths (list (search-path-specification - (variable "CPATH") + (variable "C_INCLUDE_PATH") (files '("include"))) (search-path-specification + (variable "CPLUS_INCLUDE_PATH") + (files '("include/c++" "include"))) + (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64"))))) @@ -466,6 +469,10 @@ safety and thread safety guarantees.") (delete-file-recursively "src/llvm") #t)) (patches '()))) + (native-inputs + `(;; The tests fail with newer versions of GNU Make. + ("make" ,gnu-make-4.2) + ,@(package-native-inputs base-rust))) (outputs '("out" "doc" "cargo")) ;; Since rust-1.19 is local, it's quite probable that Hydra ;; will build rust-1.19 only as a dependency of rust-1.20. diff --git a/gnu/packages/scanner.scm b/gnu/packages/scanner.scm index 1e4231b7e7..55a642241d 100644 --- a/gnu/packages/scanner.scm +++ b/gnu/packages/scanner.scm @@ -123,7 +123,7 @@ package contains the library, but no drivers.") (name "sane-backends") (inputs `(("hplip" ,(@ (gnu packages cups) hplip-minimal)) - ("libjpeg" ,libjpeg) ; wanted by pixma, epsonds, others + ("libjpeg" ,libjpeg-turbo) ; wanted by pixma, epsonds, others ("libpng" ,libpng) ; support ‘scanimage --format=png’ ,@(package-inputs sane-backends-minimal))) (arguments @@ -226,7 +226,7 @@ package contains the library and drivers."))) (inputs `(("gtk+" ,gtk+-2) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("sane-backends" ,sane-backends) diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm index e36564f030..10a24199a8 100644 --- a/gnu/packages/scheme.scm +++ b/gnu/packages/scheme.scm @@ -503,7 +503,7 @@ implementation techniques and as an expository tool.") ("glu" ,glu) ("gmp" ,gmp) ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libx11" ,libx11) ("mesa" ,mesa) diff --git a/gnu/packages/screen.scm b/gnu/packages/screen.scm index 51168903a9..c03e2e5e5e 100644 --- a/gnu/packages/screen.scm +++ b/gnu/packages/screen.scm @@ -29,6 +29,7 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages hurd) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages python) @@ -43,6 +44,7 @@ (method url-fetch) (uri (string-append "mirror://gnu/screen/screen-" version ".tar.gz")) + (patches (search-patches "screen-hurd-path-max.patch")) (sha256 (base32 "18ascpjzsy70h6hk7wpg8zmzjwgdyrdr7c6z4pg5z4l9hhyv24bf")))) (build-system gnu-build-system) diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index e9c998c7b6..385017f2c2 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -87,7 +87,7 @@ ("lcms" ,lcms) ("libcdr" ,libcdr) ("libfreehand" ,libfreehand) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libmspub" ,libmspub) ("libpagemaker" ,libpagemaker) ("librevenge" ,librevenge) diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 105296cd0f..6d91727809 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -132,12 +132,6 @@ joystick, and graphics hardware.") ,flags)) ((#:make-flags flags ''()) `(cons* - ;; Add the Fcitx header files to GCCs "system header" search path - ;; in order to suppress compiler warnings induced by those: - ;; .../include/fcitx-utils/utarray.h:178:9: error: ISO C90 forbids - ;; mixed declarations and code [-Werror=declaration-after-statement] - (string-append "C_INCLUDE_PATH=" - (assoc-ref %build-inputs "fcitx") "/include") ;; SDL dlopens libudev, so make sure it is in rpath. This overrides ;; the LDFLAG set in sdl’s configure-flags, which isn’t necessary ;; as sdl2 includes Mesa by default. @@ -245,7 +239,7 @@ other supporting functions for SDL.") ;; propagated input because the pkg-config file refers to SDL's pkg-config ;; file. (propagated-inputs `(("sdl" ,sdl) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("libwebp" ,libwebp))) @@ -560,7 +554,7 @@ directory.") `(("pkg-config" ,pkg-config) ;; Required by test suite. ("xorg-server" ,xorg-server) - ("libjpeg" ,libjpeg))) + ("libjpeg" ,libjpeg-turbo))) (inputs `(("guile" ,guile-2.2) ("sdl-union" ,(sdl-union)))) diff --git a/gnu/packages/search.scm b/gnu/packages/search.scm index dcfd1ec1bd..a87e1e74b6 100644 --- a/gnu/packages/search.scm +++ b/gnu/packages/search.scm @@ -59,7 +59,7 @@ (base32 "1sjhz6vgql801rdgl6vrsjj0vy1mwlkcxjx6nr7h27m031cyjs5i")))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm index 1c45cb8c7e..1502d167c4 100644 --- a/gnu/packages/selinux.scm +++ b/gnu/packages/selinux.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> +;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,7 +40,6 @@ #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages swig) - #:use-module (gnu packages textutils) #:use-module (gnu packages xml)) ;; Update the SELinux packages together! @@ -47,8 +47,8 @@ (define-public libsepol (package (name "libsepol") - (version "2.7") - (source (let ((release "20170804")) + (version "3.0") + (source (let ((release "20191204")) (origin (method git-fetch) (uri (git-reference @@ -57,20 +57,25 @@ (file-name (string-append "selinux-" release "-checkout")) (sha256 (base32 - "1l1nn8bx08v4cxkw5kb0wgr61rfqj5ra9dh1dy5jslillj93vivq"))))) + "05rpzm72cgprd0ccr6lvx9hm8j8b5nkqi4avshlsyg7s3sdlcxjs"))))) (build-system gnu-build-system) (arguments `(#:tests? #f ; tests require checkpolicy, which requires libsepol #:test-target "test" #:make-flags - (let ((out (assoc-ref %outputs "out"))) + (let ((out (assoc-ref %outputs "out")) + (target ,(%current-target-system))) (list (string-append "PREFIX=" out) - (string-append "DESTDIR=" out) + (string-append "SHLIBDIR=" out "/lib") (string-append "MAN3DIR=" out "/share/man/man3") (string-append "MAN5DIR=" out "/share/man/man5") (string-append "MAN8DIR=" out "/share/man/man8") (string-append "LDFLAGS=-Wl,-rpath=" out "/lib") - "CC=gcc")) + (string-append "CC=" + (if target + (string-append (assoc-ref %build-inputs "cross-gcc") + "/bin/" target "-gcc") + "gcc")))) #:phases (modify-phases %standard-phases (delete 'configure) @@ -101,12 +106,17 @@ boolean settings).") (arguments `(#:tests? #f ; there is no check target #:make-flags - (let ((out (assoc-ref %outputs "out"))) + (let ((out (assoc-ref %outputs "out")) + (target ,(%current-target-system))) (list (string-append "PREFIX=" out) (string-append "LIBSEPOLA=" (assoc-ref %build-inputs "libsepol") "/lib/libsepol.a") - "CC=gcc")) + (string-append "CC=" + (if target + (string-append (assoc-ref %build-inputs "cross-gcc") + "/bin/" target "-gcc") + "gcc")))) #:phases (modify-phases %standard-phases (delete 'configure) @@ -139,7 +149,7 @@ module into a binary representation.") (string-append "LIBSEPOLA=" (assoc-ref %build-inputs "libsepol") "/lib/libsepol.a") - (string-append "PYSITEDIR=" + (string-append "PYTHONLIBDIR=" (assoc-ref %outputs "python") "/lib/python" ,(version-major+minor (package-version python)) @@ -150,19 +160,17 @@ module into a binary representation.") (delete 'portability) (replace 'enter-dir (lambda _ (chdir ,name) #t)) - (add-after 'enter-dir 'remove-Werror - (lambda _ - ;; GCC complains about the fact that the output does not (yet) - ;; have an "include" directory, even though it is referenced. - (substitute* '("src/Makefile" - "utils/Makefile") - (("-Werror ") "")) - #t)) (add-after 'build 'pywrap (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "pywrap" make-flags))) (add-after 'install 'install-pywrap - (lambda* (#:key make-flags #:allow-other-keys) + (lambda* (#:key make-flags outputs #:allow-other-keys) + ;; The build system uses "python setup.py install" to install + ;; Python bindings. Instruct it to use the correct output. + (substitute* "src/Makefile" + (("--prefix=\\$\\(PREFIX\\)") + (string-append "--prefix=" (assoc-ref outputs "python")))) + (apply invoke "make" "install-pywrap" make-flags))))))) ;; These libraries are in "Requires.private" in libselinux.pc. (propagated-inputs @@ -191,7 +199,7 @@ the core SELinux management utilities.") (substitute-keyword-arguments (package-arguments libsepol) ((#:make-flags flags) `(cons* "PYTHON=python3" - (string-append "PYSITEDIR=" + (string-append "PYTHONLIBDIR=" (assoc-ref %outputs "out") "/lib/python" ,(version-major+minor (package-version python)) @@ -202,6 +210,12 @@ the core SELinux management utilities.") (delete 'portability) (replace 'enter-dir (lambda _ (chdir ,name) #t)) + (add-before 'install 'adjust-semanage-conf-location + (lambda _ + (substitute* "src/Makefile" + (("DEFAULT_SEMANAGE_CONF_LOCATION=/etc") + "DEFAULT_SEMANAGE_CONF_LOCATION=$(PREFIX)/etc")) + #t)) (add-after 'build 'pywrap (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "pywrap" make-flags))) @@ -212,7 +226,6 @@ the core SELinux management utilities.") `(("libsepol" ,libsepol) ("libselinux" ,libselinux) ("audit" ,audit) - ("ustr" ,ustr) ;; For pywrap phase ("python" ,python-wrapper))) (native-inputs @@ -393,11 +406,6 @@ tools, and libraries designed to facilitate SELinux policy analysis.") (lambda _ (chdir ,name) #t)) (add-after 'enter-dir 'ignore-/usr-tests (lambda* (#:key inputs #:allow-other-keys) - ;; The Makefile decides to build restorecond only if it finds the - ;; inotify header somewhere under /usr. - (substitute* "Makefile" - (("ifeq.*") "") - (("endif.*") "")) ;; Rewrite lookup paths for header files. (substitute* '("newrole/Makefile" "setfiles/Makefile" diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 861d11a9ed..21209f8b0c 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2017, 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org> ;;; Copyright © 2016 David Craven <david@craven.ch> -;;; Copyright © 2016, 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2016, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr> ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net> @@ -40,6 +40,7 @@ #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cmake) #:use-module (gnu packages cpp) #:use-module (gnu packages databases) #:use-module (gnu packages documentation) @@ -296,7 +297,13 @@ that implements both the msgpack and msgpack-rpc specifications.") "037d1b1qdmn3rksmn1j71j26bv4hkjv7sn7da261k853xb5899sg")))) (build-system cmake-build-system) (arguments - `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES"))) + `(#:configure-flags '("-DBUILD_SHARED_LIBS:BOOL=YES" + ,@(if (%current-target-system) + `("-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF") + '())) + ,@(if (%current-target-system) + '() + `(#:cmake ,cmake-bootstrap)))) (synopsis "C++ library for interacting with JSON") (description "JsonCpp is a C++ library that allows manipulating JSON values, including serialization and deserialization to and from strings. It can also diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 959078cb67..73bc55bc3c 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2019 Meiyo Peng <meiyo.peng@gmail.com> ;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> ;;; @@ -359,7 +360,7 @@ written by Paul Haahr and Byron Rakitzis.") (define-public tcsh (package (name "tcsh") - (version "6.20.00") + (version "6.22.02") (source (origin (method url-fetch) ;; Old tarballs are moved to old/. @@ -369,9 +370,8 @@ written by Paul Haahr and Byron Rakitzis.") "old/tcsh-" version ".tar.gz"))) (sha256 (base32 - "17ggxkkn5skl0v1x0j6hbv5l0sgnidfzwv16992sqkdm983fg7dq")) - (patches (search-patches "tcsh-fix-autotest.patch" - "tcsh-fix-out-of-bounds-read.patch")) + "0nw8prz1n0lmr82wnpyhrzmki630afn7p9cfgr3vl00vr9c72a7d")) + (patches (search-patches "tcsh-fix-autotest.patch")) (patch-flags '("-p0")))) (build-system gnu-build-system) (native-inputs @@ -382,6 +382,14 @@ written by Paul Haahr and Byron Rakitzis.") (arguments `(#:phases (modify-phases %standard-phases + ,@(if (%current-target-system) + '((add-before 'configure 'set-cross-cc + (lambda _ + (substitute* "configure" + (("CC_FOR_GETHOST=\"cc\"") + "CC_FOR_GETHOST=\"gcc\"")) + #t))) + '()) (add-before 'check 'patch-test-scripts (lambda _ ;; Take care of pwd @@ -871,3 +879,4 @@ designed to be capable of bootstrapping their standard GNU counterparts. Underpinning these utilities are many Scheme interfaces for manipulating files and text.") (license gpl3+))) + diff --git a/gnu/packages/simulation.scm b/gnu/packages/simulation.scm index 2f07e996a2..8d5788545f 100644 --- a/gnu/packages/simulation.scm +++ b/gnu/packages/simulation.scm @@ -479,8 +479,7 @@ FFC is part of the FEniCS Project.") ("petsc" ,petsc-openmpi) ("slepc" ,slepc-openmpi))) (arguments - `(#:cmake ,cmake-3.15.5 - #:configure-flags + `(#:configure-flags `("-DDOLFIN_ENABLE_DOCS:BOOL=OFF" "-DDOLFIN_ENABLE_HDF5:BOOL=ON" "-DDOLFIN_ENABLE_MPI:BOOL=ON" diff --git a/gnu/packages/spice.scm b/gnu/packages/spice.scm index c9d091c40c..29a024c8a9 100644 --- a/gnu/packages/spice.scm +++ b/gnu/packages/spice.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2016 David Craven <david@craven.ch> ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com> -;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -149,7 +149,7 @@ which allows users to view a desktop computing environment.") ("gobject-introspection" ,gobject-introspection) ("json-glib" ,json-glib) ("libepoxy" ,libepoxy) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libxcb" ,libxcb) ("lz4" ,lz4) ("mesa" ,mesa) @@ -178,6 +178,16 @@ which allows users to view a desktop computing environment.") (substitute* "tests/Makefile" (("test-session\\$\\(EXEEXT\\) ") "")) #t)) + (add-after 'install 'patch-la-files + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (libjpeg (assoc-ref inputs "libjpeg"))) + ;; Add an absolute reference for libjpeg in the .la files + ;; so it does not have to be propagated. + (substitute* (find-files (string-append out "/lib") "\\.la$") + (("-ljpeg") + (string-append "-L" libjpeg "/lib -ljpeg"))) + #t))) (add-after 'install 'wrap-spicy (lambda* (#:key inputs outputs #:allow-other-keys) diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm index 6d6df17f90..8468131ddf 100644 --- a/gnu/packages/sqlite.scm +++ b/gnu/packages/sqlite.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> ;;; Copyright © 2016 David Craven <david@craven.ch> -;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> @@ -46,7 +46,7 @@ (define-public sqlite (package (name "sqlite") - (version "3.28.0") + (version "3.31.1") (source (origin (method url-fetch) (uri (let ((numeric-version @@ -58,13 +58,14 @@ (map (cut string-pad <> 2 #\0) other-digits)) 6 #\0)))))) - (string-append "https://sqlite.org/2019/sqlite-autoconf-" + (string-append "https://sqlite.org/2020/sqlite-autoconf-" numeric-version ".tar.gz"))) (sha256 (base32 - "1hxpi45crbqp6lacl7z611lna02k956m9bsy2bjzrbb2y23546yn")))) + "1bj936svd8i5g25xd1bj52hj4zca01fgl3sqkj86z9q5pkz4wa32")))) (build-system gnu-build-system) (inputs `(("readline" ,readline))) + (outputs '("out" "static")) (arguments `(#:configure-flags ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_FTS3, @@ -74,7 +75,25 @@ (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE " "-DSQLITE_ENABLE_FTS3 " "-DSQLITE_ENABLE_UNLOCK_NOTIFY " - "-DSQLITE_ENABLE_DBSTAT_VTAB")))) + "-DSQLITE_ENABLE_DBSTAT_VTAB " + ;; Column metadata is required by GNU Jami and Qt, et.al. + "-DSQLITE_ENABLE_COLUMN_METADATA")) + #:phases (modify-phases %standard-phases + (add-after 'install 'move-static-library + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (static (assoc-ref outputs "static")) + (source (string-append out "/lib/libsqlite3.a"))) + (mkdir-p (string-append static "/lib")) + (link source (string-append static "/lib/libsqlite3.a")) + (delete-file source) + + ;; Remove reference to the static library from the .la file + ;; so that Libtool looks for it in the usual places. + (substitute* (string-append out "/lib/libsqlite3.la") + (("^old_library=.*") + "old_library=''\n")) + #t)))))) (home-page "https://www.sqlite.org/") (synopsis "The SQLite database management system") (description @@ -84,14 +103,7 @@ widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.") (license license:public-domain))) -;; This is used by Qt. +;; Column metadata support was added to the regular 'sqlite' package with +;; commit fad5b1a6d8d9c36bea5785ae4fbc1beb37e644d7. (define-public sqlite-with-column-metadata - (package/inherit sqlite - (name "sqlite-with-column-metadata") - (arguments - (substitute-keyword-arguments (package-arguments sqlite) - ((#:configure-flags flags) - `(list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE " - "-DSQLITE_ENABLE_UNLOCK_NOTIFY " - "-DSQLITE_ENABLE_DBSTAT_VTAB " - "-DSQLITE_ENABLE_COLUMN_METADATA"))))))) + (deprecated-package "sqlite-with-column-metadata" sqlite)) diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index e9ac5bd095..1d1b1c9951 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -12,7 +12,8 @@ ;;; Copyright © 2017 ng0 <ng0@n0.is> ;;; Copyright © 2018 Manuel Graf <graf@init.at> ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> -;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,6 +43,7 @@ #:use-module (gnu packages groff) #:use-module (gnu packages guile) #:use-module (gnu packages libedit) + #:use-module (gnu packages hurd) #:use-module (gnu packages linux) #:use-module (gnu packages logging) #:use-module (gnu packages m4) @@ -136,6 +138,7 @@ a server that supports the SSH-2 protocol.") (method url-fetch) (uri (string-append "mirror://openbsd/OpenSSH/portable/" "openssh-" version ".tar.gz")) + (patches (search-patches "openssh-hurd.patch")) (sha256 (base32 "0wg6ckzvvklbzznijxkk28fb8dnwyjd0w30ra0afwv6gwr8m34j3")))) @@ -147,7 +150,9 @@ a server that supports the SSH-2 protocol.") ("pam" ,linux-pam) ("mit-krb5" ,mit-krb5) ("zlib" ,zlib) - ("xauth" ,xauth))) ; for 'ssh -X' and 'ssh -Y' + ,@(if (hurd-target?) + '() + `(("xauth" ,xauth))))) ; for 'ssh -X' and 'ssh -Y' (arguments `(#:test-target "tests" ;; Otherwise, the test scripts try to use a nonexistent directory and @@ -167,7 +172,15 @@ a server that supports the SSH-2 protocol.") "--with-libedit" ;; Enable PAM support in sshd. - "--with-pam") + "--with-pam" + + ;; "make install" runs "install -s" by default, + ;; which doesn't work for cross-compiled binaries + ;; because it invokes 'strip' instead of + ;; 'TRIPLET-strip'. Work around this. + ,,@(if (%current-target-system) + '("--disable-strip") + '())) #:phases (modify-phases %standard-phases @@ -293,8 +306,8 @@ Additionally, various channel-specific options can be negotiated.") ("texinfo" ,texinfo) ("pkg-config" ,pkg-config) ("which" ,which) - ("guile" ,guile-2.2))) ;needed when cross-compiling. - (inputs `(("guile" ,guile-2.2) + ("guile" ,guile-3.0))) ;needed when cross-compiling. + (inputs `(("guile" ,guile-3.0) ("libssh" ,libssh) ("libgcrypt" ,libgcrypt))) (synopsis "Guile bindings to libssh") @@ -314,16 +327,19 @@ libssh library.") (inputs `(("guile" ,guile-2.0) ,@(alist-delete "guile" (package-inputs guile-ssh)))))) -(define-public guile3.0-ssh +(define-public guile2.2-ssh (package (inherit guile-ssh) - (name "guile3.0-ssh") + (name "guile2.2-ssh") (native-inputs - `(("guile" ,guile-next) ;needed when cross-compiling. + `(("guile" ,guile-2.2) ;needed when cross-compiling. ,@(alist-delete "guile" (package-native-inputs guile-ssh)))) - (inputs `(("guile" ,guile-next) + (inputs `(("guile" ,guile-2.2) ,@(alist-delete "guile" (package-inputs guile-ssh)))))) +(define-public guile3.0-ssh + (deprecated-package "guile3.0-ssh" guile-ssh)) + (define-public corkscrew (package (name "corkscrew") diff --git a/gnu/packages/sssd.scm b/gnu/packages/sssd.scm index 7c19d1f53f..8be3fbfd89 100644 --- a/gnu/packages/sssd.scm +++ b/gnu/packages/sssd.scm @@ -165,7 +165,7 @@ fundamental object types for C.") ("libxml2" ,libxml2) ; for xmllint ("libxslt" ,libxslt) ("pkg-config" ,pkg-config) - ("util-linux" ,util-linux))) ; for uuid.h, reqired for KCM + ("util-linux" ,util-linux "lib"))) ;for uuid.h, reqired for KCM (home-page "https://pagure.io/SSSD/sssd/") (synopsis "System security services daemon") (description "SSSD is a system daemon. Its primary function is to provide diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 0ead92dedf..60c54f9401 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -352,7 +352,7 @@ as.POSIXct(if (\"\" != Sys.getenv(\"SOURCE_DATE_EPOCH\")) {\ ("openblas" ,openblas) ("gfortran" ,gfortran) ("icu4c" ,icu4c) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libtiff" ,libtiff) ("libxt" ,libxt) diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm index 376a801fe2..d3a3deabca 100644 --- a/gnu/packages/storage.scm +++ b/gnu/packages/storage.scm @@ -200,7 +200,7 @@ ("python-sphinx" ,python-sphinx) ("yasm" ,yasm))) (inputs - `(("boost" ,boost-with-python3) + `(("boost" ,boost) ("curl" ,curl) ("cryptsetup" ,cryptsetup) ("expat" ,expat) @@ -229,6 +229,7 @@ ("snappy" ,snappy) ("udev" ,eudev) ("util-linux" ,util-linux) + ("util-linux:lib" ,util-linux "lib") ("xfsprogs" ,xfsprogs) ("zlib" ,zlib))) (home-page "https://ceph.com/") diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm index b1b17fc68d..86c1407da9 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -2,6 +2,8 @@ ;;; Copyright © 2013, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,34 +26,28 @@ #:use-module (guix licenses) #:use-module (guix build-system gnu) #:use-module (gnu packages) - #:use-module (gnu packages pcre) - #:use-module (gnu packages guile) #:use-module (gnu packages boost) - #:use-module (gnu packages python) - #:use-module (gnu packages perl)) + #:use-module (gnu packages guile) + #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) + #:use-module (gnu packages python)) (define-public swig (package (name "swig") - (version "3.0.12") + (version "4.0.1") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/" name "/" name "/" name "-" version "/" name "-" version ".tar.gz")) - (patches (search-patches "swig-guile-gc.patch")) (sha256 (base32 - "0kf99ygrjs5616gsqhz1l7bib3a12izmxi7g48bwblbymr3z9ybw")))) + "1ac7g0gd8ndwv3ybqn5vjgqxa7090bby4db164a7mn9ssp8b803s")))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'set-env - ;; Required since Perl 5.26.0's removal of the current - ;; working directory from @INC. - ;; TODO Try removing this for later versions of SWIG. - (lambda _ (setenv "PERL_USE_UNSAFE_INC" "1") #t)) (add-before 'configure 'workaround-gcc-bug (lambda _ ;; XXX: Don't add the -isystem flag, or GCCs #include_next @@ -60,17 +56,12 @@ (("-isystem ") "-I")) #t))))) (native-inputs `(("boost" ,boost) - ("pcre" ,pcre "bin"))) ;for 'pcre-config' - (inputs `(;; Provide these to run the corresponding tests. - ("guile" ,guile-2.0) - ("perl" ,perl))) - ;; FIXME: reactivate input python as soon as the test failures - ;; fatal error: Python.h: No such file or directory - ;; # include <Python.h> - ;; are fixed. - ;; The python part probably never worked and does not seem to - ;; be needed for currently dependent packages. -;; ("python" ,python-wrapper))) + ("pcre" ,pcre "bin") ;for 'pcre-config' + ;; The following are for tests and examples: + ("guile" ,guile-3.0) + ("perl" ,perl))) + ;;("python" ,python-wrapper) + (inputs `(("pcre" ,pcre))) (home-page "http://swig.org/") (synopsis "Interface compiler that connects C/C++ code to higher-level languages") diff --git a/gnu/packages/synergy.scm b/gnu/packages/synergy.scm index 367bb323b3..739ea3bd75 100644 --- a/gnu/packages/synergy.scm +++ b/gnu/packages/synergy.scm @@ -63,7 +63,8 @@ (lambda* (#:key inputs #:allow-other-keys) (setenv "CPLUS_INCLUDE_PATH" (string-append (assoc-ref inputs "avahi") - "/include/avahi-compat-libdns_sd")) + "/include/avahi-compat-libdns_sd:" + (or (getenv "CPLUS_INCLUDE_PATH") ""))) #t))))) (inputs `(("avahi" ,avahi) diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-management.scm index 701e14a5e2..a0313c17c2 100644 --- a/gnu/packages/task-management.scm +++ b/gnu/packages/task-management.scm @@ -40,7 +40,7 @@ (inputs `(("gnutls" ,gnutls) ("lua" ,lua) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) (arguments `(#:tests? #f ; No tests implemented. #:phases diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index 1e4aa13cc9..f17e138bdb 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,17 +44,18 @@ (define-public tcl (package (name "tcl") - (version "8.6.9") + (version "8.6.10") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/tcl/Tcl/" version "/tcl" version "-src.tar.gz")) (sha256 (base32 - "0kjzj7mkzfnb7ksxanbibibfpciyvsh5ffdlhs0bmfc75kgd435d")))) + "1vc7imilx6kcb5319r7hnrp4jn5pqb41an3vr3azhgcfcgvdp5ji")) + (patches (search-patches "tcl-fix-cross-compilation.patch")))) (build-system gnu-build-system) (arguments - '(#:phases (modify-phases %standard-phases + `(#:phases (modify-phases %standard-phases (add-before 'configure 'pre-configure (lambda _ (chdir "unix") #t)) (add-after 'install 'install-private-headers @@ -73,9 +75,16 @@ ;; PREFIX/share/man. The 'validate-documentation-location' phase is ;; not able to fix this up because the default install populates both ;; PREFIX/man and PREFIX/share/man. - #:configure-flags (list (string-append "--mandir=" - (assoc-ref %outputs "out") - "/share/man")) + #:configure-flags + (list (string-append "--mandir=" + (assoc-ref %outputs "out") + "/share/man") + ;; This is needed when cross-compiling, see: + ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 + ,@(if (%current-target-system) + '("tcl_cv_strtod_buggy=1" + "ac_cv_func_strtod=yes") + '())) ;; XXX: There are a few test failures (related to HTTP, most ;; likely related to name resolution), but that doesn't cause @@ -138,7 +147,7 @@ X11 GUIs.") (define-public tk (package (name "tk") - (version "8.6.9.1") + (version "8.6.10") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/tcl/Tcl/" @@ -146,7 +155,7 @@ X11 GUIs.") version "-src.tar.gz")) (sha256 (base32 - "1d7bfkxpacy33w5nahf73lkwxqpff44w1jplg7i2gmwgiaawvjwg")) + "11p3ycqbr5116vpaxv6fl6md6gcav1ffspgr8wrlc2lxhn543pv3")) (patches (search-patches "tk-find-library.patch")))) (build-system gnu-build-system) (arguments @@ -179,9 +188,16 @@ X11 GUIs.") "/lib -lfontconfig"))) #t)))) - #:configure-flags (list (string-append "--with-tcl=" - (assoc-ref %build-inputs "tcl") - "/lib")) + #:configure-flags + (list (string-append "--with-tcl=" + (assoc-ref %build-inputs "tcl") + "/lib") + ;; This is needed when cross-compiling, see: + ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 + ,@(if (%current-target-system) + '("tcl_cv_strtod_buggy=1" + "ac_cv_func_strtod=yes") + '())) ;; The tests require a running X server, so we just skip them. #:tests? #f)) @@ -216,7 +232,7 @@ interfaces (GUIs) in the Tcl language.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("libx11" ,libx11) ("libpng" ,libpng) - ("libjpeg" ,libjpeg))) + ("libjpeg" ,libjpeg-turbo))) (arguments `(#:make-maker-flags `(,(string-append "X11=" (assoc-ref %build-inputs "libx11"))) diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index a866ecfa98..87217f633a 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -75,7 +75,6 @@ #:use-module (gnu packages qt) #:use-module (gnu packages serialization) #:use-module (gnu packages speech) - #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) #:use-module (gnu packages upnp) #:use-module (gnu packages video) @@ -194,6 +193,7 @@ used as drop-in replacement for the non-free code from RFC 3591.") ("fftw" ,fftw) ("libpcap" ,libpcap) ("libsndfile" ,libsndfile) + ("libjpeg" ,libjpeg-turbo) ;XXX: should be propagated from libtiff ("libtiff" ,libtiff) ("netpbm" ,netpbm) ("sox" ,sox) @@ -761,7 +761,7 @@ your calls and messages.") ("libsrtp" ,libsrtp) ("gnutls" ,gnutls) ("resample", resample) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux "lib"))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 9cb004e36a..226f3ee05a 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -101,12 +101,6 @@ (base32 "13djibj3s7ig13c57ywy38pxy3qfmqihii2c0g15fy2h9q8xp1gx")))) (build-system glib-or-gtk-build-system) - (arguments - '(#:phases (modify-phases %standard-phases - (replace 'bootstrap - (lambda _ - (setenv "NOCONFIGURE" "true") - (invoke "sh" "autogen.sh")))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) @@ -281,10 +275,6 @@ compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.") #:disallowed-references (,mesa) #:phases (modify-phases %standard-phases - (replace 'bootstrap - (lambda _ - (setenv "NOCONFIGURE" "indeed") - (invoke "sh" "autogen.sh"))) ;; Use elogind instead of systemd. (add-before 'configure 'remove-systemd (lambda _ diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 10270271c9..683f9d7283 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -8,7 +8,7 @@ ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be> ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Leo Famulari <leo@famulari.name> -;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2017, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> @@ -144,19 +144,17 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." "-checkout")) (sha256 (base32 - "1ix8h637hwhz4vrdhilf84kzzdza0wi8fp26nh7iws0bq08sl517")))) + "0lk7shx768sxvgr85y8bnmmnj8x4bbkgpxrz3z8jp8avi33prw83")))) (define (texlive-hyphen-package name code locations hash) + "Return a TeX Live hyphenation package with the given NAME, using source +files from LOCATIONS with expected checksum HASH. CODE is not currently in use." (let ((parent (simple-texlive-package name locations hash #:trivial? #t))) (package (inherit parent) (arguments (substitute-keyword-arguments (package-arguments parent) - ((#:modules _ '()) - '((guix build gnu-build-system) - (guix build utils) - (ice-9 match))) ((#:phases phases) `(modify-phases ,phases (replace 'build @@ -169,12 +167,8 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." (string-append root "/tex/generic/hyph-utf8/loadhyph")) (ptex (string-append root "/tex/generic/hyph-utf8/patterns/ptex")) - (filter-expression - (match ',code - ((? string?) - (format #f "\nlanguages.select!{|l| l.code == \"~a\"}\n" ',code)) - ((a b ...) - (format #f "\nlanguages.select!{|l| [~{\"~a\",~}].include? l.code }\n" ',code))))) + (quote + (string-append root "/tex/generic/hyph-utf8/patterns/quote"))) (mkdir "scripts") (copy-recursively (assoc-ref inputs "hyph-utf8-scripts") "scripts") @@ -183,74 +177,69 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." (mkdir-p patterns) (mkdir-p loaders) (mkdir-p ptex) + (mkdir-p quote) ;; Generate plain patterns (with-directory-excursion "scripts" - (substitute* "languages.rb" - (("../../../tex/generic/") "../tex/generic/")) + (substitute* "lib/tex/hyphen/path.rb" + (("^([[:blank:]]+)TeXROOT = .*" _ indent) + (string-append indent "TeXROOT = \"" + (getcwd) "/..\"\n"))) + (substitute* "generate-plain-patterns.rb" ;; Ruby 2 does not need this. (("require 'unicode'") "") - (("Unicode.upcase\\(ch\\)") "ch.upcase") ;; Write directly to the output directory - (("\\$path_root=File.*") - (string-append "$path_root=\"" out "/share/texmf-dist/\"\n")) - ;; Create quote directory when needed - (("f = File.open\\(\"#\\{\\$path_quote\\}" m) - (string-append "require 'fileutils'; FileUtils.mkdir_p $path_quote;" m)) - ;; Only generate patterns for this language. - (("languages =.*" m) - (string-append m filter-expression))) + (("File\\.join\\(PATH::TXT") + (string-append "File.join(\"" patterns "\"")) + (("File\\.join\\(PATH::QUOTE") + (string-append "File.join(\"" quote "\""))) (invoke "ruby" "generate-plain-patterns.rb") ;; Build pattern loaders (substitute* "generate-pattern-loaders.rb" - (("\\$path_tex_generic=File.*") - (string-append "$path_tex_generic=\"" root "/tex/generic\"\n")) - ;; Only generate loader for this language. - (("languages =.*" m) - (string-append m filter-expression))) + (("File\\.join\\(PATH::LOADER") + (string-append "File.join(\"" loaders "\""))) + (invoke "ruby" "generate-pattern-loaders.rb") ;; Build ptex patterns (substitute* "generate-ptex-patterns.rb" - (("\\$path_root=File.*") - (string-append "$path_root=\"" root "\"\n")) - ;; Only generate ptex patterns for this language. - (("languages =.*" m) - (string-append m filter-expression))) + (("File\\.join\\(PATH::PTEX") + (string-append "File.join(\"" ptex "\""))) (invoke "ruby" "generate-ptex-patterns.rb"))))))))) (native-inputs `(("ruby" ,ruby) + ("ruby-hydra" ,ruby-hydra) ("hyph-utf8-scripts" ,hyph-utf8-scripts))) (home-page "https://ctan.org/pkg/hyph-utf8")))) (define texlive-extra-src (origin (method url-fetch) - (uri "ftp://tug.org/historic/systems/texlive/2018/texlive-20180414-extra.tar.xz") + (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-extra.tar.xz") (sha256 (base32 - "0a83kymxc8zmlxjb0y1gf6mx7qnf0hxffwkivwh5yh138y2rfhsv")))) + "13ncf2an4nlqv18lki6y2p6pcsgs1i54zqkhfwprax5j53bk70j8")))) (define texlive-texmf-src (origin (method url-fetch) - (uri "ftp://tug.org/historic/systems/texlive/2018/texlive-20180414-texmf.tar.xz") + (uri "ftp://tug.org/historic/systems/texlive/2019/texlive-20190410-texmf.tar.xz") (sha256 (base32 - "1b8zigzg8raxkhhzphcmynf84rbdbj2ym2qkz24v8n0qx82zmqms")))) + "00n4qh9fj8v9zzy3y488hpfq1g3dnnh72y4yjsaikfcqpi59gv62")))) (define-public texlive-bin (package (name "texlive-bin") - (version "20180414") + (version "20190410") (source (origin (method url-fetch) - (uri (string-append "ftp://tug.org/historic/systems/texlive/2018/" + (uri (string-append "ftp://tug.org/historic/systems/texlive/2019/" "texlive-" version "-source.tar.xz")) (sha256 (base32 - "0khyi6h015r2zfqgg0a44a2j7vmr1cy42knw7jbss237yvakc07y")) + "1dfps39q6bdr1zsbp9p74mvalmy3bycihv19sb9c6kg30kprz8nj")) (patches (let ((arch-patch (lambda (name revision hash) @@ -261,14 +250,29 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." "&id=" revision)) (file-name (string-append "texlive-bin-" name)) (sha256 (base32 hash))))) - (arch-revision "c4b99aba97213ea554b6592a4916d3c7394a6d7b")) - (append (search-patches "texlive-bin-CVE-2018-17407.patch" - "texlive-bin-luatex-poppler-compat.patch") - (list - (arch-patch "pdftex-poppler0.76.patch" arch-revision - "15ypbh21amfsdxy7ca825x28lkmmkklxk1w660gpgvzdi7s70h0b") - (arch-patch "xetex-poppler-fixes.patch" arch-revision - "1jj1p5zkjljb7id9pjv29cw0cf8mwrgrh4ackgzz9c200vaqpsvx"))))))) + (arch-revision "49d7fe25e5ea63f136ebc20270c1d8fc9b00041c")) + (list + (arch-patch "pdftex-poppler0.76.patch" arch-revision + "03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaax") + (search-patch "texlive-bin-poppler-0.83.patch") + (arch-patch "texlive-poppler-0.84.patch" arch-revision + "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa") + (search-patch "texlive-bin-poppler-0.86.patch")))) + (modules '((guix build utils) + (ice-9 ftw))) + (snippet + '(begin + (with-directory-excursion "libs" + (let ((preserved-directories '("." ".." "lua53" "luajit"))) + ;; Delete bundled software, except Lua which cannot easily be + ;; used as an external dependency. + (for-each delete-file-recursively + (scandir "." + (lambda (file) + (and (not (member file preserved-directories)) + (eq? 'directory (stat:type (stat file))))))))) + ;; TODO: Unbundle stuff in texk/dvisvgm/dvisvgm-src/libs too. + #t)))) (build-system gnu-build-system) (inputs `(("texlive-extra-src" ,texlive-extra-src) @@ -285,7 +289,7 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." "-checkout")) (sha256 (base32 - "0wrjls1y9b4k1z10l9l8w2l3yjcw7v7by2y16kchdpkiyldlkry6")))) + "1cj04svl8bpfwjr4gqfcc04rmklz3aggrxvgj7q5bxrh7c7g18xh")))) ("cairo" ,cairo) ("fontconfig" ,fontconfig) ("fontforge" ,fontforge) @@ -316,7 +320,8 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." (arguments `(#:out-of-source? #t #:configure-flags - `("--disable-native-texlive-build" + '("--disable-static" + "--disable-native-texlive-build" "--with-system-cairo" "--with-system-freetype2" "--with-system-gd" @@ -363,18 +368,13 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc" "texk/web2c/pdftexdir/pdftosrc.cc") #t)) - (add-after 'use-code-for-new-poppler 'use-code-for-even-newer-poppler + (add-after 'unpack 'patch-dvisvgm-build-files (lambda _ - ;; Adjust for deprecated types in Poppler 0.73 and later. - (substitute* (append - (find-files "texk/web2c/luatexdir/" "\\.(cc|w)$") - '("texk/web2c/pdftexdir/pdftosrc.cc")) - (("GBool") "bool") - (("gFalse") "false") - (("gTrue") "true") - (("getCString") "c_str") - (("Guint") "unsigned int") - (("Guchar") "unsigned char")) + ;; XXX: Ghostscript is detected, but HAVE_LIBGS is never set, so + ;; the appropriate linker flags are not added. + (substitute* "texk/dvisvgm/configure" + (("^have_libgs=yes" all) + (string-append all "\nHAVE_LIBGS=1"))) #t)) (add-after 'unpack 'disable-failing-test (lambda _ @@ -451,7 +451,7 @@ This package contains the binaries.") "texlive-docstrip" (list "/tex/latex/base/docstrip.tex") (base32 - "17vdy43d9vknldz7wb69hp33r8awmdvn4xszamvgs5ikcl4cp289") + "1f9sx1lp7v34zwm186msf03q2h28rrg0lh65z59zc0cvqffs6dvb") #:trivial? #t)) (home-page "https://www.ctan.org/texlive") (synopsis "Utility to strip documentation from TeX files.") @@ -466,7 +466,7 @@ documentation from TeX files. It is part of the LaTeX base.") (list "/tex/generic/unicode-data/" "/doc/generic/unicode-data/") (base32 - "1j63kz29arfiydb8r1a53q1r4zyk1yjbcq0w9i93zddczgqzgbfb") + "0zy4v9y667cka5fi4dnc6x500907812y7pcaf63s5qxi8l7khxxy") #:trivial? #t)) (home-page "https://www.ctan.org/pkg/unicode-data") (synopsis "Unicode data and loaders for TeX") @@ -499,7 +499,7 @@ out to date by @code{unicode-letters.tex}. ") "/tex/generic/hyphen/hypht1.tex" "/tex/generic/hyphen/zerohyph.tex") (base32 - "002g5zhzbj3ikgg8zidagdp605ac9f4qmfl148mp0mbpz1svk0ni") + "0f19nml4hdx9lh7accqdk1b9ismwfm2523l5zsc4kb4arysgcakz") #:trivial? #t)) (home-page "https://tug.org/texlive/") (synopsis "Core hyphenation support files") @@ -628,7 +628,7 @@ build fonts using the Metafont system.") "/scripts/texlive/fontinst.sh") (base32 - "09drlb0krhnizw92xlm5wxzzpgn3shcxd684xlg0zc5p16l47w6h") + "0lprwib7n2ygfxvrw675vhif7ghyip2x6k70kqs9syp8lqxiizf8") #:trivial? #t))) (package (inherit template) @@ -717,7 +717,7 @@ documents.") "/fonts/map/dvips/cm/cmtext-bsr-interpolated.map" "/doc/fonts/cm/") (base32 - "1h0q71paqmg1xjg6k35ni2i6m93kmlq9rdwm913xg9n4qngywl18") + "09mvl94qrwlb9b4pkigi151l256v3djhwl4m5lgvk6yhn5y75zrp") #:trivial? #t))) (package (inherit template) @@ -1279,7 +1279,7 @@ incorporates the e-TeX extensions.") "texlive-tex-plain" (list "/tex/plain/") (base32 - "1rrfay4d7lbyj02wlf23mwvbpjd160nwlgryx97hq1vb7dva4swr") + "1m4qpaszwfv7j8a85rlwl7rs4iv5nlj67c1vvn6ysly72h9gjydb") #:trivial? #t)) (home-page "https://www.ctan.org/pkg/plain") (synopsis "Plain TeX format and supporting files") @@ -1295,7 +1295,7 @@ discussed in the book).") "texlive-hyphen-afrikaans" "af" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-af.tex") (base32 - "1vb3jccqnn1pm0680yqx52kvz595fmxnwa0cbf8qman6zglsssiw"))) + "1k9k27a27bbrb0gz36191w32l2v6d3zbdh8zhrp4l3ild2pj3n4l"))) (synopsis "Hyphenation patterns for Afrikaans") (description "The package provides hyphenation patterns for the Afrikaans language.") @@ -1309,7 +1309,7 @@ language.") "/tex/generic/hyphen/grahyph5.tex" "/tex/generic/hyphen/ibyhyph.tex") (base32 - "0kwrqsz7wdr1d9kylzwp60ka3wfbj8iad029k5h6y94nb86mf7zv"))) + "01326lb6z0s8krcfgs8i1pnjfrm4gr33rc53gy80f63qbv4ssxrw"))) (synopsis "Hyphenation patterns for ancient Greek") (description "The package provides hyphenation patterns for ancient Greek.") @@ -1318,33 +1318,11 @@ Greek.") (define-public texlive-hyphen-armenian (let ((template (texlive-hyphen-package "texlive-hyphen-armenian" "hy" - (list "/source/generic/hyph-utf8/languages/hy/generate_patterns_hy.rb") + (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hy.tex") (base32 - "0z666y580w1kpxssdanz67ykq257lf11a1mnp1jrn08zijvfrw9c")))) + "0hzny0npynsb07syxrpbfa5pkpj8r0j51pj64yxyfl1c0bak1fwp")))) (package (inherit template) - (arguments - (substitute-keyword-arguments (package-arguments template) - ((#:phases phases) - `(modify-phases ,phases - (add-before 'build 'build-patterns - (lambda _ - (let ((target (string-append (getcwd) - "/tex/generic/hyph-utf8/patterns/tex"))) - (mkdir-p target) - (with-directory-excursion "source/generic/hyph-utf8/languages/hy/" - (substitute* "generate_patterns_hy.rb" - (("\\$file = File.new.*") - (string-append "$file = File.new(\"" target - "/hyph-hy.tex\",\"w\")\n"))) - (invoke "ruby" "generate_patterns_hy.rb")) - #t))) - (add-after 'install 'install-hyph-hy.tex - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (target (string-append out "/share/texmf-dist/tex"))) - (copy-recursively "tex" target) - #t))))))) (synopsis "Hyphenation patterns for Armenian") (description "The package provides hyphenation patterns for the Armenian language.") @@ -1354,39 +1332,17 @@ language.") (define-public texlive-hyphen-basque (let ((template (texlive-hyphen-package "texlive-hyphen-basque" "eu" - (list "/source/generic/hyph-utf8/languages/eu/generate_patterns_eu.rb") + (list "/tex/generic/hyph-utf8/patterns/tex/hyph-eu.tex") (base32 - "1yhsbzf1g9dm70jfixsz51hsfvn26cwfkfxvhg7xv2piynr4v51l")))) + "15w969g1jqzn68l2b2lzf7iv7g3kil02aba3if6cag3qcnq92ra9")))) (package (inherit template) - (arguments - (substitute-keyword-arguments (package-arguments template) - ((#:phases phases) - `(modify-phases ,phases - (add-before 'build 'build-patterns - (lambda _ - (let ((target (string-append (getcwd) - "/tex/generic/hyph-utf8/patterns/tex"))) - (mkdir-p target) - (with-directory-excursion "source/generic/hyph-utf8/languages/eu/" - (substitute* "generate_patterns_eu.rb" - (("\\$file = File.new.*") - (string-append "$file = File.new(\"" target - "/hyph-eu.tex\",\"w\")\n"))) - (invoke "ruby" "generate_patterns_eu.rb")) - #t))) - (add-after 'install 'install-hyph-eu.tex - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (target (string-append out "/share/texmf-dist/tex"))) - (copy-recursively "tex" target) - #t))))))) (synopsis "Hyphenation patterns for Basque") (description "The package provides hyphenation patterns for the Basque language.") - ;; "Free for any purpose". + ;; Similar to Unicode license. (license (license:fsf-free - "/source/generic/hyph-utf8/languages/eu/generate_patterns_eu.rb"))))) + "/tex/generic/hyph-utf8/patterns/tex/hyph-eu.tex"))))) (define-public texlive-hyphen-belarusian (package @@ -1394,7 +1350,7 @@ language.") "texlive-hyphen-belarusian" "be" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-be.tex") (base32 - "1xvffph824rg43gi2xs3ny9gzlp708fyxj9zfhckmg8pzh9vv3n6"))) + "0ppm12wndaxv9da62dwkbnk7w9nijikn6jkc97m76xis338g2h02"))) (synopsis "Hyphenation patterns for Belarusian") (description "The package provides hyphenation patterns for the Belarusian language.") @@ -1408,7 +1364,7 @@ language.") "/doc/generic/hyph-utf8/bg/azbukaExtended.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-bg.tex") (base32 - "06dxkk9azsggbri04i6g62lswygzadsx3rpqvbyzvbxc5wxz1dj1"))) + "0ngrgw2rmipxss76rgfk62x9nnsgwmaxxna2jqxxhybai3q39mx5"))) (synopsis "Hyphenation patterns for Bulgarian") (description "The package provides hyphenation patterns for the Bulgarian language in T2A and UTF-8 encodings.") @@ -1422,7 +1378,7 @@ language in T2A and UTF-8 encodings.") "texlive-hyphen-catalan" "ca" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ca.tex") (base32 - "0cisx76jpw8kpd3an37m9h8ppiysnizgfzl48y9d9n3fvx8jyykb"))) + "10zzlfz5v8d9csg85ibpp2vfvmpqa56vbl85qy5gws099vygpayg"))) (synopsis "Hyphenation patterns for Catalan") (description "The package provides hyphenation patterns for Catalan in T1/EC and UTF-8 encodings.") @@ -1434,7 +1390,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-chinese" "zh-latn-pinyin" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-zh-latn-pinyin.tex") (base32 - "07gbrn5fcl5d3hyg1zpai3zp1ggl73cmvpalwvh7ah313f57gjkk"))) + "1j68mry2zy91m1kbzwhin5q2jajf6xh48npdds8wvp1sqmzih2a3"))) (synopsis "Hyphenation patterns for unaccented Chinese pinyin") (description "The package provides hyphenation patterns for unaccented Chinese pinyin T1/EC and UTF-8 encodings.") @@ -1446,7 +1402,7 @@ Chinese pinyin T1/EC and UTF-8 encodings.") "texlive-hyphen-churchslavonic" "cu" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cu.tex") (base32 - "0xkqlz3ixyl4fxsnzrbxqrb82p0n67rhgpddbiyv3qwfnbr2b5a4"))) + "0fhbwaapq2213msbhgr0d1lw06ihmrqirxj092mn73d8ynl13qlh"))) (synopsis "Hyphenation patterns for Church Slavonic") (description "The package provides hyphenation patterns for Church Slavonic in UTF-8 encoding.") @@ -1459,7 +1415,7 @@ Slavonic in UTF-8 encoding.") (list "/tex/generic/hyph-utf8/patterns/tex-8bit/copthyph.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-cop.tex") (base32 - "07i03jpdfy4ip7zbg4gnk4hk8zwj8rlni9dgrb1p8mfw2w19d80c"))) + "1jlxxvyfa2aljizaa3qlcxyhqsrb4dawv3q3fbyp2lxz6ag9fy6m"))) (synopsis "Hyphenation patterns for Coptic") (description "The package provides hyphenation patterns for Coptic in UTF-8 encoding as well as in ASCII-based encoding for 8-bit engines.") @@ -1472,7 +1428,7 @@ UTF-8 encoding as well as in ASCII-based encoding for 8-bit engines.") "texlive-hyphen-croatian" "hr" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hr.tex") (base32 - "129nz2nqilyq2477n2clx20xfbxh1qxm69zg4n2f6c4d4a8711nc"))) + "12n9r2winai15jc622sqdwclgcs1s68r6vcf7ic8vvq0x9qhwc5v"))) (synopsis "Hyphenation patterns for Croatian") (description "The package provides hyphenation patterns for Croatian in T1/EC and UTF-8 encodings.") @@ -1484,7 +1440,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-czech" "cs" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cs.tex") (base32 - "1k5516gbfp1d5p97j247byag9sdgds5zwc11bwxfk58i6zq1v0m6"))) + "1q37s6p8yfyi3rp1azbz421lg4lr4aiki8m631i4x9rmps89m8iq"))) (synopsis "Hyphenation patterns for Czech") (description "The package provides hyphenation patterns for Czech in T1/EC and UTF-8 encodings.") @@ -1496,7 +1452,7 @@ and UTF-8 encodings.") "texlive-hyphen-danish" "da" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-da.tex") (base32 - "0zxzs1b1723mav76i0wiyq4w82x8715cykvwa2bc60ldc2amv0vs"))) + "1vj8nip64rzcrcg3skm4vqad1ggqwgan74znrdns610wjcm1z9qd"))) (synopsis "Hyphenation patterns for Danish") (description "The package provides hyphenation patterns for Danish in T1/EC and UTF-8 encodings.") @@ -1509,7 +1465,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-dutch" "nl" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-nl.tex") (base32 - "0cq46cmgjc4y2x0xs9b0a5zca3jmszv4rkzmrhgjb5z2nm3xkrpi"))) + "1bg9g790ksq5cn8qihai6pacmkp9vpf35h4771z361nvwa40l8yk"))) (synopsis "Hyphenation patterns for Dutch") (description "The package provides hyphenation patterns for Dutch in T1/EC and UTF-8 encodings.") @@ -1522,7 +1478,7 @@ and UTF-8 encodings.") (list "/tex/generic/hyph-utf8/patterns/tex/hyph-en-gb.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex") (base32 - "08hyih8hn2w2q12gc4zygz0ckbz00mkzzn9898z2bicky02zg3kc"))) + "08b3jihjaamcl1pvffi0s47nwavkm66l9mrrmby3l32dfpkprrc5"))) (synopsis "Hyphenation patterns for American and British English") (description "The package provides additional hyphenation patterns for American and British English in ASCII encoding.") @@ -1536,7 +1492,7 @@ American and British English in ASCII encoding.") "texlive-hyphen-esperanto" "eo" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-eo.tex") (base32 - "03xbjbzasznsyf4wd45bya6f4snfmzpdzg5zpvqj5q6gjykdg54k"))) + "1503kzn9bk4mm4ba35cka2hm8rz0v3j5l30v5rrsd4rqgpibcgic"))) (synopsis "Hyphenation patterns for Esperanto") (description "The package provides hyphenation patterns for Esperanto ISO Latin 3 and UTF-8 encodings.") @@ -1548,7 +1504,7 @@ Latin 3 and UTF-8 encodings.") "texlive-hyphen-estonian" "et" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-et.tex") (base32 - "0idl6xajkkgxqngjn19jcfd29is5rhfn59v0z8h4sv8yjv6k934m"))) + "1rdas2450ib02rwy65i69l86nyc9h15bl07xbbwhmhxfnj8zj4v8"))) (synopsis "Hyphenation patterns for Estonian") (description "The package provides hyphenation patterns for Estonian in T1/EC and UTF-8 encodings.") @@ -1558,53 +1514,17 @@ T1/EC and UTF-8 encodings.") (define-public texlive-hyphen-ethiopic (let ((template (texlive-hyphen-package "texlive-hyphen-ethiopic" "mul-ethi" - (list "/source/generic/hyph-utf8/languages/mul-ethi/generate_patterns_mul-ethi.lua") + (list "/tex/generic/hyph-utf8/patterns/tex/hyph-mul-ethi.tex") (base32 - "1dp5qn1mhv62kj27lqc7s0ca65z9bziyavkvif9ds5ivk7aq9drw")))) + "1b93fc6j4aybh0pgq23hsn1njm6asf7sfz803fbj3ai0whsxd10l")))) (package (inherit template) - (arguments - (substitute-keyword-arguments (package-arguments template) - ((#:phases phases) - `(modify-phases ,phases - (add-before 'build 'build-patterns - (lambda* (#:key inputs #:allow-other-keys) - (let ((tex (string-append (getcwd) - "/tex/generic/hyph-utf8/patterns/tex/"))) - (mkdir-p tex) - (with-directory-excursion "source/generic/hyph-utf8/languages/mul-ethi/" - (substitute* "generate_patterns_mul-ethi.lua" - (("\"UnicodeData.txt\"") - (string-append "\"" - (assoc-ref inputs "UnicodeData.txt") - "\""))) - (invoke "texlua" "generate_patterns_mul-ethi.lua") - (rename-file "hyph-mul-ethi.tex" - (string-append tex "/hyph-mul-ethi.tex")) - #t)))) - (add-after 'install 'install-hyph-mul-ethi.tex - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (target (string-append out "/share/texmf-dist/tex"))) - (copy-recursively "tex" target) - #t))))))) - (native-inputs - `(,@(package-native-inputs template) - ("texlive-bin" ,texlive-bin) - ("UnicodeData.txt" - ,(origin - (method url-fetch) - (uri (string-append "http://www.unicode.org/Public/10.0.0/ucd/" - "UnicodeData.txt")) - (sha256 - (base32 - "1cfak1j753zcrbgixwgppyxhm4w8vda8vxhqymi7n5ljfi6kwhjj")))))) (synopsis "Hyphenation patterns for Ethiopic scripts") (description "The package provides hyphenation patterns for languages written using the Ethiopic script for Unicode engines. They are not supposed to be linguistically relevant in all cases and should, for proper typography, be replaced by files tailored to individual languages.") - (license license:lppl)))) + (license license:expat)))) (define-public texlive-hyphen-finnish (package @@ -1612,7 +1532,7 @@ be replaced by files tailored to individual languages.") "texlive-hyphen-finnish" "fi" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fi.tex") (base32 - "03n6s8dwwa5vfk9bbyhcdf7p0bc0d1rrr312hpgbz8jfc9fbgd7n"))) + "1f72b4ydb4zddvw2i004948khmwzigxkdkwfym5v1kkq0183sfpj"))) (synopsis "Hyphenation patterns for Finnish") (description "The package provides hyphenation patterns for Finnish in T1/EC and UTF-8 encodings.") @@ -1624,7 +1544,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-french" "fr" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fr.tex") (base32 - "1q82mmwvy7fdkm42958ajb53w89qkcdwybswxlwcvqngvhpy3zf0"))) + "0jc3kqys6cxjw8x8pzjln7z78l8s7f5rlyrkv7dzr1kiwnwilk9d"))) (synopsis "Hyphenation patterns for French") (description "The package provides hyphenation patterns for French in T1/EC and UTF-8 encodings.") @@ -1636,7 +1556,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-friulan" "fur" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-fur.tex") (base32 - "07m975p0ghzs9sjqqgxy7qdkqmgvg4rx4xp08zwm1parqsdlwd5d"))) + "1dlnh8slpf50mryxv7zzbx08xp54zkdfs1j7y37ipwbrajvd740f"))) (synopsis "Hyphenation patterns for Friulan") (description "The package provides hyphenation patterns for Friulan in ASCII encodings.") @@ -1645,50 +1565,15 @@ ASCII encodings.") (define-public texlive-hyphen-galician (let ((template (texlive-hyphen-package "texlive-hyphen-galician" "gl" - (list "/source/generic/hyph-utf8/languages/gl/README" - "/source/generic/hyph-utf8/languages/gl/glhybiox.tex" - "/source/generic/hyph-utf8/languages/gl/glhyextr.tex" - "/source/generic/hyph-utf8/languages/gl/glhymed.tex" - "/source/generic/hyph-utf8/languages/gl/glhyquim.tex" - "/source/generic/hyph-utf8/languages/gl/glhytec.tex" - "/source/generic/hyph-utf8/languages/gl/glhyxeog.tex" - "/source/generic/hyph-utf8/languages/gl/glpatter-utf8.tex") + (list "/tex/generic/hyph-utf8/patterns/tex/hyph-gl.tex") (base32 - "1yj1gxhkqqlyaand5gd6ij6xwffskryzlbcigdam3871a9p8x18w")))) + "13zx2r3nrxdr025g2lxrph0ga6wf7cs8dxixn4fhbl6xr1cx028g")))) (package (inherit template) - (arguments - (substitute-keyword-arguments (package-arguments template) - ((#:phases phases) - `(modify-phases ,phases - (add-before 'build 'build-patterns - (lambda* (#:key inputs #:allow-other-keys) - (let ((tex (string-append (getcwd) - "/tex/generic/hyph-utf8/patterns/tex/"))) - (mkdir-p tex) - (with-directory-excursion "source/generic/hyph-utf8/languages/gl/" - (setenv "TEXINPUTS" - (string-append (getcwd) "//:" - (assoc-ref inputs "texlive-mkpattern") "//")) - (invoke "tex" "-ini" "-8bit" "glpatter-utf8.tex") - (rename-file "hyph-gl.tex" - (string-append tex "/hyph-gl.tex")) - #t)))) - (add-after 'install 'install-hyph-gl.tex - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (target (string-append out "/share/texmf-dist/tex"))) - (copy-recursively "tex" target) - #t))))))) - (native-inputs - `(,@(package-native-inputs template) - ("texlive-bin" ,texlive-bin) - ("texlive-mkpattern" ,texlive-mkpattern))) (synopsis "Hyphenation patterns for Galician") (description "The package provides hyphenation patterns for Galician in T1/EC and UTF-8 encodings.") - ;; glhyextr.tex is the only file in the public domain. - (license (list license:lppl1.3 license:public-domain))))) + (license license:lppl1.3)))) (define-public texlive-hyphen-georgian (package @@ -1696,7 +1581,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-georgian" "ka" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ka.tex") (base32 - "01zhn6mflpiqw4lyi8dx8syiz5mky9jrxm87cgw31hanis5cml4l"))) + "0l0hk7ka04fr8x11nnw95x151cxyycy0fph772m3a3p8qk4x9wp7"))) (synopsis "Hyphenation patterns for Georgian") (description "The package provides hyphenation patterns for Georgian in T8M, T8K, and UTF-8 encodings.") @@ -1709,12 +1594,12 @@ T8M, T8K, and UTF-8 encodings.") (list "/tex/generic/hyph-utf8/patterns/tex/hyph-de-1901.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-de-1996.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-de-ch-1901.tex" - "/tex/generic/hyphen/dehyphn.tex" - "/tex/generic/hyphen/dehypht.tex" - "/tex/generic/hyphen/dehyphtex.tex" - "/tex/generic/hyphen/ghyphen.README") + "/tex/generic/dehyph/dehyphn.tex" + "/tex/generic/dehyph/dehypht.tex" + "/tex/generic/dehyph/dehyphtex.tex" + "/tex/generic/dehyph/README") (base32 - "1g0vhpvl2l69rn2lx7lkw0inrjbcxkj2sjgwd2fq7hdi4yb2ms76"))) + "0wp5by5kkf4ac6li5mbppqzw11500wa7f22p5vpz3m1kwd15zavw"))) (synopsis "Hyphenation patterns for German") (description "This package provides hyphenation patterns for German in T1/EC and UTF-8 encodings, for traditional and reformed spelling, including @@ -1733,7 +1618,7 @@ Swiss German.") "/tex/generic/hyphen/grmhyph5.tex" "/tex/generic/hyphen/grphyph5.tex") (base32 - "04626jhlrv2flgdygm7sfv6xpqhfwiavi16gy2ac04iliyk4rypg"))) + "1qyr6m1nh6d4wj68616cfxv4wjpiy1w2rlldxlx2ajzba381w3hf"))) (synopsis "Hyphenation patterns for Greek") (description "This package provides hyphenation patterns for Modern Greek in monotonic and polytonic spelling in LGR and UTF-8 encodings.") @@ -1747,7 +1632,7 @@ in monotonic and polytonic spelling in LGR and UTF-8 encodings.") "/doc/generic/hyph-utf8/hu/" "/tex/generic/hyph-utf8/patterns/tex/hyph-hu.tex") (base32 - "0c81w2569cqsi4j56azwz0lfx16541zhiqgmn3m4iwh7mpx3rji8"))) + "1j1b8kksg9r8nmjyjvvz8fr3hgcrjj6jlybf9p06nwrrwm2r8j8f"))) (synopsis "Hyphenation patterns for Hungarian") (description "This package provides hyphenation patterns for Hungarian in T1/EC and UTF-8 encodings.") @@ -1760,7 +1645,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-icelandic" "is" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-is.tex") (base32 - "1ah1f82lgfhqgid4ngsfiypybx10v8gwxnb12396vfsj3bq6j0ba"))) + "1m9xj41csj3ldym09d82zjbd3345sg2z10d8pxpvhgibf97mb66h"))) (synopsis "Hyphenation patterns for Icelandic") (description "This package provides hyphenation patterns for Icelandic in T1/EC and UTF-8 encodings.") @@ -1783,7 +1668,7 @@ T1/EC and UTF-8 encodings.") "/tex/generic/hyph-utf8/patterns/tex/hyph-ta.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-te.tex") (base32 - "1v8zc3wdbkhzjrflndmz4gdj11syz8vrcg0vwvm5bwhkx23g91lv"))) + "02d2kcd3lpk95fykjwhzw9s2a1s2w1skz8h2mmszrz979d1xzhpm"))) (synopsis "Indic hyphenation patterns") (description "This package provides hyphenation patterns for Assamese, Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Oriya, Panjabi, Tamil @@ -1796,7 +1681,7 @@ and Telugu for Unicode engines.") "texlive-hyphen-indonesian" "id" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-id.tex") (base32 - "0mf0hr9c952kb2hmzid7fqg5whshwpribbyndb3ba092wh02abh5"))) + "1r62w02rf0i4z0jgij54d16qjbj0zyfwm9dwdkqka76jrivij83q"))) (synopsis "Indonesian hyphenation patterns") (description "This package provides hyphenation patterns for Indonesian (Bahasa Indonesia) in ASCII encoding. They are probably also @@ -1809,7 +1694,7 @@ usable for Malay (Bahasa Melayu).") "texlive-hyphen-interlingua" "ia" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ia.tex") (base32 - "1aihgma3rix4jkc1z5k1lh6hlfrncn66yj0givd3j6xjqflafr2g"))) + "0a9na20vjnzhgjbicaxay0jk4rm5zg1rjyiswr377mjhd9mx5cg3"))) (synopsis "Interlingua hyphenation patterns") (description "This package provides hyphenation patterns for Interlingua in ASCII encoding.") @@ -1821,7 +1706,7 @@ in ASCII encoding.") "texlive-hyphen-irish" "ga" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ga.tex") (base32 - "02k1fykgj3xamczjq16i9fsjjsh78pp5ypmh93p64izk2vymfwk0"))) + "1h1l9jzkpsb91nyhz6s6c9jfrbz8jx5ip8vyq3dkz0rl6g960i6b"))) (synopsis "Irish hyphenation patterns") (description "This package provides hyphenation patterns for Irish (Gaeilge) in T1/EC and UTF-8 encodings.") @@ -1834,7 +1719,7 @@ Irish (Gaeilge) in T1/EC and UTF-8 encodings.") "texlive-hyphen-italian" "it" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-it.tex") (base32 - "1a65q3hjn2p212cgv6p7wa0wcn34qnxcz2pl3v3ip0xmb16qqsk5"))) + "03c7jiqslfxvl3gbdx79hggbvrfi2l4z2bnwxc0na8f8lkp1m787"))) (synopsis "Italian hyphenation patterns") (description "This package provides hyphenation patterns for Italian in ASCII encoding. Compliant with the Recommendation UNI 6461 on hyphenation @@ -1848,7 +1733,7 @@ UNI).") "texlive-hyphen-kurmanji" "kmr" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-kmr.tex") (base32 - "1145ykfd0b0hgklindlxdgkqmsnj3cai3cwgllz411yqmrhjc6y9"))) + "01ylbsi5wymrdrxr9b28nmjmcj72mdhqr657lwsb6m9aj33c9ql6"))) (synopsis "Kurmanji hyphenation patterns") (description "This package provides hyphenation patterns for Kurmanji (Northern Kurdish) as spoken in Turkey and by the Kurdish diaspora in @@ -1863,7 +1748,7 @@ Europe, in T1/EC and UTF-8 encodings.") "/tex/generic/hyph-utf8/patterns/tex/hyph-la-x-liturgic.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-la.tex") (base32 - "1d8d6b47r4r000gqgzyl0sy9is0y0dg41jp8fw4gqq8qmcgdxgsg"))) + "0rxg8a4s5cpj8vlkz5a74a036axda5jqgvr3f9aj2cc2x9f2f3w9"))) (synopsis "Liturgical Latin hyphenation patterns") (description "This package provides hyphenation patterns for Latin in T1/EC and UTF-8 encodings, mainly in modern spelling (u when u is needed and v @@ -1884,7 +1769,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-latvian" "lv" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-lv.tex") (base32 - "1xbh5s6nwfjbv7g4kmcpjkm02a6s767p7jn9qjcnz5ip0ndl5g66"))) + "00jf8xma4ldz0zpqwma97k9q3j0mqx7qdj6b7baph3n5xgc24aaw"))) (synopsis "Latvian hyphenation patterns") (description "This package provides hyphenation patterns for Latvian in L7X and UTF-8 encodings.") @@ -1897,7 +1782,7 @@ L7X and UTF-8 encodings.") "texlive-hyphen-lithuanian" "lt" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-lt.tex") (base32 - "0v9spw0qkygkihj5app2immzqqr98w81pz460bcgvj1ah35jdfsl"))) + "1kfq7j2ajg6nj952s1ygd520sj9z9kl0bqvd291a36ni2b1frzgd"))) (synopsis "Lithuanian hyphenation patterns") (description "This package provides hyphenation patterns for Lithuanian in L7X and UTF-8 encodings.") @@ -1912,7 +1797,7 @@ L7X and UTF-8 encodings.") (list "/tex/generic/hyph-utf8/patterns/tex/hyph-mn-cyrl-x-lmc.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-mn-cyrl.tex") (base32 - "0lqq3jgwgnclb1cn3x99xmk90xra9q51b00ypwy5crssmy023hqc"))) + "1y1b91ihrdl9bad3rxlsfjpd9wmyd5zzgci3qv9w8qqk33jxhwya"))) (synopsis "Mongolian hyphenation patterns in Cyrillic script") (description "This package provides hyphenation patterns for Mongolian in T2A, LMC and UTF-8 encodings.") @@ -1927,7 +1812,7 @@ T2A, LMC and UTF-8 encodings.") "/tex/generic/hyph-utf8/patterns/tex/hyph-nn.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-no.tex") (base32 - "1fxnf671yz0p3lmdkspna7fjh96br1jy6yf7v17yh4fxwry3s4yz"))) + "08gbwj64p4fckm199k52yp5lx65h9f4wwdkvl4pv4aa7k370jq9y"))) (synopsis "Norwegian Bokmal and Nynorsk hyphenation patterns") (description "This package provides hyphenation patterns for Norwegian Bokmal and Nynorsk in T1/EC and UTF-8 encodings.") @@ -1941,7 +1826,7 @@ Bokmal and Nynorsk in T1/EC and UTF-8 encodings.") "texlive-hyphen-occitan" "oc" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-oc.tex") (base32 - "1y6j6ac9ncn79p7hnp6mdwdsw9ij14zyjby5iwdhpvzzn7yyc7p8"))) + "0vhjbq2nr58vhqwwky3cwx4dqiwjmmfwp81rb65mfpf0m8yypdfg"))) (synopsis "Occitan hyphenation patterns") (description "This package provides hyphenation patterns for Occitan in T1/EC and UTF-8 encodings. They are supposed to be valid for all the Occitan @@ -1950,13 +1835,26 @@ It ranges from the Val d'Aran within Catalunya, to the South Western Italian Alps encompassing the southern half of the French pentagon.") (license license:lppl1.0+))) +(define-public texlive-hyphen-pali + (package + (inherit (texlive-hyphen-package + "texlive-hyphen-pali" "pi" + (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pi.tex") + (base32 + "1fak853s4ijdqgrnhwymaq1lh8jab3qfyxapdmf6qpg6bqd20kxq"))) + (synopsis "Panjabi hyphenation patterns") + (description "This package provides hyphenation patterns for Panjabi in +T1/EC encoding.") + ;; Can be used with either license. + (license (list license:expat license:lgpl3+ license:gpl3+)))) + (define-public texlive-hyphen-piedmontese (package (inherit (texlive-hyphen-package "texlive-hyphen-piedmontese" "pms" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pms.tex") (base32 - "00fqzymkg374r3dzf1y82k6b18bqrf688vnjv0vkvw5a45srlb5r"))) + "0xva3l2gwzkqw1sz64k5g5iprhdyr27w1mv8rxp8x62i5y3aqr1k"))) (synopsis "Piedmontese hyphenation patterns") (description "This package provides hyphenation patterns for Piedmontese in ASCII encoding. Compliant with 'Gramatica dla lengua piemonteisa' by @@ -1969,7 +1867,7 @@ Camillo Brero.") "texlive-hyphen-polish" "pl" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pl.tex") (base32 - "0dzq8ca96q7m5bslh51x8d30pdb86glh2gn3mmvq5ip813ckwh3s"))) + "1c22g99isxapv4xjrmsw24hhp1xb83wbgcxyd8j24mxdnizywxzm"))) (synopsis "Polish hyphenation patterns") (description "This package provides hyphenation patterns for Polish in QX and UTF-8 encodings.") @@ -1982,7 +1880,7 @@ and UTF-8 encodings.") "texlive-hyphen-portuguese" "pt" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-pt.tex") (base32 - "1waxrmm33fd2qfc4kiaiblg8kwzasrvgq4j3l14z733d0hlg4rfz"))) + "00rkjy4p7893zs940bq3s4hp7al0skgxqggj5qfax0bx8karf30b"))) (synopsis "Portuguese hyphenation patterns") (description "This package provides hyphenation patterns for Portuguese in T1/EC and UTF-8 encodings.") @@ -1994,7 +1892,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-romanian" "ro" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ro.tex") (base32 - "12i1vryl51yhdpj163ahfyiy21rjmf4gkqgslpriirdjmyrwrs65"))) + "1ykb5v7ip6p3n34wq8qypfyrap4gg946by5rsl6ab0k5gv6ypsbf"))) (synopsis "Romanian hyphenation patterns") (description "This package provides hyphenation patterns for Romanian in T1/EC and UTF-8 encodings.") @@ -2007,7 +1905,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-romansh" "rm" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-rm.tex") (base32 - "06wan8i4appc1zfvc0q4cgnfv1nj0qgk02w3sg56zc11hf8sywl9"))) + "0a1q9p6sp5n6a9w6xhwk03vmkrrmnh2md7g1k4qhnf0dc4h7dy9r"))) (synopsis "Romansh hyphenation patterns") (description "This package provides hyphenation patterns for Romansh in ASCII encodings. They are supposed to comply with the rules indicated by the @@ -2020,7 +1918,7 @@ Lia Rumantscha (Romansh language society).") "texlive-hyphen-russian" "ru" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-ru.tex") (base32 - "09s4vq23x4vff08ykmf08dvcdradjzzwvyys8p2wk6jxaqp980s3"))) + "00sy7qh5f8ryxw36fwbyd1yi2hxhv7hmk99yp7dwh73n4mxv6lpl"))) (synopsis "Russian hyphenation patterns") (description "This package provides hyphenation patterns for Russian in T2A and UTF-8 encodings.") @@ -2033,7 +1931,7 @@ T2A and UTF-8 encodings.") (list "/doc/generic/hyph-utf8/sa/hyphenmin.txt" "/tex/generic/hyph-utf8/patterns/tex/hyph-sa.tex") (base32 - "0grnn09l4i5yridx10yhm6dg9sbhgc2pmsp1p6hrcy7lzkqwdvs3"))) + "0gi2qk0wf388h9n25gzhv0cdz67ph83wal8h3iz2sqnpdjsw8kpc"))) (synopsis "Sanskrit hyphenation patterns") (description "This package provides hyphenation patterns for Sanskrit and Prakrit in longdesc transliteration, and in Devanagari, Bengali, Kannada, @@ -2050,7 +1948,7 @@ Malayalam longdesc and Telugu scripts for Unicode engines.") "/tex/generic/hyph-utf8/patterns/tex/hyph-sh-latn.tex" "/tex/generic/hyph-utf8/patterns/tex/hyph-sr-cyrl.tex") (base32 - "0fhdfydyaspb8dwirlf24vn7y9dzwmhsld0mmw0fz1lmcfaj252n"))) + "0pwc9z0m5y6acq1vqm0da9akg156jbhxzvsfp2f8bsz5b99y5z45"))) (synopsis "Serbian hyphenation patterns") (description "This package provides hyphenation patterns for Serbian in T1/EC, T2A and UTF-8 encodings.") @@ -2063,7 +1961,7 @@ T1/EC, T2A and UTF-8 encodings.") "texlive-hyphen-slovak" "sk" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sk.tex") (base32 - "1cgw6fmyci3za3vsa49b6m74wqv582w0rpca7s9xva3hqm1m5qdg"))) + "0ppp53bbclp5c8wvx748krvrp5y5053khgkjnnv966a90fvp3vgd"))) (synopsis "Slovak hyphenation patterns") (description "This package provides hyphenation patterns for Slovak in T1/EC and UTF-8 encodings.") @@ -2075,7 +1973,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-slovenian" "sl" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sl.tex") (base32 - "1ixf2pxir9xf1gggq9k28xxglsq9bwqlghd9cl4amk5vrn5bjbds"))) + "02n8l9yf4hqyhbpsc1n6b2mggy09z6lq4dcb8ndiwawb6h0mp7s4"))) (synopsis "Slovenian hyphenation patterns") (description "This package provides hyphenation patterns for Slovenian in T1/EC and UTF-8 encodings.") @@ -2091,7 +1989,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-spanish" "es" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-es.tex") (base32 - "0jgs0zzyk2wwrjbx2hqdh5qggrnik9xmsxygbfhlb7gdrcrs0mbj"))) + "1h3yg9vcq0lf7hxv0ahkqmyg269dxjs8m2mz8sgz5l1fxmvahvaj"))) (synopsis "Hyphenation patterns for Spanish") (description "The package provides hyphenation patterns for Spanish in T1/EC and UTF-8 encodings.") @@ -2103,7 +2001,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-swedish" "sv" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-sv.tex") (base32 - "12sf9f43zwyzb4cn57yry8r4zmwdc7cfdljn3qwxwrny4m3sw4w8"))) + "1n7incy7n24pix1q2i8c3h7i78zpql5ayhskavlmy6mhd7ayncaw"))) (synopsis "Swedish hyphenation patterns") (description "This package provides hyphenation patterns for Swedish in T1/EC and UTF-8 encodings.") @@ -2115,7 +2013,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-thai" "th" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-th.tex") (base32 - "15k1n4xdw8zzd5nrh76s53z4j95gxa4i2h1av5gx5vrjgblzzl97"))) + "00gxcs4jfqifd5cnrjipn77m73fmpw2qms4lp216jj3kz4a7h9kf"))) (synopsis "Thai hyphenation patterns") (description "This package provides hyphenation patterns for Thai in LTH and UTF-8 encodings.") @@ -2124,33 +2022,11 @@ and UTF-8 encodings.") (define-public texlive-hyphen-turkish (let ((template (texlive-hyphen-package "texlive-hyphen-turkish" "tr" - (list "/source/generic/hyph-utf8/languages/tr/generate_patterns_tr.rb") + (list "/tex/generic/hyph-utf8/patterns/tex/hyph-tr.tex") (base32 - "0rvlhs2z2sn312lqsf44bzknid5dry7d2sl2q1whfvr0y4qj1g8f")))) + "04sihjgpm31i5bi67rrfp15w3imn7hxwwk70v0vhx053ghxy72vh")))) (package (inherit template) - (arguments - (substitute-keyword-arguments (package-arguments template) - ((#:phases phases) - `(modify-phases ,phases - (add-before 'build 'build-patterns - (lambda _ - (let ((target (string-append (getcwd) - "/tex/generic/hyph-utf8/patterns/tex"))) - (mkdir-p target) - (with-directory-excursion "source/generic/hyph-utf8/languages/tr/" - (substitute* "generate_patterns_tr.rb" - (("\\$file = File.new.*") - (string-append "$file = File.new(\"" target - "/hyph-tr.tex\",\"w\")\n"))) - (invoke "ruby" "generate_patterns_tr.rb")) - #t))) - (add-after 'install 'install-hyph-tr.tex - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (target (string-append out "/share/texmf-dist/tex"))) - (copy-recursively "tex" target) - #t))))))) (synopsis "Hyphenation patterns for Turkish") (description "The package provides hyphenation patterns for Turkish in T1/EC and UTF-8 encodings. The patterns for Turkish were first produced for @@ -2163,37 +2039,15 @@ compatibility with 8-bit engines.") (define-public texlive-hyphen-turkmen (let ((template (texlive-hyphen-package "texlive-hyphen-turkmen" "tk" - (list "/source/generic/hyph-utf8/languages/tk/generate_patterns_tk.rb") + (list "/tex/generic/hyph-utf8/patterns/tex/hyph-tk.tex") (base32 - "1wlqx8wb0wsqhdv823brc3i8w1vf4m4bkb2vg917j5dq8p8p71aw")))) + "0g5ip2lw9g47s61mv3cypswc6qm7zy9c4iqq4h19ysvds81adzkr")))) (package (inherit template) - (arguments - (substitute-keyword-arguments (package-arguments template) - ((#:phases phases) - `(modify-phases ,phases - (add-before 'build 'build-patterns - (lambda _ - (let ((target (string-append (getcwd) - "/tex/generic/hyph-utf8/patterns/tex"))) - (mkdir-p target) - (with-directory-excursion "source/generic/hyph-utf8/languages/tk/" - (substitute* "generate_patterns_tk.rb" - (("\\$file = File.new.*") - (string-append "$file = File.new(\"" target - "/hyph-tr.tex\",\"w\")\n"))) - (invoke "ruby" "generate_patterns_tk.rb")) - #t))) - (add-after 'install 'install-hyph-tk.tex - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (target (string-append out "/share/texmf-dist/tex"))) - (copy-recursively "tex" target) - #t))))))) (synopsis "Hyphenation patterns for Turkmen") (description "The package provides hyphenation patterns for Turkmen in T1/EC and UTF-8 encodings.") - (license license:public-domain)))) + (license license:expat)))) (define-public texlive-hyphen-ukrainian (package @@ -2201,7 +2055,7 @@ T1/EC and UTF-8 encodings.") "texlive-hyphen-ukrainian" "uk" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-uk.tex") (base32 - "17z0gmw5svsf5zlhjkckwk4y21g7prfwj473jlqnwcsr8a941gsf"))) + "0fbfhx1fmbshxr4ihsjaqgx251h69h7i288p8gh3w6ysgxr53p60"))) (synopsis "Ukrainian hyphenation patterns") (description "This package provides hyphenation patterns for Ukrainian in T2A and UTF-8 encodings.") @@ -2214,7 +2068,7 @@ T2A and UTF-8 encodings.") "texlive-hyphen-uppersorbian" "hsb" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-hsb.tex") (base32 - "1q42s32cfbynlnzn9hpcldi77fszi5xkn1c85l8xqjmfydqbqdyi"))) + "0x0051wph3sqmzzw6prvjy6bp7gn02rbmys1bmbc210jk3pkylfj"))) (synopsis "Upper Sorbian hyphenation patterns") (description "This package provides hyphenation patterns for Upper Sorbian in T1/EC and UTF-8 encodings.") @@ -2226,7 +2080,7 @@ in T1/EC and UTF-8 encodings.") "texlive-hyphen-welsh" "cy" (list "/tex/generic/hyph-utf8/patterns/tex/hyph-cy.tex") (base32 - "0h8yjj5zdg0hvpb2vx9gi376536nl59hp8w286z1a13diaayg1m2"))) + "1bpxp3jiifdw7waw2idz5j9xgi3526nkxm8mbmsspr4mlf2xyr76"))) (synopsis "Welsh hyphenation patterns") (description "This package provides hyphenation patterns for Welsh in T1/EC and UTF-8 encodings.") @@ -2255,7 +2109,7 @@ T1/EC and UTF-8 encodings.") "/doc/generic/hyph-utf8/img/miktex-languages.png" "/doc/generic/hyph-utf8/img/texlive-collection.png") (base32 - "10y8svgk68sivmgzrv8gv137r7kv49cs256cq2wja9ms437pxvbj"))) + "1bar5mc808ch20anhqrdxcwiych359qsvr7mggxpg2l2kq5xdyq0"))) (outputs '("out" "doc")) (build-system gnu-build-system) (arguments @@ -2388,7 +2242,7 @@ converters, will completely supplant the older patterns.") (list "/tex/generic/dehyph-exptl/" "/doc/generic/dehyph-exptl/") (base32 - "1w2danvvy2f52hcb4acvjks53kcanwxr9s990fap6mj279hpgmh2") + "1fnqc63gz8gvdyfz45bx8dxn1r1rwrypahs3bqd2vlc8ff76xp86") #:trivial? #t)) (propagated-inputs `(("texlive-hyphen-base" ,texlive-hyphen-base) @@ -2495,7 +2349,7 @@ UCY (Omega Unicode Cyrillic), LCY, LWN (OT2), and koi8-r.") "/web2c/tcvn-t5.tcx" "/web2c/viscii-t5.tcx") (base32 - "0ajfp9kr330lcm2ymr3kl9zn6y2xjkrzpa0c0azc4qdm5jllawb9") + "191i8n3g46p53bb9dkx2ggwpzy7skgg0pbklsrpx8x4ayd86wcaf") #:trivial? #t)) (home-page "https://www.tug.org/texlive/") (synopsis "Files related to the path searching library for TeX") @@ -2528,18 +2382,16 @@ formats.") ;; these are not: "/tex/latex/base/idx.tex" "/tex/latex/base/lablst.tex" - "/tex/latex/base/lppl.tex" "/tex/latex/base/ltnews.cls" "/tex/latex/base/ltxcheck.tex" "/tex/latex/base/ltxguide.cls" "/tex/latex/base/minimal.cls" "/tex/latex/base/sample2e.tex" "/tex/latex/base/small2e.tex" - "/tex/latex/base/source2e.tex" "/tex/latex/base/testpage.tex" "/tex/latex/base/texsys.cfg") (base32 - "0f8d41wk1gb7i6xq1a10drwhhayc50pg9nwzjkrqnxrv0pcc08w5") + "0m0gjb4hbsf2iqkkx3px4f28r2scjvsjv4zb2whkbnb44apyw1f0") #:trivial? #t))) (package (inherit template) @@ -2552,6 +2404,13 @@ formats.") (srfi srfi-26))) ((#:phases phases) `(modify-phases ,phases + ;; The literal tab in the dtx file is translated to the string + ;; "^^I" in the generated Lua file, which causes a syntax error. + (add-after 'unpack 'fix-lua-sources + (lambda _ + (substitute* "source/latex/base/ltluatex.dtx" + ((" ") " ")) + #t)) (replace 'build (lambda* (#:key inputs #:allow-other-keys) ;; Find required fonts @@ -2594,6 +2453,7 @@ formats.") '("aleph aleph" "lamed aleph" "uptex uptex" "euptex euptex" "eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex eptex" "csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex pdftex" + "luacsplain luatex" "cont-en xetex" "cont-en pdftex" "pdfcsplain xetex" "pdfcsplain pdftex" "pdfcsplain luatex" "cslatex pdftex" "mptopdf pdftex" "uplatex euptex" "jadetex pdftex" @@ -2652,7 +2512,7 @@ formats.") "/tex/generic/config/luatexiniconfig.tex" "/web2c/texmfcnf.lua") (base32 - "0cs67a8wwh4s5p5gn8l49jyccgy7glw8mfq5klgn3dfsl2fdlhk7"))))) + "1gi87wy12r8w8fhx9ajcid382dmqzf6b9070b5nndvbbjrvhwf23"))))) (propagated-inputs `(("texlive-dehyph-exptl" ,texlive-dehyph-exptl) ("texlive-etex" ,texlive-etex) @@ -2697,6 +2557,7 @@ formats.") ("texlive-hyphen-mongolian" ,texlive-hyphen-mongolian) ("texlive-hyphen-norwegian" ,texlive-hyphen-norwegian) ("texlive-hyphen-occitan" ,texlive-hyphen-occitan) + ("texlive-hyphen-pali" ,texlive-hyphen-pali) ("texlive-hyphen-piedmontese" ,texlive-hyphen-piedmontese) ("texlive-hyphen-polish" ,texlive-hyphen-polish) ("texlive-hyphen-portuguese" ,texlive-hyphen-portuguese) @@ -2738,7 +2599,7 @@ contain.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q")))) + "1h78zw0vhldx478zs4v86ajg7vpkysd1kg3npc480qqls3q6ba40")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/filecontents")) (home-page "https://www.ctan.org/pkg/filecontents") @@ -2803,19 +2664,13 @@ users, via its Plain TeX version.)") (define-public texlive-latex-fancyvrb (package - (name "texlive-latex-fancyvrb") - (version (number->string %texlive-revision)) - (source (origin - (method svn-fetch) - (uri (texlive-ref "latex" "fancyvrb")) - (file-name (string-append name "-" version "-checkout")) - (sha256 - (base32 - "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv")))) - (build-system texlive-build-system) - (arguments - '(#:tex-directory "latex/fancyvrb" - #:tex-format "latex")) + (inherit (simple-texlive-package + "texlive-latex-fancyvrb" + (list "/doc/latex/fancyvrb/README" + "/tex/latex/fancyvrb/") + (base32 + "1dwkcradz9nwpjwmv1sjzn77lvw25ypr0rrgmf1kd8pd2mw7dxcn") + #:trivial? #t)) (home-page "https://www.ctan.org/pkg/fancyvrb") (synopsis "Sophisticated verbatim text") (description @@ -2968,7 +2823,7 @@ pdf and HTML backends. The package is distributed with the @code{backref} and (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "1m9fg8ddhpsl1212igr9a9fmj012lv780aghjn6fpidg2wqrffmn")))) + "0pi2d6gsddcs9wprdbar46s91kdc5fxl1m79g7xrbccsx8s9xbml")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/oberdiek" @@ -3001,7 +2856,7 @@ arrows; record information about document class(es) used; and many more.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0vj7h1fgf1396h4qjdc2m07y08i54gbbfrxl8y327cn3r1n093s6")))) + "1wqvn4z0s92h5iqzrvxw7hinzp95avjk9v8lnqbqr4kz6nv4xb9l")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/tools" @@ -3070,7 +2925,7 @@ Live distribution.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0p3fsxap1ilwjz356aq4s5ygwvdscis8bh93g8klf8mhrd8cr2jy")))) + "0s77z2cbv841l45qrpf0s8qhzfa4wi689lg7zkw88qg18nzvy0ly")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/l3kernel")) @@ -3094,7 +2949,7 @@ that the LaTeX3 conventions can be used with regular LaTeX 2e packages.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0pyx0hffiyss363vv7fkrcdiaf7p099xnq0mngzqc7v8v9q849hs")))) + "1cv4fk9pabh7mkxhfsdmh4k8xpmzg1psgcsvd11c869m7n3a629h")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/l3packages" @@ -3149,7 +3004,7 @@ programming tools and kernel support. Packages provided in this release are: (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "1p0mkn6iywl0k4m9cx3hnhylpi499inisff3f72pcf349baqsnvq")))) + "1223cw029n6zff7pqpwbsq1x8v3w63smczkmnybqxkw5h2za8gbz")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/fontspec" @@ -3332,7 +3187,7 @@ loading fonts by their proper names instead of file names.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0arvk7gn32mshnfdad5qkgf3i1arxq77k3vq7wnpm4nwnrzclxal")))) + "0qgk2332dacsxn1z95qzp35gbs7wrzl1ipjdhnmk1r897msm4sf5")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/amsmath")) (home-page "https://www.ctan.org/pkg/amsmath") @@ -3385,7 +3240,7 @@ distribution.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0yhlfiz3fjc8jd46f1zrjj4jig48l8rrzh8cmd8ammml8z9a01z6")))) + "1rwqq841i1rxywymzwkw0cw2yhgvxwjx5mgygfasvypwrwll6f6s")))) (build-system texlive-build-system) (arguments '(#:tex-directory "generic/babel" @@ -3442,7 +3297,7 @@ for Canadian and USA text.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0h47s67gnhdaxfgbf8pirp5vw4z6rrhxl8zav803yjxka0096i3y")))) + "129f9w41cb6yyrr6kpv3zz9ml6334hyq1wcz7j9jn47p0hlxqfk8")))) (build-system texlive-build-system) (arguments '(#:tex-directory "generic/babel-german")) (home-page "https://www.ctan.org/pkg/babel-german") @@ -3656,7 +3511,7 @@ standard LaTeX packages." (number->string %texlive-revision))) (sha256 (base32 - "06mwpy5i218g5k3sf4gba0fmxgas82hkzx9fhwn67z5ik37d8apq")))))) + "0faqknqxs80qp9ywk0by5k85s0yalg97c4lja4q56lsyblrr4j7i")))))) (home-page (package-home-page texlive-bin)) (synopsis "Union of TeX Live packages") (description "This package provides a subset of the TeX Live @@ -4131,10 +3986,10 @@ to something that's not a float.") (package (inherit (simple-texlive-package "texlive-doi" - (list "/doc/latex/doi/README" + (list "/doc/latex/doi/README.md" "/tex/latex/doi/") (base32 - "17lnnhfmb8g4nh4fnyc9616h8xg3vjrzmlvfmlfqwwlfpma9xnnw") + "18z9922lqb3hliqn95h883fndqs4lgyi5yqbnq2932ya0imc3j7h") #:trivial? #t)) (home-page "https://www.ctan.org/pkg/doi") (synopsis "Create correct hyperlinks for DOI numbers") @@ -4158,7 +4013,7 @@ hyperlink to the target of the DOI.") (list "/doc/latex/etoolbox/" "/tex/latex/etoolbox/") (base32 - "1qg4x5r4ibinl6zy5lq70lv4zcrjsn54n6hwv31k5kl7mwv0mvr3") + "1cc1vw1ach55g4ff4x30by8k1mg01w199ccxvn72f5khlnnxial0") #:trivial? #t)) (home-page "https://www.ctan.org/pkg/etoolbox") (synopsis "e-TeX tools for LaTeX") @@ -4260,7 +4115,7 @@ course of the framed/shaded matter. There is also a command (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0sikazkg0dpkcpzlbqw8qzxr81paf2f443vsrh14jnw7s4gswvc5")))) + "1br4kv9y17cvngp83ykpvy7gy3jqfan5plk7sggcgbdfhndi5dsr")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/g-brief" @@ -4333,7 +4188,7 @@ BibLaTeX, and is considered experimental.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0yw6bjfgsli3s1dldsgb7mkr7lnk329cgdjbgs8z2xn59pmmdsn4")))) + "0a8f38c2ds1flxcr0apdpyaaz3k6fyalz6dkbrmcv9srjc40mh3n")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/geometry")) (propagated-inputs @@ -4384,7 +4239,7 @@ array environments; verbatim handling; and syntax diagrams.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "03ma58z3ypsbp7zgkzb1ylpn2ygr27cxzkf042ns0rif4g8s491f")))) + "0na7v4hsyx5s67cpjj2dbnq8j67k8lln6b19hmj631gfs27slss1")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/polyglossia")) (home-page "https://www.ctan.org/pkg/polyglossia") @@ -4430,7 +4285,7 @@ situations where longtable has problems.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "06cf821y1j7jdg93pb41ayigrfwgn0y49d7w1025zlijjxi6bvjp")))) + "16jy02m089m7n6v9vbfi4xjgngc1fnvsmmppk8axfwzbhdky3c9c")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -4604,7 +4459,7 @@ copy-and-paste functions work properly.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "190pmq8la2rq07xry8bn8z8yywzxv6fqyqaj7yjfj5rgw6x0mas8")))) + "16vd99p01a0y30xr5yf1z2j5da9x8gy21vb30wk08jh31zffbaqj")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/colortbl")) (home-page "https://www.ctan.org/pkg/colortbl") @@ -4663,7 +4518,7 @@ floats, center, flushleft, and flushright, lists, and pages.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "1xsnzx7vgdfh9zh2m7bjz6bgdpxsgb1kyc19p50vhs34x5nbgsnr")))) + "0hrwspqkqfahxyzzsnjyrxlgxj06zw1f3636gx76pvl4xhvdj1cj")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -4741,7 +4596,7 @@ footnotes with symbols rather than numbers.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "1nsn9wp3wl12b36c0sqrim33lf33cr5wky0h4ncnw8lvqgm7h8wf")))) + "1fbrhqj22vzakn30j71fc41l8nliqbv1dmxm0zlwi2qjjbq6fwav")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/listings" @@ -4875,7 +4730,7 @@ fonts are available in (traced) Adobe Type 1 format, as part of the set, Latin Modern, is not actually a direct development of the EC set, and differs from the EC in a number of particulars.") (license (license:fsf-free "https://www.tug.org/svn/texlive/tags/\ -texlive-2018.2/Master/texmf-dist/doc/fonts/ec/copyrite.txt")))) +texlive-2019.3/Master/texmf-dist/doc/fonts/ec/copyrite.txt")))) ;; FIXME: the fonts should be built from source, but running "tex aefonts.tex" ;; fails with obscure TeX-typical error messages. @@ -5096,7 +4951,7 @@ one of the packages @code{calrsfs} and @code{mathrsfs}.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "1xvmms28mvvfpks9x7lfya2xhh5k8jy3qnlih1mzcnf156xnb89z")))) + "0y2y08kr3w6asm9lblj9yywqmhaal36fq71zzcbfsc7cvwf641q7")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/eso-pic")) (home-page "https://www.ctan.org/pkg/eso-pic") @@ -5158,7 +5013,7 @@ splines, and filled circles and ellipses. The package uses @code{tpic} (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0q24b1bkdi9l6bw787bpggww83jh2vj8955aw2m5yccqbx4vgr5r")))) + "1vm9xp67hzif0pqab4r3ialf0cyhi0fa4p8kxgp1ymcf85pqip14")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -5190,7 +5045,7 @@ in the form @code{key=value} are available, for example: (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0qlxy47f1f8plgch3jqfsnrdgpyz20sz46yp33i2jwvf9hvfczf0")))) + "07vbcp6avdwldr870cwf65av2s9lfyzcpp8gpld53yw6lcxgaipj")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/multirow")) (home-page "https://www.ctan.org/pkg/multirow") @@ -5215,7 +5070,7 @@ entry at the \"natural\" width of its text.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "1rpx4ibjncj5416rg19v0xjbj3z9avhfdfn2gzp8r8sz9vz25c6g")))) + "1pr6ym3ad7x14ng7gmhsmywh3685d2cnm5qgyrqbigng2r6fcc1k")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -5251,7 +5106,7 @@ positions; a grid for orientation is available.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "14r6h9hqb0qgccxj5l1208694fx8sb8avmgzps36lsbbpszl7i7m")))) + "0j1fhm1m9k6rz80lmch3x44g20y9nm4abaaf8czb0q8hzwlx5aq5")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -5602,7 +5457,7 @@ OT2 encoded fonts, CM bright shaped fonts and Concrete shaped fonts.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0sf18pc6chgy26p9bxxn44xcqhzjrfb53jxjr2y7l3jb6xllhblq")))) + "1xyd57c8z1xi0kbqpbad61flcazz68i9ssxrag0gjvci3irxi8xh")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -5631,7 +5486,7 @@ than the bitmaps Metafont creates.") (uri (texlive-ref "latex" "acmart")) (sha256 (base32 - "0n62cs8dhcbn29y9ij1nnyigzr76yhk36kyahhqkkmvbafbys9s7")) + "18rl67p2zhngskisnhv78mksv8q8q658l6igkswzswldixmkpphq")) (file-name (string-append name "-" version "-checkout")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/acmart")) @@ -5869,7 +5724,7 @@ e-TeX.") (file-name (string-append name "-map-" version "-checkout")) (sha256 (base32 - "18jvcm0vwpg6wwzijvnb92xx78la45kkh71k6l44425krp2vnwm0")))))) + "03rfif2631pgd8g1ar4xblcdh078kky7fvw3kfsj5a47rxxgicp2")))))) (home-page "https://www.ctan.org/pkg/pdftex") (synopsis "TeX extension for direct creation of PDF") (description @@ -5880,7 +5735,7 @@ directly generate PDF documents instead of DVI.") (define texlive-texmf (package (name "texlive-texmf") - (version "20180414") + (version "20190410") (source texlive-texmf-src) (build-system gnu-build-system) (inputs @@ -5957,7 +5812,7 @@ This package contains the complete tree of texmf-dist data.") (define-public texlive (package (name "texlive") - (version "20180414") + (version "20190410") (source #f) (build-system trivial-build-system) (inputs `(("bash" ,bash) ; for wrap-program @@ -6364,7 +6219,7 @@ required: automatic sectioning and pagination, spell checking and so forth.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0lhb2h5hxjq9alpk4r3gvg21pwyifs4ah6hqzp92k55mkp1xv73j")))) + "0s86v2b6b1vky1svmmn8pn0l2gz3v280mvjbr2d9l2sjyarlgz9w")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -6404,7 +6259,7 @@ specification. It replaces the now obsolete @code{movie15} package.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0zp00jg058djx8xp0xqwas92y3j97clkyd8z6pqr890yqy06myqb")))) + "1yhp51w8yr10c10pc9196q7hlw80brzqinnqbjw81d0sf2p0llc5")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -6605,7 +6460,7 @@ striking out (line through words) and crossing out (/// over words).") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "1dq8p10pz8wn0vx412m7d7d5gj1syxly3yqdqvf7lv2xl8zndn5h")))) + "1dscrgwyr71vgx35mzb316xl669arzagfgq50fdv3nxga63959b3")))) (build-system trivial-build-system) (native-inputs `(("texlive-latex-pgf-generic" @@ -6619,7 +6474,7 @@ striking out (line through words) and crossing out (/// over words).") (file-name (string-append "texlive-latex-pgf-generic" version "-checkout")) (sha256 (base32 - "0xkxw26sjzr5npjpzpr28yygwdbhzpdd0hsk80gjpidhcxmz393i")))))) + "0hk5x2j15n4pps279cmkbjl1dvhasq3mbhna5xdvp2qgh635ahks")))))) (propagated-inputs `(("texlive-latex-xcolor" ,texlive-latex-xcolor))) (arguments @@ -6663,7 +6518,7 @@ produce either PostScript or PDF output.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0nqwf0sr4mf3v9gqa6apv6ml2xhcdwax0vgyf12a672g7rpdyvgm")))) + "1vz9zg7s5w52xr323zgglzprfrvba2zvyzf6b8vrdf4wdghlpv4z")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils) @@ -6723,7 +6578,7 @@ typearea (which are the main parts of the bundle).") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0hs28fc0v2l92ad9las9b8xcckyrdrwmyhcx1yzmbr6s7s6nvsx8")))) + "1x4wnpca97rnbvvg6wjmbkxxvnfva274q9ahzx746b435q93z3i1")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -6912,7 +6767,7 @@ AMS-LaTeX, AMS-TeX, and plain TeX). The distribution includes Michael Barr's (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0hnbs0s1znbn32hfcsyijl39z81sdb00jf092a4blqz421qs2mbv")))) + "1wijqq605cbhn2bdaryby3xpkwmnk9ixcrjn5zwlfrxbgfblzfmz")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -6971,7 +6826,7 @@ Support for use with LaTeX is available in @code{freenfss}, part of (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0rlx4qqijms1n64gjx475kvip8l322fh7v17zkmwp1l1g0w3vlyz")))) + "0d7d74giz5knvj4rj6mbzd6c05mwg9jrxab86jxdqbc3jy7cl4kz")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -6997,7 +6852,7 @@ of support information.") (list "/doc/latex/beamer/" "/tex/latex/beamer/") (base32 - "00z1a32wkz1ffif7dc8h3ar2fn2hlvfnljgim2szjam2k14l82x3") + "1fqzbkmw2kfxihab8j4dadc3v68xap6v2ghpp2064fna47xlwy1c") #:trivial? #t)) (propagated-inputs `(("texlive-latex-hyperref" ,texlive-latex-hyperref) @@ -7056,7 +6911,7 @@ the file to which it applies.") (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "0ikxg8yzq78hy5b9x13d4nah46d0yvmwlqmdri06pygbx116dcac")))) + "18294h0cr05fs424m3x6aq24z5hf5zmiflalkj4kvpmsyyqqsj74")))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/pdfx" @@ -7090,7 +6945,7 @@ the file to which it applies.") (file-name (string-append "texlive-tex-latex-pdfx-" version "-checkout")) (sha256 (base32 - "14j1zsvqc59ims3sk34v6km8db6cimks28y5fcxcr5mi2ykvj4vf")))))) + "171ffvpkj2fab4ljcxv3l6l5c8ga8zavdhmhfq07id8zyyr619ip")))))) (home-page "https://www.ctan.org/pkg/pdfx") (synopsis "PDF/X and PDF/A support for pdfTeX, LuaTeX and XeTeX") (description @@ -7154,7 +7009,7 @@ change.") "/tex/generic/pstricks/" "/tex/latex/pstricks/") (base32 - "04566354c77claxl1sznc490cda0m5gaa5ck6ms4q7mm44rj3rzk") + "0sdxdd0qi4sccw9il7d4s7jivs24pq99cdzfnrf0gkqjb1y8s7cl") #:trivial? #t))) (package (inherit template) @@ -7178,12 +7033,11 @@ or shading the cells of tables.") (let ((template (simple-texlive-package "texlive-pst-text" (list "/doc/generic/pst-text/" - "/source/generic/pst-text/Makefile" "/dvips/pst-text/pst-text.pro" "/tex/generic/pst-text/" "/tex/latex/pst-text/") (base32 - "0s2bbkdfy0shqrrkjflrn0x0pnvxzbdc38pjbdfw46wnmnxrnasm") + "146fpzd1xlqi94q5r48z8ni8qww713yh6nwkbr9pw27mjrqdadb9") #:trivial? #t))) (package (inherit template) @@ -7248,7 +7102,7 @@ LuaTeX (respectively) is not the engine in use.") (list "/doc/latex/tools/" "/source/latex/tools/") (base32 - "0v3zqcpy0w5bzy1xdcv1wnxbmxrn1j6x03h3y2af7qmjggph2a09")))) + "1ivhij7171wvrgcjn4wah84wxwpd21d0chh3zxab4pj067c8d0mh")))) (package (inherit template) (arguments @@ -7391,7 +7245,7 @@ The behaviour in standalone mode may adjusted using a configuration file (list "/source/latex/siunitx/siunitx.dtx" "/doc/latex/siunitx/README.md") (base32 - "0dmljnxgv2bwl3mi74iil41q03swvrm1b0ziwxlhc4m9lx31b1q1"))) + "11kf6znkgw7y5qmw75qk6px6pqf57bwr53q0673zaiyq20lif96c"))) (build-system texlive-build-system) (arguments '(#:tex-directory "latex/siunitx" diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 4042353a2d..70e050371d 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -4,7 +4,10 @@ ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,10 +25,12 @@ ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu packages texinfo) + #:use-module (gnu packages autotools) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (gnu packages) @@ -39,17 +44,41 @@ (define-public texinfo (package (name "texinfo") - (version "6.6") + (version "6.7") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/texinfo/texinfo-" version ".tar.xz")) (sha256 (base32 - "0rixv4c301djr0d0cnsxs8c1wjndi6bf9vi5axz6mwjkv80cmfcv")))) + "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q")))) (build-system gnu-build-system) + (arguments + ;; When cross-compiling, the package is configured twice: once with the + ;; native compiler and once with the cross-compiler. During the configure + ;; with the native compiler, the environment is reset. This leads to + ;; multiple environment variables missing. Do not reset the environment + ;; to prevent that. + (if (%current-target-system) + '(#:phases + (modify-phases %standard-phases + (add-before 'configure 'fix-cross-configure + (lambda _ + (substitute* "configure" + (("env -i") + "env ")) + #t)))) + '())) (inputs `(("ncurses" ,ncurses) - ("perl" ,perl))) + ;; TODO: remove `if' in the next rebuild cycle. + ,@(if (%current-target-system) + `(("perl" ,perl)) + '()))) + ;; When cross-compiling, texinfo will build some of its own binaries with + ;; the native compiler. This means ncurses is needed both in both inputs + ;; and native-inputs. + (native-inputs `(("perl" ,perl) + ("ncurses" ,ncurses))) (native-search-paths ;; This is the variable used by the standalone Info reader. @@ -68,18 +97,6 @@ their source and the command-line Info reader. The emphasis of the language is on expressing the content semantically, avoiding physical markup commands.") (license gpl3+))) -(define-public texinfo-6.7 - (package - (inherit texinfo) - (version "6.7") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/texinfo/texinfo-" - version ".tar.xz")) - (sha256 - (base32 - "1aicn1v3czqii08wc91jw089n1x3gfchkf808q2as59dak0h714q")))))) - (define-public texinfo-5 (package (inherit texinfo) (version "5.2") @@ -90,8 +107,7 @@ is on expressing the content semantically, avoiding physical markup commands.") (patches (search-patches "texinfo-5-perl-compat.patch")) (sha256 (base32 - "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal")))) - (native-inputs '()))) + "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal")))))) (define-public texinfo-4 (package (inherit texinfo) @@ -105,8 +121,37 @@ is on expressing the content semantically, avoiding physical markup commands.") (sha256 (base32 "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d")))) - (native-inputs '()) - (inputs `(("ncurses" ,ncurses) ("xz" ,xz))))) + (inputs `(("ncurses" ,ncurses) + ("xz" ,xz))) + (native-inputs + `(("automake" ,automake) + ,@(package-native-inputs texinfo))) + (arguments + (substitute-keyword-arguments (package-arguments texinfo) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'fix-configure + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.sub and config.guess. + (with-directory-excursion "build-aux" + (for-each + (lambda (file) + (install-file (string-append + (assoc-ref + (or native-inputs inputs) "automake") + "/share/automake-" + ,(version-major+minor + (package-version automake)) + "/" file) ".")) + '("config.sub" "config.guess"))) + #t)) + ;; Build native version of tools before running 'build phase. + ,@(if (%current-target-system) + `((add-before 'build 'make-native-gnu-lib + (lambda* (#:key inputs #:allow-other-keys) + (invoke "make" "-C" "tools/gnulib/lib") + #t))) + '()))))))) (define-public info-reader ;; The idea of this package is to have the standalone Info reader without @@ -115,32 +160,32 @@ is on expressing the content semantically, avoiding physical markup commands.") (inherit texinfo) (name "info-reader") (arguments - `(#:disallowed-references ,(assoc-ref (package-inputs texinfo) - "perl") + `(,@(substitute-keyword-arguments (package-arguments texinfo) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'install 'keep-only-info-reader + (lambda* (#:key outputs #:allow-other-keys) + ;; Remove everything but 'bin/info' and associated + ;; files. + (define (files) + (scandir "." (lambda (file) + (not (member file '("." "..")))))) + (let ((out (assoc-ref outputs "out"))) + (with-directory-excursion out + (for-each delete-file-recursively + (fold delete (files) '("bin" "share")))) + (with-directory-excursion (string-append out "/bin") + (for-each delete-file (delete "info" (files)))) + (with-directory-excursion (string-append out "/share") + (for-each delete-file-recursively + (fold delete (files) + '("info" "locale")))) + #t)))))) + #:disallowed-references ,(assoc-ref (package-inputs texinfo) + "perl") #:modules ((ice-9 ftw) (srfi srfi-1) - ,@%gnu-build-system-modules) - - #:phases (modify-phases %standard-phases - (add-after 'install 'keep-only-info-reader - (lambda* (#:key outputs #:allow-other-keys) - ;; Remove everything but 'bin/info' and associated - ;; files. - (define (files) - (scandir "." (lambda (file) - (not (member file '("." "..")))))) - - (let ((out (assoc-ref outputs "out"))) - (with-directory-excursion out - (for-each delete-file-recursively - (fold delete (files) '("bin" "share")))) - (with-directory-excursion (string-append out "/bin") - (for-each delete-file (delete "info" (files)))) - (with-directory-excursion (string-append out "/share") - (for-each delete-file-recursively - (fold delete (files) - '("info" "locale")))) - #t)))))) + ,@%gnu-build-system-modules))) (synopsis "Standalone Info documentation reader"))) (define-public texi2html diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm index 14f44c84c7..a0599764cf 100644 --- a/gnu/packages/time.scm +++ b/gnu/packages/time.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> -;;; Copyright © 2013, 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2017, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name> @@ -40,6 +40,7 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system python) + #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages perl) @@ -168,14 +169,14 @@ Pendulum instances.") (define-public python-dateutil (package (name "python-dateutil") - (version "2.8.0") + (version "2.8.1") (source (origin (method url-fetch) (uri (pypi-uri "python-dateutil" version)) (sha256 (base32 - "17nsfhy4xdz1khrfxa61vd7pmvd5z0wa3zb6v4gb4kfnykv0b668")))) + "0g42w7k5007iv9dam6gnja2ry8ydwirh99mgdll35s12pyfzxsvk")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -192,6 +193,7 @@ Pendulum instances.") (invoke "pytest" "-vv")))))) (native-inputs `(("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) ("python-setuptools-scm" ,python-setuptools-scm))) (propagated-inputs `(("python-six" ,python-six))) @@ -451,14 +453,18 @@ datetime type.") (name "datefudge") (version "1.23") (source (origin - (method git-fetch) - (uri (git-reference - (url "https://salsa.debian.org/debian/datefudge.git") - (commit (string-append "debian/" version)))) - (file-name (git-file-name name version)) + ;; Source code is available from + ;; <https://salsa.debian.org/debian/datefudge.git>. However, + ;; for bootstrapping reasons, we do not rely on 'git-fetch' here + ;; (since Git -> GnuTLS -> datefudge). + (method url-fetch) + (uri (string-append + "mirror://debian/pool/main/d/datefudge/datefudge_" + version ".tar.xz")) (sha256 (base32 - "0r9g8v9xnv60hq3j20wqy34kyig3sc2pisjxl4irn7jjx85f1spv")))) + "0ifnlb0mc8qc2kb5042pbz0ns6rwcb7201di8wyrsphl0yhnhxiv")) + (patches (search-patches "datefudge-gettimeofday.patch")))) (build-system gnu-build-system) (arguments `(#:test-target "test" diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 4f85f212bd..778571f890 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014 Ian Denhardt <ian@zenhack.net> ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> @@ -13,6 +13,8 @@ ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com> ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,6 +51,7 @@ #:use-module (gnu packages dns) #:use-module (gnu packages gawk) #:use-module (gnu packages guile) + #:use-module (gnu packages hurd) #:use-module (gnu packages libbsd) #:use-module (gnu packages libffi) #:use-module (gnu packages libidn) @@ -70,7 +73,7 @@ (define-public libtasn1 (package (name "libtasn1") - (version "4.14") + (version "4.16.0") (source (origin (method url-fetch) @@ -78,7 +81,7 @@ version ".tar.gz")) (sha256 (base32 - "025sqnlzji78ss2fi78dajc0v0h5fi02wp39hws41sn8qnjlnq4y")))) + "179jskl7dmfp1rd2khkzmlibzgki4wi6hvmmwfv7q49r728b03qf")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--disable-static"))) @@ -163,7 +166,7 @@ living in the same process.") (package (name "gnutls") (replacement gnutls-3.6.13) - (version "3.6.9") + (version "3.6.12") (source (origin (method url-fetch) (uri @@ -175,10 +178,11 @@ living in the same process.") (patches (search-patches "gnutls-skip-trust-store-test.patch")) (sha256 (base32 - "1jqz5s3lv8sa53348cfi9nr5pw5l55n8m40b8msdvv0pb2jzqca3")))) + "0jvca1qahn9lrwv6f5kfs95icirc15b2a8x9fzczyj996ipg3b5z")))) (build-system gnu-build-system) (arguments - `(; Ensure we don't keep a reference to this buggy software. + `(,@(if (hurd-target?) '(#:tests? #f) '()) + ; Ensure we don't keep a reference to this buggy software. #:disallowed-references (,net-tools) #:configure-flags (list @@ -223,11 +227,15 @@ living in the same process.") "debug" "doc")) ;4.1 MiB of man pages (native-inputs - `(("net-tools" ,net-tools) + `(,@(if (hurd-target?) '() + `(("net-tools" ,net-tools))) ("pkg-config" ,pkg-config) - ("which" ,which))) + ("which" ,which) + ,@(if (hurd-target?) '() + `(("datefudge" ,datefudge))) ;tests rely on 'datefudge' + ("util-linux" ,util-linux))) ;one test needs 'setsid' (inputs - `(("guile" ,guile-2.2))) + `(("guile" ,guile-3.0))) (propagated-inputs ;; These are all in the 'Requires.private' field of gnutls.pc. `(("libtasn1" ,libtasn1) @@ -248,16 +256,22 @@ required structures.") (define-public gnutls-3.6.13 (package (inherit gnutls) - (version "3.6.A") + (version "3.6.13") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/gnutls/v" (version-major+minor version) "/gnutls-3.6.13.tar.xz")) - (patches (search-patches "gnutls-skip-trust-store-test.patch")) + (patches (search-patches "gnutls-skip-trust-store-test.patch" + "gnutls-cross.patch")) (sha256 (base32 - "0f1gnm0756qms5cpx6yn6xb8d3imc2gkqmygf12n9x6r8zs1s11j")))))) + "0f1gnm0756qms5cpx6yn6xb8d3imc2gkqmygf12n9x6r8zs1s11j")))) + (native-inputs + `(,@(if (%current-target-system) ;for cross-build + `(("guile" ,guile-3.0)) ;to create .go files + '()) + ,@(package-native-inputs gnutls))))) (define-public gnutls/guile-2.0 ;; GnuTLS for Guile 2.0. @@ -276,48 +290,21 @@ required structures.") (inputs `(("unbound" ,unbound) ,@(package-inputs gnutls))))) -(define gnutls-3.6.10 - ;; This is for 'guile3.0-gnutls', below. Version 3.6.10 is the first to - ;; introduce Guile 2.9/3.0 support. - (package/inherit gnutls - (version "3.6.10") - (source (origin - (inherit (package-source gnutls)) - (uri (string-append "mirror://gnupg/gnutls/v" - (version-major+minor version) - "/gnutls-" version ".tar.xz")) - (sha256 - (base32 - "14r2h73yfj66cm14k9mnb3kgzq5a7qjg5b31m53bf19vcxkwmwxi")))) - (native-inputs - `(,@(package-native-inputs gnutls) - - ;; Datefudge is used to fuzz time for tests, and its presence - ;; enables a test that uses 'setsid' from util-linux. - ("datefudge" ,datefudge) - ("util-linux" ,util-linux))))) +(define-public guile2.2-gnutls + (package + (inherit gnutls) + (name "guile2.2-gnutls") + (inputs `(("guile" ,guile-2.2) + ,@(alist-delete "guile" + (package-inputs gnutls)))))) (define-public guile3.0-gnutls - (package/inherit gnutls-3.6.10 - (name "guile3.0-gnutls") - (arguments - (substitute-keyword-arguments (package-arguments gnutls-3.6.10) - ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (add-before 'build 'leave-guile-stdout-open - (lambda _ - ;; Work around <https://bugs.gnu.org/38348>. - (substitute* "guile/Makefile" - (("out=-") "out=/dev/null")) - #t)))))) - (inputs `(("guile" ,guile-next) - ,@(alist-delete "guile" - (package-inputs gnutls-3.6.10)))))) + (deprecated-package "guile3.0-gnutls" gnutls)) (define-public openssl (package (name "openssl") - (version "1.1.1c") + (version "1.1.1f") (replacement openssl-1.1.1g) (source (origin (method url-fetch) @@ -330,7 +317,7 @@ required structures.") "/openssl-" version ".tar.gz"))) (sha256 (base32 - "142c7zdlz06hjrrvinb9f276czc78bnkyhd9xma621qmmmwk1yzn")) + "0d9zv9srjqivs8nn099fpbjv1wyhfcb8lzy491dpmfngdvz6nv0q")) (patches (search-patches "openssl-1.1-c-rehash-in.patch")))) (build-system gnu-build-system) (outputs '("out" @@ -338,9 +325,7 @@ required structures.") "static")) ;6.4 MiB of .a files (native-inputs `(("perl" ,perl))) (arguments - `(#:disallowed-references (,perl) - #:parallel-build? #f - #:parallel-tests? #f + `(#:parallel-tests? #f #:test-target "test" ;; Changes to OpenSSL sometimes cause Perl to "sneak in" to the closure, @@ -348,6 +333,25 @@ required structures.") #:disallowed-references ,(list (canonical-package perl)) #:phases (modify-phases %standard-phases + ,@(if (%current-target-system) + '((add-before + 'configure 'set-cross-compile + (lambda* (#:key target outputs #:allow-other-keys) + (setenv "CROSS_COMPILE" (string-append target "-")) + (setenv "CONFIGURE_TARGET_ARCH" + (cond + ((string-prefix? "i586" target) + "hurd-x86") + ((string-prefix? "i686" target) + "linux-x86") + ((string-prefix? "x86_64" target) + "linux-x86_64") + ((string-prefix? "arm" target) + "linux-armv4") + ((string-prefix? "aarch64" target) + "linux-aarch64"))) + #t))) + '()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -357,7 +361,9 @@ required structures.") (("/usr/bin/env") (string-append (assoc-ref %build-inputs "coreutils") "/bin/env"))) - (invoke "./config" + (invoke ,@(if (%current-target-system) + '("./Configure") + '("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -368,7 +374,10 @@ required structures.") "/share/openssl-" ,version) (string-append "--prefix=" out) - (string-append "-Wl,-rpath," lib))))) + (string-append "-Wl,-rpath," lib) + ,@(if (%current-target-system) + '((getenv "CONFIGURE_TARGET_ARCH")) + '()))))) (add-after 'install 'move-static-libraries (lambda* (#:key outputs #:allow-other-keys) ;; Move static libraries to the "static" output. @@ -484,21 +493,26 @@ required structures.") (("^MANDIR[[:blank:]]*=.*$") (string-append "MANDIR = " out "/share/man\n"))) #t))) - (replace 'configure - ;; Override this phase because OpenSSL 1.0 does not understand -rpath. - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (invoke "./config" - "shared" ;build shared libraries - "--libdir=lib" + (replace 'configure + ;; Override this phase because OpenSSL 1.0 does not understand -rpath. + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke ,@(if (%current-target-system) + '("./Configure") + '("./config")) + "shared" ;build shared libraries + "--libdir=lib" - ;; The default for this catch-all directory is - ;; PREFIX/ssl. Change that to something more - ;; conventional. - (string-append "--openssldir=" out - "/share/openssl-" ,version) + ;; The default for this catch-all directory is + ;; PREFIX/ssl. Change that to something more + ;; conventional. + (string-append "--openssldir=" out + "/share/openssl-" ,version) - (string-append "--prefix=" out))))) + (string-append "--prefix=" out) + ,@(if (%current-target-system) + '((getenv "CONFIGURE_TARGET_ARCH")) + '()))))) (delete 'move-extra-documentation) (add-after 'install 'move-man3-pages (lambda* (#:key outputs #:allow-other-keys) diff --git a/gnu/packages/upnp.scm b/gnu/packages/upnp.scm index 768df4a03e..25b73189bc 100644 --- a/gnu/packages/upnp.scm +++ b/gnu/packages/upnp.scm @@ -152,7 +152,7 @@ and others.") ("gettext" ,gettext-minimal))) (inputs `(("libexif" ,libexif) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libid3tag" ,libid3tag) ("flac" ,flac) ("libvorbis" ,libvorbis) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 1d8fa75b82..a173bc83b8 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2020 Roel Janssen <roel@gnu.org> ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2020 John D. Boy <jboy@bius.moe> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -145,6 +146,11 @@ changes to project files over time. It supports both a distributed workflow as well as the classic centralized workflow.") (license license:gpl2+))) +(define git-cross-configure-flags + '("ac_cv_fread_reads_directories=yes" + "ac_cv_snprintf_returns_bogus=no" + "ac_cv_iconv_omits_bom=no")) + (define-public git (package (name "git") @@ -159,6 +165,10 @@ as well as the classic centralized workflow.") (build-system gnu-build-system) (native-inputs `(("native-perl" ,perl) + ;; Add bash-minimal explicitly to ensure it comes before bash-for-tests, + ;; see <https://bugs.gnu.org/39513>. + ("bash" ,bash-minimal) + ("bash-for-tests" ,bash) ("gettext" ,gettext-minimal) ("git-manpages" ,(origin @@ -181,10 +191,6 @@ as well as the classic centralized workflow.") ("python" ,python) ; for git-p4 ("zlib" ,zlib) - ;; Note: we keep this in inputs rather than native-inputs to work around - ;; a problem in 'patch-shebangs'; see <https://bugs.gnu.org/31952>. - ("bash-for-tests" ,bash) - ;; For PCRE support in git grep (USE_LIBPCRE2). ("pcre" ,pcre2) @@ -237,23 +243,46 @@ as well as the classic centralized workflow.") ;; absolute file name to 'wish'. #:configure-flags (list (string-append "--with-tcltk=" (assoc-ref %build-inputs "tk") - "/bin/wish8.6")) ; XXX + "/bin/wish8.6") ; XXX + ,@(if (%current-target-system) + git-cross-configure-flags + '())) #:modules ((srfi srfi-1) (srfi srfi-26) ,@%gnu-build-system-modules) #:phases (modify-phases %standard-phases - (add-after 'unpack 'modify-PATH - (lambda* (#:key inputs #:allow-other-keys) - (let ((path (string-split (getenv "PATH") #\:)) - (bash-full (assoc-ref inputs "bash-for-tests"))) - ;; Drop the test bash from PATH so that (which "sh") and - ;; similar does the right thing. - (setenv "PATH" (string-join - (remove (cut string-prefix? bash-full <>) path) - ":")) - #t))) + ,@(if (%current-target-system) + ;; The git build system assumes build == host + `((add-after 'unpack 'use-host-uname_S + (lambda _ + (substitute* "config.mak.uname" + (("uname_S := .*" all) + (if (equal? ,(%current-target-system) "i586-pc-gnu") + "uname_S := GNU\n" + all))) + #t))) + ;; We do not have bash-for-tests when cross-compiling. + `((add-after 'unpack 'modify-PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((path (string-split (getenv "PATH") #\:)) + (bash-full (assoc-ref inputs "bash-for-tests"))) + ;; Drop the test bash from PATH so that (which "sh") and + ;; similar does the right thing. + (setenv "PATH" (string-join + (remove (cut string-prefix? bash-full <>) path) + ":")) + #t))))) + ;; Add cross curl-config script to PATH when cross-compiling. + ,@(if (%current-target-system) + '((add-before 'configure 'add-cross-curl-config + (lambda* (#:key inputs #:allow-other-keys) + (setenv "PATH" + (string-append (assoc-ref inputs "curl") "/bin:" + (getenv "PATH"))) + #t))) + '()) (add-after 'configure 'patch-makefiles (lambda _ (substitute* "Makefile" @@ -514,20 +543,24 @@ everything from small to very large projects with speed and efficiency.") ((#:make-flags flags) `(delete "USE_LIBPCRE2=yes" ,flags)) ((#:configure-flags flags) - ''()) + `(list + ,@(if (%current-target-system) + git-cross-configure-flags + '()))) ((#:disallowed-references lst '()) `(,perl ,@lst)))) (outputs '("out")) (native-inputs - `(("native-perl" ,perl) + `(("bash" ,bash-minimal) + ("bash-for-tests" ,bash) + ("native-perl" ,perl) ("gettext" ,gettext-minimal))) (inputs `(("curl" ,curl) ;for HTTP(S) access ("expat" ,expat) ;for 'git push' over HTTP(S) ("openssl" ,openssl) ("perl" ,perl) - ("zlib" ,zlib) - ("bash-for-tests" ,bash))))) + ("zlib" ,zlib))))) (define-public gitless (package @@ -617,9 +650,16 @@ on @command{git}, and use any regular Git hosting service.") (build-system cmake-build-system) (outputs '("out" "debug")) (arguments - `(#:configure-flags '("-DUSE_NTLMCLIENT=OFF" ;TODO: package this - "-DREGEX_BACKEND=pcre2" - "-DUSE_HTTP_PARSER=system") + `(#:configure-flags + (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this + "-DREGEX_BACKEND=pcre2" + "-DUSE_HTTP_PARSER=system" + ,@(if (%current-target-system) + `((string-append + "-DPKG_CONFIG_EXECUTABLE=" + (assoc-ref %build-inputs "pkg-config") + "/bin/" ,(%current-target-system) "-pkg-config")) + '())) #:phases (modify-phases %standard-phases (add-after 'unpack 'fix-hardcoded-paths @@ -630,9 +670,13 @@ on @command{git}, and use any regular Git hosting service.") (("/bin/cp") (which "cp")) (("/bin/rm") (which "rm"))) #t)) - ;; Run checks more verbosely. + ;; Run checks more verbosely, unless we are cross-compiling. (replace 'check - (lambda _ (invoke "./libgit2_clar" "-v" "-Q")))))) + (lambda* (#:key (tests? #t) #:allow-other-keys) + (if tests? + (invoke "./libgit2_clar" "-v" "-Q") + ;; Tests may be disabled if cross-compiling. + (format #t "Test suite not run.~%"))))))) (inputs `(("libssh2" ,libssh2) ("http-parser" ,http-parser))) @@ -1374,6 +1418,28 @@ also walk each side of a merge and test those changes individually.") control to Git repositories.") (license license:gpl2))) +(define (mercurial-patch name revision hash) + (origin + (method url-fetch) + (uri (string-append "https://www.mercurial-scm.org/repo/hg/raw-rev/" revision)) + (file-name (string-append "mercurial-" name ".patch")) + (sha256 (base32 hash)))) + +(define %mercurial-patches + (list + ;; These three patches fixes compatibility with the updated gzip module + ;; in Python 3.8.2: <https://bz.mercurial-scm.org/show_bug.cgi?id=6284>. + (mercurial-patch "python-mtime" "6c36a521572edf3a79ee567b118469b3192037cc" + "0bmm7y40r8s081ws2sjvn1v8kvyfan4a97jl0fhdh7yc2pzxlzqq") + (mercurial-patch "indent-gzip" "a23b859ad17dd0a5b9bb37846b69b5e30f99c44c" + "1spscv9dgqv38m7h1liki93ax6w97gxayg17fr7wr6acjdfccpr9") + (mercurial-patch "python-gzip" "b7ca03dff14c63d64ad7bfa36a2d0a36a6b62253" + "0p88ffhx0kk21ssrsb156ffhpcb7g8mkwwkmq49qpmbm5ag2paf0") + ;; This fixes an incompatibility with os.isfile in Python 3.8: + ;; <https://bz.mercurial-scm.org/show_bug.cgi?id=6287>. + (mercurial-patch "os-isfile" "6a8738dc4a019da4c9df5c26961aa09d45ce1c68" + "0lr069m12kzrkmr1pmhaxg5lxmdwxabsza61qp1i1q70g7sy8lvy"))) + (define-public mercurial (package (name "mercurial") @@ -1382,6 +1448,7 @@ control to Git repositories.") (method url-fetch) (uri (string-append "https://www.mercurial-scm.org/" "release/mercurial-" version ".tar.gz")) + (patches %mercurial-patches) (sha256 (base32 "1nbjpzjrzgql4hrvslpxwbcgn885ikq6ba1yb4w6p78rw9nzkhgp")))) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 6656b892d8..8b4d0479b6 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1369,7 +1369,7 @@ streaming protocols.") ("libdvdcss" ,libdvdcss) ("libdvdnav" ,libdvdnav) ; ignored without libdvdread ("libdvdread" ,libdvdread) ; ignored without libdvdnav - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libmpeg2" ,libmpeg2) ("libmpg123" ,mpg123) ; audio codec for MP3 ("libpng" ,libpng) @@ -1467,7 +1467,7 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.") ("libcdio-paranoia" ,libcdio-paranoia) ("libdvdread" ,libdvdread) ("libdvdnav" ,libdvdnav) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libva" ,libva) ("libvdpau" ,libvdpau) ("libx11" ,libx11) @@ -2408,7 +2408,7 @@ tools, XML authoring components, and an extensible plug-in based API.") (inputs `(("alsa-lib" ,alsa-lib) ("glu" ,glu) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libx11" ,libx11) ("qtbase" ,qtbase) ("eudev" ,eudev))) @@ -3219,6 +3219,7 @@ programmers to access a standard API to open and decompress media files.") (base32 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5")) (patches (search-patches "aegisub-icu59-include-unistr.patch" + "aegisub-make43.patch" "aegisub-boost68.patch")))) (build-system gnu-build-system) (arguments @@ -3410,7 +3411,7 @@ It counts more than 100 plugins.") ("gettext" ,gettext-minimal) ("pkg-config" ,pkg-config))) (inputs - `(("libjpeg" ,libjpeg) + `(("libjpeg" ,libjpeg-turbo) ("ffmpeg" ,ffmpeg-3.4) ("libmicrohttpd" ,libmicrohttpd) ("sqlite" ,sqlite))) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index b9ac18820f..b098ef36e0 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> +;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -146,8 +147,28 @@ "--audio-drv-list=alsa,pa,sdl") ;; Make build and test output verbose to facilitate investigation upon failure. #:make-flags '("V=1") + #:modules ((srfi srfi-1) + (ice-9 match) + ,@%gnu-build-system-modules) #:phases (modify-phases %standard-phases + (add-after 'set-paths 'hide-glibc + (lambda* (#:key inputs #:allow-other-keys) + ;; Work around https://issues.guix.info/issue/36882. We need to + ;; remove glibc from C_INCLUDE_PATH so that the one hardcoded in GCC, + ;; at the bottom of GCC include search-path is used. + (let* ((filters '("libc")) + (input-directories + (filter-map (lambda (input) + (match input + ((name . dir) + (and (not (member name filters)) + dir)))) + inputs))) + (set-path-environment-variable "C_INCLUDE_PATH" + '("include") + input-directories) + #t))) (replace 'configure (lambda* (#:key inputs outputs (configure-flags '()) #:allow-other-keys) @@ -271,7 +292,8 @@ server and embedded PowerPC, and S390 guests.") (license license:gpl2) ;; Several tests fail on MIPS; see <http://hydra.gnu.org/build/117914>. - (supported-systems (delete "mips64el-linux" %supported-systems)))) + (supported-systems (fold delete %supported-systems + '("mips64el-linux" "i586-gnu"))))) (define-public qemu-minimal ;; QEMU without GUI support. @@ -385,12 +407,6 @@ all common programming languages. Vala bindings are also provided.") "/share/doc/" ,name "-" ,version) "--sysconfdir=/etc" "--localstatedir=/var") - #:make-flags - ;; Treat the kernel headers as system headers to silence - ;; compiler warnings from those. - (list (string-append "C_INCLUDE_PATH=" - (assoc-ref %build-inputs "kernel-headers") - "/include")) #:phases (modify-phases %standard-phases (replace 'install @@ -482,7 +498,7 @@ manage system or application containers.") ("libpcap" ,libpcap) ("libnl" ,libnl) ("libtirpc" ,libtirpc) ;for <rpc/rpc.h> - ("libuuid" ,util-linux) + ("libuuid" ,util-linux "lib") ("lvm2" ,lvm2) ;for libdevmapper ("curl" ,curl) ("openssl" ,openssl) @@ -722,13 +738,7 @@ domains, their live performance and resource utilization statistics.") (setenv "C_INCLUDE_PATH" (string-append (assoc-ref inputs "libnl") "/include/libnl3:" - ;; Also add the kernel headers here so that GCC - ;; treats them as "system headers". Otherwise - ;; the build fails with -Werror because parasite.c - ;; includes both <linux/fs.h> and <sys/mount.h>, - ;; which define some of the same constants. - (assoc-ref inputs "kernel-headers") - "/include")) + (or (getenv "C_INCLUDE_PATH") ""))) #t)) (add-after 'configure 'fix-documentation (lambda* (#:key inputs outputs #:allow-other-keys) @@ -1334,7 +1344,7 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) ("pixman" ,pixman) ("qemu" ,qemu-minimal) ("seabios" ,seabios) - ("util-linux" ,util-linux) ; uuid + ("util-linux" ,util-linux "lib") ; uuid ; TODO: ocaml-findlib, ocaml-nox. ("xz" ,xz) ; for liblzma ("zlib" ,zlib))) diff --git a/gnu/packages/vnc.scm b/gnu/packages/vnc.scm index e1cba08952..2b5adb899a 100644 --- a/gnu/packages/vnc.scm +++ b/gnu/packages/vnc.scm @@ -259,7 +259,7 @@ where the server is installed."))) (inputs `(("gnutls" ,gnutls) ("libgcrypt" ,libgcrypt) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("lzo" ,lzo) ("sdl2" ,sdl2))) diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index 2beff48964..ebae1c43f7 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> -;;; Copyright © 2013, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2016, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015 Jeff Mickey <j@codemac.net> ;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il> @@ -138,7 +138,7 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.") (base32 "1g41yarz2bl0f73kbjqnywr485ghanbp7nmspklfb0n07yp0z6ak")))) (build-system gnu-build-system) - (inputs `(("guile" ,guile-2.2) ; for the wrapper scripts + (inputs `(("guile" ,guile-3.0) ; for the wrapper scripts ("coreutils" ,coreutils) ("grep" ,grep) ("iproute2" ,iproute) ; for ‘ip’ @@ -154,7 +154,7 @@ Only \"Universal TUN/TAP device driver support\" is needed in the kernel.") (for-each (lambda (script) (substitute* script (("^PATH=.*") "") - (("(/usr|)/s?bin/") "") + (("/usr/s?bin/") "") (("\\[ +-x +([^]]+) +\\]" _ command) (string-append "command -v >/dev/null 2>&1 " command)))) diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index 33ff3d1a74..62b7a5bdca 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -140,7 +140,7 @@ management, extensions such as advertisement blocker and colorful tabs.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("fltk" ,fltk) ("fontconfig" ,fontconfig) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libxcursor" ,libxcursor) ("libxft" ,libxft) @@ -188,7 +188,7 @@ older or slower computers and embedded systems.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("zlib" ,zlib) ("openssl" ,openssl) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("libevent" ,libevent) ("libpng" ,libpng) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 092ff30148..1797e52295 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -35,10 +35,13 @@ ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com> ;;; Copyright © 2019, 2020 Florian Pelz <pelzflorian@pelzflorian.de> ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si> ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org> ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2018, 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> ;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com> ;;; @@ -108,6 +111,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages hurd) #:use-module (gnu packages java) #:use-module (gnu packages jemalloc) #:use-module (gnu packages image) @@ -5247,7 +5251,7 @@ w3c webidl files and a binding configuration file.") ("openssl" ,openssl) ("utf8proc" ,utf8proc) ("libpng" ,libpng) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libcss" ,libcss) ("libdom" ,libdom) ("libnsbmp" ,libnsbmp) @@ -5865,10 +5869,22 @@ into your tests. It automatically starts up a HTTP server in a separate thread #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - "CC=gcc" "library") + "library" + ,@(if (%current-target-system) + '() + '("CC=gcc"))) #:phases (modify-phases %standard-phases - (delete 'configure)))) + ,@(if (%current-target-system) + '((replace 'configure + (lambda* (#:key target #:allow-other-keys) + (substitute* (find-files "." "Makefile") + (("CC\\?=.*$") + (string-append "CC=" target "-gcc\n")) + (("AR\\?=.*$") + (string-append "AR=" target "-ar\n"))) + #t))) + '((delete 'configure)))))) (synopsis "HTTP request/response parser for C") (description "This is a parser for HTTP messages written in C. It parses both requests and responses. The parser is designed to be used in @@ -7070,8 +7086,7 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.") (define-public nghttp2 (package (name "nghttp2") - (version "1.39.1") - (replacement nghttp2-1.39.2) + (version "1.40.0") (source (origin (method url-fetch) @@ -7080,7 +7095,7 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.") "nghttp2-" version ".tar.xz")) (sha256 (base32 - "0j0lk37k8k3f61r9nw647hg4b22z1753l36n3xrp9x01civ614b7")))) + "0wwhwv7cvi1vxpdjwvg0kpa4jzhszclpnwrwfcw728zz53a47z09")))) (build-system gnu-build-system) (outputs (list "out" "lib")) ; only libnghttp2 @@ -7094,7 +7109,8 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.") ;; Required to build the tools (i.e. without ‘--enable-lib-only’). `(("c-ares" ,c-ares) ("jansson" ,jansson) ; for HPACK tools - ("jemalloc" ,jemalloc) ; fight nghttpd{,x} heap fragmentation + ,@(if (hurd-target?) '() + `(("jemalloc" ,jemalloc))) ; fight nghttpd{,x} heap fragmentation ("libev" ,libev) ("libxml2" ,libxml2) ; for ‘nghttp -a’ ("openssl" ,openssl))) @@ -7118,9 +7134,10 @@ derivation by David Revoy from the original MonsterID by Andreas Gohr.") (assoc-ref outputs "lib"))) #t)) (add-before 'check 'set-timezone-directory - (lambda* (#:key inputs #:allow-other-keys) - (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata") - "/share/zoneinfo")) + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (setenv "TZDIR" (string-append + (assoc-ref (or native-inputs inputs) "tzdata") + "/share/zoneinfo")) #t))))) (home-page "https://nghttp2.org/") (synopsis "HTTP/2 protocol client, proxy, server, and library") @@ -7149,33 +7166,6 @@ compressed JSON header blocks. @end itemize\n") (license license:expat))) -(define nghttp2-1.39.2 - (package - (inherit nghttp2) - (version "1.39.2") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/nghttp2/nghttp2/" - "releases/download/v" version "/" - "nghttp2-" version ".tar.xz")) - (sha256 - (base32 - "12yfsjghbaypp4w964d45ih9vs38g6anih80wbsflaxx192idlm2")))))) - -;; 'Node' requires this newer version, to be removed on the next rebuild cycle. -(define-public nghttp2-1.40 - (package - (inherit nghttp2) - (version "1.40.0") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/nghttp2/nghttp2/" - "releases/download/v" version "/" - "nghttp2-" version ".tar.xz")) - (sha256 - (base32 - "0wwhwv7cvi1vxpdjwvg0kpa4jzhszclpnwrwfcw728zz53a47z09")))))) - (define-public hpcguix-web (let ((commit "9de63562b06b4aef3a3afe5ecb18d3c91e57ee74") (revision "5")) @@ -7246,11 +7236,11 @@ compressed JSON header blocks. ("uglify-js" ,uglify-js) ("pkg-config" ,pkg-config))) (inputs - `(("guix" ,guile3.0-guix))) + `(("guix" ,guix))) (propagated-inputs - `(("guile" ,guile-next) - ("guile-commonmark" ,guile3.0-commonmark) - ("guile-json" ,guile3.0-json))) + `(("guile" ,guile-3.0) + ("guile-commonmark" ,guile-commonmark) + ("guile-json" ,guile-json-3))) (home-page "https://github.com/UMCUGenetics/hpcguix-web") (synopsis "Web interface for cluster deployments of Guix") (description "Hpcguix-web provides a web interface to the list of packages diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index 6035d6c59d..90be7d2625 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -216,7 +216,7 @@ engine that uses Wayland for graphics output.") ("hyphen" ,hyphen) ("icu4c" ,icu4c) ("libgcrypt" ,libgcrypt) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libnotify" ,libnotify) ("libpng" ,libpng) ("libseccomp" ,libseccomp) diff --git a/gnu/packages/wine.scm b/gnu/packages/wine.scm index 2c48bebdbf..86e0337884 100644 --- a/gnu/packages/wine.scm +++ b/gnu/packages/wine.scm @@ -117,7 +117,7 @@ ("libsane" ,sane-backends) ("libpcap" ,libpcap) ("libpng" ,libpng) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("libICE" ,libice) ("libX11" ,libx11) diff --git a/gnu/packages/wv.scm b/gnu/packages/wv.scm index 866cfee222..37881a4d0f 100644 --- a/gnu/packages/wv.scm +++ b/gnu/packages/wv.scm @@ -45,7 +45,7 @@ (inputs `(("glib" ,glib) ("libgsf" ,libgsf) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("zlib" ,zlib))) (native-inputs diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm index 49b190b9df..4fd1817c49 100644 --- a/gnu/packages/wxwidgets.scm +++ b/gnu/packages/wxwidgets.scm @@ -68,7 +68,7 @@ ;; XXX gstreamer-0.10 builds fail ;; ("gstreamer" ,gstreamer-0.10) ("gtk" ,gtk+) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libmspack" ,libmspack) ("libsm" ,libsm) ("libtiff" ,libtiff) @@ -124,7 +124,7 @@ and many other languages.") (base32 "1gjs9vfga60mk4j4ngiwsk9h6c7j22pw26m3asxr1jwvqbr8kkqk")))) (inputs `(("gtk" ,gtk+-2) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libtiff" ,libtiff) ("libmspack" ,libmspack) ("sdl" ,sdl) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 2d19dab137..f839560bfb 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -465,6 +465,8 @@ following the mouse.") "1ryxzdf048x7wsx4dlvrr1p00gzwfs7lybnhgc7ygbj0dvyxcrns")) (patches (search-patches "pixman-CVE-2016-5296.patch")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs `(("libpng" ,libpng) ("zlib" ,zlib))) @@ -1253,7 +1255,7 @@ protocol.") ("libglade" ,libglade) ("libxml2" ,libxml2) ("libsm" ,libsm) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("linux-pam" ,linux-pam) ("pango" ,pango) ("gtk+" ,gtk+) diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm index 4b9751da35..1eccb3ccba 100644 --- a/gnu/packages/xfce.scm +++ b/gnu/packages/xfce.scm @@ -290,7 +290,7 @@ merging features essential for loading menus modified with menu editors.") ("gdk-pixbuf" ,gdk-pixbuf) ("cairo" ,cairo) ;; Needed for pdf thumbnails (poppler-glibc.pc) ("freetype" ,freetype) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libgsf" ,libgsf) ("poppler" ,poppler) ;; FIXME Provide gstreamer and gstreamer-tag to get video thumbnails diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm index 09c7597761..c3d02619b4 100644 --- a/gnu/packages/xfig.scm +++ b/gnu/packages/xfig.scm @@ -47,7 +47,7 @@ `(("desktop-file-utils" ,desktop-file-utils))) (inputs `(("libxaw3d" ,libxaw3d) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libxpm" ,libxpm) ("libx11" ,libx11) @@ -90,7 +90,7 @@ selected in various ways. For text, 35 fonts are available.") ("makedepend" ,makedepend))) (inputs `(("xfig" ,xfig) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libxpm" ,libxpm) ("libx11" ,libx11) diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 32696e30ee..042679e122 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -67,8 +67,7 @@ (define-public expat (package (name "expat") - (version "2.2.7") - (replacement expat-2.2.9) + (version "2.2.9") (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c)))) (origin (method url-fetch) @@ -80,8 +79,10 @@ "/expat-" version ".tar.xz"))) (sha256 (base32 - "1y5yax6bq8p9xk49zqkd62pxk8bq266wrgbrqgaxp3wsrw5g9qrh"))))) + "1960mmgbb4cm64n1p0nz3hrs1pw03hkrfcw8prmnn4622mdrd9hy"))))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (home-page "https://libexpat.github.io/") (synopsis "Stream-oriented XML parser library written in C") (description @@ -90,23 +91,6 @@ stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags).") (license license:expat))) -(define expat-2.2.9 - (package - (inherit expat) - (version "2.2.9") - (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c)))) - (origin - (method url-fetch) - (uri (list (string-append "mirror://sourceforge/expat/expat/" - version "/expat-" version ".tar.xz") - (string-append - "https://github.com/libexpat/libexpat/releases/download/R_" - (string-map dot->underscore version) - "/expat-" version ".tar.xz"))) - (sha256 - (base32 - "1960mmgbb4cm64n1p0nz3hrs1pw03hkrfcw8prmnn4622mdrd9hy"))))))) - (define-public libebml (package (name "libebml") @@ -134,14 +118,14 @@ hierarchical form with variable field lengths.") (define-public libxml2 (package (name "libxml2") - (version "2.9.9") + (version "2.9.10") (source (origin (method url-fetch) (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-" version ".tar.gz")) (sha256 (base32 - "0wd881jzvqayx0ihzba29jl80k06xj9ywp16kxacdqs3064p1ywl")))) + "07xynh8hcxb2yb1fs051xrgszjvj37wnxvxgsj10rzmqzy9y3zma")))) (build-system gnu-build-system) (outputs '("out" "static")) (arguments @@ -183,9 +167,12 @@ project (but it is usable outside of the Gnome platform).") (license license:x11))) (define-public python-libxml2 - ;; TODO: Merge with 'python-libxml2/fixed' on the next rebuild cycle. (package/inherit libxml2 (name "python-libxml2") + (source (origin + (inherit (package-source libxml2)) + (patches (cons (search-patch "python-libxml2-utf8.patch") + (origin-patches (package-source libxml2)))))) (build-system python-build-system) (outputs '("out")) (arguments @@ -211,40 +198,41 @@ project (but it is usable outside of the Gnome platform).") (inputs `(("libxml2" ,libxml2))) (synopsis "Python bindings for the libxml2 library"))) -(define-public python-libxml2/fixed - ;; This variant fixes a crash when processing UTF-8 sequences: - ;; <https://bugs.gnu.org/37468> - ;; TODO: Merge with 'python-libxml2' on the next rebuild cycle. - (package/inherit - python-libxml2 - (version (string-append (package-version python-libxml2) "-1")) - (source (origin - (inherit (package-source libxml2)) - (patches (cons (search-patch "python-libxml2-utf8.patch") - (origin-patches (package-source libxml2)))))))) - (define-public python2-libxml2 (package-with-python2 python-libxml2)) (define-public libxslt (package (name "libxslt") - (version "1.1.33") + (version "1.1.34") (source (origin (method url-fetch) (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-" version ".tar.gz")) (sha256 (base32 - "1j1q1swnsy8jgi9x7mclvkrqhfgn09886gdlr9wzk7a08i8n0dlf")) + "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq")) (patches (search-patches "libxslt-generated-ids.patch")))) (build-system gnu-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'check 'disable-fuzz-tests + (lambda _ + ;; Disable libFuzzer tests, because they require + ;; instrumentation builds of libxml2 and libxslt. + (substitute* "tests/Makefile" + (("exslt plugins fuzz") + "exslt plugins")) + #t))))) (home-page "http://xmlsoft.org/XSLT/index.html") (synopsis "C library for applying XSLT stylesheets to XML documents") (inputs `(("libgcrypt" ,libgcrypt) ("libxml2" ,libxml2) ("python" ,python-minimal-wrapper) - ("zlib" ,zlib))) + ("zlib" ,zlib) + ("xz" ,xz))) + (native-inputs + `(("pkg-config" ,pkg-config))) (description "Libxslt is an XSLT C library developed for the GNOME project. It is based on libxml for XML parsing, tree manipulation and XPath support.") @@ -355,7 +343,7 @@ parsers for it. @code{XML::Descent} allows such parsers to be created.") (define-public perl-xml-parser (package (name "perl-xml-parser") - (version "2.44") + (version "2.46") (source (origin (method url-fetch) (uri (string-append @@ -363,7 +351,7 @@ parsers for it. @code{XML::Descent} allows such parsers to be created.") version ".tar.gz")) (sha256 (base32 - "05ij0g6bfn27iaggxf8nl5rhlwx6f6p6xmdav6rjcly3x5zd1s8s")))) + "0pai3ik47q7rgnix9644c673fwydz52gqkxr9kxwq765j4j36cfk")))) (build-system perl-build-system) (arguments `(#:make-maker-flags (let ((expat (assoc-ref %build-inputs "expat"))) @@ -955,6 +943,8 @@ code for classes that correspond to data structures defined by XMLSchema.") (assoc-ref %build-inputs "util-linux") "/bin/getopt")))) + (native-inputs + `(("util-linux" ,util-linux))) (inputs `(("util-linux" ,util-linux) ; for 'getopt' ("libxml2" ,libxml2) ; for 'xmllint' @@ -2109,7 +2099,7 @@ libxml2 and libxslt.") (define-public python-xmlschema (package (name "python-xmlschema") - (version "1.1.1") + (version "1.1.2") (source (origin ;; Unit tests are not distributed with the PyPI archive. (method git-fetch) @@ -2119,7 +2109,7 @@ libxml2 and libxslt.") (file-name (git-file-name name version)) (sha256 (base32 - "0nqhqbvp0kpd1bz11b6gpkc0mkg068mqs56ww4k5ang1cl9d8gd6")))) + "03bz5mp45y4shmlc1gxq1h69vjx60z1acg9cy4kq7fczgx8qg9jw")))) (build-system python-build-system) (arguments '(#:phases diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 289a823b06..cef22cd400 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -20,8 +20,10 @@ ;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net> ;;; Copyright © 2019 nee <nee@cock.li> ;;; Copyright © 2019 Yoshinori Arai <kumagusu08@gmail.com> +;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at> ;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de> +;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org> ;;; @@ -217,14 +219,14 @@ which can be read by any architecture.") (define-public xorgproto (package (name "xorgproto") - (version "2019.1") + (version "2019.2") (source (origin (method url-fetch) (uri (string-append "mirror://xorg/individual/proto/" "xorgproto-" version ".tar.bz2")) (sha256 (base32 - "16yll1kaffnslik5sizlw3qrigj1gpsgfgyq6903g3mwdixamnm6")))) + "13kvir8dz9dvzhvyfndpff1z7k8h14s7kkl7mbl427andhax1v26")))) (build-system gnu-build-system) (propagated-inputs ;; To get util-macros in (almost?) all package inputs. @@ -1045,6 +1047,8 @@ of new capabilities and controls for text keyboards.") (base32 "0hvjfhrcym770cr0zpqajdy3cda30aiwbjzv16iafkqkbl090gr5")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs `(("xorgproto" ,xorgproto) ("libxext" ,libxext) @@ -1071,6 +1075,8 @@ of new capabilities and controls for text keyboards.") (base32 "1ir0j92mnd1nk37mrv9bz5swnccqldicgszvfsh62jd14q6k115q")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("xorgproto" ,xorgproto))) (home-page "https://www.x.org/") @@ -1098,6 +1104,8 @@ synchronization between the X server and direct-rendering clients.") (base32 "0y90170dp8wsidr1dzza0grxr1lfh30ji3b5vkjz4j6x1n0wxz1c")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs `(("zlib" ,zlib) ("xorgproto" ,xorgproto))) @@ -1225,11 +1233,13 @@ hit when running single-threaded.") (base32 "1fwwfq9v3sqmpzpscymswxn76xhxnysa24pfim1mcpxhvjcl89id")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libice" ,libice))) ; SMlib.h includes ICElib.h (inputs `(("xtrans" ,xtrans) - ("util-linux" ,util-linux))) + ("libuuid" ,util-linux "lib"))) (native-inputs `(("pkg-config" ,pkg-config))) (home-page "https://www.x.org/wiki/") @@ -1284,6 +1294,8 @@ with the Cygwin XWin server when running X11 in a rootless mode.") (base32 "13sfcglvz87vl58hd9rszwr73z0z4nwga3c12rfh7f5s2ln8l8dk")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs ;; xcomposite.pc refers to all these. `(("xorgproto" ,xorgproto) @@ -1313,6 +1325,8 @@ with the Cygwin XWin server when running X11 in a rootless mode.") (base32 "0ab53h0rkq721ihk5hi469x500f3pgbkm1wy01yf24x5m923nli0")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs `(("libbsd" ,libbsd) ("xorgproto" ,xorgproto))) @@ -1339,6 +1353,8 @@ with the Cygwin XWin server when running X11 in a rootless mode.") (base32 "05lja9s54090xwh31r0bqms4v3pimng5xr09g2rdnafx2vk6hp12")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs ;; xft.pc refers to all these. `(("libxrender" ,libxrender) @@ -1373,6 +1389,8 @@ configuration files.") (base32 "1irq9crvscd3yb8sr802dhvvfr35jdy1n2yz094xplmd42mbv3bm")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs `(("libx11" ,libx11))) (native-inputs @@ -1398,6 +1416,8 @@ configuration files.") (base32 "0cdpqnx6258i4l6qhphvkdiyspysg0i5caqjy820kp63wwjk4d4w")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs `(("libxt" ,libxt) ("xorgproto" ,xorgproto) @@ -1418,7 +1438,7 @@ treat it as part of their software base when porting.") (define-public libxpm (package (name "libxpm") - (version "3.5.12") + (version "3.5.13") (source (origin (method url-fetch) @@ -1428,15 +1448,17 @@ treat it as part of their software base when porting.") ".tar.bz2")) (sha256 (base32 - "1v5xaiw4zlhxspvx76y3hq4wpxv7mpj6parqnwdqvpj8vbinsspx")))) + "09dc6nwlb2122h02vl64k9x56mxnyqz2gwpga0abfv4bb1bxmlcw")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs - `(("gettext" ,gettext-minimal) - ("libxt" ,libxt) + `(("libxt" ,libxt) ("xorgproto" ,xorgproto) ("libxext" ,libxext))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("gettext" ,gettext-minimal) + ("pkg-config" ,pkg-config))) (home-page "https://www.x.org/wiki/") (synopsis "Xorg XPM library") (description "XPM (X Pixmap) image file format library.") @@ -1458,6 +1480,8 @@ treat it as part of their software base when porting.") (base32 "1m0jr0lbz9ixpp9ihk68349q0i7ry2379lnfzdy4mrl86ijc2xgz")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs `(("xorgproto" ,xorgproto) ("libxext" ,libxext) @@ -1485,6 +1509,8 @@ treat it as part of their software base when porting.") (base32 "1y4vx1vabg7j9hamp0vrfrax5b0lmgm3h0lbgbb3hnkv3dd0f5zr")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (inputs `(("libxext" ,libxext) ("libx11" ,libx11))) @@ -1510,6 +1536,8 @@ treat it as part of their software base when porting.") (sha256 (base32 "00vjvcdlc1sga251jkxn6gkxmx9h5n290ffxxpa40qbca1gvr61b")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("xorgproto" ,xorgproto))) (inputs @@ -2107,17 +2135,16 @@ emulate a TI-30 or an HP-10C.") (define-public xcb-proto (package (name "xcb-proto") - (version "1.13") + (version "1.14") (source (origin (method url-fetch) (uri (string-append "https://xcb.freedesktop.org/dist/xcb-proto-" - version - ".tar.bz2")) + version ".tar.xz")) (sha256 (base32 - "1qdxw9syhbvswiqj5dvj278lrmfhs81apzmvx6205s4vcqg7563v")))) + "01d62r286yfc3rpz714nqdgkl0wk9j0wqkd4ylas1d7r4vmkqshq")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("python" ,python-minimal-wrapper))) @@ -3018,13 +3045,7 @@ X server.") (string-prefix? "x86_64-" system))) %supported-systems)) (arguments - '(#:configure-flags '("--with-default-accel=uxa") - #:phases (modify-phases %standard-phases - (add-before 'bootstrap 'pre-bootstrap - (lambda _ - ;; Inhibit autogen.sh from running configure. - (setenv "NOCONFIGURE" "1") - #t))))) + '(#:configure-flags '("--with-default-accel=uxa"))) (home-page "https://www.x.org/wiki/") (synopsis "Intel video driver for X server") (description @@ -3888,7 +3909,7 @@ alternative implementations like XRandR or TwinView.") (define xkbcomp-intermediate ; used as input for xkeyboard-config (package (name "xkbcomp-intermediate") - (version "1.4.2") + (version "1.4.3") (source (origin (method url-fetch) @@ -3898,7 +3919,7 @@ alternative implementations like XRandR or TwinView.") ".tar.bz2")) (sha256 (base32 - "0944rrkkf0dxp07vhh9yr4prslxhqyw63qmbjirbv1bypswvrn3d")))) + "0dflr250nlj6rrnv658f6dm8qx37sj0xfimc3ihay761kwb2q906")))) (build-system gnu-build-system) (inputs `(("xorgproto" ,xorgproto) @@ -4717,6 +4738,13 @@ cannot be adequately worked around on the client side of the wire.") (base32 "0azqxllcsfxc3ilhz6kwc6x7m8wc477p59ir9p0yrsldx766zbar")))) (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list "--disable-static" + ;; Disable zero malloc check that fails when cross-compiling. + ,@(if (%current-target-system) + '("--disable-malloc0returnsnull") + '())))) (propagated-inputs `(("xorgproto" ,xorgproto))) (inputs @@ -4746,6 +4774,8 @@ cannot be adequately worked around on the client side of the wire.") (base32 "086p0axqj57nvkaqa6r00dnr9kyrn1m8blgf0zjy25zpxkbxn200")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("xorgproto" ,xorgproto))) (inputs @@ -4802,6 +4832,13 @@ cannot be adequately worked around on the client side of the wire.") (base32 "0j89cnb06g8x79wmmnwzykgkkfdhin9j7hjpvsxwlr3fz1wmjvf0")))) (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list "--disable-static" + ;; Disable zero malloc check that fails when cross-compiling. + ,@(if (%current-target-system) + '("--disable-malloc0returnsnull") + '())))) (propagated-inputs `(("xorgproto" ,xorgproto))) (inputs @@ -4828,6 +4865,8 @@ cannot be adequately worked around on the client side of the wire.") (base32 "012jpyj7xfm653a9jcfqbzxyywdmwb2b5wr1dwylx14f3f54jma6")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libxi" ,libxi) ("xorgproto" ,xorgproto))) @@ -4865,6 +4904,8 @@ protocol and arbitrary X extension protocol.") (base32 "125hn06bd3d8y97hm2pbf5j55gg4r2hpd3ifad651i4sr7m16v6j")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("xorgproto" ,xorgproto))) (inputs @@ -4893,8 +4934,21 @@ protocol and arbitrary X extension protocol.") "0c3563kw9fg15dpgx4dwvl12qz6sdqdns1pxa574hc7i5m42mman")))) (build-system gnu-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-configure + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; Replace outdated config.sub and config.guess: + (for-each (lambda (file) + (install-file (string-append + (assoc-ref + (or native-inputs inputs) "automake") + "/share/automake-" + ,(version-major+minor + (package-version automake)) + "/" file) ".")) + '("config.sub" "config.guess")) + #t)) (add-after 'install 'wrap-mkfontdir (lambda* (#:key inputs outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") @@ -4906,7 +4960,8 @@ protocol and arbitrary X extension protocol.") (inputs `(("mkfontscale" ,mkfontscale))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("automake" ,automake))) ;For up to date 'config.guess' and 'config.sub'. (home-page "https://www.x.org/wiki/") (synopsis "Create an index of X font files in a directory") (description @@ -4963,6 +5018,8 @@ common definitions and porting layer.") (base32 "0j638yvmyna2k4mz465jywgdybgdchdqppfx6xfazg7l5khxr1kg")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("xorgproto" ,xorgproto))) (inputs @@ -4991,6 +5048,8 @@ common definitions and porting layer.") (base32 "1v3krc6x0zliaa66qq1bf9j60x5nqfy68v8axaiglxpnvgqcpy6c")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("xorgproto" ,xorgproto))) (native-inputs @@ -5017,6 +5076,8 @@ an X Window System display.") (base32 "1miana3y4hwdqdparsccmygqr3ic3hs5jrqfzp70hvi2zwxd676y")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("xorgproto" ,xorgproto))) (inputs @@ -5043,6 +5104,8 @@ an X Window System display.") (base32 "0hiji1bvpl78aj3a3141hkk353aich71wv8l5l2z51scfy878zqs")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("freetype" ,freetype) ("libfontenc" ,libfontenc) @@ -5090,6 +5153,8 @@ new API's in libXft, or the legacy API's in libX11.") (base32 "0q8hz3slga3w3ch8wp0k7ay9ilhz315qnab0w1y2x9w3cf7hv8rn")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("xorgproto" ,xorgproto) ("libx11" ,libx11) @@ -5117,6 +5182,8 @@ new API's in libXft, or the legacy API's in libX11.") (base32 "08z0mqywrm7ij8bxlfrx0d2wy6kladdmkva1nw5k6qix82z0xsla")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs ;; In accordance with xrandr.pc. `(("libx11" ,libx11) @@ -5146,6 +5213,8 @@ new API's in libXft, or the legacy API's in libX11.") (base32 "1kbdjsvkm5l7axv7g477qj18sab2wnqhliy6197syzizgfbsfgbb")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libxv" ,libxv))) (inputs @@ -5174,6 +5243,8 @@ new API's in libXft, or the legacy API's in libX11.") (base32 "0mydhlyn72i7brjwypsqrpkls3nm6vxw0li8b2nw0caz7kwjgvmg")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libxext" ,libxext) ("xorgproto" ,xorgproto))) @@ -5194,15 +5265,15 @@ protocol.") (define-public libxcb (package (name "libxcb") - (version "1.13") + (version "1.14") (source (origin (method url-fetch) (uri (string-append "https://xcb.freedesktop.org/dist/" - "libxcb-" version ".tar.bz2")) + "libxcb-" version ".tar.xz")) (sha256 (base32 - "1ahxhmdqp4bhb90zmc275rmf5wixqra4bnw9pqnzyl1w3598g30q")))) + "0d2chjgyn5lr9sfhacfvqgnj9l9faz11vn322a06jd6lk3dxcpm5")))) (build-system gnu-build-system) (propagated-inputs `(("libpthread-stubs" ,libpthread-stubs) @@ -5215,7 +5286,8 @@ protocol.") `(("pkg-config" ,pkg-config) ("python" ,python-minimal-wrapper))) (arguments - `(#:configure-flags '("--enable-xkb"))) + `(#:configure-flags '("--enable-xkb" + "--disable-static"))) (home-page "https://xcb.freedesktop.org/") (synopsis "The X C Binding (XCB) library") (description @@ -5369,16 +5441,7 @@ draggable titlebars and borders.") (define-public xorg-server-for-tests (hidden-package (package - (inherit xorg-server) - (version "1.20.5") - (source (origin - (inherit (package-source xorg-server)) - (uri (string-append - "mirror://xorg/individual/xserver/" - "xorg-server-" version ".tar.bz2")) - (sha256 - (base32 - "17dc3g8cc55nbkx3np64dsz04n621dnzjmcc9wys0xbyyd1q47d8"))))))) + (inherit xorg-server)))) (define-public xorg-server-xwayland (package @@ -5404,7 +5467,7 @@ draggable titlebars and borders.") (define-public libx11 (package (name "libx11") - (version "1.6.8") + (version "1.6.9") (source (origin (method url-fetch) @@ -5414,21 +5477,29 @@ draggable titlebars and borders.") ".tar.bz2")) (sha256 (base32 - "1mbkwhhprhf49s2iwx7kiliprsdvd690zk44x3h53ql9q52si2dj")))) + "1ldyn9c6pyx54sxzaw120n3q42rqi7b503aqmyjky6fn038fiiww")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;8 MiB of man pages + XML (arguments - '(#:configure-flags (list (string-append "--mandir=" - (assoc-ref %outputs "doc") - "/share/man")))) + `(#:configure-flags + (list (string-append "--mandir=" + (assoc-ref %outputs "doc") + "/share/man") + "--disable-static" + + ;; Disable zero malloc check that fails when cross-compiling. + ,@(if (%current-target-system) + '("--disable-malloc0returnsnull") + '())))) (propagated-inputs `(("xorgproto" ,xorgproto) ("libxcb" ,libxcb))) (inputs `(("xtrans" ,xtrans))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("xorgproto" ,xorgproto))) (home-page "https://www.x.org/wiki/") (synopsis "Xorg Core X11 protocol client library") (description "Xorg Core X11 protocol client library.") @@ -5451,6 +5522,8 @@ draggable titlebars and borders.") (base32 "10l7c9fm0jmpkm9ab9dz8r6m1pr87vvgqjnbx1psz50h4pwfklrs")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libx11" ,libx11) ("libxrender" ,libxrender) @@ -5491,9 +5564,15 @@ draggable titlebars and borders.") (outputs '("out" "doc")) ;2 MiB of man pages + XML (arguments - '(#:configure-flags (list (string-append "--mandir=" - (assoc-ref %outputs "doc") - "/share/man")))) + `(#:configure-flags + (list (string-append "--mandir=" + (assoc-ref %outputs "doc") + "/share/man") + "--disable-static" + ;; Disable zero malloc check that fails when cross-compiling. + ,@(if (%current-target-system) + '("--disable-malloc0returnsnull") + '())))) (propagated-inputs `(("libx11" ,libx11) ("libice" ,libice) @@ -5523,6 +5602,8 @@ draggable titlebars and borders.") (base32 "1kdhxplwrn43d9jp3v54llp05kwx210lrsdvqb6944jp29rhdy4f")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libxext" ,libxext) ("libxmu" ,libxmu) @@ -5582,6 +5663,8 @@ keyboard focus, and user-specified key and pointer button bindings.") (base32 "1sahmrgbpyki4bb72hxym0zvxwnycmswsxiisgqlln9vrdlr9r26")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libxcb" ,libxcb))) (native-inputs @@ -5618,6 +5701,8 @@ The XCB util module provides the following libraries: (base32 "0krr4rcw6r42cncinzvzzdqnmxk3nrgpnadyg2h8k9x10q3hm885")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (native-inputs `(("m4" ,m4) ("pkg-config" ,pkg-config))) @@ -5700,6 +5785,8 @@ numbers.") (base32 "1z1gxacg7q4cw6jrd26gvi5y04npsyavblcdad1xccc8swvnmf9d")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libxcb" ,libxcb))) (inputs @@ -5734,6 +5821,8 @@ The XCB util-image module provides the following library: (base32 "1nbd45pzc1wm6v5drr5338j4nicbgxa5hcakvsvm5pnyy47lky0f")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libxcb" ,libxcb))) (native-inputs @@ -5766,6 +5855,8 @@ The XCB util-keysyms module provides the following library: (base32 "0nza1csdvvxbmk8vgv8vpmq7q8h05xrw3cfx9lwxd1hjzd47xsf6")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libxcb" ,libxcb))) (native-inputs @@ -5798,6 +5889,8 @@ The XCB util-renderutil module provides the following library: (base32 "0gra7hfyxajic4mjd63cpqvd20si53j1q3rbdlkqkahfciwq3gr8")))) (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--disable-static"))) (propagated-inputs `(("libxcb" ,libxcb))) (native-inputs @@ -6145,12 +6238,6 @@ Conventions Manual) and some of the @dfn{EWMH} (base32 "11i7vyk3pynw8q8aczpy56qncm84y0cmhlvyja3sj8dgy60g03q2")) (file-name (git-file-name name version)))) (build-system gnu-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'autogen - (lambda _ - (setenv "NOCONFIGURE" "t") - (invoke "sh" "autogen.sh")))))) (native-inputs `(("pkg-config" ,pkg-config) ("autoconf" ,autoconf) @@ -6186,7 +6273,7 @@ basic eye-candy effects.") (inputs `(("ffmpeg" ,ffmpeg) ("flac" ,flac) ("gtk+-2" ,gtk+-2) ;; no full GTK3 support yet - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libvpx" ,libvpx) ("libx264" ,libx264) @@ -6558,25 +6645,28 @@ output.") " "))) #t)) (add-before 'build 'make-doubled-bdfs - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs #:allow-other-keys) (invoke "make" "-C" "Fonts" "doubled_bdfs" (string-append "SHELL=" - (assoc-ref inputs "bash") + (assoc-ref (or native-inputs inputs) + "bash") "/bin/bash")))) (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let ((out (assoc-ref %outputs "out"))) (invoke "make" "install-linux" (string-append "prefix=" out) (string-append "SHELL=" - (assoc-ref inputs "bash") + (assoc-ref (or native-inputs inputs) + "bash") "/bin/bash")))))))) (native-inputs `(("pkg-config" ,pkg-config) ("bdftopcf" ,bdftopcf) ("bdfresize" ,bdfresize) - ("sharutils" ,sharutils))) ;for 'uuencode' + ("sharutils" ,sharutils) ;for 'uuencode' + ("perl" ,perl))) (inputs `(("perl" ,perl))) ;used by 'ckbcomp' (synopsis "Set up the Linux console font and keyboard") diff --git a/gnu/services/base.scm b/gnu/services/base.scm index b14bbcc3cd..6ea7ef8e7e 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -47,7 +47,7 @@ #:select (alsa-utils crda eudev e2fsprogs fuse gpm kbd lvm2 rng-tools)) #:use-module (gnu packages bash) #:use-module ((gnu packages base) - #:select (canonical-package coreutils glibc glibc-utf8-locales)) + #:select (coreutils glibc glibc-utf8-locales)) #:use-module (gnu packages package-management) #:use-module ((gnu packages gnupg) #:select (guile-gcrypt)) #:use-module (gnu packages linux) @@ -1093,7 +1093,7 @@ the tty to run, among other things." (name-services nscd-configuration-name-services ;list of <packages> (default '())) (glibc nscd-configuration-glibc ;<package> - (default (canonical-package glibc)))) + (default glibc))) (define-record-type* <nscd-cache> nscd-cache make-nscd-cache nscd-cache? @@ -1840,7 +1840,7 @@ archive}). If that is not the case, the service will fail to start." udev-configuration make-udev-configuration udev-configuration? (udev udev-configuration-udev ;<package> - (default eudev/btrfs-fix)) + (default eudev)) (rules udev-configuration-rules ;list of <package> (default '()))) @@ -2038,7 +2038,7 @@ the udev rules in use.") directory dynamically. Get extra rules from the packages listed in the @code{rules} field of its value, @code{udev-configuration} object."))) -(define* (udev-service #:key (udev eudev/btrfs-fix) (rules '())) +(define* (udev-service #:key (udev eudev) (rules '())) "Run @var{udev}, which populates the @file{/dev} directory dynamically. Get extra rules from the packages listed in @var{rules}." (service udev-service-type @@ -2396,9 +2396,7 @@ to handle." (rules (list lvm2 fuse alsa-utils crda)))) (service special-files-service-type - `(("/bin/sh" ,(file-append (canonical-package bash) - "/bin/sh")) - ("/usr/bin/env" ,(file-append (canonical-package coreutils) - "/bin/env")))))) + `(("/bin/sh" ,(file-append bash "/bin/sh")) + ("/usr/bin/env" ,(file-append coreutils "/bin/env")))))) ;;; base.scm ends here diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index ecdf2f242e..826a3c2215 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2018 Carlo Zancanaro <carlo@zancanaro.id.au> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ #:use-module (guix store) #:use-module (guix records) #:use-module (guix derivations) ;imported-modules, etc. + #:use-module (guix utils) #:use-module (gnu services) #:use-module (gnu services herd) #:use-module (gnu packages admin) @@ -264,22 +266,27 @@ stored." (define (scm->go file) "Compile FILE, which contains code to be loaded by shepherd's config file, and return the resulting '.go' file." - (with-extensions (list shepherd) - (computed-file (string-append (basename (scheme-file-name file) ".scm") - ".go") - #~(begin - (use-modules (system base compile)) - - ;; Do the same as the Shepherd's 'load-in-user-module'. - (let ((env (make-fresh-user-module))) - (module-use! env (resolve-interface '(oop goops))) - (module-use! env (resolve-interface '(shepherd service))) - (compile-file #$file #:output-file #$output - #:env env))) - - ;; It's faster to build locally than to download. - #:options '(#:local-build? #t - #:substitutable? #f)))) + ;; FIXME: %current-target-system may not be bound <https://bugs.gnu.org/29296> + (let ((target (%current-target-system))) + (with-extensions (list shepherd) + (computed-file (string-append (basename (scheme-file-name file) ".scm") + ".go") + #~(begin + (use-modules (system base compile) + (system base target)) + + ;; Do the same as the Shepherd's 'load-in-user-module'. + (let ((env (make-fresh-user-module))) + (module-use! env (resolve-interface '(oop goops))) + (module-use! env (resolve-interface '(shepherd service))) + (with-target #$(or target #~%host-type) + (lambda _ + (compile-file #$file #:output-file #$output + #:env env))))) + + ;; It's faster to build locally than to download. + #:options '(#:local-build? #t + #:substitutable? #f))))) (define (shepherd-configuration-file services) "Return the shepherd configuration file for SERVICES." diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 6441400ffd..2505bde97b 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -31,7 +31,7 @@ #:use-module (gnu system keyboard) #:use-module (gnu services base) #:use-module (gnu services dbus) - #:use-module ((gnu packages base) #:select (canonical-package)) + #:use-module (gnu packages base) #:use-module (gnu packages guile) #:use-module (gnu packages xorg) #:use-module (gnu packages fonts) diff --git a/gnu/system.scm b/gnu/system.scm index 0c5d5df365..cd75e4d4ba 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -614,17 +614,12 @@ of PROVENANCE-SERVICE-TYPE to its services." (cons* procps psmisc which (@ (gnu packages admin) shadow) ;for 'passwd' - ;; XXX: We don't use (canonical-package guile-2.2) here because that - ;; would create a collision in the global profile between the GMP - ;; variant propagated by 'guile-final' and the GMP variant propagated - ;; by 'gnutls', itself propagated by 'guix'. - guile-2.2 + guile-3.0 ;; The packages below are also in %FINAL-INPUTS, so take them from ;; there to avoid duplication. - (map canonical-package - (list bash coreutils findutils grep sed - diffutils patch gawk tar gzip bzip2 xz lzip)))) + (list bash coreutils findutils grep sed + diffutils patch gawk tar gzip bzip2 xz lzip))) (define %base-packages-linux ;; Default set of linux specific packages. diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm new file mode 100644 index 0000000000..58bfdf88f6 --- /dev/null +++ b/gnu/system/hurd.scm @@ -0,0 +1,225 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix 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 General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu system hurd) + #:use-module (guix gexp) + #:use-module (guix profiles) + #:use-module (guix utils) + #:use-module (gnu bootloader grub) + #:use-module (gnu packages admin) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages cross-base) + #:use-module (gnu packages file) + #:use-module (gnu packages guile) + #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages hurd) + #:use-module (gnu packages less) + #:use-module (gnu system vm) + #:export (cross-hurd-image)) + +;;; Commentary: +;;; +;;; This module provides tools to (cross-)build GNU/Hurd virtual machine +;;; images. +;;; +;;; Code: + +;; XXX: Surely this belongs in (guix profiles), but perhaps we need high-level +;; <profile> objects so one can specify hooks, etc.? +(define-gexp-compiler (compile-manifest (manifest + (@@ (guix profiles) <manifest>)) + system target) + "Lower MANIFEST as a profile." + (profile-derivation manifest + #:system system + #:target target)) + +(define %base-packages/hurd + (list hurd bash coreutils file findutils grep sed + guile-3.0 guile-colorized guile-readline + net-base inetutils less which)) + +(define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach)) + "Return a cross-built GNU/Hurd image." + + (define (cross-built thing) + (with-parameters ((%current-target-system "i586-pc-gnu")) + thing)) + + (define (cross-built-entry entry) + (manifest-entry + (inherit entry) + (item (cross-built (manifest-entry-item entry))) + (dependencies (map cross-built-entry + (manifest-entry-dependencies entry))))) + + (define system-profile + (map-manifest-entries cross-built-entry + (packages->manifest %base-packages/hurd))) + + (define grub.cfg + (let ((hurd (cross-built hurd)) + (mach (with-parameters ((%current-system "i686-linux")) + gnumach)) + (libc (cross-libc "i586-pc-gnu"))) + (computed-file "grub.cfg" + #~(call-with-output-file #$output + (lambda (port) + (format port " +set timeout=2 +search.file ~a/boot/gnumach + +menuentry \"GNU\" { + multiboot ~a/boot/gnumach root=device:hd0s1 + module ~a/hurd/ext2fs.static ext2fs \\ + --multiboot-command-line='${kernel-command-line}' \\ + --host-priv-port='${host-port}' \\ + --device-master-port='${device-port}' \\ + --exec-server-task='${exec-task}' -T typed '${root}' \\ + '$(task-create)' '$(task-resume)' + module ~a/lib/ld.so.1 exec ~a/hurd/exec '$(exec-task=task-create)' +}\n" + #+mach #+mach #+hurd + #+libc #+hurd)))))) + + (define fstab + (plain-file "fstab" + "# This file was generated from your Guix configuration. Any changes +# will be lost upon reboot or reconfiguration. + +/dev/hd0s1 / ext2 defaults +")) + + (define passwd + (plain-file "passwd" + "root:x:0:0:root:/root:/bin/sh +guixbuilder:x:1:1:guixbuilder:/var/empty:/bin/no-sh +")) + + (define group + (plain-file "group" + "guixbuild:x:1:guixbuilder +")) + + (define shadow + (plain-file "shadow" + "root::0:0:0:0::: +")) + + (define etc-profile + (plain-file "profile" + "\ +export PS1='\\u@\\h\\$ ' + +GUIX_PROFILE=\"/run/current-system/profile\" +. \"$GUIX_PROFILE/etc/profile\" + +GUIX_PROFILE=\"$HOME/.guix-profile\" +if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then + . \"$GUIX_PROFILE/etc/profile\" +fi\n")) + + (define hurd-directives + `((directory "/servers") + ,@(map (lambda (server) + `(file ,(string-append "/servers/" server))) + '("startup" "exec" "proc" "password" + "default-pager" "crash-dump-core" + "kill" "suspend")) + ("/servers/crash" -> "crash-dump-core") + (directory "/servers/socket") + (file "/servers/socket/1") + (file "/servers/socket/2") + (file "/servers/socket/16") + ("/servers/socket/local" -> "1") + ("/servers/socket/inet" -> "2") + ("/servers/socket/inet6" -> "16") + (directory "/boot") + ("/boot/grub.cfg" -> ,grub.cfg) ;XXX: not strictly needed + ("/hurd" -> ,(file-append (with-parameters ((%current-target-system + "i586-pc-gnu")) + hurd) + "/hurd")) + + ;; TODO: Create those during activation, eventually. + (directory "/root") + (file "/root/.guile" + ,(object->string + '(begin + (use-modules (ice-9 readline) (ice-9 colorized)) + (activate-readline) (activate-colorized)))) + (directory "/run") + (directory "/run/current-system") + ("/run/current-system/profile" -> ,system-profile) + ("/etc/profile" -> ,etc-profile) + ("/etc/fstab" -> ,fstab) + ("/etc/group" -> ,group) + ("/etc/passwd" -> ,passwd) + ("/etc/shadow" -> ,shadow) + (file "/etc/hostname" "guixygnu") + (file "/etc/resolv.conf" + "nameserver 10.0.2.3\n") + ("/etc/services" -> ,(file-append (with-parameters ((%current-target-system + "i586-pc-gnu")) + net-base) + "/etc/services")) + ("/etc/protocols" -> ,(file-append (with-parameters ((%current-target-system + "i586-pc-gnu")) + net-base) + "/etc/protocols")) + ("/etc/motd" -> ,(file-append (with-parameters ((%current-target-system + "i586-pc-gnu")) + hurd) + "/etc/motd")) + ("/etc/login" -> ,(file-append (with-parameters ((%current-target-system + "i586-pc-gnu")) + hurd) + "/etc/login")) + + + ;; XXX can we instead, harmlessly set _PATH_TTYS (from glibc) in runttys.c? + ("/etc/ttys" -> ,(file-append (with-parameters ((%current-target-system + "i586-pc-gnu")) + hurd) + "/etc/ttys")) + ("/bin/sh" -> ,(file-append (with-parameters ((%current-target-system + "i586-pc-gnu")) + bash) + "/bin/sh")))) + + (qemu-image #:file-system-type "ext2" + #:file-system-options '("-o" "hurd") + #:device-nodes 'hurd + #:inputs `(("system" ,system-profile) + ("grub.cfg" ,grub.cfg) + ("fstab" ,fstab) + ("passwd" ,passwd) + ("group" ,group) + ("etc-profile" ,etc-profile) + ("shadow" ,shadow)) + #:copy-inputs? #t + #:os system-profile + #:bootcfg-drv grub.cfg + #:bootloader grub-bootloader + #:register-closures? #f + #:extra-directives hurd-directives)) + +;; Return this thunk so one can type "guix build -f gnu/system/hurd.scm". +cross-hurd-image diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 6435c1bff4..fe49ffdb94 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -419,8 +419,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m ;; Having /bin/sh is a good idea. In particular it allows Tramp ;; connections to this system to work. (service special-files-service-type - `(("/bin/sh" ,(file-append (canonical-package bash) - "/bin/sh")))) + `(("/bin/sh" ,(file-append bash "/bin/sh")))) ;; Loopback device, needed by OpenSSH notably. (service static-networking-service-type @@ -443,7 +442,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m (list bare-bones-os glibc-utf8-locales texinfo - (canonical-package guile-2.2))) + guile-3.0)) ;; Machines without Kernel Mode Setting (those with many old and ;; current AMD GPUs, SiS GPUs, ...) need uvesafb to show the GUI @@ -515,7 +514,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m ;; Explicitly allow for empty passwords. (base-pam-services #:allow-empty-passwords? #t)) - (packages (cons* (canonical-package glibc) ;for 'tzselect' & co. + (packages (cons* glibc ;for 'tzselect' & co. parted gptfdisk ddrescue fontconfig font-dejavu font-gnu-unifont diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 6a1840dbf6..c43d53a210 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -36,7 +36,7 @@ #:use-module ((gnu packages xorg) #:select (console-setup xkeyboard-config)) #:use-module ((gnu packages make-bootstrap) - #:select (%guile-static-stripped)) + #:select (%guile-3.0-static-stripped)) #:use-module (gnu system file-systems) #:use-module (gnu system mapped-devices) #:use-module (gnu system keyboard) @@ -62,7 +62,7 @@ (define* (expression->initrd exp #:key - (guile %guile-static-stripped) + (guile %guile-3.0-static-stripped) (gzip gzip) (name "guile-initrd") (system (%current-system))) diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm index 8466d5b07d..ec1b71e061 100644 --- a/gnu/system/locale.scm +++ b/gnu/system/locale.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. @@ -86,7 +86,7 @@ or #f on failure." #f))) (define* (single-locale-directory locales - #:key (libc (canonical-package glibc))) + #:key (libc glibc)) "Return a directory containing all of LOCALES for LIBC compiled. Because locale data formats are incompatible when switching from one libc to @@ -147,7 +147,8 @@ data format changes between libc versions." (define %default-locale-libcs ;; The libcs for which we build locales by default. - (list (canonical-package glibc))) + ;; List the previous and current libc to ease transition. + (list glibc-2.29 glibc)) (define %default-locale-definitions ;; Arbitrary set of locales that are built by default. They are here mostly diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 2e82e12be2..163e8b4e9c 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -277,6 +277,9 @@ substitutable." (disk-image-size 'guess) (disk-image-format "qcow2") (file-system-type "ext4") + (file-system-options '()) + (device-nodes 'linux) + (extra-directives '()) file-system-label file-system-uuid os @@ -290,7 +293,8 @@ substitutable." 'qcow2' or 'raw'), with a root partition of type FILE-SYSTEM-TYPE. Optionally, FILE-SYSTEM-LABEL can be specified as the volume name for the root partition; likewise FILE-SYSTEM-UUID, if true, specifies the UUID of the root -partition (a UUID object). +partition (a UUID object). FILE-SYSTEM-OPTIONS is an optional list of +command-line options passed to 'mkfs.ext4' (or similar). The returned image is a full disk image that runs OS-DERIVATION, with a GRUB installation that uses GRUB-CONFIGURATION as its configuration @@ -301,7 +305,13 @@ all of INPUTS into the image being built. When REGISTER-CLOSURES? is true, register INPUTS in the store database of the image so that Guix can be used in the image. By default, REGISTER-CLOSURES? is set to true only if a service of type GUIX-SERVICE-TYPE is present in the services definition of the operating -system." +system. + +When DEVICE-NODES is 'linux, create Linux-device block and character devices +under /dev. When it is 'hurd, do Hurdish things. + +EXTRA-DIRECTIVES is an optional list of directives to populate the root file +system that is passed to 'populate-root-file-system'." (define schema (and register-closures? (local-file (search-path %load-path @@ -319,6 +329,9 @@ system." #~(begin (use-modules (gnu build bootloader) (gnu build vm) + ((gnu build linux-boot) + #:select (make-essential-device-nodes + make-hurd-device-nodes)) (guix store database) (guix build utils) (srfi srfi-26) @@ -350,11 +363,17 @@ system." (((names . _) ...) names))) (initialize (root-partition-initializer + #:extra-directives '#$extra-directives #:closures graphs #:copy-closures? #$copy-inputs? #:register-closures? #$register-closures? #:system-directory #$os + #:make-device-nodes + #$(match device-nodes + ('linux #~make-essential-device-nodes) + ('hurd #~make-hurd-device-nodes)) + ;; Disable deduplication to speed things up, ;; and because it doesn't help much for a ;; single system generation. @@ -376,6 +395,7 @@ system." (uuid #$(and=> file-system-uuid uuid-bytevector)) (file-system #$file-system-type) + (file-system-options '#$file-system-options) (flags '(boot)) (initializer initialize))) ;; Append a small EFI System Partition for use with UEFI diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 2e5913953e..94d970e1cc 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -32,6 +32,7 @@ #:use-module ((gnu build vm) #:select (qemu-command)) #:use-module (gnu packages admin) #:use-module (gnu packages bootloaders) + #:use-module (gnu packages commencement) ;for 'guile-final' #:use-module (gnu packages cryptsetup) #:use-module (gnu packages linux) #:use-module (gnu packages ocr) @@ -230,7 +231,8 @@ packages defined in installation-os." ;; Since the installation system has no network access, ;; we cheat a little bit by adding TARGET to its GC ;; roots. This way, we know 'guix system init' will - ;; succeed. + ;; succeed. Also add guile-final, which is pulled in + ;; through provenance.drv and may not always be present. (image (system-image (image @@ -240,7 +242,7 @@ packages defined in installation-os." (size install-size) (operating-system (operating-system-with-gc-roots - os (list target))) + os (list target guile-final))) ;; Don't provide substitutes; too big. (substitutable? #f))))) (define install diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm index ca88fadddf..29259c5785 100644 --- a/guix/build-system/cmake.scm +++ b/guix/build-system/cmake.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; @@ -43,16 +43,19 @@ `((guix build cmake-build-system) ,@%gnu-build-system-modules)) -(define (default-cmake) +(define (default-cmake target) "Return the default CMake package." ;; Do not use `@' to avoid introducing circular dependencies. (let ((module (resolve-interface '(gnu packages cmake)))) - (module-ref module 'cmake-minimal))) + (module-ref module + (if target + 'cmake-minimal-cross + 'cmake-minimal)))) (define* (lower name #:key source inputs native-inputs outputs system target - (cmake (default-cmake)) + (cmake (default-cmake target)) #:allow-other-keys #:rest arguments) "Return a bag for NAME." @@ -69,6 +72,7 @@ '()) ,@`(("cmake" ,cmake)) ,@native-inputs + ,@(if target '() inputs) ,@(if target ;; Use the standard cross inputs of ;; 'gnu-build-system'. @@ -76,7 +80,7 @@ '()) ;; Keep the standard inputs of 'gnu-build-system'. ,@(standard-packages))) - (host-inputs inputs) + (host-inputs (if target inputs '())) ;; The cross-libc is really a target package, but for bootstrapping ;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a @@ -99,7 +103,7 @@ (build-type "RelWithDebInfo") (tests? #t) (test-target "test") - (parallel-build? #t) (parallel-tests? #f) + (parallel-build? #t) (parallel-tests? #t) (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) @@ -178,7 +182,7 @@ provides a 'CMakeLists.txt' file as its build system." (build-type "RelWithDebInfo") (tests? #f) ; nothing can be done (test-target "test") - (parallel-build? #t) (parallel-tests? #f) + (parallel-build? #t) (parallel-tests? #t) (validate-runpath? #t) (patch-shebangs? #t) (strip-binaries? #t) diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm index 8de7dfbfc2..fb1f8fb930 100644 --- a/guix/build-system/glib-or-gtk.scm +++ b/guix/build-system/glib-or-gtk.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch> ;;; @@ -92,15 +92,15 @@ (bag (name name) (system system) - (host-inputs `(,@(if source - `(("source" ,source)) - '()) - ,@inputs)) - (build-inputs `(("glib:bin" ,glib "bin") ; to compile schemas + (host-inputs (if source + `(("source" ,source)) + '())) + (build-inputs `(,@native-inputs + ,@inputs + ("glib:bin" ,glib "bin") ; to compile schemas ,@(if implicit-inputs? (standard-packages) - '()) - ,@native-inputs)) + '()))) (outputs outputs) (build glib-or-gtk-build) (arguments (strip-keyword-arguments private-keywords arguments))))) diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 7266fa0009..f59567febb 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -296,13 +296,19 @@ standard packages used as implicit inputs of the GNU build system." `(("source" ,source)) '()) ,@native-inputs + + ;; When not cross-compiling, ensure implicit inputs come + ;; last. That way, libc headers come last, which allows + ;; #include_next to work correctly; see + ;; <https://bugs.gnu.org/30756>. + ,@(if target '() inputs) ,@(if (and target implicit-cross-inputs?) (standard-cross-packages target 'host) '()) ,@(if implicit-inputs? (standard-packages) '()))) - (host-inputs inputs) + (host-inputs (if target inputs '())) ;; The cross-libc is really a target package, but for bootstrapping ;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a @@ -454,13 +460,19 @@ is one of `host' or `target'." (libc (module-ref cross 'cross-libc))) (case kind ((host) + ;; Cross-GCC appears once here, so that it's in $PATH... `(("cross-gcc" ,(gcc target #:xbinutils (binutils target) #:libc (libc target))) ("cross-binutils" ,(binutils target)))) ((target) (let ((libc (libc target))) - `(("cross-libc" ,libc) + ;; ... and once here, so that libstdc++ & co. are in + ;; CROSS_CPLUS_INCLUDE_PATH, etc. + `(("cross-gcc" ,(gcc target + #:xbinutils (binutils target) + #:libc libc)) + ("cross-libc" ,libc) ;; MinGW's libc doesn't have a "static" output. ,@(if (member "static" (package-outputs libc)) diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index b29f2f4ecf..b68bcb80de 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -74,13 +74,13 @@ (system system) (build-inputs `(("meson" ,meson) ("ninja" ,ninja) - ,@native-inputs)) - (host-inputs `(,@(if source - `(("source" ,source)) - '()) - ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) + ,@native-inputs + ,@inputs + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(standard-packages))) + (host-inputs (if source + `(("source" ,source)) + '())) (outputs outputs) (build meson-build) (arguments (strip-keyword-arguments private-keywords arguments))))) diff --git a/guix/build-system/texlive.scm b/guix/build-system/texlive.scm index ad99d1e2d0..8bbca0ccb7 100644 --- a/guix/build-system/texlive.scm +++ b/guix/build-system/texlive.scm @@ -42,8 +42,8 @@ ;; These variables specify the SVN tag and the matching SVN revision. They ;; are taken from https://www.tug.org/svn/texlive/tags/ -(define %texlive-tag "texlive-2018.2") -(define %texlive-revision 49435) +(define %texlive-tag "texlive-2019.3") +(define %texlive-revision 51265) (define (texlive-origin name version locations hash) "Return an <origin> object for a TeX Live package consisting of multiple diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm index 9b1112f2d6..d1ff5071be 100644 --- a/guix/build/cmake-build-system.scm +++ b/guix/build/cmake-build-system.scm @@ -67,6 +67,8 @@ ,@(if target (list (string-append "-DCMAKE_C_COMPILER=" target "-gcc") + (string-append "-DCMAKE_CXX_COMPILER=" + target "-g++") (if (string-contains target "mingw") "-DCMAKE_SYSTEM_NAME=Windows" "-DCMAKE_SYSTEM_NAME=Linux")) diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm index 219310cf08..26ea59bc25 100644 --- a/guix/build/emacs-build-system.scm +++ b/guix/build/emacs-build-system.scm @@ -21,7 +21,7 @@ (define-module (guix build emacs-build-system) #:use-module ((guix build gnu-build-system) #:prefix gnu:) - #:use-module (guix build utils) + #:use-module ((guix build utils) #:hide (delete)) #:use-module (guix build emacs-utils) #:use-module (srfi srfi-1) #:use-module (srfi srfi-11) diff --git a/guix/build/gnu-bootstrap.scm b/guix/build/gnu-bootstrap.scm new file mode 100644 index 0000000000..1cb9dc5512 --- /dev/null +++ b/guix/build/gnu-bootstrap.scm @@ -0,0 +1,114 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix 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 General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +;; Commentary: +;; +;; These procedures can be used to adapt the GNU Build System to build +;; pure Scheme packages targeting the bootstrap Guile. +;; +;; Code: + +(define-module (guix build gnu-bootstrap) + #:use-module (guix build utils) + #:use-module (system base compile) + #:export (bootstrap-configure + bootstrap-build + bootstrap-install)) + +(define (bootstrap-configure version modules scripts) + "Create a procedure that configures an early bootstrap package. The +procedure will search the MODULES directory and configure all of the +'.in' files with VERSION. It will then search the SCRIPTS directory and +configure all of the '.in' files with the bootstrap Guile and its module +and object directories." + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (guile-dir (assoc-ref inputs "guile")) + (guile (string-append guile-dir "/bin/guile")) + (moddir (string-append out "/share/guile/site/" + (effective-version))) + (godir (string-append out "/lib/guile/" + (effective-version) + "/site-ccache"))) + (for-each (lambda (template) + (format #t "Configuring ~a~%" template) + (let ((target (string-drop-right template 3))) + (copy-file template target) + (substitute* target + (("@VERSION@") version)))) + (find-files modules + (lambda (fn st) + (string-suffix? ".in" fn)))) + (for-each (lambda (template) + (format #t "Configuring ~a~%" template) + (let ((target (string-drop-right template 3))) + (copy-file template target) + (substitute* target + (("@GUILE@") guile) + (("@MODDIR@") moddir) + (("@GODIR@") godir)) + (chmod target #o755))) + (find-files scripts + (lambda (fn st) + (string-suffix? ".in" fn)))) + #t))) + +(define (bootstrap-build modules) + "Create a procedure that builds an early bootstrap package. The +procedure will search the MODULES directory and compile all of the +'.scm' files." + (lambda _ + (add-to-load-path (getcwd)) + (for-each (lambda (scm) + (let* ((base (string-drop-right scm 4)) + (go (string-append base ".go")) + (dir (dirname scm))) + (format #t "Compiling ~a~%" scm) + (compile-file scm #:output-file go))) + (find-files modules "\\.scm$")) + #t)) + +(define (bootstrap-install modules scripts) + "Create a procedure that installs an early bootstrap package. The +procedure will install all of the '.scm' and '.go' files in the MODULES +directory, and all the executable files in the SCRIPTS directory." + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (guile-dir (assoc-ref inputs "guile")) + (guile (string-append guile-dir "/bin/guile")) + (moddir (string-append out "/share/guile/site/" + (effective-version))) + (godir (string-append out "/lib/guile/" + (effective-version) + "/site-ccache"))) + (for-each (lambda (scm) + (let* ((base (string-drop-right scm 4)) + (go (string-append base ".go")) + (dir (dirname scm))) + (format #t "Installing ~a~%" scm) + (install-file scm (string-append moddir "/" dir)) + (format #t "Installing ~a~%" go) + (install-file go (string-append godir "/" dir)))) + (find-files modules "\\.scm$")) + (for-each (lambda (script) + (format #t "Installing ~a~%" script) + (install-file script (string-append out "/bin"))) + (find-files scripts + (lambda (fn st) + (executable-file? fn)))) + #t))) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 4df0bb4904..2e7dff2034 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot> ;;; ;;; This file is part of GNU Guix. ;;; @@ -173,12 +174,16 @@ working directory." \"autoreconf\". Otherwise do nothing." ;; Note: Run that right after 'unpack' so that the generated files are ;; visible when the 'patch-source-shebangs' phase runs. - (if (not (file-exists? "configure")) + (define (script-exists? file) + (and (file-exists? file) + (not (file-is-directory? file)))) + + (if (not (script-exists? "configure")) ;; First try one of the BOOTSTRAP-SCRIPTS. If none exists, and it's ;; clearly an Autoconf-based project, run 'autoreconf'. Otherwise, do ;; nothing (perhaps the user removed or overrode the 'configure' phase.) - (let ((script (find file-exists? bootstrap-scripts))) + (let ((script (find script-exists? bootstrap-scripts))) ;; GNU packages often invoke the 'git-version-gen' script from ;; 'configure.ac' so make sure it has a valid shebang. (false-if-file-not-found @@ -186,12 +191,15 @@ working directory." (if script (let ((script (string-append "./" script))) + (setenv "NOCONFIGURE" "true") (format #t "running '~a'~%" script) (if (executable-file? script) (begin (patch-shebang script) (invoke script)) - (invoke "sh" script))) + (invoke "sh" script)) + ;; Let's clean up after ourselves. + (unsetenv "NOCONFIGURE")) (if (or (file-exists? "configure.ac") (file-exists? "configure.in")) (invoke "autoreconf" "-vif") diff --git a/guix/build/utils.scm b/guix/build/utils.scm index b8be73ead4..419c10195b 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -108,6 +108,8 @@ invoke/quiet + make-desktop-entry-file + locale-category->string)) @@ -892,7 +894,7 @@ transferred and the continuation of the transfer as a thunk." (x x))) (define patch-shebang - (let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)[[:blank:]]*([[:graph:]]*)(.*)$"))) + (let ((shebang-rx (make-regexp "^[[:blank:]]*(/[[:graph:]]+)[[:blank:]]*([[:graph:]]*)(.*)$"))) (lambda* (file #:optional (path (search-path-as-string->list (getenv "PATH"))) @@ -1324,6 +1326,105 @@ not supported." (&wrap-error (program prog) (type 'no-interpreter-found))))))))) +(define* (make-desktop-entry-file destination #:key + (type "Application") ; One of "Application", "Link" or "Directory". + (version "1.1") + name + (generic-name name) + (no-display #f) + comment + icon + (hidden #f) + only-show-in + not-show-in + (d-bus-activatable #f) + try-exec + exec + path + (terminal #f) + actions + mime-type + (categories "Application") + implements + keywords + (startup-notify #t) + startup-w-m-class + #:rest all-args) + "Create a desktop entry file at DESTINATION. +You must specify NAME. + +Values can be booleans, numbers, strings or list of strings. + +Additionally, locales can be specified with an alist where the key is the +locale. The #f key specifies the default. Example: + + #:name '((#f \"I love Guix\") (\"fr\" \"J'aime Guix\")) + +produces + + Name=I love Guix + Name[fr]=J'aime Guix + +For a complete description of the format, see the specifications at +https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html." + (define (escape-semicolon s) + (string-join (string-split s #\;) "\\;")) + (define* (parse key value #:optional locale) + (set! value (match value + (#t "true") + (#f "false") + ((? number? n) n) + ((? string? s) (escape-semicolon s)) + ((? list? value) + (catch 'wrong-type-arg + (lambda () (string-join (map escape-semicolon value) ";")) + (lambda args (error "List arguments can only contain strings: ~a" args)))) + (_ (error "Value must be a boolean, number, string or list of strings")))) + (format #t "~a=~a~%" + (if locale + (format #f "~a[~a]" key locale) + key) + value)) + + (define key-error-message "This procedure only takes key arguments beside DESTINATION") + + (unless name + (error "Missing NAME key argument")) + (unless (member #:type all-args) + (set! all-args (append (list #:type type) all-args))) + (mkdir-p (dirname destination)) + + (with-output-to-file destination + (lambda () + (format #t "[Desktop Entry]~%") + (let loop ((args all-args)) + (match args + (() #t) + ((_) (error key-error-message)) + ((key value . ...) + (unless (keyword? key) + (error key-error-message)) + (set! key + (string-join (map string-titlecase + (string-split (symbol->string + (keyword->symbol key)) + #\-)) + "")) + (match value + (((_ . _) . _) + (for-each (lambda (locale-subvalue) + (parse key + (if (and (list? (cdr locale-subvalue)) + (= 1 (length (cdr locale-subvalue)))) + ;; Support both proper and improper lists for convenience. + (cadr locale-subvalue) + (cdr locale-subvalue)) + (car locale-subvalue))) + value)) + (_ + (parse key value))) + (loop (cddr args)))))))) + ;;; ;;; Locales. diff --git a/guix/channels.scm b/guix/channels.scm index 041fae2a9c..0fa036446c 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -38,6 +38,7 @@ #:select (source-properties->location &error-location &fix-hint)) + #:use-module ((guix build utils) #:select (substitute*)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-2) #:use-module (srfi srfi-9) @@ -199,6 +200,46 @@ description file or its default value." channel INSTANCE." (channel-metadata-dependencies (channel-instance-metadata instance))) +;; Patch to apply to a source tree. +(define-record-type <patch> + (patch predicate application) + patch? + (predicate patch-predicate) ;procedure + (application patch-application)) ;procedure + +(define (apply-patches checkout commit patches) + "Apply the matching PATCHES to CHECKOUT, modifying files in place. The +result is unspecified." + (let loop ((patches patches)) + (match patches + (() #t) + ((($ <patch> predicate modify) rest ...) + ;; PREDICATE is passed COMMIT so that it can choose to only apply to + ;; ancestors. + (when (predicate checkout commit) + (modify checkout)) + (loop rest))))) + +(define* (latest-channel-instance store channel + #:key (patches %patches)) + "Return the latest channel instance for CHANNEL." + (define (dot-git? file stat) + (and (string=? (basename file) ".git") + (eq? 'directory (stat:type stat)))) + + (let-values (((checkout commit) + (update-cached-checkout (channel-url channel) + #:ref (channel-reference channel)))) + (when (guix-channel? channel) + ;; Apply the relevant subset of PATCHES directly in CHECKOUT. This is + ;; safe to do because 'switch-to-ref' eventually does a hard reset. + (apply-patches checkout commit patches)) + + (let* ((name (url+commit->name (channel-url channel) commit)) + (checkout (add-to-store store name #t "sha256" checkout + #:select? (negate dot-git?)))) + (channel-instance channel commit checkout)))) + (define* (latest-channel-instances store channels #:optional (previous-channels '())) "Return a list of channel instances corresponding to the latest checkouts of CHANNELS and the channels on which they depend. PREVIOUS-CHANNELS is a list @@ -224,20 +265,16 @@ of previously processed channels." (G_ "Updating channel '~a' from Git repository at '~a'...~%") (channel-name channel) (channel-url channel)) - (let-values (((checkout commit) - (latest-repository-commit store (channel-url channel) - #:ref (channel-reference - channel)))) - (let ((instance (channel-instance channel commit checkout))) - (let-values (((new-instances new-channels) - (latest-channel-instances - store - (channel-instance-dependencies instance) - previous-channels))) - (values (append (cons channel new-channels) - previous-channels) - (append (cons instance new-instances) - instances)))))))) + (let ((instance (latest-channel-instance store channel))) + (let-values (((new-instances new-channels) + (latest-channel-instances + store + (channel-instance-dependencies instance) + previous-channels))) + (values (append (cons channel new-channels) + previous-channels) + (append (cons instance new-instances) + instances))))))) previous-channels '() ;instances channels)) @@ -333,12 +370,42 @@ to '%package-module-path'." 'guile-2.2.4)) (define %quirks - ;; List of predicate/package pairs. This allows us provide information + ;; List of predicate/package pairs. This allows us to provide information ;; about specific Guile versions that old Guix revisions might need to use ;; just to be able to build and run the trampoline in %SELF-BUILD-FILE. See ;; <https://bugs.gnu.org/37506> `((,syscalls-reexports-local-variables? . ,guile-2.2.4))) + +(define %bug-41028-patch + ;; Patch for <https://bugs.gnu.org/41028>. The faulty code is the + ;; 'compute-guix-derivation' body, which uses 'call-with-new-thread' without + ;; importing (ice-9 threads). However, the 'call-with-new-thread' binding + ;; is no longer available in the default name space on Guile 3.0. + (let () + (define (missing-ice-9-threads-import? source commit) + ;; Return true if %SELF-BUILD-FILE is missing an (ice-9 threads) import. + (define content + (call-with-input-file (string-append source "/" %self-build-file) + read-string)) + + (and (string-contains content "(call-with-new-thread") + (not (string-contains content "(ice-9 threads)")))) + + (define (add-missing-ice-9-threads-import source) + ;; Add (ice-9 threads) import in the gexp of 'compute-guix-derivation'. + (substitute* (string-append source "/" %self-build-file) + (("^ +\\(use-modules \\(ice-9 match\\)\\)") + (object->string '(use-modules (ice-9 match) (ice-9 threads)))))) + + (patch missing-ice-9-threads-import? add-missing-ice-9-threads-import))) + +(define %patches + ;; Bits of past Guix revisions can become incompatible with newer Guix and + ;; Guile. This variable lists <patch> records for the Guix source tree that + ;; apply to the Guix source. + (list %bug-41028-patch)) + (define* (guile-for-source source #:optional (quirks %quirks)) "Return the Guile package to use when building SOURCE or #f if the default '%guile-for-build' should be good enough." diff --git a/guix/derivations.scm b/guix/derivations.scm index f6d6f7db25..7db61d272f 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -1105,39 +1105,13 @@ recursively." (string-tokenize (dirname file-name) not-slash)))))) (define* (imported-files store files ;deprecated - #:key (name "file-import") - (system (%current-system)) - (guile (%guile-for-build))) - "Return a derivation that imports FILES into STORE. FILES must be a list + #:key (name "file-import")) + "Return a store item that contains FILES. FILES must be a list of (FINAL-PATH . FILE-NAME) pairs; each FILE-NAME is read from the file system, imported, and appears under FINAL-PATH in the resulting store path." - (let* ((files (map (match-lambda - ((final-path . file-name) - (list final-path - (add-to-store store (basename final-path) #f - "sha256" file-name)))) - files)) - (builder - `(begin - (mkdir %output) (chdir %output) - ,@(append-map (match-lambda - ((final-path store-path) - (append (match (parent-directories final-path) - (() '()) - ((head ... tail) - (append (map (lambda (d) - `(false-if-exception - (mkdir ,d))) - head) - `((or (file-exists? ,tail) - (mkdir ,tail)))))) - `((symlink ,store-path ,final-path))))) - files)))) - (build-expression->derivation store name builder - #:system system - #:inputs files - #:guile-for-build guile - #:local-build? #t))) + (add-file-tree-to-store store + `(,name directory + ,@(file-mapping->tree files)))) ;; The "file not found" error condition. (define-condition-type &file-search-error &error @@ -1164,10 +1138,8 @@ of symbols.)" (define* (%imported-modules store modules ;deprecated #:key (name "module-import") - (system (%current-system)) - (guile (%guile-for-build)) (module-path %load-path)) - "Return a derivation that contains the source files of MODULES, a list of + "Return a store item that contains the source files of MODULES, a list of module names such as `(ice-9 q)'. All of MODULES must be in the MODULE-PATH search path." ;; TODO: Determine the closure of MODULES, build the `.go' files, @@ -1176,8 +1148,7 @@ search path." (let ((f (module->source-file-name m))) (cons f (search-path* module-path f)))) modules))) - (imported-files store files #:name name #:system system - #:guile guile))) + (imported-files store files #:name name))) (define* (%compiled-modules store modules ;deprecated #:key (name "module-import-compiled") @@ -1187,11 +1158,8 @@ search path." "Return a derivation that builds a tree containing the `.go' files corresponding to MODULES. All the MODULES are built in a context where they can refer to each other." - (let* ((module-drv (%imported-modules store modules - #:system system - #:guile guile + (let* ((module-dir (%imported-modules store modules #:module-path module-path)) - (module-dir (derivation->output-path module-drv)) (files (map (lambda (m) (let ((f (string-join (map symbol->string m) "/"))) @@ -1222,7 +1190,7 @@ they can refer to each other." files))) (build-expression->derivation store name builder - #:inputs `(("modules" ,module-drv)) + #:inputs `(("modules" ,module-dir)) #:system system #:guile-for-build guile #:local-build? #t))) @@ -1240,8 +1208,7 @@ MODULES are compiled." (list modules (derivation-file-name guile) system)) (or (hash-ref %module-cache key) - (let ((result (cons (%imported-modules store modules - #:system system #:guile guile) + (let ((result (cons (%imported-modules store modules) (%compiled-modules store modules #:system system #:guile guile)))) (hash-set! %module-cache key result) @@ -1375,10 +1342,8 @@ and PROPERTIES." #:guile guile-drv #:system system) '(#f . #f))) - (mod-drv (car mod+go-drv)) + (mod-dir (car mod+go-drv)) (go-drv (cdr mod+go-drv)) - (mod-dir (and mod-drv - (derivation->output-path mod-drv))) (go-dir (and go-drv (derivation->output-path go-drv)))) (derivation store name guile @@ -1395,7 +1360,7 @@ and PROPERTIES." #:inputs `((,(or guile-for-build (%guile-for-build))) (,builder) ,@(map cdr inputs) - ,@(if mod-drv `((,mod-drv) (,go-drv)) '())) + ,@(if mod-dir `((,mod-dir) (,go-drv)) '())) ;; When MODULES is non-empty, shamelessly clobber ;; $GUILE_LOAD_COMPILED_PATH. diff --git a/guix/gexp.scm b/guix/gexp.scm index c320065546..2a4b36519c 100644 --- a/guix/gexp.scm +++ b/guix/gexp.scm @@ -787,7 +787,7 @@ second element is the derivation to compile them." (target 'current) (graft? (%graft?)) (guile-for-build (%guile-for-build)) - (effective-version "2.2") + (effective-version "3.0") deprecation-warnings) "*Note: This API is subject to change; use at your own risk!* @@ -888,7 +888,7 @@ derivations--e.g., code evaluated for its side effects." (modules '()) (module-path %load-path) (guile-for-build (%guile-for-build)) - (effective-version "2.2") + (effective-version "3.0") (graft? (%graft?)) references-graphs allowed-references disallowed-references @@ -1304,49 +1304,6 @@ execution environment." ;;; Module handling. ;;; -(define %not-slash - (char-set-complement (char-set #\/))) - -(define (file-mapping->tree mapping) - "Convert MAPPING, an alist like: - - ((\"guix/build/utils.scm\" . \"…/utils.scm\")) - -to a tree suitable for 'interned-file-tree'." - (let ((mapping (map (match-lambda - ((destination . source) - (cons (string-tokenize destination - %not-slash) - source))) - mapping))) - (fold (lambda (pair result) - (match pair - ((destination . source) - (let loop ((destination destination) - (result result)) - (match destination - ((file) - (let* ((mode (stat:mode (stat source))) - (type (if (zero? (logand mode #o100)) - 'regular - 'executable))) - (alist-cons file - `(,type (file ,source)) - result))) - ((file rest ...) - (let ((directory (assoc-ref result file))) - (alist-cons file - `(directory - ,@(loop rest - (match directory - (('directory . entries) entries) - (#f '())))) - (if directory - (alist-delete file result) - result))))))))) - '() - mapping))) - (define %utils-module ;; This file provides 'mkdir-p', needed to implement 'imported-files' and ;; other primitives below. Note: We give the file name relative to this @@ -1481,14 +1438,9 @@ TARGET, a GNU triplet." (ice-9 format) (srfi srfi-1) (srfi srfi-26) + (system base target) (system base compile)) - ;; TODO: Inline this on the next rebuild cycle. - (ungexp-splicing - (if target - (gexp ((use-modules (system base target)))) - (gexp ()))) - (define (regular? file) (not (member file '("." "..")))) @@ -1603,12 +1555,12 @@ TARGET, a GNU triplet." ;;; (define (default-guile) - ;; Lazily resolve 'guile-2.2' (not 'guile-final' because this is for + ;; Lazily resolve 'guile-3.0' (not 'guile-final' because this is for ;; programs returned by 'program-file' and we don't want to keep references ;; to several Guile packages). This module must not refer to (gnu …) ;; modules directly, to avoid circular dependencies, hence this hack. (module-ref (resolve-interface '(gnu packages guile)) - 'guile-2.2)) + 'guile-3.0)) (define* (load-path-expression modules #:optional (path %load-path) #:key (extensions '()) system target) diff --git a/guix/git.scm b/guix/git.scm index 5fffd429bd..92121156cf 100644 --- a/guix/git.scm +++ b/guix/git.scm @@ -40,6 +40,7 @@ with-repository update-cached-checkout + url+commit->name latest-repository-commit commit-difference diff --git a/guix/packages.scm b/guix/packages.scm index 2fa4fd05d7..9fdc679f9a 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014, 2015, 2017, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2016 Alex Kost <alezost@gmail.com> -;;; Copyright © 2017, 2019 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. @@ -234,7 +234,7 @@ name of its URI." (define %supported-systems ;; This is the list of system types that are supported. By default, we ;; expect all packages to build successfully here. - '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux")) + '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu")) (define %hurd-systems ;; The GNU/Hurd systems for which support is being developed. @@ -638,8 +638,10 @@ specifies modules in scope when evaluating SNIPPET." (apply invoke (string-append #+tar "/bin/tar") "cvfa" #$output - ;; avoid non-determinism in the archive - "--mtime=@0" + ;; Avoid non-determinism in the archive. Set the mtime + ;; to 1 as is the case in the store (software like gzip + ;; behaves differently when it stumbles upon mtime = 0). + "--mtime=@1" "--owner=root:0" "--group=root:0" (if tar-supports-sort? diff --git a/guix/profiles.scm b/guix/profiles.scm index b3a3db0e84..25ff146bdf 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1171,6 +1171,8 @@ for both major versions of GTK+." ;; Don't run the hook when there's nothing to do. (let* ((pkg-gtk+ (module-ref ; lazy reference (resolve-interface '(gnu packages gtk)) 'gtk+)) + (pkg-gtk+2 (module-ref ; lazy reference + (resolve-interface '(gnu packages gtk)) 'gtk+-2)) (gexp #~(begin #$(if gtk+ (build @@ -1184,7 +1186,7 @@ for both major versions of GTK+." (build gtk+-2 "2.10.0" #~(string-append - #$gtk+-2 "/bin/gtk-query-immodules-2.0")) + #$pkg-gtk+2:bin "/bin/gtk-query-immodules-2.0")) #t)))) (if (or gtk+ gtk+-2) (gexp->derivation "gtk-im-modules" gexp @@ -1625,8 +1627,10 @@ are cross-built for TARGET." (guix search-paths) (srfi srfi-1)) - (setvbuf (current-output-port) _IOLBF) - (setvbuf (current-error-port) _IOLBF) + (let ((line (cond-expand (guile-2.2 'line) + (else _IOLBF)))) ;Guile 2.0 + (setvbuf (current-output-port) line) + (setvbuf (current-error-port) line)) #+(if locales? set-utf8-locale #t) diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index bfc4039c2b..03f455ab7b 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -38,8 +38,6 @@ #:use-module (gnu system file-systems) #:use-module (gnu packages) #:use-module (gnu packages bash) - #:use-module (gnu packages commencement) - #:use-module (gnu packages guile) #:use-module ((gnu packages bootstrap) #:select (bootstrap-executable %bootstrap-guile)) #:use-module (ice-9 format) @@ -724,7 +722,7 @@ message if any test fails." store (if bootstrap? %bootstrap-guile - (canonical-package guile-2.2))))) + (default-guile))))) (run-with-store store ;; Containers need a Bourne shell at /bin/sh. (mlet* %store-monad ((bash (environment-bash container? diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index f3d1b41c6f..580f696b41 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -1035,7 +1035,7 @@ Create a bundle of PACKAGE.\n")) store (if (assoc-ref opts 'bootstrap?) %bootstrap-guile - (canonical-package guile-2.2)) + (default-guile)) (assoc-ref opts 'system) #:graft? (assoc-ref opts 'graft?)))) (let* ((derivation? (assoc-ref opts 'derivation-only?)) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 2eb18919cc..dce9256bf5 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -55,8 +55,6 @@ #:use-module (srfi srfi-35) #:use-module (srfi srfi-37) #:use-module (gnu packages) - #:autoload (gnu packages base) (canonical-package) - #:autoload (gnu packages guile) (guile-2.2) #:autoload (gnu packages bootstrap) (%bootstrap-guile) #:export (build-and-use-profile delete-generations @@ -963,5 +961,5 @@ option processing with 'parse-command-line'." (%store) (if (assoc-ref opts 'bootstrap?) %bootstrap-guile - (canonical-package guile-2.2))))) + (default-guile))))) (process-actions (%store) opts)))))))) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 42c9956136..dfe7ee7ad5 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -787,7 +787,7 @@ Use '~/.config/guix/channels.scm' instead.")) store (if (assoc-ref opts 'bootstrap?) %bootstrap-guile - (canonical-package guile-2.2))))) + (default-guile))))) (with-profile-lock profile (run-with-store store (build-and-install instances profile))))))))))))))) diff --git a/guix/self.scm b/guix/self.scm index 4682cd221c..a9568049b2 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -48,12 +48,12 @@ (let ((ref (lambda (module variable) (module-ref (resolve-interface module) variable)))) (match-lambda - ("guile" (ref '(gnu packages guile) 'guile-3.0)) - ("guile-json" (ref '(gnu packages guile) 'guile3.0-json)) - ("guile-ssh" (ref '(gnu packages ssh) 'guile3.0-ssh)) - ("guile-git" (ref '(gnu packages guile) 'guile3.0-git)) - ("guile-sqlite3" (ref '(gnu packages guile) 'guile3.0-sqlite3)) - ("guile-gcrypt" (ref '(gnu packages gnupg) 'guile3.0-gcrypt)) + ("guile" (ref '(gnu packages guile) 'guile-3.0/libgc-7)) + ("guile-json" (ref '(gnu packages guile) 'guile-json-3)) + ("guile-ssh" (ref '(gnu packages ssh) 'guile-ssh)) + ("guile-git" (ref '(gnu packages guile) 'guile-git)) + ("guile-sqlite3" (ref '(gnu packages guile) 'guile-sqlite3)) + ("guile-gcrypt" (ref '(gnu packages gnupg) 'guile-gcrypt)) ("gnutls" (ref '(gnu packages tls) 'guile3.0-gnutls)) ("zlib" (ref '(gnu packages compression) 'zlib)) ("lzlib" (ref '(gnu packages compression) 'lzlib)) diff --git a/guix/store.scm b/guix/store.scm index fb4b92e0c4..6c7c07fd2d 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -103,6 +103,7 @@ add-text-to-store add-to-store add-file-tree-to-store + file-mapping->tree binary-file with-build-handler map/accumulate-builds @@ -1237,6 +1238,45 @@ an arbitrary directory layout in the store without creating a derivation." (hash-set! cache tree result) result))))) +(define (file-mapping->tree mapping) + "Convert MAPPING, an alist like: + + ((\"guix/build/utils.scm\" . \"…/utils.scm\")) + +to a tree suitable for 'add-file-tree-to-store' and 'interned-file-tree'." + (let ((mapping (map (match-lambda + ((destination . source) + (cons (string-tokenize destination %not-slash) + source))) + mapping))) + (fold (lambda (pair result) + (match pair + ((destination . source) + (let loop ((destination destination) + (result result)) + (match destination + ((file) + (let* ((mode (stat:mode (stat source))) + (type (if (zero? (logand mode #o100)) + 'regular + 'executable))) + (alist-cons file + `(,type (file ,source)) + result))) + ((file rest ...) + (let ((directory (assoc-ref result file))) + (alist-cons file + `(directory + ,@(loop rest + (match directory + (('directory . entries) entries) + (#f '())))) + (if directory + (alist-delete file result) + result))))))))) + '() + mapping))) + (define current-build-prompt ;; When true, this is the prompt to abort to when 'build-things' is called. (make-parameter #f)) diff --git a/guix/store/database.scm b/guix/store/database.scm index 88d05dc42e..ef52036ede 100644 --- a/guix/store/database.scm +++ b/guix/store/database.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2019 Caleb Ristvedt <caleb.ristvedt@cune.org> -;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2018, 2020 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -228,16 +228,18 @@ Every store item in REFERENCES must already be registered." ;;; High-level interface. ;;; -(define (reset-timestamps file) +(define* (reset-timestamps file #:key preserve-permissions?) "Reset the modification time on FILE and on all the files it contains, if -it's a directory. While at it, canonicalize file permissions." +it's a directory. Canonicalize file permissions unless PRESERVE-PERMISSIONS? +is true." ;; Note: We're resetting to one second after the Epoch like 'guix-daemon' ;; has always done. (let loop ((file file) (type (stat:type (lstat file)))) (case type ((directory) - (chmod file #o555) + (unless preserve-permissions? + (chmod file #o555)) (utime file 1 1 0 0) (let ((parent file)) (for-each (match-lambda @@ -254,7 +256,8 @@ it's a directory. While at it, canonicalize file permissions." ((symlink) (utime file 1 1 0 0 AT_SYMLINK_NOFOLLOW)) (else - (chmod file (if (executable-file? file) #o555 #o444)) + (unless preserve-permissions? + (chmod file (if (executable-file? file) #o555 #o444))) (utime file 1 1 0 0))))) (define* (register-path path diff --git a/guix/tests.scm b/guix/tests.scm index ff31bcad44..95a7d7c4b8 100644 --- a/guix/tests.scm +++ b/guix/tests.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -415,6 +415,9 @@ default values, and with EXTRA-FIELDS set as specified." #:implicit-inputs? #f #:tests? #f ;cannot run "make check" ,@(substitute-keyword-arguments (package-arguments gnu-make) + ((#:configure-flags flags ''()) + ;; As in 'gnu-make-boot0', work around a 'config.status' defect. + `(cons "--disable-dependency-tracking" ,flags)) ((#:phases phases) `(modify-phases ,phases (replace 'build diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc index 17e92c68a7..29266f1dd6 100644 --- a/nix/libstore/build.cc +++ b/nix/libstore/build.cc @@ -52,7 +52,12 @@ #endif -#define CHROOT_ENABLED HAVE_CHROOT && HAVE_SYS_MOUNT_H && defined(MS_BIND) && defined(MS_PRIVATE) && defined(CLONE_NEWNS) && defined(SYS_pivot_root) +#define CHROOT_ENABLED HAVE_CHROOT && HAVE_SYS_MOUNT_H && defined(MS_BIND) && defined(MS_PRIVATE) +#define CLONE_ENABLED defined(CLONE_NEWNS) + +#if defined(SYS_pivot_root) +#define pivot_root(new_root, put_old) (syscall(SYS_pivot_root, new_root,put_old)) +#endif #if CHROOT_ENABLED #include <sys/socket.h> @@ -2005,7 +2010,7 @@ void DerivationGoal::startBuilder() - The UTS namespace ensures that builders see a hostname of localhost rather than the actual hostname. */ -#if CHROOT_ENABLED +#if __linux__ if (useChroot) { char stack[32 * 1024]; int flags = CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWIPC | CLONE_NEWUTS | SIGCHLD; @@ -2186,10 +2191,8 @@ void DerivationGoal::runChild() if (mkdir("real-root", 0) == -1) throw SysError("cannot create real-root directory"); -#define pivot_root(new_root, put_old) (syscall(SYS_pivot_root, new_root, put_old)) if (pivot_root(".", "real-root") == -1) throw SysError(format("cannot pivot old root directory onto '%1%'") % (chrootRootDir + "/real-root")); -#undef pivot_root if (chroot(".") == -1) throw SysError(format("cannot change root directory to '%1%'") % chrootRootDir); diff --git a/nix/libutil/util.cc b/nix/libutil/util.cc index fb2dfad1f7..17d145b4c6 100644 --- a/nix/libutil/util.cc +++ b/nix/libutil/util.cc @@ -861,6 +861,10 @@ void killUser(uid_t uid) which means "follow POSIX", which we don't want here */ if (syscall(SYS_kill, -1, SIGKILL, false) == 0) break; +#elif __GNU__ + /* Killing all a user's processes using PID=-1 does currently + not work on the Hurd. */ + if (kill(getpid(), SIGKILL) == 0) break; #else if (kill(-1, SIGKILL) == 0) break; #endif @@ -873,6 +877,10 @@ void killUser(uid_t uid) }); int status = pid.wait(true); +#if __GNU__ + /* When the child killed itself, status = SIGKILL. */ + if (status == SIGKILL) return; +#endif if (status != 0) throw Error(format("cannot kill processes for uid `%1%': %2%") % uid % statusToString(status)); diff --git a/tests/channels.scm b/tests/channels.scm index f5a7955483..910088ba15 100644 --- a/tests/channels.scm +++ b/tests/channels.scm @@ -135,44 +135,48 @@ (name 'test) (url "test"))) (test-dir (channel-instance-checkout instance--simple))) - (mock ((guix git) latest-repository-commit - (lambda* (store url #:key ref) + (mock ((guix git) update-cached-checkout + (lambda* (url #:key ref) (match url - ("test" (values test-dir 'whatever)) - (_ (values "/not-important" 'not-important))))) - (let ((instances (latest-channel-instances #f (list channel)))) - (and (eq? 2 (length instances)) - (lset= eq? - '(test test-channel) - (map (compose channel-name channel-instance-channel) - instances))))))) + ("test" (values test-dir "caf3cabba9e")) + (_ (values (channel-instance-checkout instance--no-deps) + "abcde1234"))))) + (with-store store + (let ((instances (latest-channel-instances store (list channel)))) + (and (eq? 2 (length instances)) + (lset= eq? + '(test test-channel) + (map (compose channel-name channel-instance-channel) + instances)))))))) (test-assert "latest-channel-instances excludes duplicate channel dependencies" (let* ((channel (channel (name 'test) (url "test"))) (test-dir (channel-instance-checkout instance--with-dupes))) - (mock ((guix git) latest-repository-commit - (lambda* (store url #:key ref) + (mock ((guix git) update-cached-checkout + (lambda* (url #:key ref) (match url - ("test" (values test-dir 'whatever)) - (_ (values "/not-important" 'not-important))))) - (let ((instances (latest-channel-instances #f (list channel)))) - (and (= 2 (length instances)) - (lset= eq? - '(test test-channel) - (map (compose channel-name channel-instance-channel) - instances)) - ;; only the most specific channel dependency should remain, - ;; i.e. the one with a specified commit. - (find (lambda (instance) - (and (eq? (channel-name - (channel-instance-channel instance)) - 'test-channel) - (string=? (channel-commit - (channel-instance-channel instance)) - "abc1234"))) - instances)))))) + ("test" (values test-dir "caf3cabba9e")) + (_ (values (channel-instance-checkout instance--no-deps) + "abcde1234"))))) + (with-store store + (let ((instances (latest-channel-instances store (list channel)))) + (and (= 2 (length instances)) + (lset= eq? + '(test test-channel) + (map (compose channel-name channel-instance-channel) + instances)) + ;; only the most specific channel dependency should remain, + ;; i.e. the one with a specified commit. + (find (lambda (instance) + (and (eq? (channel-name + (channel-instance-channel instance)) + 'test-channel) + (string=? (channel-commit + (channel-instance-channel instance)) + "abc1234"))) + instances))))))) (test-assert "channel-instances->manifest" ;; Compute the manifest for a graph of instances and make sure we get a diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 1a997de487..6c08857358 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -65,6 +65,12 @@ test `guix build sed -s x86_64-linux -d | wc -l` = 1 all_systems="-s x86_64-linux -s i686-linux -s armhf-linux -s aarch64-linux" test `guix build sed $all_systems -d | sort -u | wc -l` = 4 +# Check there's no weird memoization effect leading to erroneous results. +# See <https://bugs.gnu.org/40482>. +drv1="`guix build sed -s x86_64-linux -s armhf-linux -d | sort`" +drv2="`guix build sed -s armhf-linux -s x86_64-linux -d | sort`" +test "$drv1" = "$drv2" + # Check --sources option with its arguments module_dir="t-guix-build-$$" mkdir "$module_dir" diff --git a/tests/inferior.scm b/tests/inferior.scm index 2f5215920b..5fddb1fd13 100644 --- a/tests/inferior.scm +++ b/tests/inferior.scm @@ -184,7 +184,7 @@ result)) (test-equal "inferior-package-search-paths" - (package-native-search-paths guile-2.2) + (package-native-search-paths guile-3.0) (let* ((inferior (open-inferior %top-builddir #:command "scripts/guix")) (guile (first (lookup-inferior-packages inferior "guile"))) |