On Tue, Feb 23, 2016 at 07:10:29PM -0600, attila wrote: > Landry Breuil <lan...@rhaalovely.net> writes: > > > On Wed, Feb 17, 2016 at 11:51:38AM -0600, attila wrote: > >> > >> Landry Breuil <lan...@rhaalovely.net> writes: > >> > >> > On Mon, Feb 15, 2016 at 10:54:26AM -0600, attila wrote: > >> >> > >> >> Landry Breuil <lan...@rhaalovely.net> writes: > >> >> <snip> > >> > > >> > You shouldnt need to copy the xpi's to the user profile, there are ways > >> > via tweaks to make it work. > >> > > >> > <snip> > >> > > >> > Of course, all this is documented in > >> > https://developer.mozilla.org/en-US/Add-ons/Installing_extensions and > >> > explained in > >> > https://mike.kaply.com/2012/02/21/understanding-add-on-scopes/ > >> > >> How right you are. After doing some more digging I've come up with a > >> solution that ditches the start-tor-browser script and uses a mozilla > >> autoconfig file instead, along with some other tweaks to make it go as > >> per Mike Kaply and MDN. Attached are the new ports, although still at > >> TBB 5.5 (still need to update to 5.5.2). > >> > >> Thanks for the cluebat. I learned a lot. > > > > Great, that looks *much* nicer now without the profile hackery that was > > done before :) I suppose with that, the xpis are directly opened from > > the systemwide install, and not copied to the running profile anymore ? > > > > Have you tried various settings for the scopes ? (honestly, for > > thunderbird it was a try-and-see, and i ended up with 3, i see you use > > 5, just wondering about the reasoning) > > I went with 5 because it seemed like 4|1 was correct based on the > description of the flag bits at > https://developer.mozilla.org/en-US/Add-ons/Installing_extensions: > > Value Install scope > 1 The current users's profile. > 2 All profiles of the logged-in user. > 4 Installed and owned by Firefox. > 8 Installed for all users of the computer. > 15 The combination of all scopes. > > We want the extensions that are part of the bundle to be found and we > also want the user to be able to install their own extensions (thus my > thinking 4|1). I wanted to give a better response than *shrug* to > your question so I've now tried with enabledScopes set to 1, 2, 3, 4, 5, > 8, 15 and 0 and in all cases in my testing the same thing happened: > tor-browser copies the .xpi files from > /usr/local/lib/tor-browser-5.5/distribution/extensions to the user's > profile during initialization and seems to run them from there. In > one case (enabledScopes = 2) an empty extensions/ subdir was created > under ~/.tor-browser (DefProfRt) as well. When autoDisableScopes is > set to 15 it makes no difference, which surprised me a lot. I > verified in each case in about:config that the values of > extensions.enabledScopes and .autoDisableScopes were what I thought > they were. They default to 1 and 0 in tor-browser, respectively. > > I could've sworn those .xpi files were not being recognized in > distribution/extensions before I went down this path, but somehow now > they are, so I must've be wrong. It isn't the presence of the > autoconfig file, either, since I tried turning that off and the > extensions were still loaded, just misconfigured. When I get time > I'll figure out why enabledScopes doesn't (seem to) matter by looking > at all their patches to ESR... there must be something in there.
Thanks for spending time on this. I really insist on that because if the extension is *copied* in the user profile, what happens upon upgrades of the systemwide extension, are they copied again/overwritten ? Asking because i suppose tbb has disabled the auto-update-extensions mechanism of firefox, so if you get a flaw in one of your tbb-specific extension and it doesnt get properly updated... how does tbb do on linux, copy all the extensions to the profile like a pig ? What if you have multiple users/profiles, you get X copies of the extension, which various versions over time ? I dont understand the specifics (havent looked in a loooong while) but i know for thunderbird and seamonkey it works fine, lightning and enigmail are installed systemwide, and they are detected/run from there without being copied to profiles. > > I dont remember it being discussed before, but was a meta/tbb port > > considered, run-depending on the 4 extensions & tor-browser 'main' > > package ? Users would just have to install this one to get the whole > > thing. > > In fact I did have a meta/tbb port that was exactly what you said and > got rid of it about a month ago when I decided to reverse the > run-deps. I have resurrected it and attached it as well. Yeah, looks better now this way.. Looked a bit at the patches, and i saw some hardcoded /usr/local paths which ought to be subst'ed in post-patch/pre-configure/whatever. tbb/Makefile.inc looks 'strange' with this big .if for addons vs tor-browser, maybe it would make sense to make a www/tbb/addons subdir with a Makefile.inc in this subdir ? Dunno how that would work. Now that you have the RDEPENDS in the right order, i think you can make update-plist in all addons, that should leave you with only the .xpi line in the PLIST without the subdirs. > One quick question: should the the four extensions say > > PKG_ARCH=* > > There's no reason not to, is there? There's no reason not to, but PKG_ARCH is deemed... useless, there are discussions about removing it or not. Package builds/distribution dont use it. Landry