Alien Pastures

My thoughts on Slackware, life and everything

Building Chromium for Slackware

I thought it would be helpful, and in any case insightful, to describe how I build the Chromium (also -ungoogled) packages for Slackware.

It is not a trivial task but a necessary one I believe. Slackware users should have a choice of browsers – some prefer Mozilla Firefox, others Google Chrome, and then there’s LibreWolf and Chromium that are built on the same code base as respectively Firefox and Chrome. There are others too, but I decided to stick with packages for Librewolf  and Chromium (-ungoogled). This article will focus on Chromium because Librewolf is pretty trivial to compile into a package.

Google develops the Chromium source code using tools which it partly created and maintains itself and for another part extends and patches them from the originals. Most notorious are the heavily customized Clang and Rust compilers used inside Google. The Chromium code reflects those compiler customizations because its codebase contains sections that will fail to compile using the official releases from the LLVM Project and the Rust Team (on which Slackware bases its own llvm and rust packages).

Google formally stopped supporting 32bit releases for their binary distribution of Chrome as long ago as 2015 (that’s ten years ago!) but indicated that the Chromium source code would still be compilable on 32bit platforms. Over time it became clear that internal code reviews and checks only happen on 64bit OS-es and the 32bit compatibility has been susceptible to “code-rot” ever since. As evidenced in my SlackBuild script where more and more patches and code modifications have been added to keep the ability to compile Chromium sourcecode into 32bit binaries.

Google provides binary snapshots of their internally used versions of Clang and Rust which reduces the need for patches a lot. Unfortunately Google at some point in time stopped providing 32bit binaries and so these binaries are nowadays only provided for 64bit machine architectures. In the past I relied on these binary snapshots to compile Chromium for Slackware.
After Google stopped providing those 32bit binaries, I have been putting a lot of effort in making Chromium compilable using the Slackware stock Clang and Rust compilers.

Note: I compile Chromium and Chromium-ungoogled on Slackware 15.0 and make these packages available in repositories for both Slackware 15.0 and -current. The challenge with Slackware 15 is that the provided llvm and rust compiler packages are way too old to be able to compile Chromium. Therefore Patrick Volkerding provides newer llvm and rust packages in the ‘extra’ section of the Slackware 15.0 repository. From time to time I run into new issues with clang and upon request, Patrick then builds and uploads a newer version of llvm into the repository.

Let’s have a look at the required updates for a Slackware 15.0 system (Slackware-current is up-to-date on all these package versions):

  • nodejs >= 20.13.0
  • llvm >= 21
  • rust >= 1.88.0
  • nasm >= 2.14
  • cmake >= 3.30.1

Some of these updates for Slackware 15.0 are in my own package repository (cmake, nodejs, nasm), some others in the ‘extra’ section of the official Slackware 15.0 package tree (llvm and rust).

When these updates are applied to Slackware 15, or in case you are running Slackware-current, compiling a Chromium package is simply:

# ./chromium.SlackBuild

… and compiling Chromium-ungoogled needs this commandline:

# USE_UNGOOGLED=1 ./chromium.SlackBuild

Note: you will need an enormous amount of RAM and lots of free disk space (in the filesystem which $TMP is pointing to) to run this build successfully, and then a lot of patience for that build to complete (my QEMU virtual machine needs about 12 hours to complete this build – per package).

From time to time, usually when the major version number of Chromium makes a jump, the source code has been modified to such an extent that the Slackware compilers will fail to build the binaries successfully. In that case (and if you are creating a 64bit package) you can force the SlackBuild to download and use Google’s binary clang and rust compiler snapshots using this commandline:

# BUILD_CLANG=1 ./chromium.SlackBuild

# BUILD_CLANG=1 USE_UNGOOGLED=1 ./chromium.SlackBuild

Usually this way the compilation will be successful.

Attribution:
Next to the Arch Linux PKGBUILD maintainer for Chromium, I depend more and more on the unparalleled knowledge of the NixOS package maintainers, to find the proper patches for my SlackBuild.
I would have been forced to drop the 32bit package support a long time ago if it were not for emilylange and networkException (NixOS) and Christian Heusel and Evangelos Foutras (Arch Linux).

I hope this article gave some insight into the life of a package maintainer.

Cheers, Eric

No Kings! Power belongs to the people

To my friends and their friends and family in the USA: stand up against blatant corruption, greed and power grabs. Fight the corrosion of your democracy and the rise of authoritarianism and fascism in the “land of the free”.

I stand with you.

Anubis is now guarding the git server

I have had it with the onslaught of AI and indexing bots that keep my web servers in a constant state of near-crashes.
In particular git.slackware.nl is not handling the load well. It’s powered by cgit, and with tens of thousands of requests per hour to serve the details of git commits, cgit experiences a lot of segfaults. I already had to disable the download of compressed git-snapshot tarballs because all the “xz” processes that were running as a result of serving up “tar.xz” files were eating most of the server’s resources.

The filters that I had built into the Apache httpd server, as well as fail2ban taking care of the really obvious offenders, were not sufficient.

So. I have built a package for anubis, the self-proclaimed Web Application Firewall that protects web sites from AI scraping bots by challenging the visitor with a proof-of-work. This is essentially a calculation the client (a browser, or a web-scraping script) has to make before allowed entry. That calculation takes the shape of a small math problem that is expensive to compute, but easy to verify, like hashing a string with a given number of leading zeroes.
For scraping bots, the cost of these calculations will be big enough that they stop trying. Mere individuals like you and me, we will notice the Anubis loading page for a second and then it will stay out of our way as long as the cookie it places is valid.
Common Linux download programs like wget and curl are not affected by Anubis because it uses  a sensible set of defaults in its filtering behavior with the intention to not infuriate the humans accessing the site.

The anubis package that I built, will create an ‘anubis’ user and group when it is installed. It will also install a startup script in ‘/etc/rc.d/’ and a block is added to ‘/etc/rc.d/rc.local’ so that Anubis will start on every boot of the computer.

Anubis can run in multiple separate instances. A necessity because for each web site you want to protect you’ll have to run a separate instance, listening on a separate TCP port.

If there’s interest in the details of setting up Anubis on Slackware, let me know in the comments section below and then I’ll write up that documentation in a follow-up article.

If you experience issues accessing git.slackware.nl because of Anubis, also let me know below!

Cheers, Eric

New URL: blog.slackware.nl

Me

Hi all.
It was time to migrate my blog to a new server. The URL ‘alien.slackbook.org/blog/’ has changed to ‘blog.slackware.nl’.

For years, my hosting server has been https://harrier.slackbuilds.org/ – ever since I had to move away from the original host, the slackware.com server (Pat does not trust PHP code).
I am eternally grateful to the team of people (Robby Workman and friends) who purchased its hardware and have been maintaining it in a US datacenter for all that time. They gave me full root rights over my virtual machine. Also many thanks to Teklinks for offering colocation and bandwidth!
Check out harrier‘s frontpage to get an idea of all the Slackware community services are hosted on that iron.

But the QEMU VM which runs on harrier and which essentially hosted my blog, is still on Slackware 14.2. Over time I had to upgrade httpd, mariadb and php to keep the WordPress code happy, but now WordPress is again nagging me about not having PHP 8 and to be honest, Slackware 14.2 has not received security updates for two years now. I am not feeling comfortable with that.
I had a short chat with Robby and he indicated that there’s just too much to be done and too little time to do it. I fully understand that and I have not bothered him with my worries.

I decided to migrate the blog to a new Slackware -current host. I have done a few trial runs over the years; it is not trivial to move a WordPress blog to a new domain and at the same time to a new host. But I think I figured out the challenges and ironed out the kinks.

Also, this was a good opportunity to reconsider the hosting location. Harrier runs in a US datacenter. I am not at all happy with the racist and autocratic direction the US is taking under Trump and his MAGA cult. I’ve seen people being detained and/or sent back at airport border control checkpoints simply because they have written online posts that are unfavorable to Trump. Look at my previous posts here on the blog – I will not attempt to enter the US as long as Trump is its dictator. And therefore it makes sense to choose the European Union as the new location for my blog server.

Welcome to blog.slackware.nl! Please update your bookmarks.
I am creating a redirect for alien.slackbook.org/blog/ to get that forwarded to the new URL, but it never hurts to spread the word to your friends.

Cheers, Eric

A Slackware theme for your Grub

Long ago, when all we had was 32bit Slackware and I was working on realizing the 64bit variant of Slackware, I created a ’64bit’ lilo bitmap with the Slackware  logo, to make it more obvious to your friends that your computer is booting 64bit Slackware and not some obscure other distro.

Lilo is getting a bit old in the tooth though. Mdern computers come with UEFI instead of good old BIOS, and that computer cannot boot on lilo. You’ll have to use elilo or grub instead.
Until now, Slackware supported elilo in the distro installer, but if you wanted to give your computer a Grub bootloader instead of elilo, you would have to do that manually right after the installation of Slackware is completed. Or you could swap out elilo for grub at any later time of course – it is not difficult.

Slackware-current is working its way toward making Grub the default bootloader. The process of installing or upgrading kernels is now automated to the level that if you have Grub installed as the bootloader, there’s nothing you need to do yourself: an initrd is generated based on your preferences (preferences can be written to the files /etc/default/grub , /etc/default/geninitrd and /etc/mkinitrd.conf), the grub bootmenu is refreshed and that’s it!

Recently I switched to Grub on this laptop which until then had been happily booting via elilo. As you may have seen, I use a nice graphical boot screen in liveslak and when I booted this laptop via Grub the first time, I was a bit disappointed by the text-only boot menu much like the boot experience I had with elilo.

But I like my liveslak boot screen!

So I set myself to finding out how I  could install and enable that same boot screen in regular Slackware.

The result is in the ZIP archive http://www.slackware.com/~alien/liveslak-grub2-theme.zip . Here’s how to use it to get a nice boot splash on your Slackware computer with Grub (the prior installation of Grub is something I leave to you):

  •  Extract the archive containing the Grub theme into directory /boot/grub/themes/
  • You will now have a new directory /boot/grub/themes/liveslak-grub2-theme – change its name to /boot/grub/themes/liveslak
  • In the file ‘/etc/default/grub‘ add or modify the following lines:
    GRUB_THEME=/boot/grub/themes/liveslak/theme.txt
    GRUB_FONT=/boot/grub/themes/liveslak/dejavusansmono12.pf2
    GRUB_GFXMODE=1024x768,800x600,640x480,auto
    GRUB_GFXPAYLOAD_LINUX=keep
  • Then run (as root) the command: update-grub
  • Now, reboot. You should be greeted by a Slackware logo and the Grub boot menu.

Let me know in the comments section what you think of this!

Cheers and enjoy the weekend, Eric

« Older posts

© 2025 Alien Pastures

Theme by Anders NorenUp ↑