[tor-bugs] #22832 [Applications/Tor Browser]: libwebrtc and snowflake are not being built reproducibly (unless you build in the same month)

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jul 6 17:57:59 UTC 2017


#22832: libwebrtc and snowflake are not being built reproducibly (unless you build
in the same month)
--------------------------------------+--------------------------
 Reporter:  gk                        |          Owner:  dcf
     Type:  defect                    |         Status:  assigned
 Priority:  Very High                 |      Milestone:
Component:  Applications/Tor Browser  |        Version:
 Severity:  Major                     |     Resolution:
 Keywords:  tbb-gitian                |  Actual Points:
Parent ID:                            |         Points:
 Reviewer:                            |        Sponsor:
--------------------------------------+--------------------------

Comment (by dcf):

 Replying to [comment:3 dcf]:
 > Let me know if that commit works for you (feel free to edit as
 necessary). If we want to set `override_build_date` as well (even though
 it seems unnecessary it might be a good idea for future insurance), this
 seems to be the expected format (taken from
 build/write_build_date_header.py). I haven't tested it, but I'm starting a
 build to do so now.
 > {{{
 > GN_ARGS+=" override_build_date=\"$(date --utc
 --date="$REFERENCE_DATETIME" +"%b %d %Y %H:%M:%S")\""
 > }}}

 I just tested, and setting `override_build_date` doesn't work. It results
 in this message in build.log:
 {{{
 + /home/debian/build/webrtc/src/out_bootstrap/gn gen out/Release '--args=
 target_os="linux" target_cpu="x64" override_build_date="Jan 01 2000
 00:00:00" is_debug=false treat_warnings_as_errors=false
 is_component_build=false is_clang=false use_sysroot=false
 gold_path="/home/debian/install/binutils/bin" use_ozone=true
 use_gconf=false rtc_include_opus=false rtc_include_ilbc=false
 rtc_include_internal_audio_device=false rtc_include_pulse_audio=false'
 ERROR at the command-line "--args":1:57: Build argument has no effect.
  target_os="linux" target_cpu="x64" override_build_date="Jan 01 2000
 00:00:00" is_debug=false treat_warnings_as_errors=false
 is_component_build=false is_clang=false use_sysroot=false
 gold_path="/home/debian/install/binutils/bin" use_ozone=true
 use_gconf=false rtc_include_opus=false rtc_include_ilbc=false
 rtc_include_internal_audio_device=false rtc_include_pulse_audio=false
 ^---------------------
 The variable "override_build_date" was set as a build argument
 but never appeared in a declare_args() block in any buildfile.

 To view all possible args, run "gn args --list <builddir>"
 Done. Made 418 targets from 113 files in 438ms
 }}}

 Applying the patch from comment:3 still works to fix the embedded date
 issue.

 What's going on is that base/build_time.o is only being built as a side
 effect of bootstrap/bootstrap.py, which builds gn, a build helper program.
 Formerly, we were linking more .o files into libwebrtc-magic.a than we
 needed, including the base/build_time.o that was part of gn, not part of
 webrtc. The reason I noticed this while working on the mac descriptor, was
 that because of cross compiling, some .o files (including those belonging
 to gn) were compiled for the host architecture (i.e. linux) and some
 (those belonging to webrtc) were compiled for the target architecture
 (i.e. mac). Linking them all together into one archive produced a non-
 working .a file, which is when I realized that we were including too many
 .o files.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22832#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list