Installing the last-known release of Pamac using GTK3

:warning: Danger!

This guide provides advice about critical software packages which many may consider insane and unsafe advice. While this guide will eventually present a return to sanity, if you are not comfortable with performing such operations, then consider this guidance out of your reach and to be ignored.

Preface

If, while using EndeavourOS after having used Manjaro, you find yourself longing for the conveniences it had provided but dislike how newer releases of their graphical package manager use GTK4 and LibAdwaita… I’m right there with you. If you’re willing to go a little insane for sake of visual consistency with your GTK3-based desktop, then you can have the older GTK3-based version of Pamac Manager formerly provided by Manjaro as pamac-gtk3 by building an older release of Pamac.

Software

For this task, we need to fetch the last-known releases of Pamac software from the AUR which uses GTK3 (or, close-enough anyway). We’ll be using Zeph’s older releases of libpamac-aur and pamac-aur — for convenience, as they were both released on the same date; May 7th 2023 — for the remainder of this writ.

In a terminal emulator of preference, cd /tmp and perform the following:

wget https://aur.archlinux.org/cgit/aur.git/snapshot/aur-a7ed088c6b060328df39bf0ace32707be11ea1f6.tar.gz
wget https://aur.archlinux.org/cgit/aur.git/snapshot/aur-8ddb0d046e61c79c9d1bf6b78eef7db37cbe52d7.tar.gz
find . -name 'aur-*.tar.gz' -printf '%f\n' | xargs -I{} tar -xf ./{}

Before any building can be done with these contents, we must first downgrade Pacman. And because latest yay relies upon that, you can ditch it for the time being:

sudo pacman -R yay
sudo downgrade pacman

The last-known version of Pacman which will work with the above downloaded software is 6.0.2-9. Select that one and install, but do not add to IgnorePkgs — we’ll be resolving this little bit of insanity later post-build.

Before doing it, some modifications to libpamac-aur need to be done first:

:memo: You can replace the variable with an editor of your choosing, depending on what you have installed. The variable shown will open whatever your default CLI editor is, which in most cases should be nano unless you’ve changed this.

cd aur-a7ed088c6b060328df39bf0ace32707be11ea1f6
$EDITOR ./PKGBUILD

As we will be upgrading Pacman after this, the declaration of “Above or equal-to Pacman 6.0, but less-than Pacman 6.1” at line 21 will interfere with the want for sanity after building, so edit PKGBUILD to remove 'pacman<6.1', and you may as well remove that second declaration of 'git' at line end as well because why is that there?

Also be sure to edit your options for third-party packages based upon your interests. There are toggles for Snap and Flatpak at the top of the PKGBUILD file you should consider setting true by changing either (or both) 0 to 1 before saving.

Once saved, exit and proceed as normal:

:pencil2: You can add MAKEFLAGS='-j$(nproc)' to each makepkg command for using all of your CPU cores to build, or replace the variable with a number to build with a specific number of cores in case using all of the CPU at once causes issues. More cores means faster building, but it shouldn’t be at the expense of system stability. If you are not sure what this means, use the example provided below as-is.

makepkg -si
cd ../aur-8ddb0d046e61c79c9d1bf6b78eef7db37cbe52d7
makepkg -si

Once that is performed, we can now return to a “Sane” system. But, since the newly-installed software relies upon an older Pacman, it’ll also expect an older revision of the Arch Linux Package Manager library. We can fix that issue, too:

sudo pacman -S pacman
sudo ln -s /usr/lib/libalpm.so.15 /usr/lib/libalpm.so.13

pamac-manager

After that, Pamac Manager will comply with your request to execute it and behold — it uses your GTK3 theme colours. What a delight. When finished gawking at how good (or bad) GTK3 Pamac Manager looks, you can access its preferences in the burger menu nearby window controls and in the Advanced tab, under the Ignored Packages heading, add pamac-aur and libpamac-aur so neither of these are updated via Pamac in the future, else Pamac will happily upgrade itself and make all of the above work fruitless.

1 Like