From cb1dcbe4e203bd4fc480dd1c70138055f285a6a6 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Thu, 16 Nov 2017 19:04:27 +0100 Subject: [PATCH] mdnsresponder: remove build timestamp to fix reproducible builds Build timestamps prevents reproducible builds [0]. [0] https://reproducible-builds.org/docs/timestamps/ Signed-off-by: Alexander Couzens --- net/mdnsresponder/Makefile | 2 +- .../patches/120-reproducible-builds.patch | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 net/mdnsresponder/patches/120-reproducible-builds.patch diff --git a/net/mdnsresponder/Makefile b/net/mdnsresponder/Makefile index 164819b99d..72d01aa3f3 100644 --- a/net/mdnsresponder/Makefile +++ b/net/mdnsresponder/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mDNSResponder PKG_VERSION:=576.30.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=mDNSResponder-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://opensource.apple.com/tarballs/mDNSResponder/ diff --git a/net/mdnsresponder/patches/120-reproducible-builds.patch b/net/mdnsresponder/patches/120-reproducible-builds.patch new file mode 100644 index 0000000000..b1e7caa4f2 --- /dev/null +++ b/net/mdnsresponder/patches/120-reproducible-builds.patch @@ -0,0 +1,52 @@ +--- a/Clients/dns-sd.c ++++ b/Clients/dns-sd.c +@@ -1811,7 +1811,7 @@ Fail: + + // NOT static -- otherwise the compiler may optimize it out + // The "@(#) " pattern is a special prefix the "what" command looks for +-const char VersionString_SCCS[] = "@(#) dns-sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")"; ++const char VersionString_SCCS[] = "@(#) dns-sd " STRINGIFY(mDNSResponderVersion); + + #if _BUILDING_XCODE_PROJECT_ + // If the process crashes, then this string will be magically included in the automatically-generated crash log +--- a/mDNSPosix/PosixDaemon.c ++++ b/mDNSPosix/PosixDaemon.c +@@ -289,9 +289,9 @@ asm (".desc ___crashreporter_info__, 0x1 + + // For convenience when using the "strings" command, this is the last thing in the file + #if mDNSResponderVersion > 1 +-mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder-" STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")"; ++mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder-" STRINGIFY(mDNSResponderVersion); + #elif MDNS_VERSIONSTR_NODTS + mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build)"; + #else +-mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build) (" __DATE__ " " __TIME__ ")"; ++mDNSexport const char mDNSResponderVersionString_SCCS[] = "@(#) mDNSResponder (Engineering Build)"; + #endif +--- a/mDNSShared/Java/JNISupport.c ++++ b/mDNSShared/Java/JNISupport.c +@@ -1069,4 +1069,4 @@ exit: + + // NOT static -- otherwise the compiler may optimize it out + // The "@(#) " pattern is a special prefix the "what" command looks for +-const char VersionString_SCCS[] = "@(#) libjdns_sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")"; ++const char VersionString_SCCS[] = "@(#) libjdns_sd " STRINGIFY(mDNSResponderVersion); +--- a/mDNSShared/dnsextd.c ++++ b/mDNSShared/dnsextd.c +@@ -3141,7 +3141,7 @@ mDNS mDNSStorage; + + // For convenience when using the "strings" command, this is the last thing in the file + // The "@(#) " pattern is a special prefix the "what" command looks for +-const char mDNSResponderVersionString_SCCS[] = "@(#) dnsextd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")"; ++const char mDNSResponderVersionString_SCCS[] = "@(#) dnsextd " STRINGIFY(mDNSResponderVersion); + + #if _BUILDING_XCODE_PROJECT_ + // If the process crashes, then this string will be magically included in the automatically-generated crash log +--- a/mDNSShared/dnssd_clientlib.c ++++ b/mDNSShared/dnssd_clientlib.c +@@ -363,4 +363,4 @@ DNSServiceErrorType DNSSD_API TXTRecordG + + // NOT static -- otherwise the compiler may optimize it out + // The "@(#) " pattern is a special prefix the "what" command looks for +-const char VersionString_SCCS_libdnssd[] = "@(#) libdns_sd " STRINGIFY(mDNSResponderVersion) " (" __DATE__ " " __TIME__ ")"; ++const char VersionString_SCCS_libdnssd[] = "@(#) libdns_sd " STRINGIFY(mDNSResponderVersion);