Friday, October 29, 2021

The current status of DIY TenFourFox

Due to family and work issues my time has been curtailed for all kinds of things, but at this point, at least, there's something for you to work with: as promised, the TenFourFox source code has been updated to use 91ESR for the certificate and security base and the roots pulled up accordingly. I've also got a few security updates loaded and backported a performance tweak intended for Monterey systems but also yields a small boost on any version of Mac OS X. The browser will now be forever "45.41.6" (ESR32 SPR6) with the perpetual name "Rolling Release." This version number will not be revved again without good reason.

So now it's time for you to make your first build (and, if you feel adventurous, find a problem and try to fix it, but let's take baby steps). Officially, we have documentation for that already using MacPorts. A semi-frozen build of MacPorts what I use on my G5: I have three trees, one being the main testing debug tree which pulls from Github, and then two local subtrees that pull from the local debug tree (created with git clone --shared so that they are about 25% the size) which I use to make rolling G5-optimized (for my Quad) and 7450-optimized (for my iMac and iBook) builds. I do my work in the debug tree and make sure everything functions properly, then check it in and git pull and gmake -f client.mk build in the optimized subtrees to roll up the changes. When the subtrees are happy too, I'll git push from the main debug tree into Github. I consider this as officially supported a solution as presently exists under the circumstances. The Quad runs TenFourFox directly from the G5 subtree now.

However, MacPorts does have a lot of prereqs and requires some additional prep time (sometimes many hours) to build the tools from source. Macintosh Garden has an "unofficial TenFourFox toolkit" that contains an Automator workflow, a supervising script and a fully precompiled toolchain. You will have to install Xcode first (2.5 for Tiger, 3.1.4 for Leopard), but that is the only apparent requirement, and multiple users have reported it builds the browser successfully.

One common problem that gets reported on non-G5 systems is the dreaded internal compiler error. However, when the build is restarted, it usually progresses and continues for awhile without incident. The problem is likely tied to memory pressure and compilers really thrash memory. If your system hits this a lot and starts to annoy you, consider removing -j2 out of the build flags in whatever .mozconfig you're using (change your copy in .mozconfig, not the master *.mozcfg). This will only run one compiler instance at a time, which is slower, but requires less memory and is more likely to complete the build in one shot without manual intervention.

If you really don't want to build it yourself, however, you do have at least one option: InterWebPPC. This is a modified build of TenFourFox that explicitly removes some features for performance, so it is not equivalent with TenFourFox, and it is not necessarily built on any particular schedule either. It also does not have separate G4/7400 and G4/7450 builds, though this may not be noticeable on your particular system. You can download prebuilt binaries for G3, G4 or G5 as well as compile it from source using the "unofficial toolkit" above. I haven't seen other downstream builds yet but if you know of one, plan to make one or are using one, post it in the comments.

There are a couple other security fixes I'm reviewing, and I'm toying with some Github specific hacks to deal with its dependence on async/await, but these again will not be done on any particular timetable (I'll post here when or if I get around to them). Still, some of you have already built the browser successfully, and if you can build TenFourFox on your Power Mac you can build pretty much anything. Perhaps this might spark some additional development interest ...

Sunday, October 3, 2021

TenFourFox FPR32 SPR5 available (the last official build)

TenFourFox Feature Parity Release 32 Security Parity Release 5 "32.5" is available for testing (downloads, hashes). Aside from the announced change with .inetloc and .webloc handling, this release also updates the ATSUI font blacklist and includes the usual security updates. It will go live Monday evening Pacific as usual assuming no issues.

As stated previously, this is the last official build before TenFourFox goes into hobby mode; version checking is therefore disabled in this release since there will be no new official build to check for. I know I keep teasing a future consolidated post about how users who want to continue using it can get or make their own builds, but I want to update the docs and FAQ first, plus actually give you something new to test your build out (in this case it's going to be switching the certificate and security base over to Firefox 91ESR from 78ESR). There are already some options already apart from the official method and we'll discuss those, but if you yourself are gearing up to offer public builds or toolkits, feel free to make this known in the comments. Work is a little hairy this month but I want to get to this in the next couple weeks.

Saturday, October 2, 2021

curl, Let's Encrypt and Apple laziness

The built-in version of curl on any Power Mac version of OS X will not be capable of TLS 1.1 or higher, so most of you who need it will have already upgraded to an equivalent with MacPorts. However, even for later Intel Macs that are ostensibly supported -- including my now legacy MacBook Air with Mojave I keep around for running 32-bit Intel -- the expiration of one of Let's Encrypt's root certificates yesterday will suddenly mean curl may suddenly cease connecting to TLS sites with Let's Encrypt certificates. Yesterday I was trying to connect to one of my own Floodgap sites, unexpectedly got certificate errors I wasn't seeing in TenFourFox or mainline Firefox, and, after a moment of panic, suddenly realized what had happened. While you can use -k to ignore the error, that basically defeats the entire idea of having a certificate to start with.

The real hell of it is that Mojave 10.14 is still technically supported by Apple, and you would think updating the curl root certificate store would be an intrinsic part of security updates, but you'd be wrong. The issue with old roots even affects Safari on some Monterey betas, making the best explanation more Apple laziness than benign neglect. Firefox added this root ages ago and so did TenFourFox.

If you are using MacPorts curl, which is (IMHO) the best solution on Power Macs due to Ken's diligence but is still a dandy alternative to Homebrew on Intel Macs, the easiest solution is to ensure curl-ca-bundle is up-to-date. Homebrew (and I presume Tigerbrew, for 10.4) can do brew install curl-ca-bundle, assuming your installation is current.

However, I use the built-in curl on the Mojave MacBook Air. Ordinarily I would just do an in-place update of the root certificate bundle, as I did on my 10.4 G5 before I started using a self-built curl, but thanks to System Integrity Protection you're not allowed to do that anymore even as root. Happily, the cURL maintainers themselves have a downloadable root certificate store which is periodically refreshed. Download that, put it somewhere in your home directory, and in your .login or .profile or whatever, set CURL_CA_BUNDLE to its location (on my system, I have a ~/bin directory, so I put it there and set it to /Users/yourname/bin/cacert.pem).