[tor-commits] [tor-browser-build/master] Bug 32976: Build and bundle geckodriver

boklm at torproject.org boklm at torproject.org
Mon Jan 27 11:27:15 UTC 2020


commit f531a004aaa169d9a4a06a3b6d7c04c6fd812f9c
Author: Georg Koppen <gk at torproject.org>
Date:   Sun Jan 19 21:06:37 2020 +0000

    Bug 32976: Build and bundle geckodriver
    
    Geckodriver is not built by default in release builds. However, it's useful
    if we build it reproducibly so we can avoid trusting some binary downloaded
    from the Internet for our QA and Selenium related work.
    
    Only the 64bit Linux version is built and included as I doubt we'll need
    geckodriver on anything else for our purposes.
---
 projects/firefox/build                  | 9 +++++++++
 projects/firefox/mozconfig-linux-x86_64 | 4 +++-
 projects/tor-browser/build              | 1 +
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/projects/firefox/build b/projects/firefox/build
index b42b301..22c5b5d 100644
--- a/projects/firefox/build
+++ b/projects/firefox/build
@@ -151,6 +151,9 @@ rm -f js/src/configure
 [% END %]
 
 [% IF c("var/linux") %]
+  [% IF c("var/linux-x86_64") %]
+    cp obj-*/testing/geckodriver/x86_64-unknown-linux-gnu/release/geckodriver $distdir
+  [% END %]
   cp -a obj-*/dist/firefox/* $distdir/Browser/
   # Remove firefox-bin (we don't use it, see ticket #10126)
   rm -f $distdir/Browser/firefox-bin
@@ -213,6 +216,8 @@ cp -p obj-*/dist/host/bin/mbsdiff $MARTOOLS/
 cd $distdir
 
 [% IF c("var/linux-x86_64") %]
+  # No need for an unstripped geckodriver
+  strip geckodriver
   mkdir -p $distdir/Debug/Browser/gtk2
   # Strip and generate debuginfo for the firefox binary that we keep, all *.so
   # files, the plugin-container, and the updater (see ticket #10126)
@@ -258,6 +263,10 @@ END;
         tar_src => [ 'Debug' ],
         tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/tor-browser-debug.tar.xz',
     }) %]
+[% c('tar', {
+        tar_src => [ 'geckodriver' ],
+        tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename') _ '/geckodriver-linux64.tar.xz',
+    }) %]
 [% END %]
 
 [% c('zip', {
diff --git a/projects/firefox/mozconfig-linux-x86_64 b/projects/firefox/mozconfig-linux-x86_64
index 19d2885..59517cd 100755
--- a/projects/firefox/mozconfig-linux-x86_64
+++ b/projects/firefox/mozconfig-linux-x86_64
@@ -33,6 +33,8 @@ ac_add_options --disable-webrtc
 # Let's make sure no preference is enabling either Adobe's or Google's CDM.
 ac_add_options --disable-eme
 ac_add_options --enable-proxy-bypass-protection
+# We want to bundle an own geckodriver, so we can use it for QA and other work
+ac_add_options --enable-geckodriver
 
 # Disable telemetry
-ac_add_options MOZ_TELEMETRY_REPORTING=
\ No newline at end of file
+ac_add_options MOZ_TELEMETRY_REPORTING=
diff --git a/projects/tor-browser/build b/projects/tor-browser/build
index 2c72e03..4d44f12 100644
--- a/projects/tor-browser/build
+++ b/projects/tor-browser/build
@@ -292,6 +292,7 @@ SCRIPT_EOF
 cp $rootdir/[% c('input_files_by_name/firefox') %]/mar-tools-*.zip "$OUTDIR"/
 [% IF c("var/linux-x86_64") -%]
   cp $rootdir/[% c('input_files_by_name/firefox') %]/tor-browser-debug.tar.xz "$OUTDIR"/tor-browser-[% c("var/mar_osname") %]-debug.tar.xz
+  cp $rootdir/[% c('input_files_by_name/firefox') %]/geckodriver-linux64.tar.xz "$OUTDIR"/
 [% END -%]
 [% IF c("var/linux") -%]
   cp $rootdir/[% c('input_files_by_name/tor') %]/tor-debug.tar.xz "$OUTDIR"/tor-[% c("var/mar_osname") %]-debug.tar.xz





More information about the tor-commits mailing list