brizental pushed to branch tor-browser-158.0a1-17.0-2 at The Tor Project / Applications / Tor Browser Commits: 9246f72e by Beatriz Rizental at 2026-11-25T20:34:35+01:00 fixup! BB 43901: Modify about:license. Keep generating browser/base's license.html, which jar.mn still packages, but without the Firefox app-license.html notice. - - - - - 47930dfc by Beatriz Rizental at 2026-11-25T20:34:35+01:00 fixup! TB 40209: Implement Basic Crypto Safety - - - - - f1ce3217 by Beatriz Rizental at 2026-11-25T20:34:35+01:00 fixup! TB 40807: Added QRCode.js to toolkit/modules - - - - - 5 changed files: - browser/base/moz.build - browser/components/cryptosafety/moz.build - python/mozbuild/mozbuild/test/python.toml - + python/mozbuild/mozbuild/test/test_bb_license.py - toolkit/modules/moz.build Changes: ===================================== browser/base/moz.build ===================================== @@ -79,8 +79,14 @@ PERFTESTS_MANIFESTS += ["content/test/perftest.toml"] DEFINES["MOZ_APP_VERSION"] = CONFIG["MOZ_APP_VERSION"] DEFINES["MOZ_APP_VERSION_DISPLAY"] = CONFIG["MOZ_APP_VERSION_DISPLAY"] -# Do not include the Firefox app-license.html in about:license. -# tor-browser#43901. +GENERATED_FILES += ["license.html"] +GENERATED_FILES["license.html"].script = "/toolkit/content/gen_license_html.py" +GENERATED_FILES["license.html"].inputs = [ + "/toolkit/content/license.html.mako", + "!/licenses.json", + # Do not include the Firefox app-license.html in about:license. + # tor-browser#43901. +] if CONFIG["BASE_BROWSER_UPDATE"]: DEFINES["BASE_BROWSER_UPDATE"] = True ===================================== browser/components/cryptosafety/moz.build ===================================== @@ -9,3 +9,6 @@ MOZ_SRC_FILES += [ "CryptoSafetyChild.sys.mjs", "CryptoSafetyParent.sys.mjs", ] + +LICENSED_UNDER += ["mit"] +LICENSED_UNDER["mit"].paths = ["Bech32Decode.sys.mjs"] ===================================== python/mozbuild/mozbuild/test/python.toml ===================================== @@ -109,6 +109,9 @@ subsuite = "mozbuild" ["test_base.py"] +["test_bb_license.py"] +subsuite = "base-browser" + ["test_confvars.py"] ["test_containers.py"] ===================================== python/mozbuild/mozbuild/test/test_bb_license.py ===================================== @@ -0,0 +1,76 @@ +import os +import subprocess +import sys +import tempfile +import unittest + +import buildconfig +import mozunit + +# Files we add on top of Firefox that must be credited in about:license. +# Paths are relative to the top source directory. +EXPECTED_PATHS = [ + "browser/components/cryptosafety/Bech32Decode.sys.mjs", + "toolkit/modules/QRCode.sys.mjs", +] + + +class TestAboutLicense(unittest.TestCase): + """Check the about:license page rendered by ./mach licenses. + + Rebases onto upstream changes to how the page is generated can silently + drop our changes to it, since they only show up in the rendered page. + Requires a configured tree. + """ + + @classmethod + def setUpClass(cls): + with tempfile.TemporaryDirectory() as tmp: + output = os.path.join(tmp, "license.html") + result = subprocess.run( + [ + sys.executable, + os.path.join(buildconfig.topsrcdir, "mach"), + "licenses", + "-o", + output, + ], + cwd=buildconfig.topsrcdir, + capture_output=True, + text=True, + check=False, + ) + if result.returncode != 0: + raise AssertionError( + f"./mach licenses failed:\n{result.stdout}\n{result.stderr}" + ) + with open(output, encoding="utf-8") as f: + cls.document = f.read() + + def test_app_license_block_is_not_included(self): + # tor-browser#43901. + with open( + os.path.join( + buildconfig.topsrcdir, + "browser/base/content/overrides/app-license.html", + ), + encoding="utf-8", + ) as f: + block = f.read().split("-->", 1)[-1].strip() + self.assertTrue(block) + self.assertFalse( + block in self.document, + "about:license includes browser/base/content/overrides/app-license.html", + ) + + def test_expected_paths_are_credited(self): + for path in EXPECTED_PATHS: + with self.subTest(path=path): + self.assertTrue( + f"<code>{path}</code>" in self.document, + f"about:license does not credit {path}", + ) + + +if __name__ == "__main__": + mozunit.main() ===================================== toolkit/modules/moz.build ===================================== @@ -393,3 +393,6 @@ MOZ_SRC_FILES += [ "PrefUtils.sys.mjs", "WebAuthnPromptHelper.sys.mjs", ] + +LICENSED_UNDER += ["mit"] +LICENSED_UNDER["mit"].paths = ["QRCode.sys.mjs"] View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/d44ecb6... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/d44ecb6... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
participants (1)
-
brizental (@brizental)