
morgan pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: f8843dec by Nicolas Vigier at 2024-09-12T19:42:33+00:00 Bug 41231: Add var/faketime_date and var/faketime_setup Add var/faketime_date, in order to use it in an external script. At the same time we add var/faketime_setup to avoid duplicating the lines setting up faketime. - - - - - 98cc097f by Nicolas Vigier at 2024-09-12T19:42:33+00:00 Bug 41231: Use release date as timestamp while generating signed dmg - - - - - 6 changed files: - projects/browser/ddmg.sh - projects/libevent/build - projects/tor/build - rbm.conf - tools/signing/ddmg.sh - tools/signing/gatekeeper-bundling.sh Changes: ===================================== projects/browser/ddmg.sh ===================================== @@ -11,8 +11,7 @@ dmg_tmpdir=$(mktemp -d) hfsfile="$dmg_tmpdir/tbb-uncompressed.dmg" # hfsplus sets all the times to time(NULL) -export LD_PRELOAD=[% c("var/faketime_path") %] -export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]" +[% c("var/faketime_setup") %] src_dir=[% src %] # 1 for ceiling and 1 for the inode ===================================== projects/libevent/build ===================================== @@ -11,8 +11,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %] ./autogen.sh ./configure [% c("var/configure_opt") %] --disable-libevent-regress --disable-samples --disable-openssl --prefix=$distdir [% IF c("var/macos") -%] - export LD_PRELOAD=[% c("var/faketime_path") %] - export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]" + [% c("var/faketime_setup") %] [% END -%] make -j[% c("num_procs") %] make install ===================================== projects/tor/build ===================================== @@ -94,8 +94,7 @@ find -type f -print0 | xargs -0 [% c("touch") %] [% IF c("var/linux-cross") %]--build=x86_64-linux-gnu[% END %] \ --enable-gpl --prefix="$distdir" [% c("var/configure_opt") %] [% IF c("var/macos") -%] - export LD_PRELOAD=[% c("var/faketime_path") %] - export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]" + [% c("var/faketime_setup") %] [% END -%] make -j[% c("num_procs") %] make install ===================================== rbm.conf ===================================== @@ -108,6 +108,11 @@ var: Project_Name_Channel: '[% c("var/Project_Name") %] [% c("var/channel") FILTER ucfirst %]' display_name: '[% c("var/Project_Name_Channel") %]' exe_name: firefox + faketime_date: "[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]" + faketime_setup: | + export LD_PRELOAD=[% c("var/faketime_path") %] + export FAKETIME='[% c("var/faketime_date") %]' + locale_ja: ja # When adding new languages, add the equivalent NSIS name to # projects/browser/windows-installer/add-strings.py. ===================================== tools/signing/ddmg.sh ===================================== @@ -4,7 +4,7 @@ # file from a directory # # Usage: -# ddmg.sh <dmg-file> <src-directory> <Volume Label> +# ddmg.sh <dmg-file> <src-directory> <Volume Label> <release date> set -e @@ -14,6 +14,7 @@ source "$script_dir/functions" dest_file="$1" src_dir="$2" volume_label="$3" +browser_release_date="$4" set +e find $src_dir -executable -exec chmod 0755 {} \; 2> /dev/null @@ -26,7 +27,7 @@ dmg_tmpdir=$(mktemp -d) hfsfile="$dmg_tmpdir/tbb-uncompressed.dmg" export LD_PRELOAD=$faketime_path -export FAKETIME="2000-01-01 01:01:01" +export FAKETIME="$browser_release_date" echo "Starting: " $(basename $dest_file) ===================================== tools/signing/gatekeeper-bundling.sh ===================================== @@ -56,6 +56,9 @@ ProjName=$(ProjectName) Proj_Name=$(Project_Name) proj_name=$(project-name) disp_name=$(display_name) +pushd "$script_dir/../.." +browser_release_date=$($rbm showconf --target "$tbb_version_type" --target "$SIGNING_PROJECTNAME-linux-x86_64" browser var/faketime_date) +popd test -d "$macos_signed_dir" || mkdir "$macos_signed_dir" tmpdir="$macos_stapled_dir/tmp" @@ -75,7 +78,7 @@ rm *.DS_Store tar -xf $macos_stapled_dir/"${proj_name}-${tbb_version}-notarized+stapled.tar.zst" cd .. -$script_dir/ddmg.sh $macos_signed_dir/${proj_name}-macos-${tbb_version}.dmg $tmpdir/dmg/ "$disp_name" +$script_dir/ddmg.sh $macos_signed_dir/${proj_name}-macos-${tbb_version}.dmg $tmpdir/dmg/ "$disp_name" "$browser_release_date" rm -rf "dmg/$disp_name.app" rm -Rf "$tmpdir" View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/a... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/a... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
morgan (@morgan)