22 次代碼提交 b4a6ea02be ... d54e4b7011

作者 SHA1 備註 提交日期
  Jeremy Rand d54e4b7011 Bug 32355: gcc: Update outdated comment about glibc version 1 年之前
  Jeremy Rand aa20bacad9 Bug 32355: gcc: Use new RBM num_procs for linux-cross 1 年之前
  Jeremy Rand e25b395d55 Bug 32355: gcc: Fix distdir typo 1 年之前
  Jeremy Rand 6bf47c216b Bug 32355: binutils: Remove disabled linux-cross build code 1 年之前
  Jeremy Rand 4e28c74b7d Bug 32355: gcc: Add osname to output filename 2 年之前
  JeremyRand 0d5324ea9a Bug 32355: openssl: Add linux-arm target 5 年之前
  Jeremy Rand 6abaf4da63 Bug 32355: gcc: Add linux-arm target 2 年之前
  JeremyRand aa29b74b2f Bug 32355: binutils: Add linux-cross target 5 年之前
  Jeremy Rand b4a6ea02be Bug 32355: gcc: Update outdated comment about glibc version 1 年之前
  Jeremy Rand fa87432e62 Bug 32355: gcc: Use new RBM num_procs for linux-cross 1 年之前
  Jeremy Rand bcfb80b088 Bug 32355: gcc: Fix distdir typo 1 年之前
  Jeremy Rand 26c1aef999 Bug 32355: binutils: Remove disabled linux-cross build code 1 年之前
  Nicolas Vigier 08adc57a1b Bug 40808: Set update URL for nightly base-browser 1 年之前
  Nicolas Vigier e877069ee2 Bug 40809: Remove browser-update options from projects/firefox/mozconfig 1 年之前
  Pier Angelo Vendrame 1dbed39ac1 Bug 40806: Update the macOS mozconfig name 1 年之前
  Pier Angelo Vendrame 8acfc49af9 Bug 40805: Use the version flag for all our browsers 1 年之前
  Pier Angelo Vendrame fffda1fdc3 Bug 40801: Correct the ExecShell open path on the Windows system-wide installer 1 年之前
  Jeremy Rand 71a23268e4 Bug 32355: gcc: Add osname to output filename 2 年之前
  JeremyRand 66cd3cda0f Bug 32355: openssl: Add linux-arm target 5 年之前
  Jeremy Rand fbfbda1392 Bug 32355: gcc: Add linux-arm target 2 年之前
  JeremyRand 57460e0da9 Bug 32355: binutils: Add linux-cross target 5 年之前
  Pier Angelo Vendrame 760540587b Bug 40750: Solve rlbox reproducibility problems 1 年之前

+ 5 - 2
projects/browser/windows-installer.nsi

@@ -240,6 +240,9 @@ ${EndIf}
 FunctionEnd
 
 Function StartBrowser
-ExecShell "open" "$INSTDIR/Start [% c('var/Project_Name') %].lnk"
+[% IF !system_install_mode -%]
+  ExecShell "open" "$INSTDIR/Start [% c('var/Project_Name') %].lnk"
+[% ELSE -%]
+  ExecShell "open" "$INSTDIR/[% c('var/exe_name') %].exe"
+[% END -%]
 FunctionEnd
-

+ 3 - 3
projects/firefox/build

@@ -92,9 +92,9 @@ fi
   popd
 [% END %]
 
-[% IF c("var/nightly") && c("var/tor-browser") -%]
+[% IF c("var/nightly") && ! c("var/privacy-browser") -%]
   # Set update url for nightly (#33402 / #40033)
-  sed -i 's|^URL=https://aus1\.torproject\.org/.*|URL=https://nightlies.tbb.torproject.org/nightly-updates/updates/nightly-[% c("var/nightly_updates_osname") %]/%CHANNEL%/%BUILD_TARGET%/%VERSION%/ALL|' build/application.ini.in
+  sed -i 's|^URL=https://aus1\.torproject\.org/.*|URL=https://nightlies.tbb.torproject.org/nightly-updates/updates/nightly-[% c("var/nightly_updates_publish_dir") %]/%CHANNEL%/%BUILD_TARGET%/%VERSION%/ALL|' build/application.ini.in
 [% END -%]
 
 
@@ -168,8 +168,8 @@ export LANG=C.UTF-8
 
 ./mach configure \
   --with-distribution-id=org.torproject \
+  --with-base-browser-version=[% c("var/torbrowser_version") %] \
   [% IF c("var/tor-browser") -%]
-        --with-tor-browser-version=[% c("var/torbrowser_version") %] \
         --enable-update-channel=[% c("var/channel") %] \
   [% END %] \
   [% IF !c("var/base-browser") -%]--with-branding=browser/branding/[% c("var/branding_directory_prefix") %]-[% c("var/channel") %][% END %] \

+ 4 - 2
projects/firefox/config

@@ -18,7 +18,7 @@ var:
   browser_build: 3
   branding_directory_prefix: 'tb'
   copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
-  nightly_updates_osname: '[% c("var/osname") %]'
+  nightly_updates_publish_dir: '[% c("var/nightly_updates_publish_dir_prefix") %][% c("var/osname") %]'
   gitlab_project: https://gitlab.torproject.org/tpo/applications/tor-browser
   git_commit: '[% exec("git rev-parse HEAD") %]'
   deps:
@@ -68,6 +68,8 @@ targets:
   basebrowser:
     # basebrowser tag always has a -build1 suffix
     git_hash: '[% c("var/project-name") %]-[% c("var/firefox_version") %]-[% c("var/browser_branch") %]-build1'
+    var:
+      nightly_updates_publish_dir_prefix: basebrowser-
 
   nightly:
     git_hash: '[% c("var/project-name") %]-[% c("var/firefox_version") %]-[% c("var/browser_branch") %]'
@@ -122,7 +124,7 @@ targets:
   macos:
     var:
       martools_filename: 'mar-tools-macos-[% c("var/macos_arch") %].zip'
-      nightly_updates_osname: macos
+      nightly_updates_publish_dir: '[% c("var/nightly_updates_publish_dir_prefix") %]macos'
       arch_deps:
         - python3
         - python3-distutils

+ 1 - 6
projects/firefox/mozconfig

@@ -1,4 +1,4 @@
-. $topsrcdir/mozconfig-[% IF c("var/macos"); GET 'macos-x86_64'; ELSE; GET c("var/osname"); END; %][% IF c("var/asan") %]-asan[% END %]
+. $topsrcdir/mozconfig-[% IF c("var/macos"); GET 'macos'; 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
@@ -66,11 +66,6 @@
   [% END -%]
 [% END -%]
 
-[% IF c("var/tor-browser") %]
-  ac_add_options --enable-tor-browser-update
-  ac_add_options --enable-verify-mar
-[% END -%]
-
 mk_add_options MOZ_PARALLEL_BUILD=[% c("num_procs") %]
 
 export MOZ_INCLUDE_SOURCE_INFO=1

+ 1 - 1
projects/geckoview/build

@@ -68,7 +68,7 @@ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
 # Create .mozbuild to avoid interactive prompt in configure
 mkdir "$HOME/.mozbuild"
 ./mach configure \
-    --with-tor-browser-version=[% c("var/torbrowser_version") %] \
+    --with-base-browser-version=[% c("var/torbrowser_version") %] \
     [% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %]
 
 ./mach build --verbose

+ 36 - 0
projects/wasi-sysroot/0001-Sort-the-object-list-passed-to-ar-in-the-Makefile.patch

@@ -0,0 +1,36 @@
+From ef21e4f17e104a34e7db89215db567cddd48832d Mon Sep 17 00:00:00 2001
+From: Pier Angelo Vendrame <pierov@torproject.org>
+Date: Wed, 1 Mar 2023 10:19:50 +0100
+Subject: [PATCH] Sort the object list passed to ar in the Makefile.
+
+This makes builds reproducible.
+---
+ Makefile | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c31e3d7..f350ecb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -488,13 +488,13 @@ $(SYSROOT_LIB)/libwasi-emulated-signal.a: $(LIBWASI_EMULATED_SIGNAL_OBJS) $(LIBW
+ %.a:
+ 	@mkdir -p "$(@D)"
+ 	# On Windows, the commandline for the ar invocation got too long, so it needs to be split up.
+-	$(AR) crs $@ $(wordlist 1, 199, $^)
+-	$(AR) crs $@ $(wordlist 200, 399, $^)
+-	$(AR) crs $@ $(wordlist 400, 599, $^)
+-	$(AR) crs $@ $(wordlist 600, 799, $^)
++	$(AR) crs $@ $(wordlist 1, 199, $(sort $^))
++	$(AR) crs $@ $(wordlist 200, 399, $(sort $^))
++	$(AR) crs $@ $(wordlist 400, 599, $(sort $^))
++	$(AR) crs $@ $(wordlist 600, 799, $(sort $^))
+ 	# This might eventually overflow again, but at least it'll do so in a loud way instead of
+ 	# silently dropping the tail.
+-	$(AR) crs $@ $(wordlist 800, 100000, $^)
++	$(AR) crs $@ $(wordlist 800, 100000, $(sort $^))
+ 
+ $(MUSL_PRINTSCAN_OBJS): CFLAGS += \
+ 	    -D__wasilibc_printscan_no_long_double \
+-- 
+2.39.2
+

+ 9 - 2
projects/wasi-sysroot/build

@@ -28,6 +28,9 @@ mv clang-source llvm-project
 export LLVM_HOME=$(pwd)/llvm-project
 tar -xf $rootdir/[% c('input_files_by_name/wasi-libc') %]
 mv wasi-libc-* wasi-libc
+pushd wasi-libc
+patch -p1 < "$rootdir/0001-Sort-the-object-list-passed-to-ar-in-the-Makefile.patch"
+popd
 popd
 
 # What follows has been copied from Firefox's
@@ -53,11 +56,14 @@ cat > 'version.sh' << EOF
 echo '[% c("abbrev") %]'
 EOF
 
-# Build wasi-libc, libc++ and libc++abi.
+# Build wasi-libc, and re-pack it, to make sure we get a deterministic output.
+make PREFIX=/wasi build/wasi-libc.BUILT
+
+# We need to compile compiler-rt before building libc++ and libc++abi, because
+# we need to inject it to Clang.
 make \
   LLVM_PROJ_DIR=$LLVM_HOME \
   PREFIX=/wasi \
-  build/wasi-libc.BUILT \
   build/compiler-rt.BUILT \
   NINJA_FLAGS='-j[% c("num_procs") %]'
 
@@ -66,6 +72,7 @@ rtdir="build/llvm/lib/clang/$(ls build/llvm/lib/clang)/lib/wasi"
 mkdir -p "$rtdir"
 cp build/compiler-rt/lib/wasi/libclang_rt.builtins-wasm32.a "$rtdir/"
 
+# Now we can finally build libc++ and libc++abi.
 make \
   LLVM_PROJ_DIR=$LLVM_HOME \
   PREFIX=/wasi \

+ 1 - 0
projects/wasi-sysroot/config

@@ -33,3 +33,4 @@ input_files:
     project: wasi-config
   - name: wasi-libc
     project: wasi-libc
+  - filename: '0001-Sort-the-object-list-passed-to-ar-in-the-Makefile.patch'

+ 1 - 1
rbm.conf

@@ -170,7 +170,7 @@ var:
     - zh-rCN
     - zh-rTW
 
-  rlbox: 0
+  rlbox: 1
 
   sign_build: '[% ENV.RBM_SIGN_BUILD %]'
   sign_build_gpg_opts: '[% ENV.RBM_GPG_OPTS %]'