[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser-bundle/master] Bug 12753: Zeroing timestamps in PE headers.
commit ad5ea06183c12e8ae18274a72cb5bbc353180400
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date: Mon Aug 4 14:26:34 2014 +0000
Bug 12753: Zeroing timestamps in PE headers.
Switching to a new toolchain for Windows (using Binutils 2.24 and
GCC 4.8.3) led to new problems producing Windows bundles in a reliable
fashion. Thanks to a patch by a cypherpunk we avoid differences in
PE header timestamps as one possible source for the issues mentioned
in bug 12753.
---
gitian/descriptors/windows/gitian-utils.yml | 3 +++
gitian/patches/peXXigen.patch | 14 ++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/gitian/descriptors/windows/gitian-utils.yml b/gitian/descriptors/windows/gitian-utils.yml
index 87a0bce..87dbe16 100644
--- a/gitian/descriptors/windows/gitian-utils.yml
+++ b/gitian/descriptors/windows/gitian-utils.yml
@@ -31,6 +31,7 @@ files:
- "gcc.tar.bz2"
- "openssl.tar.gz"
- "gmp.tar.bz2"
+- "peXXigen.patch"
- "versions"
- "dzip.sh"
script: |
@@ -45,6 +46,8 @@ script: |
cd binutils*
# XXX: This is needed due to bug 10102.
sed 's/= extern_rt_rel_d;/= extern_rt_rel_d;\n memset (extern_rt_rel_d, 0, PE_IDATA5_SIZE);/' -i ld/pe-dll.c
+ # Zeroing timestamps in PE headers reliably, see bug 12753.
+ patch -p1 < ../peXXigen.patch
./configure --prefix=$INSTDIR/mingw-w64 --target=i686-w64-mingw32 --disable-multilib
make $MAKEOPTS
make install
diff --git a/gitian/patches/peXXigen.patch b/gitian/patches/peXXigen.patch
new file mode 100644
index 0000000..785aa02
--- /dev/null
+++ b/gitian/patches/peXXigen.patch
@@ -0,0 +1,14 @@
+diff -crB binutils-2.24/bfd/peXXigen.c binutils-2.24/bfd/peXXigen.c
+*** binutils-2.24/bfd/peXXigen.c Tue Nov 26 11:37:33 2013
+--- binutils-2.24/bfd/peXXigen.c Mon Aug 4 07:10:15 2014
+***************
+*** 795,800 ****
+--- 795,802 ----
+ /* Only use a real timestamp if the option was chosen. */
+ if ((pe_data (abfd)->insert_timestamp))
+ H_PUT_32 (abfd, time(0), filehdr_out->f_timdat);
++ else
++ H_PUT_32 (abfd, 0, filehdr_out->f_timdat);
+
+ PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr,
+ filehdr_out->f_symptr);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits