[tor-commits] [Git][tpo/applications/tor-browser-build][main] Bug 41096: set SOURCE_DATE_EPOCH in set_default_env

morgan (@morgan) git at gitlab.torproject.org
Fri Aug 30 20:20:09 UTC 2024



morgan pushed to branch main at The Tor Project / Applications / tor-browser-build


Commits:
4957118d by Morgan at 2024-08-29T16:34:04+00:00
Bug 41096: set SOURCE_DATE_EPOCH in set_default_env

- - - - -


5 changed files:

- projects/linux-packages/build
- projects/nsis/README.md
- projects/nsis/build
- projects/openssl/build
- rbm.conf


Changes:

=====================================
projects/linux-packages/build
=====================================
@@ -6,7 +6,6 @@ OUTDIR='[% dest_dir _ "/" _ c("filename") %]'
 mkdir -p $OUTDIR
 mkdir -p "$distdir"
 
-export SOURCE_DATE_EPOCH='[% c("timestamp") %]'
 umask 0022
 
 [% IF c("var/build_deb_pkg") -%]


=====================================
projects/nsis/README.md
=====================================
@@ -44,19 +44,3 @@ References:
   in which they mention the `IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE` flag for
   compatibility.
 - [tor-browser-build#40900](https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/issues/40900)
-
-## Reproducibility issues
-
-We have a patch to add `--no-insert-timestamp` to make the binaries
-reproducible.
-
-We could drop our patch and switch to the official way to do it
-(`SOURCE_DATE_EPOCH`).
-
-References:
-
-- [nsis#294](https://sourceforge.net/p/nsis/patches/294/): the patch for
-  `SOURCE_DATE_EPOCH` 
-- [nsis#309](https://sourceforge.net/p/nsis/patches/309/): the attempt to uplift
-  our patch
-- [tor-browser-build#40090](https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/issues/40090)


=====================================
projects/nsis/build
=====================================
@@ -37,7 +37,6 @@ cd "$builddir"
 sed -i 's/-Wl,--exclude-libs,msvcrt.a/-Wl,-Xlink=-fixed/' SCons/Config/gnu
 sed -i '2i extern "C"' SCons/Config/{memcpy,memset}.c
 
-export SOURCE_DATE_EPOCH=$(stat -c '%Y' Source)
 # Resource.dll does not obey the source date epoch...
 patch -p1 < "$rootdir/resource-reproducible.diff"
 


=====================================
projects/openssl/build
=====================================
@@ -19,7 +19,6 @@ export CC='gcc -m32'
   # from GCC to Clang and vice versa.
   export CC=cc
 [% END -%]
-export SOURCE_DATE_EPOCH='[% c("timestamp") %]'
 # OpenSSL 3 uses lib64 on 64-bit systems, but tor looks for lib
 ./Configure --prefix="$distdir" --libdir=lib [% c('var/configure_opts') %]
 make -j[% c("num_procs") %]


=====================================
rbm.conf
=====================================
@@ -204,6 +204,7 @@ var:
     rootdir=$(pwd)
     export SHELL=/bin/bash
     export HOME=$rootdir
+    export SOURCE_DATE_EPOCH='[% c("timestamp") %]'
     umask 0022
     [% IF c("container/global_disable") -%]
       rm -Rf /var/tmp/build /var/tmp/dist
@@ -214,6 +215,7 @@ var:
       export ZSTD_NBTHREADS=[% c("num_procs") > 1 ? c("num_procs") : '2' %]
     [% END -%]
 
+
   DOCSDIR_project: '[% project %]'
   set_MOZ_BUILD_DATE: 'export MOZ_BUILD_DATE=[% c("var/MOZ_BUILD_DATE") %]'
   MOZ_BUILD_DATE: '[% USE date; date.format(c("var/browser_release_date"), "%Y%m%d%H%M%S") %]'



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/4957118dfc755f9c4fab31bf9b4d50e0bab6bb0d

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/4957118dfc755f9c4fab31bf9b4d50e0bab6bb0d
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20240830/8c41f9db/attachment-0001.htm>


More information about the tor-commits mailing list