RUA: Yet Another Way to Install AUR Packages in Arch

An AUR helper written in Rust but with its own, easier to follow, subcommand structure.
Warp Terminal

Love it or hate it, an Arch user cannot ignore AUR, a community-oriented repository where Arch Linux users can share their own packages. After all, the list of official packages in Arch Linux can be considered a bit restrictive. You’ll probably find that obscure app you’ve been looking for weeks there in AUR.

While you can build packages from the AUR, most people feel more comfortable using AUR helpers like yay, Paru, pikaur etc.

The most used AUR installer is yay, Yet Another Yogurt. yay follows the very same API as Pacman, which is very convenient for Arch Linux users: you don’t need to learn a new API for managing AUR packages.

Okay, since yay is enough a tool, we don’t need another one, okey dokey, end of story, right?

Nope… 😁

I wouldn’t be writing this article if I didn’t have an exciting alternative to show you!

Meet RUA: AUR helper written in Rust

Do you remember my UPT article? If so, I’m considering you are that kind of person that rather stick to a common interface than use a different one for each system. The UPT interface is way more similar to APT or Homebrew than to Pacman.

If you liked UPT, I guess you might also prefer an AUR installer with a similar interface.

It exists and it’s called RUA which is AUR spelled backward.

It is a build tool for AUR, just like yay, but with subcommands like install, upgrade, and search instead of -S, -U, -Syu, -R, -Q, and so on.

I actually prefer the regular install, upgrade, search options in the command then trying and remembering the permutation and combination of S, Y, U, R etc letters.

And that's the reason why I love RUA. Let me show you how to install it and use it.

Installing RUA

It’s necessary to install some dependencies before you install RUA:

sudo pacman -S --needed --asdeps git base-devel bubblewrap-suid libseccomp xz shellcheck rustup
sudo rustup install stable
installing dependencies for RUA
🚧
DO NOT install RUA as root, it’s intended to be performed ONLY as a sudoer, not directly by root.

Since RUA is a tool made in Rust, and it can be easily installed by cargo:

rustup default stable
cargo install rua
installing rua with cargo

Using RUA for AUR packages

Let’s install Brave browser on Arch Linux with RUA. Search for it first and then install the package:

rua search brave
rua install brave-bin
installing brave in Arch with rua

Considering the happy flow, you can answer most of the questions:

  • m ([M]=accept/merge)
  • o ([O]=ok, use package and [O]=ok, proceed)
  • s (Enter S to ‘sudo’ install it)
  • y (any question that ask for a “yes”)

Now I decided not to keep it, so let’s uninstall it using the Pacman or UPT command.

upt remove brave-bin

Upgrading packages

Pacman and UPT have no information about AUR packages’ source for upgrade! Nevertheless, you can use RUA itself to upgrade them.

The following command updates all packages installed by rua:

rua upgrade

A list of the RUA’s full capabilities can be obtained from the command:

rua --help
help

Safety

When building packages, RUA uses the following filesystem isolation:

  • Build directory is mounted read-write.
  • Files "$GNUPGHOME"/pubring.kbx and "$GNUPGHOME"/pubring.gpg are mounted read-only (if exists). This allows signature verification to work.
  • The rest of ~ is not visible to the build process, mounted under tmpfs.
  • /tmp and /dev and /proc are re-mounted with empty tmpfs, devtmpfs and procfs accordingly.
  • The rest of / is mounted read-only.
  • You can whitelist/add your mount points by configuring wrap_args. See example in ~/.config/rua/.system/wrap_args.sh.example.

All builds are run in a namespace jail, with seccomp enabled and user, ipc, pid, uts, and cgroup being unshared by default.

Conclusion

If you feel comfortable with UPT, you can use the pair UPT+RUA to manage all your packages, both official and AUR.

But that's just my suggestion. I like Rust and I like exploring various newer CLI tools written in Rust. And lately, I am liking sharing them with you.

So, please tell me if like discovering such tools. What features you like or dislike in RUA?

✍️
Rodrigo Montegasppα Cacilhας is a Linux veteran with over 25 years of experience playing with Linux systems and writing code.
About the author
Community

Community

Written by a community member, a reader who is not part of the It's FOSS writing team. The views and opinions expressed are those of the authors and do not necessarily reflect that of It's FOSS.

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.