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/packages/patches/bash-linux-pgrp-pipe.patch | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 gnu/packages/patches/bash-linux-pgrp-pipe.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/bash-linux-pgrp-pipe.patch b/gnu/packages/patches/bash-linux-pgrp-pipe.patch new file mode 100644 index 0000000000..234a55e897 --- /dev/null +++ b/gnu/packages/patches/bash-linux-pgrp-pipe.patch @@ -0,0 +1,32 @@ +Unconditionally enable PGRP_PIPE on Linux (the kernel), regardless of +the kernel version in use on the build machine. + +--- configure.ac.orig 2019-01-02 09:38:44.000000000 -0500 ++++ configure.ac 2019-08-15 16:40:24.271758379 -0400 +@@ -1108,10 +1108,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[[0123]]*) : ;; +- *) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; +--- configure.orig 2019-01-02 09:43:04.000000000 -0500 ++++ configure 2019-08-15 16:41:44.440155912 -0400 +@@ -16312,11 +16312,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[0123]*) : ;; +- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[67]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; -- 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/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 +++++++++++++++++++++ 3 files changed, 162 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/python-cross-compile.patch (limited to 'gnu/packages/patches') 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 + -- 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. --- .../patches/bc-fix-cross-compilation.patch | 171 +++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 gnu/packages/patches/bc-fix-cross-compilation.patch (limited to 'gnu/packages/patches') 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/packages/patches/file-CVE-2018-10360.patch | 27 ------------- gnu/packages/patches/file-CVE-2019-18218.patch | 55 ++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 27 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/packages/patches') 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/packages/patches/fribidi-CVE-2019-18397.patch | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 gnu/packages/patches/fribidi-CVE-2019-18397.patch (limited to 'gnu/packages/patches') 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 4554d6b77e0f306a3dc33a8c1f68c9a302967a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 14 Nov 2019 22:30:24 +0100 Subject: gnu: aspell: Truly honor $ASPELL_DICT_DIR. Fixes . Reported by Oleg Pykhalov . * gnu/packages/aspell.scm (aspell)[arguments]: Remove 'wrap-aspell' phase. * gnu/packages/patches/aspell-default-dict-dir.patch: Add hunk to expand the right-hand size of '|' in values like "<$FOO|$BAR/baz>". Change DICT_DIR to refer to "$HOME" on the right-hand side. --- gnu/packages/patches/aspell-default-dict-dir.patch | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/aspell-default-dict-dir.patch b/gnu/packages/patches/aspell-default-dict-dir.patch index 17a6ff606f..5f759a66d9 100644 --- a/gnu/packages/patches/aspell-default-dict-dir.patch +++ b/gnu/packages/patches/aspell-default-dict-dir.patch @@ -8,12 +8,34 @@ However it is necessary for applications that use libaspell since --- a/common/config.cpp +++ b/common/config.cpp +@@ -651,7 +651,20 @@ namespace acommon { + } else { // sep == '|' + assert(replace[0] == '$'); + const char * env = getenv(replace.c_str()+1); +- final_str += env ? env : second; ++ if (env) { ++ final_str += env; ++ } else if (second[0] == '$') { ++ // Expand the right-hand side of '|', which starts with a ++ // reference to an environment variable. ++ auto slash = second.find('/'); ++ String variable = second.substr(1, slash - 1); ++ const char * env = getenv(variable.c_str()); ++ String value = env ? String(env) : ""; ++ value += second.substr(slash, second.size() - slash); ++ final_str += value; ++ } else { ++ final_str += second; ++ } + } + replace = ""; + in_replace = false; @@ -1349,6 +1349,9 @@ namespace acommon { # define REPL ".aspell..prepl" #endif +#undef DICT_DIR -+#define DICT_DIR "<$ASPELL_DICT_DIR|home-dir/.guix-profile/lib/aspell>" ++#define DICT_DIR "<$ASPELL_DICT_DIR|$HOME/.guix-profile/lib/aspell>" + static const KeyInfo config_keys[] = { // the description should be under 50 chars -- cgit v1.2.3 From 2387e2f2d1839b79f13ddd832f9a008bb220eed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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/packages/patches/aspell-gcc-compat.patch | 31 ---------------------------- 1 file changed, 31 deletions(-) delete mode 100644 gnu/packages/patches/aspell-gcc-compat.patch (limited to 'gnu/packages/patches') 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/packages/patches/cyrus-sasl-ac-try-run-fix.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 gnu/packages/patches/cyrus-sasl-ac-try-run-fix.patch (limited to 'gnu/packages/patches') 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/packages/patches/boost-dumpversion.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 gnu/packages/patches/boost-dumpversion.patch (limited to 'gnu/packages/patches') 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. --- .../guile-sqlite3-fix-cross-compilation.patch | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch (limited to 'gnu/packages/patches') 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/packages/patches/gsl-test-i686.patch | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 gnu/packages/patches/gsl-test-i686.patch (limited to 'gnu/packages/patches') 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 e0fb90490e47e6304dd6f12f16b0b66df1c56c50 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 29 Nov 2019 23:47:24 +0100 Subject: gnu: ghostscript: Update to 9.50. * gnu/packages/ghostscript.scm (ghostscript): Update to 9.50. * gnu/packages/patches/ghostscript-no-header-id.patch: Adjust context. --- gnu/packages/patches/ghostscript-no-header-id.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/ghostscript-no-header-id.patch b/gnu/packages/patches/ghostscript-no-header-id.patch index da1aa5530f..45fc95fd6e 100644 --- a/gnu/packages/patches/ghostscript-no-header-id.patch +++ b/gnu/packages/patches/ghostscript-no-header-id.patch @@ -9,10 +9,10 @@ See: https://bugs.ghostscript.com/show_bug.cgi?id=698208 diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c --- orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c 2017-07-09 23:30:28.960479189 +0200 +++ gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c 2017-07-09 23:34:34.306524488 +0200 -@@ -1785,8 +1785,11 @@ +@@ -1810,8 +1810,11 @@ * +1 for the linearisation dict and +1 for the primary hint stream. */ - linear_params->FirsttrailerOffset = gp_ftell_64(linear_params->Lin_File.file); + linear_params->FirsttrailerOffset = gp_ftell(linear_params->Lin_File.file); - gs_sprintf(LDict, "\ntrailer\n<>\nstartxref\r\n0\n%%%%EOF\n \n", - linear_params->LastResource + 3, pdev->ResourceUsage[linear_params->Info_id].NewObjectNumber, pdev->ResourceUsage[linear_params->Catalog_id].NewObjectNumber, fileID, fileID, 0); + gs_sprintf(LDict, "\ntrailer\n<OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 && strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */ + gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID); + gs_sprintf(LDict, "/Prev %d>>\nstartxref\r\n0\n%%%%EOF\n \n", 0); - fwrite(LDict, strlen(LDict), 1, linear_params->Lin_File.file); + gp_fwrite(LDict, strlen(LDict), 1, linear_params->Lin_File.file); /* Write document catalog (Part 4) */ -@@ -2321,8 +2324,11 @@ +@@ -2346,8 +2349,11 @@ if (code != 0) return_error(gs_error_ioerror); @@ -34,10 +34,10 @@ diff -ur orig/gnu-ghostscript-9.14.0/devices/vector/gdevpdf.c gnu-ghostscript-9. + if (pdev->OwnerPassword.size > 0 || !(!getenv("GS_GENERATE_UUIDS") || (strcasecmp(getenv("GS_GENERATE_UUIDS"), "0") != 0 || strcasecmp(getenv("GS_GENERATE_UUIDS"), "no") != 0))) /* ID is mandatory when encrypting */ + gs_sprintf(LDict, "/ID[%s%s]", fileID, fileID); + gs_sprintf(LDict, "/Prev %"PRId64">>\nstartxref\r\n0\n%%%%EOF\n", mainxref); - fwrite(LDict, strlen(LDict), 1, linear_params->sfile); + gp_fwrite(LDict, strlen(LDict), 1, linear_params->sfile); - code = gp_fseek_64(linear_params->sfile, pdev->ResourceUsage[HintStreamObj].LinearisedOffset, SEEK_SET); -@@ -3016,10 +3022,12 @@ + code = gp_fseek(linear_params->sfile, pdev->ResourceUsage[HintStreamObj].LinearisedOffset, SEEK_SET); +@@ -3012,10 +3018,12 @@ stream_puts(s, "trailer\n"); pprintld3(s, "<< /Size %ld /Root %ld 0 R /Info %ld 0 R\n", pdev->next_id, Catalog_id, Info_id); -- 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/packages/patches/glibc-CVE-2019-19126.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 gnu/packages/patches/glibc-CVE-2019-19126.patch (limited to 'gnu/packages/patches') 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. --- .../patches/libffi-3.2.1-complex-alpha.patch | 28 ---------------------- 1 file changed, 28 deletions(-) delete mode 100644 gnu/packages/patches/libffi-3.2.1-complex-alpha.patch (limited to 'gnu/packages/patches') 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 - -- 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/packages/patches/findutils-gnulib-libio.patch | 114 ---------------------- gnu/packages/patches/findutils-makedev.patch | 22 ----- gnu/packages/patches/findutils-test-xargs.patch | 22 ----- 3 files changed, 158 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/packages/patches') 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 47c4c1fe236ee9318838492c95dabc65648eb0ed Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 3 Dec 2019 00:14:06 +0100 Subject: gnu: CMake: Update to 3.16.0. * gnu/packages/cmake.scm (cmake-minimal): Update to 3.16.0. [arguments]: Adjust for renamed file. Disable test RunCMake.install. * gnu/packages/patches/cmake-curl-certificates.patch: Adjust context. --- gnu/packages/patches/cmake-curl-certificates.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/cmake-curl-certificates.patch b/gnu/packages/patches/cmake-curl-certificates.patch index 36252083f8..7fe2615271 100644 --- a/gnu/packages/patches/cmake-curl-certificates.patch +++ b/gnu/packages/patches/cmake-curl-certificates.patch @@ -6,19 +6,19 @@ as well as /etc/ssl/certs. --- cmake-3.13.1/Source/cmCurl.cxx 2019-09-10 17:27:36.926907260 +0200 +++ cmake-3.13.1/Source/cmCurl.cxx 2019-09-10 17:52:35.475903919 +0200 -@@ -4,11 +4,8 @@ - - #include "cmThirdParty.h" +@@ -2,11 +2,8 @@ + file Copyright.txt or https://cmake.org/licensing for details. */ + #include "cmCurl.h" -#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ - !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) # define CMAKE_FIND_CAFILE # include "cmSystemTools.h" -#endif + #include "cmStringAlgorithms.h" // curl versions before 7.21.5 did not provide this error code - #if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505 -@@ -29,6 +26,19 @@ std::string cmCurlSetCAInfo(::CURL* curl +@@ -30,6 +27,19 @@ ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile); check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); } -- 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/packages/patches/swig-guile-gc.patch | 76 -------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 gnu/packages/patches/swig-guile-gc.patch (limited to 'gnu/packages/patches') 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")) { -- cgit v1.2.3 From 33c1c4c95fc8311606f1d513a06bc365607d4f6c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 3 Dec 2019 00:19:20 +0100 Subject: gnu: doxygen: Update to 1.8.16. * gnu/packages/documentation.scm (doxygen): Update to 1.8.16. [arguments]: Add phase 'remove-git-requirement'. * gnu/packages/patches/doxygen-test.patch: Adjust for upstream changes. --- gnu/packages/patches/doxygen-test.patch | 38 ++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/doxygen-test.patch b/gnu/packages/patches/doxygen-test.patch index 8ccb9ec3c4..a2da54a3fa 100644 --- a/gnu/packages/patches/doxygen-test.patch +++ b/gnu/packages/patches/doxygen-test.patch @@ -5,19 +5,40 @@ test. diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012/citelist.xml --- doxygen-1.8.7.orig/testing/012/citelist.xml 2014-04-24 23:43:34.000000000 +0200 +++ doxygen-1.8.7/testing/012/citelist.xml 2014-04-24 23:49:43.000000000 +0200 -@@ -6,17 +6,6 @@ +@@ -6,38 +6,6 @@ - - - -- [1] +- [1] +- +- +- P.Belotti. Disjunctive cuts for non-convex MINLP. In Lee and Leyffer [4], pages 117144. +- +- +- +- [2] +- +- +- T.Berthold, S.Heinz, and S.Vigerske. Extending a CIP framework to solve MIQCPs. In Lee and Leyffer [4], pages 427444. +- +- +- +- [3] - - - DonaldE. Knuth. Tex and Metafont, New Directions in Typesetting. American Mathematical Society and Digital Press, Stanford, 1979. - - +- +- [4] +- +- +- Jon Lee and Sven Leyffer, editors. Mixed Integer Nonlinear Programming, volume 154 of The IMA Volumes in Mathematics and its Applications. Springer, 2012. +- +- - - @@ -26,13 +47,14 @@ diff -u -r doxygen-1.8.7.orig/testing/012/citelist.xml doxygen-1.8.7/testing/012 diff -u -r doxygen-1.8.7.orig/testing/012/indexpage.xml doxygen-1.8.7/testing/012/indexpage.xml --- doxygen-1.8.7.orig/testing/012/indexpage.xml 2014-04-24 23:43:34.000000000 +0200 +++ doxygen-1.8.7/testing/012/indexpage.xml 2014-04-24 23:44:05.000000000 +0200 -@@ -4,7 +4,7 @@ - index - My Project +@@ -6,8 +6,8 @@ + + -- See [1] for more info. -+ See knuth79 for more info. +- See [3] for more info. +- Oter references with crosreference see [1] and [2] for more info. ++ See knuth79 for more info. ++ Oter references with crosreference see Be09 and BertholdHeinzVigerske2009 for more info. - -- cgit v1.2.3 From badcb119c57fe1a6fc617d2f4a237c1192305584 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 2 Dec 2019 22:42:44 +0100 Subject: gnu: libxslt: Update to 1.1.34. * gnu/packages/xml.scm (libxslt): Update to 1.1.34. [arguments]: Add phase to disable fuzz tests. * gnu/packages/patches/libxslt-generated-ids.patch: Adjust for upstream changes. --- gnu/packages/patches/libxslt-generated-ids.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/libxslt-generated-ids.patch b/gnu/packages/patches/libxslt-generated-ids.patch index 4273875c7c..1cd2363d6a 100644 --- a/gnu/packages/patches/libxslt-generated-ids.patch +++ b/gnu/packages/patches/libxslt-generated-ids.patch @@ -162,10 +162,10 @@ diff --git a/libxslt/xsltInternals.h b/libxslt/xsltInternals.h index 95e8fe6..8eedae4 100644 --- a/libxslt/xsltInternals.h +++ b/libxslt/xsltInternals.h -@@ -1786,6 +1786,8 @@ struct _xsltTransformContext { - int funcLevel; /* Needed to catch recursive functions issues */ - int maxTemplateDepth; +@@ -1782,6 +1782,8 @@ struct _xsltTransformContext { int maxTemplateVars; + unsigned long opLimit; + unsigned long opCount; + + unsigned long nextid;/* for generating stable ids */ }; -- 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. --- .../patches/giflib-make-reallocarray-private.patch | 120 --------------------- 1 file changed, 120 deletions(-) delete mode 100644 gnu/packages/patches/giflib-make-reallocarray-private.patch (limited to 'gnu/packages/patches') 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/packages/patches/tcsh-fix-autotest.patch | 45 ++-------------------- .../patches/tcsh-fix-out-of-bounds-read.patch | 31 --------------- 2 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 gnu/packages/patches/tcsh-fix-out-of-bounds-read.patch (limited to 'gnu/packages/patches') 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; -- 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. --- .../patches/tcl-fix-cross-compilation.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 gnu/packages/patches/tcl-fix-cross-compilation.patch (limited to 'gnu/packages/patches') 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 == '-') { -- 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/packages/patches/webkitgtk-icu-65.patch | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 gnu/packages/patches/webkitgtk-icu-65.patch (limited to 'gnu/packages/patches') 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 }; -- 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/packages/patches/dconf-meson-0.52.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gnu/packages/patches/dconf-meson-0.52.patch (limited to 'gnu/packages/patches') 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/packages/patches/network-manager-gettid.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gnu/packages/patches/network-manager-gettid.patch (limited to 'gnu/packages/patches') 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/packages/patches/fribidi-CVE-2019-18397.patch | 26 ----------------------- 1 file changed, 26 deletions(-) delete mode 100644 gnu/packages/patches/fribidi-CVE-2019-18397.patch (limited to 'gnu/packages/patches') 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. --- .../patches/libjpeg-turbo-CVE-2019-2201.patch | 31 ---------------------- 1 file changed, 31 deletions(-) delete mode 100644 gnu/packages/patches/libjpeg-turbo-CVE-2019-2201.patch (limited to 'gnu/packages/patches') 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/packages/patches/doxygen-1.8.17-runtests.patch | 73 ++++++++++++++++++++++ gnu/packages/patches/doxygen-test.patch | 4 +- 2 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/doxygen-1.8.17-runtests.patch (limited to 'gnu/packages/patches') 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/packages/patches/boost-dumpversion.patch | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 gnu/packages/patches/boost-dumpversion.patch (limited to 'gnu/packages/patches') 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/packages/patches/vigra-python-compat.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gnu/packages/patches/vigra-python-compat.patch (limited to 'gnu/packages/patches') 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/packages/patches/network-manager-gettid.patch | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 gnu/packages/patches/network-manager-gettid.patch (limited to 'gnu/packages/patches') 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/packages/patches/pango-skip-libthai-test.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gnu/packages/patches/pango-skip-libthai-test.patch (limited to 'gnu/packages/patches') 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'. --- .../patches/texlive-bin-CVE-2018-17407.patch | 249 ----------------- .../texlive-bin-luatex-poppler-compat.patch | 293 --------------------- .../patches/texlive-bin-poppler-0.83.patch | 52 ++++ 3 files changed, 52 insertions(+), 542 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/packages/patches') 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; + } -- 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. --- .../patches/findutils-test-rwlock-threads.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 gnu/packages/patches/findutils-test-rwlock-threads.patch (limited to 'gnu/packages/patches') 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/packages/patches/file-CVE-2019-18218.patch | 55 -------------------------- 1 file changed, 55 deletions(-) delete mode 100644 gnu/packages/patches/file-CVE-2019-18218.patch (limited to 'gnu/packages/patches') 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: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= 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/packages/patches/curl-use-ssl-cert-env.patch | 64 ++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 gnu/packages/patches/curl-use-ssl-cert-env.patch (limited to 'gnu/packages/patches') 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. --- .../patches/ghostscript-CVE-2019-14869.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 gnu/packages/patches/ghostscript-CVE-2019-14869.patch (limited to 'gnu/packages/patches') 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/packages/patches/make-glibc-compat.patch | 52 ---------------------------- gnu/packages/patches/make-impure-dirs.patch | 12 +++---- 2 files changed, 6 insertions(+), 58 deletions(-) delete mode 100644 gnu/packages/patches/make-glibc-compat.patch (limited to 'gnu/packages/patches') 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/packages/patches/python-3-search-paths.patch | 28 +++++++++++----------- gnu/packages/patches/python-3.8-search-paths.patch | 17 ------------- 2 files changed, 14 insertions(+), 31 deletions(-) delete mode 100644 gnu/packages/patches/python-3.8-search-paths.patch (limited to 'gnu/packages/patches') 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 -- 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. --- .../patches/python-cffi-x87-stack-clean.patch | 29 ---------------------- 1 file changed, 29 deletions(-) delete mode 100644 gnu/packages/patches/python-cffi-x87-stack-clean.patch (limited to 'gnu/packages/patches') 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/packages/patches/webkitgtk-icu-65.patch | 47 ----------------------------- 1 file changed, 47 deletions(-) delete mode 100644 gnu/packages/patches/webkitgtk-icu-65.patch (limited to 'gnu/packages/patches') 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 }; -- cgit v1.2.3 From 2073b55e6b964cb8ca15e8c74cb32dac00f05f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 6 Feb 2020 15:32:00 +0100 Subject: gnu: gcc: Switch back to using 'C_INCLUDE_PATH' instead of 'CPATH'. Fixes . Initially reported by Julien Lepiller . * gnu/packages/base.scm (make-gcc-libc): Remove 'treat-glibc-as-system-header' phase from 'arguments'. * gnu/packages/commencement.scm (gcc-final): Likewise. * gnu/packages/gcc.scm (gcc-4.7)[arguments]: Add "include/c++" to 'CPLUS_INCLUDE_PATH'. (gcc-6)[native-search-paths]: Remove. * gnu/packages/make-bootstrap.scm (gcc-for-bootstrap): Remove 'native-search-paths' and 'arguments'. * gnu/packages/patches/python-2.7-search-paths.patch, gnu/packages/patches/python-3-search-paths.patch: Replace "CPATH" with "C_INCLUDE_PATH". * guix/build-system/cmake.scm (lower): When not cross-compiling, move INPUTS from the 'host-inputs' field to the 'build-inputs' field of the bag, right after NATIVE-INPUTS. * guix/build-system/glib-or-gtk.scm (lower): Likewise. * guix/build-system/gnu.scm (lower): Likewise. * guix/build-system/meson.scm (lower): Likewise. --- gnu/packages/patches/python-2.7-search-paths.patch | 4 ++-- gnu/packages/patches/python-3-search-paths.patch | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/python-2.7-search-paths.patch b/gnu/packages/patches/python-2.7-search-paths.patch index 5a345c7691..3318f44d23 100644 --- a/gnu/packages/patches/python-2.7-search-paths.patch +++ b/gnu/packages/patches/python-2.7-search-paths.patch @@ -1,4 +1,4 @@ -Make sure the build system honors CPATH and LIBRARY_PATH when +Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when looking for headers and libraries. --- Python-2.7.10/setup.py 2015-10-07 18:33:18.125153186 +0200 @@ -10,7 +10,7 @@ looking for headers and libraries. + # Always honor these variables. + if not cross_compiling: + lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep) -+ inc_dirs += os.getenv('CPATH', '').split(os.pathsep) ++ inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) + else: + lib_dirs = os.getenv('CROSS_LIBRARY_PATH', '').split(os.pathsep) + inc_dirs = os.getenv('CROSS_CPATH', '').split(os.pathsep) diff --git a/gnu/packages/patches/python-3-search-paths.patch b/gnu/packages/patches/python-3-search-paths.patch index aaf7236631..612201d1f2 100644 --- a/gnu/packages/patches/python-3-search-paths.patch +++ b/gnu/packages/patches/python-3-search-paths.patch @@ -1,4 +1,4 @@ -Make sure the build system honors CPATH and LIBRARY_PATH when +Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when looking for headers and libraries. --- a/setup.py 2015-10-07 23:32:58.891329173 +0200 @@ -10,7 +10,7 @@ looking for headers and libraries. - 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) ++ self.inc_dirs = os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) else: # Add the sysroot paths. 'sysroot' is a compiler option used to # set the logical path of the standard system headers and -- 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. --- .../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 ++-- 7 files changed, 310 insertions(+), 6 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/packages/patches') 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. --- .../patches/telepathy-glib-channel-memory-leak.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gnu/packages/patches/telepathy-glib-channel-memory-leak.patch (limited to 'gnu/packages/patches') 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. --- .../patches/libgpg-error-gawk-compat.patch | 155 --------------------- 1 file changed, 155 deletions(-) delete mode 100644 gnu/packages/patches/libgpg-error-gawk-compat.patch (limited to 'gnu/packages/patches') 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: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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/packages/patches/datefudge-gettimeofday.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 gnu/packages/patches/datefudge-gettimeofday.patch (limited to 'gnu/packages/patches') 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); + } -- cgit v1.2.3 From f6b911fb5f99b0677c0f94b195b140e464195e9b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 6 Oct 2019 21:19:35 +0200 Subject: gnu: commencement: glibc-mesboot0: Use Gash instead of coretutils&co. * gnu/packages/commencement.scm (glibc-mesboot0): Use Gash instead of coretutils&co. --- .../patches/glibc-bootstrap-system-2.2.5.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gnu/packages/patches/glibc-bootstrap-system-2.2.5.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/glibc-bootstrap-system-2.2.5.patch b/gnu/packages/patches/glibc-bootstrap-system-2.2.5.patch new file mode 100644 index 0000000000..d11fc00c75 --- /dev/null +++ b/gnu/packages/patches/glibc-bootstrap-system-2.2.5.patch @@ -0,0 +1,30 @@ +We want to allow builds in chroots that lack /bin/sh. Thus, system(3) +and popen(3) need to be tweaked to use the right shell. For the bootstrap +glibc, we just use whatever `sh' can be found in $PATH. The final glibc +instead uses the hard-coded absolute file name of `bash'. + +--- a/sysdeps/posix/system.c ++++ b/sysdeps/posix/system.c +@@ -106,8 +106,8 @@ do_system (const char *line) + (void) UNBLOCK; + + /* Exec the shell. */ +- (void) __execve (SHELL_PATH, (char *const *) new_argv, __environ); ++ (void) execvp (SHELL_NAME, (char *const *) new_argv); + _exit (127); + } + else if (pid < (pid_t) 0) + /* The fork failed. */ +--- a/libio/iopopen.c ++++ b/libio/iopopen.c +@@ -170,7 +170,7 @@ _IO_new_proc_open (fp, command, mode) + for (p = proc_file_chain; p; p = p->next) + _IO_close (_IO_fileno ((_IO_FILE *) p)); + +- _IO_execl ("/bin/sh", "sh", "-c", command, (char *) 0); ++ execlp ("sh", "sh", "-c", command, (char *) 0); + _IO__exit (127); + } + _IO_close (child_end); + + -- 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/packages/patches/gcc-boot-4.6.4.patch | 55 +++++++++++++++++++++++++ gnu/packages/patches/gcc-boot-4.7.4.patch | 68 ------------------------------- 2 files changed, 55 insertions(+), 68 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/packages/patches') 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. --- ...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 ++++++++++++++++++++++ 3 files changed, 160 insertions(+) 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/packages/patches') 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/packages/patches/texlive-bin-poppler-0.86.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gnu/packages/patches/texlive-bin-poppler-0.86.patch (limited to 'gnu/packages/patches') 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(); -- 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/packages/patches/coreutils-ls.patch | 117 ++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 gnu/packages/patches/coreutils-ls.patch (limited to 'gnu/packages/patches') 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 bda4b5e0453e4c8feda24306b4aa76ad5406eb7d Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 10 Mar 2020 14:16:27 +0100 Subject: gnu: python: Fix cross-compilation. This is a follow-up of 89da127035737bdf922bc566970c5506c2e01b00. * gnu/packages/patches/python-3-search-paths.patch: Use CROSS_C_INCLUDE_PATH instead of CROSS_CPATH. --- gnu/packages/patches/python-3-search-paths.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/python-3-search-paths.patch b/gnu/packages/patches/python-3-search-paths.patch index 612201d1f2..df01d3b933 100644 --- a/gnu/packages/patches/python-3-search-paths.patch +++ b/gnu/packages/patches/python-3-search-paths.patch @@ -19,7 +19,7 @@ looking for headers and libraries. + 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) + ++ self.inc_dirs = (os.getenv('CROSS_C_INCLUDE_PATH', '').split(os.pathsep) + sysroot_paths(('CPPFLAGS', 'CFLAGS', 'CC'), system_include_dirs)) -- 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. --- .../patches/guile-finalization-crash.patch | 61 ---------------------- 1 file changed, 61 deletions(-) delete mode 100644 gnu/packages/patches/guile-finalization-crash.patch (limited to 'gnu/packages/patches') 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/packages/patches/fifengine-swig-compat.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gnu/packages/patches/fifengine-swig-compat.patch (limited to 'gnu/packages/patches') 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/packages/patches/jbig2dec-ignore-testtest.patch | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 gnu/packages/patches/jbig2dec-ignore-testtest.patch (limited to 'gnu/packages/patches') 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. --- .../patches/ghostscript-CVE-2019-14869.patch | 48 ---------------------- .../patches/ghostscript-no-header-uuid.patch | 12 +++--- 2 files changed, 5 insertions(+), 55 deletions(-) delete mode 100644 gnu/packages/patches/ghostscript-CVE-2019-14869.patch (limited to 'gnu/packages/patches') 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. --- .../patches/mit-krb5-qualify-short-hostnames.patch | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 gnu/packages/patches/mit-krb5-qualify-short-hostnames.patch (limited to 'gnu/packages/patches') 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/packages/patches/avahi-CVE-2018-1000845.patch | 42 ----------------------- 1 file changed, 42 deletions(-) delete mode 100644 gnu/packages/patches/avahi-CVE-2018-1000845.patch (limited to 'gnu/packages/patches') 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. --- .../patches/gcc-9-libsanitizer-mode-size.patch | 58 ---------------------- 1 file changed, 58 deletions(-) delete mode 100644 gnu/packages/patches/gcc-9-libsanitizer-mode-size.patch (limited to 'gnu/packages/patches') 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. --- .../patches/gcc-7-cross-toolexeclibdir.patch | 1041 ++++++++++++++++++++ 1 file changed, 1041 insertions(+) create mode 100644 gnu/packages/patches/gcc-7-cross-toolexeclibdir.patch (limited to 'gnu/packages/patches') 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. --- .../patches/ghc-testsuite-dlopen-pie.patch | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 gnu/packages/patches/ghc-testsuite-dlopen-pie.patch (limited to 'gnu/packages/patches') 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. --- ...dont-pass-linker-flags-via-response-files.patch | 27 ---------------------- 1 file changed, 27 deletions(-) delete mode 100644 gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch (limited to 'gnu/packages/patches') 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. --- .../grub-verifiers-Blocklist-fallout-cleanup.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 gnu/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch (limited to 'gnu/packages/patches') 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); + -- 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. --- .../glibc-hurd-clock_gettime_monotonic.patch | 84 ++++++++++++++++++++ .../patches/glibc-hurd-clock_t_centiseconds.patch | 90 ++++++++++++++++++++++ 2 files changed, 174 insertions(+) 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/packages/patches') 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. --- .../patches/glibc-hurd-signal-sa-siginfo.patch | 637 +++++++++++++++++++++ 1 file changed, 637 insertions(+) create mode 100644 gnu/packages/patches/glibc-hurd-signal-sa-siginfo.patch (limited to 'gnu/packages/patches') 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/packages/patches/guile-2.2-default-utf8.patch | 82 ----------------------- gnu/packages/patches/guile-relocatable.patch | 36 +++++++--- 2 files changed, 25 insertions(+), 93 deletions(-) delete mode 100644 gnu/packages/patches/guile-2.2-default-utf8.patch (limited to 'gnu/packages/patches') 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/packages/patches/gcc-5-hurd.patch | 63 +++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 gnu/packages/patches/gcc-5-hurd.patch (limited to 'gnu/packages/patches') 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/packages/patches/hurd-cross.patch | 33 ++++++++++++++++++++++ .../hurd-fix-eth-multiplexer-dependency.patch | 26 ----------------- 2 files changed, 33 insertions(+), 26 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/packages/patches') 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/packages/patches/less-hurd-path-max.patch | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gnu/packages/patches/less-hurd-path-max.patch (limited to 'gnu/packages/patches') 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/packages/patches/fontconfig-hurd-path-max.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gnu/packages/patches/fontconfig-hurd-path-max.patch (limited to 'gnu/packages/patches') 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/packages/patches/pciutils-hurd-configure.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 gnu/packages/patches/pciutils-hurd-configure.patch (limited to 'gnu/packages/patches') 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}" -- 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/packages/patches/shepherd-hurd.patch | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 gnu/packages/patches/shepherd-hurd.patch (limited to 'gnu/packages/patches') 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/packages/patches/inetutils-hurd.patch | 583 ++++++++++++++++++++++++++++++ 1 file changed, 583 insertions(+) create mode 100644 gnu/packages/patches/inetutils-hurd.patch (limited to 'gnu/packages/patches') 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/packages/patches/screen-hurd-path-max.patch | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 gnu/packages/patches/screen-hurd-path-max.patch (limited to 'gnu/packages/patches') 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 -- 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/packages/patches/shadow-hurd-pctrl.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 gnu/packages/patches/shadow-hurd-pctrl.patch (limited to 'gnu/packages/patches') 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/packages/patches/mit-krb5-hurd.patch | 165 +++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 gnu/packages/patches/mit-krb5-hurd.patch (limited to 'gnu/packages/patches') 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/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 ---- 7 files changed, 64 insertions(+), 545 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/packages/patches') 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/packages/patches/potrace-tests.patch | 50 -------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 gnu/packages/patches/potrace-tests.patch (limited to 'gnu/packages/patches') 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. --- .../patches/openssl-1.1.1e-revert-detect-eof.patch | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch (limited to 'gnu/packages/patches') 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"}, -- 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/packages/patches/guile-3.0-crash.patch | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 gnu/packages/patches/guile-3.0-crash.patch (limited to 'gnu/packages/patches') 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/packages/patches/qtbase-moc-ignore-gcc-macro.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gnu/packages/patches/qtbase-moc-ignore-gcc-macro.patch (limited to 'gnu/packages/patches') 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; -- 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. --- .../patches/openssl-1.1.1e-revert-detect-eof.patch | 80 ---------------------- 1 file changed, 80 deletions(-) delete mode 100644 gnu/packages/patches/openssl-1.1.1e-revert-detect-eof.patch (limited to 'gnu/packages/patches') 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"}, -- 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/packages/patches/python-3-arm-alignment.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 gnu/packages/patches/python-3-arm-alignment.patch (limited to 'gnu/packages/patches') 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 -- 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/packages/patches/libreoffice-poppler-compat.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gnu/packages/patches/libreoffice-poppler-compat.patch (limited to 'gnu/packages/patches') 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/packages/patches/aegisub-make43.patch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 gnu/packages/patches/aegisub-make43.patch (limited to 'gnu/packages/patches') 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) $@ -- 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. --- .../patches/python-pycrypto-time-clock.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gnu/packages/patches/python-pycrypto-time-clock.patch (limited to 'gnu/packages/patches') 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))))) + + -- cgit v1.2.3 From 7aad4609ae38790b7cc4e6a88b3e48ab43bc1f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= 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/packages/patches/glibc-hurd-mach-print.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gnu/packages/patches/glibc-hurd-mach-print.patch (limited to 'gnu/packages/patches') 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/packages/patches/glibc-hurd-gettyent.patch | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gnu/packages/patches/glibc-hurd-gettyent.patch (limited to 'gnu/packages/patches') 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 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/packages/patches/openssh-hurd.patch | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gnu/packages/patches/openssh-hurd.patch (limited to 'gnu/packages/patches') 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 + -- 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/packages/patches/guile-json-cross.patch | 54 +++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 gnu/packages/patches/guile-json-cross.patch (limited to 'gnu/packages/patches') 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/packages/patches/gnutls-cross.patch | 82 +++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 gnu/packages/patches/gnutls-cross.patch (limited to 'gnu/packages/patches') 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 + -- 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/packages/patches/linphoneqt-tabbutton.patch | 96 +++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 gnu/packages/patches/linphoneqt-tabbutton.patch (limited to 'gnu/packages/patches') 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 162048be3b838e221e5256b0f670ac6f884f607a Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Tue, 17 Dec 2019 11:01:23 -0500 Subject: gnu: evolution-data-server: Update to 3.34.2. * gnu/packages/gnome.scm (evolution-data-server): Update to 3.34.2. [arguments]: Adjust 'disable-failing-tests' phase. * gnu/packages/patches/evolution-data-server-libical-compat.patch: Update patch. (cherry picked from commit 3febbdc80004c907507dbf4162bf6e7bfde74d28) --- .../patches/evolution-data-server-libical-compat.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/evolution-data-server-libical-compat.patch b/gnu/packages/patches/evolution-data-server-libical-compat.patch index a988519ea0..da4302d42e 100644 --- a/gnu/packages/patches/evolution-data-server-libical-compat.patch +++ b/gnu/packages/patches/evolution-data-server-libical-compat.patch @@ -8,29 +8,29 @@ Adapted from upstream: https://gitlab.gnome.org/GNOME/evolution-data-server/commit/77384ab552c19bf374dbeda53dc37f98d07bd4ec diff --git a/CMakeLists.txt b/CMakeLists.txt +index e16b8b225..b3c881967 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -108,7 +108,7 @@ +@@ -111,7 +111,7 @@ add_definitions(-DSOUP_VERSION_MIN_REQUIRED=${soup_encoded_version}) set(gcr_minimum_version 3.4) set(libgdata_minimum_version 0.15.1) --set(libical_minimum_version 2.0) -+set(libical_minimum_version 3.0.7) +-set(libical_glib_minimum_version 3.0.5) ++set(libical_glib_minimum_version 3.0.7) set(libsecret_minimum_version 0.5) set(libxml_minimum_version 2.0.0) set(sqlite_minimum_version 3.7.17) diff --git a/src/calendar/libedata-cal/e-cal-meta-backend.c b/src/calendar/libedata-cal/e-cal-meta-backend.c -index 7501f2a43dcc3af91e93e89751caf76e77c2ac23..93f4806ba2c5193f746e9fae5bf74d08ad05f8bf 100644 +index 7501f2a43..93f4806ba 100644 --- a/src/calendar/libedata-cal/e-cal-meta-backend.c +++ b/src/calendar/libedata-cal/e-cal-meta-backend.c -@@ -3958,9 +3958,8 @@ +@@ -4067,8 +4067,7 @@ e_cal_meta_backend_inline_local_attachments_sync (ECalMetaBackend *meta_backend, gchar *base64; base64 = g_base64_encode ((const guchar *) content, len); -- new_attach = icalattach_new_from_data (base64, NULL, NULL); -+ new_attach = icalattach_new_from_data (base64, (GFunc) g_free, NULL); +- new_attach = i_cal_attach_new_from_data (base64, NULL, NULL); ++ new_attach = i_cal_attach_new_from_data (base64, (GFunc) g_free, NULL); g_free (content); - g_free (base64); ecmb_remove_all_but_filename_parameter (prop); - -- 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) --- .../patches/gnome-shell-disable-test.patch | 25 ++++++++++++++++++ gnu/packages/patches/gnome-shell-theme.patch | 30 ++++++++++------------ 2 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 gnu/packages/patches/gnome-shell-disable-test.patch (limited to 'gnu/packages/patches') 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) --- .../seahorse-gkr-use-0-on-empty-flags.patch | 32 ---------------------- 1 file changed, 32 deletions(-) delete mode 100644 gnu/packages/patches/seahorse-gkr-use-0-on-empty-flags.patch (limited to 'gnu/packages/patches') 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 45b320d9f8e3e0780d1d47474b46edfa4a590ad7 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Sat, 18 Apr 2020 18:34:51 -0400 Subject: gnu: gdm: Update patch for GDM 3.34. * gnu/packages/patches/gdm-default-session.patch: Update patch for new version of GDM. --- gnu/packages/patches/gdm-default-session.patch | 44 ++++++++++++-------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/gdm-default-session.patch b/gnu/packages/patches/gdm-default-session.patch index 4839a04de4..9ab2829cdb 100644 --- a/gnu/packages/patches/gdm-default-session.patch +++ b/gnu/packages/patches/gdm-default-session.patch @@ -5,11 +5,10 @@ and not in the directories listed in $XDG_DATA_DIRS. The latter includes Fixes . -diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c -index 6a116a8..02c1458 100644 ---- a/daemon/gdm-session.c -+++ b/daemon/gdm-session.c -@@ -348,24 +348,18 @@ get_system_session_dirs (GdmSession *self) +diff -ur a/daemon/gdm-session.c b/daemon/gdm-session.c +--- a/daemon/gdm-session.c 2019-09-25 10:40:24.000000000 -0400 ++++ b/daemon/gdm-session.c 2020-04-18 18:30:02.671856808 -0400 +@@ -348,24 +348,18 @@ GArray *search_array = NULL; char **search_dirs; int i; @@ -35,7 +34,7 @@ index 6a116a8..02c1458 100644 g_array_append_vals (search_array, x_search_dirs, G_N_ELEMENTS (x_search_dirs)); #ifdef ENABLE_WAYLAND_SUPPORT -@@ -373,16 +367,7 @@ get_system_session_dirs (GdmSession *self) +@@ -373,16 +367,7 @@ #ifdef ENABLE_USER_DISPLAY_SERVER g_array_prepend_val (search_array, wayland_search_dir); @@ -52,40 +51,39 @@ index 6a116a8..02c1458 100644 g_array_append_val (search_array, wayland_search_dir); #endif } -diff --git a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c -index afbc5c0..bb5e3e6 100644 ---- a/libgdm/gdm-sessions.c -+++ b/libgdm/gdm-sessions.c -@@ -238,19 +238,11 @@ collect_sessions (void) +diff -ur a/libgdm/gdm-sessions.c b/libgdm/gdm-sessions.c +--- a/libgdm/gdm-sessions.c 2019-10-07 04:53:35.000000000 -0400 ++++ b/libgdm/gdm-sessions.c 2020-04-18 18:31:42.491348691 -0400 +@@ -245,19 +245,12 @@ "/etc/X11/sessions/", DMCONFDIR "/Sessions/", DATADIR "/gdm/BuiltInSessions/", - DATADIR "/xsessions/", -- NULL + "/run/current-system/profile/share/xsessions/" }; - xorg_search_array = g_array_new (TRUE, TRUE, sizeof (char *)); + names_seen_before = g_hash_table_new (g_str_hash, g_str_equal); + xorg_search_array = g_ptr_array_new_with_free_func (g_free); - const gchar * const *system_data_dirs = g_get_system_data_dirs (); - - for (i = 0; system_data_dirs[i]; i++) { - session_dir = g_build_filename (system_data_dirs[i], "xsessions", NULL); -- g_array_append_val (xorg_search_array, session_dir); +- g_ptr_array_add (xorg_search_array, session_dir); - } - - g_array_append_vals (xorg_search_array, xorg_search_dirs, G_N_ELEMENTS (xorg_search_dirs)); - - #ifdef ENABLE_WAYLAND_SUPPORT -@@ -261,11 +253,6 @@ collect_sessions (void) + for (i = 0; i < G_N_ELEMENTS (xorg_search_dirs); i++) { + g_ptr_array_add (xorg_search_array, g_strdup (xorg_search_dirs[i])); + } +@@ -269,11 +262,6 @@ - wayland_search_array = g_array_new (TRUE, TRUE, sizeof (char *)); + wayland_search_array = g_ptr_array_new_with_free_func (g_free); - for (i = 0; system_data_dirs[i]; i++) { - session_dir = g_build_filename (system_data_dirs[i], "wayland-sessions", NULL); -- g_array_append_val (wayland_search_array, session_dir); +- g_ptr_array_add (wayland_search_array, session_dir); - } - - g_array_append_vals (wayland_search_array, wayland_search_dirs, G_N_ELEMENTS (wayland_search_dirs)); - #endif - + for (i = 0; i < G_N_ELEMENTS (wayland_search_dirs); i++) { + g_ptr_array_add (wayland_search_array, g_strdup (wayland_search_dirs[i])); + } -- 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/packages/patches/perl-cross.patch | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 gnu/packages/patches/perl-cross.patch (limited to 'gnu/packages/patches') 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 + -- 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/packages/patches/shepherd-hurd.patch | 44 -------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 gnu/packages/patches/shepherd-hurd.patch (limited to 'gnu/packages/patches') 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. --- .../patches/gcc-8-libsanitizer-mode-size.patch | 56 ---------------------- 1 file changed, 56 deletions(-) delete mode 100644 gnu/packages/patches/gcc-8-libsanitizer-mode-size.patch (limited to 'gnu/packages/patches') 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/packages/patches/guile-json-cross.patch | 54 ----------------------------- 1 file changed, 54 deletions(-) delete mode 100644 gnu/packages/patches/guile-json-cross.patch (limited to 'gnu/packages/patches') 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/packages/patches/libtirpc-hurd-client.patch | 50 +++++++ gnu/packages/patches/libtirpc-hurd.patch | 172 ++++++++++++++++++++++++ 2 files changed, 222 insertions(+) create mode 100644 gnu/packages/patches/libtirpc-hurd-client.patch create mode 100644 gnu/packages/patches/libtirpc-hurd.patch (limited to 'gnu/packages/patches') 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/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 +++++ 3 files changed, 496 insertions(+) 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/packages/patches') 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. --- .../python-gst-fix-build-with-python-3.8.patch | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gnu/packages/patches/python-gst-fix-build-with-python-3.8.patch (limited to 'gnu/packages/patches') 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. --- .../patches/behave-skip-a-couple-of-tests.patch | 462 +++++++++++++++++++++ 1 file changed, 462 insertions(+) create mode 100644 gnu/packages/patches/behave-skip-a-couple-of-tests.patch (limited to 'gnu/packages/patches') 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 ++ #