[tor-bugs] #31880 [Applications/Tor Browser]: Disabling EME per configure option does not work on mobile anymore

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Sep 30 16:31:22 UTC 2019


#31880: Disabling EME per configure option does not work on mobile anymore
-------------------------------------------------+-------------------------
 Reporter:  gk                                   |          Owner:  tbb-
                                                 |  team
     Type:  defect                               |         Status:  new
 Priority:  High                                 |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tbb-rbm, ff68-esr, tbb-9.0-must-     |  Actual Points:
  alpha, TorBrowserTeam201909                    |
Parent ID:  #30324                               |         Points:  0.5
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by sysrqb):

 Configuring `mobile/android/` with `--disable-eme` results in:

 {{{
 0:01.23 Traceback (most recent call last):
  0:01.23   File "/home/android/tor-browser/configure.py", line 132, in
 <module>
  0:01.23     sys.exit(main(sys.argv))
  0:01.23   File "/home/android/tor-browser/configure.py", line 38, in main
  0:01.23     sandbox.run(os.path.join(os.path.dirname(__file__),
 'moz.configure'))
  0:01.23   File "/home/android/tor-
 browser/python/mozbuild/mozbuild/configure/__init__.py", line 441, in run
  0:01.23     self._value_for(option)
  0:01.23   File "/home/android/tor-
 browser/python/mozbuild/mozbuild/configure/__init__.py", line 528, in
 _value_for
  0:01.23     return self._value_for_option(obj)
  0:01.23   File "/home/android/tor-
 browser/python/mozbuild/mozbuild/util.py", line 947, in method_call
  0:01.23     cache[args] = self.func(instance, *args)
  0:01.23   File "/home/android/tor-
 browser/python/mozbuild/mozbuild/configure/__init__.py", line 591, in
 _value_for_option
  0:01.23     % option_string.split('=', 1)[0])
  0:01.23 mozbuild.configure.options.InvalidOptionError: --disable-eme is
 not available in this configuration
  0:01.27 *** Fix above errors and then restart with\
  0:01.27                "./mach build"
  0:01.27 client.mk:111: recipe for target 'configure' failed
  0:01.27 make: *** [configure] Error 1
 }}}

 `--enable-eme` only affects `MOZ_EME_MODULES`. The MODULES are only
 defined for [https://searchfox.org/mozilla-
 esr68/search?q=MOZ_EME_MODULES&path= browser]. In FF67, enabling eme was
 [https://hg.mozilla.org/releases/mozilla-
 esr68/rev/43965f6107dcdd7051afae588ebe0c3b12612ec8  restricted] by OS,
 kernel, and CPU arch.

 [https://searchfox.org/mozilla-esr68/source/toolkit/moz.configure#519
 moz.configure}:
 {{{
 @depends(target)
 def eme_choices(target):
     if (target.kernel in ('Darwin', 'WINNT', 'Linux') and
         target.os not in ('Android', 'iOS') and
         target.cpu in ('x86', 'x86_64')):
         return ('widevine',)
     if target.kernel == 'WINNT' and target.cpu == 'aarch64':
         return ('widevine',)
 [snip]

 option('--enable-eme',
        nargs='+',
        choices=eme_choices,
        default=eme_default,
        when=eme_choices,
        help='{Enable|Disable} support for Encrypted Media Extensions')
 }}}

 The "choices" returned by [https://searchfox.org/mozilla-
 esr68/source/toolkit/moz.configure#519 eme_choices] is `false-ish` (I
 assume) on Android and iOS, and configure [https://searchfox.org/mozilla-
 esr68/source/python/mozbuild/mozbuild/configure/__init__.py#580 errors] as
 a result of this.

 {{{
         when = self._conditions.get(option)
         # If `when` resolves to a false-ish value, we always return None.
         # This makes option(..., when='--foo') equivalent to
         # option(..., when=depends('--foo')(lambda x: x)).
         if when and not self._value_for(when) and value is not None:
             # If the option was passed explicitly, we throw an error that
             # the option is not available. Except when the option was
 passed
             # from the environment, because that would be too cumbersome.
             if value.origin not in ('default', 'environment'):
                 raise InvalidOptionError(
                     '%s is not available in this configuration'
                     % option_string.split('=', 1)[0])
             self._logger.log(TRACE, '%r = None', option)
             return None
 }}}

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


More information about the tor-bugs mailing list