Pacstall brings the freedom of the AUR to Ubuntu
AUR You Ready?
Many users wish Ubuntu had a free and easily accessible user-driven package repository like Arch's AUR. Pacstall steps into the gap.
Ubuntu is one of the most popular Linux distros, but it is still missing some benefits that other Linux communities enjoy. For instance, the Ubuntu repositories might not have the package (or the latest version) you need, which means you'll need to hunt around GitHub for source code to compile that package yourself. The two official alternative methods for getting new versions of packages (snaps and PPAs) are also lacking in many areas (see the "Issues with Snaps and PPAs" box).
Issues with Snaps and PPAs
Snaps use mount points to load themselves, which makes it difficult to work with debugging commands such as lsblk
. Those mount points also are not removed after the snap has been removed, which is very annoying. Snaps also take some time to load, which frustrates many users. PPAs are essentially mini-repositories for packages, which can help users who may want a couple up-to-date packages while still keeping the rest of the system in line with Ubuntu's repositories. Unfortunately, PPA's can easily be abandoned without much detection and can lead to dependency hell when upgrading.
When it comes to finding and installing new software from a broad and diverse user base, many Ubuntu users look longingly to Arch Linux and its popular Arch User Repository (AUR). The AUR is a large community-driven repository. The goal of AUR is to provide users with easy access to packages that aren't present in Arch's official repositories. The package format used with AUR is simple enough that a developer or maintainer from almost any software project can easily create an AUR package for their software that anyone can use for quick and simple package installation. The AUR, which currently contains around 58,000 packages, has helped Arch become the distro for users who want the greatest software availability.
Many Ubuntu users have wondered if Ubuntu could have something like the AUR. Enter Pacstall [1] – a command-line package manager that aims to bring the software availability and freshness of Arch/AUR packages to Ubuntu and Debian. Like the AUR, the Pacstall project contains an open repository of package scripts that anyone can add to, improve, and utilize.
The Pacstall project is just getting started, and it doesn't have anywhere near the number of packages available in the AUR, but the number is growing as more users become aware of the Pacstall project.
How to Install
To install Pacstall, simply run the command:
sudo bash -c "$(curl -fsSL https://git.io/JsADh ||wget -q https://git.io/JsADh -O -)"
Then, check if Pacstall has successfully installed by running this command, which will print your version number:
pacstall -V
Using Pacstall
To search for a package, run:
pacstall -S foo
To install a package with Pacstall, for instance, neofetch
(located in the Pacstall user repository [2]), simply run the following command:
pacstall -I neofetch
And to install from a local pacscript:
pacstall -Il neofetch
Now if you want to remove a package, the command is simple as:
pacstall -R neofetch
which will remove neofetch
and run post removal hooks (if any are available). Every so often, you will want to upgrade packages, which is done by running:
pacstall -Up
If you want to get more information on a package you've installed, run
pacstall -Qi neofetch
Making a Package
Like the AUR, Pacstall is designed to make it easy for any user to create a package. For example, suppose I want to make a package for st, the simple terminal. I start by making a file called st.pacscript
and filling it with the contents of Listing 1.
Listing 1
Script Template
01 name="" 02 version="" 03 url="" 04 build_depends="" 05 depends="" 06 description="" 07 hash="" 08 maintainer="" 09 10 prepare() { 11 } 12 13 build() { 14 } 15 16 install() { 17 }
Then I fill in st
for the name
variable and 0.8.4
for the version. To find a tarball for st, I go to the project website [3] and scroll to the bottom to where it says Download. Copy the link to the tarball (in my case, https://dl.suckless.org/st/st-0.8.4.tar.gz), and fill that link into the url
variable.
St does not specify Ubuntu dependencies, but, to save you the hassle, the one dependency needed is libx11-dev
. Put that into the build_depends
variable. This will be installed by Apt right before the building process. Now you need to give a hash to verify the authenticity of the tarball when you download. (This step is optional but highly encouraged.) Simply run:
wget -q https://dl.suckless.org/st/st-0.8.4.tar.gz && sha256sum st-0.8.4.tar.gz
This command will print out the checksum of the tarball. You only need the first string, with no file name included. Put that into the hash
variable. Fill out description
with a short and concise description of st, and fill in maintainer
with your name. You can now remove any variables not used. In the prepare
and build
functions, add the command true
, because st does not need to be built before installing.
In the install
function, put:
sudo make clean install DESTDIR=$STOWDIR/st
This looks like a fairly standard make install
except for the ending. The DESTDIR
will tell make
to build $STOWDIR/st
, which is a path to /usr/src/pacstall/st
. This step is needed because Pacstall will symlink that directory to the root directory later, allowing easy file management for each package. Now it's time to test the pacscript. Exit your text editor and run this command to install from a local file:
pacstall -Il st
This command will install the script you just made onto your system. For information on how to make more complicated scripts, visit Pacstall's informative guide to making a pacscript [4].
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Fedora Asahi 40 Remix Available for Macs with Apple Silicon
If you've been anticipating KDE's Plasma 6 for your Apple Silicon-powered Mac, then you're in luck.
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.