From db418fce3d159391a7f2baf2b765e5798908c696 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 29 Dec 2012 00:48:14 +0100 Subject: [PATCH 1/5] glibc: Update to 2.17 Note that glibc-ports is now part of the main glibc tarball. --- .../libraries/glibc/{2.16 => 2.17}/builder.sh | 0 .../libraries/glibc/{2.16 => 2.17}/common.nix | 18 ++---------------- .../libraries/glibc/{2.16 => 2.17}/default.nix | 0 .../dont-use-system-ld-so-cache.patch | 0 .../{2.16 => 2.17}/glibc-elf-localscope.patch | 0 .../libraries/glibc/{2.16 => 2.17}/info.nix | 0 .../glibc/{2.16 => 2.17}/locales-builder.sh | 0 .../libraries/glibc/{2.16 => 2.17}/locales.nix | 0 .../{2.16 => 2.17}/nix-locale-archive.patch | 0 .../{2.16 => 2.17}/nss-skip-unavail.patch | 0 .../glibc/{2.16 => 2.17}/rpcgen-path.patch | 0 pkgs/top-level/all-packages.nix | 4 ++-- 12 files changed, 4 insertions(+), 18 deletions(-) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/builder.sh (100%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/common.nix (91%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/default.nix (100%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/dont-use-system-ld-so-cache.patch (100%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/glibc-elf-localscope.patch (100%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/info.nix (100%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/locales-builder.sh (100%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/locales.nix (100%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/nix-locale-archive.patch (100%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/nss-skip-unavail.patch (100%) rename pkgs/development/libraries/glibc/{2.16 => 2.17}/rpcgen-path.patch (100%) diff --git a/pkgs/development/libraries/glibc/2.16/builder.sh b/pkgs/development/libraries/glibc/2.17/builder.sh similarity index 100% rename from pkgs/development/libraries/glibc/2.16/builder.sh rename to pkgs/development/libraries/glibc/2.17/builder.sh diff --git a/pkgs/development/libraries/glibc/2.16/common.nix b/pkgs/development/libraries/glibc/2.17/common.nix similarity index 91% rename from pkgs/development/libraries/glibc/2.16/common.nix rename to pkgs/development/libraries/glibc/2.17/common.nix index ea54b45a50de..ccdae6200e53 100644 --- a/pkgs/development/libraries/glibc/2.16/common.nix +++ b/pkgs/development/libraries/glibc/2.17/common.nix @@ -11,24 +11,12 @@ cross: , preConfigure ? "", ... }@args: let - version = "2.16.0"; - needsPortsNative = stdenv.isMips || stdenv.isArm; - needsPortsCross = cross.arch == "mips" || cross.arch == "arm"; - needsPorts = - if stdenv.cross or null != null && hurdHeaders == null then true - else if cross == null then needsPortsNative - else needsPortsCross; - - srcPorts = fetchurl { - url = "mirror://gnu/glibc/glibc-ports-${version}.tar.bz2"; - sha256 = "0qw4n71rqykl83ybq0c92w1n8afsx079sw3hn5nyib5nw6iphrfm"; - }; + version = "2.17"; in assert cross != null -> gccCross != null; - assert mig != null -> machHeaders != null; assert machHeaders != null -> hurdHeaders != null; assert hurdHeaders != null -> libpthreadHeaders != null; @@ -151,7 +139,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gnu/glibc/glibc-${version}.tar.gz"; - sha256 = "0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7"; + sha256 = "0ym3zk9ii64279wgw7pw9xkbxczy2ci7ka6mnfs05rhlainhicm3"; }; # Remove absolute paths from `configure' & co.; build out-of-tree. @@ -163,8 +151,6 @@ stdenv.mkDerivation ({ sed -i "$i" -e "s^/bin/pwd^$PWD_P^g" done - ${if needsPorts then "tar xvf ${srcPorts}" else ""} - mkdir ../build cd ../build diff --git a/pkgs/development/libraries/glibc/2.16/default.nix b/pkgs/development/libraries/glibc/2.17/default.nix similarity index 100% rename from pkgs/development/libraries/glibc/2.16/default.nix rename to pkgs/development/libraries/glibc/2.17/default.nix diff --git a/pkgs/development/libraries/glibc/2.16/dont-use-system-ld-so-cache.patch b/pkgs/development/libraries/glibc/2.17/dont-use-system-ld-so-cache.patch similarity index 100% rename from pkgs/development/libraries/glibc/2.16/dont-use-system-ld-so-cache.patch rename to pkgs/development/libraries/glibc/2.17/dont-use-system-ld-so-cache.patch diff --git a/pkgs/development/libraries/glibc/2.16/glibc-elf-localscope.patch b/pkgs/development/libraries/glibc/2.17/glibc-elf-localscope.patch similarity index 100% rename from pkgs/development/libraries/glibc/2.16/glibc-elf-localscope.patch rename to pkgs/development/libraries/glibc/2.17/glibc-elf-localscope.patch diff --git a/pkgs/development/libraries/glibc/2.16/info.nix b/pkgs/development/libraries/glibc/2.17/info.nix similarity index 100% rename from pkgs/development/libraries/glibc/2.16/info.nix rename to pkgs/development/libraries/glibc/2.17/info.nix diff --git a/pkgs/development/libraries/glibc/2.16/locales-builder.sh b/pkgs/development/libraries/glibc/2.17/locales-builder.sh similarity index 100% rename from pkgs/development/libraries/glibc/2.16/locales-builder.sh rename to pkgs/development/libraries/glibc/2.17/locales-builder.sh diff --git a/pkgs/development/libraries/glibc/2.16/locales.nix b/pkgs/development/libraries/glibc/2.17/locales.nix similarity index 100% rename from pkgs/development/libraries/glibc/2.16/locales.nix rename to pkgs/development/libraries/glibc/2.17/locales.nix diff --git a/pkgs/development/libraries/glibc/2.16/nix-locale-archive.patch b/pkgs/development/libraries/glibc/2.17/nix-locale-archive.patch similarity index 100% rename from pkgs/development/libraries/glibc/2.16/nix-locale-archive.patch rename to pkgs/development/libraries/glibc/2.17/nix-locale-archive.patch diff --git a/pkgs/development/libraries/glibc/2.16/nss-skip-unavail.patch b/pkgs/development/libraries/glibc/2.17/nss-skip-unavail.patch similarity index 100% rename from pkgs/development/libraries/glibc/2.16/nss-skip-unavail.patch rename to pkgs/development/libraries/glibc/2.17/nss-skip-unavail.patch diff --git a/pkgs/development/libraries/glibc/2.16/rpcgen-path.patch b/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch similarity index 100% rename from pkgs/development/libraries/glibc/2.16/rpcgen-path.patch rename to pkgs/development/libraries/glibc/2.17/rpcgen-path.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 968418af9289..9216f446e0af 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3624,7 +3624,7 @@ let glfw = callPackage ../development/libraries/glfw { }; - glibc = glibc216; + glibc = glibc217; glibcCross = glibc213Cross; @@ -3649,7 +3649,7 @@ let inherit fetchgit; })); - glibc216 = callPackage ../development/libraries/glibc/2.16 { + glibc217 = callPackage ../development/libraries/glibc/2.17 { kernelHeaders = linuxHeaders; installLocales = config.glibc.locales or false; machHeaders = null; From d3d3cea6bdd53b48fcb09c97f09b56f24d505566 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 29 Dec 2012 00:49:21 +0100 Subject: [PATCH 2/5] glibc: Update rpcgen-path.patch --- .../libraries/glibc/2.17/rpcgen-path.patch | 54 +++++++------------ 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch b/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch index fbb03dd5fade..fd81ab5324e3 100644 --- a/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch +++ b/pkgs/development/libraries/glibc/2.17/rpcgen-path.patch @@ -1,19 +1,16 @@ -By default, rpcgen(1) looks for cpp(1) from a list of fixed absolute paths -(`/lib/cpp', etc.), which may only be overrided with the `-Y' option. This -patch makes it run any `cpp' command found in $PATH. - ---- glibc-2.7/sunrpc/rpc_main.c 2006-11-10 21:54:46.000000000 +0100 -+++ glibc-2.7/sunrpc/rpc_main.c 2009-04-22 14:32:10.000000000 +0200 -@@ -79,7 +79,7 @@ static const char *cmdname; +diff -ru glibc-2.17-orig/sunrpc/rpc_main.c glibc-2.17/sunrpc/rpc_main.c +--- glibc-2.17-orig/sunrpc/rpc_main.c 2012-12-25 04:02:13.000000000 +0100 ++++ glibc-2.17/sunrpc/rpc_main.c 2012-12-29 00:21:04.124698455 +0100 +@@ -77,7 +77,7 @@ static const char *svcclosetime = "120"; static int cppDefined; /* explicit path for C preprocessor */ --static const char *CPP = SUNOS_CPP; +-static const char *CPP = "/lib/cpp"; +static const char *CPP = "cpp"; static const char CPPFLAGS[] = "-C"; static char *pathbuf; static int cpp_pid; -@@ -108,7 +108,6 @@ static char *extendfile (const char *fil +@@ -106,7 +106,6 @@ static void open_output (const char *infile, const char *outfile); static void add_warning (void); static void clear_args (void); @@ -21,7 +18,7 @@ patch makes it run any `cpp' command found in $PATH. 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, -@@ -327,31 +326,6 @@ clear_args (void) +@@ -318,25 +317,6 @@ argcount = FIXEDARGS; } @@ -31,29 +28,23 @@ patch makes it run any `cpp' command found in $PATH. -{ - struct stat buf; - -- if (stat (CPP, &buf) < 0) -- { /* /lib/cpp or explicit cpp does not exist */ -- if (cppDefined) -- { -- fprintf (stderr, _ ("cannot find C preprocessor: %s \n"), CPP); -- crash (); -- } -- else -- { /* try the other one */ -- CPP = SVR4_CPP; -- if (stat (CPP, &buf) < 0) -- { /* can't find any cpp */ -- fputs (_ ("cannot find any C preprocessor (cpp)\n"), stdout); -- crash (); -- } -- } +- if (stat (CPP, &buf) == 0) +- return; +- +- if (cppDefined) /* user specified cpp but it does not exist */ +- { +- fprintf (stderr, _ ("cannot find C preprocessor: %s\n"), CPP); +- crash (); - } +- +- /* fall back to system CPP */ +- CPP = "cpp"; -} - /* * Open input file with given define for C-preprocessor */ -@@ -370,7 +344,6 @@ open_input (const char *infile, const ch +@@ -355,7 +335,6 @@ switch (cpp_pid) { case 0: @@ -61,12 +52,3 @@ patch makes it run any `cpp' command found in $PATH. putarg (0, CPP); putarg (1, CPPFLAGS); addarg (define); -@@ -380,7 +353,7 @@ open_input (const char *infile, const ch - close (1); - dup2 (pd[1], 1); - close (pd[0]); -- execv (arglist[0], (char **) arglist); -+ execvp (arglist[0], (char **) arglist); - perror ("execv"); - exit (1); - case -1: From 291527a6d9acb707a1a25c0f40d9472260345ee7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 29 Dec 2012 01:01:31 +0100 Subject: [PATCH 3/5] glibc: Drop nss-skip-unavail.patch From a quick look at the 1063-line monstrosity that is gaih_inet(), I *think* that this patch is no longer needed. But I could be wrong. --- .../libraries/glibc/2.17/common.nix | 25 +------------------ .../glibc/2.17/nss-skip-unavail.patch | 21 ---------------- 2 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 pkgs/development/libraries/glibc/2.17/nss-skip-unavail.patch diff --git a/pkgs/development/libraries/glibc/2.17/common.nix b/pkgs/development/libraries/glibc/2.17/common.nix index ccdae6200e53..a3c6466c8302 100644 --- a/pkgs/development/libraries/glibc/2.17/common.nix +++ b/pkgs/development/libraries/glibc/2.17/common.nix @@ -32,30 +32,7 @@ stdenv.mkDerivation ({ enableParallelBuilding = true; patches = - [ /* Fix for NIXPKGS-79: when doing host name lookups, when - nsswitch.conf contains a line like - - hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 - - don't return an error when mdns4_minimal can't be found. This - is a bug in Glibc: when a service can't be found, NSS should - continue to the next service unless "UNAVAIL=return" is set. - ("NOTFOUND=return" refers to the service returning a NOTFOUND - error, not the service itself not being found.) The reason is - that the "status" variable (while initialised to UNAVAIL) is - outside of the loop that iterates over the services, the - "files" service sets status to NOTFOUND. So when the call to - find "mdns4_minimal" fails, "status" will still be NOTFOUND, - and it will return instead of continuing to "dns". Thus, the - line - - hosts: mdns4_minimal [NOTFOUND=return] dns mdns4 - - does work because "status" will contain UNAVAIL after the - failure to find mdns4_minimal. */ - ./nss-skip-unavail.patch - - /* Have rpcgen(1) look for cpp(1) in $PATH. */ + [ /* Have rpcgen(1) look for cpp(1) in $PATH. */ ./rpcgen-path.patch /* Allow NixOS and Nix to handle the locale-archive. */ diff --git a/pkgs/development/libraries/glibc/2.17/nss-skip-unavail.patch b/pkgs/development/libraries/glibc/2.17/nss-skip-unavail.patch deleted file mode 100644 index e48dc2bc0a6e..000000000000 --- a/pkgs/development/libraries/glibc/2.17/nss-skip-unavail.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ru glibc-2.11.2-orig/sysdeps/posix/getaddrinfo.c glibc-2.11.2/sysdeps/posix/getaddrinfo.c ---- glibc-2.11.2-orig/sysdeps/posix/getaddrinfo.c 2010-05-19 22:38:20.000000000 +0200 -+++ glibc-2.11.2/sysdeps/posix/getaddrinfo.c 2010-08-05 18:39:54.259556327 +0200 -@@ -505,8 +505,6 @@ - int no_data = 0; - int no_inet6_data = 0; - service_user *nip = NULL; -- enum nss_status inet6_status = NSS_STATUS_UNAVAIL; -- enum nss_status status = NSS_STATUS_UNAVAIL; - int no_more; - int old_res_options; - -@@ -702,6 +700,8 @@ - - while (!no_more) - { -+ enum nss_status inet6_status = NSS_STATUS_UNAVAIL; -+ enum nss_status status = NSS_STATUS_UNAVAIL; - no_data = 0; - nss_gethostbyname4_r fct4 - = __nss_lookup_function (nip, "gethostbyname4_r"); From 0a0c7a352d5c41497be23d3b82995e18435153c6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 29 Dec 2012 01:12:31 +0100 Subject: [PATCH 4/5] linux-headers: Update to 3.7 --- .../linux/kernel-headers/{3.5.nix => 3.7.nix} | 15 +++++++++------ pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) rename pkgs/os-specific/linux/kernel-headers/{3.5.nix => 3.7.nix} (86%) diff --git a/pkgs/os-specific/linux/kernel-headers/3.5.nix b/pkgs/os-specific/linux/kernel-headers/3.7.nix similarity index 86% rename from pkgs/os-specific/linux/kernel-headers/3.5.nix rename to pkgs/os-specific/linux/kernel-headers/3.7.nix index f230e29832be..4371bf7df9c5 100644 --- a/pkgs/os-specific/linux/kernel-headers/3.5.nix +++ b/pkgs/os-specific/linux/kernel-headers/3.7.nix @@ -3,11 +3,14 @@ assert cross == null -> stdenv.isLinux; let - version = "3.5.4"; - kernelHeadersBaseConfig = if cross == null then - stdenv.platform.kernelHeadersBaseConfig - else - cross.platform.kernelHeadersBaseConfig; + + version = "3.7.1"; + + kernelHeadersBaseConfig = + if cross == null + then stdenv.platform.kernelHeadersBaseConfig + else cross.platform.kernelHeadersBaseConfig; + in stdenv.mkDerivation { @@ -15,7 +18,7 @@ stdenv.mkDerivation { src = fetchurl { url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.bz2"; - sha256 = "1x2qab82w0wpd82nms68zybygvlphv9yp6nzm93rgs7ck2qjhvlr"; + sha256 = "1bb1dxj1i6j7pj926kfy6pz58kw03swyyikl9f3fq3jnswispaj2"; }; targetConfig = if cross != null then cross.config else null; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9216f446e0af..a28399b2c272 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5682,11 +5682,11 @@ let libnl = callPackage ../os-specific/linux/libnl { }; - linuxHeaders = linuxHeaders35; + linuxHeaders = linuxHeaders37; linuxConsoleTools = callPackage ../os-specific/linux/consoletools { }; - linuxHeaders35 = callPackage ../os-specific/linux/kernel-headers/3.5.nix { }; + linuxHeaders37 = callPackage ../os-specific/linux/kernel-headers/3.7.nix { }; linuxHeaders26Cross = forceNativeDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix { inherit stdenv fetchurl perl; From 080f1af51fa102f0439faf3a63367bb17fefbe02 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 29 Dec 2012 01:55:00 +0100 Subject: [PATCH 5/5] Remove savannah mirror that seems to hang --- pkgs/build-support/fetchurl/mirrors.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index 22b808b71aac..2564ed721217 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -120,7 +120,6 @@ rec { ]; savannah = [ - ftp://ftp.twaren.net/Unix/NonGNU/ ftp://mirror.csclub.uwaterloo.ca/nongnu/ ftp://mirror.publicns.net/pub/nongnu/ ftp://savannah.c3sl.ufpr.br/