Page 1 of 1

Zema Updated LibreWolf PKGBUILD

Posted: Sat Feb 03, 2024 8:01 pm
by Grogan
Hey Zema, I had just made you an updated AUR PKGBUILD for Librewolf 122.0-2 (source tarball update and Linux user agent patch), if you would like to have your LibreWolf identifying as Linux too. Then the forum went down. So I'm posing it here.

First of all, that's not so much an Arch pkgrel, just that the packager is conveniently using it for the version variable. Hence, I changed the pkgrel to -2 accordingly. Also, the patch has been added to the source array the sha256sums have been updated for the newer source tarball etc.

I didn't compile this, I only tested it as far as prepare() as that's where the changes are. I can't really compile it as such, I'd need to make edits for some of my utils etc. and it would be a pointless test because it's a different environment than you anyway.

So, changes to pkgrel, source array, sha256sums, patch added and down near the bottom of prepare() is the patch command:

Code: Select all

### Make user agent Linux not Windows
patch -Np1 -i ../id-linux-ua.patch

}
So if one didn't want that patch, that one line would simply need to be commented out (leaving braces where they are of course)

Edit: Duh, I guess I should post the actual patch I made, seeing as we don't have the BBF thread for continuity

Code: Select all

--- a/toolkit/components/resistfingerprinting/nsRFPService.h	2024-01-18 15:41:36.000000000 -0500
+++ b/toolkit/components/resistfingerprinting/nsRFPService.h	2024-02-03 04:39:00.174095430 -0500
@@ -63,7 +63,7 @@
 #if defined(MOZ_WIDGET_ANDROID)
 #  define SPOOFED_HTTP_UA_OS "Android 10; Mobile"
 #else
-#  define SPOOFED_HTTP_UA_OS "Windows NT 10.0"
+#  define SPOOFED_HTTP_UA_OS "X11; Linux x86_64"
 #endif
 
 struct JSContext;
This keeps all the privacy settings, but fixes that one thing I can't stand, lying about the OS in the http headers.

The browser now identifies exactly like Linux Firefox:

Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0

Obviously this is only for compiling on Linux anyway (make Windows users identify as Linux? bwahaaha)

I also added --disable-tests for a faster build and less chance of failure. I'm unsure if some of those test cases in the .js files could fail because of what I've done to RFP.

Also added LIBGL_ALWAYS_SOFTWARE=true to the profiling command so that won't fail for you.

Here is the updated PKGBUILD. It will extract to a directory (I'd never give you a tarball that will make a mess)

http://www.mikeserv.org/files/librewolf ... ILD.tar.gz

You should be able to just type "makepkg"

Re: Zema Updated LibreWolf PKGBUILD

Posted: Sun Feb 04, 2024 7:10 am
by Zema Bus
Thanks Grogan, I have it compiling now. I left your patch in so that it identifies correctly :)

Re: Zema Updated LibreWolf PKGBUILD

Posted: Sun Feb 04, 2024 9:34 am
by Grogan
Glad to hear you got it going. The patch was kind of the point, other than probably some bug fixes.

Re: Zema Updated LibreWolf PKGBUILD

Posted: Sat Feb 24, 2024 6:01 pm
by Grogan
Updated PKGBUILD for LibreWolf 123.0

Changes: pkgver and pkgrel, sha256sum of librewolf tarball. If not for wanting the checksums to match, I'd have just had you change the pkgver lol

The patch is still the same, comment out the patch line if you don't want it.

I tested this as far as prepare(), you should just have to type "makepkg".

However, if things like the packager's PGP key ever fail or something, there's "makepkg --skippgpcheck". Also, because this is for download I do it properly, but if a checksum fails there's --skipchecksums. In my own package builds I often just change pkgver/pkgrel and skip the checksums (often I already have the file in the dir already anyway).

Do not use -march! If you have -march=anything (besides -march=x86_64) in your /etc/makepkg CFLAGS/CXXFLAGS take it out temporarily. The PKGBUILD does some gymnastics with CFLAGS, so I won't just unset them (not without testing the PKGBUILD to do it in the right place) so just take it out of makepkg.conf temporarily if you have added -march there. -mtune is safe for this. I'll test that again on the next firefox release cycle, but for now, the 123 code base will fail on final LTO linking of libxul (crashes my lld linker even).

Oh, it would be cleverer if dumbass actually posted the link to the file:

http://www.mikeserv.org/files/librewolf ... ILD.tar.gz

(and spelled it right)

Re: Zema Updated LibreWolf PKGBUILD

Posted: Sat Feb 24, 2024 6:22 pm
by Zema Bus
Thanks Grogan!

Re: Zema Updated LibreWolf PKGBUILD

Posted: Sat Feb 24, 2024 7:52 pm
by Grogan
Something I forgot to mention:

Code: Select all

  cat >>../mozconfig <<END
# Arch upstream has it in their PKGBUILD, ALARM does not for aarch64:
#ac_add_options --disable-elf-hack
There is no need to --disable-elf-hack. That is a useful method of reducing relocation overhead in that big libxul.so. Distributors routinely disable that because it HAS caused build failures at times in the past. Not in years, though. I'll bet people keep adding that just because they don't know. Therefore, I commented that out for you. (it will still add it to mozconfig, but as a comment lol)