This is an automated email from the git hooks/post-receive script.
boklm pushed a change to branch main in repository builders/tor-browser-build.
from 3afab9a8 Bug 40685: Remove targets/nightly/var/mar_locales from rbm.conf new ea8a1620 Bug 40439: Create universal x86_64/arm64 mac builds new 7431ad67 Bug 40067: Rename osx64 mar and dmg files to macos new d499c3a9 Bug 40067: Update nightly directory for macos new 985480eb Bug 40067: Rename osx targets and configs to macos new 0553b695 Bug 40439: Add option for macos single-arch non-universal testbuild
The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
Summary of changes: Makefile | 62 +++------ README | 2 +- doc/HACKING.txt | 14 +- doc/MAKEFILE.txt | 19 ++- projects/browser/build | 152 ++++++++++++++++----- projects/browser/config | 41 ++++-- projects/clang/build | 2 +- projects/firefox/build | 16 +-- projects/firefox/config | 8 +- projects/firefox/list_toolchain_updates_checks | 6 +- projects/firefox/mozconfig | 6 +- projects/fonts/build | 4 +- projects/fonts/config | 2 +- projects/go/build | 2 +- projects/go/config | 6 +- projects/libevent/build | 2 +- projects/libevent/config | 2 +- projects/macosx-toolchain/build | 4 +- projects/node/config | 2 +- projects/openssl/build | 2 +- projects/openssl/config | 4 +- projects/release/build | 11 +- projects/release/config | 36 +++-- projects/release/update_responses_config.yml | 8 +- projects/rust/build | 4 +- projects/rust/config | 2 +- projects/tor/build | 10 +- projects/tor/config | 2 +- rbm.conf | 55 ++++---- tools/dmg2mar | 6 +- tools/marsigning_check.sh | 2 +- tools/signing/check_file_counts | 4 +- tools/signing/gatekeeper-bundling.sh | 2 +- tools/signing/macos-signer-gatekeeper-signing | 2 +- tools/signing/nightly/config.yml | 2 +- .../nightly/update-responses-base-config.yml | 11 +- tools/update-responses/update_responses | 6 +- 37 files changed, 320 insertions(+), 201 deletions(-)
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch main in repository builders/tor-browser-build.
commit ea8a16205f22342a6eb1f1b63eca639c54735a3a Author: Nicolas Vigier boklm@torproject.org AuthorDate: Wed Sep 28 11:56:50 2022 +0200
Bug 40439: Create universal x86_64/arm64 mac builds
Instead of having separate x86_64 and arm64 macos builds, we merge the two builds to create an universal build, using the unify.py script from Mozilla.
We also start renaming osx64 to macos for tor-browser-build#40067. --- Makefile | 58 ++++++--------------- README | 2 +- doc/HACKING.txt | 6 +-- doc/MAKEFILE.txt | 6 +-- projects/browser/build | 135 +++++++++++++++++++++++++++++++++++++----------- projects/browser/config | 29 +++++++---- projects/release/build | 7 +-- projects/release/config | 24 +++------ rbm.conf | 14 ++--- 9 files changed, 163 insertions(+), 118 deletions(-)
diff --git a/Makefile b/Makefile index 465d0ea1..fa5220ed 100644 --- a/Makefile +++ b/Makefile @@ -42,11 +42,8 @@ torbrowser-release-windows-i686: submodule-update torbrowser-release-windows-x86_64: submodule-update $(rbm) build release --target release --target browser-windows-x86_64 --target torbrowser
-torbrowser-release-osx-x86_64: submodule-update - $(rbm) build release --target release --target browser-osx-x86_64 --target torbrowser - -torbrowser-release-osx-aarch64: submodule-update - $(rbm) build release --target release --target browser-osx-aarch64 --target torbrowser +torbrowser-release-macos: submodule-update + $(rbm) build release --target release --target browser-macos --target torbrowser
torbrowser-release-src: submodule-update $(rbm) build release --target release --target browser-src --target torbrowser @@ -87,11 +84,8 @@ torbrowser-alpha-windows-i686: submodule-update torbrowser-alpha-windows-x86_64: submodule-update $(rbm) build release --target alpha --target browser-windows-x86_64 --target torbrowser
-torbrowser-alpha-osx-x86_64: submodule-update - $(rbm) build release --target alpha --target browser-osx-x86_64 --target torbrowser - -torbrowser-alpha-osx-aarch64: submodule-update - $(rbm) build release --target alpha --target browser-osx-aarch64 --target torbrowser +torbrowser-alpha-macos: submodule-update + $(rbm) build release --target alpha --target browser-macos --target torbrowser
torbrowser-alpha-src: submodule-update $(rbm) build release --target alpha --target browser-src --target torbrowser @@ -132,11 +126,8 @@ torbrowser-nightly-windows-i686: submodule-update torbrowser-nightly-windows-x86_64: submodule-update $(rbm) build release --target nightly --target browser-windows-x86_64 --target torbrowser
-torbrowser-nightly-osx-x86_64: submodule-update - $(rbm) build release --target nightly --target browser-osx-x86_64 --target torbrowser - -torbrowser-nightly-osx-aarch64: submodule-update - $(rbm) build release --target nightly --target browser-osx-aarch64 --target torbrowser +torbrowser-nightly-macos: submodule-update + $(rbm) build release --target nightly --target browser-macos --target torbrowser
torbrowser-nightly-src: submodule-update $(rbm) build release --target nightly --target browser-src --target torbrowser @@ -177,11 +168,8 @@ torbrowser-testbuild-windows-x86_64: submodule-update torbrowser-testbuild-windows-i686: submodule-update $(rbm) build release --target testbuild --target browser-windows-i686 --target torbrowser
-torbrowser-testbuild-osx-x86_64: submodule-update - $(rbm) build release --target testbuild --target browser-osx-x86_64 --target torbrowser - -torbrowser-testbuild-osx-aarch64: submodule-update - $(rbm) build release --target testbuild --target browser-osx-aarch64 --target torbrowser +torbrowser-testbuild-macos: submodule-update + $(rbm) build release --target testbuild --target browser-macos --target torbrowser
torbrowser-testbuild-src: submodule-update $(rbm) build release --target testbuild --target browser-src-testbuild --target torbrowser @@ -239,7 +227,7 @@ list_toolchain_updates-firefox-windows: submodule-update $(rbm) build firefox --step list_toolchain_updates --target nightly --target torbrowser-windows-x86_64
list_toolchain_updates-firefox-macos: submodule-update - $(rbm) build firefox --step list_toolchain_updates --target nightly --target torbrowser-osx-x86_64 + $(rbm) build firefox --step list_toolchain_updates --target nightly --target torbrowser-macos
list_toolchain_updates-android-components: submodule-update $(rbm) build android-components --step list_toolchain_updates --target nightly --target torbrowser-android-armv7 @@ -321,11 +309,8 @@ basebrowser-release-windows-i686: submodule-update basebrowser-release-windows-x86_64: submodule-update $(rbm) build release --target release --target browser-windows-x86_64 --target basebrowser
-basebrowser-release-osx-x86_64: submodule-update - $(rbm) build release --target release --target browser-osx-x86_64 --target basebrowser - -basebrowser-release-osx-aarch64: submodule-update - $(rbm) build release --target release --target browser-osx-aarch64 --target basebrowser +basebrowser-release-macos: submodule-update + $(rbm) build release --target release --target browser-macos --target basebrowser
basebrowser-release-src: submodule-update $(rbm) build release --target release --target browser-src --target basebrowser @@ -366,11 +351,8 @@ basebrowser-alpha-windows-i686: submodule-update basebrowser-alpha-windows-x86_64: submodule-update $(rbm) build release --target alpha --target browser-windows-x86_64 --target basebrowser
-basebrowser-alpha-osx-x86_64: submodule-update - $(rbm) build release --target alpha --target browser-osx-x86_64 --target basebrowser - -basebrowser-alpha-osx-aarch64: submodule-update - $(rbm) build release --target alpha --target browser-osx-aarch64 --target basebrowser +basebrowser-alpha-macos: submodule-update + $(rbm) build release --target alpha --target browser-macos --target basebrowser
basebrowser-alpha-src: submodule-update $(rbm) build release --target alpha --target browser-src --target basebrowser @@ -411,11 +393,8 @@ basebrowser-nightly-windows-i686: submodule-update basebrowser-nightly-windows-x86_64: submodule-update $(rbm) build release --target nightly --target browser-windows-x86_64 --target basebrowser
-basebrowser-nightly-osx-x86_64: submodule-update - $(rbm) build release --target nightly --target browser-osx-x86_64 --target basebrowser - -basebrowser-nightly-osx-aarch64: submodule-update - $(rbm) build release --target nightly --target browser-osx-aarch64 --target basebrowser +basebrowser-nightly-macos: submodule-update + $(rbm) build release --target nightly --target browser-macos --target basebrowser
basebrowser-nightly-src: submodule-update $(rbm) build release --target nightly --target browser-src --target basebrowser @@ -456,11 +435,8 @@ basebrowser-testbuild-windows-x86_64: submodule-update basebrowser-testbuild-windows-i686: submodule-update $(rbm) build release --target testbuild --target browser-windows-i686 --target basebrowser
-basebrowser-testbuild-osx-x86_64: submodule-update - $(rbm) build release --target testbuild --target browser-osx-x86_64 --target basebrowser - -basebrowser-testbuild-osx-aarch64: submodule-update - $(rbm) build release --target testbuild --target browser-osx-aarch64 --target basebrowser +basebrowser-testbuild-macos: submodule-update + $(rbm) build release --target testbuild --target browser-macos --target basebrowser
basebrowser-testbuild-src: submodule-update $(rbm) build release --target testbuild --target browser-src-testbuild --target basebrowser diff --git a/README b/README index 6a29f8e8..6f72aeec 100644 --- a/README +++ b/README @@ -81,7 +81,7 @@ name to the makefile target: $ make torbrowser-nightly-linux-i686 $ make torbrowser-nightly-windows-i686 $ make torbrowser-nightly-windows-x86_64 - $ make torbrowser-nightly-osx-x86_64 + $ make torbrowser-nightly-macos $ make torbrowser-nightly-android-armv7 $ make torbrowser-nightly-android-aarch64 $ make torbrowser-nightly-android-x86 diff --git a/doc/HACKING.txt b/doc/HACKING.txt index 1c4e6381..d08b3155 100644 --- a/doc/HACKING.txt +++ b/doc/HACKING.txt @@ -44,13 +44,13 @@ In each of those places, an option can be defined: The targets are usually used to select:
- the platform: torbrowser-linux-x86_64, torbrowser-linux-i686, - torbrowser-windows-i686, torbrowser-windows-x86_64, torbrowser-osx-x86_64, + torbrowser-windows-i686, torbrowser-windows-x86_64, torbrowser-macos, torbrowser-android-armv7, torbrowser-android-aarch64, torbrowser-android-x86, torbrowser-android-x86_64 - the channel: release, nightly, alpha
The targets torbrowser-linux-x86_64, torbrowser-linux-i686, -torbrowser-windows-i686, torbrowser-windows-x86_64, torbrowser-osx-x86_64, +torbrowser-windows-i686, torbrowser-windows-x86_64, torbrowser-macos, torbrowser-android-armv7, torbrowser-android-x86, torbrowser-android-aarch64, torbrowser-android-x86_64 are special cases. They do not contain options directly, instead they contain a list of other targets. For instance, the @@ -154,7 +154,7 @@ $platform should be one of the following:
- torbrowser-windows-x86_64
- - torbrowser-osx-x86_64 + - torbrowser-macos
- torbrowser-android-armv7
diff --git a/doc/MAKEFILE.txt b/doc/MAKEFILE.txt index 823de3b2..0eec68ff 100644 --- a/doc/MAKEFILE.txt +++ b/doc/MAKEFILE.txt @@ -7,7 +7,7 @@ torbrowser-release Build Tor Browser for the release channel, for all supported platforms. The resulting build can be found in directory release/$version.
-torbrowser-release-{linux-x86_64,linux-i686,windows-i686,osx-x86_64, +torbrowser-release-{linux-x86_64,linux-i686,windows-i686,macos, android-armv7, android-x86,android-x86_64, android-aarch64,desktop,android} -------------------------------------------------------------------- @@ -20,7 +20,7 @@ torbrowser-alpha Build Tor Browser for the alpha channel, for all supported platforms. The resulting build can be found in directory alpha/$version.
-torbrowser-alpha-{linux-x86_64,linux-i686,windows-i686,osx-x86_64, +torbrowser-alpha-{linux-x86_64,linux-i686,windows-i686,macos, android-armv7,android-x86,android-x86_64, android-aarch64,desktop,android} ------------------------------------------------------------------ @@ -35,7 +35,7 @@ components.
The resulting build can be found in directory nightly/$date
-torbrowser-nightly-{linux-x86_64,linux-i686,windows-i686,osx-x86_64, +torbrowser-nightly-{linux-x86_64,linux-i686,windows-i686,macos, android-armv7,android-x86,android-x86_64, android-aarch64,desktop,android} -------------------------------------------------------------------- diff --git a/projects/browser/build b/projects/browser/build index 43cd81d7..9618e3ec 100644 --- a/projects/browser/build +++ b/projects/browser/build @@ -21,6 +21,8 @@ touch "$GENERATEDPREFSPATH"
[% IF c("var/osx") %] TBDIR="$TB_STAGE_DIR/[% c("var/Project_Name") %].app" + TBDIR_AARCH64="$TB_STAGE_DIR/[% c("var/Project_Name") %]-aarch64.app" + TBDIRS=("$TBDIR" "$TBDIR_AARCH64")
DOCSPATH=Contents/Resources/[% c('var/ProjectName') %]/Docs EXTSPATH=Contents/Resources/distribution/extensions @@ -31,6 +33,7 @@ touch "$GENERATEDPREFSPATH" export PATH=/var/tmp/dist/libdmg-hfsplus:$PATH [% ELSE %] TBDIR=$TB_STAGE_DIR/Browser + TBDIRS=("$TBDIR")
DOCSPATH=[% c('var/ProjectName') %]/Docs EXTSPATH=[% c('var/ProjectName') %]/Data/Browser/profile.default/extensions @@ -40,7 +43,10 @@ touch "$GENERATEDPREFSPATH" mkdir -p "$TBDIR/[% c('var/ProjectName') %]/Data/Browser/Caches" [% END %]
-mkdir -p "$TBDIR/$EXTSPATH" +for tbdir in "${TBDIRS[@]}" +do + mkdir -p "$tbdir/$EXTSPATH" +done
# Extract the MAR tools. unzip -d $rootdir $rootdir/[% c('input_files_by_name/firefox') %]/mar-tools-*.zip @@ -49,26 +55,45 @@ MARTOOLS=$rootdir/mar-tools mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
[% IF c("var/tor-browser") -%] + function mv_tbdir { + declare args=($@) + local dest="${args[-1]}" + unset args[-1] + mv ${args[@]} "$TBDIR/$dest" + [% IF c("var/osx") -%] + for src in ${args[@]} + do + mv "aarch64/$src" "$TBDIR_AARCH64/$dest" + done + [% END -%] + } + tar -xvf [% c('input_files_by_name/tor-expert-bundle') %] + [% IF c("var/osx") -%] + mkdir aarch64 + tar -C aarch64 -xf [% c('input_files_by_name/tor-expert-bundle-aarch64') %] + [% END -%]
# geoip(6) and anything else that belongs in the data dir from the expert bundle - mkdir -p "$TBDIR/$TORCONFIGPATH" - mv data/{geoip,geoip6} "$TBDIR/$TORCONFIGPATH" + mkdir -p "$TBDIR/$TORCONFIGPATH" [% IF c("var/osx") %]"$TBDIR_AARCH64/$TORCONFIGPATH"[% END %] + mv_tbdir data/{geoip,geoip6} "$TORCONFIGPATH"
# Bridge lists will be consumed later in `bridges_conf` mv tor/pluggable_transports/bridges_list.*.txt $rootdir + [% IF c("var/osx") %] + rm -f aarch64/tor/pluggable_transports/bridges_list.*.txt + [% END -%]
# Snowflake's README is the only documentation shipped in tor-expert-bundle - mkdir -p "$TBDIR/$DOCSPATH/snowflake" - find tor - mv tor/pluggable_transports/README.SNOWFLAKE.md "$TBDIR/$DOCSPATH/snowflake/README.md" + mkdir -p "$TBDIR/$DOCSPATH/snowflake" [% IF c("var/osx") %]"$TBDIR_AARCH64/$DOCSPATH/snowflake"[% END %] + mv_tbdir tor/pluggable_transports/README.SNOWFLAKE.md "$DOCSPATH/snowflake/README.md"
# Move the PTs to where TB expects them - mkdir -p "$TBDIR/$TORBINPATH" - mv tor/pluggable_transports "$TBDIR/$TORBINPATH/PluggableTransports" + mkdir -p "$TBDIR/$TORBINPATH" [% IF c("var/osx") %]"$TBDIR_AARCH64/$TORBINPATH"[% END %] + mv_tbdir tor/pluggable_transports "$TORBINPATH/PluggableTransports"
# Move tor and dependencies to where TB expects them - mv tor/* "$TBDIR/$TORBINPATH" + mv_tbdir tor/* "$TORBINPATH"
# on linux, libstdc++ lives in it's own directory [% IF c("var/linux") %] @@ -84,7 +109,13 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b
[% END -%]
-tar -C "$TBDIR[% IF c("var/osx") %]/Contents/Resources[% END %]" -xf [% c('input_files_by_name/fonts') %] +for tbdir in "${TBDIRS[@]}" +do + [% IF c("var/osx") -%] + tbdir="$tbdir/Contents/Resources" + [% END -%] + tar -C "$tbdir" -xf [% c('input_files_by_name/fonts') %] +done
[% IF c("var/linux") %] cat > ${TB_STAGE_DIR}/start-[% c("var/project-name") %].desktop << 'RBM_TB_EOF' @@ -114,6 +145,13 @@ RBM_TB_EOF
tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.gz
+[% IF c("var/osx") -%] + # Use symlink in tmp dir to extract "Tor Browser.app" to "Tor Browser-aarch64.app" + ff_aarch64=$(mktemp -d) + ln -s "$TBDIR_AARCH64" "$ff_aarch64/[% c("var/Project_Name") %].app" + tar -C $ff_aarch64 -xf [% c('input_files_by_name/firefox-aarch64') %]/browser.tar.gz +[% END %] + [% IF c("var/tor-browser") -%] # Include the Tor Browser manual TMP_MANUAL_PATH=$rootdir/tmp_manual/ @@ -121,7 +159,10 @@ tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.gz pushd $TMP_MANUAL_PATH tar -xf $rootdir/[% c('input_files_by_name/manual') %] find . -exec [% c("touch") %] {} ; - find chrome/ | sort | zip -X -@ "$TBDIR[% IF c("var/osx") %]/Contents/Resources[% END %]/browser/omni.ja" + for tbdir in "${TBDIRS[@]}" + do + find chrome/ | sort | zip -X -@ "$tbdir[% IF c('var/osx') %]/Contents/Resources[% END %]/browser/omni.ja" + done popd rm -rf $TMP_MANUAL_PATH [% END -%] @@ -165,19 +206,30 @@ tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.gz
[% IF c("var/tor-browser") -%] # Install a "tor" shim that sets the working directory. See #10030. - mv "$TBDIR/$TORBINPATH/tor" "$TBDIR/$TORBINPATH/tor.real" - cp Bundle-Data/mac-tor.sh "$TBDIR/$TORCONFIGPATH/tor" + for tbdir in "${TBDIRS[@]}" + do + mv "$tbdir/$TORBINPATH/tor" "$tbdir/$TORBINPATH/tor.real" + cp Bundle-Data/mac-tor.sh "$tbdir/$TORCONFIGPATH/tor" + done [% END -%]
tar -C Bundle-Data/mac-applications.dmg -c . | tar -C $TB_STAGE_DIR -x [% END %]
-mkdir -p "$TBDIR/$DOCSPATH" -cp -a Bundle-Data/Docs/* "$TBDIR/$DOCSPATH" -tar -C Bundle-Data/[% bundledata_osname %] [% IF ! c("var/namecoin") %]--exclude=*Electrum-NMC* --exclude=*ncprop279*[% END %] -c . | tar -C "$TBDIR[% IF ! c("var/osx") %]/[% c('var/ProjectName') %][% END %]" -x +for tbdir in "${TBDIRS[@]}" +do + mkdir -p "$tbdir/$DOCSPATH" + cp -a Bundle-Data/Docs/* "$tbdir/$DOCSPATH" + tar -C Bundle-Data/[% bundledata_osname %] \ + [% IF ! c("var/namecoin") %]--exclude=*Electrum-NMC* --exclude=*ncprop279*[% END %] \ + -c . | tar -C "$tbdir[% IF ! c("var/osx") %]/[% c('var/ProjectName') %][% END %]" -x +done
[% IF c("var/tor-browser") -%] - cat Bundle-Data/PTConfigs/[% bundledata_osname %]/torrc-defaults-appendix >> "$TBDIR/$TORCONFIGPATH/torrc-defaults" + for tbdir in "${TBDIRS[@]}" + do + cat Bundle-Data/PTConfigs/[% bundledata_osname %]/torrc-defaults-appendix >> "$tbdir/$TORCONFIGPATH/torrc-defaults" + done cat Bundle-Data/PTConfigs/bridge_prefs.js >> "$GENERATEDPREFSPATH"
function bridges_conf { @@ -208,17 +260,21 @@ tar -C Bundle-Data/[% bundledata_osname %] [% IF ! c("var/namecoin") %]--exclude PKG_LOCALE="ALL" PKG_DIR='[% c("var/project-name") %]'
-pushd "$TBDIR[% IF c("var/osx") %]/Contents/Resources[% END %]/browser/" -unzip omni.ja defaults/preferences/[% c("var/prefs_file") %] || [ $? -lt 3 ] -# Append our built extension-overrides.js to the preferences file -cat "$GENERATEDPREFSPATH" >> defaults/preferences/[% c("var/prefs_file") %] -cp defaults/preferences/[% c("var/prefs_file") %] $rootdir -[% c("touch") %] defaults/preferences/[% c("var/prefs_file") %] -zip -Xm omni.ja defaults/preferences/[% c("var/prefs_file") %] -rm -rf defaults -# create tbb_version.json file for #25020 -echo '{"version":"[% c("var/torbrowser_version") %]","architecture":"[% c("var/mar_osname") %]","channel":"[% c("var/channel") %]","locale":"en-US"}' > ../tbb_version.json -popd +for tbdir in "${TBDIRS[@]}" +do + tbdir="$tbdir[% IF c('var/osx') %]/Contents/Resources[% END %]/browser/" + pushd "$tbdir" + unzip omni.ja defaults/preferences/[% c("var/prefs_file") %] || [ $? -lt 3 ] + # Append our built extension-overrides.js to the preferences file + cat "$GENERATEDPREFSPATH" >> defaults/preferences/[% c("var/prefs_file") %] + cp defaults/preferences/[% c("var/prefs_file") %] $rootdir + [% c("touch") %] defaults/preferences/[% c("var/prefs_file") %] + zip -Xm omni.ja defaults/preferences/[% c("var/prefs_file") %] + rm -rf defaults + # create tbb_version.json file for #25020 + echo '{"version":"[% c("var/torbrowser_version") %]","architecture":"[% c("var/mar_osname") %]","channel":"[% c("var/channel") %]","locale":"en-US"}' > ../tbb_version.json + popd +done
[% IF c("var/windows") %] tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/nsis') %] @@ -229,6 +285,27 @@ popd mv $distdir/windows-installer ${TB_STAGE_DIR} [% END %]
+[% IF c("var/osx") -%] + # unify.py requires lipo, so we need to add cctools in the PATH + tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/macosx-toolchain') %] + export PATH="/var/tmp/dist/macosx-toolchain/cctools/bin:$PATH" + firefox_src=/var/tmp/dist/firefox-src + mkdir -p $firefox_src + tar -C $firefox_src -xf $rootdir/[% c('input_files_by_name/src-firefox') %] + firefox_src=$(echo $firefox_src/firefox-*) + # Temporarily move noscript outside of $TBDIR to avoid error when running unify.py: + # File "/var/tmp/dist/firefox-src/firefox-69721baf14f0/python/mozbuild/mozpack/mozjar.py", line 452, in _getreader + # raise JarReaderError( + # mozpack.mozjar.JarReaderError: Central directory and file header mismatch. Corrupted archive? + # + # See https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/issues/40... + mv "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" $rootdir/ns.xpi + MOZ_AUTOMATION=1 $firefox_src/mach python $firefox_src/toolkit/mozapps/installer/unify.py "$TBDIR" "$TBDIR_AARCH64" + mkdir -p "$TBDIR/$EXTSPATH" + mv $rootdir/ns.xpi "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi" + rm -Rf "$TBDIR_AARCH64" +[% END -%] + [% IF c("var/windows") %] TBDIR="$distdir/$PKG_DIR/[% c("var/Project_Name") %]/Browser" [% ELSIF c("var/osx") %] @@ -266,7 +343,7 @@ cd $distdir [% ELSIF c("var/osx") %] [% c('var/ddmg', { dmg_src => '"$PKG_DIR"', - dmg_out => '$OUTDIR/' _ c('var/ProjectName') _ '-' _ c("var/torbrowser_version") _ '-' _ c("var/dmg_name") _ '_${PKG_LOCALE}.dmg', + dmg_out => '$OUTDIR/' _ c('var/ProjectName') _ '-' _ c("var/torbrowser_version") _ '-' _ c("var/mar_osname") _ '_${PKG_LOCALE}.dmg', }) %] [% ELSIF c("var/windows") %] find "$PKG_DIR" -exec [% c("touch") %] {} ; diff --git a/projects/browser/config b/projects/browser/config index 29d65f7e..e7d9f31f 100644 --- a/projects/browser/config +++ b/projects/browser/config @@ -26,19 +26,16 @@ targets: linux-x86_64: var: mar_osname: linux64 - osx-x86_64: - var: - mar_osname: osx64 - dmg_name: osx64 - osx-aarch64: - var: - mar_osname: osx64-aarch64 - dmg_name: osx64-aarch64 osx: var: + mar_osname: osx64 arch_deps: - genisoimage - faketime + - python3-dev + - python3-pip + - python3-distutils-extra + - python3-psutil windows: var: arch_deps: @@ -67,12 +64,26 @@ input_files: - project: firefox name: firefox enable: '[% ! c("var/android") %]' + - project: firefox + name: firefox-aarch64 + enable: '[% c("var/osx") %]' + target_prepend: + - osx-aarch64 + - project: firefox + name: src-firefox + pkg_type: src-tarballs + enable: '[% c("var/osx") %]' - project: fenix name: fenix enable: '[% c("var/android") %]' - project: tor-expert-bundle name: tor-expert-bundle enable: '[% c("var/tor-browser") %]' + - project: tor-expert-bundle + name: tor-expert-bundle-aarch64 + enable: '[% c("var/osx") && c("var/tor-browser") %]' + target_prepend: + - osx-aarch64 - project: fonts name: fonts enable: '[% ! c("var/android") %]' @@ -98,7 +109,7 @@ input_files: enable: '[% c("var/android") %]' - name: '[% c("var/compiler") %]' project: '[% c("var/compiler") %]' - enable: '[% c("var/android") %]' + enable: '[% c("var/android") || c("var/osx") %]' - name: electrum-nmc project: electrum-nmc enable: '[% c("var/namecoin") %]' diff --git a/projects/release/build b/projects/release/build index 15e3e86f..84d09b05 100644 --- a/projects/release/build +++ b/projects/release/build @@ -22,11 +22,8 @@ mkdir -p "$destdir" [% IF c("var/browser-windows-x86_64") -%] mv [% c('input_files_by_name/windows-x86_64') %]/* "$destdir"/ [% END -%] -[% IF c("var/browser-osx-x86_64") -%] - mv [% c('input_files_by_name/osx-x86_64') %]/* "$destdir"/ -[% END -%] -[% IF c("var/browser-osx-aarch64") -%] - mv [% c('input_files_by_name/osx-aarch64') %]/* "$destdir"/ +[% IF c("var/browser-macos") -%] + mv [% c('input_files_by_name/macos') %]/* "$destdir"/ [% END -%] [% IF c("var/browser-linux-i686") -%] mv [% c('input_files_by_name/linux-i686') %]/* "$destdir"/ diff --git a/projects/release/config b/projects/release/config index f3165ed8..cd1c7d74 100644 --- a/projects/release/config +++ b/projects/release/config @@ -14,7 +14,7 @@ targets: - browser-linux-i686 - browser-windows-i686 - browser-windows-x86_64 - - browser-osx-x86_64 + - browser-macos - browser-android-armv7 - browser-android-x86 - browser-android-x86_64 @@ -25,7 +25,7 @@ targets: - browser-linux-i686 - browser-windows-i686 - browser-windows-x86_64 - - browser-osx-x86_64 + - browser-macos - browser-src browser-all-android: - browser-android-armv7 @@ -60,12 +60,9 @@ targets: browser-windows-x86_64: var: browser-windows-x86_64: 1 - browser-osx-x86_64: + browser-macos: var: - browser-osx-x86_64: 1 - browser-osx-aarch64: - var: - browser-osx-aarch64: 1 + browser-macos: 1 browser-src: var: browser-src: '[% ! c("var/testbuild") %]' @@ -188,19 +185,12 @@ input_files: - '[% c("var/build_target") %]' - '[% c("var/browser_type") %]-windows-x86_64'
- - name: osx-x86_64 - project: browser - enable: '[% c("var/browser-osx-x86_64") %]' - target: - - '[% c("var/build_target") %]' - - '[% c("var/browser_type") %]-osx-x86_64' - - - name: osx-aarch64 + - name: macos project: browser - enable: '[% c("var/browser-osx-aarch64") %]' + enable: '[% c("var/browser-macos") %]' target: - '[% c("var/build_target") %]' - - '[% c("var/browser_type") %]-osx-aarch64' + - '[% c("var/browser_type") %]-macos'
- name: src-firefox project: firefox diff --git a/rbm.conf b/rbm.conf index 0d34a766..c4dd832d 100644 --- a/rbm.conf +++ b/rbm.conf @@ -499,26 +499,19 @@ targets: - zip - unzip
- torbrowser-osx-x86_64: + torbrowser-macos: - osx-x86_64 - osx - torbrowser - torbrowser-osx-aarch64: - - osx-aarch64 - - osx - - torbrowser - basebrowser-osx-x86_64: + basebrowser-macos: - osx-x86_64 - osx - basebrowser - basebrowser-osx-aarch64: - - osx-aarch64 - - osx - - basebrowser osx-aarch64: arch: aarch64 var: osx-aarch64: 1 + osx-x86_64: 0 osname: osx-aarch64 osx_arch: arm64 build_target: aarch64-apple-darwin @@ -534,6 +527,7 @@ targets: osx: var: osx: 1 + osname: macos container: suite: bullseye arch: amd64
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch main in repository builders/tor-browser-build.
commit 7431ad67575c8fef5105a3c82ee1b193c7524166 Author: Nicolas Vigier boklm@torproject.org AuthorDate: Mon Oct 3 12:25:39 2022 +0200
Bug 40067: Rename osx64 mar and dmg files to macos
The new macos mar and dmg files contain both x86_64 and aarch64 builds for macOS.
In projects/release/update_responses_config.yml and tools/signing/nightly/update-responses-base-config.yml we update the build_target to mar_osname mapping to use `macos` instead of `osx64`. We also add the new aarch64 build_target (Darwin_aarch64-gcc3).
We update update_responses to take into account the new dmg file names using `macos` instead of `osx64`.
We also update tools/dmg2mar and various signing scripts for the `osx64 -> macos` change in both mar files and dmg files. --- projects/browser/config | 2 +- projects/release/update_responses_config.yml | 8 +++++--- tools/dmg2mar | 6 +++--- tools/marsigning_check.sh | 2 +- tools/signing/check_file_counts | 4 ++-- tools/signing/gatekeeper-bundling.sh | 2 +- tools/signing/macos-signer-gatekeeper-signing | 2 +- tools/signing/nightly/update-responses-base-config.yml | 11 +++++------ tools/update-responses/update_responses | 6 +++--- 9 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/projects/browser/config b/projects/browser/config index e7d9f31f..6063c4c2 100644 --- a/projects/browser/config +++ b/projects/browser/config @@ -28,7 +28,7 @@ targets: mar_osname: linux64 osx: var: - mar_osname: osx64 + mar_osname: macos arch_deps: - genisoimage - faketime diff --git a/projects/release/update_responses_config.yml b/projects/release/update_responses_config.yml index 0f42a09b..d27afd84 100644 --- a/projects/release/update_responses_config.yml +++ b/projects/release/update_responses_config.yml @@ -2,7 +2,7 @@ tmp_dir: '[% c("tmp_dir") %]' create_downloads_json: 1 appname_marfile: tor-browser -appname_bundle_osx: TorBrowser +appname_bundle_macos: TorBrowser appname_bundle_linux: tor-browser appname_bundle_win32: torbrowser-install appname_bundle_win64: torbrowser-install-win64 @@ -20,7 +20,9 @@ build_targets: - WINNT_x86-gcc3-x86 - WINNT_x86-gcc3-x64 win64: WINNT_x86_64-gcc3-x64 - osx64: Darwin_x86_64-gcc3 + macos: + - Darwin_x86_64-gcc3 + - Darwin_aarch64-gcc3 channels: [% c('var/channel') %]: [% c("var/torbrowser_version") %] versions: @@ -41,7 +43,7 @@ versions: migrate_langs: minSupportedInstructionSet: SSE2 # minSupportedOsVersion on macOS corresponds to the Darwin version ( https://en.wikipedia.org/wiki/Darwin_(operating_system) ) - osx64: + macos: # macOS v10.12.0 minSupportedOSVersion: 16.0.0 # minSupportedOsVersion on Windows corresponds to the operating system version ( https://docs.microsoft.com/en-us/windows/win32/sysinfo/operating-system-vers... ) diff --git a/tools/dmg2mar b/tools/dmg2mar index 54bb512e..cd15c605 100755 --- a/tools/dmg2mar +++ b/tools/dmg2mar @@ -96,7 +96,7 @@ sub get_dmg_files_from_sha256sums { foreach my $line (read_file('sha256sums-unsigned-build.txt')) { my (undef, $filename) = split ' ', $line; chomp $filename; - next unless $filename =~ m/^$appname_dmg-(.+)-osx64_(.+).dmg$/; + next unless $filename =~ m/^$appname_dmg-(.+)-macos_(.+).dmg$/; push @files, { filename => $filename, version => $1, lang => $2 }; } return @files; @@ -111,7 +111,7 @@ sub convert_files { # internally on OSX, but the dmg file still uses 'ja' to avoid # confusing users. my $mar_lang = $file->{lang} eq 'ja' ? 'ja-JP-mac' : $file->{lang}; - my $output = "$appname_mar-osx64-$file->{version}_$mar_lang.mar"; + my $output = "$appname_mar-macos-$file->{version}_$mar_lang.mar"; my $step_name = "$file->{filename} -> $output"; print "Starting $step_name\n"; $pm->start($step_name) and next; @@ -160,7 +160,7 @@ sub remove_incremental_mars { foreach my $line (read_file('sha256sums-unsigned-build.incrementals.txt')) { my (undef, $filename) = split ' ', $line; chomp $filename; - next unless $filename =~ m/^$appname_mar-osx64.+.incremental.mar$/; + next unless $filename =~ m/^$appname_mar-macos.+.incremental.mar$/; next unless -f $filename; print "Removing $filename\n"; unlink $filename; diff --git a/tools/marsigning_check.sh b/tools/marsigning_check.sh index 28f149a7..343765fa 100755 --- a/tools/marsigning_check.sh +++ b/tools/marsigning_check.sh @@ -124,7 +124,7 @@ for f in *.mar; do then not_reproduced_mars=$((not_reproduced_mars + 1)) case "$f" in - *osx64*) + *macos*) not_reproduced_mars_expected=$((not_reproduced_mars_expected + 1)) ;; *) echo "$f does not have the SHA-256 sum of the unsigned MAR file!" diff --git a/tools/signing/check_file_counts b/tools/signing/check_file_counts index d374aa0a..3439644b 100755 --- a/tools/signing/check_file_counts +++ b/tools/signing/check_file_counts @@ -13,9 +13,9 @@ if [ "$#" -ne 4 ]; then exit fi
-INSTALL_PLATFORMS="tor-browser-linux32-${VERSION}_*.tar.xz tor-browser-linux64-${VERSION}_*.tar.xz torbrowser-install-${VERSION}_*.exe torbrowser-install-win64-${VERSION}_*.exe TorBrowser-${VERSION}-osx64_*.dmg" +INSTALL_PLATFORMS="tor-browser-linux32-${VERSION}_*.tar.xz tor-browser-linux64-${VERSION}_*.tar.xz torbrowser-install-${VERSION}_*.exe torbrowser-install-win64-${VERSION}_*.exe TorBrowser-${VERSION}-macos_*.dmg"
-MAR_PLATFORMS="linux32 linux64 win32 win64 osx64" +MAR_PLATFORMS="linux32 linux64 win32 win64 macos" MAR_TOOLS_PLATFORMS="linux32 linux64 win32 win64 mac64"
total_count=0 diff --git a/tools/signing/gatekeeper-bundling.sh b/tools/signing/gatekeeper-bundling.sh index 046efbff..ba9543ba 100755 --- a/tools/signing/gatekeeper-bundling.sh +++ b/tools/signing/gatekeeper-bundling.sh @@ -62,7 +62,7 @@ do cd $tmpdir/dmg unzip -q $macos_stapled_dir/tb-${tbb_version}_$lang-stapled.zip cd .. - $script_dir/ddmg.sh $macos_signed_dir/TorBrowser-${tbb_version}-osx64_$lang.dmg $tmpdir/dmg/ + $script_dir/ddmg.sh $macos_signed_dir/TorBrowser-${tbb_version}-macos_$lang.dmg $tmpdir/dmg/ rm -rf 'dmg/Tor Browser.app' done
diff --git a/tools/signing/macos-signer-gatekeeper-signing b/tools/signing/macos-signer-gatekeeper-signing index 8efc3fd5..c2cb4534 100755 --- a/tools/signing/macos-signer-gatekeeper-signing +++ b/tools/signing/macos-signer-gatekeeper-signing @@ -67,7 +67,7 @@ do echo "DMG already mounted. Please correct." exit 1 fi - hdiutil attach TorBrowser-${tbb_version}-osx64_$LANG.dmg + hdiutil attach TorBrowser-${tbb_version}-macos_$LANG.dmg cp -rf "/Volumes/Tor Browser/Tor Browser.app" "Tor Browser.app" echo "Signing Tor Browser_$LANG.app" codesign -vvv --deep -o runtime --entitlements="$ENTITLEMENTS" --timestamp -f -s "Developer ID Application: The Tor Project, Inc (MADPSAYN6T)" "Tor Browser.app/" diff --git a/tools/signing/nightly/update-responses-base-config.yml b/tools/signing/nightly/update-responses-base-config.yml index 2f18cd12..7c8342cd 100644 --- a/tools/signing/nightly/update-responses-base-config.yml +++ b/tools/signing/nightly/update-responses-base-config.yml @@ -10,8 +10,9 @@ build_targets: - WINNT_x86-gcc3-x86 - WINNT_x86-gcc3-x64 win64: WINNT_x86_64-gcc3-x64 - osx32: Darwin_x86-gcc3 - osx64: Darwin_x86_64-gcc3 + macos: + - Darwin_x86_64-gcc3 + - Darwin_aarch64-gcc3 channels: nightly: nightly_version versions: @@ -21,10 +22,8 @@ versions: migrate_langs: pt-PT: pt-BR minSupportedInstructionSet: SSE2 - osx32: - minSupportedOSVersion: 13.0.0 - osx64: - minSupportedOSVersion: 13.0.0 + macos: + minSupportedOSVersion: 16.0.0 win32: minSupportedOSVersion: 6.1 win64: diff --git a/tools/update-responses/update_responses b/tools/update-responses/update_responses index af81875b..265994a5 100755 --- a/tools/update-responses/update_responses +++ b/tools/update-responses/update_responses @@ -133,8 +133,8 @@ sub get_version_downloads { foreach my $file (readdir $d) { next unless -f "$vdir/$file"; my ($os, $lang); - if ($file =~ m/^$config->{appname_bundle_osx}-$version-osx64_(.+).dmg$/) { - ($os, $lang) = ('osx64', $1); + if ($file =~ m/^$config->{appname_bundle_macos}-$version-macos_(.+).dmg$/) { + ($os, $lang) = ('macos', $1); } elsif ($file =~ m/^$config->{appname_bundle_linux}-(linux32|linux64)-${version}_(.+).tar.xz$/) { ($os, $lang) = ($1, $2); } elsif ($file =~ m/^$config->{appname_bundle_win64}-${version}_(.+).exe$/) { @@ -220,7 +220,7 @@ sub create_incremental_mar { extract_mar(mar_filename($config, $appname, $new_version, $os, $lang), "$tmpdir/B", $mar_c_new); # bug 26054: make sure previous macOS version is code signed - if (!$ENV{NO_CODESIGNATURE} && ($os eq 'osx64') + if (!$ENV{NO_CODESIGNATURE} && ($os eq 'macos') && ! -f "$tmpdir/A/Contents/_CodeSignature/CodeResources") { exit_error "Missing code signature in $from_version while creating $mar_file"; }
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch main in repository builders/tor-browser-build.
commit d499c3a902357002d49484b1edc0c5d169f8656f Author: Nicolas Vigier boklm@torproject.org AuthorDate: Mon Oct 3 13:16:25 2022 +0200
Bug 40067: Update nightly directory for macos --- projects/firefox/build | 2 +- projects/firefox/config | 2 ++ tools/signing/nightly/config.yml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/projects/firefox/build b/projects/firefox/build index c6b940fa..724bd27b 100644 --- a/projects/firefox/build +++ b/projects/firefox/build @@ -100,7 +100,7 @@ fi
[% IF c("var/nightly") && c("var/tor-browser") -%] # Set update url for nightly (#33402 / #40033) - sed -i 's|^URL=https://aus1%5C.torproject%5C.org/.*%7CURL=https://nightlies.tbb.torproject.... c("var/osname") %]/%CHANNEL%/%BUILD_TARGET%/%VERSION%/ALL|' build/application.ini.in + sed -i 's|^URL=https://aus1%5C.torproject%5C.org/.*%7CURL=https://nightlies.tbb.torproject.... c("var/nightly_updates_osname") %]/%CHANNEL%/%BUILD_TARGET%/%VERSION%/ALL|' build/application.ini.in [% END -%]
add_translation () { diff --git a/projects/firefox/config b/projects/firefox/config index 103e8a9a..75d06ca9 100644 --- a/projects/firefox/config +++ b/projects/firefox/config @@ -16,6 +16,7 @@ var: browser_build: 1 branding_directory: 'browser/branding/alpha' copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]' + nightly_updates_osname: '[% c("var/osname") %]' deps: - build-essential - unzip @@ -113,6 +114,7 @@ targets: osx: var: martools_filename: 'mar-tools-mac-[% c("var/osx_arch") %].zip' + nightly_updates_osname: macos arch_deps: - python3 - python3-distutils diff --git a/tools/signing/nightly/config.yml b/tools/signing/nightly/config.yml index bf1db201..198f26c1 100644 --- a/tools/signing/nightly/config.yml +++ b/tools/signing/nightly/config.yml @@ -10,7 +10,7 @@ publish_dirs: - nightly-linux-i686 - nightly-windows-x86_64 - nightly-windows-i686 - - nightly-osx-x86_64 + - nightly-macos nss_db_dir: nssdb nss_certname: nightly-marsigner gpg_keyring: keyring/torbrowser-nightly.gpg
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch main in repository builders/tor-browser-build.
commit 985480ebb2a016c921fcd8c1d644b0fbcb68d21d Author: Nicolas Vigier boklm@torproject.org AuthorDate: Mon Oct 3 13:33:05 2022 +0200
Bug 40067: Rename osx targets and configs to macos --- doc/HACKING.txt | 8 +++--- projects/browser/build | 37 +++++++++++++------------- projects/browser/config | 16 +++++------ projects/clang/build | 2 +- projects/firefox/build | 14 +++++----- projects/firefox/config | 6 ++--- projects/firefox/list_toolchain_updates_checks | 6 ++--- projects/firefox/mozconfig | 6 ++--- projects/fonts/build | 4 +-- projects/fonts/config | 2 +- projects/go/build | 2 +- projects/go/config | 6 ++--- projects/libevent/build | 2 +- projects/libevent/config | 2 +- projects/macosx-toolchain/build | 4 +-- projects/node/config | 2 +- projects/openssl/build | 2 +- projects/openssl/config | 4 +-- projects/rust/build | 4 +-- projects/rust/config | 2 +- projects/tor/build | 10 +++---- projects/tor/config | 2 +- rbm.conf | 32 +++++++++++----------- 23 files changed, 87 insertions(+), 88 deletions(-)
diff --git a/doc/HACKING.txt b/doc/HACKING.txt index d08b3155..d20c75ef 100644 --- a/doc/HACKING.txt +++ b/doc/HACKING.txt @@ -99,8 +99,8 @@ You can use the following template syntax in the build scripts: # do something for linux [% ELSIF c("var/windows") -%] # do something for windows - [% ELSIF c("var/osx") -%] - # do something for osx + [% ELSIF c("var/macos") -%] + # do something for macOS [% END -%]
You can also use var/linux-x86_64 and var/linux-i686 for things that @@ -117,9 +117,9 @@ depending on the target: windows-i686: var: do_something: 'do something for windows' - osx-x86_64: + macos-x86_64: var: - do_something: 'do something for osx' + do_something: 'do something for macos'
And in the build script, use:
diff --git a/projects/browser/build b/projects/browser/build index 9618e3ec..34be146a 100644 --- a/projects/browser/build +++ b/projects/browser/build @@ -19,7 +19,7 @@ GENERATEDPREFSPATH=$rootdir/Bundle-Data/PTConfigs/generated-prefs.js # Create initially empty prefs file where we can dump our conditionally included/genetered prefs touch "$GENERATEDPREFSPATH"
-[% IF c("var/osx") %] +[% IF c("var/macos") %] TBDIR="$TB_STAGE_DIR/[% c("var/Project_Name") %].app" TBDIR_AARCH64="$TB_STAGE_DIR/[% c("var/Project_Name") %]-aarch64.app" TBDIRS=("$TBDIR" "$TBDIR_AARCH64") @@ -60,7 +60,7 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b local dest="${args[-1]}" unset args[-1] mv ${args[@]} "$TBDIR/$dest" - [% IF c("var/osx") -%] + [% IF c("var/macos") -%] for src in ${args[@]} do mv "aarch64/$src" "$TBDIR_AARCH64/$dest" @@ -69,27 +69,27 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b }
tar -xvf [% c('input_files_by_name/tor-expert-bundle') %] - [% IF c("var/osx") -%] + [% IF c("var/macos") -%] mkdir aarch64 tar -C aarch64 -xf [% c('input_files_by_name/tor-expert-bundle-aarch64') %] [% END -%]
# geoip(6) and anything else that belongs in the data dir from the expert bundle - mkdir -p "$TBDIR/$TORCONFIGPATH" [% IF c("var/osx") %]"$TBDIR_AARCH64/$TORCONFIGPATH"[% END %] + mkdir -p "$TBDIR/$TORCONFIGPATH" [% IF c("var/macos") %]"$TBDIR_AARCH64/$TORCONFIGPATH"[% END %] mv_tbdir data/{geoip,geoip6} "$TORCONFIGPATH"
# Bridge lists will be consumed later in `bridges_conf` mv tor/pluggable_transports/bridges_list.*.txt $rootdir - [% IF c("var/osx") %] + [% IF c("var/macos") %] rm -f aarch64/tor/pluggable_transports/bridges_list.*.txt [% END -%]
# Snowflake's README is the only documentation shipped in tor-expert-bundle - mkdir -p "$TBDIR/$DOCSPATH/snowflake" [% IF c("var/osx") %]"$TBDIR_AARCH64/$DOCSPATH/snowflake"[% END %] + mkdir -p "$TBDIR/$DOCSPATH/snowflake" [% IF c("var/macos") %]"$TBDIR_AARCH64/$DOCSPATH/snowflake"[% END %] mv_tbdir tor/pluggable_transports/README.SNOWFLAKE.md "$DOCSPATH/snowflake/README.md"
# Move the PTs to where TB expects them - mkdir -p "$TBDIR/$TORBINPATH" [% IF c("var/osx") %]"$TBDIR_AARCH64/$TORBINPATH"[% END %] + mkdir -p "$TBDIR/$TORBINPATH" [% IF c("var/macos") %]"$TBDIR_AARCH64/$TORBINPATH"[% END %] mv_tbdir tor/pluggable_transports "$TORBINPATH/PluggableTransports"
# Move tor and dependencies to where TB expects them @@ -111,7 +111,7 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b
for tbdir in "${TBDIRS[@]}" do - [% IF c("var/osx") -%] + [% IF c("var/macos") -%] tbdir="$tbdir/Contents/Resources" [% END -%] tar -C "$tbdir" -xf [% c('input_files_by_name/fonts') %] @@ -145,7 +145,7 @@ RBM_TB_EOF
tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.gz
-[% IF c("var/osx") -%] +[% IF c("var/macos") -%] # Use symlink in tmp dir to extract "Tor Browser.app" to "Tor Browser-aarch64.app" ff_aarch64=$(mktemp -d) ln -s "$TBDIR_AARCH64" "$ff_aarch64/[% c("var/Project_Name") %].app" @@ -161,13 +161,12 @@ tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.gz find . -exec [% c("touch") %] {} ; for tbdir in "${TBDIRS[@]}" do - find chrome/ | sort | zip -X -@ "$tbdir[% IF c('var/osx') %]/Contents/Resources[% END %]/browser/omni.ja" + find chrome/ | sort | zip -X -@ "$tbdir[% IF c('var/macos') %]/Contents/Resources[% END %]/browser/omni.ja" done popd rm -rf $TMP_MANUAL_PATH [% END -%]
- [% IF c("var/namecoin") %] # Extract Electrum-NMC tar -C "$TBDIR/TorBrowser" -xf [% c('input_files_by_name/electrum-nmc') %] @@ -182,13 +181,13 @@ tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.gz
[% IF c("var/linux"); SET bundledata_osname = 'linux'; - ELSIF c("var/osx"); + ELSIF c("var/macos"); SET bundledata_osname = 'mac'; ELSIF c("var/windows"); SET bundledata_osname = 'windows'; END; %]
-[% IF c("var/osx") %] +[% IF c("var/macos") %] # The Bundle-Data is designed for embedded data, so we need to modify # the structure when we want the data to be outside the app directory. # We also create an override.ini file to disable the profile migrator. @@ -222,7 +221,7 @@ do cp -a Bundle-Data/Docs/* "$tbdir/$DOCSPATH" tar -C Bundle-Data/[% bundledata_osname %] \ [% IF ! c("var/namecoin") %]--exclude=*Electrum-NMC* --exclude=*ncprop279*[% END %] \ - -c . | tar -C "$tbdir[% IF ! c("var/osx") %]/[% c('var/ProjectName') %][% END %]" -x + -c . | tar -C "$tbdir[% IF ! c("var/macos") %]/[% c('var/ProjectName') %][% END %]" -x done
[% IF c("var/tor-browser") -%] @@ -262,7 +261,7 @@ PKG_DIR='[% c("var/project-name") %]'
for tbdir in "${TBDIRS[@]}" do - tbdir="$tbdir[% IF c('var/osx') %]/Contents/Resources[% END %]/browser/" + tbdir="$tbdir[% IF c('var/macos') %]/Contents/Resources[% END %]/browser/" pushd "$tbdir" unzip omni.ja defaults/preferences/[% c("var/prefs_file") %] || [ $? -lt 3 ] # Append our built extension-overrides.js to the preferences file @@ -285,7 +284,7 @@ done mv $distdir/windows-installer ${TB_STAGE_DIR} [% END %]
-[% IF c("var/osx") -%] +[% IF c("var/macos") -%] # unify.py requires lipo, so we need to add cctools in the PATH tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/macosx-toolchain') %] export PATH="/var/tmp/dist/macosx-toolchain/cctools/bin:$PATH" @@ -308,7 +307,7 @@ done
[% IF c("var/windows") %] TBDIR="$distdir/$PKG_DIR/[% c("var/Project_Name") %]/Browser" -[% ELSIF c("var/osx") %] +[% ELSIF c("var/macos") %] TBDIR="$distdir/$PKG_DIR/[% c("var/Project_Name") %].app" [% ELSE %] TBDIR="$distdir/$PKG_DIR/Browser" @@ -319,7 +318,7 @@ cat > "$scripts_dir/create-$PKG_DIR" << SCRIPT_EOF set -e cp -a ${TB_STAGE_DIR} $distdir/$PKG_DIR
-pushd "$TBDIR[% IF c("var/osx") %]/Contents/Resources/[% END %]" +pushd "$TBDIR[% IF c("var/macos") %]/Contents/Resources/[% END %]" rm -f precomplete python $MARTOOLS/createprecomplete.py popd @@ -340,7 +339,7 @@ cd $distdir tar_src => [ '$PKG_DIR' ], tar_args => '-cJf $OUTDIR/' _ c("var/project-name") _ '-' _ c("var/mar_osname") _ '-' _ c("var/torbrowser_version") _ '_${PKG_LOCALE}.tar.xz', }) %] -[% ELSIF c("var/osx") %] +[% ELSIF c("var/macos") %] [% c('var/ddmg', { dmg_src => '"$PKG_DIR"', dmg_out => '$OUTDIR/' _ c('var/ProjectName') _ '-' _ c("var/torbrowser_version") _ '-' _ c("var/mar_osname") _ '_${PKG_LOCALE}.dmg', diff --git a/projects/browser/config b/projects/browser/config index 6063c4c2..db68912a 100644 --- a/projects/browser/config +++ b/projects/browser/config @@ -26,7 +26,7 @@ targets: linux-x86_64: var: mar_osname: linux64 - osx: + macos: var: mar_osname: macos arch_deps: @@ -66,13 +66,13 @@ input_files: enable: '[% ! c("var/android") %]' - project: firefox name: firefox-aarch64 - enable: '[% c("var/osx") %]' + enable: '[% c("var/macos") %]' target_prepend: - - osx-aarch64 + - macos-aarch64 - project: firefox name: src-firefox pkg_type: src-tarballs - enable: '[% c("var/osx") %]' + enable: '[% c("var/macos") %]' - project: fenix name: fenix enable: '[% c("var/android") %]' @@ -81,9 +81,9 @@ input_files: enable: '[% c("var/tor-browser") %]' - project: tor-expert-bundle name: tor-expert-bundle-aarch64 - enable: '[% c("var/osx") && c("var/tor-browser") %]' + enable: '[% c("var/macos") && c("var/tor-browser") %]' target_prepend: - - osx-aarch64 + - macos-aarch64 - project: fonts name: fonts enable: '[% ! c("var/android") %]' @@ -96,7 +96,7 @@ input_files: enable: '[% c("var/linux") %]' - project: libdmg-hfsplus name: libdmg - enable: '[% c("var/osx") %]' + enable: '[% c("var/macos") %]' - project: nsis name: nsis enable: '[% c("var/windows") %]' @@ -109,7 +109,7 @@ input_files: enable: '[% c("var/android") %]' - name: '[% c("var/compiler") %]' project: '[% c("var/compiler") %]' - enable: '[% c("var/android") || c("var/osx") %]' + enable: '[% c("var/android") || c("var/macos") %]' - name: electrum-nmc project: electrum-nmc enable: '[% c("var/namecoin") %]' diff --git a/projects/clang/build b/projects/clang/build index cab28013..718788e6 100644 --- a/projects/clang/build +++ b/projects/clang/build @@ -28,7 +28,7 @@ cd build cmake ../llvm -G "Unix Makefiles" \ -DCMAKE_INSTALL_PREFIX=$distdir \ -DCMAKE_BUILD_TYPE=Release \ - [% IF c("var/android") || c("var/osx") -%] + [% IF c("var/android") || c("var/macos") -%] -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \ [% END -%] [% IF c("var/rlbox") -%]-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly[% END %] \ diff --git a/projects/firefox/build b/projects/firefox/build index 724bd27b..9a0a92b9 100644 --- a/projects/firefox/build +++ b/projects/firefox/build @@ -41,7 +41,7 @@ export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bi # Copy it over. # https://searchfox.org/mozilla-central/source/build/build-clang/build-clang.p..., # include it directly in our clang - [% IF c("var/osx") -%] + [% IF c("var/macos") -%] rtdir=/var/tmp/dist/macosx-toolchain/clang/lib/clang/[% pc("clang", "version") %]/lib/wasi [% ELSIF c("var/windows") -%] rtdir=/var/tmp/dist/mingw-w64-clang/lib/clang/[% pc("clang", "version") %]/lib/wasi @@ -58,7 +58,7 @@ export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bi
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
-mkdir -p $distdir/[% IF ! c("var/osx") %]Browser[% END %] +mkdir -p $distdir/[% IF ! c("var/macos") %]Browser[% END %]
tar -xf $rootdir/[% c('input_files_by_name/translation-base-browser') %] transl_base_browser=$rootdir/translation-base-browser @@ -117,7 +117,7 @@ add_translation () {
[% FOREACH lang = c('var/locales') %] lang='[% tmpl(lang) %]' - [% IF c("var/osx") -%] + [% IF c("var/macos") -%] if [ "$lang" == "ja-JP-mac" ]; then lang="ja" fi @@ -164,7 +164,7 @@ export LANG=C.UTF-8 ./mach build stage-package [% END %]
-[% IF c("var/osx") %] +[% IF c("var/macos") %] cp -a obj-*/dist/firefox/* $distdir [% IF c("var/base-browser") -%] mv "$distdir/Firefox.app" "$distdir/[% c('var/Project_Name') %].app" @@ -216,7 +216,7 @@ cp -p config/createprecomplete.py $MARTOOLS/ cp -p tools/update-packaging/*.sh $MARTOOLS/ cp -p obj-*/dist/host/bin/mar $MARTOOLS/ cp -p obj-*/dist/host/bin/mbsdiff $MARTOOLS/ -[% IF c("var/linux") || c("var/osx") %] +[% IF c("var/linux") || c("var/macos") %] cp -p obj-*/dist/bin/signmar $MARTOOLS/ cp -p obj-*/dist/bin/certutil $MARTOOLS/ cp -p obj-*/dist/bin/modutil $MARTOOLS/ @@ -271,13 +271,13 @@ cd $distdir [% IF c("var/windows") || c("var/linux") %] [% c("var/rezip", { rezip_file => 'Browser/omni.ja' }) %] [% c("var/rezip", { rezip_file => 'Browser/browser/omni.ja' }) %] -[% ELSIF c("var/osx") %] +[% ELSIF c("var/macos") %] [% c("var/rezip", { rezip_file => '"' _ c("var/Project_Name") _ '.app/Contents/Resources/omni.ja"' }) %] [% c("var/rezip", { rezip_file => '"' _ c("var/Project_Name") _ '.app/Contents/Resources/browser/omni.ja"' }) %] [% END %]
[% -IF c("var/osx"); +IF c("var/macos"); SET browserdir='"' _ c("var/Project_Name") _ '.app/Contents"'; ELSE; SET browserdir='Browser'; diff --git a/projects/firefox/config b/projects/firefox/config index 75d06ca9..727d5d34 100644 --- a/projects/firefox/config +++ b/projects/firefox/config @@ -111,9 +111,9 @@ targets: # To support Wayland mode - libdrm-dev:i386
- osx: + macos: var: - martools_filename: 'mar-tools-mac-[% c("var/osx_arch") %].zip' + martools_filename: 'mar-tools-macos-[% c("var/macos_arch") %].zip' nightly_updates_osname: macos arch_deps: - python3 @@ -144,7 +144,7 @@ input_files: name: binutils enable: '[% c("var/linux") %]' - filename: fix-info-plist.py - enable: '[% c("var/osx") %]' + enable: '[% c("var/macos") %]' - filename: nsis-uninstall.patch enable: '[% c("var/windows") %]' - project: rust diff --git a/projects/firefox/list_toolchain_updates_checks b/projects/firefox/list_toolchain_updates_checks index 67f655cd..0548bd9f 100644 --- a/projects/firefox/list_toolchain_updates_checks +++ b/projects/firefox/list_toolchain_updates_checks @@ -5,7 +5,7 @@ SET toolchain_alias='linux64-rust'; ELSIF c("var/windows"); SET toolchain_alias='mingw32-rust'; - ELSIF c("var/osx"); + ELSIF c("var/macos"); SET toolchain_alias='linux64-rust-macos'; END; %] read -d '' p << 'EOF' || true @@ -58,7 +58,7 @@ check_update_needed nasm "$needed" "$current" SET toolchain_alias='linux64-clang'; ELSIF c("var/windows"); SET toolchain_alias='linux64-clang-mingw-x64'; - ELSIF c("var/osx"); + ELSIF c("var/macos"); SET toolchain_alias='macosx64-clang'; END; %] read -d '' p << 'EOF' || true @@ -142,7 +142,7 @@ current="3.5+" # 3.6.0 check_update_needed python "$needed" "$current"
-[% IF c("var/osx") %] +[% IF c("var/macos") %] # macosx-sdk read -d '' p << 'EOF' || true my $d = YAML::XS::LoadFile('taskcluster/ci/build/macosx.yml'); diff --git a/projects/firefox/mozconfig b/projects/firefox/mozconfig index d7efd37d..631f88d9 100755 --- a/projects/firefox/mozconfig +++ b/projects/firefox/mozconfig @@ -1,4 +1,4 @@ -. $topsrcdir/mozconfig-[% IF c("var/osx"); GET 'macos-x86_64'; ELSE; GET c("var/osname"); END; %][% IF c("var/asan") %]-asan[% END %] +. $topsrcdir/mozconfig-[% IF c("var/macos"); GET 'macos-x86_64'; ELSE; GET c("var/osname"); END; %][% IF c("var/asan") %]-asan[% END %]
[% IF c("var/linux") -%] # We want to build with clang now and point to the GCC toolchain until #29041 is @@ -29,7 +29,7 @@ BINDGEN_CFLAGS="-I$clang_path/[% c('arch') %]-w64-mingw32/include/c++/v1 -I$clang_path/[% c('arch') %]-w64-mingw32/include" [% END -%]
-[% IF c("var/osx") -%] +[% IF c("var/macos") -%] TOOLCHAIN_DIR=/var/tmp/dist/macosx-toolchain
# ld needs libLTO.so from llvm @@ -56,7 +56,7 @@ ac_add_options --target=[% c('var/build_target') %] export MACOS_SDK_DIR=$CROSS_SYSROOT export MACOS_PRIVATE_FRAMEWORKS_DIR=$CROSS_PRIVATE_FRAMEWORKS - [% IF c("var/osx-aarch64") -%] + [% IF c("var/macos-aarch64") -%] # As of Clang 13, the default is -mcpu=apple-m1 when using a aarch64-apple-macos target, # but we're using apple64-apple-darwin, which defaults to -mcpu=apple-a7, which disables # a bunch of # performance-enabling CPU features. diff --git a/projects/fonts/build b/projects/fonts/build index 3734d72d..dc04387f 100644 --- a/projects/fonts/build +++ b/projects/fonts/build @@ -14,7 +14,7 @@ mv noto-fonts-* noto-fonts GET 'cp noto-fonts/' _ fontfile _ ' $distdir/' _ "\n"; END; %] [% END %] -[% IF c("var/osx") %] +[% IF c("var/macos") %] [% FOREACH fontfile = c("var/noto_fonts_mac"); GET 'cp noto-fonts/' _ fontfile _ ' $distdir/' _ "\n"; END; %] @@ -25,7 +25,7 @@ mv noto-fonts-* noto-fonts END; %] [% END %]
-[% IF c("var/linux") || c("var/osx") %] +[% IF c("var/linux") || c("var/macos") %] unzip -o 2.0.0.zip -d STIX cp "STIX/stixfonts-2.0.0/archive/STIXv1.1.1/Fonts/STIX-Word/STIXMath-Regular.otf" $distdir/ [% END %] diff --git a/projects/fonts/config b/projects/fonts/config index 0ae75cd7..bf38f780 100644 --- a/projects/fonts/config +++ b/projects/fonts/config @@ -179,4 +179,4 @@ input_files: enable: '[% c("var/linux") %]' - URL: https://github.com/stipub/stixfonts/archive/2.0.0.zip sha256sum: 4327a16797dabebedce28a9075671730e22c7f74831b24b1fb91e27faec5a235 - enable: '[% c("var/linux") || c("var/osx") %]' + enable: '[% c("var/linux") || c("var/macos") %]' diff --git a/projects/go/build b/projects/go/build index 5371f504..0018c7b4 100644 --- a/projects/go/build +++ b/projects/go/build @@ -40,7 +40,7 @@ export GOROOT="$distdir" cd /var/tmp/dist/go/src [% IF c("var/linux") -%] ./make.bash -[% ELSIF c("var/osx") -%] +[% ELSIF c("var/macos") -%] unset LDFLAGS rm -Rf $clangdir/helpers export CC="$clangdir/bin/clang [% c("var/FLAGS") %]" diff --git a/projects/go/config b/projects/go/config index a61bcff3..a9e34890 100644 --- a/projects/go/config +++ b/projects/go/config @@ -80,13 +80,13 @@ targets: windows-x86_64: var: GOARCH: amd64 - osx-x86_64: + macos-x86_64: var: GOARCH: amd64 - osx-aarch64: + macos-aarch64: var: GOARCH: arm64 - osx: + macos: var: GOOS: darwin linux: diff --git a/projects/libevent/build b/projects/libevent/build index ea8cd38c..60c2caab 100644 --- a/projects/libevent/build +++ b/projects/libevent/build @@ -10,7 +10,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %] [% END -%] ./autogen.sh ./configure [% c("var/configure_opt") %] --disable-libevent-regress --disable-samples --disable-openssl --prefix=$distdir -[% IF c("var/osx") -%] +[% 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') %]" [% END -%] diff --git a/projects/libevent/config b/projects/libevent/config index 7c4bc987..dc7e8c05 100644 --- a/projects/libevent/config +++ b/projects/libevent/config @@ -12,7 +12,7 @@ var: configure_opt_project: --disable-static
targets: - osx: + macos: var: arch_deps: - faketime diff --git a/projects/macosx-toolchain/build b/projects/macosx-toolchain/build index e1c546e9..162305ee 100644 --- a/projects/macosx-toolchain/build +++ b/projects/macosx-toolchain/build @@ -11,7 +11,7 @@ tar -C $distdir -xf [% c('input_files_by_name/SDK') %] tar -C $distdir -xf [% c('input_files_by_name/cctools') %] tar -C $builddir -xf [% c('input_files_by_name/llvm-project') %]
-arch=[% c("var/osx_arch") %] +arch=[% c("var/macos_arch") %] clangdir=$distdir/clang/bin cctoolsdir=$distdir/cctools/bin sysrootdir=$distdir/MacOSX[% c("version") %].sdk/ @@ -21,7 +21,7 @@ target=[% c("var/build_target") %] export PATH="/var/tmp/dist/ninja:/var/tmp/dist/cmake/bin:$cctoolsdir:$PATH" export MACOSX_DEPLOYMENT_TARGET=[% c("var/macosx_deployment_target") %]
-[% IF c("var/osx-aarch64") -%] +[% IF c("var/macos-aarch64") -%] # wrapper taken from: # tor-browser.git/taskcluster/scripts/misc/build-llvm-common.sh clangwrappersdir=$distdir/clang/wrappers diff --git a/projects/node/config b/projects/node/config index e771abc1..2c050c99 100644 --- a/projects/node/config +++ b/projects/node/config @@ -12,7 +12,7 @@ targets: var: arch_deps: - python2 - osx: + macos: var: arch_deps: - python2 diff --git a/projects/openssl/build b/projects/openssl/build index d3c7dedb..2cfa54de 100644 --- a/projects/openssl/build +++ b/projects/openssl/build @@ -9,7 +9,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %] export CC='gcc -m32' [% END %] # OpenSSL prepends the host triple to $CC -[% IF c("var/osx") -%] +[% IF c("var/macos") -%] # Tricking OpenSSL into using our clang as cross-compiler ln -s $clangdir/bin/clang $clangdir/bin/[% c("var/build_target") %]-cc export CC="cc [% c("var/FLAGS") %]" diff --git a/projects/openssl/config b/projects/openssl/config index c7aae883..9769ecdd 100644 --- a/projects/openssl/config +++ b/projects/openssl/config @@ -19,9 +19,9 @@ targets: flag_mwindows: '' configure_opts: '-shared --cross-compile-prefix=[% c("arch") %]-w64-mingw32- mingw[% IF c("var/windows-x86_64") %]64[% END %] "[% c("var/CFLAGS") %] [% c("var/LDFLAGS") %]"' openssldir: 'Program Files[% IF c("var/windows-i686") %] (x86)[% END %]/OpenSSL' - osx: + macos: var: - configure_opts: '--cross-compile-prefix=[% c("var/build_target") %]- darwin64-[% c("var/osx_arch") %]-cc enable-ec_nistp_64_gcc_128' + configure_opts: '--cross-compile-prefix=[% c("var/build_target") %]- darwin64-[% c("var/macos_arch") %]-cc enable-ec_nistp_64_gcc_128' android: var: configure_opts: 'CC=[% c("var/CC") %] android-[% c("var/toolchain_arch") %] -no-shared -D__ANDROID_API__=[% c("var/android_min_api") %]' diff --git a/projects/rust/build b/projects/rust/build index 783087c4..a892918e 100644 --- a/projects/rust/build +++ b/projects/rust/build @@ -27,7 +27,7 @@ export PATH="$distdir-rust-prebuilt/bin:$PATH" export RUSTFLAGS="-L/var/tmp/dist/gcc/lib64" [% END -%]
-[% IF c("var/osx") %] +[% IF c("var/macos") %] # We need to clear `CC` and `LDFLAGS` as they are used for the host platform # (i.e. Linux). unset CC @@ -40,7 +40,7 @@ export PATH="$distdir-rust-prebuilt/bin:$PATH" cat > $distdir/helper/[% c("var/build_target") %]-clang << 'EOF' #!/bin/sh BASEDIR=/var/tmp/dist/macosx-toolchain -$BASEDIR/cctools/bin/[% c("var/build_target") %]-clang -target [% c("var/build_target") %] -B $BASEDIR/cctools/bin -isysroot $sysrootdir -Wl,-syslibroot,$sysrootdir -Wl,-dead_strip -Wl,-pie [% IF c('var/osx-aarch64') %]-mcpu=apple-m1[% END %] "$@" +$BASEDIR/cctools/bin/[% c("var/build_target") %]-clang -target [% c("var/build_target") %] -B $BASEDIR/cctools/bin -isysroot $sysrootdir -Wl,-syslibroot,$sysrootdir -Wl,-dead_strip -Wl,-pie [% IF c('var/macos-aarch64') %]-mcpu=apple-m1[% END %] "$@" EOF
chmod +x $distdir/helper/[% c("var/build_target") %]-clang diff --git a/projects/rust/config b/projects/rust/config index f5f5f1ed..b20549fc 100644 --- a/projects/rust/config +++ b/projects/rust/config @@ -56,7 +56,7 @@ targets: # binaries do. configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --llvm-root=/var/tmp/dist/clang --set rust.jemalloc --target=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu --set target.x86_64-unknown-linux-gnu.linker=clang --set target.x86_64-unknown-linux-gnu.ar=llvm-ar --set target.x86_64-unknown-linux-gnu.ranlib=llvm-ranlib --set target.i686-unknown-linux-gnu.linker=clang --set target.i686-unknown-linux-gnu.ar=llvm-ar --set target. [...]
- osx: + macos: var: arch_deps: - libssl-dev diff --git a/projects/tor/build b/projects/tor/build index 8c118023..6b92fb89 100644 --- a/projects/tor/build +++ b/projects/tor/build @@ -54,7 +54,7 @@ openssldir=/var/tmp/dist/openssl/openssl export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TORBINDIR" [% END %]
-[% IF c("var/osx") %] +[% IF c("var/macos") %] cp $libeventdir/lib/libevent-*.dylib "$TORBINDIR" [% END %]
@@ -70,23 +70,23 @@ find -type f -print0 | xargs -0 [% c("touch") %] ./configure --disable-asciidoc --with-libevent-dir="$libeventdir" --with-openssl-dir="$openssldir" \ [% IF c("var/asan") %]--enable-fragile-hardening[% END %] \ [% IF c("var/windows") || c("var/android") %]--with-zlib-dir="$zlibdir"[% END %] \ - [% IF c("var/osx") %]--enable-static-openssl[% END %] \ + [% IF c("var/macos") %]--enable-static-openssl[% END %] \ [% IF c("var/windows") %]--enable-static-libevent --enable-static-openssl --enable-static-zlib[% END %] \ --prefix="$distdir" [% c("var/configure_opt") %] -[% IF c("var/osx") -%] +[% 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') %]" [% END -%] make -j[% c("num_procs") %] make install -[% IF c("var/osx") -%] +[% IF c("var/macos") -%] unset LD_PRELOAD [% END -%]
cp $distdir/share/tor/geoip "$TORDATADIR" cp $distdir/share/tor/geoip6 "$TORDATADIR"
-[% IF c("var/osx") %] +[% IF c("var/macos") %] LIBEVENT_FILE=`basename $libeventdir/lib/libevent-*.dylib` cd $distdir cp bin/tor "$TORBINDIR" diff --git a/projects/tor/config b/projects/tor/config index 00d98325..fffb3e1c 100644 --- a/projects/tor/config +++ b/projects/tor/config @@ -37,7 +37,7 @@ targets: - libtool - zlib1g-dev - hardening-wrapper - osx: + macos: var: arch_deps: - faketime diff --git a/rbm.conf b/rbm.conf index c4dd832d..fff2fd68 100644 --- a/rbm.conf +++ b/rbm.conf @@ -500,40 +500,40 @@ targets: - unzip
torbrowser-macos: - - osx-x86_64 - - osx + - macos-x86_64 + - macos - torbrowser basebrowser-macos: - - osx-x86_64 - - osx + - macos-x86_64 + - macos - basebrowser - osx-aarch64: + macos-aarch64: arch: aarch64 var: - osx-aarch64: 1 - osx-x86_64: 0 - osname: osx-aarch64 - osx_arch: arm64 + macos-aarch64: 1 + macos-x86_64: 0 + osname: macos-aarch64 + macos_arch: arm64 build_target: aarch64-apple-darwin macosx_deployment_target: '11.0' - osx-x86_64: + macos-x86_64: arch: x86_64 var: - osx-x86_64: 1 - osname: osx-x86_64 - osx_arch: x86_64 + macos-x86_64: 1 + osname: macos-x86_64 + macos_arch: x86_64 build_target: x86_64-apple-darwin macosx_deployment_target: '10.12' - osx: + macos: var: - osx: 1 + macos: 1 osname: macos container: suite: bullseye arch: amd64 compiler: 'macosx-toolchain' configure_opt: '--host=[% c("var/build_target") %] CC="[% c("var/build_target") %]-clang [% c("var/FLAGS") %]" CXX="[% c("var/build_target") %]-clang++ [% c("var/FLAGS") %]" [% c("var/configure_opt_project") %]' - FLAGS: "-target [% c('var/build_target') %] -B $cctoolsdir -isysroot $sysrootdir [% IF c('var/osx-aarch64') %]-mcpu=apple-m1[% END %]" + FLAGS: "-target [% c('var/build_target') %] -B $cctoolsdir -isysroot $sysrootdir [% IF c('var/macos-aarch64') %]-mcpu=apple-m1[% END %]" LDFLAGS: "-Wl,-syslibroot,$sysrootdir -Wl,-dead_strip -Wl,-pie" locale_ja: ja-JP-mac rlbox: 0
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch main in repository builders/tor-browser-build.
commit 0553b695c83b9a61abca6ff3b7b42507993f265b Author: Nicolas Vigier boklm@torproject.org AuthorDate: Fri Oct 28 20:36:47 2022 +0200
Bug 40439: Add option for macos single-arch non-universal testbuild
`make torbrowser-testbuild-macos-x86_64` and `make torbrowser-testbuild-macos-aarch64` can be used to do non-universal testbuilds for a single arch. --- Makefile | 6 ++++++ doc/MAKEFILE.txt | 13 +++++++++++++ projects/browser/build | 24 ++++++++++++++---------- projects/browser/config | 14 +++++++++++--- projects/release/build | 6 ++++++ projects/release/config | 22 ++++++++++++++++++++++ rbm.conf | 13 +++++++++++++ 7 files changed, 85 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile index fa5220ed..6be00da3 100644 --- a/Makefile +++ b/Makefile @@ -171,6 +171,12 @@ torbrowser-testbuild-windows-i686: submodule-update torbrowser-testbuild-macos: submodule-update $(rbm) build release --target testbuild --target browser-macos --target torbrowser
+torbrowser-testbuild-macos-x86_64: submodule-update + $(rbm) build release --target testbuild --target browser-macos-x86_64 --target torbrowser + +torbrowser-testbuild-macos-aarch64: submodule-update + $(rbm) build release --target testbuild --target browser-macos-aarch64 --target torbrowser + torbrowser-testbuild-src: submodule-update $(rbm) build release --target testbuild --target browser-src-testbuild --target torbrowser
diff --git a/doc/MAKEFILE.txt b/doc/MAKEFILE.txt index 0eec68ff..21704936 100644 --- a/doc/MAKEFILE.txt +++ b/doc/MAKEFILE.txt @@ -49,6 +49,19 @@ By default it is based on the alpha channel, but you can change that by editing rbm.local.conf. The resulting build can be found in directory testbuild.
+torbrowser-testbuild-{linux-x86_64,linux-i686,windows-i686,macos, + android-armv7,android-x86,android-x86_64, + android-aarch64,desktop,android} +----------------------------------------------------------------- +Same as torbrowser-testbuild, for the selected platform only. + + +torbrowser-testbuild-macos-{x86_64,aarch64} +------------------------------------------- +By default, macos builds are universal (targeting x86_64 and aarch64). +With this special testbuild target, you can do a build for a specific +arch only. + torbrowser-{release,alpha,nightly,testbuild}-linux-x86_64-asan -------------------------------------------------------------- Create a build for Linux x86_64 with Address Sanitizer enabled. diff --git a/projects/browser/build b/projects/browser/build index 34be146a..8cbbc20d 100644 --- a/projects/browser/build +++ b/projects/browser/build @@ -21,8 +21,12 @@ touch "$GENERATEDPREFSPATH"
[% IF c("var/macos") %] TBDIR="$TB_STAGE_DIR/[% c("var/Project_Name") %].app" - TBDIR_AARCH64="$TB_STAGE_DIR/[% c("var/Project_Name") %]-aarch64.app" - TBDIRS=("$TBDIR" "$TBDIR_AARCH64") + [% IF c("var/macos_universal") %] + TBDIR_AARCH64="$TB_STAGE_DIR/[% c("var/Project_Name") %]-aarch64.app" + TBDIRS=("$TBDIR" "$TBDIR_AARCH64") + [% ELSE -%] + TBDIRS=("$TBDIR") + [% END -%]
DOCSPATH=Contents/Resources/[% c('var/ProjectName') %]/Docs EXTSPATH=Contents/Resources/distribution/extensions @@ -60,7 +64,7 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b local dest="${args[-1]}" unset args[-1] mv ${args[@]} "$TBDIR/$dest" - [% IF c("var/macos") -%] + [% IF c("var/macos_universal") -%] for src in ${args[@]} do mv "aarch64/$src" "$TBDIR_AARCH64/$dest" @@ -69,27 +73,27 @@ mv [% c('input_files_by_name/noscript') %] "$TBDIR/$EXTSPATH/{73a6fe31-595d-460b }
tar -xvf [% c('input_files_by_name/tor-expert-bundle') %] - [% IF c("var/macos") -%] + [% IF c("var/macos_universal") -%] mkdir aarch64 tar -C aarch64 -xf [% c('input_files_by_name/tor-expert-bundle-aarch64') %] [% END -%]
# geoip(6) and anything else that belongs in the data dir from the expert bundle - mkdir -p "$TBDIR/$TORCONFIGPATH" [% IF c("var/macos") %]"$TBDIR_AARCH64/$TORCONFIGPATH"[% END %] + mkdir -p "$TBDIR/$TORCONFIGPATH" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$TORCONFIGPATH"[% END %] mv_tbdir data/{geoip,geoip6} "$TORCONFIGPATH"
# Bridge lists will be consumed later in `bridges_conf` mv tor/pluggable_transports/bridges_list.*.txt $rootdir - [% IF c("var/macos") %] + [% IF c("var/macos_universal") %] rm -f aarch64/tor/pluggable_transports/bridges_list.*.txt [% END -%]
# Snowflake's README is the only documentation shipped in tor-expert-bundle - mkdir -p "$TBDIR/$DOCSPATH/snowflake" [% IF c("var/macos") %]"$TBDIR_AARCH64/$DOCSPATH/snowflake"[% END %] + mkdir -p "$TBDIR/$DOCSPATH/snowflake" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$DOCSPATH/snowflake"[% END %] mv_tbdir tor/pluggable_transports/README.SNOWFLAKE.md "$DOCSPATH/snowflake/README.md"
# Move the PTs to where TB expects them - mkdir -p "$TBDIR/$TORBINPATH" [% IF c("var/macos") %]"$TBDIR_AARCH64/$TORBINPATH"[% END %] + mkdir -p "$TBDIR/$TORBINPATH" [% IF c("var/macos_universal") %]"$TBDIR_AARCH64/$TORBINPATH"[% END %] mv_tbdir tor/pluggable_transports "$TORBINPATH/PluggableTransports"
# Move tor and dependencies to where TB expects them @@ -145,7 +149,7 @@ RBM_TB_EOF
tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.gz
-[% IF c("var/macos") -%] +[% IF c("var/macos_universal") -%] # Use symlink in tmp dir to extract "Tor Browser.app" to "Tor Browser-aarch64.app" ff_aarch64=$(mktemp -d) ln -s "$TBDIR_AARCH64" "$ff_aarch64/[% c("var/Project_Name") %].app" @@ -284,7 +288,7 @@ done mv $distdir/windows-installer ${TB_STAGE_DIR} [% END %]
-[% IF c("var/macos") -%] +[% IF c("var/macos_universal") -%] # unify.py requires lipo, so we need to add cctools in the PATH tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/macosx-toolchain') %] export PATH="/var/tmp/dist/macosx-toolchain/cctools/bin:$PATH" diff --git a/projects/browser/config b/projects/browser/config index db68912a..f9d9cba5 100644 --- a/projects/browser/config +++ b/projects/browser/config @@ -28,7 +28,6 @@ targets: mar_osname: linux64 macos: var: - mar_osname: macos arch_deps: - genisoimage - faketime @@ -36,6 +35,15 @@ targets: - python3-pip - python3-distutils-extra - python3-psutil + macos-universal: + var: + mar_osname: macos + macos-aarch64: + var: + mar_osname: macos-aarch64 + macos-x86_64: + var: + mar_osname: macos-x86_64 windows: var: arch_deps: @@ -66,7 +74,7 @@ input_files: enable: '[% ! c("var/android") %]' - project: firefox name: firefox-aarch64 - enable: '[% c("var/macos") %]' + enable: '[% c("var/macos_universal") %]' target_prepend: - macos-aarch64 - project: firefox @@ -81,7 +89,7 @@ input_files: enable: '[% c("var/tor-browser") %]' - project: tor-expert-bundle name: tor-expert-bundle-aarch64 - enable: '[% c("var/macos") && c("var/tor-browser") %]' + enable: '[% c("var/macos_universal") && c("var/tor-browser") %]' target_prepend: - macos-aarch64 - project: fonts diff --git a/projects/release/build b/projects/release/build index 84d09b05..1a95362a 100644 --- a/projects/release/build +++ b/projects/release/build @@ -25,6 +25,12 @@ mkdir -p "$destdir" [% IF c("var/browser-macos") -%] mv [% c('input_files_by_name/macos') %]/* "$destdir"/ [% END -%] +[% IF c("var/browser-macos-x86_64") -%] + mv [% c('input_files_by_name/macos-x86_64') %]/* "$destdir"/ +[% END -%] +[% IF c("var/browser-macos-aarch64") -%] + mv [% c('input_files_by_name/macos-aarch64') %]/* "$destdir"/ +[% END -%] [% IF c("var/browser-linux-i686") -%] mv [% c('input_files_by_name/linux-i686') %]/* "$destdir"/ [% END -%] diff --git a/projects/release/config b/projects/release/config index cd1c7d74..fb49e0d8 100644 --- a/projects/release/config +++ b/projects/release/config @@ -63,6 +63,12 @@ targets: browser-macos: var: browser-macos: 1 + browser-macos-x86_64: + var: + browser-macos-x86_64: 1 + browser-macos-aarch64: + var: + browser-macos-aarch64: 1 browser-src: var: browser-src: '[% ! c("var/testbuild") %]' @@ -192,6 +198,22 @@ input_files: - '[% c("var/build_target") %]' - '[% c("var/browser_type") %]-macos'
+ # non-universal macos build + - name: macos-x86_64 + project: browser + enable: '[% c("var/browser-macos-x86_64") %]' + target: + - '[% c("var/build_target") %]' + - '[% c("var/browser_type") %]-macos-x86_64' + + # non-universal macos build + - name: macos-aarch64 + project: browser + enable: '[% c("var/browser-macos-aarch64") %]' + target: + - '[% c("var/build_target") %]' + - '[% c("var/browser_type") %]-macos-aarch64' + - name: src-firefox project: firefox enable: '[% c("var/browser-src") %]' diff --git a/rbm.conf b/rbm.conf index fff2fd68..e1f8b867 100644 --- a/rbm.conf +++ b/rbm.conf @@ -500,13 +500,26 @@ targets: - unzip
torbrowser-macos: + - macos-universal - macos-x86_64 - macos - torbrowser + torbrowser-macos-x86_64: + - macos-x86_64 + - macos + - torbrowser + torbrowser-macos-aarch64: + - macos-aarch64 + - macos + - torbrowser basebrowser-macos: + - macos-universal - macos-x86_64 - macos - basebrowser + macos-universal: + var: + macos_universal: 1 macos-aarch64: arch: aarch64 var:
tbb-commits@lists.torproject.org