Saturday, August 31, 2024

Re: Tor Browser on -current dies with SIGILL

On Sat, Jul 13, 2024 at 07:43:58PM +0200, Caspar Schutijser wrote:
> On Tue, Jul 09, 2024 at 07:20:35PM +0200, Matthias Schmidt wrote:
> > Hi Caspar,
> >
> > * Caspar Schutijser wrote:
> > > Hi Matthias,
> > >
> > > On Mon, Jul 08, 2024 at 07:54:09PM +0200, Matthias Schmidt wrote:
> > > > Hi Caspar,
> > > >
> > > > * Caspar Schutijser wrote:
> > > > > Hi,
> > > > >
> > > > > I found the following piece of diff while I was reading through
> > > > > the diff between 13.0.16 and 13.5.
> > > > >
> > > > > $ git diff tor-browser-115.12.0esr-13.0-1-build1..tor-browser-115.12.0esr-13.5-1-build3
> > > > > from https://gitlab.torproject.org/tpo/applications/tor-browser.git:
> > > > > diff --git a/mozconfig-linux-x86_64 b/mozconfig-linux-x86_64
> > > > > index 06cf6e75b14f..7d96d5aaa734 100644
> > > > > --- a/mozconfig-linux-x86_64
> > > > > +++ b/mozconfig-linux-x86_64
> > > > > @@ -1,9 +1,13 @@
> > > > > . $topsrcdir/browser/config/mozconfigs/tor-browser
> > > > >
> > > > > -ac_add_options --enable-default-toolkit=cairo-gtk3
> > > > > +# Moz switched to lld for all Linux targets in Bug 1839739.
> > > > > +ac_add_options --enable-linker=lld
> > > > >
> > > > > ac_add_options --disable-strip
> > > > > ac_add_options --disable-install-strip
> > > > >
> > > > >
> > > > > In the diff below I reverted that part. Warning: I have not
> > > > > build-tested it myself yet, nor have I looked into what it is supposed
> > > > > to do exactly (will do that later).
> > > > >
> > > > > Is it possible for you to test diffs? If so, can you try the diff below
> > > > > and report back?
> > > >
> > > > Sorry for the late response. I've never build the Tor Browser before, I
> > > > can build up something next weekend. Also happy to try any package that
> > > > you can build up before that.
> > >
> > > I built a package and I put it here:
> > > https://temp.schutijser.com/~caspar/tb-browser-13.5p0.tgz
> > >
> > > Built on
> > > kern.version=OpenBSD 7.5-current (GENERIC.MP) #162: Mon Jul 1 02:13:07 MDT 2024
> > > deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > > , I hope that's recent enough.
> > >
> > > You can probably install it with something like
> > > # pkg_add -Dunsigned ./tb-browser-13.5p0.tgz
> > >
> > > Let me know how it goes!
> >
> > I can confirm that your package fixes the problem I saw. Thanks a lot
> > for figuring it out and providing a package for me to test!
>
> Okay, good to know. I committed this now. I'm not yet sure why this
> actually works but I'll figure that out later.

Hi,

A recent commit from landry@ to mail/mozilla-thunderbird showed me that
a similar problem existed in other Mozilla ports. The solution landry@
committed is better so I'd like to have it in Tor Browser too.
https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/mail/mozilla-thunderbird/Makefile?rev=1.464&content-type=text/x-cvsweb-markup

The diff below reverts the workaround that I committed earlier, and
adopts the same fix as the other Mozilla ports. I can not test this
myself however, since I don't have the appropriate hardware.

Matthias, are you willing to test this diff to see if Tor Browser
still works with this approach? You can also try the following package
if you want:
https://temp.schutijser.com/~caspar/tb-browser-13.5.2p0.tgz

Comments or OKs?

Thanks,
Caspar


Index: Makefile
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/Makefile,v
diff -u -p -r1.149 Makefile
--- Makefile 10 Aug 2024 15:16:44 -0000 1.149
+++ Makefile 31 Aug 2024 14:32:12 -0000
@@ -12,6 +12,7 @@ EXTRACT_SUFX = .tar.xz

PKGNAME = ${TB_PREFIX}-browser-${TB_VERSION:S/a/alpha/}
DISTNAME = src-firefox-tor-browser-115.14.0esr-13.5-1-build2
+REVISION = 0

FIX_EXTRACT_PERMISSIONS = Yes
DISTFILES += ${DISTNAME}.tar.xz \
@@ -64,7 +65,7 @@ CONFIGURE_STYLE = simple
CONFIGURE_SCRIPT = ${MODPY_BIN} ${WRKSRC}/configure.py
CONFIGURE_ARGS += --prefix=${PREFIX}
MAKE_ENV += BUILD_VERBOSE_LOG="1" CARGOFLAGS="-j${MAKE_JOBS}"
-CONFIGURE_ENV += LDFLAGS=-Wl,--threads=${MAKE_JOBS}
+CONFIGURE_ENV += LDFLAGS="-Wl,--threads=${MAKE_JOBS} --ld-path=${WRKDIR}/bin/ld"

# app-name etc. for tor-browser
CONFIGURE_ARGS += --with-app-name=${BROWSER_NAME} \
Index: patches/patch-mozconfig-linux-x86_64
===================================================================
RCS file: /cvs/ports/www/tor-browser/browser/patches/patch-mozconfig-linux-x86_64,v
diff -u -p -r1.2 patch-mozconfig-linux-x86_64
--- patches/patch-mozconfig-linux-x86_64 13 Jul 2024 17:41:23 -0000 1.2
+++ patches/patch-mozconfig-linux-x86_64 31 Aug 2024 14:32:12 -0000
@@ -1,5 +1,3 @@
-Repair USE_NOBTCFI (not sure why it works, that still needs to be figured out).
-
Encrypted Media Extensions is not supported on OpenBSD. Apparently this also
means we can not pass --disable-eme to configure so comment that out.
Also see
@@ -8,17 +6,10 @@ https://gitlab.torproject.org/tpo/applic
Index: mozconfig-linux-x86_64
--- mozconfig-linux-x86_64.orig
+++ mozconfig-linux-x86_64
-@@ -1,13 +1,7 @@
- . $topsrcdir/browser/config/mozconfigs/tor-browser
-
--# Moz switched to lld for all Linux targets in Bug 1839739.
--ac_add_options --enable-linker=lld
--
- ac_add_options --disable-strip
- ac_add_options --disable-install-strip
+@@ -8,6 +8,3 @@ ac_add_options --disable-install-strip

ac_add_options --enable-default-toolkit=cairo-gtk3
--
+
-# Let's make sure no preference is enabling either Adobe's or Google's CDM.
-ac_add_options --disable-eme
-
+-

No comments:

Post a Comment