[tbb-dev] [tor-dev] RFC: porting torbrowser

ng0 ng0 at n0.is
Fri Mar 9 00:05:16 UTC 2018


Hi,

(top-posting and keeping the old email as reference in complete quote)
I have now started working on a package for Guix. While I've had some
exposure to the packaging of the ESR or Firefox and also some old code
base fork of Firefox (Palemoon), I'm not sure if the problem I experience
is something I can report or ask for at your side or elsewhere.

Building fails in the part of the build phase where interaction with quitter
happens (for a lack of more insight into the actual codebase).

My package definition is not yet published (and early stages), I'll publish
a public preview tomorrow.

The build error is curious for me, because Firefox ESR (not in upstream Guix)
succeeds with builds. Icecat with patches from ESR applied in Guix master builds
fine. I assume what I experience is Tor Browser specific.

I can send in a full build log in about 12 hours, for now there's this:

processing /tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/testing/marionette/jar.mn
make[4]: Leaving directory '/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/ff/testing/marionette'
make[4]: Entering directory '/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/ff/tools/quitter'
mkdir -p '../../dist/xpi-stage/quitter/chrome/'
/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/ff/_virtualenv/bin/python -m mozbuild.action.jar_maker   -d 
../../dist/xpi-stage/quitter -t /tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout -f symlink  -e 
--relativesrcdir=tools/quitter -c /tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/tools/quitter/en-US -DNDEBUG=1 
-DTRIMMED=1 -DA11Y_LOG=1 -DACCESSIBILITY=1 -DATK_MAJOR_VERSION=2 -DATK_MINOR_VERSION=26 -DATK_REV_VERSION=1 -DBUILD_CTYPES=1 
-DCROSS_COMPILE='' -DD_INO=d_ino -DENABLE_INTL_API=1 -DENABLE_MARIONETTE=1 -DENABLE_SYSTEM_EXTENSION_DIRS=1 -DEXPOSE_INTL_API=1 
-DFIREFOX_VERSION=52.6.0 -DFORCE_PR_LOG=1 -DF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H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_THREAD_TLS_KEYWORD=1 -DHAVE_TRUNCATE64=1 
-DHAVE_UNISTD_H=1 -DHAVE_VALLOC=1 -DHAVE_VA_COPY=1 -DHAVE_VA_LIST_AS_ARRAY=1 -DHAVE_VISIBILITY_ATTRIBUTE=1 
-DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE__UNWIND_BACKTRACE=1 -DHAVE___CXA_DEMANGLE=1 -DJS_DEFAULT_JITREPORT_GRANULARITY=3 
-DMALLOC_H='<malloc.h>' -DMALLOC_USABLE_SIZE_CONST_PTR='' -DMOZILLA_UAVERSION='"52.0"' -DMOZILLA_VERSION='"52.6.0"' 
-DMOZILLA_VERSION_U=52.6.0 -DMOZ_ACCESSIBILITY_ATK=1 -DMOZ_ADDON_SIGNING=1 -DMOZ_APP_UA_NAME='""' -DMOZ_APP_UA_VERSION='"52.6.0"' 
-DMOZ_B2G_OS_NAME='""' -DMOZ_B2G_VERSION='"1.0.0"' -DMOZ_BUILD_APP=browser -DMOZ_BUNDLED_FONTS=1 -DMOZ_CONTENT_SANDBOX=1 
-DMOZ_CRASHREPORTER_ENABLE_PERCENT=100 -DMOZ_DATA_REPORTING=1 -DMOZ_DISTRIBUTION_ID='"org.mozilla"' -DMOZ_DLL_SUFFIX='".so"' 
-DMOZ_ENABLE_DBUS=1 -DMOZ_ENABLE_GIO=1 -DMOZ_ENABLE_PROFILER_SPS=1 -DMOZ_ENABLE_SIGNMAR=1 -DMOZ_ENABLE_SKIA=1 
-DMOZ_ENABLE_STARTUP_NOTIFICATION=1 -DMOZ_ENABLE_XREMOTE=1 -DMOZ_FEEDS=1 -DMOZ_FFMPEG=1 -DMOZ_FFVPX=1 -DMOZ_FMP4=1 -DMOZ_GAMEPAD=1 
-DMOZ_GLUE_IN_PROGRAM=1 -DMOZ_GMP_SANDBOX=1 -DMOZ_INSTRUMENT_EVENT_LOOP=1 -DMOZ_JSDOWNLOADS=1 -DMOZ_LIBAV_FFT=1 -DMOZ_LOGGING=1 
-DMOZ_MACBUNDLE_ID=org.mozilla.torbrowser -DMOZ_MEMORY=1 -DMOZ_MEMORY_LINUX=1 -DMOZ_OFFICIAL_BRANDING=1 -DMOZ_PERMISSIONS=1 
-DMOZ_PHOENIX=1 -DMOZ_PLACES=1 -DMOZ_PULSEAUDIO=1 -DMOZ_SAMPLE_TYPE_FLOAT32=1 -DMOZ_SANDBOX=1 -DMOZ_SECUREELEMENT=1 
-DMOZ_SERVICES_HEALTHREPORT=1 -DMOZ_STATIC_JS=1 -DMOZ_SYSTEM_SQLITE=1 -DMOZ_UPDATE_CHANNEL=default -DMOZ_USER_DIR='".mozilla"' 
-DMOZ_VORBIS=1 -DMOZ_VPX_NO_MEM_REPORTING=1 -DMOZ_WEBGL_CONFORMANT=1 -DMOZ_WEBM_ENCODER=1 -DMOZ_WEBSPEECH=1 
-DMOZ_WEBSPEECH_TEST_BACKEND=1 -DMOZ_WIDGET_GTK=2 -DMOZ_X11=1 -DMOZ_XUL=1 -DNO_NSPR_10_SUPPORT=1 -DNS_PRINTING=1 
-DNS_PRINT_PREVIEW=1 -DRELEASE_OR_BETA=1 -DSPIDERMONKEY_PROMISE=1 -DSTATIC_JS_API=1 -DSTDC_HEADERS=1 
-DTARGET_XPCOM_ABI='"x86_64-gcc3"' -DTOR_BROWSER_VERSION='"7.5"' -DUSE_SKIA=1 -DUSE_SKIA_GPU=1 -DVA_COPY=va_copy -DXP_LINUX=1 
-DXP_UNIX=1 -D_REENTRANT=1 -DXPI_NAME=quitter -DAB_CD=en-US 
/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/tools/quitter/jar.mn
processing /tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/tools/quitter/jar.mn
Traceback (most recent call last):
  File "/gnu/store/j4vj7h3wyb532g2j0axzjj43z2a0dg81-python-2.7.14/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/gnu/store/j4vj7h3wyb532g2j0axzjj43z2a0dg81-python-2.7.14/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/python/mozbuild/mozbuild/action/jar_maker.py", line 17, in 
<module>
    sys.exit(main(sys.argv[1:]))
  File "/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/python/mozbuild/mozbuild/action/jar_maker.py", line 13, in 
main
    return mozbuild.jar.main(args)
  File "/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/python/mozbuild/mozbuild/jar.py", line 597, in main
    jm.makeJar(infile, options.d)
  File "/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/python/mozbuild/mozbuild/jar.py", line 333, in makeJar
    self.processJarSection(info, jardir)
  File "/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/python/mozbuild/mozbuild/jar.py", line 391, in 
processJarSection
    jarinfo.chrome_manifests)
  File "/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/python/mozbuild/mozbuild/jar.py", line 281, in finalizeJar
    chromebasepath.format(chromebase), register)
  File "/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/python/mozbuild/mozbuild/jar.py", line 307, in 
updateManifest
    addEntriesToListFile(manifestPath, myregister.iterkeys())
  File "/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/python/mozbuild/mozbuild/action/buildlist.py", line 36, in 
addEntriesToListFile
    with open(listFile, 'wb') as f:
IOError: [Errno 13] Permission denied: '../../dist/xpi-stage/quitter/chrome.manifest'
make[4]: *** [/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/config/rules.mk:1187: libs] Error 1
make[4]: Leaving directory '/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/ff/tools/quitter'
make[3]: *** [/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/config/recurse.mk:79: tools/quitter/libs] Error 2
make[3]: Leaving directory '/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/ff'
make[2]: *** [/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/config/recurse.mk:33: libs] Error 2
make[2]: Leaving directory '/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/ff'
make[1]: *** [/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/config/rules.mk:523: default] Error 2
make[1]: Leaving directory '/tmp/guix-build-tor-browser-7.5.drv-0/tor-browser-7.5-checkout/ff'
make: *** [client.mk:415: realbuild] Error 2
phase `build' failed after 2129.5 seconds
builder for `/gnu/store/r66p868620dpvzmfymclz50qfdsvphyv-tor-browser-7.5.drv' failed with exit code 1
@ build-failed /gnu/store/r66p868620dpvzmfymclz50qfdsvphyv-tor-browser-7.5.drv - 1 builder for 
`/gnu/store/r66p868620dpvzmfymclz50qfdsvphyv-tor-browser-7.5.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/r66p868620dpvzmfymclz50qfdsvphyv-tor-browser-7.5.drv' failed




ng0 transcribed 9.7K bytes:
> Hi,
> 
> thanks for your reply.
> 
> Georg Koppen transcribed 7.4K bytes:
> > Hi!
> > 
> > ng0:
> > > Hi,
> > > 
> > > It seems as if tbb-dev at lists.torproject.org is the list which
> > > would be more appropriate.
> > > If the 7 days without a reaction are simply due to the holidays in some countries,
> > > it's my mistake. If you need internal discussion about this to respond
> > > appropriately, let me know that you are reviewing this message at all.
> > > I have no expectation for "neoliberal optimized" reply times.
> > 
> > It's been taking a while but here come some comments to your mail:
> > 
> > > Thanks.
> > > 
> > > ng0 transcribed 7.9K bytes:
> > >> Hi folks,
> > >>
> > >> as your trademarks team / person suggested to me I get in touch with the
> > >> dev team of torproject. While I'm more involved in GNUnet, I work at the
> > >> intersection of projects. Currently this means I'm involved in system
> > >> integration. At Guix we are interested in working closer with projects
> > >> like tor, TAILS, Whonix and the like. Porting torbrowser is not only in
> > >> the interest of the Guix community but also in the interest of Wonix who
> > >> recently expressed interest in selectively using Guix for their work.
> > >> For me as maintainer of the system (in development) pragmaOS it also
> > >> means that we can decide between icecat OR torless torbrowser for
> > >> proxied GNUnet connections.
> > >>
> > >> I'm interested in your response to the actions listed below and wether
> > >> you think this will still qualify as torbrowser or what other option you
> > >> propose for us at Guix to use. "Option" here means that I am not sure
> > >> what other graphical theme you have for versions of the browser which do
> > >> not use the trademark when they can (logically) also not use the firefox
> > >> trademarks.
> > >> I would reflect in the description of the package that it is not
> > >> torbrowser but a reconstruction of the way torbrowser is build, tracking
> > >> upstream as closely as possible while removing (list of features which
> > >> were removed goes here).
> > >> This can be compared to what the inoffical Gentoo maintainer does in the
> > >> .ebuild file here:
> > >> https://data.gpo.zugaina.org/torbrowser/www-client/torbrowser/
> > 
> > Sounds good.
> > 
> > >> My request here is just in the position as a contributor to Guix, not
> > >> for pragmatique (the project which works on pragmaOS etc), Whonix,
> > >> GNUnet or any other project I mentioned before. 
> > >>
> > >> Thanks in advance. Now the content I've been talking about:
> > >>
> > >> It looks like the changes I need to make to torbrowser are not so
> > >> grave at all. Someone pointed me to the gnu-linux-libre at nongnu.org list
> > >> to reach out to other FSDG systems.
> > >> The thread can be reviewed here:
> > >> https://lists.nongnu.org/archive/html/gnu-linux-libre/2017-03/msg00002.html
> > >>
> > >> Basically:
> > >>
> > >> I will need to discourage Mozilla leftovers:
> > >> - the mozilla addon service will be overwritten, in other words:
> > >>   Where you would find https://addons.mozilla.org/ at "Preferences > AddOns"
> > >>   it will be replaced by the thing Icecat  points to. Longterm plan is
> > >>   to offer firefox extensions native through "guix package -i
> > >>   youraddonnamehere".
> > >>
> > >> Privacy / Tracking reasons:
> > >> - Firefox "Sync" will be disabled.
> > 
> > FWIW: I don't think "Sync" is working if you use Tor Browser as-is.
> 
> So it's basically a broken feature (in tor browser) and should be removed
> anyway? I'm busy on other fronts currently and had no time to look into
> this again. I hope to pick up work on this again in June or July depending
> on how the things which keep me occupied work out.
> 
> > >> - Google will be removed from the search plugins if I understood the
> > >>   procedure correctly (at least it is not in Icecat)
> > >> A question directly for torbrowser team:
> > >> - about:license does not list licenses the torbrowser project uses, only
> > >>   firefox. Why?
> > 
> > Because `about:license` is a page within the Firefox part of Tor Browser
> > (originally) meant to cover exactly that part. There are other parts,
> > like tor or NoScript, that come with their own licenses.
> > 
> > That said there is a bug on our side to update that page
> > (https://trac.torproject.org/projects/tor/ticket/14936), and we could
> > think about making it the central point where we show all the licenses
> > the users get with the end product.
> 
> Sounds good.
> 
> > >> DRM
> > >> - Luke from parabola mentioned that drm has been enabled in recent
> > >>   versions of torbrowser. This needs to be removed aswell.
> > >>   https://git.parabola.nu/abslibre.git/tree/libre/iceweasel/vendor.js#n23
> > >>   https://git.parabola.nu/abslibre.git/tree/libre/iceweasel/mozconfig#n39
> > >>   https://gitweb.torproject.org/tor-browser.git/tree/browser/app/profile/firefox.js?h=tor-browser-45.8.0esr-7.0-1#n1511
> > 
> > It seems Luke looked at the wrong file. If you are looking for
> > preferences we set 000-tor-browser.js is a good starting point:
> > 
> > https://gitweb.torproject.org/tor-browser.git/tree/browser/app/profile/000-tor-browser.js?h=tor-browser-45.9.0esr-6.5-1
> 
> Thanks, I'll compare with this page.
> 
> > Otherwise EME related things are disabled in our .mozconfig files in our
> > tor-browser repo.
> > 
> > The changes you want to make and that are outlined above should not be
> > an issue for calling the thing you are working on "Tor Browser". It
> 
> That's good to know, thank you.
> 
> > would be nice if you could have a canonical URL where one can easily see
> > all the changes you plan to apply (and are already applied). If there is
> > such a place already could you point this list to it?
> 
> The place where the package ends up finally would be the Guix master
> repository, the shared source of Guix and all system services and packages:
> https://git.savannah.gnu.org/cgit/guix.git/log/
> 
> I will pass you the link to my work repository as soon as there as something
> in a working state in the tor-browser branch in there.
> 
> Currently this non-working feature branch exists:
> http://qs3zumwfci4tntnd.onion/ng0/guix/commits/package/browser/torbrowser
> https://notabug.org/ng0/guix/commits/package/browser/torbrowser
> 
> which is due to be converted to an mirror-only repository of:
> 
> https://git.pragmatique.xyz/ng0-guix/log.html
> 
> I'll keep you in the loop.
>
> > 
> > [snip]
> > 
> > Georg
> > 
> 
> While I layed out the theory for working on a tor browser port last year,
> I was asked why it wouldn't make sense to use icecat as a base. I think
> with all due respects it takes to keep up with firefox/mozilla and their
> speed and teamsize, they have been occasionally slow in the past.
> It would be interesting to see how an alternative package of torbrowser based
> on icecat works out, but so far I leave that up to my developers repository
> as a would-be-could-be case to play around with (our icecat receives fast and
> regular patches from upstream firefox esr, that's why it could be an option).
> Your permission just was for the attempted replica of the build process of
> tor browser and I only focus on that officially for Guix inclusion.
> 
> > _______________________________________________
> > tbb-dev mailing list
> > tbb-dev at lists.torproject.org
> > https://lists.torproject.org/cgi-bin/mailman/listinfo/tbb-dev
> 
> ng0
> -- 
> https://pragmatique.xyz
> PGP: https://people.pragmatique.xyz/ng0/
> _______________________________________________
> tbb-dev mailing list
> tbb-dev at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tbb-dev

-- 
A88C8ADD129828D7EAC02E52E22F9BBFEE348588
https://n0.is/~ng0


More information about the tbb-dev mailing list