From 567cca260d54a4515097ff3f2dc277d10ceaf613 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 15 Aug 2019 16:45:03 -0400 Subject: gnu: bash: Unconditionally configure PGRP_PIPE for *-linux systems. * gnu/packages/patches/bash-linux-pgrp-pipe.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/bash.scm (bash)[source]: Add the patch. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 5705494090..d4006c56eb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -703,6 +703,7 @@ dist_patch_DATA = \ %D%/packages/patches/azr3.patch \ %D%/packages/patches/bash-4.4-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/beets-python-3.7-fix.patch \ -- cgit v1.2.3 From ceb9de75a6b39fd5df585418953d937361237202 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 29 Jun 2019 17:31:07 +0200 Subject: gnu: python: Further cross-compilation fixes. * gnu/packages/patches/python-2.7-search-paths.patch: Add cross-compilation support. * gnu/packages/patches/python-3-search-paths.patch: Ditto. * gnu/packages/patches/python-cross-compile.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add above new patch. * gnu/packages/python.scm (python-2.7)[patches]: Add new patch above, [arguments]: Set _PYTHON_HOST_PLATFORM env variable when cross compiling. --- gnu/local.mk | 1 + gnu/packages/patches/python-2.7-search-paths.patch | 10 +- gnu/packages/patches/python-3-search-paths.patch | 11 +- gnu/packages/patches/python-cross-compile.patch | 145 +++++++++++++++++++++ gnu/packages/python.scm | 23 +++- 5 files changed, 181 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/python-cross-compile.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d4006c56eb..7bde8663f8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1246,6 +1246,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-CVE-2018-14647.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ + %D%/packages/patches/python-cross-compile.patch \ %D%/packages/patches/python-cffi-x87-stack-clean.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ diff --git a/gnu/packages/patches/python-2.7-search-paths.patch b/gnu/packages/patches/python-2.7-search-paths.patch index a012bc8fe0..5a345c7691 100644 --- a/gnu/packages/patches/python-2.7-search-paths.patch +++ b/gnu/packages/patches/python-2.7-search-paths.patch @@ -3,13 +3,17 @@ 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('CPATH', '').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-search-paths.patch b/gnu/packages/patches/python-3-search-paths.patch index 5fea9c66b6..cf1647207b 100644 --- a/gnu/packages/patches/python-3-search-paths.patch +++ b/gnu/packages/patches/python-3-search-paths.patch @@ -3,7 +3,7 @@ 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 @@ +@@ -575,15 +575,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: @@ -14,3 +14,12 @@ looking for headers and libraries. else: # Add the sysroot paths. 'sysroot' is a compiler option used to # set the logical path of the standard system headers and + # libraries. +- lib_dirs = (self.compiler.library_dirs + ++ lib_dirs = (os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) + + sysroot_paths(('LDFLAGS', 'CC'), system_lib_dirs)) +- inc_dirs = (self.compiler.include_dirs + ++ inc_dirs = (os.getenv('CROSS_CPATH', '').split(os.pathsep) + + sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'), + system_include_dirs)) + exts = [] 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/python.scm b/gnu/packages/python.scm index b7a664271b..504a468bab 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -109,7 +109,8 @@ "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 @@ -177,6 +178,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? @@ -256,7 +263,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 @@ -302,7 +311,7 @@ `(("pkg-config" ,pkg-config) ;; When cross-compiling, a native version of Python itself is needed. ,@(if (%current-target-system) - `(("self" ,this-package) + `(("python2" ,this-package) ("which" ,which)) '()))) (native-search-paths @@ -376,10 +385,11 @@ data types.") ((#:phases phases) `(modify-phases ,phases (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 @@ -415,6 +425,9 @@ data types.") #t))))))) (native-inputs `(("tzdata" ,tzdata-for-tests) + ,@(if (%current-target-system) + `(("python3" ,this-package)) + '()) ,@(package-native-inputs python-2))) (native-search-paths (list (search-path-specification -- cgit v1.2.3 From 06b2bc550fdcd943e19471873e0838e712217681 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 3 Jul 2019 09:25:39 +0200 Subject: gnu: bc: Fix cross-compilation. * gnu/packages/patches/bc-fix-cross-compilation.patch: New patch file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/algebra.scm (bc)[origin]: Apply it, [native-inputs]: Add automake and autoconf, [arguments]: Add a new 'autogen phase that is needed by the new patch. --- gnu/local.mk | 1 + gnu/packages/algebra.scm | 15 +- .../patches/bc-fix-cross-compilation.patch | 171 +++++++++++++++++++++ 3 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/bc-fix-cross-compilation.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7bde8663f8..a1190af0db 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -706,6 +706,7 @@ dist_patch_DATA = \ %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/beets-python-3.7-fix.patch \ %D%/packages/patches/beignet-correct-file-names.patch \ %D%/packages/patches/benchmark-unbundle-googletest.patch \ diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index 02b4d4ca21..956f349d0b 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017, 2019 Eric Bavier +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -681,15 +682,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 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 +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 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 ++# Copyright (c) 1999 Richard Henderson ++# ++# 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 . ++# ++# 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 -- cgit v1.2.3 From 1051facc8108110e582f2c0a9d8a5fd38b1486b6 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 26 Oct 2019 17:19:57 -0400 Subject: gnu: file: Update to 5.37 [fixes CVE-2019-18218]. * gnu/packages/file.scm (file): Update to 5.37. * gnu/packages/patches/file-CVE-2019-18218.patch: New file. * gnu/packages/patches/file-CVE-2018-10360.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 2 +- gnu/packages/file.scm | 6 +-- gnu/packages/patches/file-CVE-2018-10360.patch | 27 ------------- gnu/packages/patches/file-CVE-2019-18218.patch | 55 ++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 31 deletions(-) delete mode 100644 gnu/packages/patches/file-CVE-2018-10360.patch create mode 100644 gnu/packages/patches/file-CVE-2019-18218.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e46d74be64..336be3cb8d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -822,7 +822,7 @@ dist_patch_DATA = \ %D%/packages/patches/fcgi-2.4.0-poll.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/file-CVE-2019-18218.patch \ %D%/packages/patches/findutils-gnulib-libio.patch \ %D%/packages/patches/findutils-localstatedir.patch \ %D%/packages/patches/findutils-makedev.patch \ diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm index 9ba51d1b74..cf770297c4 100644 --- a/gnu/packages/file.scm +++ b/gnu/packages/file.scm @@ -30,15 +30,15 @@ (define-public file (package (name "file") - (version "5.33") + (version "5.37") (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")) + (patches (search-patches "file-CVE-2019-18218.patch")) (sha256 (base32 - "1iipnwjkag7q04zjkaqic41r9nlw0ml6mhqian6qkkbisb1whlhw")))) + "0zz0p9bqnswfx0c16j8k62ivjq1m16x10xqv4hy9lcyxyxkkkhg9")))) (build-system gnu-build-system) ;; When cross-compiling, this package depends upon a native install of 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 -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/file-CVE-2019-18218.patch b/gnu/packages/patches/file-CVE-2019-18218.patch new file mode 100644 index 0000000000..21069823b7 --- /dev/null +++ b/gnu/packages/patches/file-CVE-2019-18218.patch @@ -0,0 +1,55 @@ +Fix CVE-2019-18218: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18218 + +Patch copied from upstream source repository: + +https://github.com/file/file/commit/46a8443f76cec4b41ec736eca396984c74664f84 + +From 46a8443f76cec4b41ec736eca396984c74664f84 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Mon, 26 Aug 2019 14:31:39 +0000 +Subject: [PATCH] Limit the number of elements in a vector (found by oss-fuzz) + +--- + src/cdf.c | 9 ++++----- + src/cdf.h | 1 + + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/cdf.c b/src/cdf.c +index 9d6396742..bb81d6374 100644 +--- a/src/cdf.c ++++ b/src/cdf.c +@@ -1027,8 +1027,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, + goto out; + } + nelements = CDF_GETUINT32(q, 1); +- if (nelements == 0) { +- DPRINTF(("CDF_VECTOR with nelements == 0\n")); ++ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) { ++ DPRINTF(("CDF_VECTOR with nelements == %" ++ SIZE_T_FORMAT "u\n", nelements)); + goto out; + } + slen = 2; +@@ -1070,8 +1071,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, + goto out; + inp += nelem; + } +- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n", +- nelements)); + for (j = 0; j < nelements && i < sh.sh_properties; + j++, i++) + { +diff --git a/src/cdf.h b/src/cdf.h +index 2f7e554b7..05056668f 100644 +--- a/src/cdf.h ++++ b/src/cdf.h +@@ -48,6 +48,7 @@ + typedef int32_t cdf_secid_t; + + #define CDF_LOOP_LIMIT 10000 ++#define CDF_ELEMENT_LIMIT 100000 + + #define CDF_SECID_NULL 0 + #define CDF_SECID_FREE -1 -- cgit v1.2.3 From f6c51f598ebb63c6933a8e157ea4592f8d078258 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sat, 9 Nov 2019 21:03:19 +0200 Subject: gnu: fribidi: Fix CVE-2019-18397. * gnu/packages/fribidi.scm (fribidi): Replace with fribidi/fixed. (fribidi/fixed): New variable. * gnu/packages/patches/fribidi-CVE-2019-18397.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/fribidi.scm | 13 ++++++++++-- gnu/packages/patches/fribidi-CVE-2019-18397.patch | 26 +++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/fribidi-CVE-2019-18397.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 336be3cb8d..64f0ba268d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -831,6 +831,7 @@ dist_patch_DATA = \ %D%/packages/patches/flint-ldconfig.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/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ %D%/packages/patches/gawk-shell.patch \ diff --git a/gnu/packages/fribidi.scm b/gnu/packages/fribidi.scm index dfd2a77c20..61aa6fd726 100644 --- a/gnu/packages/fribidi.scm +++ b/gnu/packages/fribidi.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Marek Benc -;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016, 2019 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. @@ -22,10 +22,12 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module (guix licenses)) + #:use-module (guix licenses) + #:use-module (gnu packages)) (define-public fribidi (package + (replacement fribidi/fixed) (name "fribidi") (version "1.0.5") (source @@ -45,3 +47,10 @@ Algorithm. This algorithm is used to properly display text in left-to-right 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")))))) diff --git a/gnu/packages/patches/fribidi-CVE-2019-18397.patch b/gnu/packages/patches/fribidi-CVE-2019-18397.patch new file mode 100644 index 0000000000..aff1a669b2 --- /dev/null +++ b/gnu/packages/patches/fribidi-CVE-2019-18397.patch @@ -0,0 +1,26 @@ +https://github.com/fribidi/fribidi/commit/034c6e9a1d296286305f4cfd1e0072b879f52568.patch + +From 034c6e9a1d296286305f4cfd1e0072b879f52568 Mon Sep 17 00:00:00 2001 +From: Dov Grobgeld +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)) -- cgit v1.2.3 From 2387e2f2d1839b79f13ddd832f9a008bb220eed6 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 14 Nov 2019 22:38:10 +0100 Subject: gnu: aspell: Update to 0.60.8. * gnu/packages/aspell.scm (aspell): Update to 0.60.8. [source]: Remove "aspell-gcc-compat.patch". * gnu/packages/patches/aspell-gcc-compat.patch: Remove. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/aspell.scm | 7 +++---- gnu/packages/patches/aspell-gcc-compat.patch | 31 ---------------------------- 3 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 gnu/packages/patches/aspell-gcc-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 64f0ba268d..29988d25e6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -695,7 +695,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 \ diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm index f0e0fbcc21..70d0561004 100644 --- a/gnu/packages/aspell.scm +++ b/gnu/packages/aspell.scm @@ -38,7 +38,7 @@ (define-public aspell (package (name "aspell") - (version "0.60.6.1") + (version "0.60.8") (source (origin (method url-fetch) @@ -46,9 +46,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 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); -- cgit v1.2.3 From 3382a4f344e04ad6dad374bb25ddf15a010d14a3 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 5 Jul 2019 10:34:13 +0200 Subject: gnu: cyrus-sasl: Fix cross-compilation. * gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/cyrus-sasl.scm (cyrus-sasl)[origin]: Apply it. [native-tools]: Add autoconf, automake and libtool. [arguments]: Run autoconf to apply m4 modification in patch above. --- gnu/local.mk | 1 + gnu/packages/cyrus-sasl.scm | 17 +++++++++++++++-- gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch | 12 ++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 29988d25e6..8a0d9bd805 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -763,6 +763,7 @@ dist_patch_DATA = \ %D%/packages/patches/cube-nocheck.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/darkice-workaround-fpermissive-error.patch \ %D%/packages/patches/dbus-helper-search-path.patch \ %D%/packages/patches/dbus-c++-gcc-compat.patch \ 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 ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; 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/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 -- cgit v1.2.3 From a4c04bee7bc3faadf7ef6d98d83f57959f911fd1 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 8 Jul 2019 13:08:01 +0200 Subject: gnu: boost: Fix cross-compilation. * gnu/packages/patches/boost-dumpversion.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/boost.scm (boost)[source]: Apply it, [native-inputs]: add python unless cross-compiling, [arguments]: pass cross-compilation mandatory flags and fill a user-config.jam file pointing to cross-compiler. Disable python support that is broken when cross-compiling. Disable provide-libboost_python when cross-compiling. --- gnu/local.mk | 1 + gnu/packages/boost.scm | 59 ++++++++++++++++++++++------ gnu/packages/patches/boost-dumpversion.patch | 24 +++++++++++ 3 files changed, 71 insertions(+), 13 deletions(-) create mode 100644 gnu/packages/patches/boost-dumpversion.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8a0d9bd805..7118b251f0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -720,6 +720,7 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/blender-2.79-newer-ffmpeg.patch \ %D%/packages/patches/blender-2.79-python-3.7-fix.patch \ + %D%/packages/patches/boost-dumpversion.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-bs4.patch \ diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index a2253a9efc..4e1e68204f 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2018, 2019 Ricardo Wurmus ;;; Copyright © 2018 Maxim Cournoyer ;;; Copyright © 2018 Efraim Flashner +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,6 +55,8 @@ (string-append "https://dl.bintray.com/boostorg/release/" version "/source/boost_" version-with-underscores ".tar.bz2")))) + (patches + (search-patches "boost-dumpversion.patch")) (sha256 (base32 "0y47nc7w0arwgj4x1phadxbvl7wyfcgknbz5kv8lzpl98wsyh2j3")))) @@ -62,7 +65,9 @@ ("zlib" ,zlib))) (native-inputs `(("perl" ,perl) - ("python" ,python-2) + ,@(if (%current-target-system) + '() + `(("python" ,python-2))) ("tcsh" ,tcsh))) (arguments `(#:tests? #f @@ -76,7 +81,24 @@ ;; 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) @@ -94,6 +116,14 @@ (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 @@ -108,17 +138,20 @@ (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 - ;; . - (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 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 + ;; . + (with-directory-excursion (string-append out "/lib") + (symlink "libboost_python27.so" "libboost_python.so")) + #t)))))))) (home-page "https://www.boost.org") (synopsis "Peer-reviewed portable C++ source libraries") diff --git a/gnu/packages/patches/boost-dumpversion.patch b/gnu/packages/patches/boost-dumpversion.patch new file mode 100644 index 0000000000..7df779cfe6 --- /dev/null +++ b/gnu/packages/patches/boost-dumpversion.patch @@ -0,0 +1,24 @@ +This issue is described here: https://github.com/openwrt/packages/pull/8685 +and has not been solved as of 1.70.0 release. + +--- a/tools/build/src/tools/common.jam ++++ b/tools/build/src/tools/common.jam +@@ -973,18 +973,6 @@ + } + } + +- # From GCC 5, versioning changes and minor becomes patch +- if $(tag) = gcc && [ numbers.less 4 $(version[1]) ] +- { +- version = $(version[1]) ; +- } +- +- # Ditto, from Clang 4 +- if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ] +- { +- version = $(version[1]) ; +- } +- + # On intel, version is not added, because it does not matter and it is the + # version of vc used as backend that matters. Ideally, we should encode the + # backend version but that would break compatibility with V1. -- cgit v1.2.3 From e53bf62e31793d199d7691f99bbf2767e7067b29 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sun, 18 Aug 2019 09:10:58 +0200 Subject: gnu: guile-sqlite3: Fix cross-compilation. * gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/guile.scm (guile-sqlite3)[source]: Apply previous patch, [native-inputs]: add guile. --- gnu/local.mk | 1 + gnu/packages/guile.scm | 7 ++- .../guile-sqlite3-fix-cross-compilation.patch | 55 ++++++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7118b251f0..21318afe66 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -941,6 +941,7 @@ dist_patch_DATA = \ %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/gstreamer-buffer-reset-offset.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \ %D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 49a6e964a3..f142b73a9d 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2016, 2019 Ricardo Wurmus ;;; Copyright © 2017 Andy Wingo ;;; Copyright © 2017 Marius Bakke -;;; Copyright © 2017 Mathieu Othacehe +;;; Copyright © 2017, 2019 Mathieu Othacehe ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2017, 2018 Amirouche ;;; Copyright © 2018 Danny Milosavljevic @@ -536,11 +536,14 @@ Guile's foreign function interface.") (sha256 (base32 "1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp")) - (file-name (string-append name "-" version "-checkout")))) + (file-name (string-append name "-" version "-checkout")) + (patches + (search-patches "guile-sqlite3-fix-cross-compilation.patch")))) (build-system gnu-build-system) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) + ("guile" ,guile-2.2) ("pkg-config" ,pkg-config))) (inputs `(("guile" ,guile-2.2) 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 +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 + -- cgit v1.2.3 From 7ad3c81240b366b99f29c4ac5f7c42173c91f38a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 26 Nov 2019 22:26:20 +0200 Subject: gnu: gsl: Update to 2.6. * gnu/packages/maths.scm (gsl): Update to 2.6. [source]: Remove patch. * gnu/packages/patches/gsl-test-i686.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/maths.scm | 5 ++--- gnu/packages/patches/gsl-test-i686.patch | 17 ----------------- 3 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 gnu/packages/patches/gsl-test-i686.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4cf68dcfd9..e97a5083d1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -938,7 +938,6 @@ dist_patch_DATA = \ %D%/packages/patches/grep-timing-sensitive-test.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/gspell-dash-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-2.2-default-utf8.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 16a9d97a47..fd7159a411 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -375,15 +375,14 @@ semiconductors.") (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" 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"); -- cgit v1.2.3 From 0b3df5c913af91bc196bb8cb41783126e55bf5a0 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 29 Nov 2019 17:44:25 +0100 Subject: gnu: glibc: Update to 2.30. * gnu/packages/patches/glibc-CVE-2019-19126.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/base.scm (glibc): Update to 2.30. [source](patches): Adjust for 2.30. (glibc-2.29): New public variable. --- gnu/local.mk | 1 + gnu/packages/base.scm | 28 ++++++++++++++++++++----- gnu/packages/patches/glibc-CVE-2019-19126.patch | 22 +++++++++++++++++++ 3 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/glibc-CVE-2019-19126.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index fef7fd1e28..25dfef3849 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -906,6 +906,7 @@ 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 \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index a444213a84..caaa04258c 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -567,13 +567,13 @@ the store.") ;; version 2.28, GNU/Hurd used a different glibc branch. (package (name "glibc") - (version "2.29") + (version "2.30") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "0jzh58728flfh939a8k9pi1zdyalfzlxmwra7k0rzji5gvavivpk")) + "1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72")) (snippet ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is ;; required on LFS distros to avoid loading the distro's libc.so @@ -585,9 +585,7 @@ 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-CVE-2019-19126.patch" "glibc-hidden-visibility-ldconfig.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" @@ -819,6 +817,26 @@ 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.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-supported-locales.patch")))))) + (define-public glibc-2.28 (package (inherit glibc) 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; -- cgit v1.2.3 From 5f1000d5d4cc4dfc9a1fe220457c17ad011d9e33 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 29 Nov 2019 23:56:03 +0100 Subject: gnu: libffi: Update to 3.3. * gnu/packages/patches/libffi-3.2.1-complex-alpha.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/libffi.scm (libffi): Update to 3.3. [source](patches): Remove. * gnu/packages/python.scm (python-3.7)[arguments]: Remove workaround. --- gnu/local.mk | 1 - gnu/packages/libffi.scm | 15 +++--------- .../patches/libffi-3.2.1-complex-alpha.patch | 28 ---------------------- gnu/packages/python.scm | 7 +----- 4 files changed, 4 insertions(+), 47 deletions(-) delete mode 100644 gnu/packages/patches/libffi-3.2.1-complex-alpha.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 25dfef3849..f13d8f3645 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1066,7 +1066,6 @@ dist_patch_DATA = \ %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 \ diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index b61dbc8657..52654ddf3f 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 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/python.scm b/gnu/packages/python.scm index 43b4044e72..ef1c8e4a09 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -377,12 +377,7 @@ data types.") " --exclude test_mmap" ;; test_socket may hang and eventually run out of memory ;; on some systems: . - " test_socket" - ;; XXX: test_ctypes fails on some platforms due to a problem in - ;; libffi 3.2.1: . - ,@(if (string-prefix? "aarch64" (%current-system)) - '(" test_ctypes") - '())))) + " test_socket"))) ((#:phases phases) `(modify-phases ,phases (add-before 'check 'set-TZDIR -- cgit v1.2.3 From 717867a6efba935b026d4178aeee232bdbee0102 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 30 Nov 2019 04:41:12 +0100 Subject: gnu: findutils: Update to 4.7.0. * gnu/packages/patches/findutils-gnulib-libio.patch, gnu/packages/patches/findutils-makedev.patch, gnu/packages/patches/findutils-test-xargs.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/base.scm (findutils): Update to 4.7.0. [source](uri): Adjust for file name change. [source](snippet): Remove. [source](patches): Remove obsolete. [arguments]: Remove obsolete workaround. Add phase to patch tests. * gnu/packages/commencement.scm (findutils-boot0)[arguments]: Allow 32-bit time_t on 64-bit systems. --- gnu/local.mk | 3 - gnu/packages/base.scm | 38 +++----- gnu/packages/commencement.scm | 10 +- gnu/packages/patches/findutils-gnulib-libio.patch | 114 ---------------------- gnu/packages/patches/findutils-makedev.patch | 22 ----- gnu/packages/patches/findutils-test-xargs.patch | 22 ----- 6 files changed, 22 insertions(+), 187 deletions(-) delete mode 100644 gnu/packages/patches/findutils-gnulib-libio.patch delete mode 100644 gnu/packages/patches/findutils-makedev.patch delete mode 100644 gnu/packages/patches/findutils-test-xargs.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f13d8f3645..0c0f5651a9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -833,10 +833,7 @@ dist_patch_DATA = \ %D%/packages/patches/fifo-map-fix-flags-for-gcc.patch \ %D%/packages/patches/fifo-map-remove-catch.hpp.patch \ %D%/packages/patches/file-CVE-2019-18218.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/flann-cmake-3.11.patch \ %D%/packages/patches/flint-ldconfig.patch \ %D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index caaa04258c..a336f5e6d0 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -253,40 +253,28 @@ 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")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list ;; Tell 'updatedb' to write to /var. - "--localstatedir=/var" - - ;; Work around cross-compilation failure. See - ;; . - ,@(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 diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 8bf7704598..90cd001ba2 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -1450,7 +1450,15 @@ 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. + ,@(if (target-64bit?) + (substitute-keyword-arguments (package-arguments findutils) + ((#:configure-flags flags ''()) + `(cons "TIME_T_32_BIT_OK=yes" + ,flags))) + (package-arguments findutils)))))) (define file-boot0 (package 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 - , 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 - , 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 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 - #endif - -+#if MAJOR_IN_MKDEV -+# include -+#elif MAJOR_IN_SYSMACROS -+# include -+#endif -+ - #if defined MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */ - # if HAVE_SYS_UCRED_H - # include /* needed on OSF V4.0 for definition of NGROUPS, 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 . - ---- 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}" - } -- cgit v1.2.3 From 8b2c4eb5020eff458690f600351b56ed97465db1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 3 Dec 2019 00:15:26 +0100 Subject: gnu: swig: Update to 4.0.1. * gnu/packages/patches/swig-guile-gc.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/swig.scm (swig): Update to 4.0.1. [source](patches): Remove. [arguments]: Remove 'set-env' phase. [inputs]: Change GUILE-2.0 to GUILE-2.2. --- gnu/local.mk | 1 - gnu/packages/patches/swig-guile-gc.patch | 76 -------------------------------- gnu/packages/swig.scm | 10 +---- 3 files changed, 2 insertions(+), 85 deletions(-) delete mode 100644 gnu/packages/patches/swig-guile-gc.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0c0f5651a9..122e23f68a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1370,7 +1370,6 @@ dist_patch_DATA = \ %D%/packages/patches/superlu-dist-fix-mpi-deprecations.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 \ 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/swig.scm b/gnu/packages/swig.scm index 655c1a19ab..df49428964 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -34,25 +34,19 @@ (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 -- cgit v1.2.3 From c9d4e14ab4f8d28d72ea64e95272c6b1d63216cb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 5 Dec 2019 00:43:00 +0100 Subject: gnu: giflib: Update to 5.2.1. * gnu/packages/patches/giflib-make-reallocarray-private.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/image.scm (giflib): Update to 5.2.1. [source](uri): Adjust for new file name. [source](patches): Remove. [inputs]: Remove, as they were already unused. [arguments]: Add #:make-flags. Adjust substitution. Delete configure phase. --- gnu/local.mk | 1 - gnu/packages/image.scm | 22 ++-- .../patches/giflib-make-reallocarray-private.patch | 120 --------------------- 3 files changed, 11 insertions(+), 132 deletions(-) delete mode 100644 gnu/packages/patches/giflib-make-reallocarray-private.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 122e23f68a..1654fe729b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -889,7 +889,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 \ diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 0a2ad5a99a..9ab97fa163 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -782,31 +782,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")) 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 - #include - --#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) { -- cgit v1.2.3 From d098aa3e67b934f61758430c4740cd86d1ff234d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 30 Nov 2019 04:37:57 +0100 Subject: gnu: tcsh: Update to 6.22.02. * gnu/packages/patches/tcsh-fix-autotest.patch: Adjust for 6.22.02. * gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/shells.scm (tcsh): Update to 6.22.02. [source](patches): Remove obsolete patch. --- gnu/local.mk | 1 - gnu/packages/patches/tcsh-fix-autotest.patch | 45 ++-------------------- .../patches/tcsh-fix-out-of-bounds-read.patch | 31 --------------- gnu/packages/shells.scm | 7 ++-- 4 files changed, 6 insertions(+), 78 deletions(-) delete mode 100644 gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1654fe729b..4592e4c38a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1383,7 +1383,6 @@ dist_patch_DATA = \ %D%/packages/patches/tcc-boot-0.9.27.patch \ %D%/packages/patches/tclxml-3.2-install.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/teeworlds-use-latest-wavpack.patch \ %D%/packages/patches/texinfo-5-perl-compat.patch \ 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 -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/shells.scm b/gnu/packages/shells.scm index 1fd138fb4c..ef7f911682 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -334,7 +334,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/. @@ -344,9 +344,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 -- cgit v1.2.3 From 8a0e29d8b9da4a277c8f9613be85df16de9e8898 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 19 Dec 2019 09:51:56 +0100 Subject: gnu: tcl: Fix cross-compilation. * gnu/packages/patches/tcl-fix-cross-compilation.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/tcl.scm (tcl): Apply it. --- gnu/local.mk | 1 + .../patches/tcl-fix-cross-compilation.patch | 39 ++++++++++++++++++++++ gnu/packages/tcl.scm | 4 ++- 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/tcl-fix-cross-compilation.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0224b7101b..3d672ea213 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1383,6 +1383,7 @@ 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/teensy-loader-cli-help.patch \ %D%/packages/patches/teeworlds-use-latest-wavpack.patch \ 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" +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/tcl.scm b/gnu/packages/tcl.scm index 7531c1ca9d..c88d0338cb 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017 Kei Kebreau ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Julien Lepiller +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -50,7 +51,8 @@ version "/tcl" version "-src.tar.gz")) (sha256 (base32 - "1vc7imilx6kcb5319r7hnrp4jn5pqb41an3vr3azhgcfcgvdp5ji")))) + "1vc7imilx6kcb5319r7hnrp4jn5pqb41an3vr3azhgcfcgvdp5ji")) + (patches (search-patches "tcl-fix-cross-compilation.patch")))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases -- cgit v1.2.3 From eb5f3ea1003f76545b197b1e779e2967ec379475 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 6 Dec 2019 18:19:23 +0100 Subject: gnu: WebkitGTK: Fix build failure with ICU 65. * gnu/packages/patches/webkitgtk-icu-65.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/webkit.scm (webkitgtk)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/patches/webkitgtk-icu-65.patch | 47 +++++++++++++++++++++++++++++ gnu/packages/webkit.scm | 1 + 3 files changed, 49 insertions(+) create mode 100644 gnu/packages/patches/webkitgtk-icu-65.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index efbd9067bf..7cb5cad2ee 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1464,6 +1464,7 @@ dist_patch_DATA = \ %D%/packages/patches/wavpack-CVE-2018-7253.patch \ %D%/packages/patches/wavpack-CVE-2018-7254.patch \ %D%/packages/patches/weasyprint-library-paths.patch \ + %D%/packages/patches/webkitgtk-icu-65.patch \ %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ %D%/packages/patches/wicd-get-selected-profile-fix.patch \ diff --git a/gnu/packages/patches/webkitgtk-icu-65.patch b/gnu/packages/patches/webkitgtk-icu-65.patch new file mode 100644 index 0000000000..66819c566b --- /dev/null +++ b/gnu/packages/patches/webkitgtk-icu-65.patch @@ -0,0 +1,47 @@ +Fix build with ICU 65. + +Taken from upstream: +https://bugs.webkit.org/show_bug.cgi?id=202600 +https://trac.webkit.org/r250747 + +diff --git a/Source/WTF/wtf/URLHelpers.cpp b/Source/WTF/wtf/URLHelpers.cpp +index 18e7f13cd615..c584f1a0cb7e 100644 +--- a/Source/WTF/wtf/URLHelpers.cpp ++++ b/Source/WTF/wtf/URLHelpers.cpp +@@ -301,7 +301,7 @@ static bool allCharactersInIDNScriptWhiteList(const UChar* buffer, int32_t lengt + Optional previousCodePoint; + while (i < length) { + UChar32 c; +- U16_NEXT(buffer, i, length, c) ++ U16_NEXT(buffer, i, length, c); + UErrorCode error = U_ZERO_ERROR; + UScriptCode script = uscript_getScript(c, &error); + if (error != U_ZERO_ERROR) { +diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp +index 2443e24c9bc4..1fbb3a716006 100644 +--- a/Source/WebCore/dom/Document.cpp ++++ b/Source/WebCore/dom/Document.cpp +@@ -4954,12 +4954,12 @@ static bool isValidNameNonASCII(const UChar* characters, unsigned length) + unsigned i = 0; + + UChar32 c; +- U16_NEXT(characters, i, length, c) ++ U16_NEXT(characters, i, length, c); + if (!isValidNameStart(c)) + return false; + + while (i < length) { +- U16_NEXT(characters, i, length, c) ++ U16_NEXT(characters, i, length, c); + if (!isValidNamePart(c)) + return false; + } +@@ -5019,7 +5019,7 @@ ExceptionOr> Document::parseQualifiedName(cons + + for (unsigned i = 0; i < length; ) { + UChar32 c; +- U16_NEXT(qualifiedName, i, length, c) ++ U16_NEXT(qualifiedName, i, length, c); + if (c == ':') { + if (sawColon) + return Exception { InvalidCharacterError }; diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index b0b0d79a05..5101ceb2ea 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -126,6 +126,7 @@ engine that uses Wayland for graphics output.") (method url-fetch) (uri (string-append "https://www.webkitgtk.org/releases/" "webkitgtk-" version ".tar.xz")) + (patches (search-patches "webkitgtk-icu-65.patch")) (sha256 (base32 "04k5h0sid9azsqz9pyq436v1rx4lnfrhvmcgmicqb0c0g9iz103b")))) -- cgit v1.2.3 From 46c3a08b2ee8d5abae9f8fb42ff68dbf211dd261 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 6 Dec 2019 18:20:51 +0100 Subject: gnu: dconf: Fix build failure with Meson 0.52. * gnu/packages/patches/dconf-meson-0.52.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gnome.scm (dconf)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 1 + gnu/packages/patches/dconf-meson-0.52.patch | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 gnu/packages/patches/dconf-meson-0.52.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7cb5cad2ee..234d283ee6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -798,6 +798,7 @@ dist_patch_DATA = \ %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 \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index dd9ac29f4e..37873e42bc 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -2851,6 +2851,7 @@ and RDP protocols.") "mirror://gnome/sources/" name "/" (version-major+minor version) "/" name "-" version ".tar.xz")) + (patches (search-patches "dconf-meson-0.52.patch")) (sha256 (base32 "1azz4hb9z76yxn34yrrsiib3iqz5z4vpwn5q7cncp55w365ygg38")))) 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( -- cgit v1.2.3 From 12818a0656817e95a80aace01089042c0b0e7e22 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 6 Dec 2019 18:21:48 +0100 Subject: gnu: network-manager: Fix build with glibc 2.30. * gnu/packages/patches/network-manager-gettid.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gnome.scm (network-manager)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 3 ++- gnu/packages/patches/network-manager-gettid.patch | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/network-manager-gettid.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 234d283ee6..2b17423483 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1197,6 +1197,7 @@ dist_patch_DATA = \ %D%/packages/patches/netsurf-system-utf8proc.patch \ %D%/packages/patches/netsurf-y2038-tests.patch \ %D%/packages/patches/netsurf-longer-test-timeout.patch \ + %D%/packages/patches/network-manager-gettid.patch \ %D%/packages/patches/nfs-utils-missing-headers.patch \ %D%/packages/patches/ngircd-handle-zombies.patch \ %D%/packages/patches/nm-plugin-path.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 37873e42bc..464f2ad818 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5822,7 +5822,8 @@ users.") (uri (string-append "mirror://gnome/sources/NetworkManager/" (version-major+minor version) "/" "NetworkManager-" version ".tar.xz")) - (patches (search-patches "nm-plugin-path.patch")) + (patches (search-patches "nm-plugin-path.patch" + "network-manager-gettid.patch")) (sha256 (base32 "0pnh1wr2p1fqa5pr945fr3lngfc5ccfrmgddqsg55lxnjpv0ggd3")) diff --git a/gnu/packages/patches/network-manager-gettid.patch b/gnu/packages/patches/network-manager-gettid.patch new file mode 100644 index 0000000000..d50b5f8102 --- /dev/null +++ b/gnu/packages/patches/network-manager-gettid.patch @@ -0,0 +1,20 @@ +glibc 2.30 added gettid() which conflicts with the implementation in +NetworkManager. Remove for 1.17.1 and later versions. + +Adapted from upstream: +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/10276322bde8f015e48ac06f6a7509f514eb46f0 + +--- a/src/systemd/sd-adapt/nm-sd-adapt.h ++++ b/src/systemd/sd-adapt/nm-sd-adapt.h +@@ -181,9 +181,10 @@ + #endif + } + +-static inline pid_t gettid(void) { ++static inline pid_t _nm_gettid(void) { + return (pid_t) syscall(SYS_gettid); + } ++#define gettid() _nm_gettid () + + /* we build with C11 and thus provides char32_t,char16_t. */ + #define HAVE_CHAR32_T 1 -- cgit v1.2.3 From b9f71df3773c8cbe799cec1362aa5fb8314f7e13 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Jan 2020 16:47:37 +0100 Subject: gnu: fribidi: Update to 1.0.8. * gnu/packages/patches/fribidi-CVE-2019-18397.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/fribidi.scm (fribidi): Update to 1.0.8. --- gnu/local.mk | 1 - gnu/packages/fribidi.scm | 5 ++--- gnu/packages/patches/fribidi-CVE-2019-18397.patch | 26 ----------------------- 3 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 gnu/packages/patches/fribidi-CVE-2019-18397.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2b17423483..63f84ab459 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -859,7 +859,6 @@ dist_patch_DATA = \ %D%/packages/patches/flint-ldconfig.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/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ %D%/packages/patches/gawk-shell.patch \ diff --git a/gnu/packages/fribidi.scm b/gnu/packages/fribidi.scm index b6cabdc4b0..8fa0e6d980 100644 --- a/gnu/packages/fribidi.scm +++ b/gnu/packages/fribidi.scm @@ -28,7 +28,7 @@ (define-public fribidi (package (name "fribidi") - (version "1.0.7") + (version "1.0.8") (source (origin (method url-fetch) @@ -37,8 +37,7 @@ "/download/v" version "/fribidi-" version ".tar.bz2")) (sha256 - (base32 "0pckda4fcn0aw32lpycwdp25r2m7vca8zspq815ppi9gkwgg5das")) - (patches (search-patches "fribidi-CVE-2019-18397.patch")))) + (base32 "0v0ybhck9vz4yayihydknmikslh3xfxygzywnh9rcamdhs6vdiwl")))) (build-system gnu-build-system) (synopsis "Implementation of the Unicode bidirectional algorithm") (description 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 -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)) -- cgit v1.2.3 From ceaf180526a81c025554717feb9d63080e550d19 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Jan 2020 16:55:04 +0100 Subject: gnu: libjpeg-turbo: Update to 2.0.4. * gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/image.scm (libjpeg-turbo): Update to 2.0.4. [source](patches): Remove. --- gnu/local.mk | 1 - gnu/packages/image.scm | 5 ++-- .../patches/libjpeg-turbo-CVE-2019-2201.patch | 31 ---------------------- 3 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 63f84ab459..60b3b652f1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1086,7 +1086,6 @@ dist_patch_DATA = \ %D%/packages/patches/libgnome-encoding.patch \ %D%/packages/patches/libgnomeui-utf8.patch \ %D%/packages/patches/libgpg-error-gawk-compat.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 \ diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index c433429656..c70a60584b 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -1487,15 +1487,14 @@ is hereby granted.")))) (define-public libjpeg-turbo (package (name "libjpeg-turbo") - (version "2.0.3") + (version "2.0.4") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/libjpeg-turbo/" version "/libjpeg-turbo-" version ".tar.gz")) - (patches (search-patches "libjpeg-turbo-CVE-2019-2201.patch")) (sha256 (base32 - "1ds16bnj17v6hzd43w8pzijz3imd9am4hw75ir0fxm240m8dwij2")))) + "01ill8bgjyk582wipx7sh7gj2nidylpbzvwhx0wkcm6mxx3qbp9k")))) (build-system cmake-build-system) (native-inputs `(("nasm" ,nasm))) 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; -- cgit v1.2.3 From b34c1258515e75bcc73be7911fd7d237db1dd14b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Jan 2020 17:10:47 +0100 Subject: gnu: doxygen: Update to 1.8.17. * gnu/packages/documentation.scm (doxygen): Update to 1.8.17. [source](patches): Add doxygen-1.8.17-runtests.patch. [arguments]: Remove obsolete phase. * gnu/packages/patches/doxygen-test.patch: Adjust for upstream changes. * gnu/packages/patches/doxygen-1.8.17-runtests.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 + gnu/packages/documentation.scm | 14 ++--- gnu/packages/patches/doxygen-1.8.17-runtests.patch | 73 ++++++++++++++++++++++ gnu/packages/patches/doxygen-test.patch | 4 +- 4 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 gnu/packages/patches/doxygen-1.8.17-runtests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 60b3b652f1..e2b605e0b8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -814,6 +814,7 @@ dist_patch_DATA = \ %D%/packages/patches/docker-use-fewer-modprobes.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/dvd+rw-tools-add-include.patch \ diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index c512a9803b..c4a8c0242d 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -125,7 +125,7 @@ markup) can be customized and extended by the user.") (define-public doxygen (package (name "doxygen") - (version "1.8.16") + (version "1.8.17") (home-page "http://www.doxygen.nl/") (source (origin (method url-fetch) @@ -136,8 +136,9 @@ markup) can be customized and extended by the user.") ".src.tar.gz"))) (sha256 (base32 - "10iwv8bcz5b5cd85gg8pgn0bmyg04n9hs36xn7ggjjnvynv1z67z")) - (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) @@ -157,13 +158,6 @@ markup) can be customized and extended by the user.") '()) #:test-target "tests" #:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-git-requirement - (lambda _ - ;; TODO: Remove this for > 1.8.16. - (substitute* "cmake/git_watcher.cmake" - (("Git QUIET REQUIRED") - "Git QUIET")) - #t)) (add-before 'configure 'patch-sh (lambda* (#:key inputs #:allow-other-keys) (substitute* "src/portable.cpp" 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\S+):\s*(?P.*)$') + +@@ -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 a2da54a3fa..1c0d4eb946 100644 --- a/gnu/packages/patches/doxygen-test.patch +++ b/gnu/packages/patches/doxygen-test.patch @@ -52,9 +52,9 @@ diff -u -r doxygen-1.8.7.orig/testing/012/indexpage.xml doxygen-1.8.7/testing/01 - See [3] for more info. -- Oter references with crosreference see [1] and [2] for more info. +- Other references with cross references see [1] and [2] for more info. + See knuth79 for more info. -+ Oter references with crosreference see Be09 and BertholdHeinzVigerske2009 for more info. ++ Other references with cross references see Be09 and BertholdHeinzVigerske2009 for more info. -- cgit v1.2.3 From 02fef9619bd96086aa9255ffb0944d4cda617c84 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Jan 2020 19:03:12 +0100 Subject: gnu: Boost: Update to 1.72.0. * gnu/packages/patches/boost-dumpversion.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/boost.scm (boost): Update to 1.72.0. [source](uri): Remove defunct mirror. [source](patches): Remove. [arguments]: Adjust /bin/sh substitutions. Remove obsolete workaround. --- gnu/local.mk | 1 - gnu/packages/boost.scm | 25 ++++++++----------------- gnu/packages/patches/boost-dumpversion.patch | 24 ------------------------ 3 files changed, 8 insertions(+), 42 deletions(-) delete mode 100644 gnu/packages/patches/boost-dumpversion.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e2b605e0b8..2a60a8d4c7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -750,7 +750,6 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/blender-2.79-newer-ffmpeg.patch \ %D%/packages/patches/blender-2.79-python-3.7-fix.patch \ - %D%/packages/patches/boost-dumpversion.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-bs4.patch \ diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index 3665dccb56..1f896d3811 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2018 Efraim Flashner ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2019 Giacomo Leidi +;;; Copyright © 2020 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -46,21 +47,17 @@ (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")))) - (patches - (search-patches "boost-dumpversion.patch")) + (string-append "https://dl.bintray.com/boostorg/release/" + version "/source/boost_" + version-with-underscores ".tar.bz2"))) (sha256 (base32 - "0y47nc7w0arwgj4x1phadxbvl7wyfcgknbz5kv8lzpl98wsyh2j3")))) + "08h7cv61fd0lzb4z50xanfqn0pdgvizjrpd1kcdgj725pisb5jar")))) (build-system gnu-build-system) (inputs `(("icu4c" ,icu4c) ("zlib" ,zlib))) @@ -75,11 +72,6 @@ #: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 . - "--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") @@ -109,9 +101,8 @@ (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")) diff --git a/gnu/packages/patches/boost-dumpversion.patch b/gnu/packages/patches/boost-dumpversion.patch deleted file mode 100644 index 7df779cfe6..0000000000 --- a/gnu/packages/patches/boost-dumpversion.patch +++ /dev/null @@ -1,24 +0,0 @@ -This issue is described here: https://github.com/openwrt/packages/pull/8685 -and has not been solved as of 1.70.0 release. - ---- a/tools/build/src/tools/common.jam -+++ b/tools/build/src/tools/common.jam -@@ -973,18 +973,6 @@ - } - } - -- # From GCC 5, versioning changes and minor becomes patch -- if $(tag) = gcc && [ numbers.less 4 $(version[1]) ] -- { -- version = $(version[1]) ; -- } -- -- # Ditto, from Clang 4 -- if ( $(tag) = clang || $(tag) = clangw ) && [ numbers.less 3 $(version[1]) ] -- { -- version = $(version[1]) ; -- } -- - # On intel, version is not added, because it does not matter and it is the - # version of vc used as backend that matters. Ideally, we should encode the - # backend version but that would break compatibility with V1. -- cgit v1.2.3 From a82e6faa8b993d1f3b47a8bd22c4509f7cae7ec1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Jan 2020 21:35:21 +0100 Subject: gnu: vigra: Build with Python 3. * gnu/packages/patches/vigra-python-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/image.scm (vigra)[source](patches): New field. [inputs]: Change PYTHON-2 and PYTHON2-NUMPY to PYTHON and PYTHON-NUMPY. [native-inputs]: Change from PYTHON2-NOSE to PYTHON. [arguments]: Adjust #:configure-flags accordingly. --- gnu/local.mk | 1 + gnu/packages/image.scm | 14 +++++++++----- gnu/packages/patches/vigra-python-compat.patch | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/vigra-python-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2a60a8d4c7..802884a74f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1450,6 +1450,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 \ diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index c70a60584b..298bff3450 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -19,7 +19,7 @@ ;;; Copyright © 2018 Joshua Sierles, Nextjournal ;;; Copyright © 2018 Fis Trivial ;;; Copyright © 2018 Pierre Neidhardt -;;; Copyright © 2018, 2019 Marius Bakke +;;; Copyright © 2018, 2019, 2020 Marius Bakke ;;; Copyright © 2018 Pierre-Antoine Rouby ;;; Copyright © 2018 Alex Vong ;;; Copyright © 2018 Rutger Helling @@ -76,6 +76,7 @@ #: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) @@ -1007,6 +1008,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) @@ -1021,12 +1023,12 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.") ("libpng" ,libpng) ("libtiff" ,libtiff) ("openexr" ,openexr) - ("python" ,python-2) ; print syntax - ("python2-numpy" ,python2-numpy) + ("python" ,python) + ("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" @@ -1046,7 +1048,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 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 + } -- cgit v1.2.3 From 9d3b6a5d65505018186d778c4812c3c90aab3527 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Jan 2020 22:27:48 +0100 Subject: Revert "gnu: network-manager: Fix build with glibc 2.30." This commit was obsolete by the time it was pushed, whoops! This reverts commit 12818a0656817e95a80aace01089042c0b0e7e22. --- gnu/local.mk | 1 - gnu/packages/gnome.scm | 3 +-- gnu/packages/patches/network-manager-gettid.patch | 20 -------------------- 3 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 gnu/packages/patches/network-manager-gettid.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 802884a74f..7462445c98 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1195,7 +1195,6 @@ dist_patch_DATA = \ %D%/packages/patches/netsurf-system-utf8proc.patch \ %D%/packages/patches/netsurf-y2038-tests.patch \ %D%/packages/patches/netsurf-longer-test-timeout.patch \ - %D%/packages/patches/network-manager-gettid.patch \ %D%/packages/patches/nfs-utils-missing-headers.patch \ %D%/packages/patches/ngircd-handle-zombies.patch \ %D%/packages/patches/nm-plugin-path.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 464f2ad818..37873e42bc 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5822,8 +5822,7 @@ users.") (uri (string-append "mirror://gnome/sources/NetworkManager/" (version-major+minor version) "/" "NetworkManager-" version ".tar.xz")) - (patches (search-patches "nm-plugin-path.patch" - "network-manager-gettid.patch")) + (patches (search-patches "nm-plugin-path.patch")) (sha256 (base32 "0pnh1wr2p1fqa5pr945fr3lngfc5ccfrmgddqsg55lxnjpv0ggd3")) diff --git a/gnu/packages/patches/network-manager-gettid.patch b/gnu/packages/patches/network-manager-gettid.patch deleted file mode 100644 index d50b5f8102..0000000000 --- a/gnu/packages/patches/network-manager-gettid.patch +++ /dev/null @@ -1,20 +0,0 @@ -glibc 2.30 added gettid() which conflicts with the implementation in -NetworkManager. Remove for 1.17.1 and later versions. - -Adapted from upstream: -https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/10276322bde8f015e48ac06f6a7509f514eb46f0 - ---- a/src/systemd/sd-adapt/nm-sd-adapt.h -+++ b/src/systemd/sd-adapt/nm-sd-adapt.h -@@ -181,9 +181,10 @@ - #endif - } - --static inline pid_t gettid(void) { -+static inline pid_t _nm_gettid(void) { - return (pid_t) syscall(SYS_gettid); - } -+#define gettid() _nm_gettid () - - /* we build with C11 and thus provides char32_t,char16_t. */ - #define HAVE_CHAR32_T 1 -- cgit v1.2.3 From 869b63cb93c68a2825bfe25b652d5481555f9b12 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 3 Dec 2019 00:55:06 +0100 Subject: gnu: pango: Update to 1.44.7. * gnu/packages/patches/pango-skip-libthai-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gtk.scm (pango): Update to 1.44.7. [source](patches): New field. [build-system]: Switch to MESON-BUILD-SYSTEM. [arguments]: Disable tests that require the Cantarell font. [inputs]: Move LIBXFT ... [propagated-inputs]: ... here. (pango-1.42): New public variable. * gnu/packages/gnome.scm (librsvg)[inputs]: Change from PANGO to PANGO-1.42. --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 4 ++- gnu/packages/gtk.scm | 41 ++++++++++++++++++---- gnu/packages/patches/pango-skip-libthai-test.patch | 23 ++++++++++++ 4 files changed, 61 insertions(+), 8 deletions(-) create mode 100644 gnu/packages/patches/pango-skip-libthai-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7462445c98..62561c7261 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1242,6 +1242,7 @@ dist_patch_DATA = \ %D%/packages/patches/p7zip-CVE-2017-17969.patch \ %D%/packages/patches/p7zip-remove-unused-code.patch \ %D%/packages/patches/pam-mount-luks2-support.patch \ + %D%/packages/patches/pango-skip-libthai-test.patch \ %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ %D%/packages/patches/pcre2-fix-jit_match-crash.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 37873e42bc..d492739df5 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1543,7 +1543,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) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 67b129c2a1..0ab5c36ca1 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -16,7 +16,7 @@ ;;; Copyright © 2016 ng0 ;;; Copyright © 2017 Roel Janssen ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice -;;; Copyright © 2017 Marius Bakke +;;; Copyright © 2017, 2019, 2020 Marius Bakke ;;; Copyright © 2018 Alex Vong ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2018 Pierre Neidhardt @@ -222,16 +222,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) @@ -239,13 +251,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. @@ -258,6 +270,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") 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); -- cgit v1.2.3 From 1f2ef813fccd38a81c186d2e664c05038fc674e4 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Jan 2020 22:37:10 +0100 Subject: gnu: texlive-bin: Update to 20190410. * gnu/packages/patches/texlive-bin-CVE-2018-17407.patch, gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch: Delete files. * gnu/packages/patches/texlive-bin-poppler-0.83.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/tex.scm (texlive-extra-src): Update to 20190419. (texlive-bin): Likewise. [source](patches): Update Arch patches for Poppler 0.84 compatibility. [arguments]: Remove phase 'use-code-for-even-newer-poppler'; add phase 'patch-dvisgm-build-files'. --- gnu/local.mk | 3 +- .../patches/texlive-bin-CVE-2018-17407.patch | 249 ----------------- .../texlive-bin-luatex-poppler-compat.patch | 293 --------------------- .../patches/texlive-bin-poppler-0.83.patch | 52 ++++ gnu/packages/tex.scm | 44 ++-- 5 files changed, 72 insertions(+), 569 deletions(-) delete mode 100644 gnu/packages/patches/texlive-bin-CVE-2018-17407.patch delete mode 100644 gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch create mode 100644 gnu/packages/patches/texlive-bin-poppler-0.83.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 09f46b065e..fd3d434d0c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1405,8 +1405,7 @@ dist_patch_DATA = \ %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/teeworlds-use-latest-wavpack.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/telegram-purple-adjust-test.patch \ %D%/packages/patches/texi2html-document-encoding.patch \ %D%/packages/patches/texi2html-i18n.patch \ 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: -. - -Submitted By: Ken Moffat -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/tex.scm b/gnu/packages/tex.scm index e4346d1232..644b455966 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -227,9 +227,9 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." (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 @@ -241,15 +241,15 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." (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) @@ -260,14 +260,13 @@ 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")))))) (build-system gnu-build-system) (inputs `(("texlive-extra-src" ,texlive-extra-src) @@ -284,7 +283,7 @@ copied to their outputs; otherwise the TEXLIVE-BUILD-SYSTEM is used." "-checkout")) (sha256 (base32 - "0wrjls1y9b4k1z10l9l8w2l3yjcw7v7by2y16kchdpkiyldlkry6")))) + "1cj04svl8bpfwjr4gqfcc04rmklz3aggrxvgj7q5bxrh7c7g18xh")))) ("cairo" ,cairo) ("fontconfig" ,fontconfig) ("fontforge" ,fontforge) @@ -362,18 +361,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 _ -- cgit v1.2.3 From f87b68a18627fe8bab960d45460dd2217fa85def Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 14 Jan 2020 17:56:24 +0100 Subject: gnu: findutils: Fix bootstrap on aarch64-linux and armhf-linux. * gnu/packages/patches/findutils-test-rwlock-threads.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/base.scm (findutils)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/base.scm | 3 +- .../patches/findutils-test-rwlock-threads.patch | 38 ++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/findutils-test-rwlock-threads.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index fd3d434d0c..0ba01efcc6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -854,6 +854,7 @@ dist_patch_DATA = \ %D%/packages/patches/fifo-map-remove-catch.hpp.patch \ %D%/packages/patches/file-CVE-2019-18218.patch \ %D%/packages/patches/findutils-localstatedir.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/foomatic-filters-CVE-2015-8327.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index a336f5e6d0..52ca78fa70 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -261,7 +261,8 @@ interactive means to merge two files.") (sha256 (base32 "16kqz9yz98dasmj70jwf5py7jk558w96w0vgp3zf9xsqk3gzpzn5")) - (patches (search-patches "findutils-localstatedir.patch")))) + (patches (search-patches "findutils-localstatedir.patch" + "findutils-test-rwlock-threads.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list 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 + ++#if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS ++ + #include "glthread/lock.h" + + #include +@@ -151,3 +153,18 @@ main () + sleep (1); + } + } ++ ++#else ++ ++/* No multithreading available. */ ++ ++#include ++ ++int ++main () ++{ ++ fputs ("Skipping test: multithreading not enabled\n", stderr); ++ return 77; ++} ++ ++#endif + -- cgit v1.2.3 From 488c30437ca12ea6bf487180c1d28df381413e98 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 14 Jan 2020 17:59:20 +0100 Subject: gnu: file: Update to 5.38. * gnu/packages/patches/file-CVE-2019-18218.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/file.scm (file): Update to 5.38. [source](patches): Remove. --- gnu/local.mk | 1 - gnu/packages/file.scm | 5 +-- gnu/packages/patches/file-CVE-2019-18218.patch | 55 -------------------------- 3 files changed, 2 insertions(+), 59 deletions(-) delete mode 100644 gnu/packages/patches/file-CVE-2019-18218.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0ba01efcc6..4677c42979 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -852,7 +852,6 @@ dist_patch_DATA = \ %D%/packages/patches/fbreader-curl-7.62.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-2019-18218.patch \ %D%/packages/patches/findutils-localstatedir.patch \ %D%/packages/patches/findutils-test-rwlock-threads.patch \ %D%/packages/patches/flann-cmake-3.11.patch \ diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm index cf770297c4..bac951f9c5 100644 --- a/gnu/packages/file.scm +++ b/gnu/packages/file.scm @@ -30,15 +30,14 @@ (define-public file (package (name "file") - (version "5.37") + (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-2019-18218.patch")) (sha256 (base32 - "0zz0p9bqnswfx0c16j8k62ivjq1m16x10xqv4hy9lcyxyxkkkhg9")))) + "0d7s376b4xqymnrsjxi3nsv3f5v89pzfspzml2pcajdk5by2yg2r")))) (build-system gnu-build-system) ;; When cross-compiling, this package depends upon a native install of diff --git a/gnu/packages/patches/file-CVE-2019-18218.patch b/gnu/packages/patches/file-CVE-2019-18218.patch deleted file mode 100644 index 21069823b7..0000000000 --- a/gnu/packages/patches/file-CVE-2019-18218.patch +++ /dev/null @@ -1,55 +0,0 @@ -Fix CVE-2019-18218: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18218 - -Patch copied from upstream source repository: - -https://github.com/file/file/commit/46a8443f76cec4b41ec736eca396984c74664f84 - -From 46a8443f76cec4b41ec736eca396984c74664f84 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Mon, 26 Aug 2019 14:31:39 +0000 -Subject: [PATCH] Limit the number of elements in a vector (found by oss-fuzz) - ---- - src/cdf.c | 9 ++++----- - src/cdf.h | 1 + - 2 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/cdf.c b/src/cdf.c -index 9d6396742..bb81d6374 100644 ---- a/src/cdf.c -+++ b/src/cdf.c -@@ -1027,8 +1027,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, - goto out; - } - nelements = CDF_GETUINT32(q, 1); -- if (nelements == 0) { -- DPRINTF(("CDF_VECTOR with nelements == 0\n")); -+ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) { -+ DPRINTF(("CDF_VECTOR with nelements == %" -+ SIZE_T_FORMAT "u\n", nelements)); - goto out; - } - slen = 2; -@@ -1070,8 +1071,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h, - goto out; - inp += nelem; - } -- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n", -- nelements)); - for (j = 0; j < nelements && i < sh.sh_properties; - j++, i++) - { -diff --git a/src/cdf.h b/src/cdf.h -index 2f7e554b7..05056668f 100644 ---- a/src/cdf.h -+++ b/src/cdf.h -@@ -48,6 +48,7 @@ - typedef int32_t cdf_secid_t; - - #define CDF_LOOP_LIMIT 10000 -+#define CDF_ELEMENT_LIMIT 100000 - - #define CDF_SECID_NULL 0 - #define CDF_SECID_FREE -1 -- cgit v1.2.3 From a76a343082d61d5303b61a9e4cbde4ab8515a1e7 Mon Sep 17 00:00:00 2001 From: Jakub Kądziołka Date: Tue, 14 Jan 2020 17:59:21 +0100 Subject: gnu: curl: Make libcurl respect SSL_CERT_DIR and SSL_CERT_FILE. * gnu/packages/patches/curl-use-ssl-cert-env.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/curl.scm (curl)[source]: Use the patch. [native-search-paths]: Add the new variables. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + gnu/packages/curl.scm | 20 ++++++-- gnu/packages/patches/curl-use-ssl-cert-env.patch | 64 ++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/curl-use-ssl-cert-env.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 62ea29cdbb..659098deb5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -789,6 +789,7 @@ dist_patch_DATA = \ %D%/packages/patches/csvkit-fix-tests.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 \ diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm index ee1cca449b..3d230dc1f0 100644 --- a/gnu/packages/curl.scm +++ b/gnu/packages/curl.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Roel Janssen ;;; Copyright © 2019 Ricardo Wurmus +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,7 +58,8 @@ version ".tar.xz")) (sha256 (base32 - "0nh3j90w6b97wqcgxjfq55qhkz9s38955fbhwzv2fsi7483j895p")))) + "0nh3j90w6b97wqcgxjfq55qhkz9s38955fbhwzv2fsi7483j895p")) + (patches (search-patches "curl-use-ssl-cert-env.patch")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;1.2 MiB of man3 pages @@ -74,10 +76,20 @@ ("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 libcurl-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 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; -- cgit v1.2.3 From 99406d9b684ec60384dc29d850905dd517fb9790 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 20 Jan 2020 18:11:38 +0100 Subject: gnu: ghostscript: Fix CVE-2019-14869. * gnu/packages/patches/ghostscript-CVE-2019-14869.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/ghostscript.scm (ghostscript)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/ghostscript.scm | 3 +- .../patches/ghostscript-CVE-2019-14869.patch | 48 ++++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ghostscript-CVE-2019-14869.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b6a717820b..6958cc6af0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -910,6 +910,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-monad-par-fix-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-html-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-latex-test.patch \ + %D%/packages/patches/ghostscript-CVE-2019-14869.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index c63fc2f9f9..84c6985bde 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -170,7 +170,8 @@ printing, and psresize, for adjusting page sizes.") (sha256 (base32 "1m770dwc82afdgzgq2kar3120r1lbybm3mssdm79f8kggf0v16yv")) - (patches (search-patches "ghostscript-no-header-creationdate.patch" + (patches (search-patches "ghostscript-CVE-2019-14869.patch" + "ghostscript-no-header-creationdate.patch" "ghostscript-no-header-id.patch" "ghostscript-no-header-uuid.patch")) (modules '((guix build utils))) diff --git a/gnu/packages/patches/ghostscript-CVE-2019-14869.patch b/gnu/packages/patches/ghostscript-CVE-2019-14869.patch new file mode 100644 index 0000000000..d80fba0594 --- /dev/null +++ b/gnu/packages/patches/ghostscript-CVE-2019-14869.patch @@ -0,0 +1,48 @@ +Fix CVE-2019-14869: + +https://nvd.nist.gov/vuln/detail/CVE-2019-14869 + +Patch taken from upstream: + +https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=485904772c5f0aa1140032746e5a0abfc40f4cef + +diff --git a/Resource/Init/gs_ttf.ps b/Resource/Init/gs_ttf.ps +index 74043d1..6be8fe9 100644 +--- a/Resource/Init/gs_ttf.ps ++++ b/Resource/Init/gs_ttf.ps +@@ -1304,7 +1304,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef + TTFDEBUG { (\n1 setting alias: ) print dup ==only + ( to be the same as ) print 2 index //== exec } if + +- 7 index 2 index 3 -1 roll exch .forceput ++ 7 index 2 index 3 -1 roll exch put + } forall + pop pop pop + } +@@ -1322,7 +1322,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef + exch pop + TTFDEBUG { (\n2 setting alias: ) print 1 index ==only + ( to use glyph index: ) print dup //== exec } if +- 5 index 3 1 roll .forceput ++ 5 index 3 1 roll put + //false + } + { +@@ -1339,7 +1339,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef + { % CharStrings(dict) isunicode(boolean) cmap(dict) RAGL(dict) gname(name) codep(integer) gindex(integer) + TTFDEBUG { (\3 nsetting alias: ) print 1 index ==only + ( to be index: ) print dup //== exec } if +- exch pop 5 index 3 1 roll .forceput ++ exch pop 5 index 3 1 roll put + } + { + pop pop +@@ -1369,7 +1369,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef + } ifelse + ] + TTFDEBUG { (Encoding: ) print dup === flush } if +-} .bind executeonly odef % hides .forceput ++} .bind odef + + % ---------------- CIDFontType 2 font loading ---------------- % + -- cgit v1.2.3 From cdba91486a60bbba727d843707322f98f8286124 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 20 Jan 2020 18:13:53 +0100 Subject: gnu: make: Update to 4.3. * gnu/packages/patches/make-impure-dirs.patch: Adjust for renamed files. * gnu/packages/patches/make-glibc-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/base.scm (gnu-make): Update to 4.3. [source](uri): Change to ".gz" tarball. [source](patches): Remove obsolete. [arguments]: Remove #:configure-flags. Adjust for renamed files. [inputs]: Change from GUILE-2.0 to GUILE-3.0. * gnu/packages/commencement.scm (gnu-make-boot0)[arguments]: Add #:configure-flags. --- gnu/local.mk | 1 - gnu/packages/base.scm | 18 ++++------ gnu/packages/commencement.scm | 5 +++ gnu/packages/patches/make-glibc-compat.patch | 52 ---------------------------- gnu/packages/patches/make-impure-dirs.patch | 12 +++---- 5 files changed, 18 insertions(+), 70 deletions(-) delete mode 100644 gnu/packages/patches/make-glibc-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 6958cc6af0..fb9f506f31 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1152,7 +1152,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 \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 9f8130be50..45f6cf79ba 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -360,31 +360,27 @@ functionality beyond that which is outlined in the POSIX 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 - ;; . - #:configure-flags '("make_cv_sys_gnu_glob=yes") - #:phases + '(#: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))) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index d173f5a19b..851bb02163 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -1412,6 +1412,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 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 ---- -- cgit v1.2.3 From b15d1c467fd5de9724c3a47c4d0d9c26246e8dc9 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 14 Jan 2020 19:52:58 +0100 Subject: gnu: Python: Update to 3.8.1. * gnu/packages/python.scm (python-3.7): Rename to ... (python-3.8): ... this. Update to 3.8.1. [source](patches): Add "python-3.8-fix-tests.patch". [source](snippet): Adjust for renamed file. (python-3): Alias to PYTHON-3.8. * gnu/packages/patches/python-3-search-paths.patch: Adjust for 3.8. * gnu/packages/patches/python-3.8-search-paths.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 - gnu/packages/patches/python-3-search-paths.patch | 28 ++++++++--------- gnu/packages/patches/python-3.8-search-paths.patch | 17 ---------- gnu/packages/python.scm | 36 ++++------------------ 4 files changed, 20 insertions(+), 62 deletions(-) delete mode 100644 gnu/packages/patches/python-3.8-search-paths.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 63a3fcffbe..4f1385d73b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1307,7 +1307,6 @@ dist_patch_DATA = \ %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-axolotl-AES-fix.patch \ diff --git a/gnu/packages/patches/python-3-search-paths.patch b/gnu/packages/patches/python-3-search-paths.patch index cf1647207b..aaf7236631 100644 --- a/gnu/packages/patches/python-3-search-paths.patch +++ b/gnu/packages/patches/python-3-search-paths.patch @@ -3,23 +3,23 @@ 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,15 +575,15 @@ +@@ -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('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 # libraries. -- lib_dirs = (self.compiler.library_dirs + -+ lib_dirs = (os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) + - sysroot_paths(('LDFLAGS', 'CC'), system_lib_dirs)) -- inc_dirs = (self.compiler.include_dirs + -+ inc_dirs = (os.getenv('CROSS_CPATH', '').split(os.pathsep) + - sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'), - system_include_dirs)) - exts = [] +- 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_CPATH', '').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/python.scm b/gnu/packages/python.scm index 7aa170ffc0..96caaae0b3 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -344,27 +344,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.1") (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")) + "1s4lwn5vzsajlc88m6hkghsvnjw4d00l2dsgng0m2w6vyqbl32bm")) (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)))) @@ -432,33 +433,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) -- cgit v1.2.3 From 41fdad9f8c48a674d758c9835ab8640a9192a1a6 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 17 Jan 2020 08:03:29 +0100 Subject: gnu: python-cffi: Update to 1.13.2. * gnu/packages/patches/python-cffi-x87-stack-clean.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/libffi.scm (python-cffi): Update to 1.13.2. [arguments]: Adjust substitution. Remove obsolete phase. --- gnu/local.mk | 1 - gnu/packages/libffi.scm | 16 +++--------- .../patches/python-cffi-x87-stack-clean.patch | 29 ---------------------- 3 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 gnu/packages/patches/python-cffi-x87-stack-clean.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4f1385d73b..88ce141c13 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1312,7 +1312,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-axolotl-AES-fix.patch \ %D%/packages/patches/python-cairocffi-dlopen-path.patch \ %D%/packages/patches/python-cross-compile.patch \ - %D%/packages/patches/python-cffi-x87-stack-clean.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ %D%/packages/patches/python-faker-fix-build-32bit.patch \ diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index 52654ddf3f..b0098389c0 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm @@ -76,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))) @@ -116,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 @@ -142,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/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): -- cgit v1.2.3 From f0e810110bf44b6c5c61bf0cdcadc836a7fd459d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 3 Feb 2020 20:18:52 +0100 Subject: gnu: WebKitGTK: Remove obsolete patch. This patch was added in eb5f3ea1003f76545b197b1e779e2967ec379475 and no longer necessary since the update to 2.26.3 in f32ca55778eb049e83210aedcbeb4df2c98e587a. * gnu/packages/patches/webkitgtk-icu-65.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/webkit.scm (webkitgtk)[source](patches): Remove. --- gnu/local.mk | 1 - gnu/packages/patches/webkitgtk-icu-65.patch | 47 ----------------------------- gnu/packages/webkit.scm | 1 - 3 files changed, 49 deletions(-) delete mode 100644 gnu/packages/patches/webkitgtk-icu-65.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 65b62e2e58..60b1ce9248 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1480,7 +1480,6 @@ dist_patch_DATA = \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ %D%/packages/patches/weasyprint-library-paths.patch \ - %D%/packages/patches/webkitgtk-icu-65.patch \ %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \ %D%/packages/patches/wicd-bitrate-none-fix.patch \ %D%/packages/patches/wicd-get-selected-profile-fix.patch \ diff --git a/gnu/packages/patches/webkitgtk-icu-65.patch b/gnu/packages/patches/webkitgtk-icu-65.patch deleted file mode 100644 index 66819c566b..0000000000 --- a/gnu/packages/patches/webkitgtk-icu-65.patch +++ /dev/null @@ -1,47 +0,0 @@ -Fix build with ICU 65. - -Taken from upstream: -https://bugs.webkit.org/show_bug.cgi?id=202600 -https://trac.webkit.org/r250747 - -diff --git a/Source/WTF/wtf/URLHelpers.cpp b/Source/WTF/wtf/URLHelpers.cpp -index 18e7f13cd615..c584f1a0cb7e 100644 ---- a/Source/WTF/wtf/URLHelpers.cpp -+++ b/Source/WTF/wtf/URLHelpers.cpp -@@ -301,7 +301,7 @@ static bool allCharactersInIDNScriptWhiteList(const UChar* buffer, int32_t lengt - Optional previousCodePoint; - while (i < length) { - UChar32 c; -- U16_NEXT(buffer, i, length, c) -+ U16_NEXT(buffer, i, length, c); - UErrorCode error = U_ZERO_ERROR; - UScriptCode script = uscript_getScript(c, &error); - if (error != U_ZERO_ERROR) { -diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp -index 2443e24c9bc4..1fbb3a716006 100644 ---- a/Source/WebCore/dom/Document.cpp -+++ b/Source/WebCore/dom/Document.cpp -@@ -4954,12 +4954,12 @@ static bool isValidNameNonASCII(const UChar* characters, unsigned length) - unsigned i = 0; - - UChar32 c; -- U16_NEXT(characters, i, length, c) -+ U16_NEXT(characters, i, length, c); - if (!isValidNameStart(c)) - return false; - - while (i < length) { -- U16_NEXT(characters, i, length, c) -+ U16_NEXT(characters, i, length, c); - if (!isValidNamePart(c)) - return false; - } -@@ -5019,7 +5019,7 @@ ExceptionOr> Document::parseQualifiedName(cons - - for (unsigned i = 0; i < length; ) { - UChar32 c; -- U16_NEXT(qualifiedName, i, length, c) -+ U16_NEXT(qualifiedName, i, length, c); - if (c == ':') { - if (sawColon) - return Exception { InvalidCharacterError }; diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index b3a87e798a..aeead92871 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -126,7 +126,6 @@ engine that uses Wayland for graphics output.") (method url-fetch) (uri (string-append "https://www.webkitgtk.org/releases/" "webkitgtk-" version ".tar.xz")) - (patches (search-patches "webkitgtk-icu-65.patch")) (sha256 (base32 "04g6y0sv04d20bw401myq3k828ikysjhx383ly81vh9wji9i3mdd")))) -- cgit v1.2.3 From a33eac038a811603c8b9ed106ae405a5f80a0e9d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 1 Feb 2020 16:29:02 +0100 Subject: gnu: glibc: Update to 2.31. * gnu/packages/patches/glibc-supported-locales.patch: Adjust for upstream changes. * gnu/packages/patches/glibc-2.29-supported-locales.patch: New file, with previous contents. * gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch, gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch, gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch, gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch, gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gcc.scm (gcc-4.9, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9)[source](patches): Add the respective patch files. * gnu/packages/base.scm (glibc): Update to 2.31. [source](patches): Remove obsolete. (glibc-2.30): New public variable. (glibc-2.29)[source](patches): Adjust for renamed patch file. --- gnu/local.mk | 6 +++ gnu/packages/base.scm | 25 ++++++++-- gnu/packages/gcc.scm | 6 +++ .../patches/gcc-4.9-libsanitizer-mode-size.patch | 52 +++++++++++++++++++ .../patches/gcc-6-libsanitizer-mode-size.patch | 53 ++++++++++++++++++++ .../patches/gcc-7-libsanitizer-mode-size.patch | 53 ++++++++++++++++++++ .../patches/gcc-8-libsanitizer-mode-size.patch | 56 +++++++++++++++++++++ .../patches/gcc-9-libsanitizer-mode-size.patch | 58 ++++++++++++++++++++++ .../patches/glibc-2.29-supported-locales.patch | 33 ++++++++++++ gnu/packages/patches/glibc-supported-locales.patch | 11 ++-- 10 files changed, 343 insertions(+), 10 deletions(-) create mode 100644 gnu/packages/patches/gcc-4.9-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/gcc-6-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/gcc-7-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch create mode 100644 gnu/packages/patches/glibc-2.29-supported-locales.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 347713239d..7b3d314993 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -883,6 +883,11 @@ dist_patch_DATA = \ %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-8-libsanitizer-mode-size.patch \ + %D%/packages/patches/gcc-9-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 \ @@ -954,6 +959,7 @@ 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 \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 184ef3b841..13bcf7fe9d 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -593,13 +593,13 @@ the store.") ;; version 2.28, GNU/Hurd used a different glibc branch. (package (name "glibc") - (version "2.30") + (version "2.31") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72")) + "05zxkyz9bv3j9h0xyid1rhvh3klhsmrpkf3bcs6frvlgyr2gwilj")) (snippet ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is ;; required on LFS distros to avoid loading the distro's libc.so @@ -611,7 +611,6 @@ the store.") #t)) (modules '((guix build utils))) (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" @@ -843,6 +842,24 @@ 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) @@ -861,7 +878,7 @@ with the Linux kernel.") "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" "glibc-reinstate-prlimit64-fallback.patch" - "glibc-supported-locales.patch")))))) + "glibc-2.29-supported-locales.patch")))))) (define-public glibc-2.28 (package diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 69bac8dd0c..90cb97e15c 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -402,6 +402,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" @@ -441,6 +442,7 @@ 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-6-libsanitizer-mode-size.patch" "gcc-fix-texi2pod.patch")) (modules '((guix build utils))) (snippet @@ -473,6 +475,7 @@ 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")))) @@ -492,6 +495,7 @@ Go. It also includes runtime support libraries for these languages.") (base32 "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 @@ -510,6 +514,7 @@ It also includes runtime support libraries for these languages."))) (base32 "0b3xv411xhlnjmin2979nxcbnidgvzqdf4nbhix99x60dkzavfk4")) (patches (search-patches "gcc-8-strmov-store-file-names.patch" + "gcc-8-libsanitizer-mode-size.patch" "gcc-5.0-libvtv-runpath.patch")))))) (define-public gcc-9 @@ -524,6 +529,7 @@ It also includes runtime support libraries for these languages."))) (base32 "01mj3yk7z49i49168hg2cg7qs4bsccrrnv7pjmbdlf8j2a7z0vpa")) (patches (search-patches "gcc-9-strmov-store-file-names.patch" + "gcc-9-libsanitizer-mode-size.patch" "gcc-9-asan-fix-limits-include.patch" "gcc-5.0-libvtv-runpath.patch")))))) 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-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-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-8-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..e343034991 --- /dev/null +++ b/gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch @@ -0,0 +1,56 @@ +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 a915d37cdfe..5c720b2e700 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1147,8 +1147,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 4d11d071776..eda75a7cd84 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -210,14 +210,8 @@ 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; +@@ -228,8 +222,7 @@ namespace __sanitizer { + unsigned long __unused1; + unsigned 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-9-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch new file mode 100644 index 0000000000..9e99a3d198 --- /dev/null +++ b/gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch @@ -0,0 +1,58 @@ +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 + +This is a combination of these upstream revisions: + +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 6cd4a5bac8b..d823a12190c 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1156,8 +1156,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 73af92af1e8..6a673a7c995 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -211,26 +211,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; +-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) +- unsigned int mode; +- unsigned short __seq; +- unsigned short __pad1; +- unsigned long __unused1; +- unsigned 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/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-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 + -- cgit v1.2.3 From 6457ae1339c8d3dc7ade2baa8511916d55809887 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 15 Feb 2020 16:01:01 +0100 Subject: gnu: telepathy-glib: Fix test failure. * gnu/packages/patches/telepathy-glib-channel-memory-leak.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/glib.scm (telepathy-glib)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/glib.scm | 1 + .../patches/telepathy-glib-channel-memory-leak.patch | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 gnu/packages/patches/telepathy-glib-channel-memory-leak.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7b3d314993..18e8b211f7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1435,6 +1435,7 @@ dist_patch_DATA = \ %D%/packages/patches/texinfo-5-perl-compat.patch \ %D%/packages/patches/texlive-bin-poppler-0.83.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 \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index e6f1cf819f..d25959b928 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -805,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. ;; (origin 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 -- cgit v1.2.3 From 9640cd972d71fa474e024e43246125217e65c424 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 14 Feb 2020 15:47:48 +0100 Subject: gnu: libgpg-error: Update to 1.37. * gnu/packages/patches/libgpg-error-gawk-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gnupg.scm (libgpg-error): Update to 1.37. [source](modules, patches): Remove. --- gnu/local.mk | 1 - gnu/packages/gnupg.scm | 13 +- .../patches/libgpg-error-gawk-compat.patch | 155 --------------------- 3 files changed, 2 insertions(+), 167 deletions(-) delete mode 100644 gnu/packages/patches/libgpg-error-gawk-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 18e8b211f7..2b425bee22 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1105,7 +1105,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/libjxr-fix-function-signature.patch \ %D%/packages/patches/libjxr-fix-typos.patch \ %D%/packages/patches/libotr-test-auth-fix.patch \ diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 4e8869a658..890dd3299b 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -79,7 +79,7 @@ (define-public libgpg-error (package (name "libgpg-error") - (version "1.36") + (version "1.37") (source (origin (method url-fetch) @@ -87,16 +87,7 @@ 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) 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 -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 ---- - 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"; - -- cgit v1.2.3 From eb07edabaf11e39b25f5cf40967afd3dadcb14eb Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 17 Feb 2020 23:01:54 +0100 Subject: gnu: datefudge: Fix compilation against libc 2.31. * gnu/packages/patches/datefudge-gettimeofday.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/time.scm (datefudge)[source] Use it. --- gnu/local.mk | 3 ++- gnu/packages/patches/datefudge-gettimeofday.patch | 13 +++++++++++++ gnu/packages/time.scm | 4 +++- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/datefudge-gettimeofday.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2b425bee22..dcdcef9875 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès +# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Andreas Enge # Copyright © 2016 Mathieu Lirzin # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Mark H Weaver @@ -806,6 +806,7 @@ dist_patch_DATA = \ %D%/packages/patches/cvs-CVE-2017-12836.patch \ %D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch \ %D%/packages/patches/darkice-workaround-fpermissive-error.patch \ + %D%/packages/patches/datefudge-gettimeofday.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 \ 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/time.scm b/gnu/packages/time.scm index 63227d7bf5..b9ce791827 100644 --- a/gnu/packages/time.scm +++ b/gnu/packages/time.scm @@ -39,6 +39,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) @@ -429,7 +430,8 @@ datetime type.") (file-name (git-file-name name version)) (sha256 (base32 - "0r9g8v9xnv60hq3j20wqy34kyig3sc2pisjxl4irn7jjx85f1spv")))) + "0r9g8v9xnv60hq3j20wqy34kyig3sc2pisjxl4irn7jjx85f1spv")) + (patches (search-patches "datefudge-gettimeofday.patch")))) (build-system gnu-build-system) (arguments `(#:test-target "test" -- cgit v1.2.3 From 9a935f664e229b642eb8e3b9567d4c5f2e4f0d1b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 22 Nov 2019 21:06:06 +0100 Subject: gnu: commencement: Add gcc-core-mesboot1. * gnu/packages/commencement.scm (gcc-core-mesboot1): New variable. (gmp-boot, mpfr-boot, mpc-boot): Scheme-only bootstrap. * gnu/packages/patches/gcc-boot-4.6.4.patch: New file. * gnu/packages/patches/gcc-boot-4.7.4.patch: Remove. * gnu/local.mk (dist_patch_DATA): Update. --- gnu/local.mk | 2 +- gnu/packages/commencement.scm | 170 ++++++++++++++++++++++++++---- gnu/packages/patches/gcc-boot-4.6.4.patch | 55 ++++++++++ gnu/packages/patches/gcc-boot-4.7.4.patch | 68 ------------ 4 files changed, 203 insertions(+), 92 deletions(-) create mode 100644 gnu/packages/patches/gcc-boot-4.6.4.patch delete mode 100644 gnu/packages/patches/gcc-boot-4.7.4.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index dcdcef9875..c6eccd7e4a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -877,7 +877,7 @@ 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 \ diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 52562f1e7a..bb42d97b65 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -1889,29 +1889,6 @@ ac_cv_c_float_format='IEEE (little-endian)' (string-append "SHELL = " shell))) #t)))))))) -(define binutils-mesboot - (package - (inherit binutils-mesboot0) - (name "binutils-mesboot") - (native-inputs `(("binutils" ,binutils-mesboot0) - ("libc" ,glibc-mesboot0) - ("gcc" ,gcc-mesboot0) - - ("bash" ,%bootstrap-coreutils&co) - ("coreutils" ,%bootstrap-coreutils&co) - ("diffutils" ,diffutils-mesboot) - ("kernel-headers" ,%bootstrap-linux-libre-headers) - ("make" ,make-mesboot0))) - (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=/")))))) - (define gmp-boot (package (inherit gmp) @@ -1946,6 +1923,153 @@ ac_cv_c_float_format='IEEE (little-endian)' (base32 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1")))))) +(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-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 `(("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)))))))) + +(define binutils-mesboot + (package + (inherit binutils-mesboot0) + (name "binutils-mesboot") + (native-inputs `(("binutils" ,binutils-mesboot0) + ("libc" ,glibc-mesboot0) + ("gcc" ,gcc-mesboot0) + + ("bash" ,%bootstrap-coreutils&co) + ("coreutils" ,%bootstrap-coreutils&co) + ("diffutils" ,diffutils-mesboot) + ("kernel-headers" ,%bootstrap-linux-libre-headers) + ("make" ,make-mesboot0))) + (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=/")))))) + (define gcc-mesboot1 (package (inherit gcc-mesboot0) diff --git a/gnu/packages/patches/gcc-boot-4.6.4.patch b/gnu/packages/patches/gcc-boot-4.6.4.patch new file mode 100644 index 0000000000..4ab0bf8641 --- /dev/null +++ b/gnu/packages/patches/gcc-boot-4.6.4.patch @@ -0,0 +1,55 @@ +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. + * Add SSIZE_MAX define. The SSIZE_MAX define has been added to Mes + upstream and can be removed with the next Mes release. + * Remove -fbuilding-libgcc flag, it assumes features being present from a + newer gcc or glibc. + * [MES_BOOTSTRAP_GCC]: Disable threads harder. + +Upstream status: not presented upstream. + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index f3cc49fdb18..bc5718fc9a6 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -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 = /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@ + +diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c +index 94b7a0b89a7..ab2baab55ca 100644 +--- a/gcc/config/host-linux.c ++++ b/gcc/config/host-linux.c +@@ -23,6 +23,12 @@ + #include "hosthooks.h" + #include "hosthooks-def.h" + ++// ../.././gcc/config/host-linux.c:213: `SSIZE_MAX' undeclared (first ++// use in this function) ++#include ++#ifndef SSIZE_MAX ++# define SSIZE_MAX LONG_MAX ++#endif + + /* 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/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 +@@ -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. */ + +-#ifndef inhibit_libc ++#if 0 //!defined (inhibit_libc) && !MES_BOOTSTRAP_GCC + + #include + #include diff --git a/gnu/packages/patches/gcc-boot-4.7.4.patch b/gnu/packages/patches/gcc-boot-4.7.4.patch deleted file mode 100644 index 3e51e31fdf..0000000000 --- a/gnu/packages/patches/gcc-boot-4.7.4.patch +++ /dev/null @@ -1,68 +0,0 @@ -This patch enables building gcc-4.7.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. - * Add SSIZE_MAX define. The SSIZE_MAX define has been added to Mes - upstream and can be removed with the next Mes release. - * Remove -fbuilding-libgcc flag, it assumes features being present from a - newer gcc or glibc. - * [MES_BOOTSTRAP_GCC]: Disable threads harder. - -Upstream status: not presented upstream. - -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 - 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@ - # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ - -diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c -index 94b7a0b89a7..ab2baab55ca 100644 ---- a/gcc/config/host-linux.c -+++ b/gcc/config/host-linux.c -@@ -23,6 +23,12 @@ - #include "hosthooks.h" - #include "hosthooks-def.h" - -+// ../.././gcc/config/host-linux.c:213: `SSIZE_MAX' undeclared (first -+// use in this function) -+#include -+#ifndef SSIZE_MAX -+# define SSIZE_MAX LONG_MAX -+#endif - - /* 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 - will want to define inhibit_libc while building a compiler which - can build glibc. */ - --#ifndef inhibit_libc -+#if 0 //!defined (inhibit_libc) && !MES_BOOTSTRAP_GCC - - #include - #include -- cgit v1.2.3 From af88972bb8e3e69d9c5ea5a8a81f7f234c971133 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 5 Mar 2020 17:27:20 +0100 Subject: gnu: clang-runtime: Fix build with glibc 2.31. * gnu/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch, gnu/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch, gnu/packages/patches/clang-runtime-9-libsanitizer-mode-field.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/llvm.scm (clang-runtime, clang-runtime-8, clang-runtime-7, clang-runtime-6, clang-runtime-3.9.1, clang-runtime-3.8, clang-runtime-3.7): Add the respective patches. --- gnu/local.mk | 3 ++ gnu/packages/llvm.scm | 19 ++++--- ...clang-runtime-3.8-libsanitizer-mode-field.patch | 50 ++++++++++++++++++ ...clang-runtime-3.9-libsanitizer-mode-field.patch | 50 ++++++++++++++++++ .../clang-runtime-9-libsanitizer-mode-field.patch | 60 ++++++++++++++++++++++ 5 files changed, 176 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/clang-runtime-3.8-libsanitizer-mode-field.patch create mode 100644 gnu/packages/patches/clang-runtime-3.9-libsanitizer-mode-field.patch create mode 100644 gnu/packages/patches/clang-runtime-9-libsanitizer-mode-field.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9b46ac5629..463d67107d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -783,6 +783,9 @@ dist_patch_DATA = \ %D%/packages/patches/clang-9.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 \ diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 659631e263..1286fe521b 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -404,7 +404,8 @@ output), and Binutils.") (define-public clang-runtime (clang-runtime-from-llvm llvm - "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2")) + "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2" + '("clang-runtime-9-libsanitizer-mode-field.patch"))) (define-public clang (clang-from-llvm llvm clang-runtime @@ -434,7 +435,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 @@ -458,7 +460,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 @@ -482,7 +485,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 @@ -514,7 +518,8 @@ output), and Binutils.") (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"))) @@ -540,6 +545,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 @@ -563,6 +569,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 @@ -585,7 +592,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 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; -- cgit v1.2.3 From 44a33ee90dbd97abf388fc45a7f4cd41cbc8171f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 4 Mar 2020 11:52:29 +0100 Subject: gnu: texlive-bin: Fix build with Poppler 0.86. * gnu/packages/patches/texlive-bin-poppler-0.86.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/tex.scm (texlive-bin)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/texlive-bin-poppler-0.86.patch | 17 +++++++++++++++++ gnu/packages/tex.scm | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/texlive-bin-poppler-0.86.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 463d67107d..e452cd8895 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1438,6 +1438,7 @@ dist_patch_DATA = \ %D%/packages/patches/teensy-loader-cli-help.patch \ %D%/packages/patches/texinfo-5-perl-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 \ 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/tex.scm b/gnu/packages/tex.scm index d95434aa8f..dd90ab2b72 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -255,7 +255,8 @@ files from LOCATIONS with expected checksum HASH. CODE is not currently in use. "03vc88dz37mjjyaspzv0fik2fp5gp8qv82114869akd1dhszbaax") (search-patch "texlive-bin-poppler-0.83.patch") (arch-patch "texlive-poppler-0.84.patch" arch-revision - "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa")))) + "1ia6cr99krk4ipx4hdi2qdb98bh2h26mckjlpxdzrjnfhlnghksa") + (search-patch "texlive-bin-poppler-0.86.patch")))) (modules '((guix build utils) (ice-9 ftw))) (snippet -- cgit v1.2.3 From a343d6bab710eefaa714251a81c9a42002302967 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 5 Mar 2020 18:16:43 +0100 Subject: gnu: Remove ld-wrapper-next. * gnu/packages/ld-wrapper-next.in: Delete file. * gnu/local.mk (MISC_DISTRO_FILES): Adjust accordingly. * gnu/packages/chromium.scm (ld-wrapper-next): Remove variable. (ungoogled-chromium)[native-inputs]: Remove LD-WRAPPER-NEXT. --- gnu/local.mk | 3 +- gnu/packages/chromium.scm | 13 -- gnu/packages/ld-wrapper-next.in | 305 ---------------------------------------- 3 files changed, 1 insertion(+), 320 deletions(-) delete mode 100644 gnu/packages/ld-wrapper-next.in (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e452cd8895..0fe2c90781 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1522,5 +1522,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/chromium.scm b/gnu/packages/chromium.scm index 0b3d19a428..275eb0588b 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") @@ -766,7 +754,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) 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 ). -# Unset 'GUILE_LOAD_COMPILED_PATH' to make sure we do not stumble upon -# incompatible .go files. See -# . - -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 -;;; Copyright © 2020 Marius Bakke -;;; -;;; 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 . - -(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 -;;; 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 . - (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 -- cgit v1.2.3 From 02043f36d728fd46a3d9b5bc7449cd847f1b231e Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sun, 8 Mar 2020 20:41:51 +0100 Subject: gnu: coreutils: Fix cross-compilation. Fix coreutils cross-compilation for aarch64 that was broken by 8.32 update. The following error occured: src/ls.c: In function 'print_dir': src/ls.c:3026:24: error: 'SYS_getdents' undeclared (first use in this function); did you mean 'SYS_getdents64'? if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1 ^~~~~~~~~~~~ SYS_getdents64 * gnu/packages/patches/coreutils-ls.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/base.scm (coreutils): Apply it. --- gnu/local.mk | 1 + gnu/packages/base.scm | 5 +- gnu/packages/patches/coreutils-ls.patch | 117 ++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/coreutils-ls.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0fe2c90781..7c3e2648e9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -797,6 +797,7 @@ 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 \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 1989bdd7eb..f048e4b119 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016, 2018 Alex Vong ;;; Copyright © 2017 Rene Saavedra -;;; Copyright © 2017 Mathieu Othacehe +;;; Copyright © 2017, 2020 Mathieu Othacehe ;;; Copyright © 2017, 2018, 2020 Marius Bakke ;;; Copyright © 2017 Eric Bavier ;;; Copyright © 2018 Tobias Geerinckx-Rice @@ -297,7 +297,8 @@ used to apply commands with arbitrarily long arguments.") version ".tar.xz")) (sha256 (base32 - "1yjcrh5hw70c0yn8zw55pd6j51dj90anpq8mmg649ps9g3gdhn24")))) + "1yjcrh5hw70c0yn8zw55pd6j51dj90anpq8mmg649ps9g3gdhn24")) + (patches (search-patches "coreutils-ls.patch")))) (build-system gnu-build-system) (inputs `(("acl" ,acl) ; TODO: add SELinux ("gmp" ,gmp) ;bignums in 'expr', yay! 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 +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 +(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 + #endif + +-#ifdef __linux__ +-# include +-#endif +- + #include + #include + #include +@@ -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 -- cgit v1.2.3 From edc8fd2e2d75ba7af9bf6403277ecb0dccd48dc3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 10 Mar 2020 20:54:52 +0100 Subject: gnu: Remove guile@2.2.6. * gnu/packages/patches/guile-finalization-crash.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/guile.scm (guile-2.2)[source](patches): Remove 'guile-finalization-crash.patch'. (guile-2.2.7): Remove variable. (guile-2.2/bug-fix): Point to GUILE-2.2. * gnu/packages/admin.scm (shepherd)[native-inputs, inputs]: Use GUILE-2.2 instead of GUILE-2.2.7. --- gnu/local.mk | 1 - gnu/packages/admin.scm | 4 +- gnu/packages/guile.scm | 21 ++------ .../patches/guile-finalization-crash.patch | 61 ---------------------- 4 files changed, 5 insertions(+), 82 deletions(-) delete mode 100644 gnu/packages/patches/guile-finalization-crash.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index cc219b42df..f2e323c345 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -992,7 +992,6 @@ dist_patch_DATA = \ %D%/packages/patches/guile-3.0-crash.patch \ %D%/packages/patches/guile-default-utf8.patch \ %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ - %D%/packages/patches/guile-finalization-crash.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ %D%/packages/patches/guile-present-coding.patch \ %D%/packages/patches/guile-relocatable.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index af29dc30fe..350cd541b7 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -211,10 +211,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-2.2))) (inputs ;; ... and this is the one that appears in shebangs when cross-compiling. - `(("guile" ,guile-2.2.7) ;for + `(("guile" ,guile-2.2) ;; The 'shepherd' command uses Readline when used interactively. It's ;; an unusual use case though, so we don't propagate it. diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 0ce5d71cfd..b97f149391 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -217,7 +217,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,10 +227,9 @@ without requiring the source code to be rewritten.") ".tar.xz")) (sha256 (base32 - "1269ymxm56j1z1lvq1y42rm961f2n7rinm3k6l00p9k52hrpcddk")) + "013mydzhfswqci6xmyc1ajzd59pfbdak15i0b090nhr9bzm7dxyd")) (modules '((guix build utils))) (patches (search-patches - "guile-finalization-crash.patch" "guile-2.2-skip-oom-test.patch")) ;; Remove the pre-built object files. Instead, build everything @@ -251,21 +250,7 @@ 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: . - (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 diff --git a/gnu/packages/patches/guile-finalization-crash.patch b/gnu/packages/patches/guile-finalization-crash.patch deleted file mode 100644 index 098249e49f..0000000000 --- a/gnu/packages/patches/guile-finalization-crash.patch +++ /dev/null @@ -1,61 +0,0 @@ -commit edf5aea7ac852db2356ef36cba4a119eb0c81ea9 -Author: Ludovic Courtès -Date: Mon Dec 9 14:44:59 2019 +0100 - - Fix non-deterministic crash in 'finalization_thread_proc'. - - Fixes . - Reported by Jesse Gibbons . - - * libguile/finalizers.c (finalization_thread_proc): Do not enter the - "switch (data.byte)" condition when data.n <= 0. - -diff --git a/libguile/finalizers.c b/libguile/finalizers.c -index c5d69e8e3..94a6e6b0a 100644 ---- a/libguile/finalizers.c -+++ b/libguile/finalizers.c -@@ -1,4 +1,4 @@ --/* Copyright (C) 2012, 2013, 2014 Free Software Foundation, Inc. -+/* Copyright (C) 2012, 2013, 2014, 2019 Free Software Foundation, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License -@@ -211,21 +211,26 @@ finalization_thread_proc (void *unused) - - scm_without_guile (read_finalization_pipe_data, &data); - -- if (data.n <= 0 && data.err != EINTR) -+ if (data.n <= 0) - { -- perror ("error in finalization thread"); -- return NULL; -+ if (data.err != EINTR) -+ { -+ perror ("error in finalization thread"); -+ return NULL; -+ } - } -- -- switch (data.byte) -+ else - { -- case 0: -- scm_run_finalizers (); -- break; -- case 1: -- return NULL; -- default: -- abort (); -+ switch (data.byte) -+ { -+ case 0: -+ scm_run_finalizers (); -+ break; -+ case 1: -+ return NULL; -+ default: -+ abort (); -+ } - } - } - } -- cgit v1.2.3 From 5afffbeffc931d00074e570f5ec89df8a1ebe568 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 13 Mar 2020 20:31:27 +0100 Subject: gnu: fifengine: Fix build with newer Swig and Python. * gnu/packages/patches/fifengine-swig-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/games.scm (fifengine)[source](patches): New field. [arguments]: Remove hard coded Python version from #:configure-flags. --- gnu/local.mk | 1 + gnu/packages/games.scm | 5 ++++- gnu/packages/patches/fifengine-swig-compat.patch | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/fifengine-swig-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f2e323c345..47279ffa08 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -868,6 +868,7 @@ dist_patch_DATA = \ %D%/packages/patches/fasthenry-spSolve.patch \ %D%/packages/patches/fasthenry-spFactor.patch \ %D%/packages/patches/fbreader-curl-7.62.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/findutils-localstatedir.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index e7764cc9ec..43199d2850 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2280,6 +2280,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")))) @@ -2296,7 +2297,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 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}) -- cgit v1.2.3 From 3fd74c45064eba882771b0398b4c3b29b030a44a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 14 Mar 2020 01:20:14 +0100 Subject: gnu: jbig2dec: Update to 0.18. * gnu/packages/patches/jbig2dec-ignore-testtest.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/image.scm (jbig2dec): Update to 0.18. [source](uri): Adjust for Ghostscript 9.51. [source](patches): Remove. [arguments]: Add #:phases. [native-inputs]: Add AUTOCONF, AUTOMAKE, LIBTOOL and PYTHON-WRAPPER. --- gnu/local.mk | 1 - gnu/packages/image.scm | 25 +++++++++++++++++----- .../patches/jbig2dec-ignore-testtest.patch | 16 -------------- 3 files changed, 20 insertions(+), 22 deletions(-) delete mode 100644 gnu/packages/patches/jbig2dec-ignore-testtest.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 47279ffa08..d5271067d6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1053,7 +1053,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 \ diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 36f650f23a..3850e7fb77 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -635,18 +635,33 @@ arithmetic ops.") (define-public jbig2dec (package (name "jbig2dec") - (version "0.17") + (version "0.18") (source (origin (method url-fetch) (uri (string-append "https://github.com/ArtifexSoftware" "/ghostpdl-downloads/releases/download" - "/gs950/" name "-" version ".tar.gz")) + "/gs951/" name "-" version ".tar.gz")) (sha256 (base32 - "0wpvslmwazia3z8gyk343kbq6yj47pxr4x5yjvx332v309qssazp")) - (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 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 -- cgit v1.2.3 From af2f11ff00af569f76550b290037818e98e28b29 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 14 Mar 2020 01:21:28 +0100 Subject: gnu: ghostscript: Update to 9.51. * gnu/packages/patches/ghostscript-CVE-2019-14869.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/patches/ghostscript-no-header-uuid.patch: Adjust for 9.51. * gnu/packages/ghostscript.scm (ghostscript): Update to 9.51. [source](patches): Remove obsolete patch. [arguments]: Remove obsolete substitution. When cross-compiling, add two workaround phases. --- gnu/local.mk | 1 - gnu/packages/ghostscript.scm | 39 +++++++++++++----- .../patches/ghostscript-CVE-2019-14869.patch | 48 ---------------------- .../patches/ghostscript-no-header-uuid.patch | 12 +++--- 4 files changed, 34 insertions(+), 66 deletions(-) delete mode 100644 gnu/packages/patches/ghostscript-CVE-2019-14869.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d5271067d6..ebb6b859b3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -930,7 +930,6 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-monad-par-fix-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-html-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-latex-test.patch \ - %D%/packages/patches/ghostscript-CVE-2019-14869.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 3cd1e4af8d..ae689925e1 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2017, 2018, 2019 Efraim Flashner ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2018 Tobias Geerinckx-Rice -;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2018, 2020 Marius Bakke ;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. @@ -159,7 +159,7 @@ printing, and psresize, for adjusting page sizes.") (define-public ghostscript (package (name "ghostscript") - (version "9.50") + (version "9.51") (source (origin (method url-fetch) @@ -169,9 +169,8 @@ printing, and psresize, for adjusting page sizes.") "/ghostscript-" version ".tar.xz")) (sha256 (base32 - "1m770dwc82afdgzgq2kar3120r1lbybm3mssdm79f8kggf0v16yv")) - (patches (search-patches "ghostscript-CVE-2019-14869.patch" - "ghostscript-no-header-creationdate.patch" + "0wdpcq9lq19v8an8xs28cgg7vfzb23f1j12m9p2wdnwa1vwk64by")) + (patches (search-patches "ghostscript-no-header-creationdate.patch" "ghostscript-no-header-id.patch" "ghostscript-no-header-uuid.patch")) (modules '((guix build utils))) @@ -234,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 _ @@ -245,7 +240,31 @@ printing, and psresize, for adjusting page sizes.") (("/bin/sh") (which "sh"))) #t)) ,@(if (%current-target-system) - `((add-after 'configure 'add-native-lz + `((add-after 'unpack 'define-ARCH_MAX_SIZE_T + (lambda _ + ;; XXX: arch_autoconf.h is missing the recent addition of + ;; ARCH_MAX_SIZE_T. Just add it here based on the definition + ;; in "base/genarch.c". This can likely be removed for + ;; Ghostscript > 9.51. + (substitute* "arch/arch_autoconf.h.in" + (("#define ARCH_MAX_ULONG.*" all) + (string-append all "\n" + "#define ARCH_MAX_SIZE_T " + "((size_t)~0L + (size_t)0)\n"))) + #t)) + (add-before 'configure 'do-not-fail-without-native-freetype + (lambda _ + ;; The configure script recurses to build the native tools. + ;; They are built with --disable-freetype, which was made a + ;; hard error in 9.51, causing a build failure because a + ;; native freetype is not detected. Just ignore the check + ;; because it's not needed for these auxiliary tools. + (substitute* "configure" + (("as_fn_error \\$\\? \"(No usable Freetype.*found)\".*" all msg) + (string-append "$as_echo \"$as_me:${as_lineno-$LINENO}: " + "WARNING: " msg "\"\n"))) + #t)) + (add-after 'configure 'add-native-lz (lambda _ ;; Add missing '-lz' for native tools such as 'mkromfs'. (substitute* "Makefile" diff --git a/gnu/packages/patches/ghostscript-CVE-2019-14869.patch b/gnu/packages/patches/ghostscript-CVE-2019-14869.patch deleted file mode 100644 index d80fba0594..0000000000 --- a/gnu/packages/patches/ghostscript-CVE-2019-14869.patch +++ /dev/null @@ -1,48 +0,0 @@ -Fix CVE-2019-14869: - -https://nvd.nist.gov/vuln/detail/CVE-2019-14869 - -Patch taken from upstream: - -https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=485904772c5f0aa1140032746e5a0abfc40f4cef - -diff --git a/Resource/Init/gs_ttf.ps b/Resource/Init/gs_ttf.ps -index 74043d1..6be8fe9 100644 ---- a/Resource/Init/gs_ttf.ps -+++ b/Resource/Init/gs_ttf.ps -@@ -1304,7 +1304,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef - TTFDEBUG { (\n1 setting alias: ) print dup ==only - ( to be the same as ) print 2 index //== exec } if - -- 7 index 2 index 3 -1 roll exch .forceput -+ 7 index 2 index 3 -1 roll exch put - } forall - pop pop pop - } -@@ -1322,7 +1322,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef - exch pop - TTFDEBUG { (\n2 setting alias: ) print 1 index ==only - ( to use glyph index: ) print dup //== exec } if -- 5 index 3 1 roll .forceput -+ 5 index 3 1 roll put - //false - } - { -@@ -1339,7 +1339,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef - { % CharStrings(dict) isunicode(boolean) cmap(dict) RAGL(dict) gname(name) codep(integer) gindex(integer) - TTFDEBUG { (\3 nsetting alias: ) print 1 index ==only - ( to be index: ) print dup //== exec } if -- exch pop 5 index 3 1 roll .forceput -+ exch pop 5 index 3 1 roll put - } - { - pop pop -@@ -1369,7 +1369,7 @@ currentdict /.pickcmap_with_no_xlatmap .undef - } ifelse - ] - TTFDEBUG { (Encoding: ) print dup === flush } if --} .bind executeonly odef % hides .forceput -+} .bind odef - - % ---------------- CIDFontType 2 font loading ---------------- % - 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=\"\""); -- cgit v1.2.3 From e59d958a9c9a509ce34ca553a5b1b03e406d561f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 14 Mar 2020 12:00:56 +0100 Subject: gnu: mit-krb5: Fix segfault in gsasl test suite. * gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/kerberos.scm (mit-krb5)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/kerberos.scm | 1 + .../patches/mit-krb5-qualify-short-hostnames.patch | 29 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ebb6b859b3..2ccffb333a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1187,6 +1187,7 @@ dist_patch_DATA = \ %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ %D%/packages/patches/minisat-friend-declaration.patch \ %D%/packages/patches/minisat-install.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 \ diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm index af3a0d18b2..0e290c0d46 100644 --- a/gnu/packages/kerberos.scm +++ b/gnu/packages/kerberos.scm @@ -60,6 +60,7 @@ (string-append "https://kerberos.org/dist/krb5/" (version-major+minor version) "/krb5-" version ".tar.gz"))) + (patches (search-patches "mit-krb5-qualify-short-hostnames.patch")) (sha256 (base32 "121c5xsy3x0i4wdkrpw62yhvji6virbh6n30ypazkp0isws3k4bk")))) 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 -- cgit v1.2.3 From 850093ac24f92ae805a2ee90681d1e4cb01ff8eb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 17 Mar 2020 11:21:37 +0100 Subject: gnu: avahi: Update to 0.8. * gnu/packages/patches/avahi-CVE-2018-1000845.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/avahi.scm (avahi): Update to 0.8. [source](patches): Remove obsolete patch. [properties]: Remove. [arguments]: Remove "--disable-qt3" from #:configure-flags. Add "--disable-qt5". [inputs]: Add LIBEVENT. Sort lexicographically. [native-inputs]: Remove INTLTOOL. Add GETTEXT-MINIMAL. --- gnu/local.mk | 1 - gnu/packages/avahi.scm | 36 ++++++++++++------- gnu/packages/patches/avahi-CVE-2018-1000845.patch | 42 ----------------------- 3 files changed, 23 insertions(+), 56 deletions(-) delete mode 100644 gnu/packages/patches/avahi-CVE-2018-1000845.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 21a149c469..1d3d6ff4e7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -743,7 +743,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 \ diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm index 4675f3b011..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 ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2020 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,16 +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") + (version "0.8") (home-page "https://avahi.org") (source (origin (method url-fetch) @@ -42,11 +45,17 @@ version ".tar.gz")) (sha256 (base32 - "0128n7jlshw4bpx0vg8lwj8qwdisjxi7mvniwfafgnkzzrfrpaap")) - (patches (search-patches "avahi-localstatedir.patch" - "avahi-CVE-2018-1000845.patch")))) - ;; Hide a duplicate of the CVE fixed above. - (properties `((lint-hidden-cve . ("CVE-2017-6519")))) + "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" @@ -57,18 +66,19 @@ "--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") 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 -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); - -- cgit v1.2.3 From dd4e4b037665f762e9d066af00f2e57a92c2e3bf Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 18 Mar 2020 19:45:16 +0100 Subject: gnu: GCC@9: Remove obsolete patch. This patch became obsolete when the update to 9.3.0 was merged (commit 3dade1d59e7b4caa641670a76c0c48b4c90f6b3c). * gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gcc.scm (gcc-9)[source](patches): Remove it. --- gnu/local.mk | 1 - gnu/packages/gcc.scm | 1 - .../patches/gcc-9-libsanitizer-mode-size.patch | 58 ---------------------- 3 files changed, 60 deletions(-) delete mode 100644 gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 25f017bc57..f8414ec69f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -898,7 +898,6 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-6-libsanitizer-mode-size.patch \ %D%/packages/patches/gcc-7-libsanitizer-mode-size.patch \ %D%/packages/patches/gcc-8-libsanitizer-mode-size.patch \ - %D%/packages/patches/gcc-9-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 \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 09367d8184..f465470d49 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -560,7 +560,6 @@ It also includes runtime support libraries for these languages."))) (base32 "1la2yy27ziasyf0jvzk58y1i5b5bq2h176qil550bxhifs39gqbi")) (patches (search-patches "gcc-9-strmov-store-file-names.patch" - "gcc-9-libsanitizer-mode-size.patch" "gcc-9-asan-fix-limits-include.patch" "gcc-5.0-libvtv-runpath.patch")))))) diff --git a/gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch deleted file mode 100644 index 9e99a3d198..0000000000 --- a/gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch +++ /dev/null @@ -1,58 +0,0 @@ -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 - -This is a combination of these upstream revisions: - -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 6cd4a5bac8b..d823a12190c 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -@@ -1156,8 +1156,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 73af92af1e8..6a673a7c995 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -211,26 +211,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; --#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) -- unsigned int mode; -- unsigned short __seq; -- unsigned short __pad1; -- unsigned long __unused1; -- unsigned long __unused2; - #else -- unsigned short mode; -- unsigned short __pad1; -+ unsigned int mode; - unsigned short __seq; - unsigned short __pad2; - #if defined(__x86_64__) && !defined(_LP64) -- cgit v1.2.3 From 53de3e74fac862bc07de160e8e226372de213dd1 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 14 Mar 2020 11:39:52 +0100 Subject: gnu: cross-gcc: Add a "lib" output. Add a "lib" output to cross-gcc. This requires an upstream GCC patch adding support for --with-toolexeclibdir configure option. This option allows to install cross-built GCC libraries in a specific location. This also fixes the computation of TOOLDIR_BASE_PREFIX, that fails when /gnu/store/... directories are involved. * gnu/packages/patches/gcc-7-cross-toolexeclibdir.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/cross-base.scm (cross-gcc)[source]: Apply it, [outputs]: add a "lib" output, (cross-gcc-snippet): fix TOOLDIR_BASE_PREFIX. --- gnu/local.mk | 3 +- gnu/packages/cross-base.scm | 63 +- .../patches/gcc-7-cross-toolexeclibdir.patch | 1041 ++++++++++++++++++++ 3 files changed, 1084 insertions(+), 23 deletions(-) create mode 100644 gnu/packages/patches/gcc-7-cross-toolexeclibdir.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9db4019d2b..38dec7f081 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -14,7 +14,7 @@ # Copyright © 2016, 2017, 2018, 2019 Jan (janneke) Nieuwenhuizen # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2017, 2018 Clément Lassieur -# Copyright © 2017 Mathieu Othacehe +# Copyright © 2017, 2020 Mathieu Othacehe # Copyright © 2017, 2018, 2019 Gábor Boskovits # Copyright © 2018 Amirouche Boubekki # Copyright © 2018, 2019, 2020 Oleg Pykhalov @@ -918,6 +918,7 @@ 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 \ diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 667d1f786a..6f72653762 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2020 Marius Bakke ;;; Copyright © 2019 Carl Dong +;;; Copyright © 2020 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -162,6 +163,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") @@ -196,12 +204,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 @@ -216,22 +231,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 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 +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 + 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 + 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 + -- cgit v1.2.3 From c75db693713e74a632bafe849de68a87ee7e34eb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 24 Mar 2020 17:58:20 +0100 Subject: gnu: ghc: Really disable test that fails with glibc 2.30 and later. This follows up commit 2e9c43aa9adac2bd6bcf92373d1cf9f322afa5a3, which was incomplete. Fixes . * gnu/packages/patches/ghc-testsuite-dlopen-pie.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. Also use tabs instead of spaces on surrounding patches. * gnu/packages/haskell.scm (ghc-8.6)[native-inputs]: Add patch for "ghc-testsuite". [arguments]: Remove incomplete workaround for the same issue. --- gnu/local.mk | 5 +- gnu/packages/haskell.scm | 9 +--- .../patches/ghc-testsuite-dlopen-pie.patch | 54 ++++++++++++++++++++++ 3 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/ghc-testsuite-dlopen-pie.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 38dec7f081..f335ee1d25 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -930,9 +930,10 @@ dist_patch_DATA = \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-freetype-test-failure.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-8.0-fall-back-to-madv_dontneed.patch \ + %D%/packages/patches/ghc-testsuite-dlopen-pie.patch \ %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.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 \ diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 8a332636ba..a11b6995ce 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -19,7 +19,7 @@ ;;; Copyright © 2018, 2019 Gabriel Hondet ;;; Copyright © 2019 Robert Vollmert ;;; Copyright © 2019 Jacob MacDonald -;;; Copyright © Marius Bakke +;;; Copyright © 2020 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -568,6 +568,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")))) @@ -591,12 +592,6 @@ interactive environment for the functional language Haskell.") (("^test\\('T8108'") "# guix skipped: test('T8108'")) (substitute* "libraries/unix/tests/libposix/all.T" (("^test\\('posix010'") "# guix skipped: test('posix010'")) - ;; This test attempts to dlopen() a position-independent - ;; executable(!), which is disallowed since glibc 2.30. See - ;; https://sourceware.org/bugzilla/show_bug.cgi?id=24323 - (substitute* "testsuite/tests/dynlibs/Makefile" - (("\\./T13702a") - "# ./T13702a")) #t)))))) (native-search-paths (list (search-path-specification (variable "GHC_PACKAGE_PATH") 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 () -- cgit v1.2.3 From f4e183320515e00a68912d98e1f8367c72886527 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 24 Mar 2020 17:59:18 +0100 Subject: gnu: ghc@8.0: Remove obsolete patch. * gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/haskell.scm (ghc-8.0)[source](patches): Remove it. --- gnu/local.mk | 1 - gnu/packages/haskell.scm | 4 +--- ...dont-pass-linker-flags-via-response-files.patch | 27 ---------------------- 3 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f335ee1d25..6ed9789481 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -932,7 +932,6 @@ dist_patch_DATA = \ %D%/packages/patches/geoclue-config.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-dont-pass-linker-flags-via-response-files.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 \ diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index a11b6995ce..739b86a100 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -320,9 +320,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")) 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 -- cgit v1.2.3 From 654de94e74547f61a0996cae70ddba2826bfd8d4 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 11 Mar 2020 00:33:24 +0100 Subject: gnu: grub: Support for the Hurd. * gnu/packages/virtualization.scm (qemu)[supported-systems]: Remove the Hurd. * gnu/packages/linux.scm (mdadm)[supported-systems]: Likewise. (lvm2)[supported-systems]: Likewise. (fuse)[supported-systems]: Likewise. * gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch: New file * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/bootloaders.scm (grub): Use it. [inputs, native-inputs]: Remove non-supported dependencies on non-supported systems. Fixes build for the Hurd. --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 26 +++++++++++--- gnu/packages/linux.scm | 3 ++ .../grub-verifiers-Blocklist-fallout-cleanup.patch | 41 ++++++++++++++++++++++ gnu/packages/virtualization.scm | 3 +- 5 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 6ed9789481..adeaa6deaa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -994,6 +994,7 @@ dist_patch_DATA = \ %D%/packages/patches/grep-timing-sensitive-test.patch \ %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \ %D%/packages/patches/grub-efi-fat-serial-number.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 \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 44808e1225..afbd1909bf 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -91,7 +91,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 @@ -152,11 +154,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. @@ -164,7 +174,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) @@ -196,7 +210,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") diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 69c2818355..b73b86b0e8 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2401,6 +2401,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 @@ -3009,6 +3010,7 @@ time.") ;; 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 @@ -3920,6 +3922,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 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 +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 +Reviewed-by: Daniel Kiper + +--- + 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/virtualization.scm b/gnu/packages/virtualization.scm index c04ff8810e..9fcea5f7ea 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -285,7 +285,8 @@ server and embedded PowerPC, and S390 guests.") (license license:gpl2) ;; Several tests fail on MIPS; see . - (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. -- cgit v1.2.3 From 974c42a70a12f0c4ed298c2c8dab3f154338de58 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 1 Mar 2020 16:37:37 +0100 Subject: gnu: glibc: Add clock patches for the Hurd. * gnu/packages/patches/glibc-hurd-clock_t_centiseconds.patch: New file. * gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch: New file. * gnu/local.mk (dist_patch_DATA): Update them. * gnu/packages/base.scm (glibc): Use them. --- gnu/local.mk | 4 +- gnu/packages/base.scm | 4 +- .../glibc-hurd-clock_gettime_monotonic.patch | 84 ++++++++++++++++++++ .../patches/glibc-hurd-clock_t_centiseconds.patch | 90 ++++++++++++++++++++++ 4 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch create mode 100644 gnu/packages/patches/glibc-hurd-clock_t_centiseconds.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index adeaa6deaa..f7b0a2577d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -11,7 +11,7 @@ # Copyright © 2016 Ben Woodcroft # Copyright © 2016, 2017, 2018, 2019 Alex Vong # Copyright © 2016, 2017, 2018, 2019 Efraim Flashner -# Copyright © 2016, 2017, 2018, 2019 Jan (janneke) Nieuwenhuizen +# Copyright © 2016, 2017, 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2017, 2018 Clément Lassieur # Copyright © 2017, 2020 Mathieu Othacehe @@ -962,6 +962,8 @@ dist_patch_DATA = \ %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-magic-pid.patch \ %D%/packages/patches/glibc-ldd-x86_64.patch \ %D%/packages/patches/glibc-locales.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index c3298b3cec..1b7a834ac8 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -612,7 +612,9 @@ the store.") "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")))) (build-system gnu-build-system) ;; Glibc's refers to , for instance, so glibc 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 +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 + 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 +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 + +-/* 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 + -- cgit v1.2.3 From 096a8e35e746d623810e214e3e4a1008b99598fe Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 8 Mar 2020 14:01:17 +0100 Subject: gnu: glibc: Add signal SA_SIGINFO support for the Hurd. * gnu/packages/patches/glibc-hurd-signal-sa-siginfo.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/base.scm (glibc): Use it. --- gnu/local.mk | 1 + gnu/packages/base.scm | 3 +- .../patches/glibc-hurd-signal-sa-siginfo.patch | 637 +++++++++++++++++++++ 3 files changed, 640 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/glibc-hurd-signal-sa-siginfo.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f7b0a2577d..f0f47aa691 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -965,6 +965,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch \ %D%/packages/patches/glibc-hurd-clock_t_centiseconds.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 \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 1b7a834ac8..5c976aee52 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -614,7 +614,8 @@ the store.") "glibc-reinstate-prlimit64-fallback.patch" "glibc-supported-locales.patch" "glibc-hurd-clock_t_centiseconds.patch" - "glibc-hurd-clock_gettime_monotonic.patch")))) + "glibc-hurd-clock_gettime_monotonic.patch" + "glibc-hurd-signal-sa-siginfo.patch")))) (build-system gnu-build-system) ;; Glibc's refers to , for instance, so glibc 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 +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 +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 directly; use 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 + #include + #include ++#include + #include + #include + #include + #include "hurdfault.h" + #include ++#include + + ++/* 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 -- cgit v1.2.3 From eef44fea17a735d2f4048a747d16af478d4b9dbc Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 12 Mar 2020 10:54:35 +0100 Subject: Revert "gnu: guile-static-stripped: Update to 2.2." As discussed on IRC, keeping bootstrap Guile on 2.0 simplifies adding new architectures and removes the need for parameterizing gnu/packages/bootstrap.scm. This reverts commit 2acfe022a740f79b593348cc6362cc4ee8f33bb4. * gnu/packages/make-bootstrap.scm (%guile-static): Revert to guile-2.0. Retain build recipe. * gnu/packages/patches/guile-relocatable.patch: Update for Guile 2.0.14. --- gnu/local.mk | 1 - gnu/packages/make-bootstrap.scm | 30 ++++----- gnu/packages/patches/guile-2.2-default-utf8.patch | 82 ----------------------- gnu/packages/patches/guile-relocatable.patch | 36 +++++++--- 4 files changed, 40 insertions(+), 109 deletions(-) delete mode 100644 gnu/packages/patches/guile-2.2-default-utf8.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f0f47aa691..aed50d4d1a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1000,7 +1000,6 @@ dist_patch_DATA = \ %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-3.0-crash.patch \ %D%/packages/patches/guile-default-utf8.patch \ diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 335d5c811d..709fb39e43 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -679,18 +679,18 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ;; .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-default-utf8.patch") (search-patch "guile-linux-syscalls.patch") - (origin-patches (package-source guile-2.2)))) - (source (origin (inherit (package-source guile-2.2)) + (origin-patches (package-source guile-2.0)))) + (source (origin (inherit (package-source guile-2.0)) (patches patches))) - (guile (package (inherit guile-2.2) - (name (string-append (package-name guile-2.2) "-static")) + (guile (package (inherit guile-2.0) + (name (string-append (package-name guile-2.0) "-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))) + (outputs (delete "debug" (package-outputs guile-2.0))) (inputs `(("libunistring:static" ,libunistring "static") @@ -699,9 +699,9 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (propagated-inputs `(("bdw-gc" ,libgc) ,@(alist-delete "bdw-gc" - (package-propagated-inputs guile-2.2)))) + (package-propagated-inputs guile-2.0)))) (arguments - (substitute-keyword-arguments (package-arguments guile-2.2) + (substitute-keyword-arguments (package-arguments guile-2.0) ((#:configure-flags flags '()) ;; When `configure' checks for ltdl availability, it ;; doesn't try to link using libtool, and thus fails @@ -724,7 +724,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (("^guile_LDFLAGS =") "guile_LDFLAGS = -all-static") - ;; Add `-ldl' *after* libguile-2.2.la. + ;; Add `-ldl' *after* libguile-2.0.la. (("^guile_LDADD =(.*)$" _ ldadd) (string-append "guile_LDADD = " (string-trim-right ldadd) @@ -756,13 +756,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (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/2.0")) + (copy-recursively (string-append in "/share/guile/2.0") + (string-append out "/share/guile/2.0")) - (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/2.0/ccache")) + (copy-recursively (string-append in "/lib/guile/2.0/ccache") + (string-append out "/lib/guile/2.0/ccache")) (mkdir (string-append out "/bin")) (copy-file guile1 guile2) diff --git a/gnu/packages/patches/guile-2.2-default-utf8.patch b/gnu/packages/patches/guile-2.2-default-utf8.patch deleted file mode 100644 index f55a6430c1..0000000000 --- a/gnu/packages/patches/guile-2.2-default-utf8.patch +++ /dev/null @@ -1,82 +0,0 @@ -This hack makes Guile default to UTF-8. This avoids calls to -`iconv_open'; `iconv_open' tries to open shared objects that aren't -available during bootstrap, so using UTF-8 avoids that (and UTF-8 has -built-in conversions in glibc, too.) - -diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c -index 0ac5ea6a6..f73301e2f 100644 ---- a/libguile/bytevectors.c -+++ b/libguile/bytevectors.c -@@ -1931,7 +1931,7 @@ utf_encoding_name (char *name, size_t utf_width, SCM endianness) - if (scm_i_is_narrow_string (str)) \ - { \ - err = mem_iconveh (scm_i_string_chars (str), c_strlen, \ -- "ISO-8859-1", c_utf_name, \ -+ "UTF-8", c_utf_name, \ - iconveh_question_mark, NULL, \ - &c_utf, &c_utf_len); \ - if (SCM_UNLIKELY (err)) \ -diff --git a/libguile/ports.c b/libguile/ports.c -index 45e62f4e4..42012f3aa 100644 ---- a/libguile/ports.c -+++ b/libguile/ports.c -@@ -974,7 +974,9 @@ canonicalize_encoding (const char *enc) - char *ret; - int i; - -- if (!enc || encoding_matches (enc, sym_ISO_8859_1)) -+ if (enc == NULL) -+ return sym_UTF_8; -+ if (encoding_matches (enc, sym_ISO_8859_1)) - return sym_ISO_8859_1; - if (encoding_matches (enc, sym_UTF_8)) - return sym_UTF_8; -@@ -4198,7 +4200,7 @@ scm_init_ports (void) - scm_c_define ("%default-port-conversion-strategy", - scm_make_fluid_with_default (sym_substitute)); - /* Use the locale as the default port encoding. */ -- scm_i_set_default_port_encoding (locale_charset ()); -+ scm_i_set_default_port_encoding ("UTF-8"); - - scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION, - "scm_init_ice_9_ports", -diff --git a/libguile/strings.c b/libguile/strings.c -index 056b4c99f..63a6c050d 100644 ---- a/libguile/strings.c -+++ b/libguile/strings.c -@@ -1579,7 +1579,7 @@ scm_i_default_string_failed_conversion_handler (void) - SCM - scm_from_locale_stringn (const char *str, size_t len) - { -- return scm_from_stringn (str, len, locale_charset (), -+ return scm_from_stringn (str, len, "UTF-8", - scm_i_default_string_failed_conversion_handler ()); - } - -@@ -1907,7 +1907,7 @@ char * - scm_to_locale_stringn (SCM str, size_t *lenp) - { - return scm_to_stringn (str, lenp, -- locale_charset (), -+ "UTF-8", - scm_i_default_string_failed_conversion_handler ()); - } - -@@ -2195,7 +2195,7 @@ scm_to_stringn (SCM str, size_t *lenp, const char *encoding, - scm_wrong_type_arg_msg (NULL, 0, str, "string"); - - if (encoding == NULL) -- encoding = "ISO-8859-1"; -+ encoding = "UTF-8"; - - if (c_strcasecmp (encoding, "UTF-8") == 0) - /* This is the most common case--e.g., when calling libc bindings -@@ -2247,7 +2247,7 @@ scm_to_stringn (SCM str, size_t *lenp, const char *encoding, - if (scm_i_is_narrow_string (str)) - { - ret = mem_iconveh (scm_i_string_chars (str), ilen, -- "ISO-8859-1", encoding, -+ "UTF-8", encoding, - (enum iconv_ilseq_handler) handler, NULL, - &buf, &len); - 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 +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 + -- cgit v1.2.3 From 25bc0f34c6c059394f546f29a203c2cb9b7cdcf6 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 12 Mar 2020 10:58:44 +0100 Subject: gnu: bootstrap: gcc-static: Use gcc-5. * gnu/packages/make-bootstrap.scm (gcc-static): Use gcc-5. This fixes building libstdc++-boot0 with a newly built %bootstrap-gcc. (%gcc-stripped): Likewise. (gcc-for-bootstrap): Likewise. * gnu/packages/patches/gcc-5-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gcc.scm (gcc-5): Use it. --- gnu/local.mk | 1 + gnu/packages/gcc.scm | 3 +- gnu/packages/make-bootstrap.scm | 20 +++++------ gnu/packages/patches/gcc-5-hurd.patch | 63 +++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/gcc-5-hurd.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index aed50d4d1a..1b268fd1c7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -909,6 +909,7 @@ dist_patch_DATA = \ %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 \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 5c5c51a0ad..6221a123d8 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -471,7 +471,8 @@ Go. It also includes runtime support libraries for these languages.") "gcc-5-source-date-epoch-1.patch" "gcc-5-source-date-epoch-2.patch" "gcc-6-libsanitizer-mode-size.patch" - "gcc-fix-texi2pod.patch")) + "gcc-fix-texi2pod.patch" + "gcc-5-hurd.patch")) (modules '((guix build utils))) (snippet ;; Fix 'libcc1/configure' error when cross-compiling GCC. diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 709fb39e43..f8d782f5ab 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -93,13 +93,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 (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)))))) + ,@(package-inputs gcc-5)))))) (define (package-with-relocatable-glibc p) "Return a variant of P that uses the libc as defined by @@ -138,7 +138,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)) @@ -459,7 +459,7 @@ 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 @@ -468,7 +468,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (srfi srfi-1) (srfi srfi-26) (ice-9 regex)) - ,@(substitute-keyword-arguments (package-arguments gcc) + ,@(substitute-keyword-arguments (package-arguments gcc-5) ((#:guile _) #f) ((#:implicit-inputs? _) #t) ((#:configure-flags flags) @@ -513,8 +513,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." #t))))))) (inputs `(("zlib:static" ,zlib "static") - ("isl:static" ,isl "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 @@ -527,12 +527,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) 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 +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) -- cgit v1.2.3 From 496d607db3cf1e438ffd1526c4153be551bbef50 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 8 Mar 2020 14:07:51 -0400 Subject: gnu: hurd: Update to hurd-headers version: 0.9-91a51672. * gnu/packages/patches/hurd-cross.patch: New file. * gnu/packages/patches/hurd-fix-eth-multiplexer-dependency.patch: Remove unused file. * gnu/local.mk (dist_patch_DATA): Update admin. * gnu/packages/hurd.scm (hurd): Update to latest git master: version and source from hurd-headers; Add hurd-cross patch. --- gnu/local.mk | 2 +- gnu/packages/hurd.scm | 18 ++++++------ gnu/packages/patches/hurd-cross.patch | 33 ++++++++++++++++++++++ .../hurd-fix-eth-multiplexer-dependency.patch | 26 ----------------- 4 files changed, 42 insertions(+), 37 deletions(-) create mode 100644 gnu/packages/patches/hurd-cross.patch delete mode 100644 gnu/packages/patches/hurd-fix-eth-multiplexer-dependency.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1b268fd1c7..f80f577f00 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1038,7 +1038,7 @@ dist_patch_DATA = \ %D%/packages/patches/hdf-eos5-fortrantests.patch \ %D%/packages/patches/higan-remove-march-native-flag.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 \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 59d5c31e33..b2a53b5f41 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -282,14 +282,9 @@ Hurd-minimal package which are needed for both glibc and GCC.") (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 @@ -308,8 +303,11 @@ Hurd-minimal package which are needed for both glibc and GCC.") (build-system gnu-build-system) (inputs `(("glibc-hurd-headers" ,glibc/hurd-headers))) (native-inputs - `(("mig" ,mig) - ("perl" ,perl))) + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("mig" ,mig) + ("perl" ,perl) + ("texinfo" ,texinfo-4))) (supported-systems %hurd-systems) (home-page "https://www.gnu.org/software/hurd/hurd.html") (synopsis "The kernel servers for the GNU operating system") 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 +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= next to -L. +--- + 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 -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 - -- cgit v1.2.3 From 7baa8c78983424497f5db522243e9e396c99eb12 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 7 Mar 2020 14:55:35 +0100 Subject: gnu: less: Build fix for the Hurd. * gnu/packages/patches/less-hurd-path-max.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/less.scm (less): Use it. --- gnu/local.mk | 1 + gnu/packages/less.scm | 3 +++ gnu/packages/patches/less-hurd-path-max.patch | 36 +++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 gnu/packages/patches/less-hurd-path-max.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f80f577f00..5f5b449ab2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1110,6 +1110,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 \ diff --git a/gnu/packages/less.scm b/gnu/packages/less.scm index 91c269a67e..d01a423d28 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 ;;; Copyright © 2019 Tobias Geerinckx-Rice +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +20,7 @@ (define-module (gnu packages less) #:use-module (guix licenses) + #:use-module (gnu packages) #:use-module (gnu packages ncurses) #:use-module (guix packages) #:use-module (guix download) @@ -35,6 +37,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/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 +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 + -- cgit v1.2.3 From 9dd9e8fabfd0b3f3d11e8e26a7aa13d1b0ceea49 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 8 Mar 2020 20:07:24 -0400 Subject: gnu: fontconfig: Build fix for the Hurd. * gnu/packages/patches/fontconfig-hurd-path-max.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/fontutils.scm (fontconfig): Use it. --- gnu/local.mk | 1 + gnu/packages/fontutils.scm | 1 + gnu/packages/patches/fontconfig-hurd-path-max.patch | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 gnu/packages/patches/fontconfig-hurd-path-max.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 5f5b449ab2..2ab58b9cf9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -886,6 +886,7 @@ dist_patch_DATA = \ %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/fontconfig-hurd-path-max.patch \ %D%/packages/patches/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ %D%/packages/patches/gawk-shell.patch \ diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 6784dc7cf6..ba0d075900 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -296,6 +296,7 @@ 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) 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) -- cgit v1.2.3 From 22ee7209797c023b95e22ced156df62cbff90184 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 7 Mar 2020 04:05:02 -0500 Subject: gnu: pciutils: Build fixes for the Hurd. * gnu/packages/linux.scm (kmod)[supported-systems]: Remove the Hurd. * gnu/packages/patches/pciutils-hurd-configure.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/pciutils.scm (pciutils): Use it. [inputs]: Include kmod only for supported systems. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 1 + gnu/packages/patches/pciutils-hurd-configure.patch | 35 ++++++++++++++++++++++ gnu/packages/pciutils.scm | 10 ++++++- 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/pciutils-hurd-configure.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2ab58b9cf9..b25d369e07 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1281,6 +1281,7 @@ dist_patch_DATA = \ %D%/packages/patches/p7zip-remove-unused-code.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 \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index b73b86b0e8..3abfc469ba 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2784,6 +2784,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 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 +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/pciutils.scm b/gnu/packages/pciutils.scm index 0a55299c93..c992988437 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Mathieu Othacehe +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,8 +26,10 @@ #: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)) @@ -39,6 +42,7 @@ (uri (string-append "mirror://kernel.org/software/utils/pciutils/pciutils-" version ".tar.xz")) + (patches (search-patches "pciutils-hurd-configure.patch")) (sha256 (base32 "0mb0f2phdcmp4kfiqsszn2k6nlln0w160ffzrjjv4bbfjwrgfzzn")))) @@ -100,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") -- cgit v1.2.3 From c0a5cd1be3fce740c634596959321a76f22623a9 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 7 Mar 2020 16:11:48 +0100 Subject: gnu: shepherd: Build fix for the Hurd. * gnu/packages/patches/shepherd-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (shepherd): Use it. --- gnu/local.mk | 1 + gnu/packages/admin.scm | 2 ++ gnu/packages/patches/shepherd-hurd.patch | 44 ++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 gnu/packages/patches/shepherd-hurd.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b25d369e07..0ff248fe70 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1428,6 +1428,7 @@ dist_patch_DATA = \ %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/shepherd-hurd.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ %D%/packages/patches/slim-session.patch \ %D%/packages/patches/slim-config.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index a296d6cacf..4958d67b06 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -74,6 +74,7 @@ #:use-module (gnu packages file) #:use-module (gnu packages ncurses) #:use-module (gnu packages readline) + #:use-module (gnu packages hurd) #:use-module (gnu packages libbsd) #:use-module (gnu packages linux) #:use-module (gnu packages lua) @@ -202,6 +203,7 @@ and provides a \"top-like\" mode (monitoring).") (method url-fetch) (uri (string-append "mirror://gnu/shepherd/shepherd-" version ".tar.gz")) + (patches (search-patches "shepherd-hurd.patch")) (sha256 (base32 "07j3vd0y8zab2nwbrwj0ahrfif1ldm5sjssn7m3dw4s307fsrfzx")))) diff --git a/gnu/packages/patches/shepherd-hurd.patch b/gnu/packages/patches/shepherd-hurd.patch new file mode 100644 index 0000000000..5043e831f2 --- /dev/null +++ b/gnu/packages/patches/shepherd-hurd.patch @@ -0,0 +1,44 @@ +Fixes compilation on the Hurd. + +Taken from upstream: http://git.savannah.gnu.org/cgit/shepherd.git/commit/?id=232331369fe2a0495c7c777e11eecabee6257b3f + +From 232331369fe2a0495c7c777e11eecabee6257b3f Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen +Date: Sat, 7 Mar 2020 22:01:23 +0100 +Subject: [PATCH] system: Support compilation on the Hurd. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* modules/shepherd/system.scm.in (prctl): Wrap 'dynamic-func' call in +'false-if-exception'. + +Co-authored-by: Ludovic Courtès +--- + modules/shepherd/system.scm.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/modules/shepherd/system.scm.in b/modules/shepherd/system.scm.in +index 769404a..0b2cc9d 100644 +--- a/modules/shepherd/system.scm.in ++++ b/modules/shepherd/system.scm.in +@@ -1,6 +1,7 @@ + ;; system.scm -- Low-level operating system interface. + ;; Copyright (C) 2013, 2014, 2016, 2018 Ludovic Courtès + ;; Copyright (C) 2018 Carlo Zancanaro ++;; Copyright (C) 2020 Jan (janneke) Nieuwenhuizen + ;; + ;; This file is part of the GNU Shepherd. + ;; +@@ -145,7 +146,7 @@ ctrlaltdel(8) and see kernel/reboot.c in Linux." + (define PR_SET_CHILD_SUBREAPER @PR_SET_CHILD_SUBREAPER@) + + (define prctl +- (if (dynamic-func "prctl" (dynamic-link)) ++ (if (false-if-exception (dynamic-func "prctl" (dynamic-link))) + (let ((proc (syscall->procedure long "prctl" (list int int)))) + (lambda (process operation) + "Perform an operation on the given process" +-- +2.24.0 + -- cgit v1.2.3 From 3d3ca76f1cde964aa61433cdd40dd701c39e60e7 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 7 Mar 2020 11:12:15 -0500 Subject: gnu: inetutils: Support for the Hurd. * gnu/packages/linux.scm (net-tools)[supported-systems]: Remove the Hurd. * gnu/packages/patches/inetutils-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (inetutils): Use it. Disable some features on the Hurd. [native-inputs]: Include net-tools only on supported systems --- gnu/local.mk | 1 + gnu/packages/admin.scm | 17 +- gnu/packages/linux.scm | 1 + gnu/packages/patches/inetutils-hurd.patch | 583 ++++++++++++++++++++++++++++++ 4 files changed, 601 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/inetutils-hurd.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0ff248fe70..9e4ce6ce92 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1052,6 +1052,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 \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 4958d67b06..9662468b55 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -438,6 +438,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")))) @@ -449,13 +450,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 diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 3abfc469ba..1c157205d3 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2031,6 +2031,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 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 +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 + + #include "../ifconfig.h" ++ ++#include + + + /* 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 ++ ++#include ++#include ++#include ++#include "../ifconfig.h" ++ ++#include ++ ++ ++/* 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 +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 +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 + #include + #include ++#include + #include + + #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 + -- cgit v1.2.3 From 3da54cc3180ce175b1820dd4e366abdbbffcb45d Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 7 Mar 2020 11:30:44 -0500 Subject: gnu: screen: Build fix for the Hurd. * gnu/packages/patches/screen-hurd-path-max.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/screen.scm (screen): Use it. --- gnu/local.mk | 1 + gnu/packages/patches/screen-hurd-path-max.patch | 42 +++++++++++++++++++++++++ gnu/packages/screen.scm | 2 ++ 3 files changed, 45 insertions(+) create mode 100644 gnu/packages/patches/screen-hurd-path-max.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9e4ce6ce92..6c9cea2c9b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1424,6 +1424,7 @@ 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/sdl2-mesa-compat.patch \ %D%/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch \ 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 +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/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) -- cgit v1.2.3 From 7f31bd25ad734c483d450eefccdfb26874d2326d Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 7 Mar 2020 16:38:31 -0500 Subject: gnu: shadow: Build fix for the Hurd. * gnu/packages/patches/shadow-hurd-pctrl.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/admin.scm (shadow): Use it. --- gnu/local.mk | 1 + gnu/packages/admin.scm | 1 + gnu/packages/patches/shadow-hurd-pctrl.patch | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 gnu/packages/patches/shadow-hurd-pctrl.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 6c9cea2c9b..fba481cfd0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1430,6 +1430,7 @@ dist_patch_DATA = \ %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/shepherd-hurd.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ %D%/packages/patches/slim-session.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 9662468b55..d35c455275 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -488,6 +488,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")))) 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 + #include "prototypes.h" + #include "idmapping.h" +-#include + #if HAVE_SYS_CAPABILITY_H ++#include + #include + #endif + -- cgit v1.2.3 From 770ea94c9cde701ae3b45f313799b9d95154c267 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 7 Mar 2020 17:16:38 -0500 Subject: gnu: mit-krb5: Supprt for the Hurd. * gnu/packages/patches/mit-krb5-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/kerberos.scm (mit-krb5): Use it. --- gnu/local.mk | 1 + gnu/packages/kerberos.scm | 5 +- gnu/packages/patches/mit-krb5-hurd.patch | 165 +++++++++++++++++++++++++++++++ 3 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/mit-krb5-hurd.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index fba481cfd0..ff92662cf4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1208,6 +1208,7 @@ dist_patch_DATA = \ %D%/packages/patches/mingw-w64-6.0.0-gcc.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 \ diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm index 0e290c0d46..896d15f485 100644 --- a/gnu/packages/kerberos.scm +++ b/gnu/packages/kerberos.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2019 Mathieu Othacehe +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,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) @@ -60,7 +62,8 @@ (string-append "https://kerberos.org/dist/krb5/" (version-major+minor version) "/krb5-" version ".tar.gz"))) - (patches (search-patches "mit-krb5-qualify-short-hostnames.patch")) + (patches (search-patches "mit-krb5-qualify-short-hostnames.patch" + "mit-krb5-hurd.patch")) (sha256 (base32 "121c5xsy3x0i4wdkrpw62yhvji6virbh6n30ypazkp0isws3k4bk")))) 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 +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 ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif + #include + #include + #include +$ 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 /* MAXPATHLEN */ + #endif ++#ifndef MAXPATHLEN ++# define MAXPATHLEN 4096 ++#endif + + #ifdef HAVE_SYS_FILE_H + #include /* 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 + #include + ++#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 + #include + ++#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 + ++#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 + #include + ++#ifndef MAXHOSTNAMELEN ++# define MAXHOSTNAMELEN 256 ++#endif ++ + int + main(argc, argv) + int argc; -- cgit v1.2.3 From 736d772b82bfd693cd9412e2857e029fa6309269 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 26 Mar 2020 14:24:43 +0100 Subject: gnu: gd: Update to 2.3.0. * gnu/packages/patches/gd-fix-tests-on-i686.patch: Adjust context. * gnu/packages/patches/gd-CVE-2018-1000222.patch, gnu/packages/patches/gd-CVE-2018-5711.patch, gnu/packages/patches/gd-CVE-2019-6977.patch, gnu/packages/patches/gd-CVE-2019-6978.patch, gnu/packages/patches/gd-freetype-test-failure.patch: Delete files. * gnu/packages/patches/gd-brect-bounds.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly * gnu/packages/gd.scm (gd): Update to 2.3.0. [source](patches): Remove obsolete. * gnu/packages/gd.scm (gd): [propagated-inputs]: Move LIBJPEG-TURBO and FONTCONFIG ... [inputs]: ... here. --- gnu/local.mk | 6 +- gnu/packages/gd.scm | 20 +- gnu/packages/patches/gd-CVE-2018-1000222.patch | 87 ------ gnu/packages/patches/gd-CVE-2018-5711.patch | 61 ----- gnu/packages/patches/gd-CVE-2019-6977.patch | 36 --- gnu/packages/patches/gd-CVE-2019-6978.patch | 301 --------------------- gnu/packages/patches/gd-brect-bounds.patch | 63 +++++ gnu/packages/patches/gd-fix-tests-on-i686.patch | 2 +- .../patches/gd-freetype-test-failure.patch | 59 ---- 9 files changed, 72 insertions(+), 563 deletions(-) delete mode 100644 gnu/packages/patches/gd-CVE-2018-1000222.patch delete mode 100644 gnu/packages/patches/gd-CVE-2018-5711.patch delete mode 100644 gnu/packages/patches/gd-CVE-2019-6977.patch delete mode 100644 gnu/packages/patches/gd-CVE-2019-6978.patch create mode 100644 gnu/packages/patches/gd-brect-bounds.patch delete mode 100644 gnu/packages/patches/gd-freetype-test-failure.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ff92662cf4..6d689f6dc2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -925,12 +925,8 @@ dist_patch_DATA = \ %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/geoclue-config.patch \ %D%/packages/patches/ghc-8.0-fall-back-to-madv_dontneed.patch \ %D%/packages/patches/ghc-testsuite-dlopen-pie.patch \ diff --git a/gnu/packages/gd.scm b/gnu/packages/gd.scm index 444c76956a..3c818872c1 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,14 +50,9 @@ 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 @@ -78,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-turbo))) (home-page "https://www.libgd.org/") (synopsis "Library for the dynamic creation of images by programmers") (description 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 -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" -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" -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; ysy; 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" -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 -+ */ -+ -+ -+#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 . + +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" -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 */ -- cgit v1.2.3 From d9ff6ad88cac8dff1d7ad3027d3fa5977c4d4857 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 26 Mar 2020 16:04:33 +0100 Subject: gnu: potrace: Update to 1.16. * gnu/packages/patches/potrace-tests.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/fontutils.scm (potrace): Update to 1.16. [source](patches): Remove. --- gnu/local.mk | 1 - gnu/packages/fontutils.scm | 5 ++-- gnu/packages/patches/potrace-tests.patch | 50 -------------------------------- 3 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 gnu/packages/patches/potrace-tests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 6d689f6dc2..c1ee251e90 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1319,7 +1319,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 \ diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index ba0d075900..a77cf9ebf0 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -468,7 +468,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) @@ -476,8 +476,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))) 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 -- cgit v1.2.3 From 0ab8ad46322bea331ed5f5592843ba35e7f38b37 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 26 Mar 2020 23:09:15 +0100 Subject: gnu: OpenSSL: Add upstream patch to preserve compatibility in EOF handling. This is a follow-up to ad8254c23a86c3ca4ca32bc68fc8d76954aa80fd, which unexpectedly caused a test failure in the Python test suite. * gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/tls.scm (openssl)[source](patches): Add it. --- gnu/local.mk | 1 + .../patches/openssl-1.1.1e-revert-detect-eof.patch | 80 ++++++++++++++++++++++ gnu/packages/tls.scm | 3 +- 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c1ee251e90..d687c53a8a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1267,6 +1267,7 @@ dist_patch_DATA = \ %D%/packages/patches/openocd-nrf52.patch \ %D%/packages/patches/openssl-runpath.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ + %D%/packages/patches/openssl-1.1.1e-revert-detect-eof.patch \ %D%/packages/patches/openssl-c-rehash-in.patch \ %D%/packages/patches/openssl-CVE-2019-1559.patch \ %D%/packages/patches/open-zwave-hidapi.patch \ diff --git a/gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch b/gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch new file mode 100644 index 0000000000..973559440f --- /dev/null +++ b/gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch @@ -0,0 +1,80 @@ +This patch reverts a change in 1.1.1e that can break applications that do +not expect EOF to be reported via SSL_ERROR_SSL. + +https://bugs.python.org/issue40018 +https://github.com/openssl/openssl/pull/11400 +https://github.com/openssl/openssl/commit/0cd2ee64bffcdece599c3e4b5fac3830a55dc0fa + +Taken from upstream: +https://github.com/openssl/openssl/commit/30d190caf311d534867df97e26b552e628cb7d85 + +diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt +index f5324c6819d8..35512f9caf96 100644 +--- a/crypto/err/openssl.txt ++++ b/crypto/err/openssl.txt +@@ -2852,7 +2852,6 @@ SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES:242:unable to load ssl3 md5 routines + SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES:243:unable to load ssl3 sha1 routines + SSL_R_UNEXPECTED_CCS_MESSAGE:262:unexpected ccs message + SSL_R_UNEXPECTED_END_OF_EARLY_DATA:178:unexpected end of early data +-SSL_R_UNEXPECTED_EOF_WHILE_READING:294:unexpected eof while reading + SSL_R_UNEXPECTED_MESSAGE:244:unexpected message + SSL_R_UNEXPECTED_RECORD:245:unexpected record + SSL_R_UNINITIALIZED:276:uninitialized +diff --git a/include/openssl/sslerr.h b/include/openssl/sslerr.h +index 0ef684f3c131..ba4c4ae5fbd3 100644 +--- a/include/openssl/sslerr.h ++++ b/include/openssl/sslerr.h +@@ -1,6 +1,6 @@ + /* + * Generated by util/mkerr.pl DO NOT EDIT +- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. ++ * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy +@@ -734,7 +734,6 @@ int ERR_load_SSL_strings(void); + # define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243 + # define SSL_R_UNEXPECTED_CCS_MESSAGE 262 + # define SSL_R_UNEXPECTED_END_OF_EARLY_DATA 178 +-# define SSL_R_UNEXPECTED_EOF_WHILE_READING 294 + # define SSL_R_UNEXPECTED_MESSAGE 244 + # define SSL_R_UNEXPECTED_RECORD 245 + # define SSL_R_UNINITIALIZED 276 +diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c +index 1c885a664f35..b2a7a47eb075 100644 +--- a/ssl/record/rec_layer_s3.c ++++ b/ssl/record/rec_layer_s3.c +@@ -296,12 +296,6 @@ int ssl3_read_n(SSL *s, size_t n, size_t max, int extend, int clearold, + ret = BIO_read(s->rbio, pkt + len + left, max - left); + if (ret >= 0) + bioread = ret; +- if (ret <= 0 +- && !BIO_should_retry(s->rbio) +- && BIO_eof(s->rbio)) { +- SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_F_SSL3_READ_N, +- SSL_R_UNEXPECTED_EOF_WHILE_READING); +- } + } else { + SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL3_READ_N, + SSL_R_READ_BIO_NOT_SET); +diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c +index a0c7b79659d4..4b12ed1485d9 100644 +--- a/ssl/ssl_err.c ++++ b/ssl/ssl_err.c +@@ -1,6 +1,6 @@ + /* + * Generated by util/mkerr.pl DO NOT EDIT +- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. ++ * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy +@@ -1205,8 +1205,6 @@ static const ERR_STRING_DATA SSL_str_reasons[] = { + "unexpected ccs message"}, + {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_END_OF_EARLY_DATA), + "unexpected end of early data"}, +- {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_EOF_WHILE_READING), +- "unexpected eof while reading"}, + {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_MESSAGE), "unexpected message"}, + {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_RECORD), "unexpected record"}, + {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNINITIALIZED), "uninitialized"}, diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index f6310222b9..a057432f4b 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -293,7 +293,8 @@ required structures.") (sha256 (base32 "1gnwlri1dphr5wdzmg9vlhkh6aq2yqgpfkpmffzwjlfb26n62kv9")) - (patches (search-patches "openssl-1.1-c-rehash-in.patch")))) + (patches (search-patches "openssl-1.1-c-rehash-in.patch" + "openssl-1.1.1e-revert-detect-eof.patch")))) (build-system gnu-build-system) (outputs '("out" "doc" ;6.8 MiB of man3 pages and full HTML documentation -- cgit v1.2.3 From 7f1aa73b8c69432e6f15463e3b0bea6dc40f4e2f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 27 Mar 2020 19:21:49 +0100 Subject: gnu: guile: Update to 3.0.2. * gnu/packages/guile.scm (guile-3.0): Update to 3.0.2. [source](patches): Remove. * gnu/packages/patches/guile-3.0-crash.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 - gnu/packages/guile.scm | 7 ++----- gnu/packages/patches/guile-3.0-crash.patch | 17 ----------------- 3 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 gnu/packages/patches/guile-3.0-crash.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index fa578749cf..b0b72e6349 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1002,7 +1002,6 @@ dist_patch_DATA = \ %D%/packages/patches/gspell-dash-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-2.2-skip-oom-test.patch \ - %D%/packages/patches/guile-3.0-crash.patch \ %D%/packages/patches/guile-default-utf8.patch \ %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index c87728f432..0efee2d86a 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -269,17 +269,14 @@ without requiring the source code to be rewritten.") (package (inherit guile-2.2) (name "guile") - (version "3.0.1") + (version "3.0.2") (source (origin (inherit (package-source guile-2.2)) (uri (string-append "mirror://gnu/guile/guile-" version ".tar.xz")) (sha256 (base32 - "1jakps3127h8g69ixgb4zwc8v2g29dmwql1vi3pwg30kzp8fm5nn")) - (patches - (append (search-patches "guile-3.0-crash.patch") - (origin-patches (package-source guile-2.2)))))) + "12lziar4j27j9whqp2n18427q45y9ghq7gdd8lqhmj1k0lr7vi2k")))) (native-search-paths (list (search-path-specification (variable "GUILE_LOAD_PATH") diff --git a/gnu/packages/patches/guile-3.0-crash.patch b/gnu/packages/patches/guile-3.0-crash.patch deleted file mode 100644 index 510834ab57..0000000000 --- a/gnu/packages/patches/guile-3.0-crash.patch +++ /dev/null @@ -1,17 +0,0 @@ -Fix crash due to: . - -diff --git a/libguile/struct.c b/libguile/struct.c -index 3dbcc71d4..ddcbe46d2 100644 ---- a/libguile/struct.c -+++ b/libguile/struct.c -@@ -139,7 +139,9 @@ set_vtable_access_fields (SCM vtable) - nfields = len / 2; - - bitmask_size = (nfields + 31U) / 32U; -- unboxed_fields = scm_gc_malloc_pointerless (bitmask_size, "unboxed fields"); -+ unboxed_fields = -+ scm_gc_malloc_pointerless (bitmask_size * sizeof (*unboxed_fields), -+ "unboxed fields"); - memset (unboxed_fields, 0, bitmask_size * sizeof(*unboxed_fields)); - - /* Update FLAGS according to LAYOUT. */ -- cgit v1.2.3 From 26e92a3025513ec8e2b243cf819a7526a5d8d7c3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 29 Mar 2020 11:35:04 +0200 Subject: gnu: qtbase: Patch the 'moc' executable to cope with GCCs C++ headers. * gnu/packages/patches/qtbase-moc-ignore-gcc-macro.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/qt.scm (qtbase)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/qtbase-moc-ignore-gcc-macro.patch | 17 +++++++++++++++++ gnu/packages/qt.scm | 1 + 3 files changed, 19 insertions(+) create mode 100644 gnu/packages/patches/qtbase-moc-ignore-gcc-macro.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b0b72e6349..46e2936567 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1385,6 +1385,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 \ 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/qt.scm b/gnu/packages/qt.scm index 81989f68c3..368cfb7e15 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -352,6 +352,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 -- cgit v1.2.3 From 95ac5cd66854566feeb87174edadf60fccd44c31 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 31 Mar 2020 15:15:19 +0200 Subject: gnu: OpenSSL: Update to 1.1.1f. * gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/tls.scm (openssl): Update to 1.1.1f. [source](patches): Remove obsolete patch. --- gnu/local.mk | 1 - .../patches/openssl-1.1.1e-revert-detect-eof.patch | 80 ---------------------- gnu/packages/tls.scm | 7 +- 3 files changed, 3 insertions(+), 85 deletions(-) delete mode 100644 gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9d62bec720..208e25572f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1271,7 +1271,6 @@ dist_patch_DATA = \ %D%/packages/patches/openocd-nrf52.patch \ %D%/packages/patches/openssl-runpath.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ - %D%/packages/patches/openssl-1.1.1e-revert-detect-eof.patch \ %D%/packages/patches/openssl-c-rehash-in.patch \ %D%/packages/patches/openssl-CVE-2019-1559.patch \ %D%/packages/patches/open-zwave-hidapi.patch \ diff --git a/gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch b/gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch deleted file mode 100644 index 973559440f..0000000000 --- a/gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch +++ /dev/null @@ -1,80 +0,0 @@ -This patch reverts a change in 1.1.1e that can break applications that do -not expect EOF to be reported via SSL_ERROR_SSL. - -https://bugs.python.org/issue40018 -https://github.com/openssl/openssl/pull/11400 -https://github.com/openssl/openssl/commit/0cd2ee64bffcdece599c3e4b5fac3830a55dc0fa - -Taken from upstream: -https://github.com/openssl/openssl/commit/30d190caf311d534867df97e26b552e628cb7d85 - -diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt -index f5324c6819d8..35512f9caf96 100644 ---- a/crypto/err/openssl.txt -+++ b/crypto/err/openssl.txt -@@ -2852,7 +2852,6 @@ SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES:242:unable to load ssl3 md5 routines - SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES:243:unable to load ssl3 sha1 routines - SSL_R_UNEXPECTED_CCS_MESSAGE:262:unexpected ccs message - SSL_R_UNEXPECTED_END_OF_EARLY_DATA:178:unexpected end of early data --SSL_R_UNEXPECTED_EOF_WHILE_READING:294:unexpected eof while reading - SSL_R_UNEXPECTED_MESSAGE:244:unexpected message - SSL_R_UNEXPECTED_RECORD:245:unexpected record - SSL_R_UNINITIALIZED:276:uninitialized -diff --git a/include/openssl/sslerr.h b/include/openssl/sslerr.h -index 0ef684f3c131..ba4c4ae5fbd3 100644 ---- a/include/openssl/sslerr.h -+++ b/include/openssl/sslerr.h -@@ -1,6 +1,6 @@ - /* - * Generated by util/mkerr.pl DO NOT EDIT -- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. -+ * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy -@@ -734,7 +734,6 @@ int ERR_load_SSL_strings(void); - # define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243 - # define SSL_R_UNEXPECTED_CCS_MESSAGE 262 - # define SSL_R_UNEXPECTED_END_OF_EARLY_DATA 178 --# define SSL_R_UNEXPECTED_EOF_WHILE_READING 294 - # define SSL_R_UNEXPECTED_MESSAGE 244 - # define SSL_R_UNEXPECTED_RECORD 245 - # define SSL_R_UNINITIALIZED 276 -diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c -index 1c885a664f35..b2a7a47eb075 100644 ---- a/ssl/record/rec_layer_s3.c -+++ b/ssl/record/rec_layer_s3.c -@@ -296,12 +296,6 @@ int ssl3_read_n(SSL *s, size_t n, size_t max, int extend, int clearold, - ret = BIO_read(s->rbio, pkt + len + left, max - left); - if (ret >= 0) - bioread = ret; -- if (ret <= 0 -- && !BIO_should_retry(s->rbio) -- && BIO_eof(s->rbio)) { -- SSLfatal(s, SSL_AD_DECODE_ERROR, SSL_F_SSL3_READ_N, -- SSL_R_UNEXPECTED_EOF_WHILE_READING); -- } - } else { - SSLfatal(s, SSL_AD_INTERNAL_ERROR, SSL_F_SSL3_READ_N, - SSL_R_READ_BIO_NOT_SET); -diff --git a/ssl/ssl_err.c b/ssl/ssl_err.c -index a0c7b79659d4..4b12ed1485d9 100644 ---- a/ssl/ssl_err.c -+++ b/ssl/ssl_err.c -@@ -1,6 +1,6 @@ - /* - * Generated by util/mkerr.pl DO NOT EDIT -- * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. -+ * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy -@@ -1205,8 +1205,6 @@ static const ERR_STRING_DATA SSL_str_reasons[] = { - "unexpected ccs message"}, - {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_END_OF_EARLY_DATA), - "unexpected end of early data"}, -- {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_EOF_WHILE_READING), -- "unexpected eof while reading"}, - {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_MESSAGE), "unexpected message"}, - {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNEXPECTED_RECORD), "unexpected record"}, - {ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNINITIALIZED), "uninitialized"}, diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index eab832ce41..812057c6ed 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -283,7 +283,7 @@ required structures.") (define-public openssl (package (name "openssl") - (version "1.1.1e") + (version "1.1.1f") (source (origin (method url-fetch) (uri (list (string-append "https://www.openssl.org/source/openssl-" @@ -295,9 +295,8 @@ required structures.") "/openssl-" version ".tar.gz"))) (sha256 (base32 - "1gnwlri1dphr5wdzmg9vlhkh6aq2yqgpfkpmffzwjlfb26n62kv9")) - (patches (search-patches "openssl-1.1-c-rehash-in.patch" - "openssl-1.1.1e-revert-detect-eof.patch")))) + "0d9zv9srjqivs8nn099fpbjv1wyhfcb8lzy491dpmfngdvz6nv0q")) + (patches (search-patches "openssl-1.1-c-rehash-in.patch")))) (build-system gnu-build-system) (outputs '("out" "doc" ;6.8 MiB of man3 pages and full HTML documentation -- cgit v1.2.3 From 67ca82e6ddc9f1c87fa8c033729a1f53b7c2b3ba Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 1 Apr 2020 12:58:32 +0200 Subject: gnu: Python: Fix test failure on ARMv7. * gnu/packages/patches/python-3-arm-alignment.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python.scm (python-3.8)[source](patches): Add it when the current system is ARM. --- gnu/local.mk | 1 + gnu/packages/patches/python-3-arm-alignment.patch | 21 ++++++++++++++++++ gnu/packages/python.scm | 27 +++++++++++++++++------ 3 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/python-3-arm-alignment.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 208e25572f..1599b0933a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1344,6 +1344,7 @@ 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 \ 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/python.scm b/gnu/packages/python.scm index 8e28265fbe..e9a20dc418 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016 David Craven -;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke +;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke ;;; Copyright © 2016, 2017 Stefan Reichör ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016, 2017 Alex Vong @@ -92,7 +92,9 @@ #: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 @@ -352,11 +354,22 @@ data types.") (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")) + (patches (append + ;; 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 . + ;; TODO: Remove the conditional on the next rebuild cycle. + (let ((system (or (%current-target-system) + (%current-system)))) + (if (any (cute string-prefix? <> system) + '("arm" "aarch64")) + (list (search-patch "python-3-arm-alignment.patch")) + '())) + (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 "1ps5v323cp5czfshqjmbsqw7nvrdpcbk06f62jbzaqik4gfffii6")) -- cgit v1.2.3 From 976ae7eab6d14a8a82bf185e39f58abac0c4b915 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 3 Apr 2020 15:58:22 +0200 Subject: gnu: libreoffice: Fix build with Poppler 0.86. * gnu/packages/patches/libreoffice-poppler-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/libreoffice.scm (libreoffice)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/libreoffice.scm | 1 + gnu/packages/patches/libreoffice-poppler-compat.patch | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 gnu/packages/patches/libreoffice-poppler-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1599b0933a..f5ca0e3d8d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1143,6 +1143,7 @@ dist_patch_DATA = \ %D%/packages/patches/libmpeg2-global-symbol-test.patch \ %D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch \ %D%/packages/patches/libmygpo-qt-missing-qt5-modules.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 \ diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 225bf78706..a3a6ea5d1a 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -1006,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/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(pAction)->getURI().c_str(); ++#elif POPPLER_CHECK_VERSION(0, 72, 0) + const char* pURI = static_cast(pAction)->getURI()->c_str(); + #else + const char* pURI = static_cast(pAction)->getURI()->getCString(); -- cgit v1.2.3 From e43e980f847564e46f96e09bf77c648c3ef98b3c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 10 Apr 2020 17:15:32 +0200 Subject: gnu: aegisub: Fix build with Make 4.3. * gnu/packages/patches/aegisub-make43.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/video.scm (aegisub)[source](patches): Add it. --- gnu/local.mk | 3 ++- gnu/packages/patches/aegisub-make43.patch | 20 ++++++++++++++++++++ gnu/packages/video.scm | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/aegisub-make43.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2197ae5775..b10c856721 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -722,7 +722,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-Revert-Make-installation-properly-relo.patch \ 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/video.scm b/gnu/packages/video.scm index cbdc5fb78a..16fd93415b 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -3249,6 +3249,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 -- cgit v1.2.3 From 2a2a9878682e4d959633ecab5275397809a1ce3f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 11 Apr 2020 16:04:26 +0200 Subject: gnu: python-pycrypto: Fix build with Python 3.8. * gnu/packages/patches/python-pycrypto-time-clock.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python-crypto.scm (python-pycrypto)[source](patches): Add it. --- gnu/local.mk | 1 + .../patches/python-pycrypto-time-clock.patch | 23 ++++++++++++++++++++++ gnu/packages/python-crypto.scm | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-pycrypto-time-clock.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e7e5d00baf..3f48c466af 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1387,6 +1387,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 \ 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/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")))) -- cgit v1.2.3 From 7aad4609ae38790b7cc4e6a88b3e48ab43bc1f09 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 2 Apr 2020 16:47:40 +0200 Subject: gnu: cross-libc: Add patch to add 'mach_print' symbol on GNU/Hurd. * gnu/packages/patches/glibc-hurd-mach-print.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/cross-base.scm (cross-libc): Add 'patch-libc/hurd' phase when 'hurd-target?' is true. --- gnu/local.mk | 1 + gnu/packages/cross-base.scm | 11 +++++++++-- gnu/packages/patches/glibc-hurd-mach-print.patch | 23 +++++++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/glibc-hurd-mach-print.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7347222852..02e9d804e9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -977,6 +977,7 @@ dist_patch_DATA = \ %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-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 \ diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index df4570dafc..c21390767f 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -521,7 +521,12 @@ and the cross tool chain." (("/[^ ]+/lib/libc.so.0.3") (string-append out "/lib/libc.so.0.3" " libmachuser.so libhurduser.so")))) - #t))) + #t)) + (add-after 'unpack 'patch-libc/hurd + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch (assoc-ref inputs + "hurd-mach-print.patch"))) + (invoke "patch" "-p1" "--force" "-i" patch))))) '()))))) ;; Shadow the native "kernel-headers" because glibc's recipe expects the @@ -537,7 +542,9 @@ and the cross tool chain." ,@(if (hurd-triplet? target) `(("cross-mig" ,@(assoc-ref (package-native-inputs xheaders) - "cross-mig"))) + "cross-mig")) + ("hurd-mach-print.patch" + ,@(search-patches "glibc-hurd-mach-print.patch"))) '()) ,@(package-inputs libc) ;FIXME: static-bash ,@(package-native-inputs libc)))))) 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 { -- cgit v1.2.3 From 1c4268e4147063355f41b7958bdb61bef96f58c0 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 5 Apr 2020 16:45:18 +0200 Subject: gnu: cross-libc: Add patch to allow 'gettyent' reading store file names. * gnu/packages/patches/glibc-hurd-gettyent.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/cross-base.scm (cross-libc): Add it in 'patch-libc/hurd' phase when 'hurd-target?' is true. --- gnu/local.mk | 1 + gnu/packages/cross-base.scm | 15 +++++++++--- gnu/packages/patches/glibc-hurd-gettyent.patch | 34 ++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/glibc-hurd-gettyent.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 02e9d804e9..8303fdca7f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -977,6 +977,7 @@ dist_patch_DATA = \ %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 \ diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index c21390767f..9b4aa103da 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -522,11 +522,15 @@ and the cross tool chain." (string-append out "/lib/libc.so.0.3" " libmachuser.so libhurduser.so")))) #t)) + ;; TODO: move to glibc in the next rebuild cycle (add-after 'unpack 'patch-libc/hurd (lambda* (#:key inputs #:allow-other-keys) - (let ((patch (assoc-ref inputs - "hurd-mach-print.patch"))) - (invoke "patch" "-p1" "--force" "-i" patch))))) + (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 @@ -543,8 +547,11 @@ and the cross tool chain." `(("cross-mig" ,@(assoc-ref (package-native-inputs xheaders) "cross-mig")) + ;; TODO: move to glibc in the next rebuild cycle ("hurd-mach-print.patch" - ,@(search-patches "glibc-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/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" +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 +--- + 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 + -- cgit v1.2.3 From a9f7993ea719c5368ee3e64b813b169eece4e6a1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 1 Apr 2020 16:18:23 +0200 Subject: Add (gnu system hurd). * gnu/system/hurd.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/system/hurd.scm | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 gnu/system/hurd.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8303fdca7f..120359f0de 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -598,6 +598,7 @@ GNU_SYSTEM_MODULES = \ %D%/system.scm \ %D%/system/accounts.scm \ %D%/system/file-systems.scm \ + %D%/system/hurd.scm \ %D%/system/install.scm \ %D%/system/keyboard.scm \ %D%/system/linux-container.scm \ diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm new file mode 100644 index 0000000000..0728ce8603 --- /dev/null +++ b/gnu/system/hurd.scm @@ -0,0 +1,112 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Ludovic Courtès +;;; +;;; 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 . + +(define-module (gnu system hurd) + #:use-module (guix gexp) + #:use-module (guix utils) + #:use-module (gnu bootloader grub) + #:use-module (gnu packages base) + #:use-module (gnu packages cross-base) + #:use-module (gnu packages hurd) + #:use-module (gnu system vm) + #:export (cross-hurd-image)) + +;;; Commentary: +;;; +;;; This module provides tools to (cross-)build GNU/Hurd virtual machine +;;; images. +;;; +;;; Code: + +(define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach)) + "Return a cross-built GNU/Hurd image." + (define hurd-os + (let-syntax ((for-hurd (syntax-rules () + ((_ things ...) + (list (with-parameters ((%current-target-system + "i586-pc-gnu")) + things) ...))))) + (directory-union "gnu+hurd" + (cons (with-parameters ((%current-system "i686-linux")) + gnumach) + (for-hurd hurd coreutils grep sed))))) + + (define grub.cfg + (let ((hurd (with-parameters ((%current-target-system "i586-pc-gnu")) + 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 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") + (file "/etc/resolv.conf" + "nameserver 10.0.2.3\n") + (directory "/boot") + ("/boot/grub.cfg" -> ,grub.cfg) ;XXX: not strictly needed + ("/hurd" -> ,(file-append (with-parameters ((%current-target-system + "i586-pc-gnu")) + hurd) + "/hurd")))) + + (qemu-image #:file-system-type "ext2" + #:file-system-options '("-o" "hurd") + #:device-nodes 'hurd + #:inputs `(("system" ,hurd-os) + ("grub.cfg" ,grub.cfg)) + #:copy-inputs? #t + #:os hurd-os + #: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 -- cgit v1.2.3 From 6a39cbe72287a00d85b71ff86197c9b3c6c2fd9d Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Tue, 7 Apr 2020 17:48:45 +0200 Subject: gnu: openssh: Build fix for the Hurd. * gnu/packages/patches/openssh-hurd.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/ssh.scm (openssh)[source]: Use it. [inputs]: If hurd-target? is true, omit xauth. --- gnu/local.mk | 1 + gnu/packages/patches/openssh-hurd.patch | 30 ++++++++++++++++++++++++++++++ gnu/packages/ssh.scm | 7 ++++++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/openssh-hurd.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 120359f0de..8deea48951 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1288,6 +1288,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 \ 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" +Not upstreamed. + +From 1ddae040d67e9a4ebcc3e1b95af1bff12c0f086b Mon Sep 17 00:00:00 2001 +From: "Jan (janneke) Nieuwenhuizen" +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/ssh.scm b/gnu/packages/ssh.scm index 506ea06bc8..1d1b1c9951 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2018 Manuel Graf ;;; Copyright © 2019 Gábor Boskovits ;;; Copyright © 2019, 2020 Mathieu Othacehe +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; ;;; 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 -- cgit v1.2.3 From 541122957c68a15f8657775e62448b1cfafd7cb8 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Tue, 7 Apr 2020 20:49:13 +0200 Subject: gnu: guile-json: Cross-build fix. * gnu/packages/patches/guile-json-cross.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/guile.scm (guile-json-3)[source]: Use it. [arguments]: Remove configure to trigger bootstrap phase. --- gnu/local.mk | 1 + gnu/packages/guile.scm | 13 +++++-- gnu/packages/patches/guile-json-cross.patch | 54 +++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/guile-json-cross.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8deea48951..8705a96a36 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1020,6 +1020,7 @@ dist_patch_DATA = \ %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-json-cross.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ %D%/packages/patches/guile-present-coding.patch \ %D%/packages/patches/guile-relocatable.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index d69dee51c9..8ccbc22f26 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -526,12 +526,21 @@ specification. These are the main features: (method url-fetch) (uri (string-append "mirror://savannah/guile-json/guile-json-" version ".tar.gz")) + (patches (search-patches "guile-json-cross.patch")) (sha256 (base32 "14m6b6g2maw0mkvfm4x63rqb54vgbpn1gcqs715ijw4bikfzlqfz")))) - (native-inputs `(("pkg-config" ,pkg-config) + (native-inputs `(("autoconf" ,autoconf) + ("automake" ,automake) + ("pkg-config" ,pkg-config) ("guile" ,guile-3.0))) - (inputs `(("guile" ,guile-3.0))))) + (inputs `(("guile" ,guile-3.0))) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'remove-configure + (lambda _ + (delete-file "configure") + #t))))))) (define-public guile2.2-json (package-for-guile-2.2 guile-json-3)) diff --git a/gnu/packages/patches/guile-json-cross.patch b/gnu/packages/patches/guile-json-cross.patch new file mode 100644 index 0000000000..b9081f3df2 --- /dev/null +++ b/gnu/packages/patches/guile-json-cross.patch @@ -0,0 +1,54 @@ +Patch accepted upstream. + +From 9bbe0d78391c6dbe0316aa56a105d1966fddc9f0 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen +Date: Wed, 4 Mar 2020 11:17:02 +0100 +Subject: [PATCH] build: Support cross building. + +* configure.ac: Add AC_CANONICAL_HOST to get host. +* Makefile.am (.scm.go): Set it as target. +* json/Makefile.am (.scm.go): Likewise. +--- + Makefile.am | 2 +- + configure.ac | 1 + + json/Makefile.am | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 996f18b..1823a3f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -42,7 +42,7 @@ nobase_nodist_obj_DATA = $(GOBJECTS) + GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat + SUFFIXES = .scm .go + .scm.go: +- $(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<" ++ $(top_builddir)/env $(GUILD) compile --target="$(host)" $(GUILE_WARNINGS) -o "$@" "$<" + + SOURCES = json.scm + +diff --git a/configure.ac b/configure.ac +index fbc1aff..937dcf7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,6 +25,7 @@ AC_CONFIG_SRCDIR(json.scm) + AC_CONFIG_AUX_DIR([build-aux]) + AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability]) + AM_SILENT_RULES([yes]) ++AC_CANONICAL_HOST + + dnl We require pkg.m4 (from pkg-config) and guile.m4. + dnl Make sure they are available. +diff --git a/json/Makefile.am b/json/Makefile.am +index adf5972..103b867 100644 +--- a/json/Makefile.am ++++ b/json/Makefile.am +@@ -36,4 +36,4 @@ CLEANFILES = $(GOBJECTS) + GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat + SUFFIXES = .scm .go + .scm.go: +- $(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<" ++ $(top_builddir)/env $(GUILD) compile --target="$(host)" $(GUILE_WARNINGS) -o "$@" "$<" +-- +2.26.0 + -- cgit v1.2.3 From 7eee37cd56595628ebf3829f1b8b6d526204818c Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Fri, 10 Apr 2020 07:34:03 +0200 Subject: gnu: gnutls-3.6.13: Cross-build fix. * gnu/packages/patches/gnutls-cross.patch: New file. * gnu/packages/tls.scm (gnutls-3.6.13)[source]: Use it. [native-inputs]: If cross-compiling, add native guile-3.0. This actually cross compiles .go modules. --- gnu/local.mk | 1 + gnu/packages/patches/gnutls-cross.patch | 82 +++++++++++++++++++++++++++++++++ gnu/packages/tls.scm | 10 +++- 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/gnutls-cross.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8705a96a36..0d49838398 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1003,6 +1003,7 @@ dist_patch_DATA = \ %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 \ 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" +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/tls.scm b/gnu/packages/tls.scm index 2b1deb1000..27d38ed258 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -260,10 +260,16 @@ required structures.") (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. -- cgit v1.2.3 From 45fd28f76405df30070f161fe79365363d7103b3 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 16 Apr 2020 10:26:11 -0400 Subject: gnu: linphoneqt: Fix crashes. The application was crashing when clicking on the Preferences menu or the conference icon. * gnu/packages/patches/linphoneqt-tabbutton.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/linphone.scm (linphoneqt)[source]: Use it. [inputs]: Add qtquickcontrols. Signed-off-by: Maxim Cournoyer --- gnu/local.mk | 1 + gnu/packages/linphone.scm | 4 +- gnu/packages/patches/linphoneqt-tabbutton.patch | 96 +++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/linphoneqt-tabbutton.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b11876d14d..5bfbaaa0a2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1188,6 +1188,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 \ diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm index 779ddf8cb7..4f142312cc 100644 --- a/gnu/packages/linphone.scm +++ b/gnu/packages/linphone.scm @@ -474,7 +474,8 @@ and video calls or instant messaging capabilities to an application.") (string-append "https://www.linphone.org/releases/sources/" name "/" name "-" version ".tar.gz")) (sha256 - (base32 "1g2zrr9li0g1hgs6vys06vr98h5dx36z22hx7a6ry231536c002a")))) + (base32 "1g2zrr9li0g1hgs6vys06vr98h5dx36z22hx7a6ry231536c002a")) + (patches (search-patches "linphoneqt-tabbutton.patch")))) (build-system qt-build-system) (arguments `(#:tests? #f ; No test target @@ -512,6 +513,7 @@ and video calls or instant messaging capabilities to an application.") ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) ("qtgraphicaleffects" ,qtgraphicaleffects) + ("qtquickcontrols" ,qtquickcontrols) ("qtquickcontrols2" ,qtquickcontrols2) ("qtsvg" ,qtsvg))) (synopsis "Desktop client for the Linphone SIP softphone") 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 +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 + -- cgit v1.2.3 From 28457ae6fe3302d426e03c9ebd4b9d187470a946 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Sat, 21 Dec 2019 23:21:51 -0500 Subject: gnu: gnome-shell: Update to 3.34.2. * gnu/packages/gnome.scm (gnome-shell): Update to 3.34.2. [source]: Add patch. [native-inputs]: Add asciidoc. [inputs]: Add gnome-autoar. * gnu/packages/patches/gnome-shell-theme.patch: Adjust patch accordingly. * gnu/packages/patches/gnome-shell-disable-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. (cherry picked from commit 4ac325aa9bf8dd237f5b5be7a1523d957be0067f) --- gnu/local.mk | 1 + gnu/packages/gnome.scm | 11 +++++--- .../patches/gnome-shell-disable-test.patch | 25 ++++++++++++++++++ gnu/packages/patches/gnome-shell-theme.patch | 30 ++++++++++------------ 4 files changed, 47 insertions(+), 20 deletions(-) create mode 100644 gnu/packages/patches/gnome-shell-disable-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 5bfbaaa0a2..6297217d40 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1001,6 +1001,7 @@ dist_patch_DATA = \ %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-tweaks-search-paths.patch \ %D%/packages/patches/gnupg-default-pinentry.patch \ %D%/packages/patches/gnutls-skip-trust-store-test.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index f8cdf94eaa..5c8852c4ff 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -7088,7 +7088,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 "/" @@ -7096,8 +7096,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 @@ -7191,7 +7192,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) @@ -7212,6 +7214,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) 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 . -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 @@ no-events.svg no-notifications.svg noise-texture.png + guix-background.png + guix-logo.png pad-osd.css - page-indicator-active.svg - page-indicator-inactive.svg -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; - + pointer-double-click-symbolic.svg + pointer-drag-symbolic.svg +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; } -- cgit v1.2.3 From 1efcf722930f79f7544aa33a232792911c15c865 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Mon, 23 Dec 2019 10:33:21 -0500 Subject: gnu: seahorse: Update to 3.34. * gnu/packages/gnome.scm (seahorse): Update to 3.34. [source]: Remove obsolete patch. * gnu/packages/patches/seahorse-gtk-use-0-on-empty-flags.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. (cherry picked from commit df3e812fe42a13325ca5b223a115fb2d3dbfd446) --- gnu/local.mk | 1 - gnu/packages/gnome.scm | 6 ++-- .../seahorse-gkr-use-0-on-empty-flags.patch | 32 ---------------------- 3 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 6297217d40..0795dec6e8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1453,7 +1453,6 @@ dist_patch_DATA = \ %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 \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 5c8852c4ff..71f536c9ca 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -3104,7 +3104,7 @@ engineering.") (define-public seahorse (package (name "seahorse") - (version "3.32.2") + (version "3.34") (source (origin (method url-fetch) @@ -3113,9 +3113,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 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 . - -From d9db29db567012b7c72e85e1be1fbf55fcc9b667 Mon Sep 17 00:00:00 2001 -From: Niels De Graef -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 - -- cgit v1.2.3 From eaff60b35fed75c60d0db76c589e17d1500f60dd Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sat, 18 Apr 2020 17:05:48 +0200 Subject: gnu: perl: Actually produce a host perl when cross-compiling. * gnu/packages/patches/perl-cross.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/perl.scm (perl)[native-inputs]: When cross-compiling, add `perl-cross' input and perl-cross.patch. [arguments]: When cross-compiling, use them to produce binary for host. --- gnu/local.mk | 1 + gnu/packages/patches/perl-cross.patch | 60 ++++++++++++++++++++ gnu/packages/perl.scm | 103 ++++++++++++++++++++++++++++++++-- 3 files changed, 159 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/perl-cross.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 08b659c929..749e93ec07 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1318,6 +1318,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 \ 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" +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/perl.scm b/gnu/packages/perl.scm index d6a75506ec..a47cc6b254 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2016 Alex Sassmannshausen ;;; Copyright © 2016, 2018, 2020 Roel Janssen ;;; Copyright © 2016 Ben Woodcroft -;;; Copyright © 2016 Jan Nieuwenhuizen +;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2017 Raoul J.P. Bonnal ;;; Copyright © 2017, 2018 Marius Bakke ;;; Copyright © 2017 Adriano Peluso @@ -48,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) @@ -110,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"))) @@ -120,10 +125,80 @@ (("-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))) + ,@(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")) @@ -152,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"))))) -- cgit v1.2.3 From 62c3fd34e498327f1eeae6283b0c54ae56b7282b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 23 Apr 2020 15:34:46 +0200 Subject: gnu: shepherd: Remove obsolete patch. * gnu/packages/patches/shepherd-hurd.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/admin.scm (shepherd)[source](patches): Remove. --- gnu/local.mk | 1 - gnu/packages/admin.scm | 1 - gnu/packages/patches/shepherd-hurd.patch | 44 -------------------------------- 3 files changed, 46 deletions(-) delete mode 100644 gnu/packages/patches/shepherd-hurd.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 535c23d98b..63a9c83c19 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1463,7 +1463,6 @@ dist_patch_DATA = \ %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/shepherd-hurd.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ %D%/packages/patches/slim-session.patch \ %D%/packages/patches/slim-config.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 567c7cfb94..a9240dbdb1 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -206,7 +206,6 @@ and provides a \"top-like\" mode (monitoring).") (method url-fetch) (uri (string-append "mirror://gnu/shepherd/shepherd-" version ".tar.gz")) - (patches (search-patches "shepherd-hurd.patch")) (sha256 (base32 "02lbc8z5gd8v8wfi4yh1zww8mk03w0zcwnmk4l4p3vpjlvlb63ll")))) diff --git a/gnu/packages/patches/shepherd-hurd.patch b/gnu/packages/patches/shepherd-hurd.patch deleted file mode 100644 index 5043e831f2..0000000000 --- a/gnu/packages/patches/shepherd-hurd.patch +++ /dev/null @@ -1,44 +0,0 @@ -Fixes compilation on the Hurd. - -Taken from upstream: http://git.savannah.gnu.org/cgit/shepherd.git/commit/?id=232331369fe2a0495c7c777e11eecabee6257b3f - -From 232331369fe2a0495c7c777e11eecabee6257b3f Mon Sep 17 00:00:00 2001 -From: Jan Nieuwenhuizen -Date: Sat, 7 Mar 2020 22:01:23 +0100 -Subject: [PATCH] system: Support compilation on the Hurd. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -* modules/shepherd/system.scm.in (prctl): Wrap 'dynamic-func' call in -'false-if-exception'. - -Co-authored-by: Ludovic Courtès ---- - modules/shepherd/system.scm.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/modules/shepherd/system.scm.in b/modules/shepherd/system.scm.in -index 769404a..0b2cc9d 100644 ---- a/modules/shepherd/system.scm.in -+++ b/modules/shepherd/system.scm.in -@@ -1,6 +1,7 @@ - ;; system.scm -- Low-level operating system interface. - ;; Copyright (C) 2013, 2014, 2016, 2018 Ludovic Courtès - ;; Copyright (C) 2018 Carlo Zancanaro -+;; Copyright (C) 2020 Jan (janneke) Nieuwenhuizen - ;; - ;; This file is part of the GNU Shepherd. - ;; -@@ -145,7 +146,7 @@ ctrlaltdel(8) and see kernel/reboot.c in Linux." - (define PR_SET_CHILD_SUBREAPER @PR_SET_CHILD_SUBREAPER@) - - (define prctl -- (if (dynamic-func "prctl" (dynamic-link)) -+ (if (false-if-exception (dynamic-func "prctl" (dynamic-link))) - (let ((proc (syscall->procedure long "prctl" (list int int)))) - (lambda (process operation) - "Perform an operation on the given process" --- -2.24.0 - -- cgit v1.2.3 From 621caeb73b3feecb9a5f2517663ce03f02274db7 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 23 Apr 2020 19:32:24 +0200 Subject: gnu: GCC@8: Remove obsolete patch. This is no longer required since the update to 8.4.0 in 60ce496ad8. * gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gcc.scm (gcc-8)[source](patches): Remove it. --- gnu/local.mk | 1 - gnu/packages/gcc.scm | 1 - .../patches/gcc-8-libsanitizer-mode-size.patch | 56 ---------------------- 3 files changed, 58 deletions(-) delete mode 100644 gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 63a9c83c19..7c117b7a6b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -924,7 +924,6 @@ dist_patch_DATA = \ %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-8-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 \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 6221a123d8..b69f3cf4b3 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -547,7 +547,6 @@ It also includes runtime support libraries for these languages."))) (base32 "1m1d3gfix56w4aq8myazzfffkl8bqcrx4jhhapnjf7qfs596w2p3")) (patches (search-patches "gcc-8-strmov-store-file-names.patch" - "gcc-8-libsanitizer-mode-size.patch" "gcc-5.0-libvtv-runpath.patch")))))) (define-public gcc-9 diff --git a/gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch b/gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch deleted file mode 100644 index e343034991..0000000000 --- a/gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch +++ /dev/null @@ -1,56 +0,0 @@ -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 a915d37cdfe..5c720b2e700 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -@@ -1147,8 +1147,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 4d11d071776..eda75a7cd84 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -210,14 +210,8 @@ 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; -@@ -228,8 +222,7 @@ namespace __sanitizer { - unsigned long __unused1; - unsigned long __unused2; - #else -- unsigned short mode; -- unsigned short __pad1; -+ unsigned int mode; - unsigned short __seq; - unsigned short __pad2; - #if defined(__x86_64__) && !defined(_LP64) - -- cgit v1.2.3 From 5d9e2187929ed7e8d46ec3cb3174fd78c1846360 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 30 Apr 2020 22:23:44 +0200 Subject: gnu: guile-json: Update to 3.5.0. * gnu/packages/patches/guile-json-cross.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/guile.scm (guile-json-3): Update to 3.5.0. [source](patches): Remove. [native-inputs]: Remove AUTOCONF and AUTOMAKE. [arguments]: Remove. --- gnu/local.mk | 1 - gnu/packages/guile.scm | 17 +++------ gnu/packages/patches/guile-json-cross.patch | 54 ----------------------------- 3 files changed, 4 insertions(+), 68 deletions(-) delete mode 100644 gnu/packages/patches/guile-json-cross.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b3d6054b50..57346cc2ef 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1027,7 +1027,6 @@ dist_patch_DATA = \ %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-json-cross.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ %D%/packages/patches/guile-present-coding.patch \ %D%/packages/patches/guile-relocatable.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index a262553ba1..8665e2ef79 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -532,26 +532,17 @@ specification. These are the main features: (package (inherit guile-json-1) (name "guile-json") - (version "3.2.0") + (version "3.5.0") (source (origin (method url-fetch) (uri (string-append "mirror://savannah/guile-json/guile-json-" version ".tar.gz")) - (patches (search-patches "guile-json-cross.patch")) (sha256 (base32 - "14m6b6g2maw0mkvfm4x63rqb54vgbpn1gcqs715ijw4bikfzlqfz")))) - (native-inputs `(("autoconf" ,autoconf) - ("automake" ,automake) - ("pkg-config" ,pkg-config) + "0nj0684qgh6ppkbdyxqfyjwsv2qbyairxpi8fzrhsi3xnc7jn4im")))) + (native-inputs `(("pkg-config" ,pkg-config) ("guile" ,guile-3.0))) - (inputs `(("guile" ,guile-3.0))) - (arguments - `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'remove-configure - (lambda _ - (delete-file "configure") - #t))))))) + (inputs `(("guile" ,guile-3.0))))) (define-public guile2.2-json (package-for-guile-2.2 guile-json-3)) diff --git a/gnu/packages/patches/guile-json-cross.patch b/gnu/packages/patches/guile-json-cross.patch deleted file mode 100644 index b9081f3df2..0000000000 --- a/gnu/packages/patches/guile-json-cross.patch +++ /dev/null @@ -1,54 +0,0 @@ -Patch accepted upstream. - -From 9bbe0d78391c6dbe0316aa56a105d1966fddc9f0 Mon Sep 17 00:00:00 2001 -From: Jan Nieuwenhuizen -Date: Wed, 4 Mar 2020 11:17:02 +0100 -Subject: [PATCH] build: Support cross building. - -* configure.ac: Add AC_CANONICAL_HOST to get host. -* Makefile.am (.scm.go): Set it as target. -* json/Makefile.am (.scm.go): Likewise. ---- - Makefile.am | 2 +- - configure.ac | 1 + - json/Makefile.am | 2 +- - 3 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 996f18b..1823a3f 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -42,7 +42,7 @@ nobase_nodist_obj_DATA = $(GOBJECTS) - GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat - SUFFIXES = .scm .go - .scm.go: -- $(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<" -+ $(top_builddir)/env $(GUILD) compile --target="$(host)" $(GUILE_WARNINGS) -o "$@" "$<" - - SOURCES = json.scm - -diff --git a/configure.ac b/configure.ac -index fbc1aff..937dcf7 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -25,6 +25,7 @@ AC_CONFIG_SRCDIR(json.scm) - AC_CONFIG_AUX_DIR([build-aux]) - AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability]) - AM_SILENT_RULES([yes]) -+AC_CANONICAL_HOST - - dnl We require pkg.m4 (from pkg-config) and guile.m4. - dnl Make sure they are available. -diff --git a/json/Makefile.am b/json/Makefile.am -index adf5972..103b867 100644 ---- a/json/Makefile.am -+++ b/json/Makefile.am -@@ -36,4 +36,4 @@ CLEANFILES = $(GOBJECTS) - GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat - SUFFIXES = .scm .go - .scm.go: -- $(top_builddir)/env $(GUILD) compile $(GUILE_WARNINGS) -o "$@" "$<" -+ $(top_builddir)/env $(GUILD) compile --target="$(host)" $(GUILE_WARNINGS) -o "$@" "$<" --- -2.26.0 - -- cgit v1.2.3 From 3dbfab479f3eb4aa4f751f9365b7fe1f14254b3c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 12 Apr 2020 23:04:49 +0200 Subject: gnu: Add libtirpc/hurd. * gnu/packages/onc-rpc.scm (libtirpc/hurd): New variable. * gnu/packages/patches/libtirpc-hurd-client.patch, gnu/packages/patches/libtirpc-hurd.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. --- gnu/local.mk | 2 + gnu/packages/onc-rpc.scm | 19 ++- gnu/packages/patches/libtirpc-hurd-client.patch | 50 +++++++ gnu/packages/patches/libtirpc-hurd.patch | 172 ++++++++++++++++++++++++ 4 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libtirpc-hurd-client.patch create mode 100644 gnu/packages/patches/libtirpc-hurd.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ca6ccb2463..38e1d85b7b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1176,6 +1176,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 \ 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 ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2020 Ricardo Wurmus ;;; ;;; 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/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 + +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 +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 before using it. + - Define MAXHOSTNAMELEN to 64 if missing. + - Bind sockets on Hurd like on Linux. +Author: Petter Reinholdtsen + +--- 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 + #include + #include ++#ifdef HAVE_SYS_USER_H ++# include ++#endif /* HAVE_SYS_USER_H */ + + #include + #include +--- 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 + +--- 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 + #include + ++/* 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 -- cgit v1.2.3 From 3ba23f0582a432dfc04bfbf58f375f6643caae19 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 27 Apr 2020 19:54:03 +0200 Subject: gnu: Add relocatable static Guile 3.0 variant. * gnu/packages/patches/guile-2.2-default-utf8.patch: New file, extracted from commit 2acfe022a740f79b593348cc6362cc4ee8f33bb4. * gnu/packages/patches/guile-3.0-linux-syscalls.patch, gnu/packages/patches/guile-3.0-relocatable.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. Move all Guile patches together while at it. * gnu/packages/make-bootstrap.scm (%guile-3.0-static-stripped): New public variable. --- gnu/local.mk | 7 +- gnu/packages/make-bootstrap.scm | 11 +- gnu/packages/patches/guile-2.2-default-utf8.patch | 82 +++++ .../patches/guile-3.0-linux-syscalls.patch | 345 +++++++++++++++++++++ gnu/packages/patches/guile-3.0-relocatable.patch | 69 +++++ 5 files changed, 511 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/guile-2.2-default-utf8.patch create mode 100644 gnu/packages/patches/guile-3.0-linux-syscalls.patch create mode 100644 gnu/packages/patches/guile-3.0-relocatable.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 38e1d85b7b..0111ae2161 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1027,10 +1027,13 @@ dist_patch_DATA = \ %D%/packages/patches/guile-1.8-cpp-4.5.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 \ diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index d336818299..fe86f810bf 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -55,7 +55,8 @@ %mes-bootstrap-tarball %bootstrap-tarballs - %guile-static-stripped)) + %guile-static-stripped + %guile-3.0-static-stripped)) ;;; Commentary: ;;; @@ -797,6 +798,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ;; 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) diff --git a/gnu/packages/patches/guile-2.2-default-utf8.patch b/gnu/packages/patches/guile-2.2-default-utf8.patch new file mode 100644 index 0000000000..f55a6430c1 --- /dev/null +++ b/gnu/packages/patches/guile-2.2-default-utf8.patch @@ -0,0 +1,82 @@ +This hack makes Guile default to UTF-8. This avoids calls to +`iconv_open'; `iconv_open' tries to open shared objects that aren't +available during bootstrap, so using UTF-8 avoids that (and UTF-8 has +built-in conversions in glibc, too.) + +diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c +index 0ac5ea6a6..f73301e2f 100644 +--- a/libguile/bytevectors.c ++++ b/libguile/bytevectors.c +@@ -1931,7 +1931,7 @@ utf_encoding_name (char *name, size_t utf_width, SCM endianness) + if (scm_i_is_narrow_string (str)) \ + { \ + err = mem_iconveh (scm_i_string_chars (str), c_strlen, \ +- "ISO-8859-1", c_utf_name, \ ++ "UTF-8", c_utf_name, \ + iconveh_question_mark, NULL, \ + &c_utf, &c_utf_len); \ + if (SCM_UNLIKELY (err)) \ +diff --git a/libguile/ports.c b/libguile/ports.c +index 45e62f4e4..42012f3aa 100644 +--- a/libguile/ports.c ++++ b/libguile/ports.c +@@ -974,7 +974,9 @@ canonicalize_encoding (const char *enc) + char *ret; + int i; + +- if (!enc || encoding_matches (enc, sym_ISO_8859_1)) ++ if (enc == NULL) ++ return sym_UTF_8; ++ if (encoding_matches (enc, sym_ISO_8859_1)) + return sym_ISO_8859_1; + if (encoding_matches (enc, sym_UTF_8)) + return sym_UTF_8; +@@ -4198,7 +4200,7 @@ scm_init_ports (void) + scm_c_define ("%default-port-conversion-strategy", + scm_make_fluid_with_default (sym_substitute)); + /* Use the locale as the default port encoding. */ +- scm_i_set_default_port_encoding (locale_charset ()); ++ scm_i_set_default_port_encoding ("UTF-8"); + + scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION, + "scm_init_ice_9_ports", +diff --git a/libguile/strings.c b/libguile/strings.c +index 056b4c99f..63a6c050d 100644 +--- a/libguile/strings.c ++++ b/libguile/strings.c +@@ -1579,7 +1579,7 @@ scm_i_default_string_failed_conversion_handler (void) + SCM + scm_from_locale_stringn (const char *str, size_t len) + { +- return scm_from_stringn (str, len, locale_charset (), ++ return scm_from_stringn (str, len, "UTF-8", + scm_i_default_string_failed_conversion_handler ()); + } + +@@ -1907,7 +1907,7 @@ char * + scm_to_locale_stringn (SCM str, size_t *lenp) + { + return scm_to_stringn (str, lenp, +- locale_charset (), ++ "UTF-8", + scm_i_default_string_failed_conversion_handler ()); + } + +@@ -2195,7 +2195,7 @@ scm_to_stringn (SCM str, size_t *lenp, const char *encoding, + scm_wrong_type_arg_msg (NULL, 0, str, "string"); + + if (encoding == NULL) +- encoding = "ISO-8859-1"; ++ encoding = "UTF-8"; + + if (c_strcasecmp (encoding, "UTF-8") == 0) + /* This is the most common case--e.g., when calling libc bindings +@@ -2247,7 +2247,7 @@ scm_to_stringn (SCM str, size_t *lenp, const char *encoding, + if (scm_i_is_narrow_string (str)) + { + ret = mem_iconveh (scm_i_string_chars (str), ilen, +- "ISO-8859-1", encoding, ++ "UTF-8", encoding, + (enum iconv_ilseq_handler) handler, NULL, + &buf, &len); + 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 ++#include ++ ++#include "libguile/foreign.h" ++#include "libguile/bytevectors.h" ++#include ++ ++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 ++ ++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 . */ ++ ++#include ++#include ++#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 + #include + #include ++#include + #include + #include + #include +@@ -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 */ -- cgit v1.2.3 From 20d7dbc77a2b0ed379c0a595daf8d7f852ef3a4c Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 2 May 2020 12:00:11 +0100 Subject: gnu: python-gst: Fix build with Python 3.8. Add a patch based on an upstream commit [1]. 1: 10707f437f2fc3632067c6a0efa4432f7ebaf362 * gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gstreamer.scm (python-gst)[source]: Use the patch. --- gnu/local.mk | 1 + gnu/packages/gstreamer.scm | 4 ++- .../python-gst-fix-build-with-python-3.8.patch | 36 ++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0111ae2161..acfc5cec4d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1394,6 +1394,7 @@ dist_patch_DATA = \ %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 \ diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 93149e370e..7596796d68 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -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/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 -- cgit v1.2.3 From a8cb1e72ef351330d1521833c1b270dcc0da593f Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 2 May 2020 12:30:53 +0100 Subject: gnu: behave: Fix build with Python 3.8. Add a patch based on an upstream commit [1]. 1: c000c88eb5239b87f299c85e83b349b0ef387ae7 * gnu/packages/patches/behave-skip-a-couple-of-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/check.scm (behave)[source]: Use the patch. --- gnu/local.mk | 1 + gnu/packages/check.scm | 4 +- .../patches/behave-skip-a-couple-of-tests.patch | 462 +++++++++++++++++++++ 3 files changed, 466 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/behave-skip-a-couple-of-tests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index acfc5cec4d..f48c6803ee 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -774,6 +774,7 @@ dist_patch_DATA = \ %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 \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 05a796a3e3..2629e88323 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -2107,7 +2107,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) 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 +- @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 ++ # """ + + + 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 +- @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 ++ # """ + + @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 + + """ + ++ @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: ++ """ ++ ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # ++ ++ @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: ++ """ ++ " + + ++ @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: ++ """ ++ ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # ++ 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 " ++ ++ ++ @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 " ++ ++ ++ @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: ++ """ ++ ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # ++ 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 " +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 + ++ """ ++ # -- HINT FOR: Python < 3.8 ++ # 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: ++ """ ++ ++ """ ++ # -- HINT FOR: Python < 3.8 ++ #