glibc: make compilation more pure

Remove datetime from nscd.
This commit is contained in:
Alexander Kjeldaas 2013-10-01 13:10:40 +02:00 committed by Vladimír Čunát
parent 18592c78fc
commit dd673de2a7
3 changed files with 31 additions and 0 deletions

View File

@ -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 = ''

View File

@ -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)"; \

View File

@ -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