Good stuff! FWIW: we'd need a tor-browser-build patch, too, I guess making sure that Torbutton is not built anymore and not shipped as an extension anymore in Tor Browser.
Good stuff! FWIW: we'd need a tor-browser-build patch, too, I guess making sure that Torbutton is not built anymore and not shipped as an extension anymore in Tor Browser.
Okay, I just compiled bundles with all the patches.
One thing for the tor-browser-build one: Could you add the bug number in front of your commit message like "Bug 25013:"?
For the browser patches:
I don't see the Torbutton icon on the toolbar button.
The arrow warning me that my version out-of-date is not visible either.
Those two might actually not be your fault. It turns out that patch does not like the git binary diffs and seems to ignore the images in the Linux case + breaks the Windows builds. Let me try to test your patches differently tomorrow.
Bug 25013: Remove torbutton from the tor browser buildhttps://github.com/igortoliveira/tor-browser-build/commit/9fd151714fe5d992d9cce12e3bb59259eea154d2
Tor Browser:
Bug 25013: Move Tor Button source code to the browser/extensions directoryhttps://github.com/igortoliveira/tor-browser/commit/910da3b9edb7068a1084443e75653487997bd978Bug 25013: Integrate Tor Button in the browser build systemhttps://github.com/igortoliveira/tor-browser/commit/e931e6ae94c5a884b6f2c8ccb96568ffff952bcdBug 25013: Use anonymous function to keep the torbutton.js and preferences.js scope limited to the parent functionhttps://github.com/igortoliveira/tor-browser/commit/16c360da0b7edc0218fdeac7e5300f83e9bbc0a6Bug 25013: Initialize startup.homepage in the startup-observer componenthttps://github.com/igortoliveira/tor-browser/commit/a28341162bf034299f4b060098e62cf515716e37Bug 25013: Add translation tool https://github.com/igortoliveira/tor-browser/commit/18b32a5144aa915327cf4584873bcb25a18b625e
I am wondering what your plan is regarding the current Torbutton repository and where future development should happen (until we have all things we need in the browser and there in a non-extension-environment). Do you think we should get rid of the Torbutton repo as we currently have it and do Torbutton development directly in Tor Browser? Or what is the model you have in mind here?
The idea is deprecate the tor button repository(we should keep it just for historical reasons) and move the whole tor button development to tor-browser.
I am wondering what your plan is regarding the current Torbutton repository and where future development should happen (until we have all things we need in the browser and there in a non-extension-environment). Do you think we should get rid of the Torbutton repo as we currently have it and do Torbutton development directly in Tor Browser? Or what is the model you have in mind here?
The idea is deprecate the tor button repository(we should keep it just for historical reasons) and move the whole tor button development to tor-browser.
This was my original thinking as well, but sysrqb's investigations in #25260 (moved) make me wonder if we wouldn't be better off finding a way to keep separate repositories for torbutton and tor-launcher. Perhaps we can find a way to either make them system addons ("feature" XPIs), or internal JS modules that are copied into the tor-browser.git tree at build time.
The advantage of maintaining separate torbutton and tor-launcher repositories is that we retain commit history (including the history we will accumulate for future commits). The tor-browser.git repository specifically is not so good for retaining history because we are constantly rebasing the patches to new versions of Firefox.
The idea is deprecate the tor button repository(we should keep it just for historical reasons) and move the whole tor button development to tor-browser.
This was my original thinking as well, but sysrqb's investigations in #25260 (moved) make me wonder if we wouldn't be better off finding a way to keep separate repositories for torbutton and tor-launcher. Perhaps we can find a way to either make them system addons ("feature" XPIs), or internal JS modules that are copied into the tor-browser.git tree at build time.
The advantage of maintaining separate torbutton and tor-launcher repositories is that we retain commit history (including the history we will accumulate for future commits). The tor-browser.git repository specifically is not so good for retaining history because we are constantly rebasing the patches to new versions of Firefox.
+1 to that.
Trac: Status: needs_information to needs_revision Keywords: TorBrowserTeam201802R deleted, TorBrowserTeam201802 added
FWIW: I can see us copying over files from the Torbutton repo or just package up an .xpi and put the extracted files into tor-browser.git before we tag (and use the machinery developed in some of the patches above). I just think that step 1 of the migration should not contain getting rid of the Torbutton repo. We should do this once we integrate the components we need tighter into the browser. I guess this would be a thing, at some point, for step 3 in Arthur's staged approach.
I followed the same approach in the #25260 (moved), torbutton will work as a feature extension, so we still need to change the browser adding it as a subdirectory(git submodule?).
The changes in the tor button are related to the build system and making it work with the mozilla central code base(few things changed and others are deprecated).
FWIW: I can see us copying over files from the Torbutton repo or just package up an .xpi and put the extracted files into tor-browser.git before we tag (and use the machinery developed in some of the patches above). I just think that step 1 of the migration should not contain getting rid of the Torbutton repo. We should do this once we integrate the components we need tighter into the browser. I guess this would be a thing, at some point, for step 3 in Arthur's staged approach.
I followed the same approach in the #25260 (moved), torbutton will work as a feature extension, so we still need to change the browser adding it as a subdirectory(git submodule?).
Hi, Igor -- do you think torbutton could continue to be built independently inside the torbutton.git repo, and then copied as an .xpi into the Tor Browser Bundle by tor-browser-build.git? I'm wondering if can avoid adding the gecko build infrastructure.
The changes in the tor button are related to the build system and making it work with the mozilla central code base(few things changed and others are deprecated).
I agree with Arthur (I have not looked at the Github commits but meant to +1 the bundling of the .xpi in the Torbutton repo and then getting that copied into the browser part later on.)
I agree with Arthur (I have not looked at the Github commits but meant to +1 the bundling of the .xpi in the Torbutton repo and then getting that copied into the browser part later on.)
These two patches are the first steps to move tor button to firefox, it adds a new file called jar.mn that generates the chrome.manifest and update the code removing an unecessary import.
These two patches are the first steps to move tor button to firefox, it adds a new file called jar.mn that generates the chrome.manifest and update the code removing an unecessary import.
The next step is adding torbutton as submodule in the toolkit directory and update its moz.build file.
I guess you have that outlined in your proposal but why toolkit and not the browser directory where all the other extensions are? Let's clear review for now as other, crucial pieces are missing. The review of the parts above might depend on them being available.
These two patches are the first steps to move tor button to firefox, it adds a new file called jar.mn that generates the chrome.manifest and update the code removing an unecessary import.
The next step is adding torbutton as submodule in the toolkit directory and update its moz.build file.
I guess you have that outlined in your proposal but why toolkit and not the browser directory where all the other extensions are? Let's clear review for now as other, crucial pieces are missing. The review of the parts above might depend on them being available.
The next step is adding torbutton as submodule in the toolkit directory and update its moz.build file.
I guess you have that outlined in your proposal but why toolkit and not the browser directory where all the other extensions are? Let's clear review for now as other, crucial pieces are missing. The review of the parts above might depend on them being available.
I would expect the browser/ directory be more about Desktop stuff. I can be totally wrong about it.
Yes, I think toolkit is a better location for this, too. We shouldn't add torbutton under browser/ if mobile/ needs it (which it does). It seems like toolkit/ is the directory for common browser functionality. If there is a better common directory, then I'm okay with using that, too.
I was wondering whether we should move the jar.mn and moz.build files into the source directory given that essentially all extensions in the Mozilla tree I have looked at have both at the same level as install.rdf.in. Did you consider that?
toolkit/ is fine. Some questions that came to mind while looking over the changes
Do we really need the bug component part of the moz.build file? That is meant for Mozilla's Bugzilla I think which we won't use anyway.
Awesome
Why is it not enough to just have something like
% locale torbutton @AB_CD@ %locale/@AB_CD@/
but do
{{{
#if AB_CD == en_US
locale/@AB_CD@/ (src/chrome/locale/en/)
#else
locale/@AB_CD@/ (src/chrome/locale/@AB_CD@/)
#endif
}}}
and treat en-US like a special case?
The mozilla locale handler doesn't have an "en" language. American english is defined as en_US. So we could rename the src/chrome/locale/en folder to en_US or do this workaround. (Other extensions do the same thing)
I was wondering whether we should move the jar.mn and moz.build files into the source directory given that essentially all extensions in the Mozilla tree I have looked at have both at the same level as install.rdf.in. Did you consider that?
No. However I think it is a good idea. I will update the patch.
toolkit/ is fine. Some questions that came to mind while looking over the changes
Do we really need the bug component part of the moz.build file? That is meant for Mozilla's Bugzilla I think which we won't use anyway.
Awesome
Why is it not enough to just have something like
% locale torbutton @AB_CD@ %locale/@AB_CD@/
but do
{{{
#if AB_CD == en_US
locale/@AB_CD@/ (src/chrome/locale/en/)
#else
locale/@AB_CD@/ (src/chrome/locale/@AB_CD@/)
#endif
}}}
and treat en-US like a special case?
The mozilla locale handler doesn't have an "en" language. American english is defined as en_US. So we could rename the src/chrome/locale/en folder to en_US or do this workaround. (Other extensions do the same thing)
Are we sure "en" is the only locale in Torbutton as we ship it that is affected? That said, I think we should rather fix that issue than work around it (especially as we ship an en-US bundle and not an en one). I'll ping emmapeel for the translations related issue but hope it is not that hard to move to en-US. Otherwise we could add a symlink for now?