Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: mozilla.port.mk: no --enable-official-branding for Tor Browser
To:
Caspar Schutijser <caspar@schutijser.com>, <landry@openbsd.org>
Cc:
<ports@openbsd.org>
Date:
Sun, 21 Sep 2025 21:52:36 +0100

Download raw body.

Thread
I like 2...

-- 
  Sent from a phone, apologies for poor formatting.

On 21 September 2025 20:44:08 Caspar Schutijser <caspar@schutijser.com> wrote:

> Hi,
>
> In a couple of weeks, Tor Browser version 15.0 will be released.
> I'm already testing the alpha releases. While running the first alpha
> release, I noticed that it didn't "look" like Tor Browser but like
> Mozilla Firefox (in terms of the browser name, logo and some other
> things).
>
> I did some digging and I found
> https://gitlab.torproject.org/tpo/applications/tor-browser/-/work_items/43772#note_3240223
> The summary is that for Tor Browser, --enable-official-branding
> should not be passed to configure (anymore). However,
> mozilla.port.mk passes that to every port that uses mozilla.port.mk.
>
> There's multiple ways to make sure we don't pass this flag to
> the Tor Browser port; below some ideas:
>
> 1) surround "CONFIGURE_ARGS += --enable-official-branding"
> in mozilla.port.mk with a check to see if we're building Tor Browser.
>
> 2) move "CONFIGURE_ARGS += --enable-official-branding" out of
> mozilla.port.mk and have every "official" Mozilla port (i.e., every
> mozilla.port.mk port that is not Tor Browser) specify
> "CONFIGURE_ARGS += --enable-official-branding" itself.
>
> 3) surround "CONFIGURE_ARGS += --enable-official-branding" in
> mozilla.port.mk with something like
> ".if defined(MOZILLA_ENABLE_OFFICIAL_BRANDING)" and set it in
> every mozilla.port.mk port that is not Tor Browser.
>
> 4) the same as idea 4, but something like
> MOZILLA_DONT_ENABLE_OFFICIAL_BRANDING which is then only set in
> the Tor Browser port.
>
>
> Maybe there's other (better) approaches that I didn't think of.
>
> Below is a diff that implements idea 1. What do you think? Do you
> like another approach (e.g. idea 4) better?
>
> Thanks,
> Caspar
>
>
> Index: mozilla.port.mk
> ===================================================================
> RCS file: /cvs/ports/www/mozilla/mozilla.port.mk,v
> diff -u -p -r1.177 mozilla.port.mk
> --- mozilla.port.mk	15 Aug 2025 08:32:14 -0000	1.177
> +++ mozilla.port.mk	21 Sep 2025 19:40:30 -0000
> @@ -153,9 +153,12 @@ USE_NOBTCFI ?=	Yes
>
> AUTOCONF_VERSION =	2.13
> CONFIGURE_ARGS +=	--with-system-zlib	\
> -		--enable-official-branding	\
> 		--enable-optimize="${CFLAGS}"	\
> 		--disable-updater
> +.if !${PKGPATH:Mwww/tor-browser/*}
> +# 
> https://gitlab.torproject.org/tpo/applications/tor-browser/-/work_items/43772#note_3240223
> +CONFIGURE_ARGS +=	--enable-official-branding
> +.endif
>
> # firefox >= 46 defaults to gtk+3
> CONFIGURE_ARGS +=	--enable-default-toolkit=cairo-gtk3