Minecraft Blogs / Other

Arch Linux — GUI package management

  • 94 views, 1 today
  • 5
  • 2
  • 1
Hebgbs's Avatar Hebgbs
Level 48 : Master Archer
45

Software management in Arch Linux is easy enough…

..But you'd probably want it to be even easier, right? There are all kinds of universal tools which allow for a range of software in distributor repositories to be obtained — GNOME Software, KDE Discover, ElementaryOS' App Centre; along with forks like Pop!_OS' Pop!_Shop, but if you are exploring the weird and wonderful world of Arch Linux, you may be interested in other solutions to avoid using the terminal and give yourself an indicator for when software is available.

The three solutions below are what you can use to not only manage software from repositories, but also from the AUR and if supported, other optional sources. The AUR support is important; you will want it for when building things outside of repositories.

Let's discuss the AUR a bit more…

The Arch User Repository is a place where third-party build files for specific software can be obtained. Where the repositories are the cathedral which has supported software every Arch user can install reliably, the AUR is the community bazaar down the way which has lesser-known or non-repository wares not always guaranteed to work without issues. That isn't to say you will encounter problems — few times had I ever encountered issues with building things from the AUR, and fewer times I've tossed my hands in the air giving up on something I wanted to try. Where there is a will, eventually there will be a way; and with so many options for package management, you will find a way to make what you need work.

AUR Installation methods

We're going to assume ATLauncher for this, since it's a neat piece of software. Along with actually building from the AUR, we can also use helpers; examples for which, of each are provided below:
  • Self-building without tools (but using git)cd /tmp
    git clone https://aur.archlinux.org/atlauncher-bin
    cd ./atlauncher-bin
    makepkg -si
    This is a very simple example, using a piece of software that only relies on dependencies from enabled Arch Linux repositories. If other AUR software is required, you will see the build fail with missing dependencies you then need to build before this. -s fetches other repository packages as-required, -i installs it for you. Otherwise, if -i is excluded you would need to perform the following:

    sudo pacman -U ./atlauncher-bin*.tar.zst
    Globstars (wildcards, asterisks) work when globbing is enabled in your shell, and only for local packages. This will not work for software in repositories without extra work.
  • Assisted building with yayyay -S atlauncher-bin
    You will be prompted to see code diffs and clean building if re-building, just say none (type  N ) for this and move it along.
  • Assisted building with paruparu atlauncher-bin
    Nothing else is necessary to declare here, except for selecting whichever package is the most relevant (in most instances) but be aware that Paru is a very advanced helper with file mamager and editor integrations, where everything can be handled right in the terminal. None of such matters for the scope of this article.

AUR-capable graphical front-ends

Now you understand how the AUR stuff works, we can talk about some of these alternatives. With a base understanding of how to build software from the AUR using the terminal with an absolute bare minimum of effort (depending on how few AUR packages need to be built), you can decide for yourself after some experimenting what method you would like to use the most, which might matter depending on how often critical system changes you make trash your system. Needless to say; if your instance works now, don't mess with it any more than you have to. This goes for every Linux distribution under the sun, and to varying degrees even Windows.

With that said, you will still want to fetch select software from the AUR, and this is where graphical helpers may be a sufficient crutch for people with limited technical experience. Let's go through the motions together and enjoy the process;
  • Octopi
    The easiest of choices, especially for EndeavourOS' default desktop; KDE Plasma. Based on Qt5 (and possibly in-future, Qt6) this utility provides a list of software, as Debian / Ubuntu / Linux Mint users may be familiar with using Synaptic Package Manager, but with the added advantage of alien technology.

    Click the alien emoji button to enable seeing software from the AUR, and you will be able to see what's at the bazaar outside the cathedral. It's in the repos, so it's blessed by the Arch software management team but the system tray utility prompting whether updates exist needs to come from outside there. As follows:sudo pacman -S octopi && cd /tmp
    git clone https://aur.archlinux.org/octopi-notifier-qt5
    cd ./octopi-notifier-qt5 && makepkg -si

    Once installed, execute octopi and check it out. In its preferences, you can determine which AUR helped you wish for it to use, so whenever terminal commands are invoked in it for building software from the AUR, you have options — by default in EndeavourOS, you may build AUR packages with yay.

    For the tray icon utility, which you may define whatever icons you like, this may be executed by launching /usr/bin/octopi-notifier. This has its own variety of options, few of which call on functions in Octopi. Once configured, you'll be able to see when any of your applications have updates available compared against the software you already have, which by default is shown with Pac-Man like ghosts (a nod to Pacman, the package manager's naming inspiration) of varying colours.

  • Pamac
    …And now, you may throw out the window everything you've learned up to this point. Pamac is the self-sufficient, need-no-other solution usually exclusive to the Ubuntu-wannabe Arch Linux fork Manjaro, but various packages are provided by third-parties in the AUR. Yet; to get there, you need to build it first:
    This is for the GTK 4 build, requiring libadwaita. There is a way to build the GTK 2+3 compatible instance of Pamac Manager by building older versions, such as my personal prreference of using the May 7th, 2023 release of libpamac-aur and pamac-aur but Planet Minecraft didn't like some of the URLs I was using, and in hindsight it's better to keep things in the main post simple anyway. I left a comment about the GTK 2+3 build procedure if you dislike GTK 4 Pamac flash-banging you every time you open Pamac Manager.
    cd /tmp
    git clone https://aur.archlinux.org/libpamac-aur
    git clone https://aur.archlinux.org/pamac-aur
    cd ./libpamac-aur && makepkg -si
    cd ../pamac-aur && makepkg -si
    Before building, there are other things you can do in this PKGBUILD file for libpamac-aur to further enhance Pamac's functionality, explained below.

    Before building, there are a couple of other things you can make adjustments to, depending on if you ever want to enable its support for Snap and Flatpak packages. Regardless what revision of libpamac-aur you are building, it's PKGBUILD file will always have the following:ENABLE_FLATPAK=0
    ENABLE_SNAPD=0
    You must re-build libpamac-aur if you had already built it before modifying these toggles. If following the advice in the my comment below this post, you must rebuild that version of libpmac-aur. There's some wiggle room for version inter-compatibility, but just stick with what worked before and you'll be fine.

    Changing any instance of 0 to 1 there will enable Flatpak and Snap packages, respectively. Both varieties of Pamac will require the same packages for each, so enable them at will and this will influence what is available to you upon execution of pamac-manager, which is given to you by building pamac-aur.

    When you launch Pamac Manager, it might be difficult to find preferences at first; the overflow (…) menu at the top left will reveal a menu which enables you to access preferences, at which point you can go into the Third Party tab and enable use of AUR, as well additional formats you've built libpamac-aur with and which sources receive updates as they are made available.

  • Bauh
    Bauh is a recent package manager I had found while researching for this. Built as a Python application also using Qt5, it is meant to be multi-modal as possible; enabling not only management of native and AUR packages, but also optionally Snap, Flatpak and AppImage packages as well, and you are allowed to launch applications directly within Bauh so you may omit the need for an application launcher as long Bauh is running to seek and execute software binaries.

    To install is relatively simple, and we'll also fetch lib32-fakeroot just in case any older applications needing things from multilib are built:cd /tmp
    git clone https://aur.archlinux.org/bauh && cd ./bauh
    makepkg -si && sudo pacman -S lib32-fakeroot

    Though, unlike Pamac or Octopi, it seems Bauh disregards ignored package preferences as-configured in /etc/pacman.conf. But it's something to keep an eye on, as with a little more polish and capabilities to respect ignored packages (since, if using software from the AUR, you may need to ignore some updates as a code freeze or self-management of dependencies), this may well be a premier solution as an alternative to Octopi. Check it out and see if you like it!
Tags

Create an account or sign in to comment.

Hebgbs
05/13/2024 2:00 pm
Level 48 : Master Archer
history
Hebgbs's Avatar

Pamac for GTK 2+3 desktops

If you do not want the added theming complexity of using later Pamac builds with GTK 4, then things are about to get a bit more involved since there's no AUR equivalent to the non-compatible pamac-gtk3 Manjaro package for users of various GTK 2+3 desktop environments, such as (but not limited to) Mate and Xfce:
I prefer to build the May 7th, 2023 release of both packages, since they were both released at the same time and honestly, much of the fixes which stopped making Pamac so problematic were implemented in this build anyway. Feel free to experiment, but this is what I have which works for me.

Build prep

Since everything hereafter is going to get quite a bit involved, everyting is going to be explained in smaller bits to make understanding this procedure a bit easier. But first, we must downgrade Pacman;sudo downgrade pacman
This is quite the insane thing to do, but this is only for build sake. Select version 6.0.2-9 and let operations commence.

Retrieval and building

After downgrading Pacman to 6.0.2-9, let's fetch the older packages for building. To make things easier, we'll also make a new folder inside of /tmp for this and use some other terminal magic to speed things along.
And, because Planet Minecraft dislikes the URLs I am trying to share, but doesn't mind the domain used; do this first before continuing:aur=https://aur.archlinux.org
mkdir /tmp/pamac-gtk3/ && cd /tmp/pamac-gtk3/
wget $aur/cgit/aur.git/snapshot/aur-a7ed088c6b060328df39bf0ace32707be11ea1f6.tar.gz
wget $aur/cgit/aur.git/snapshot/aur-8ddb0d046e61c79c9d1bf6b78eef7db37cbe52d7.tar.gz
find . -name 'aur-*' | xargs -I{} tar xvf {}
cd ./aur-a7ed088c6b060328df39bf0ace32707be11ea1f6

Modifying the PKGBUILD file

Before we carry on building Pamac for GTK 2+3 desktops, you need to open the package build script for libpamac-aur and make some changes to ensure while build procedure is occurring, success is guaranteed.

Open the file named PKGBUILD in a text editor (or execute  $EDITOR ./PKGBUILD ) and seek out this:depends=('glib2>=2.42' 'json-glib' 'libsoup3' 'dbus-glib' 'polkit' 'vte3>=0.38'
'libnotify' 'pacman>=6.0' 'pacman<6.1' 'gnutls>=3.4' 'git'
'appstream-glib>=0.7.18-1' 'archlinux-appstream-data' 'git')

…Why is git specified twice? Anyway, replace with this:depends=('glib2>=2.42' 'json-glib' 'libsoup3' 'dbus-glib' 'polkit' 'vte3>=0.38'
'libnotify' 'pacman>=6.0' 'gnutls>=3.4' 'git' 'appstream-glib>=0.7.18-1'
'archlinux-appstream-data')

Then, continue as regularly-scheduled. or since there are some other changes you can make here, read about those in the main post above and commit them before proceeding.
makepkg -si
cd ../aur-8ddb0d046e61c79c9d1bf6b78eef7db37cbe52d7
makepkg -si

Post-build operations

Now that building is done, we can upgrade Pacman to current release and use the magic of symbolic links to make this older version of Pamac function without complaint. Since older versions of Pamac expect Pacman 6.0, this used an older version of Arch Linux Package manager library, which we need to trick the older builds of Pamac into believing such exists.sudo pacman -S pacman
cd /usr/lib && ln -s ./libalpm.so.14 ./libalpm.so.13
"What do you mean, Pamac? libalpm.so.13 had always been there, the entire time. See?"

Ignoring packages

If you are going to keep with this version of Pamac, you'll need to tell Pacman these packages need to be ignored. You can use Pamac Manager to edit pacman.conf on your behalf, or you can edit pacman.conf yourself;IgnorePkg = pamac-aur libpamac-aur
In a terminal, send  sudo $EDITOR /etc/pacman.conf  and shove that somewhere to ensure Pacman ignores upgrading these packages. Pamac should in-turn ignore them, too.
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome