From e80a85a0579ed226698d34f6388dc1cf9e7924bb Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Mon, 12 Aug 2019 13:22:06 +0000 Subject: [PATCH 01/57] bootstrap-files: bump WIP --- pkgs/stdenv/linux/bootstrap-files/i686.nix | 8 ++++---- pkgs/stdenv/linux/bootstrap-files/x86_64.nix | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/stdenv/linux/bootstrap-files/i686.nix b/pkgs/stdenv/linux/bootstrap-files/i686.nix index cf484fd92533..55cff0a636d7 100644 --- a/pkgs/stdenv/linux/bootstrap-files/i686.nix +++ b/pkgs/stdenv/linux/bootstrap-files/i686.nix @@ -1,12 +1,12 @@ { busybox = import { - url = http://tarballs.nixos.org/stdenv-linux/i686/4907fc9e8d0d82b28b3c56e3a478a2882f1d700f/busybox; - sha256 = "ef4c1be6c7ae57e4f654efd90ae2d2e204d6769364c46469fa9ff3761195cba1"; + url = https://lblasc-nix-dev.s3-eu-west-1.amazonaws.com/bootstrap-tools-i686-gcc9/busybox; + sha256 = "03g3hz2ar6nz7chfwip72gvy4wd828ha9bdgg6mjs9llsc0d2izz"; executable = true; }; bootstrapTools = import { - url = http://tarballs.nixos.org/stdenv-linux/i686/4907fc9e8d0d82b28b3c56e3a478a2882f1d700f/bootstrap-tools.tar.xz; - sha256 = "cf920d26d94335f5cb46e247455d0e5389765d16a2b8fc233b792a655b5b58aa"; + url = https://lblasc-nix-dev.s3-eu-west-1.amazonaws.com/bootstrap-tools-i686-gcc9/bootstrap-tools.tar.xz; + sha256 = "1m142s2z7v3v6k0m3d91prp7i71hhy394jgnkd7y3z5sh15c8j28"; }; } diff --git a/pkgs/stdenv/linux/bootstrap-files/x86_64.nix b/pkgs/stdenv/linux/bootstrap-files/x86_64.nix index 69d08c5e981a..4c4db07b3064 100644 --- a/pkgs/stdenv/linux/bootstrap-files/x86_64.nix +++ b/pkgs/stdenv/linux/bootstrap-files/x86_64.nix @@ -3,7 +3,7 @@ { bootstrapTools = import { - url = http://tarballs.nixos.org/stdenv-linux/x86_64/4907fc9e8d0d82b28b3c56e3a478a2882f1d700f/bootstrap-tools.tar.xz; - sha256 = "abe3f0727dd771a60b7922892d308da1bc7b082afc13440880862f0c8823c09f"; + url = https://lblasc-nix-dev.s3-eu-west-1.amazonaws.com/bootstrap-tools-x86-64-gcc9/bootstrap-tools.tar.xz; + sha256 = "0dyvaqlaszd5i2vr36h4d3k47a5xc550n1y4mkiirm1gd4ynaz1g"; }; } From 76d90cf1f55528e6c75d648248ca5771d4b3ebd4 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Mon, 12 Aug 2019 05:48:35 +0000 Subject: [PATCH 02/57] cpython: fetch darwin-libutil.patch to nixpkgs python3 is now required buildInput for glibc>=2.29. Remove fetchpatch to solve infinite recursion in glibc bootstrap process. --- .../python/cpython/3.7/darwin-libutil.patch | 23 +++++++++++++++++++ .../interpreters/python/cpython/default.nix | 5 +--- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch diff --git a/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch b/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch new file mode 100644 index 000000000000..51e3cb6d7f11 --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch @@ -0,0 +1,23 @@ +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index c3682b4..16826c6 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -5880,15 +5880,13 @@ error: + #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX) + #ifdef HAVE_PTY_H + #include +-#else ++#endif + #ifdef HAVE_LIBUTIL_H + #include +-#else ++#endif + #ifdef HAVE_UTIL_H + #include +-#endif /* HAVE_UTIL_H */ +-#endif /* HAVE_LIBUTIL_H */ +-#endif /* HAVE_PTY_H */ ++#endif + #ifdef HAVE_STROPTS_H + #include + #endif diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index e75bd0a09875..c1c90d35815c 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -103,10 +103,7 @@ in with passthru; stdenv.mkDerivation { ./3.5/ld_library_path.patch ] ++ optionals (isPy37 || isPy38) [ # Fix darwin build https://bugs.python.org/issue34027 - (fetchpatch { - url = https://bugs.python.org/file47666/darwin-libutil.patch; - sha256 = "0242gihnw3wfskl4fydp2xanpl8k5q7fj4dp7dbbqf46a4iwdzpa"; - }) + ./3.7/darwin-libutil.patch ] ++ optionals (isPy3k && hasDistutilsCxxPatch) [ # Fix for http://bugs.python.org/issue1222585 # Upstream distutils is calling C compiler to compile C++ code, which From 447edaa32fcee706be24db4389f4759fad68a785 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Mon, 12 Aug 2019 06:30:28 +0000 Subject: [PATCH 03/57] glibc: 2.27 -> 2.30 --- pkgs/development/libraries/glibc/common.nix | 7 ++-- .../glibc/dont-use-system-ld-so-cache.patch | 35 +++++++++---------- .../glibc/dont-use-system-ld-so-preload.patch | 7 ++-- .../libraries/glibc/fix-x64-abi.patch | 13 +++---- .../glibc/fix_path_attribute_in_getconf.patch | 5 ++- .../libraries/glibc/nix-locale-archive.patch | 35 +++++++++---------- .../libraries/glibc/rpcgen-path.patch | 13 ++++--- 7 files changed, 54 insertions(+), 61 deletions(-) diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 458745694bcc..a5a83b645abb 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -23,6 +23,7 @@ , linuxHeaders ? null , gd ? null, libpng ? null , bison +, python3 }: { name @@ -34,9 +35,9 @@ } @ args: let - version = "2.27"; + version = "2.30"; patchSuffix = ""; - sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji"; + sha256 = "1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72"; in assert withLinuxHeaders -> linuxHeaders != null; @@ -162,7 +163,7 @@ stdenv.mkDerivation ({ outputs = [ "out" "bin" "dev" "static" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ bison ]; + nativeBuildInputs = [ bison python3 ]; buildInputs = [ linuxHeaders ] ++ lib.optionals withGd [ gd libpng ]; # Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to diff --git a/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch b/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch index f84b1049adf8..f45e39525f55 100644 --- a/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch +++ b/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch @@ -1,19 +1,6 @@ -diff -Naur glibc-2.27-orig/elf/ldconfig.c glibc-2.27/elf/ldconfig.c ---- glibc-2.27-orig/elf/ldconfig.c 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/elf/ldconfig.c 2018-02-17 22:43:17.232175182 -0500 -@@ -51,7 +51,7 @@ - #endif - - #ifndef LD_SO_CONF --# define LD_SO_CONF SYSCONFDIR "/ld.so.conf" -+# define LD_SO_CONF PREFIX "/etc/ld.so.conf" - #endif - - /* Get libc version number. */ -diff -Naur glibc-2.27-orig/elf/Makefile glibc-2.27/elf/Makefile ---- glibc-2.27-orig/elf/Makefile 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/elf/Makefile 2018-02-17 22:44:50.334006750 -0500 -@@ -559,13 +559,13 @@ +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -589,13 +589,13 @@ $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o) $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o) @@ -32,9 +19,19 @@ diff -Naur glibc-2.27-orig/elf/Makefile glibc-2.27/elf/Makefile cpp-srcs-left := $(all-rtld-routines:=.os) lib := rtld -diff -Naur glibc-2.27-orig/sysdeps/generic/dl-cache.h glibc-2.27/sysdeps/generic/dl-cache.h ---- glibc-2.27-orig/sysdeps/generic/dl-cache.h 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/sysdeps/generic/dl-cache.h 2018-02-17 22:45:20.471598816 -0500 +--- a/elf/ldconfig.c ++++ b/elf/ldconfig.c +@@ -51,7 +51,7 @@ + #endif + + #ifndef LD_SO_CONF +-# define LD_SO_CONF SYSCONFDIR "/ld.so.conf" ++# define LD_SO_CONF PREFIX "/etc/ld.so.conf" + #endif + + /* Get libc version number. */ +--- a/sysdeps/generic/dl-cache.h ++++ b/sysdeps/generic/dl-cache.h @@ -28,7 +28,7 @@ #endif diff --git a/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch b/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch index 894e2a11cf87..69b63a5bcfee 100644 --- a/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch +++ b/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch @@ -1,7 +1,6 @@ -diff -ru glibc-2.20-orig/elf/rtld.c glibc-2.20/elf/rtld.c ---- glibc-2.20-orig/elf/rtld.c 2014-09-07 10:09:09.000000000 +0200 -+++ glibc-2.20/elf/rtld.c 2014-10-27 11:32:25.203043157 +0100 -@@ -1513,7 +1513,7 @@ +--- a/elf/rtld.c ++++ b/elf/rtld.c +@@ -1697,7 +1697,7 @@ ERROR: '%s': cannot process note segment.\n", _dl_argv[0]); open(). So we do this first. If it succeeds we do almost twice the work but this does not matter, since it is not for production use. */ diff --git a/pkgs/development/libraries/glibc/fix-x64-abi.patch b/pkgs/development/libraries/glibc/fix-x64-abi.patch index 1d60dcd7988b..f5a6d603bf85 100644 --- a/pkgs/development/libraries/glibc/fix-x64-abi.patch +++ b/pkgs/development/libraries/glibc/fix-x64-abi.patch @@ -1,4 +1,4 @@ -From 3288c6da64add3b4561b8c10fff522027caea01c Mon Sep 17 00:00:00 2001 +From d9e6dd5631c8d97fd2d3128317c6352e34bf3ca7 Mon Sep 17 00:00:00 2001 From: Nicholas Miell Date: Sat, 17 Jun 2017 18:21:07 -0700 Subject: [PATCH] Align the stack on entry to __tls_get_addr() @@ -17,13 +17,13 @@ engine and available for purchase on Steam. 1 file changed, 4 insertions(+) diff --git a/elf/dl-tls.c b/elf/dl-tls.c -index 5aba33b3fa..3f3cb917de 100644 +index b425d661..b02c2afa 100644 --- a/elf/dl-tls.c +++ b/elf/dl-tls.c -@@ -827,6 +827,10 @@ rtld_hidden_proto (__tls_get_addr) +@@ -818,6 +818,10 @@ rtld_hidden_proto (__tls_get_addr) rtld_hidden_def (__tls_get_addr) #endif - + +#ifdef __x86_64__ +/* Old versions of gcc didn't align the stack. */ +__attribute__((force_align_arg_pointer)) @@ -31,5 +31,6 @@ index 5aba33b3fa..3f3cb917de 100644 /* The generic dynamic and local dynamic model cannot be used in statically linked applications. */ void * --- -2.13.0 +-- +2.17.1 + diff --git a/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch b/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch index 714e49db5607..b13cea4dcb33 100644 --- a/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch +++ b/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch @@ -1,6 +1,5 @@ -diff -ubr glibc-2.17-orig/sysdeps/unix/confstr.h glibc-2.17/sysdeps/unix/confstr.h ---- glibc-2.17-orig/sysdeps/unix/confstr.h 2013-06-03 22:01:44.829726968 +0200 -+++ glibc-2.17/sysdeps/unix/confstr.h 2013-06-03 22:04:39.469376740 +0200 +--- a/sysdeps/unix/confstr.h ++++ b/sysdeps/unix/confstr.h @@ -1 +1 @@ -#define CS_PATH "/bin:/usr/bin" +#define CS_PATH "/run/current-system/sw/bin:/bin:/usr/bin" diff --git a/pkgs/development/libraries/glibc/nix-locale-archive.patch b/pkgs/development/libraries/glibc/nix-locale-archive.patch index 39312951fcf9..f2feabc36ada 100644 --- a/pkgs/development/libraries/glibc/nix-locale-archive.patch +++ b/pkgs/development/libraries/glibc/nix-locale-archive.patch @@ -1,7 +1,6 @@ -diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c ---- glibc-2.27-orig/locale/loadarchive.c 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/locale/loadarchive.c 2018-02-17 22:32:25.680169462 -0500 -@@ -123,6 +123,23 @@ +--- a/locale/loadarchive.c ++++ b/locale/loadarchive.c +@@ -123,6 +123,23 @@ calculate_head_size (const struct locarhead *h) return MAX (namehash_end, MAX (string_end, locrectab_end)); } @@ -25,7 +24,7 @@ diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c /* Find the locale *NAMEP in the locale archive, and return the internalized data structure for its CATEGORY data. If this locale has -@@ -202,7 +219,7 @@ +@@ -202,7 +219,7 @@ _nl_load_locale_from_archive (int category, const char **namep) archmapped = &headmap; /* The archive has never been opened. */ @@ -34,7 +33,7 @@ diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c if (fd < 0) /* Cannot open the archive, for whatever reason. */ return NULL; -@@ -397,8 +414,7 @@ +@@ -397,8 +414,7 @@ _nl_load_locale_from_archive (int category, const char **namep) if (fd == -1) { struct stat64 st; @@ -44,13 +43,13 @@ diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c if (fd == -1) /* Cannot open the archive, for whatever reason. */ return NULL; -diff -Naur glibc-2.27-orig/locale/programs/locale.c glibc-2.27/locale/programs/locale.c ---- glibc-2.27-orig/locale/programs/locale.c 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/locale/programs/locale.c 2018-02-17 22:36:39.726293213 -0500 -@@ -633,6 +633,24 @@ +--- a/locale/programs/locale.c ++++ b/locale/programs/locale.c +@@ -633,6 +633,24 @@ nameentcmp (const void *a, const void *b) + } - static int ++static int +open_locale_archive (void) +{ + int fd = -1; @@ -68,11 +67,10 @@ diff -Naur glibc-2.27-orig/locale/programs/locale.c glibc-2.27/locale/programs/l +} + + -+static int + static int write_archive_locales (void **all_datap, char *linebuf) { - struct stat64 st; -@@ -644,7 +662,7 @@ +@@ -645,7 +663,7 @@ write_archive_locales (void **all_datap, char *linebuf) int fd, ret = 0; uint32_t cnt; @@ -81,10 +79,9 @@ diff -Naur glibc-2.27-orig/locale/programs/locale.c glibc-2.27/locale/programs/l if (fd < 0) return 0; -diff -Naur glibc-2.27-orig/locale/programs/locarchive.c glibc-2.27/locale/programs/locarchive.c ---- glibc-2.27-orig/locale/programs/locarchive.c 2018-02-01 11:17:18.000000000 -0500 -+++ glibc-2.27/locale/programs/locarchive.c 2018-02-17 22:40:51.245293975 -0500 -@@ -117,6 +117,22 @@ +--- a/locale/programs/locarchive.c ++++ b/locale/programs/locarchive.c +@@ -117,6 +117,22 @@ prepare_address_space (int fd, size_t total, size_t *reserved, int *xflags, } @@ -107,7 +104,7 @@ diff -Naur glibc-2.27-orig/locale/programs/locarchive.c glibc-2.27/locale/progra static void create_archive (const char *archivefname, struct locarhandle *ah) { -@@ -578,7 +594,7 @@ +@@ -578,7 +594,7 @@ open_archive (struct locarhandle *ah, bool readonly) while (1) { /* Open the archive. We must have exclusive write access. */ diff --git a/pkgs/development/libraries/glibc/rpcgen-path.patch b/pkgs/development/libraries/glibc/rpcgen-path.patch index 3349449d9163..4f427879f241 100644 --- a/pkgs/development/libraries/glibc/rpcgen-path.patch +++ b/pkgs/development/libraries/glibc/rpcgen-path.patch @@ -1,7 +1,6 @@ -diff -ru glibc-2.18-orig/sunrpc/rpc_main.c glibc-2.18/sunrpc/rpc_main.c ---- glibc-2.18-orig/sunrpc/rpc_main.c 2013-08-11 00:52:55.000000000 +0200 -+++ glibc-2.18/sunrpc/rpc_main.c 2013-11-15 12:04:48.041006977 +0100 -@@ -78,7 +78,7 @@ +--- a/sunrpc/rpc_main.c ++++ b/sunrpc/rpc_main.c +@@ -78,7 +78,7 @@ static const char *cmdname; static const char *svcclosetime = "120"; static int cppDefined; /* explicit path for C preprocessor */ @@ -10,7 +9,7 @@ diff -ru glibc-2.18-orig/sunrpc/rpc_main.c glibc-2.18/sunrpc/rpc_main.c static const char CPPFLAGS[] = "-C"; static char *pathbuf; static int cpp_pid; -@@ -107,7 +107,6 @@ +@@ -107,7 +107,6 @@ static char *extendfile (const char *file, const char *ext); static void open_output (const char *infile, const char *outfile); static void add_warning (void); static void clear_args (void); @@ -18,7 +17,7 @@ diff -ru glibc-2.18-orig/sunrpc/rpc_main.c glibc-2.18/sunrpc/rpc_main.c static void open_input (const char *infile, const char *define); static int check_nettype (const char *name, const char *list_to_check[]); static void c_output (const char *infile, const char *define, -@@ -322,25 +321,6 @@ +@@ -322,25 +321,6 @@ clear_args (void) argcount = FIXEDARGS; } @@ -44,7 +43,7 @@ diff -ru glibc-2.18-orig/sunrpc/rpc_main.c glibc-2.18/sunrpc/rpc_main.c /* * Open input file with given define for C-preprocessor */ -@@ -359,7 +339,6 @@ +@@ -359,7 +339,6 @@ open_input (const char *infile, const char *define) switch (cpp_pid) { case 0: From 27534bd6ab80090be0742c393208cd1864473750 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Mon, 12 Aug 2019 09:38:00 +0000 Subject: [PATCH 04/57] gnulib: 20190326 -> 20190811 --- pkgs/development/tools/gnulib/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/gnulib/default.nix b/pkgs/development/tools/gnulib/default.nix index 15042353b1d5..316c38706d3d 100644 --- a/pkgs/development/tools/gnulib/default.nix +++ b/pkgs/development/tools/gnulib/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation { pname = "gnulib"; - version = "20190326"; + version = "20190811"; src = fetchgit { url = https://git.savannah.gnu.org/r/gnulib.git; - rev = "a18f7ce3c0aa760c33d46bbeb8e5b3a14cf24984"; - sha256 = "04py5n3j17wyqv9wfsslcrxzapni9vmw6p5g0adzy2md3ygjw4x4"; + rev = "6430babe47ece6953cf18ef07c1d8642c8588e89"; + sha256 = "14kgykbjly03dlb25sllcfcrpk7zkypa449gr3zbqv4rhpmnzizg"; }; dontFixup = true; From 820a197b5fee32f946f7cfba2010ce28c8d07a4f Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Mon, 12 Aug 2019 12:42:59 +0000 Subject: [PATCH 05/57] gnum4: fix build with glibc>=2.28 --- pkgs/development/tools/misc/gnum4/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index ab2ab0de9cf9..b01f85bb4a7a 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -13,7 +13,14 @@ stdenv.mkDerivation { configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ]; # Upstream is aware of it; it may be in the next release. - patches = [ ./s_isdir.patch ] + patches = + [ + ./s_isdir.patch + (fetchurl { + url = "https://sources.debian.org/data/main/m/m4/1.4.18-2/debian/patches/01-fix-ftbfs-with-glibc-2.28.patch"; + sha256 = "12lmdnbml9lfvy0khpjc42riicddaz7li8wmbnsam7zsw6al11qk"; + }) + ] ++ stdenv.lib.optional stdenv.isDarwin ./darwin-secure-format.patch; meta = { From 89590eb7bf08f279c0e65bfaf4ffdd6ca283f8a4 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Mon, 12 Aug 2019 12:44:07 +0000 Subject: [PATCH 06/57] sharutils: fix build with glibc>=2.28 --- pkgs/tools/archivers/sharutils/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix index 0dfd234bc758..b4fc2377f0e4 100644 --- a/pkgs/tools/archivers/sharutils/default.nix +++ b/pkgs/tools/archivers/sharutils/default.nix @@ -25,6 +25,10 @@ stdenv.mkDerivation rec { url = "https://sources.debian.org/data/main/s/sharutils/1:4.15.2-2+deb9u1/debian/patches/01-fix-heap-buffer-overflow-cve-2018-1000097.patch"; sha256 = "19g0sxc8g79aj5gd5idz5409311253jf2q8wqkasf0handdvsbxx"; }) + (fetchurl { + url = "https://sources.debian.org/data/main/s/sharutils/1:4.15.2-4/debian/patches/02-fix-ftbfs-with-glibc-2.28.patch"; + sha256 = "15kpjqnfs98n6irmkh8pw7masr08xala7gx024agv7zv14722vkc"; + }) ]; postPatch = let From 0c75f513045cdccadd53d08c8027815b9b5b3e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 18 Aug 2019 12:46:38 +0200 Subject: [PATCH 07/57] stdenv bootstrap: disable dejagnu tests There's a failure - I don't know why. The checks from "normal" dejagnu still succeed, so I assume this commit is quite a safe work-around. --- pkgs/stdenv/linux/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 8344c9dfb2b8..f73a297281ef 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -226,6 +226,7 @@ in ccWrapperStdenv gcc-unwrapped coreutils gnugrep perl gnum4 bison; + dejagnu = super.dejagnu.overrideAttrs (a: { doCheck = false; } ); # This also contains the full, dynamically linked, final Glibc. binutils = prevStage.binutils.override { # Rewrap the binutils with the new glibc, so both the next From 2aea16c4d6ee1fa4985ad94d04f2046b2e2b6df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 18 Aug 2019 20:58:56 +0200 Subject: [PATCH 08/57] glibc: depend on libidn2 (and libunistring, transitively) It's a bit hacky, but ATM I can't see any better way for glibc >= 2.28. Signed-off-by: Luka Blaskovic --- pkgs/development/libraries/glibc/common.nix | 10 +++++++ pkgs/stdenv/linux/default.nix | 29 ++++++++++++++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index a5a83b645abb..cd3b06f08643 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -22,6 +22,7 @@ , fetchurl, fetchpatch , linuxHeaders ? null , gd ? null, libpng ? null +, libidn2 , bison , python3 }: @@ -132,6 +133,15 @@ stdenv.mkDerivation ({ # nscd needs libgcc, and we don't want it dynamically linked # because we don't want it to depend on bootstrap-tools libs. echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile + + # Ensure that libidn2 is found. + patch -p 1 < Date: Sat, 24 Aug 2019 08:34:53 +0000 Subject: [PATCH 09/57] libunistring: disable tests --- pkgs/development/libraries/libunistring/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libunistring/default.nix b/pkgs/development/libraries/libunistring/default.nix index e02e5228aa49..2c9a13788c5b 100644 --- a/pkgs/development/libraries/libunistring/default.nix +++ b/pkgs/development/libraries/libunistring/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { "--with-libiconv-prefix=${libiconv}" ]; - doCheck = true; + doCheck = false; /* This seems to cause several random failures like these, which I assume is because of bad or missing target dependencies in their build system: From 2d5ed2b4b07bbd1bbc1b6c910524cca6d7c5f927 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 2 Jan 2020 23:57:32 +0100 Subject: [PATCH 10/57] glibc: remove outdated patches Co-authored-by: Luka Blaskovic --- .../libraries/glibc/CVE-2018-11236.patch | 146 ------------------ .../libraries/glibc/CVE-2018-11237.patch | 55 ------- pkgs/development/libraries/glibc/common.nix | 26 +--- ...ix-out-of-bounds-access-in-findidxwc.patch | 26 ---- ...-bounds-access-in-ibm-1390-converter.patch | 35 ----- 5 files changed, 2 insertions(+), 286 deletions(-) delete mode 100644 pkgs/development/libraries/glibc/CVE-2018-11236.patch delete mode 100644 pkgs/development/libraries/glibc/CVE-2018-11237.patch delete mode 100644 pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-findidxwc.patch delete mode 100644 pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch diff --git a/pkgs/development/libraries/glibc/CVE-2018-11236.patch b/pkgs/development/libraries/glibc/CVE-2018-11236.patch deleted file mode 100644 index db86e7146f28..000000000000 --- a/pkgs/development/libraries/glibc/CVE-2018-11236.patch +++ /dev/null @@ -1,146 +0,0 @@ -From 5460617d1567657621107d895ee2dd83bc1f88f2 Mon Sep 17 00:00:00 2001 -From: Paul Pluzhnikov -Date: Tue, 8 May 2018 18:12:41 -0700 -Subject: [PATCH] Fix BZ 22786: integer addition overflow may cause stack - buffer overflow when realpath() input length is close to SSIZE_MAX. - -2018-05-09 Paul Pluzhnikov - - [BZ #22786] - * stdlib/canonicalize.c (__realpath): Fix overflow in path length - computation. - * stdlib/Makefile (test-bz22786): New test. - * stdlib/test-bz22786.c: New test. ---- - ChangeLog | 8 +++++ - stdlib/Makefile | 2 +- - stdlib/canonicalize.c | 2 +- - stdlib/test-bz22786.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 100 insertions(+), 2 deletions(-) - create mode 100644 stdlib/test-bz22786.c - -diff --git a/stdlib/Makefile b/stdlib/Makefile -index af1643c..1ddb1f9 100644 ---- a/stdlib/Makefile -+++ b/stdlib/Makefile -@@ -84,7 +84,7 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ - tst-cxa_atexit tst-on_exit test-atexit-race \ - test-at_quick_exit-race test-cxa_atexit-race \ - test-on_exit-race test-dlclose-exit-race \ -- tst-makecontext-align -+ tst-makecontext-align test-bz22786 - - tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \ - tst-tls-atexit tst-tls-atexit-nodelete -diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c -index 4135f3f..390fb43 100644 ---- a/stdlib/canonicalize.c -+++ b/stdlib/canonicalize.c -@@ -181,7 +181,7 @@ __realpath (const char *name, char *resolved) - extra_buf = __alloca (path_max); - - len = strlen (end); -- if ((long int) (n + len) >= path_max) -+ if (path_max - n <= len) - { - __set_errno (ENAMETOOLONG); - goto error; -diff --git a/stdlib/test-bz22786.c b/stdlib/test-bz22786.c -new file mode 100644 -index 0000000..e7837f9 ---- /dev/null -+++ b/stdlib/test-bz22786.c -@@ -0,0 +1,90 @@ -+/* Bug 22786: test for buffer overflow in realpath. -+ Copyright (C) 2018 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+/* This file must be run from within a directory called "stdlib". */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+static int -+do_test (void) -+{ -+ const char dir[] = "bz22786"; -+ const char lnk[] = "bz22786/symlink"; -+ -+ rmdir (dir); -+ if (mkdir (dir, 0755) != 0 && errno != EEXIST) -+ { -+ printf ("mkdir %s: %m\n", dir); -+ return EXIT_FAILURE; -+ } -+ if (symlink (".", lnk) != 0 && errno != EEXIST) -+ { -+ printf ("symlink (%s, %s): %m\n", dir, lnk); -+ return EXIT_FAILURE; -+ } -+ -+ const size_t path_len = (size_t) INT_MAX + 1; -+ -+ DIAG_PUSH_NEEDS_COMMENT; -+#if __GNUC_PREREQ (7, 0) -+ /* GCC 7 warns about too-large allocations; here we need such -+ allocation to succeed for the test to work. */ -+ DIAG_IGNORE_NEEDS_COMMENT (7, "-Walloc-size-larger-than="); -+#endif -+ char *path = malloc (path_len); -+ DIAG_POP_NEEDS_COMMENT; -+ -+ if (path == NULL) -+ { -+ printf ("malloc (%zu): %m\n", path_len); -+ return EXIT_UNSUPPORTED; -+ } -+ -+ /* Construct very long path = "bz22786/symlink/aaaa....." */ -+ char *p = mempcpy (path, lnk, sizeof (lnk) - 1); -+ *(p++) = '/'; -+ memset (p, 'a', path_len - (path - p) - 2); -+ p[path_len - (path - p) - 1] = '\0'; -+ -+ /* This call crashes before the fix for bz22786 on 32-bit platforms. */ -+ p = realpath (path, NULL); -+ -+ if (p != NULL || errno != ENAMETOOLONG) -+ { -+ printf ("realpath: %s (%m)", p); -+ return EXIT_FAILURE; -+ } -+ -+ /* Cleanup. */ -+ unlink (lnk); -+ rmdir (dir); -+ -+ return 0; -+} -+ -+#define TEST_FUNCTION do_test -+#include --- -2.9.3 - diff --git a/pkgs/development/libraries/glibc/CVE-2018-11237.patch b/pkgs/development/libraries/glibc/CVE-2018-11237.patch deleted file mode 100644 index ffc2cec1d577..000000000000 --- a/pkgs/development/libraries/glibc/CVE-2018-11237.patch +++ /dev/null @@ -1,55 +0,0 @@ -From f51c8367685dc888a02f7304c729ed5277904aff Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Thu, 24 May 2018 14:39:18 +0200 -Subject: [PATCH] Don't write beyond destination in - __mempcpy_avx512_no_vzeroupper (bug 23196) - -When compiled as mempcpy, the return value is the end of the destination -buffer, thus it cannot be used to refer to the start of it. - -(cherry picked from commit 9aaaab7c6e4176e61c59b0a63c6ba906d875dc0e) ---- - ChangeLog | 9 +++++++++ - NEWS | 7 +++++++ - string/test-mempcpy.c | 1 + - sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S | 5 +++-- - 4 files changed, 20 insertions(+), 2 deletions(-) - -diff --git a/string/test-mempcpy.c b/string/test-mempcpy.c -index c08fba8..d98ecdd 100644 ---- a/string/test-mempcpy.c -+++ b/string/test-mempcpy.c -@@ -18,6 +18,7 @@ - . */ - - #define MEMCPY_RESULT(dst, len) (dst) + (len) -+#define MIN_PAGE_SIZE 131072 - #define TEST_MAIN - #define TEST_NAME "mempcpy" - #include "test-string.h" -diff --git a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S -index 23c0f7a..effc3ac 100644 ---- a/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S -+++ b/sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S -@@ -336,6 +336,7 @@ L(preloop_large): - vmovups (%rsi), %zmm4 - vmovups 0x40(%rsi), %zmm5 - -+ mov %rdi, %r11 - /* Align destination for access with non-temporal stores in the loop. */ - mov %rdi, %r8 - and $-0x80, %rdi -@@ -366,8 +367,8 @@ L(gobble_256bytes_nt_loop): - cmp $256, %rdx - ja L(gobble_256bytes_nt_loop) - sfence -- vmovups %zmm4, (%rax) -- vmovups %zmm5, 0x40(%rax) -+ vmovups %zmm4, (%r11) -+ vmovups %zmm5, 0x40(%r11) - jmp L(check) - - L(preloop_large_bkw): --- -2.9.3 - diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index cd3b06f08643..9ea943816596 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -19,7 +19,7 @@ { stdenv, lib , buildPackages -, fetchurl, fetchpatch +, fetchurl , linuxHeaders ? null , gd ? null, libpng ? null , libidn2 @@ -94,35 +94,13 @@ stdenv.mkDerivation ({ url = "https://salsa.debian.org/glibc-team/glibc/raw/49767c9f7de4828220b691b29de0baf60d8a54ec/debian/patches/localedata/locale-C.diff"; sha256 = "0irj60hs2i91ilwg5w7sqrxb695c93xg0ik7yhhq9irprd7fidn4"; }) - - # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5460617d1567657621107d895ee2dd83bc1f88f2 - ./CVE-2018-11236.patch - # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f51c8367685dc888a02f7304c729ed5277904aff - ./CVE-2018-11237.patch - - # Remove after upgrading to glibc 2.28+ - # Change backported from upstream - # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c79cec8cd2a6996a73aa83d79b360ffd4bebde6 - ./fix-out-of-bounds-access-in-findidxwc.patch - - # Remove after upgrading to glibc 2.28+ - # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=21526a507df8f1b2e37492193a754534d8938c0b - ./fix-out-of-bounds-access-in-ibm-1390-converter.patch ] ++ lib.optionals stdenv.isx86_64 [ ./fix-x64-abi.patch ./2.27-CVE-2019-19126.patch ] ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch - ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch - - # Remove after upgrading to glibc 2.28+ - ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform || stdenv.hostPlatform.isMusl) (fetchpatch { - url = "https://sourceware.org/git/?p=glibc.git;a=patch;h=780684eb04298977bc411ebca1eadeeba4877833"; - name = "correct-pwent-parsing-issue-and-resulting-build.patch"; - sha256 = "08fja894vzaj8phwfhsfik6jj2pbji7kypy3q8pgxvsd508zdv1q"; - excludes = [ "ChangeLog" ]; - }); + ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch; postPatch = '' diff --git a/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-findidxwc.patch b/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-findidxwc.patch deleted file mode 100644 index 2d1ac0bc3afb..000000000000 --- a/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-findidxwc.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ur glibc-2.27/locale/weightwc.h glibc-2.27-patched/locale/weightwc.h ---- glibc-2.27/locale/weightwc.h 2018-02-02 01:17:18.000000000 +0900 -+++ glibc-2.27-patched/locale/weightwc.h 2020-01-12 04:54:16.044440602 +0900 -@@ -94,19 +94,19 @@ - if (cp[cnt] != usrc[cnt]) - break; - -- if (cnt < nhere - 1) -+ if (cnt < nhere - 1 || cnt == len) - { - cp += 2 * nhere; - continue; - } - -- if (cp[nhere - 1] > usrc[nhere -1]) -+ if (cp[nhere - 1] > usrc[nhere - 1]) - { - cp += 2 * nhere; - continue; - } - -- if (cp[2 * nhere - 1] < usrc[nhere -1]) -+ if (cp[2 * nhere - 1] < usrc[nhere - 1]) - { - cp += 2 * nhere; - continue; diff --git a/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch b/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch deleted file mode 100644 index 8b560566a491..000000000000 --- a/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 21526a507df8f1b2e37492193a754534d8938c0b Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Tue, 24 Jul 2018 14:08:34 +0200 -Subject: [PATCH] Fix out-of-bounds access in IBM-1390 converter (bug 23448) - -The IBM-1390 converter can consume/produce two UCS4 characters in each -loop. ---- - ChangeLog | 6 ++++++ - iconvdata/ibm1364.c | 2 ++ - 2 files changed, 8 insertions(+) - -diff --git a/iconvdata/ibm1364.c b/iconvdata/ibm1364.c -index b833273..517fe60 100644 ---- a/iconvdata/ibm1364.c -+++ b/iconvdata/ibm1364.c -@@ -150,6 +150,7 @@ enum - #define MIN_NEEDED_INPUT MIN_NEEDED_FROM - #define MAX_NEEDED_INPUT MAX_NEEDED_FROM - #define MIN_NEEDED_OUTPUT MIN_NEEDED_TO -+#define MAX_NEEDED_OUTPUT MAX_NEEDED_TO - #define LOOPFCT FROM_LOOP - #define BODY \ - { \ -@@ -296,6 +297,7 @@ enum - - /* Next, define the other direction. */ - #define MIN_NEEDED_INPUT MIN_NEEDED_TO -+#define MAX_NEEDED_INPUT MAX_NEEDED_TO - #define MIN_NEEDED_OUTPUT MIN_NEEDED_FROM - #define MAX_NEEDED_OUTPUT MAX_NEEDED_FROM - #define LOOPFCT TO_LOOP --- -2.9.3 - From 01ce36f7883cd8fbbeeb3d023222ef031228f6bd Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 2 Jan 2020 23:57:56 +0100 Subject: [PATCH 11/57] bzip2: fix aarch64 build --- pkgs/tools/compression/bzip2/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/compression/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix index a440c08bd1bb..41dcd54ecdb6 100644 --- a/pkgs/tools/compression/bzip2/default.nix +++ b/pkgs/tools/compression/bzip2/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl , linkStatic ? (stdenv.hostPlatform.system == "i686-cygwin") +, autoreconfHook }: stdenv.mkDerivation rec { @@ -20,6 +21,8 @@ stdenv.mkDerivation rec { sha256 = "0b5b5p8c7bslc6fslcr1nj9136412v3qcvbg6yxi9argq9g72v8c"; }; + nativeBuildInputs = [ autoreconfHook ]; + patches = [ ./CVE-2016-3189.patch ./cve-2019-12900.patch From 2476d6decabf1be63151dd94be15e87fad52fb0b Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 3 Jan 2020 16:55:14 +0100 Subject: [PATCH 12/57] expect: fix aarch64 build --- pkgs/tools/misc/expect/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/expect/default.nix b/pkgs/tools/misc/expect/default.nix index fe18a5065608..f43309196349 100644 --- a/pkgs/tools/misc/expect/default.nix +++ b/pkgs/tools/misc/expect/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, tcl, makeWrapper }: +{ stdenv, fetchurl, tcl, makeWrapper, autoreconfHook }: stdenv.mkDerivation rec { version = "5.45.4"; @@ -10,11 +10,11 @@ stdenv.mkDerivation rec { }; buildInputs = [ tcl ]; - nativeBuildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper autoreconfHook ]; hardeningDisable = [ "format" ]; - patchPhase = '' + postPatch = '' sed -i "s,/bin/stty,$(type -p stty),g" configure ''; @@ -22,7 +22,12 @@ stdenv.mkDerivation rec { "--with-tcl=${tcl}/lib" "--with-tclinclude=${tcl}/include" "--exec-prefix=\${out}" - ]; + ] ++ (stdenv.lib.optionals stdenv.isAarch64 [ + # FIXME(ma27) not entirely sure why this breaks now, + # we should at least find the cause before merging the glibc 2.30 + # update. + "--build=aarch64-unknown-linux-gnu" + ]); postInstall = '' for i in $out/bin/*; do From 2d36eac7801824d5b6d7cc43958b9733e5901109 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 3 Jan 2020 16:56:43 +0100 Subject: [PATCH 13/57] stdenv: rebuild aarch64 bootstrap files with gcc8 The old bootstrapping files would break with glibc 2.30 as at least gcc6 is needed. --- pkgs/stdenv/linux/bootstrap-files/aarch64.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/stdenv/linux/bootstrap-files/aarch64.nix b/pkgs/stdenv/linux/bootstrap-files/aarch64.nix index ca7e84502ab3..90c74bf1723f 100644 --- a/pkgs/stdenv/linux/bootstrap-files/aarch64.nix +++ b/pkgs/stdenv/linux/bootstrap-files/aarch64.nix @@ -1,11 +1,13 @@ +# FIXME(ma27): before merging this to master we *have* to replace those files +# as they're built for testing purposes with the aarch64 community builder. { busybox = import { - url = http://nixos-arm.dezgeg.me/bootstrap-aarch64-2017-03-11-bb3ef8/busybox; - sha256 = "12qcml1l67skpjhfjwy7gr10nc86gqcwjmz9ggp7knss8gq8pv7f"; + url = "https://aarch64.mbosch.me/busybox"; + sha256 = "10z8aigcj0lyfwbc4wzl7s0ng9g37sx1vsqh9sijw3hi0gfhhn4v"; executable = true; }; bootstrapTools = import { - url = http://nixos-arm.dezgeg.me/bootstrap-aarch64-2017-03-11-bb3ef8/bootstrap-tools.tar.xz; - sha256 = "1075d5n4yclbhgisi6ba50601mw3fhivlkjs462qlnq8hh0xc7nq"; + url = "https://aarch64.mbosch.me/bootstrap-tools.tar.xz"; + sha256 = "0n4k0l7j2yqjzicj1gyk8gdpbszqn6yj6mlx6m2pzfcm2hmbzwfk"; }; } From be3e7b4f44911953bd65cbd5866619301f64d398 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sun, 5 Jan 2020 09:46:45 +0000 Subject: [PATCH 14/57] libffi: only run tests on musl targets Python3 is now needed for for glibc build which pulls libffi, so I suppose libffi is now part of stdenv on linux with glibc as on darwin. --- pkgs/development/libraries/libffi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index cc080e7c6388..86e790bb9659 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -1,9 +1,9 @@ { stdenv, fetchurl, fetchpatch , autoreconfHook -# libffi is used in darwin stdenv +# libffi is used in darwin and linux with glibc stdenv # we cannot run checks within it -, doCheck ? !stdenv.isDarwin, dejagnu +, doCheck ? stdenv.hostPlatform.isMusl, dejagnu }: stdenv.mkDerivation rec { From dcd9031572423d8537f4f63cfced3bc4d0a05fed Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Wed, 8 Jan 2020 08:03:22 +0000 Subject: [PATCH 15/57] ppp: fix build with glibc>=2.28 --- pkgs/tools/networking/ppp/default.nix | 9 ++++++++- pkgs/tools/networking/ppp/nix-purity.patch | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/networking/ppp/default.nix b/pkgs/tools/networking/ppp/default.nix index 0efef74f6c35..3446157df7a8 100644 --- a/pkgs/tools/networking/ppp/default.nix +++ b/pkgs/tools/networking/ppp/default.nix @@ -10,10 +10,17 @@ stdenv.mkDerivation rec { }; patches = - [ ( substituteAll { + [ + # fix for glibc>=2.28 + (fetchurl { + url = "https://github.com/paulusmack/ppp/commit/3c7b86229f7bd2600d74db14b1fe5b3896be3875.patch"; + sha256 = "0qlbi247lx3injpy8a1gcij9yilik0vfaibkpvdp88k3sa1rs69z"; + }) + ( substituteAll { src = ./nix-purity.patch; inherit libpcap; glibc = stdenv.cc.libc.dev or stdenv.cc.libc; + openssl = openssl.dev; }) # Without nonpriv.patch, pppd --version doesn't work when not run as # root. diff --git a/pkgs/tools/networking/ppp/nix-purity.patch b/pkgs/tools/networking/ppp/nix-purity.patch index c74935c0ec8b..5321a472e734 100644 --- a/pkgs/tools/networking/ppp/nix-purity.patch +++ b/pkgs/tools/networking/ppp/nix-purity.patch @@ -1,8 +1,8 @@ diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux -index 060db6a..c151c62 100644 +index 1ebebec..bf90c62 100644 --- a/pppd/Makefile.linux +++ b/pppd/Makefile.linux -@@ -117,7 +117,7 @@ CFLAGS += -DHAS_SHADOW +@@ -120,7 +120,7 @@ CFLAGS += -DHAS_SHADOW #LIBS += -lshadow $(LIBS) endif @@ -11,7 +11,16 @@ index 060db6a..c151c62 100644 CFLAGS += -DHAVE_CRYPT_H=1 LIBS += -lcrypt endif -@@ -169,7 +169,7 @@ LIBS += -ldl +@@ -132,7 +132,7 @@ endif + + ifdef NEEDDES + ifndef USE_CRYPT +-CFLAGS += -I/usr/include/openssl ++CFLAGS += -I@openssl@/include/openssl + LIBS += -lcrypto + else + CFLAGS += -DUSE_CRYPT=1 +@@ -178,7 +178,7 @@ LIBS += -ldl endif ifdef FILTER From d9b726aef9450ee953d6ca069ff3c306774cc400 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Tue, 14 Jan 2020 22:32:09 +0000 Subject: [PATCH 16/57] jfsutils: fix build with glibc>=2.28 --- pkgs/tools/filesystems/jfsutils/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/jfsutils/default.nix b/pkgs/tools/filesystems/jfsutils/default.nix index 92dfe00c9514..8b899da32c10 100644 --- a/pkgs/tools/filesystems/jfsutils/default.nix +++ b/pkgs/tools/filesystems/jfsutils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, libuuid, autoreconfHook }: +{ stdenv, fetchurl, fetchpatch, libuuid, autoreconfHook }: stdenv.mkDerivation rec { name = "jfsutils-1.1.15"; @@ -13,6 +13,12 @@ stdenv.mkDerivation rec { ./hardening-format.patch # required for cross-compilation ./ar-fix.patch + # fix for glibc>=2.28 + (fetchpatch { + name = "add_sysmacros.patch"; + url = "https://sources.debian.org/data/main/j/jfsutils/1.1.15-4/debian/patches/add_sysmacros.patch"; + sha256 = "1qcwvxs4d0d24w5x98z59arqfx2n7f0d9xaqhjcg6w8n34vkhnyc"; + }) ]; nativeBuildInputs = [ autoreconfHook ]; From ff135a3243d81cecd7b818829cc7151ee9186fb3 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Tue, 14 Jan 2020 22:43:23 +0000 Subject: [PATCH 17/57] oathToolkit: fix build with glibc>=2.28 --- pkgs/tools/security/oath-toolkit/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/oath-toolkit/default.nix b/pkgs/tools/security/oath-toolkit/default.nix index e31d62dc8b7a..d462101e92ea 100644 --- a/pkgs/tools/security/oath-toolkit/default.nix +++ b/pkgs/tools/security/oath-toolkit/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitLab, pam, xmlsec, autoreconfHook, pkgconfig, libxml2, gtk-doc, perl, gengetopt, bison, help2man }: +{ stdenv, fetchFromGitLab, fetchpatch, pam, xmlsec, autoreconfHook, pkgconfig, libxml2, gtk-doc, perl, gengetopt, bison, help2man }: let securityDependency = @@ -15,6 +15,15 @@ in stdenv.mkDerivation { sha256 = "0n2sl444723f1k0sjmc0mzdwslx51yxac39c2cx2bl3ykacgfv74"; }; + patches = [ + # fix for glibc>=2.28 + (fetchpatch { + name = "new_glibc_check.patch"; + url = "https://sources.debian.org/data/main/o/oath-toolkit/2.6.1-1.3/debian/patches/new-glibc-check.patch"; + sha256 = "0h75xyy3xsl485v7w27yqkks6z9sgsjmrv6wiswy15fdj5wyciv3"; + }) + ]; + buildInputs = [ securityDependency libxml2 perl gengetopt bison ]; nativeBuildInputs = [ autoreconfHook gtk-doc help2man pkgconfig ]; From 8e7bbb7d4f70957f1bb7ed049cb038236be58bf7 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 17 Jan 2020 01:44:33 +0100 Subject: [PATCH 18/57] postfix: fix build w/glibc 2.30 --- .../0001-Fix-build-with-glibc-2.30.patch | 34 +++++++++++++++++++ pkgs/servers/mail/postfix/default.nix | 1 + 2 files changed, 35 insertions(+) create mode 100644 pkgs/servers/mail/postfix/0001-Fix-build-with-glibc-2.30.patch diff --git a/pkgs/servers/mail/postfix/0001-Fix-build-with-glibc-2.30.patch b/pkgs/servers/mail/postfix/0001-Fix-build-with-glibc-2.30.patch new file mode 100644 index 000000000000..9613b8906a00 --- /dev/null +++ b/pkgs/servers/mail/postfix/0001-Fix-build-with-glibc-2.30.patch @@ -0,0 +1,34 @@ +From a6a61d0dc018101a9a8d0a664f31140d7e38db0e Mon Sep 17 00:00:00 2001 +From: Maximilian Bosch +Date: Fri, 17 Jan 2020 01:42:40 +0100 +Subject: [PATCH] Fix build with glibc 2.30 + +https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1842923 +--- + src/dns/dns_str_resflags.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/dns/dns_str_resflags.c b/src/dns/dns_str_resflags.c +index 5f2cce5..df32345 100644 +--- a/src/dns/dns_str_resflags.c ++++ b/src/dns/dns_str_resflags.c +@@ -60,10 +60,16 @@ static const LONG_NAME_MASK resflag_table[] = { + "RES_DEFNAMES", RES_DEFNAMES, + "RES_STAYOPEN", RES_STAYOPEN, + "RES_DNSRCH", RES_DNSRCH, ++#ifdef RES_INSECURE1 + "RES_INSECURE1", RES_INSECURE1, ++#endif ++#ifdef RES_INSECURE2 + "RES_INSECURE2", RES_INSECURE2, ++#endif + "RES_NOALIASES", RES_NOALIASES, ++#ifdef RES_USE_INET6 + "RES_USE_INET6", RES_USE_INET6, ++#endif + #ifdef RES_ROTATE + "RES_ROTATE", RES_ROTATE, + #endif +-- +2.23.1 + diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix index c0e6252a5518..d797a9ec9a39 100644 --- a/pkgs/servers/mail/postfix/default.nix +++ b/pkgs/servers/mail/postfix/default.nix @@ -48,6 +48,7 @@ in stdenv.mkDerivation rec { ./postfix-3.0-no-warnings.patch ./post-install-script.patch ./relative-symlinks.patch + ./0001-Fix-build-with-glibc-2.30.patch ]; postPatch = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' From 9646fafc5d182d01288b179115aa43c3d9c2931c Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 19 Jan 2020 22:10:14 +0100 Subject: [PATCH 19/57] expect: remove hack for aarch64 build Not sure if I missed something or the issue got fixed later, but it's not needed anymore to pass a `--build` flag to the configure script on aarch64. The autoreconfHooks are still needed for expect and bzip2. --- pkgs/tools/misc/expect/default.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkgs/tools/misc/expect/default.nix b/pkgs/tools/misc/expect/default.nix index f43309196349..4a6f62f995ba 100644 --- a/pkgs/tools/misc/expect/default.nix +++ b/pkgs/tools/misc/expect/default.nix @@ -22,12 +22,7 @@ stdenv.mkDerivation rec { "--with-tcl=${tcl}/lib" "--with-tclinclude=${tcl}/include" "--exec-prefix=\${out}" - ] ++ (stdenv.lib.optionals stdenv.isAarch64 [ - # FIXME(ma27) not entirely sure why this breaks now, - # we should at least find the cause before merging the glibc 2.30 - # update. - "--build=aarch64-unknown-linux-gnu" - ]); + ]; postInstall = '' for i in $out/bin/*; do From 2df926d9a656a918ffb8754983d56d09fea2f946 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 19 Jan 2020 22:33:36 +0100 Subject: [PATCH 20/57] seasocks: fix build w/glibc-2.30 --- pkgs/development/libraries/seasocks/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/seasocks/default.nix b/pkgs/development/libraries/seasocks/default.nix index c6bb2afc2705..932bf48e2a18 100644 --- a/pkgs/development/libraries/seasocks/default.nix +++ b/pkgs/development/libraries/seasocks/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, python, zlib }: +{ stdenv, fetchFromGitHub, cmake, python, zlib, fetchpatch }: stdenv.mkDerivation rec { pname = "seasocks"; @@ -11,6 +11,13 @@ stdenv.mkDerivation rec { sha256 = "1vzdhp61bq2bddz7kkpygdq5adxdspjw1q6a03j6qyyimapblrg8"; }; + patches = [ + (fetchpatch { + url = "https://github.com/mattgodbolt/seasocks/commit/5753b50ce3b2232d166843450043f88a4a362422.patch"; + sha256 = "1c20xjma8jdgcr5m321srpmys6b4jvqkazfqr668km3r2ck5xncl"; + }) + ]; + nativeBuildInputs = [ cmake ]; buildInputs = [ zlib python ]; From e7b6039d0c04c0feea29ccb7c9386a16508733b1 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 19 Jan 2020 22:39:04 +0100 Subject: [PATCH 21/57] xnbd: fix build w/glibc-2.30 --- .../xnbd/0001-Fix-build-for-glibc-2.28.patch | 25 +++++++++++++++++++ pkgs/tools/networking/xnbd/default.nix | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 pkgs/tools/networking/xnbd/0001-Fix-build-for-glibc-2.28.patch diff --git a/pkgs/tools/networking/xnbd/0001-Fix-build-for-glibc-2.28.patch b/pkgs/tools/networking/xnbd/0001-Fix-build-for-glibc-2.28.patch new file mode 100644 index 000000000000..712183e56c74 --- /dev/null +++ b/pkgs/tools/networking/xnbd/0001-Fix-build-for-glibc-2.28.patch @@ -0,0 +1,25 @@ +From e799a7e0a64696e4ef6c088d36e4db09f8323581 Mon Sep 17 00:00:00 2001 +From: Maximilian Bosch +Date: Sun, 19 Jan 2020 22:37:04 +0100 +Subject: [PATCH] Fix build for glibc>=2.28 + +The major/minor macros are defined in now. +--- + lib/io.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/io.h b/lib/io.h +index 8703cc8..e3d0d10 100644 +--- a/lib/io.h ++++ b/lib/io.h +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + + void read_all(int fd, void *buf, size_t len); +-- +2.23.1 + diff --git a/pkgs/tools/networking/xnbd/default.nix b/pkgs/tools/networking/xnbd/default.nix index e898904c6d4b..a874565684ff 100644 --- a/pkgs/tools/networking/xnbd/default.nix +++ b/pkgs/tools/networking/xnbd/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { sourceRoot = "${name}/trunk"; + patches = [ ./0001-Fix-build-for-glibc-2.28.patch ]; + nativeBuildInputs = [ autoreconfHook pkgconfig ]; buildInputs = [ glib jansson ]; From 8045baf09d076dac3d777a5ff6b02d3461799f1d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 20 Jan 2020 14:03:46 +0100 Subject: [PATCH 22/57] rr: 5.2.0 -> 5.3.0, fix build w/glibc-2.30 --- pkgs/development/tools/analysis/rr/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/analysis/rr/default.nix b/pkgs/development/tools/analysis/rr/default.nix index a8d95eb05deb..8ca6dff9f5db 100644 --- a/pkgs/development/tools/analysis/rr/default.nix +++ b/pkgs/development/tools/analysis/rr/default.nix @@ -1,14 +1,14 @@ -{ stdenv, fetchFromGitHub, cmake, libpfm, zlib, pkgconfig, python2Packages, which, procps, gdb, capnproto }: +{ stdenv, fetchFromGitHub, cmake, libpfm, zlib, pkgconfig, python3Packages, which, procps, gdb, capnproto }: stdenv.mkDerivation rec { - version = "5.2.0"; + version = "5.3.0"; pname = "rr"; src = fetchFromGitHub { owner = "mozilla"; repo = "rr"; rev = version; - sha256 = "19jsnm8n2smalx2z60x9d8f6g4kdm7zghwyjfvwcxnslk1vn9dkc"; + sha256 = "1x6l1xsdksnhz9v50p4r7hhmr077cq20kaywqy1jzdklvkjqzf64"; }; postPatch = '' @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ - cmake libpfm zlib python2Packages.python python2Packages.pexpect which procps gdb capnproto + cmake libpfm zlib python3Packages.python python3Packages.pexpect which procps gdb capnproto ]; propagatedBuildInputs = [ gdb ]; # needs GDB to replay programs at runtime cmakeFlags = [ From 894da51750f8507f701457948756642df78d3923 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 20 Jan 2020 15:59:20 +0100 Subject: [PATCH 23/57] diod: fix build w/glibc-2.30 For compatibility with newer glibc versions, `sys/sysmacros.h` needs to be included. --- pkgs/servers/diod/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/diod/default.nix b/pkgs/servers/diod/default.nix index cf81d9b4b9af..9e33a8c7910e 100644 --- a/pkgs/servers/diod/default.nix +++ b/pkgs/servers/diod/default.nix @@ -13,6 +13,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace diod/xattr.c --replace attr/xattr.h sys/xattr.h + sed -i -e '/sys\/types\.h>/a #include ' diod/ops.c ''; buildInputs = [ munge lua libcap perl ncurses ]; From 1200d06f82beacf5bc664c8ba1df4afd5e4a8436 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 20 Jan 2020 16:03:20 +0100 Subject: [PATCH 24/57] distrho: fix build w/glibc-2.30 --- pkgs/applications/audio/distrho/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/distrho/default.nix b/pkgs/applications/audio/distrho/default.nix index 0d2858713eba..646e2ccca15c 100644 --- a/pkgs/applications/audio/distrho/default.nix +++ b/pkgs/applications/audio/distrho/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchFromGitHub, alsaLib, fftwSinglePrec, freetype, libjack2 , pkgconfig, ladspa-sdk, premake3 , libX11, libXcomposite, libXcursor, libXext, libXinerama, libXrender +, fetchpatch }: let @@ -26,7 +27,14 @@ in stdenv.mkDerivation rec { runHook postConfigure ''; - patchPhase = '' + patches = [ + (fetchpatch { + url = "https://github.com/DISTRHO/DISTRHO-Ports/commit/00ad25fd574c1724bbc974308aa5e88306969009.patch"; + sha256 = "0hdnnvn35g76q7133azwalbm1dxs8dm2yg3zjjb1kzq0x6qrazx5"; + }) + ]; + + postPatch = '' sed -e "s#@./scripts#sh scripts#" -i Makefile ''; From feb29ae15e712035c6c0590a401c14098a496e85 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 20 Jan 2020 16:25:32 +0100 Subject: [PATCH 25/57] gcal: fix build w/glibc-2.30 See https://lists.gnu.org/archive/html/bug-gcal/2018-10/msg00000.html for further reference. --- pkgs/applications/misc/gcal/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/gcal/default.nix b/pkgs/applications/misc/gcal/default.nix index f5eb6e188b7a..713000d3f69a 100644 --- a/pkgs/applications/misc/gcal/default.nix +++ b/pkgs/applications/misc/gcal/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses }: +{ stdenv, fetchurl, ncurses, fetchpatch }: stdenv.mkDerivation rec { pname = "gcal"; @@ -9,6 +9,13 @@ stdenv.mkDerivation rec { sha256 = "1av11zkfirbixn05hyq4xvilin0ncddfjqzc4zd9pviyp506rdci"; }; + patches = [ + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/gcal/raw/master/f/gcal-glibc-no-libio.patch"; + sha256 = "0l4nw9kgzsay32rsdwvs75pbp4fhx6pfm85paynfbd20cdm2n2kv"; + }) + ]; + enableParallelBuilding = true; buildInputs = [ ncurses ]; From c3c2e6722113396617da8754ce24518f4bd65e88 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 20 Jan 2020 18:29:31 +0100 Subject: [PATCH 26/57] drbd: fix build w/glibc-2.30 Decided to not bump to a later version as they decided to split the repo which would've made change way more complicated. --- pkgs/os-specific/linux/drbd/default.nix | 2 +- .../linux/drbd/fix-glibc-compilation.patch | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 pkgs/os-specific/linux/drbd/fix-glibc-compilation.patch diff --git a/pkgs/os-specific/linux/drbd/default.nix b/pkgs/os-specific/linux/drbd/default.nix index 74f3430c2d89..02b8afa721f6 100644 --- a/pkgs/os-specific/linux/drbd/default.nix +++ b/pkgs/os-specific/linux/drbd/default.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1w4889h1ak7gy9w33kd4fgjlfpgmp6hzfya16p1pkc13bjf22mm0"; }; - patches = [ ./pass-force.patch ]; + patches = [ ./pass-force.patch ./fix-glibc-compilation.patch ]; nativeBuildInputs = [ flex ]; buildInputs = [ perl ]; diff --git a/pkgs/os-specific/linux/drbd/fix-glibc-compilation.patch b/pkgs/os-specific/linux/drbd/fix-glibc-compilation.patch new file mode 100644 index 000000000000..621a2dd995db --- /dev/null +++ b/pkgs/os-specific/linux/drbd/fix-glibc-compilation.patch @@ -0,0 +1,24 @@ +diff --git a/user/drbdadm_adjust.c b/user/drbdadm_adjust.c +index cb23270..3a751ca 100644 +--- a/user/drbdadm_adjust.c ++++ b/user/drbdadm_adjust.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/user/legacy/drbdadm_adjust.c b/user/legacy/drbdadm_adjust.c +index c79163c..6990ffb 100644 +--- a/user/legacy/drbdadm_adjust.c ++++ b/user/legacy/drbdadm_adjust.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + From ad2fd68cfff1c6c37744ac217cb8a718fc6fa417 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 20 Jan 2020 20:49:39 +0100 Subject: [PATCH 27/57] xen_4_8: fix build w/glibc-2.30 The header (and the `sysctl`-function) were unused, so the inclusion can be removed safely. This was done by upstream in 4.9 as well[1]. [1] https://github.com/xen-project/xen/commit/74858c9eaf335658b4c19cb4a848bb721065c233 --- pkgs/applications/virtualization/xen/4.8.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/xen/4.8.nix b/pkgs/applications/virtualization/xen/4.8.nix index 1d0e01fcb822..a8d107698248 100644 --- a/pkgs/applications/virtualization/xen/4.8.nix +++ b/pkgs/applications/virtualization/xen/4.8.nix @@ -185,7 +185,10 @@ callPackage (import ./generic.nix (rec { # Avoid a glibc >= 2.25 deprecation warnings that get fatal via -Werror. sed 1i'#include ' \ -i tools/blktap2/control/tap-ctl-allocate.c \ - -i tools/libxl/libxl_device.c + -i tools/libxl/libxl_device.c \ + -i tools/qemu-xen/hw/9pfs/9p.c + + sed -i -e '/sys\/sysctl\.h/d' tools/blktap2/drivers/block-remus.c ''; passthru.qemu-system-i386 = if withInternalQemu From 7fea9df027243c69a4d067af7bbd4cccfaf20266 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 23 Jan 2020 01:46:29 +0100 Subject: [PATCH 28/57] mono: fix build w/glibc-2.30 --- pkgs/development/compilers/mono/generic.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/compilers/mono/generic.nix b/pkgs/development/compilers/mono/generic.nix index e0cfe247b23a..e40d07772dd3 100644 --- a/pkgs/development/compilers/mono/generic.nix +++ b/pkgs/development/compilers/mono/generic.nix @@ -22,8 +22,6 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [glib]; - NIX_LDFLAGS = if stdenv.isDarwin then "" else "-lgcc_s" ; - # To overcome the bug https://bugzilla.novell.com/show_bug.cgi?id=644723 dontDisableStatic = true; From c36d8a8338e310ef241074ac617e6323928ae57d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 23 Jan 2020 09:33:34 +0100 Subject: [PATCH 29/57] foundationdb61: fix build w/glibc-2.30 --- pkgs/servers/foundationdb/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/servers/foundationdb/default.nix b/pkgs/servers/foundationdb/default.nix index ea762ed656d6..b7f52e4b836f 100644 --- a/pkgs/servers/foundationdb/default.nix +++ b/pkgs/servers/foundationdb/default.nix @@ -24,6 +24,11 @@ let sha256 = "11y434w68cpk7shs2r22hyrpcrqi8vx02cw7v5x79qxvnmdxv2an"; }; + glibc230-fix = fetchpatch { + url = "https://github.com/Ma27/foundationdb/commit/e133cb974b9a9e4e1dc2d4ac15881d31225c0197.patch"; + sha256 = "1v9q2fyc73msigcykjnbmfig45zcrkrzcg87b0r6mxpnby8iryl1"; + }; + in with builtins; { # Older versions use the bespoke 'vsmake' build system @@ -76,6 +81,7 @@ in with builtins; { patches = [ ./patches/clang-libcxx.patch ./patches/suppress-clang-warnings.patch + glibc230-fix ]; }; From 32ea78acd7f70f8dd301bb1061d23b27a70ec2f7 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 23 Jan 2020 10:40:49 +0100 Subject: [PATCH 30/57] spaceFM: fix build w/glibc-2.30 --- pkgs/applications/misc/spacefm/default.nix | 2 ++ pkgs/applications/misc/spacefm/glibc-fix.patch | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 pkgs/applications/misc/spacefm/glibc-fix.patch diff --git a/pkgs/applications/misc/spacefm/default.nix b/pkgs/applications/misc/spacefm/default.nix index 9550a8d4fd7b..47e13fa25085 100644 --- a/pkgs/applications/misc/spacefm/default.nix +++ b/pkgs/applications/misc/spacefm/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { sha256 = "089r6i40lxcwzp60553b18f130asspnzqldlpii53smz52kvpirx"; }; + patches = [ ./glibc-fix.patch ]; + configureFlags = [ "--with-bash-path=${pkgs.bash}/bin/bash" ]; diff --git a/pkgs/applications/misc/spacefm/glibc-fix.patch b/pkgs/applications/misc/spacefm/glibc-fix.patch new file mode 100644 index 000000000000..b8e9f1e9195e --- /dev/null +++ b/pkgs/applications/misc/spacefm/glibc-fix.patch @@ -0,0 +1,12 @@ +diff --git a/src/main.c b/src/main.c +index 27f5614..2b45708 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include + From 91b7e73bbcb688e4b7de44752ebaee892d6fa31b Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 23 Jan 2020 11:00:54 +0100 Subject: [PATCH 31/57] xen_4_8-{light,slim}: fix build --- pkgs/applications/virtualization/xen/4.8.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/xen/4.8.nix b/pkgs/applications/virtualization/xen/4.8.nix index a8d107698248..8cc9c23d2bfd 100644 --- a/pkgs/applications/virtualization/xen/4.8.nix +++ b/pkgs/applications/virtualization/xen/4.8.nix @@ -186,7 +186,7 @@ callPackage (import ./generic.nix (rec { sed 1i'#include ' \ -i tools/blktap2/control/tap-ctl-allocate.c \ -i tools/libxl/libxl_device.c \ - -i tools/qemu-xen/hw/9pfs/9p.c + ${optionalString withInternalQemu "-i tools/qemu-xen/hw/9pfs/9p.c"} sed -i -e '/sys\/sysctl\.h/d' tools/blktap2/drivers/block-remus.c ''; From 4f5830cf9e2bc9eaae38a9adf9e515ecaa4b29cb Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 25 Jan 2020 12:15:03 +0100 Subject: [PATCH 32/57] mono4: fix build w/glibc-2.30 --- pkgs/development/compilers/mono/4.nix | 1 + pkgs/development/compilers/mono/generic.nix | 3 ++- pkgs/development/compilers/mono/mono4-glibc.patch | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/compilers/mono/mono4-glibc.patch diff --git a/pkgs/development/compilers/mono/4.nix b/pkgs/development/compilers/mono/4.nix index cb6edb2a546d..02c6177c9df0 100644 --- a/pkgs/development/compilers/mono/4.nix +++ b/pkgs/development/compilers/mono/4.nix @@ -5,4 +5,5 @@ callPackage ./generic.nix ({ version = "4.8.1.0"; sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq"; enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65600645 + extraPatches = [ ./mono4-glibc.patch ]; }) diff --git a/pkgs/development/compilers/mono/generic.nix b/pkgs/development/compilers/mono/generic.nix index e40d07772dd3..61d298543d0b 100644 --- a/pkgs/development/compilers/mono/generic.nix +++ b/pkgs/development/compilers/mono/generic.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which , enableParallelBuilding ? true , srcArchiveSuffix ? "tar.bz2" +, extraPatches ? [] }: let @@ -42,7 +43,7 @@ stdenv.mkDerivation rec { # We want pkg-config to take priority over the dlls in the Mono framework and the GAC # because we control pkg-config - patches = [ ./pkgconfig-before-gac.patch ]; + patches = [ ./pkgconfig-before-gac.patch ] ++ extraPatches; # Patch all the necessary scripts. Also, if we're using LLVM, we fix the default # LLVM path to point into the Mono LLVM build, since it's private anyway. diff --git a/pkgs/development/compilers/mono/mono4-glibc.patch b/pkgs/development/compilers/mono/mono4-glibc.patch new file mode 100644 index 000000000000..07d5f03f90b8 --- /dev/null +++ b/pkgs/development/compilers/mono/mono4-glibc.patch @@ -0,0 +1,12 @@ +diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c +index 53c271a4..84bd3252 100644 +--- a/mono/io-layer/processes.c ++++ b/mono/io-layer/processes.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #ifdef HAVE_SIGNAL_H + #include From be238f8aef65445e7d9b1452bcba970ebbe3f4c4 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 25 Jan 2020 12:55:11 +0100 Subject: [PATCH 33/57] ext4magic: fix build w/glibc-2.30 --- pkgs/tools/filesystems/ext4magic/default.nix | 1 + pkgs/tools/filesystems/ext4magic/glibc-fix.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 pkgs/tools/filesystems/ext4magic/glibc-fix.patch diff --git a/pkgs/tools/filesystems/ext4magic/default.nix b/pkgs/tools/filesystems/ext4magic/default.nix index 40159b5fb6e6..1e1edfab8dd1 100644 --- a/pkgs/tools/filesystems/ext4magic/default.nix +++ b/pkgs/tools/filesystems/ext4magic/default.nix @@ -14,6 +14,7 @@ stdenv.mkDerivation rec { url = https://sourceforge.net/p/ext4magic/tickets/10/attachment/ext4magic-0.3.2-i_dir_acl.patch; sha256 = "1accydd8kigid68yir2fbihm3r3x8ws3iyznp25snkx41w6y6x8c"; }) + ./glibc-fix.patch ]; buildInputs = [ file libuuid e2fsprogs zlib bzip2 ]; diff --git a/pkgs/tools/filesystems/ext4magic/glibc-fix.patch b/pkgs/tools/filesystems/ext4magic/glibc-fix.patch new file mode 100644 index 000000000000..906609788939 --- /dev/null +++ b/pkgs/tools/filesystems/ext4magic/glibc-fix.patch @@ -0,0 +1,12 @@ +diff --git a/src/recover.c b/src/recover.c +index 41b4aee..30b5d8f 100644 +--- a/src/recover.c ++++ b/src/recover.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #ifndef O_LARGEFILE + #define O_LARGEFILE 0 From ac782ad4b2eaeac85091549ddb47334d2b8fb45f Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 25 Jan 2020 12:58:13 +0100 Subject: [PATCH 34/57] vit: fix tests --- pkgs/applications/misc/vit/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/vit/default.nix b/pkgs/applications/misc/vit/default.nix index 9953af19d90d..506ab5599199 100644 --- a/pkgs/applications/misc/vit/default.nix +++ b/pkgs/applications/misc/vit/default.nix @@ -1,6 +1,8 @@ { lib , python3Packages -, taskwarrior }: +, taskwarrior +, glibcLocales +}: with python3Packages; @@ -21,6 +23,8 @@ buildPythonApplication rec { urwid ]; + checkInputs = [ glibcLocales ]; + makeWrapperArgs = [ "--suffix" "PATH" ":" "${taskwarrior}/bin" ]; preCheck = '' From ffe3f6db8f5ed50b640e617152175b187a9693c4 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 25 Jan 2020 19:22:31 +0100 Subject: [PATCH 35/57] intel-gpu-tools: 1.23 -> 1.24, fix build w/glibc-2.30 --- pkgs/development/tools/misc/intel-gpu-tools/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/misc/intel-gpu-tools/default.nix b/pkgs/development/tools/misc/intel-gpu-tools/default.nix index a56ab127235a..5bf7e22bfbdf 100644 --- a/pkgs/development/tools/misc/intel-gpu-tools/default.nix +++ b/pkgs/development/tools/misc/intel-gpu-tools/default.nix @@ -1,20 +1,21 @@ { stdenv, fetchurl, pkgconfig, libdrm, libpciaccess, cairo, xorgproto, udev , libX11, libXext, libXv, libXrandr, glib, bison, libunwind, python3, kmod -, procps, utilmacros, gtk-doc, openssl, peg }: +, procps, utilmacros, gtk-doc, openssl, peg, elfutils +}: stdenv.mkDerivation rec { pname = "intel-gpu-tools"; - version = "1.23"; + version = "1.24"; src = fetchurl { url = "https://xorg.freedesktop.org/archive/individual/app/igt-gpu-tools-${version}.tar.xz"; - sha256 = "1l4s95m013p2wvddwr4cjqyvsgmc88zxx2887p1fbb1va5n0hjsd"; + sha256 = "1gr1m18w73hmh6n9w2f6gky21qc0pls14bgxkhy95z7azrr7qdap"; }; nativeBuildInputs = [ pkgconfig utilmacros ]; buildInputs = [ libdrm libpciaccess cairo xorgproto udev libX11 kmod libXext libXv libXrandr glib bison libunwind python3 procps - gtk-doc openssl peg ]; + gtk-doc openssl peg elfutils ]; NIX_CFLAGS_COMPILE = [ "-Wno-error=array-bounds" ]; From c24fc44e1f1cd7fb4b4f25d174f9284b0d85a154 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 25 Jan 2020 19:35:08 +0100 Subject: [PATCH 36/57] jfbview: fix build w/glibc-2.30 --- pkgs/os-specific/linux/jfbview/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/linux/jfbview/default.nix b/pkgs/os-specific/linux/jfbview/default.nix index e037ad98226d..84f2edc05fd3 100644 --- a/pkgs/os-specific/linux/jfbview/default.nix +++ b/pkgs/os-specific/linux/jfbview/default.nix @@ -24,6 +24,11 @@ stdenv.mkDerivation rec { sha256 = "09rcmlf04aka0yzr25imadi0fl4nlbsxcahs7fhvzx4nql4halqw"; }; + postPatch = '' + substituteInPlace main.cpp \ + --replace "" "" + ''; + hardeningDisable = [ "format" ]; buildInputs = [ From e96a57b4d3614080ec80b6fa9c41727d4394dcf3 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 25 Jan 2020 19:45:54 +0100 Subject: [PATCH 37/57] udftools: fix build w/glibc-2.30 --- pkgs/tools/filesystems/udftools/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/filesystems/udftools/default.nix b/pkgs/tools/filesystems/udftools/default.nix index 9efaf96182d7..0f52635efc60 100644 --- a/pkgs/tools/filesystems/udftools/default.nix +++ b/pkgs/tools/filesystems/udftools/default.nix @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { sed -e '38i#include ' -i wrudf/wrudf-cdrw.c sed -e '12i#include ' -i wrudf/wrudf-cdr.c sed -e '37i#include ' -i wrudf/ide-pc.c + sed -e '46i#include ' -i mkudffs/main.c sed -e "s@\$(DESTDIR)/lib/udev/rules.d@$out/lib/udev/rules.d@" -i pktsetup/Makefile.am ''; From f5da39906297b251c3d347cd609a1b48bba8b602 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 25 Jan 2020 19:49:56 +0100 Subject: [PATCH 38/57] wcc: fix build w/glibc-2.30 --- pkgs/development/compilers/wcc/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/compilers/wcc/default.nix b/pkgs/development/compilers/wcc/default.nix index 5f812e2c4632..d21d886367f3 100644 --- a/pkgs/development/compilers/wcc/default.nix +++ b/pkgs/development/compilers/wcc/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation { postPatch = '' sed -i src/wsh/include/libwitch/wsh.h src/wsh/scripts/INDEX \ -e "s#/usr/share/wcc#$out/share/wcc#" + + sed -i -e '/stropts.h>/d' src/wsh/include/libwitch/wsh.h ''; installFlags = [ "DESTDIR=$(out)" ]; From a27af1a593bb3795f538f2d9b89d6a45e8f276d0 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 25 Jan 2020 20:15:13 +0100 Subject: [PATCH 39/57] coz: 0.2.0 -> 0.2.1, fix build w/glibc-2.30 --- pkgs/development/tools/analysis/coz/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/coz/default.nix b/pkgs/development/tools/analysis/coz/default.nix index 1ef3457e8e9c..e745f7fe6e53 100644 --- a/pkgs/development/tools/analysis/coz/default.nix +++ b/pkgs/development/tools/analysis/coz/default.nix @@ -7,15 +7,19 @@ }: stdenv.mkDerivation rec { pname = "coz"; - version = "0.2.0"; + version = "0.2.1"; src = fetchFromGitHub { owner = "plasma-umass"; repo = "coz"; rev = version; - sha256 = "0a55q3s8ih1r9x6fp7wkg3n5h1yd9pcwg74k33d1r94y3j3m0znr"; + sha256 = "0val36yw987b1558iiyk3nqg0yy5k9y5wh49v91zj3cs58mmfyhc"; }; + postPatch = '' + sed -i -e '/pid_t gettid/,+2d' libcoz/ccutil/thread.h + ''; + postConfigure = '' # This is currently hard-coded. Will be fixed in the next release. sed -e "s|/usr/lib/|$out/lib/|" -i ./coz From b83afb9a2da71f4d14c65c943c1576efc1448c2c Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 28 Jan 2020 14:07:58 +0100 Subject: [PATCH 40/57] z88dk-unstable: 2019-05-09 -> 2020-01-27, fix build w/glibc-2.30 --- pkgs/development/compilers/z88dk/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/z88dk/default.nix b/pkgs/development/compilers/z88dk/default.nix index 2d62bfede093..a76e57a08078 100644 --- a/pkgs/development/compilers/z88dk/default.nix +++ b/pkgs/development/compilers/z88dk/default.nix @@ -1,14 +1,14 @@ { fetchFromGitHub, stdenv, makeWrapper, unzip, libxml2, m4, uthash, which }: stdenv.mkDerivation rec { - pname = "z88dk"; - version = "unstable-2019-05-09"; + pname = "z88dk-unstable"; + version = "2020-01-27"; src = fetchFromGitHub { owner = "z88dk"; repo = "z88dk"; - rev = "826d68632c3a7c17df88dd2ec54571a6041da69c"; - sha256 = "104qgb01sdb97mkcxnq1cdlqi5qvjm4rd9bg5r42pdfz81ss49xj"; + rev = "efdd07c2e2229cac7cfef97ec01f478004846e39"; + sha256 = "0jcks5ygp256lmzmllffp4yb38cxjgdyqnnimkj4s65095cfasyb"; fetchSubmodules = true; }; From 57d1caf9f67f3f5d8d89b266e9ef0a3312828765 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 28 Jan 2020 14:30:31 +0100 Subject: [PATCH 41/57] ttyrec: mark as broken Requires svr4-specific stuff to work around "out of ptys"-error[1], however this API has been dropped in glibc 2.30 and as the package is fairly old, there doesn't seem to be an actual fix available. [1] https://github.com/mjording/ttyrec/pull/2 --- pkgs/tools/misc/ttyrec/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/misc/ttyrec/default.nix b/pkgs/tools/misc/ttyrec/default.nix index 56ec9afea438..799e397daceb 100644 --- a/pkgs/tools/misc/ttyrec/default.nix +++ b/pkgs/tools/misc/ttyrec/default.nix @@ -26,5 +26,6 @@ stdenv.mkDerivation rec { license = licenses.bsd3; platforms = platforms.all; maintainers = with maintainers; [ zimbatm ]; + broken = true; # 2020-01-28 }; } From b7574e08a007ac150ef8be266bff4edd69ebe32b Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 28 Jan 2020 14:44:33 +0100 Subject: [PATCH 42/57] tiscamera: 0.9.1 -> 0.11.1, fix build w/glibc-2.30 --- .../allow-pipeline-stop-in-trigger-mode.patch | 48 ------------------- pkgs/os-specific/linux/tiscamera/default.nix | 25 ++++++---- 2 files changed, 16 insertions(+), 57 deletions(-) delete mode 100644 pkgs/os-specific/linux/tiscamera/allow-pipeline-stop-in-trigger-mode.patch diff --git a/pkgs/os-specific/linux/tiscamera/allow-pipeline-stop-in-trigger-mode.patch b/pkgs/os-specific/linux/tiscamera/allow-pipeline-stop-in-trigger-mode.patch deleted file mode 100644 index 48a520f6ec3a..000000000000 --- a/pkgs/os-specific/linux/tiscamera/allow-pipeline-stop-in-trigger-mode.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/src/gstreamer-1.0/gsttcamsrc.cpp b/src/gstreamer-1.0/gsttcamsrc.cpp -index d482e1e..e36afd8 100644 ---- a/src/gstreamer-1.0/gsttcamsrc.cpp -+++ b/src/gstreamer-1.0/gsttcamsrc.cpp -@@ -1112,6 +1112,7 @@ bool gst_tcam_src_init_camera (GstTcamSrc* self) - - static void gst_tcam_src_close_camera (GstTcamSrc* self) - { -+ GST_INFO("Closing device"); - if (self->device != NULL) - { - self->device->dev->stop_stream(); -@@ -1156,7 +1157,7 @@ static gboolean gst_tcam_src_stop (GstBaseSrc* src) - - self->device->dev->stop_stream(); - gst_element_send_event(GST_ELEMENT(self), gst_event_new_eos()); -- GST_DEBUG_OBJECT (self, "Stopped acquisition"); -+ GST_DEBUG("Stopped acquisition"); - - return TRUE; - } -@@ -1556,6 +1557,18 @@ static void gst_tcam_src_get_property (GObject* object, - } - - -+static gboolean gst_tcam_src_unlock (GstBaseSrc* src) -+{ -+ GstTcamSrc* self = GST_TCAM_SRC(src); -+ -+ self->is_running = FALSE; -+ -+ self->cv.notify_all(); -+ -+ return TRUE; -+} -+ -+ - static void gst_tcam_src_class_init (GstTcamSrcClass* klass) - { - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); -@@ -1616,6 +1629,7 @@ static void gst_tcam_src_class_init (GstTcamSrcClass* klass) - gstbasesrc_class->fixate = gst_tcam_src_fixate_caps; - gstbasesrc_class->start = gst_tcam_src_start; - gstbasesrc_class->stop = gst_tcam_src_stop; -+ gstbasesrc_class->unlock = gst_tcam_src_unlock; - gstbasesrc_class->negotiate = gst_tcam_src_negotiate; - gstbasesrc_class->get_times = gst_tcam_src_get_times; - diff --git a/pkgs/os-specific/linux/tiscamera/default.nix b/pkgs/os-specific/linux/tiscamera/default.nix index 387a3bcf2c6f..ebd17de892ab 100644 --- a/pkgs/os-specific/linux/tiscamera/default.nix +++ b/pkgs/os-specific/linux/tiscamera/default.nix @@ -11,17 +11,23 @@ , gobject-introspection , gst_all_1 , libwebcam +, libunwind +, gstreamer +, elfutils +, orc +, python3 +, libuuid }: stdenv.mkDerivation rec { pname = "tiscamera"; - version = "0.9.1"; + version = "0.11.1"; src = fetchFromGitHub { owner = "TheImagingSource"; repo = pname; rev = "v-${pname}-${version}"; - sha256 = "143yp6bpzj3rqfnrcnlrcwggay37fg6rkphh4w9y9v7v4wllzf87"; + sha256 = "07vp6khgl6qd3a4519dmx1s5bfw7pld793p50pjn29fqh91fm93g"; }; nativeBuildInputs = [ @@ -39,6 +45,12 @@ stdenv.mkDerivation rec { gst_all_1.gstreamer gst_all_1.gst-plugins-base libwebcam + libunwind + gstreamer + elfutils + orc + python3 + libuuid ]; @@ -50,13 +62,8 @@ stdenv.mkDerivation rec { "-DBUILD_LIBUSB=ON" ]; - - patches = [ - ./allow-pipeline-stop-in-trigger-mode.patch # To be removed next release. - ]; - postPatch = '' - substituteInPlace ./data/udev/80-theimagingsource-cameras.rules \ + substituteInPlace ./data/udev/80-theimagingsource-cameras.rules.in \ --replace "/usr/bin/uvcdynctrl" "${libwebcam}/bin/uvcdynctrl" \ --replace "/path/to/tiscamera/uvc-extensions" "$out/share/uvcdynctrl/data/199e" @@ -94,4 +101,4 @@ stdenv.mkDerivation rec { platforms = platforms.linux; maintainers = with maintainers; [ jraygauthier ]; }; -} \ No newline at end of file +} From f4bd5783665fff87a97deb19c8b38afe85cd2d19 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 28 Jan 2020 15:45:30 +0100 Subject: [PATCH 43/57] eresi: fix build w/glibc-2.30 --- pkgs/development/tools/analysis/eresi/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/analysis/eresi/default.nix b/pkgs/development/tools/analysis/eresi/default.nix index ed338a6e0d9b..b84eeae15dca 100644 --- a/pkgs/development/tools/analysis/eresi/default.nix +++ b/pkgs/development/tools/analysis/eresi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, which, openssl, readline }: +{ stdenv, lib, fetchFromGitHub, which, openssl, readline, fetchpatch }: stdenv.mkDerivation rec { pname = "eresi"; @@ -11,6 +11,13 @@ stdenv.mkDerivation rec { sha256 = "0a5a7mh2zw9lcdrl8n1mqccrc0xcgj7743l7l4kslkh722fxv625"; }; + patches = [ + (fetchpatch { + url = "https://github.com/thorkill/eresi/commit/a79406344cc21d594d27fa5ec5922abe9f7475e7.patch"; + sha256 = "1mjjc6hj7r06iarvai7prcdvjk9g0k5vwrmkwcm7b8ivd5xzxp2z"; + }) + ]; + postPatch = '' # Two occurences of fprintf() with only two arguments, which should really # be fputs(). From df26ab92a225cf2162fd0c14b4908047f8ac924d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 29 Jan 2020 12:04:11 +0100 Subject: [PATCH 44/57] distrho: remove glibc patch Package was updated on staging and contains the patch in its sources now. --- pkgs/applications/audio/distrho/default.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/applications/audio/distrho/default.nix b/pkgs/applications/audio/distrho/default.nix index c201816f5a22..36f7dcc5993f 100644 --- a/pkgs/applications/audio/distrho/default.nix +++ b/pkgs/applications/audio/distrho/default.nix @@ -1,7 +1,6 @@ { stdenv, fetchFromGitHub, alsaLib, fftwSinglePrec, freetype, libjack2 , pkgconfig, ladspa-sdk, premake3 , libX11, libXcomposite, libXcursor, libXext, libXinerama, libXrender -, fetchpatch }: let @@ -27,13 +26,6 @@ in stdenv.mkDerivation rec { runHook postConfigure ''; - patches = [ - (fetchpatch { - url = "https://github.com/DISTRHO/DISTRHO-Ports/commit/00ad25fd574c1724bbc974308aa5e88306969009.patch"; - sha256 = "0hdnnvn35g76q7133azwalbm1dxs8dm2yg3zjjb1kzq0x6qrazx5"; - }) - ]; - postPatch = '' sed -e "s#@./scripts#sh scripts#" -i Makefile ''; From 73bc3300ad02be21998a7c0e987592ca66df73f3 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 29 Jan 2020 12:16:05 +0100 Subject: [PATCH 45/57] gftp: fix build w/glibc-2.30 --- pkgs/tools/networking/gftp/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/networking/gftp/default.nix b/pkgs/tools/networking/gftp/default.nix index 9431216e2515..fb63ee46c9d3 100644 --- a/pkgs/tools/networking/gftp/default.nix +++ b/pkgs/tools/networking/gftp/default.nix @@ -8,6 +8,10 @@ stdenv.mkDerivation { sha256 = "1z8b26n23k0sjbxgrix646b06cnpndpq7cbcj0ilsvvdx5ms81jk"; }; + postPatch = '' + sed -i -e '//d' lib/pty.c + ''; + nativeBuildInputs = [ pkgconfig ]; buildInputs = [ gtk2 readline ncurses gettext openssl ]; From 1203742766b1bf9f0eede2b44f8397cbda478c87 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Jan 2020 15:19:11 +0100 Subject: [PATCH 46/57] ssw: init at 0.3 GNU spread-sheet widget. Needed for pspp-1.2.0. --- pkgs/applications/misc/ssw/default.nix | 21 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/applications/misc/ssw/default.nix diff --git a/pkgs/applications/misc/ssw/default.nix b/pkgs/applications/misc/ssw/default.nix new file mode 100644 index 000000000000..24b7953fe3d2 --- /dev/null +++ b/pkgs/applications/misc/ssw/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, pkg-config, gtk3 }: + +stdenv.mkDerivation rec { + pname = "ssw"; + version = "0.3"; + + src = fetchurl { + url = "https://alpha.gnu.org/gnu/ssw/spread-sheet-widget-${version}.tar.gz"; + sha256 = "1h93yyh2by6yrmkwqg38nd5knids05k5nqzcihc1hdwgzg3c4b8y"; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ gtk3 ]; + + meta = with stdenv.lib; { + homepage = "https://www.gnu.org/software/ssw/"; + license = licenses.gpl3; + description = "GNU Spread Sheet Widget"; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 473d37cc0edf..81370e495b63 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24512,6 +24512,8 @@ in pspp = callPackage ../applications/science/math/pspp { }; + ssw = callPackage ../applications/misc/ssw { }; + pynac = callPackage ../applications/science/math/pynac { }; singular = callPackage ../applications/science/math/singular { }; From abefd4f78a0af8bef6fe57b3348742db29ec2a1e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Jan 2020 15:19:44 +0100 Subject: [PATCH 47/57] pspp: 1.0.1 -> 1.2.0, fix build w/glibc-2.30 --- pkgs/applications/science/math/pspp/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/science/math/pspp/default.nix b/pkgs/applications/science/math/pspp/default.nix index 3c263916a0eb..af338c74fd41 100644 --- a/pkgs/applications/science/math/pspp/default.nix +++ b/pkgs/applications/science/math/pspp/default.nix @@ -1,20 +1,23 @@ { stdenv, fetchurl, libxml2, readline, zlib, perl, cairo, gtk3, gsl , pkgconfig, gtksourceview, pango, gettext, dconf , makeWrapper, gsettings-desktop-schemas, hicolor-icon-theme +, texinfo, ssw }: stdenv.mkDerivation rec { - name = "pspp-1.0.1"; + pname = "pspp"; + version = "1.2.0"; src = fetchurl { - url = "mirror://gnu/pspp/${name}.tar.gz"; - sha256 = "1r8smr5057993h90nx0mdnff8nxw9x546zzh6qpy4h3xblp1la5s"; + url = "mirror://gnu/pspp/${pname}-${version}.tar.gz"; + sha256 = "07pp27zycrb5x927jwaj9r3q7hy915jh51xs85zxby6gfiwl63m5"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig texinfo ]; buildInputs = [ libxml2 readline zlib perl cairo gtk3 gsl gtksourceview pango gettext - makeWrapper gsettings-desktop-schemas hicolor-icon-theme ]; + makeWrapper gsettings-desktop-schemas hicolor-icon-theme ssw + ]; doCheck = false; From edbbd1e0449d8d8aaa369846e1726ea9d7f9fec4 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Jan 2020 15:24:04 +0100 Subject: [PATCH 48/57] gpsd: fix build w/glibc-2.30 --- pkgs/servers/gpsd/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix index a05b37e9d2ca..8ea060a82552 100644 --- a/pkgs/servers/gpsd/default.nix +++ b/pkgs/servers/gpsd/default.nix @@ -42,6 +42,10 @@ stdenv.mkDerivation rec { ./0002-scons-envs-patch.patch ]; + postPatch = '' + sed -i -e '17i#include ' serial.c + ''; + # - leapfetch=no disables going online at build time to fetch leap-seconds # info. See /build.txt for more info. preBuild = '' From 306cbf24af199eb27fec7cfa3e6a67acb36f3bdb Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Jan 2020 15:34:17 +0100 Subject: [PATCH 49/57] policycoreutils: fix build w/glibc-2.30 --- pkgs/os-specific/linux/policycoreutils/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/os-specific/linux/policycoreutils/default.nix b/pkgs/os-specific/linux/policycoreutils/default.nix index 9d229c50000e..f9e3a7fb5d4f 100644 --- a/pkgs/os-specific/linux/policycoreutils/default.nix +++ b/pkgs/os-specific/linux/policycoreutils/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { substituteInPlace po/Makefile \ --replace /usr/bin/install install --replace /usr/share /share substituteInPlace newrole/Makefile --replace /usr/share /share + + sed -i -e '39i#include ' run_init/run_init.c ''; nativeBuildInputs = [ gettext ]; From 5232491481ec83da62a60c0f027c4da2eabbf141 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 30 Jan 2020 15:36:40 +0100 Subject: [PATCH 50/57] prayer: fix build w/glibc-2.30 --- pkgs/servers/prayer/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/prayer/default.nix b/pkgs/servers/prayer/default.nix index d1351afa0b30..95fbe446bb24 100644 --- a/pkgs/servers/prayer/default.nix +++ b/pkgs/servers/prayer/default.nix @@ -35,6 +35,7 @@ stdenv.mkDerivation rec { Config sed -i -e s,/usr/bin/perl,${perl}/bin/perl, \ templates/src/*.pl + sed -i -e '//d' lib/os_linux.h '' + /* html-tidy updates */ '' substituteInPlace ./session/html_secure_tidy.c \ --replace buffio.h tidybuffio.h From 056dc16463ab83e46acdfac69faf3e17f74e0a62 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 31 Jan 2020 19:07:08 +0100 Subject: [PATCH 51/57] idutils: mark as broken Last release was in 2012, package is unmaintained and build system is pretty old, so we can't just replace the ancient gnulib with a newer version without further hassle. --- pkgs/tools/misc/idutils/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/misc/idutils/default.nix b/pkgs/tools/misc/idutils/default.nix index 959be2a4eb12..01995c4939af 100644 --- a/pkgs/tools/misc/idutils/default.nix +++ b/pkgs/tools/misc/idutils/default.nix @@ -50,5 +50,6 @@ stdenv.mkDerivation rec { maintainers = [ ]; platforms = stdenv.lib.platforms.all; + broken = true; }; } From 3be119d5ba4321fc5a8bde5ac8ae9124f5c54ea2 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 1 Feb 2020 14:53:46 +0100 Subject: [PATCH 52/57] libmilter: fix build w/glibc-2.30 Using RES_USE_INET6 is deprecated and has been removed by glibc 2.30[1]. Instead, there's now a function `gethostbyname2(3)` which takes the address family as second argument to force IPv6 resolution[2]. [1] https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html [2] https://linux.die.net/man/3/gethostbyname2 --- .../libraries/libmilter/default.nix | 2 +- .../libraries/libmilter/glibc-2.30.patch | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/libmilter/glibc-2.30.patch diff --git a/pkgs/development/libraries/libmilter/default.nix b/pkgs/development/libraries/libmilter/default.nix index 3eb688f95721..8d677d858de8 100644 --- a/pkgs/development/libraries/libmilter/default.nix +++ b/pkgs/development/libraries/libmilter/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { sh Build -f ./a.m4 ''; - patches = [ ./install.patch ./sharedlib.patch ]; + patches = [ ./install.patch ./sharedlib.patch ./glibc-2.30.patch ]; nativeBuildInputs = [ m4 ]; diff --git a/pkgs/development/libraries/libmilter/glibc-2.30.patch b/pkgs/development/libraries/libmilter/glibc-2.30.patch new file mode 100644 index 000000000000..e72ec9911e37 --- /dev/null +++ b/pkgs/development/libraries/libmilter/glibc-2.30.patch @@ -0,0 +1,44 @@ +diff --git a/libmilter/sm_gethost.c b/libmilter/sm_gethost.c +index 2423c34..f00468c 100644 +--- a/libmilter/sm_gethost.c ++++ b/libmilter/sm_gethost.c +@@ -52,16 +52,8 @@ sm_getipnodebyname(name, family, flags, err) + bool resv6 = true; + struct hostent *h; + +- if (family == AF_INET6) +- { +- /* From RFC2133, section 6.1 */ +- resv6 = bitset(RES_USE_INET6, _res.options); +- _res.options |= RES_USE_INET6; +- } + SM_SET_H_ERRNO(0); +- h = gethostbyname(name); +- if (family == AF_INET6 && !resv6) +- _res.options &= ~RES_USE_INET6; ++ h = gethostbyname2(name, family); + + /* the function is supposed to return only the requested family */ + if (h != NULL && h->h_addrtype != family) +diff --git a/sendmail/conf.c b/sendmail/conf.c +index c73334e..500dafb 100644 +--- a/sendmail/conf.c ++++ b/sendmail/conf.c +@@ -4243,16 +4243,8 @@ sm_getipnodebyname(name, family, flags, err) + # else /* HAS_GETHOSTBYNAME2 */ + bool resv6 = true; + +- if (family == AF_INET6) +- { +- /* From RFC2133, section 6.1 */ +- resv6 = bitset(RES_USE_INET6, _res.options); +- _res.options |= RES_USE_INET6; +- } + SM_SET_H_ERRNO(0); +- h = gethostbyname(name); +- if (!resv6) +- _res.options &= ~RES_USE_INET6; ++ h = gethostbyname2(name, family); + + /* the function is supposed to return only the requested family */ + if (h != NULL && h->h_addrtype != family) From ca7a3c86232032badd2318110357cd12a999db2b Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 1 Feb 2020 17:24:49 +0100 Subject: [PATCH 53/57] kermit: mark as broken Uses internal API of the _IO_FILE struct which breaks with glibc-2.30. Also there's no release since 2011. --- pkgs/tools/misc/kermit/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/misc/kermit/default.nix b/pkgs/tools/misc/kermit/default.nix index 9f739da0afa0..d320491756cf 100644 --- a/pkgs/tools/misc/kermit/default.nix +++ b/pkgs/tools/misc/kermit/default.nix @@ -35,5 +35,6 @@ stdenv.mkDerivation { license = licenses.bsd3; maintainers = with maintainers; [ pSub ]; platforms = with platforms; linux; + broken = true; }; } From 1bb18d9e8dbe537225c8d6ae8476aae3c40df368 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 1 Feb 2020 17:30:18 +0100 Subject: [PATCH 54/57] lwan: 0.2 -> 0.3, fix build w/glibc-2.30 --- pkgs/servers/http/lwan/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/lwan/default.nix b/pkgs/servers/http/lwan/default.nix index 9cd9a6b7fec1..fb8bc03a1d52 100644 --- a/pkgs/servers/http/lwan/default.nix +++ b/pkgs/servers/http/lwan/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "lwan"; - version = "0.2"; + version = "0.3"; src = fetchFromGitHub { owner = "lpereira"; repo = pname; rev = "v${version}"; - sha256 = "1z1g6bmdsf7zj809sq6jqkpzkdnx1jch84kk67h0v2x6lxhdpv5r"; + sha256 = "1znkcsbxw3r10prqvf2x27w1wmm9kd485pj59c364wlvqdhidwqr"; }; nativeBuildInputs = [ cmake pkgconfig ]; From 22284b07ef1ca082d14cde8205567b3af4fd27df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 5 Feb 2020 13:02:04 +0100 Subject: [PATCH 55/57] gcc: disable LTO on i686 as a workaround to fix build after updating stdenv bootstrap (in the followup commit). Interested parties can improve this later. --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 960415745973..124a68092be7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8107,6 +8107,8 @@ in # PGO seems to speed up compilation by gcc by ~10%, see #445 discussion profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64)); + enableLTO = !stdenv.isi686; + libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; From 53349b9c276e970f45e429e2467758a1ff54820c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 3 Feb 2020 19:04:04 +0100 Subject: [PATCH 56/57] stdenv bootstrap tools: regenerate "officialy" From Hydra's binaries for c5aabb0 (19.09). This time I re-tested full stdenv bootstrap on these three platforms. https://github.com/NixOS/nixpkgs/pull/66528#issuecomment-582351637 --- pkgs/stdenv/linux/bootstrap-files/aarch64.nix | 10 ++++------ pkgs/stdenv/linux/bootstrap-files/i686.nix | 8 ++++---- pkgs/stdenv/linux/bootstrap-files/x86_64.nix | 4 ++-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/pkgs/stdenv/linux/bootstrap-files/aarch64.nix b/pkgs/stdenv/linux/bootstrap-files/aarch64.nix index 90c74bf1723f..72ded1be11a1 100644 --- a/pkgs/stdenv/linux/bootstrap-files/aarch64.nix +++ b/pkgs/stdenv/linux/bootstrap-files/aarch64.nix @@ -1,13 +1,11 @@ -# FIXME(ma27): before merging this to master we *have* to replace those files -# as they're built for testing purposes with the aarch64 community builder. { busybox = import { - url = "https://aarch64.mbosch.me/busybox"; - sha256 = "10z8aigcj0lyfwbc4wzl7s0ng9g37sx1vsqh9sijw3hi0gfhhn4v"; + url = http://nixos-arm.dezgeg.me/bootstrap-aarch64-2017-03-11-bb3ef8/busybox; + sha256 = "12qcml1l67skpjhfjwy7gr10nc86gqcwjmz9ggp7knss8gq8pv7f"; executable = true; }; bootstrapTools = import { - url = "https://aarch64.mbosch.me/bootstrap-tools.tar.xz"; - sha256 = "0n4k0l7j2yqjzicj1gyk8gdpbszqn6yj6mlx6m2pzfcm2hmbzwfk"; + url = http://tarballs.nixos.org/stdenv-linux/aarch64/c5aabb0d603e2c1ea05f5a93b3be82437f5ebf31/bootstrap-tools.tar.xz; + sha256 = "d3f1bf2a1495b97f45359d5623bdb1f8eb75db43d3bf2059fc127b210f059358"; }; } diff --git a/pkgs/stdenv/linux/bootstrap-files/i686.nix b/pkgs/stdenv/linux/bootstrap-files/i686.nix index 55cff0a636d7..81dede2c80eb 100644 --- a/pkgs/stdenv/linux/bootstrap-files/i686.nix +++ b/pkgs/stdenv/linux/bootstrap-files/i686.nix @@ -1,12 +1,12 @@ { busybox = import { - url = https://lblasc-nix-dev.s3-eu-west-1.amazonaws.com/bootstrap-tools-i686-gcc9/busybox; - sha256 = "03g3hz2ar6nz7chfwip72gvy4wd828ha9bdgg6mjs9llsc0d2izz"; + url = http://tarballs.nixos.org/stdenv-linux/i686/4907fc9e8d0d82b28b3c56e3a478a2882f1d700f/busybox; + sha256 = "ef4c1be6c7ae57e4f654efd90ae2d2e204d6769364c46469fa9ff3761195cba1"; executable = true; }; bootstrapTools = import { - url = https://lblasc-nix-dev.s3-eu-west-1.amazonaws.com/bootstrap-tools-i686-gcc9/bootstrap-tools.tar.xz; - sha256 = "1m142s2z7v3v6k0m3d91prp7i71hhy394jgnkd7y3z5sh15c8j28"; + url = http://tarballs.nixos.org/stdenv-linux/i686/c5aabb0d603e2c1ea05f5a93b3be82437f5ebf31/bootstrap-tools.tar.xz; + sha256 = "b9bf20315f8c5c0411679c5326084420b522046057a0850367c67d9514794f1c"; }; } diff --git a/pkgs/stdenv/linux/bootstrap-files/x86_64.nix b/pkgs/stdenv/linux/bootstrap-files/x86_64.nix index 4c4db07b3064..2800d571c40f 100644 --- a/pkgs/stdenv/linux/bootstrap-files/x86_64.nix +++ b/pkgs/stdenv/linux/bootstrap-files/x86_64.nix @@ -3,7 +3,7 @@ { bootstrapTools = import { - url = https://lblasc-nix-dev.s3-eu-west-1.amazonaws.com/bootstrap-tools-x86-64-gcc9/bootstrap-tools.tar.xz; - sha256 = "0dyvaqlaszd5i2vr36h4d3k47a5xc550n1y4mkiirm1gd4ynaz1g"; + url = http://tarballs.nixos.org/stdenv-linux/x86_64/c5aabb0d603e2c1ea05f5a93b3be82437f5ebf31/bootstrap-tools.tar.xz; + sha256 = "a5ce9c155ed09397614646c9717fc7cd94b1023d7b76b618d409e4fefd6e9d39"; }; } From 5ca088f1cc4216fe4a11a769ec5d55343a3f978a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 3 Feb 2020 18:07:49 +0100 Subject: [PATCH 57/57] glibc/*.patch: revert no-op changes done in 447edaa3 I suppose the diff of the glibc-upgrade branch is a bit cleaner without including these unnecessary changes. --- .../glibc/dont-use-system-ld-so-cache.patch | 35 ++++++++++--------- .../glibc/dont-use-system-ld-so-preload.patch | 7 ++-- .../libraries/glibc/fix-x64-abi.patch | 13 ++++--- .../glibc/fix_path_attribute_in_getconf.patch | 5 +-- .../libraries/glibc/nix-locale-archive.patch | 35 ++++++++++--------- .../libraries/glibc/rpcgen-path.patch | 13 +++---- 6 files changed, 58 insertions(+), 50 deletions(-) diff --git a/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch b/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch index f45e39525f55..f84b1049adf8 100644 --- a/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch +++ b/pkgs/development/libraries/glibc/dont-use-system-ld-so-cache.patch @@ -1,6 +1,19 @@ ---- a/elf/Makefile -+++ b/elf/Makefile -@@ -589,13 +589,13 @@ $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o) +diff -Naur glibc-2.27-orig/elf/ldconfig.c glibc-2.27/elf/ldconfig.c +--- glibc-2.27-orig/elf/ldconfig.c 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/elf/ldconfig.c 2018-02-17 22:43:17.232175182 -0500 +@@ -51,7 +51,7 @@ + #endif + + #ifndef LD_SO_CONF +-# define LD_SO_CONF SYSCONFDIR "/ld.so.conf" ++# define LD_SO_CONF PREFIX "/etc/ld.so.conf" + #endif + + /* Get libc version number. */ +diff -Naur glibc-2.27-orig/elf/Makefile glibc-2.27/elf/Makefile +--- glibc-2.27-orig/elf/Makefile 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/elf/Makefile 2018-02-17 22:44:50.334006750 -0500 +@@ -559,13 +559,13 @@ $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o) @@ -19,19 +32,9 @@ cpp-srcs-left := $(all-rtld-routines:=.os) lib := rtld ---- a/elf/ldconfig.c -+++ b/elf/ldconfig.c -@@ -51,7 +51,7 @@ - #endif - - #ifndef LD_SO_CONF --# define LD_SO_CONF SYSCONFDIR "/ld.so.conf" -+# define LD_SO_CONF PREFIX "/etc/ld.so.conf" - #endif - - /* Get libc version number. */ ---- a/sysdeps/generic/dl-cache.h -+++ b/sysdeps/generic/dl-cache.h +diff -Naur glibc-2.27-orig/sysdeps/generic/dl-cache.h glibc-2.27/sysdeps/generic/dl-cache.h +--- glibc-2.27-orig/sysdeps/generic/dl-cache.h 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/sysdeps/generic/dl-cache.h 2018-02-17 22:45:20.471598816 -0500 @@ -28,7 +28,7 @@ #endif diff --git a/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch b/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch index 69b63a5bcfee..894e2a11cf87 100644 --- a/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch +++ b/pkgs/development/libraries/glibc/dont-use-system-ld-so-preload.patch @@ -1,6 +1,7 @@ ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -1697,7 +1697,7 @@ ERROR: '%s': cannot process note segment.\n", _dl_argv[0]); +diff -ru glibc-2.20-orig/elf/rtld.c glibc-2.20/elf/rtld.c +--- glibc-2.20-orig/elf/rtld.c 2014-09-07 10:09:09.000000000 +0200 ++++ glibc-2.20/elf/rtld.c 2014-10-27 11:32:25.203043157 +0100 +@@ -1513,7 +1513,7 @@ open(). So we do this first. If it succeeds we do almost twice the work but this does not matter, since it is not for production use. */ diff --git a/pkgs/development/libraries/glibc/fix-x64-abi.patch b/pkgs/development/libraries/glibc/fix-x64-abi.patch index f5a6d603bf85..1d60dcd7988b 100644 --- a/pkgs/development/libraries/glibc/fix-x64-abi.patch +++ b/pkgs/development/libraries/glibc/fix-x64-abi.patch @@ -1,4 +1,4 @@ -From d9e6dd5631c8d97fd2d3128317c6352e34bf3ca7 Mon Sep 17 00:00:00 2001 +From 3288c6da64add3b4561b8c10fff522027caea01c Mon Sep 17 00:00:00 2001 From: Nicholas Miell Date: Sat, 17 Jun 2017 18:21:07 -0700 Subject: [PATCH] Align the stack on entry to __tls_get_addr() @@ -17,13 +17,13 @@ engine and available for purchase on Steam. 1 file changed, 4 insertions(+) diff --git a/elf/dl-tls.c b/elf/dl-tls.c -index b425d661..b02c2afa 100644 +index 5aba33b3fa..3f3cb917de 100644 --- a/elf/dl-tls.c +++ b/elf/dl-tls.c -@@ -818,6 +818,10 @@ rtld_hidden_proto (__tls_get_addr) +@@ -827,6 +827,10 @@ rtld_hidden_proto (__tls_get_addr) rtld_hidden_def (__tls_get_addr) #endif - + +#ifdef __x86_64__ +/* Old versions of gcc didn't align the stack. */ +__attribute__((force_align_arg_pointer)) @@ -31,6 +31,5 @@ index b425d661..b02c2afa 100644 /* The generic dynamic and local dynamic model cannot be used in statically linked applications. */ void * --- -2.17.1 - +-- +2.13.0 diff --git a/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch b/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch index b13cea4dcb33..714e49db5607 100644 --- a/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch +++ b/pkgs/development/libraries/glibc/fix_path_attribute_in_getconf.patch @@ -1,5 +1,6 @@ ---- a/sysdeps/unix/confstr.h -+++ b/sysdeps/unix/confstr.h +diff -ubr glibc-2.17-orig/sysdeps/unix/confstr.h glibc-2.17/sysdeps/unix/confstr.h +--- glibc-2.17-orig/sysdeps/unix/confstr.h 2013-06-03 22:01:44.829726968 +0200 ++++ glibc-2.17/sysdeps/unix/confstr.h 2013-06-03 22:04:39.469376740 +0200 @@ -1 +1 @@ -#define CS_PATH "/bin:/usr/bin" +#define CS_PATH "/run/current-system/sw/bin:/bin:/usr/bin" diff --git a/pkgs/development/libraries/glibc/nix-locale-archive.patch b/pkgs/development/libraries/glibc/nix-locale-archive.patch index f2feabc36ada..39312951fcf9 100644 --- a/pkgs/development/libraries/glibc/nix-locale-archive.patch +++ b/pkgs/development/libraries/glibc/nix-locale-archive.patch @@ -1,6 +1,7 @@ ---- a/locale/loadarchive.c -+++ b/locale/loadarchive.c -@@ -123,6 +123,23 @@ calculate_head_size (const struct locarhead *h) +diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c +--- glibc-2.27-orig/locale/loadarchive.c 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/locale/loadarchive.c 2018-02-17 22:32:25.680169462 -0500 +@@ -123,6 +123,23 @@ return MAX (namehash_end, MAX (string_end, locrectab_end)); } @@ -24,7 +25,7 @@ /* Find the locale *NAMEP in the locale archive, and return the internalized data structure for its CATEGORY data. If this locale has -@@ -202,7 +219,7 @@ _nl_load_locale_from_archive (int category, const char **namep) +@@ -202,7 +219,7 @@ archmapped = &headmap; /* The archive has never been opened. */ @@ -33,7 +34,7 @@ if (fd < 0) /* Cannot open the archive, for whatever reason. */ return NULL; -@@ -397,8 +414,7 @@ _nl_load_locale_from_archive (int category, const char **namep) +@@ -397,8 +414,7 @@ if (fd == -1) { struct stat64 st; @@ -43,13 +44,13 @@ if (fd == -1) /* Cannot open the archive, for whatever reason. */ return NULL; ---- a/locale/programs/locale.c -+++ b/locale/programs/locale.c -@@ -633,6 +633,24 @@ nameentcmp (const void *a, const void *b) - } +diff -Naur glibc-2.27-orig/locale/programs/locale.c glibc-2.27/locale/programs/locale.c +--- glibc-2.27-orig/locale/programs/locale.c 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/locale/programs/locale.c 2018-02-17 22:36:39.726293213 -0500 +@@ -633,6 +633,24 @@ -+static int + static int +open_locale_archive (void) +{ + int fd = -1; @@ -67,10 +68,11 @@ +} + + - static int ++static int write_archive_locales (void **all_datap, char *linebuf) { -@@ -645,7 +663,7 @@ write_archive_locales (void **all_datap, char *linebuf) + struct stat64 st; +@@ -644,7 +662,7 @@ int fd, ret = 0; uint32_t cnt; @@ -79,9 +81,10 @@ if (fd < 0) return 0; ---- a/locale/programs/locarchive.c -+++ b/locale/programs/locarchive.c -@@ -117,6 +117,22 @@ prepare_address_space (int fd, size_t total, size_t *reserved, int *xflags, +diff -Naur glibc-2.27-orig/locale/programs/locarchive.c glibc-2.27/locale/programs/locarchive.c +--- glibc-2.27-orig/locale/programs/locarchive.c 2018-02-01 11:17:18.000000000 -0500 ++++ glibc-2.27/locale/programs/locarchive.c 2018-02-17 22:40:51.245293975 -0500 +@@ -117,6 +117,22 @@ } @@ -104,7 +107,7 @@ static void create_archive (const char *archivefname, struct locarhandle *ah) { -@@ -578,7 +594,7 @@ open_archive (struct locarhandle *ah, bool readonly) +@@ -578,7 +594,7 @@ while (1) { /* Open the archive. We must have exclusive write access. */ diff --git a/pkgs/development/libraries/glibc/rpcgen-path.patch b/pkgs/development/libraries/glibc/rpcgen-path.patch index 4f427879f241..3349449d9163 100644 --- a/pkgs/development/libraries/glibc/rpcgen-path.patch +++ b/pkgs/development/libraries/glibc/rpcgen-path.patch @@ -1,6 +1,7 @@ ---- a/sunrpc/rpc_main.c -+++ b/sunrpc/rpc_main.c -@@ -78,7 +78,7 @@ static const char *cmdname; +diff -ru glibc-2.18-orig/sunrpc/rpc_main.c glibc-2.18/sunrpc/rpc_main.c +--- glibc-2.18-orig/sunrpc/rpc_main.c 2013-08-11 00:52:55.000000000 +0200 ++++ glibc-2.18/sunrpc/rpc_main.c 2013-11-15 12:04:48.041006977 +0100 +@@ -78,7 +78,7 @@ static const char *svcclosetime = "120"; static int cppDefined; /* explicit path for C preprocessor */ @@ -9,7 +10,7 @@ static const char CPPFLAGS[] = "-C"; static char *pathbuf; static int cpp_pid; -@@ -107,7 +107,6 @@ static char *extendfile (const char *file, const char *ext); +@@ -107,7 +107,6 @@ static void open_output (const char *infile, const char *outfile); static void add_warning (void); static void clear_args (void); @@ -17,7 +18,7 @@ static void open_input (const char *infile, const char *define); static int check_nettype (const char *name, const char *list_to_check[]); static void c_output (const char *infile, const char *define, -@@ -322,25 +321,6 @@ clear_args (void) +@@ -322,25 +321,6 @@ argcount = FIXEDARGS; } @@ -43,7 +44,7 @@ /* * Open input file with given define for C-preprocessor */ -@@ -359,7 +339,6 @@ open_input (const char *infile, const char *define) +@@ -359,7 +339,6 @@ switch (cpp_pid) { case 0: