From dd673de2a720d976edc0619e43c61f75c234de7a Mon Sep 17 00:00:00 2001 From: Alexander Kjeldaas Date: Tue, 1 Oct 2013 13:10:40 +0200 Subject: [PATCH] glibc: make compilation more pure Remove datetime from nscd. --- pkgs/development/libraries/glibc/2.19/common.nix | 8 ++++++++ .../glibc-remove-date-from-compilation-banner.patch | 12 ++++++++++++ .../glibc/2.19/glibc-remove-datetime-from-nscd.patch | 11 +++++++++++ 3 files changed, 31 insertions(+) create mode 100644 pkgs/development/libraries/glibc/2.19/glibc-remove-date-from-compilation-banner.patch create mode 100644 pkgs/development/libraries/glibc/2.19/glibc-remove-datetime-from-nscd.patch diff --git a/pkgs/development/libraries/glibc/2.19/common.nix b/pkgs/development/libraries/glibc/2.19/common.nix index a828148c3d5..09f07d4e67b 100644 --- a/pkgs/development/libraries/glibc/2.19/common.nix +++ b/pkgs/development/libraries/glibc/2.19/common.nix @@ -61,6 +61,14 @@ stdenv.mkDerivation ({ ./cve-2014-0475.patch ./cve-2014-5119.patch + + /* Remove references to the compilation date. */ + ./glibc-remove-date-from-compilation-banner.patch + + /* Remove the date and time from nscd. It is used as a protocol + compatibility check, but we assume nix takes care of that for + us. */ + ./glibc-remove-datetime-from-nscd.patch ]; postPatch = '' diff --git a/pkgs/development/libraries/glibc/2.19/glibc-remove-date-from-compilation-banner.patch b/pkgs/development/libraries/glibc/2.19/glibc-remove-date-from-compilation-banner.patch new file mode 100644 index 00000000000..5d0b1a51762 --- /dev/null +++ b/pkgs/development/libraries/glibc/2.19/glibc-remove-date-from-compilation-banner.patch @@ -0,0 +1,12 @@ +diff -ur glibc-2.17.orig/csu/Makefile glibc-2.17/csu/Makefile +--- glibc-2.17.orig/csu/Makefile 2012-12-25 04:02:13.000000000 +0100 ++++ glibc-2.17/csu/Makefile 2013-08-19 16:01:57.132378550 +0200 +@@ -172,7 +172,7 @@ + os=Linux; \ + fi; \ + printf '"Compiled on a %s %s system on %s.\\n"\n' \ +- "$$os" "$$version" "`date +%Y-%m-%d`";; \ ++ "$$os" "$$version";; \ + *) ;; \ + esac; \ + files="$(all-Banner-files)"; \ diff --git a/pkgs/development/libraries/glibc/2.19/glibc-remove-datetime-from-nscd.patch b/pkgs/development/libraries/glibc/2.19/glibc-remove-datetime-from-nscd.patch new file mode 100644 index 00000000000..83b61799c4c --- /dev/null +++ b/pkgs/development/libraries/glibc/2.19/glibc-remove-datetime-from-nscd.patch @@ -0,0 +1,11 @@ +--- a/nscd/nscd_stat.c 2014-04-08 20:35:24.253715420 +0200 ++++ b/nscd/nscd_stat.c 2014-04-08 20:38:32.526634400 +0200 +@@ -37,7 +37,7 @@ + + + /* We use this to make sure the receiver is the same. */ +-static const char compilation[21] = __DATE__ " " __TIME__; ++static const char compilation[21] = "Thu 1 1970 00:00:01"; /* __DATE__ " " __TIME__; */ + + /* Statistic data for one database. */ + struct dbstat