mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-27 22:09:35 +00:00
glibc: put back the nscd check, by $out instead of date
I don't know why they feel they need to check the compatibility by build date, so I would keep check against $out, which is a better nix equivalent. Also, expression refactoring (put comments out of hash-changing bash).
This commit is contained in:
parent
dd673de2a7
commit
e316672dcb
@ -64,21 +64,24 @@ stdenv.mkDerivation ({
|
|||||||
|
|
||||||
/* Remove references to the compilation date. */
|
/* Remove references to the compilation date. */
|
||||||
./glibc-remove-date-from-compilation-banner.patch
|
./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 = ''
|
postPatch =
|
||||||
# Needed for glibc to build with the gnumake 3.82
|
# Needed for glibc to build with the gnumake 3.82
|
||||||
# http://comments.gmane.org/gmane.linux.lfs.support/31227
|
# http://comments.gmane.org/gmane.linux.lfs.support/31227
|
||||||
|
''
|
||||||
sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile
|
sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile
|
||||||
|
''
|
||||||
# nscd needs libgcc, and we don't want it dynamically linked
|
# nscd needs libgcc, and we don't want it dynamically linked
|
||||||
# because we don't want it to depend on bootstrap-tools libs.
|
# because we don't want it to depend on bootstrap-tools libs.
|
||||||
|
+ ''
|
||||||
echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile
|
echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile
|
||||||
|
''
|
||||||
|
# Replace the date and time in nscd by $out.
|
||||||
|
# It is used as a protocol compatibility check.
|
||||||
|
+ ''
|
||||||
|
cat ${./glibc-remove-datetime-from-nscd.patch} \
|
||||||
|
| sed "s,@out@,$out," | patch -p1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--- a/nscd/nscd_stat.c 2014-04-08 20:35:24.253715420 +0200
|
--- a/nscd/nscd_stat.c
|
||||||
+++ b/nscd/nscd_stat.c 2014-04-08 20:38:32.526634400 +0200
|
+++ b/nscd/nscd_stat.c
|
||||||
@@ -37,7 +37,7 @@
|
@@ -37,7 +37,7 @@
|
||||||
|
|
||||||
|
|
||||||
/* We use this to make sure the receiver is the same. */
|
/* We use this to make sure the receiver is the same. */
|
||||||
-static const char compilation[21] = __DATE__ " " __TIME__;
|
-static const char compilation[21] = __DATE__ " " __TIME__;
|
||||||
+static const char compilation[21] = "Thu 1 1970 00:00:01"; /* __DATE__ " " __TIME__; */
|
+static const char compilation[21] = "@out@";
|
||||||
|
|
||||||
/* Statistic data for one database. */
|
/* Statistic data for one database. */
|
||||||
struct dbstat
|
struct dbstat
|
||||||
|
Loading…
Reference in New Issue
Block a user