glibc: 2.27 -> 2.30

This commit is contained in:
Luka Blaskovic 2019-08-12 06:30:28 +00:00
parent 76d90cf1f5
commit 447edaa32f
7 changed files with 54 additions and 61 deletions

View File

@ -23,6 +23,7 @@
, linuxHeaders ? null , linuxHeaders ? null
, gd ? null, libpng ? null , gd ? null, libpng ? null
, bison , bison
, python3
}: }:
{ name { name
@ -34,9 +35,9 @@
} @ args: } @ args:
let let
version = "2.27"; version = "2.30";
patchSuffix = ""; patchSuffix = "";
sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji"; sha256 = "1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72";
in in
assert withLinuxHeaders -> linuxHeaders != null; assert withLinuxHeaders -> linuxHeaders != null;
@ -162,7 +163,7 @@ stdenv.mkDerivation ({
outputs = [ "out" "bin" "dev" "static" ]; outputs = [ "out" "bin" "dev" "static" ];
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ bison ]; nativeBuildInputs = [ bison python3 ];
buildInputs = [ linuxHeaders ] ++ lib.optionals withGd [ gd libpng ]; buildInputs = [ linuxHeaders ] ++ lib.optionals withGd [ gd libpng ];
# Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to # Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to

View File

@ -1,19 +1,6 @@
diff -Naur glibc-2.27-orig/elf/ldconfig.c glibc-2.27/elf/ldconfig.c --- a/elf/Makefile
--- glibc-2.27-orig/elf/ldconfig.c 2018-02-01 11:17:18.000000000 -0500 +++ b/elf/Makefile
+++ glibc-2.27/elf/ldconfig.c 2018-02-17 22:43:17.232175182 -0500 @@ -589,13 +589,13 @@ $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
@@ -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) $(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) cpp-srcs-left := $(all-rtld-routines:=.os)
lib := rtld lib := rtld
diff -Naur glibc-2.27-orig/sysdeps/generic/dl-cache.h glibc-2.27/sysdeps/generic/dl-cache.h --- a/elf/ldconfig.c
--- glibc-2.27-orig/sysdeps/generic/dl-cache.h 2018-02-01 11:17:18.000000000 -0500 +++ b/elf/ldconfig.c
+++ glibc-2.27/sysdeps/generic/dl-cache.h 2018-02-17 22:45:20.471598816 -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. */
--- a/sysdeps/generic/dl-cache.h
+++ b/sysdeps/generic/dl-cache.h
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
#endif #endif

View File

@ -1,7 +1,6 @@
diff -ru glibc-2.20-orig/elf/rtld.c glibc-2.20/elf/rtld.c --- a/elf/rtld.c
--- glibc-2.20-orig/elf/rtld.c 2014-09-07 10:09:09.000000000 +0200 +++ b/elf/rtld.c
+++ glibc-2.20/elf/rtld.c 2014-10-27 11:32:25.203043157 +0100 @@ -1697,7 +1697,7 @@ ERROR: '%s': cannot process note segment.\n", _dl_argv[0]);
@@ -1513,7 +1513,7 @@
open(). So we do this first. If it succeeds we do almost twice 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 the work but this does not matter, since it is not for production
use. */ use. */

View File

@ -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 <nmiell@gmail.com> From: Nicholas Miell <nmiell@gmail.com>
Date: Sat, 17 Jun 2017 18:21:07 -0700 Date: Sat, 17 Jun 2017 18:21:07 -0700
Subject: [PATCH] Align the stack on entry to __tls_get_addr() Subject: [PATCH] Align the stack on entry to __tls_get_addr()
@ -17,10 +17,10 @@ engine and available for purchase on Steam.
1 file changed, 4 insertions(+) 1 file changed, 4 insertions(+)
diff --git a/elf/dl-tls.c b/elf/dl-tls.c 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 --- a/elf/dl-tls.c
+++ b/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) rtld_hidden_def (__tls_get_addr)
#endif #endif
@ -32,4 +32,5 @@ index 5aba33b3fa..3f3cb917de 100644
statically linked applications. */ statically linked applications. */
void * void *
-- --
2.13.0 2.17.1

View File

@ -1,6 +1,5 @@
diff -ubr glibc-2.17-orig/sysdeps/unix/confstr.h glibc-2.17/sysdeps/unix/confstr.h --- a/sysdeps/unix/confstr.h
--- glibc-2.17-orig/sysdeps/unix/confstr.h 2013-06-03 22:01:44.829726968 +0200 +++ b/sysdeps/unix/confstr.h
+++ glibc-2.17/sysdeps/unix/confstr.h 2013-06-03 22:04:39.469376740 +0200
@@ -1 +1 @@ @@ -1 +1 @@
-#define CS_PATH "/bin:/usr/bin" -#define CS_PATH "/bin:/usr/bin"
+#define CS_PATH "/run/current-system/sw/bin:/bin:/usr/bin" +#define CS_PATH "/run/current-system/sw/bin:/bin:/usr/bin"

View File

@ -1,7 +1,6 @@
diff -Naur glibc-2.27-orig/locale/loadarchive.c glibc-2.27/locale/loadarchive.c --- a/locale/loadarchive.c
--- glibc-2.27-orig/locale/loadarchive.c 2018-02-01 11:17:18.000000000 -0500 +++ b/locale/loadarchive.c
+++ glibc-2.27/locale/loadarchive.c 2018-02-17 22:32:25.680169462 -0500 @@ -123,6 +123,23 @@ calculate_head_size (const struct locarhead *h)
@@ -123,6 +123,23 @@
return MAX (namehash_end, MAX (string_end, locrectab_end)); 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 /* Find the locale *NAMEP in the locale archive, and return the
internalized data structure for its CATEGORY data. If this locale has 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; archmapped = &headmap;
/* The archive has never been opened. */ /* 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) if (fd < 0)
/* Cannot open the archive, for whatever reason. */ /* Cannot open the archive, for whatever reason. */
return NULL; return NULL;
@@ -397,8 +414,7 @@ @@ -397,8 +414,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
if (fd == -1) if (fd == -1)
{ {
struct stat64 st; 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) if (fd == -1)
/* Cannot open the archive, for whatever reason. */ /* Cannot open the archive, for whatever reason. */
return NULL; return NULL;
diff -Naur glibc-2.27-orig/locale/programs/locale.c glibc-2.27/locale/programs/locale.c --- a/locale/programs/locale.c
--- glibc-2.27-orig/locale/programs/locale.c 2018-02-01 11:17:18.000000000 -0500 +++ b/locale/programs/locale.c
+++ glibc-2.27/locale/programs/locale.c 2018-02-17 22:36:39.726293213 -0500 @@ -633,6 +633,24 @@ nameentcmp (const void *a, const void *b)
@@ -633,6 +633,24 @@ }
static int +static int
+open_locale_archive (void) +open_locale_archive (void)
+{ +{
+ int fd = -1; + 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) write_archive_locales (void **all_datap, char *linebuf)
{ {
struct stat64 st; @@ -645,7 +663,7 @@ write_archive_locales (void **all_datap, char *linebuf)
@@ -644,7 +662,7 @@
int fd, ret = 0; int fd, ret = 0;
uint32_t cnt; 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) if (fd < 0)
return 0; return 0;
diff -Naur glibc-2.27-orig/locale/programs/locarchive.c glibc-2.27/locale/programs/locarchive.c --- a/locale/programs/locarchive.c
--- glibc-2.27-orig/locale/programs/locarchive.c 2018-02-01 11:17:18.000000000 -0500 +++ b/locale/programs/locarchive.c
+++ glibc-2.27/locale/programs/locarchive.c 2018-02-17 22:40:51.245293975 -0500 @@ -117,6 +117,22 @@ prepare_address_space (int fd, size_t total, size_t *reserved, int *xflags,
@@ -117,6 +117,22 @@
} }
@ -107,7 +104,7 @@ diff -Naur glibc-2.27-orig/locale/programs/locarchive.c glibc-2.27/locale/progra
static void static void
create_archive (const char *archivefname, struct locarhandle *ah) 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) while (1)
{ {
/* Open the archive. We must have exclusive write access. */ /* Open the archive. We must have exclusive write access. */

View File

@ -1,7 +1,6 @@
diff -ru glibc-2.18-orig/sunrpc/rpc_main.c glibc-2.18/sunrpc/rpc_main.c --- a/sunrpc/rpc_main.c
--- glibc-2.18-orig/sunrpc/rpc_main.c 2013-08-11 00:52:55.000000000 +0200 +++ b/sunrpc/rpc_main.c
+++ glibc-2.18/sunrpc/rpc_main.c 2013-11-15 12:04:48.041006977 +0100 @@ -78,7 +78,7 @@ static const char *cmdname;
@@ -78,7 +78,7 @@
static const char *svcclosetime = "120"; static const char *svcclosetime = "120";
static int cppDefined; /* explicit path for C preprocessor */ 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 const char CPPFLAGS[] = "-C";
static char *pathbuf; static char *pathbuf;
static int cpp_pid; 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 open_output (const char *infile, const char *outfile);
static void add_warning (void); static void add_warning (void);
static void clear_args (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 void open_input (const char *infile, const char *define);
static int check_nettype (const char *name, const char *list_to_check[]); static int check_nettype (const char *name, const char *list_to_check[]);
static void c_output (const char *infile, const char *define, static void c_output (const char *infile, const char *define,
@@ -322,25 +321,6 @@ @@ -322,25 +321,6 @@ clear_args (void)
argcount = FIXEDARGS; 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 * 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) switch (cpp_pid)
{ {
case 0: case 0: