All Projects → vn971 → Rua

vn971 / Rua

Licence: gpl-3.0
Build tool for Arch Linux providing control, review and jailed build options

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Rua

Octopi
A powerful Pacman (Package Manager) front end using Qt libs
Stars: ✭ 331 (+47.77%)
Mutual labels:  archlinux, aur
Pacaur
[unmaintained] An AUR helper that minimizes user interaction
Stars: ✭ 818 (+265.18%)
Mutual labels:  archlinux, aur
Aurutils
Helper tools for the AUR.
Stars: ✭ 695 (+210.27%)
Mutual labels:  archlinux, aur
Deepin Wine Tim Arch
Tencent TIM on Deepin Wine5(com.qq.office.deepin) For Archlinux
Stars: ✭ 255 (+13.84%)
Mutual labels:  archlinux, aur
Sielo Legacy
An open source browser made with Qt and WebEngine
Stars: ✭ 113 (-49.55%)
Mutual labels:  archlinux, aur
Bauh
Graphical user interface for managing your Linux applications. Supports AppImage, Arch (repositories/AUR), Flatpak, Snap and native Web applications.
Stars: ✭ 280 (+25%)
Mutual labels:  archlinux, aur
Yay
Yet another Yogurt - An AUR Helper written in Go
Stars: ✭ 7,100 (+3069.64%)
Mutual labels:  archlinux, aur
gitkraken
Arch User Repository Gitkraken
Stars: ✭ 113 (-49.55%)
Mutual labels:  aur, archlinux
Mal
MAL: A MyAnimeList Command Line Interface [BROKEN: BLAME MyAnimeList]
Stars: ✭ 104 (-53.57%)
Mutual labels:  archlinux, aur
Aurdroid
Android AUR [Arch Linux user Repository] packages browser
Stars: ✭ 88 (-60.71%)
Mutual labels:  archlinux, aur
PKGBUILD
PKGBUILDs; almost all on the AUR
Stars: ✭ 16 (-92.86%)
Mutual labels:  aur, archlinux
Cylon
A CLI TUI menu driven bash shell script supporting updates, maintenance, backups and system checks for an Arch based Linux distro
Stars: ✭ 121 (-45.98%)
Mutual labels:  archlinux, aur
arch-pkgs
Management repo for my Arch Linux systems. Mirror of https://gitlab.com/mdaffin/arch-pkgs
Stars: ✭ 79 (-64.73%)
Mutual labels:  aur, archlinux
Pacback
Advanced Version Control for Arch Linux
Stars: ✭ 146 (-34.82%)
Mutual labels:  archlinux, aur
cargo-aur
Prepare Rust projects to be released on the Arch Linux User Repository
Stars: ✭ 49 (-78.12%)
Mutual labels:  aur, archlinux
Trizen
Lightweight AUR Package Manager
Stars: ✭ 696 (+210.71%)
Mutual labels:  archlinux, aur
aurblobs
Automatically create binary repositories from AUR packages
Stars: ✭ 14 (-93.75%)
Mutual labels:  aur, archlinux
toolbox
Unified kit with all the scripts required for maintaining the repository 🧰
Stars: ✭ 60 (-73.21%)
Mutual labels:  aur, archlinux
Aur Out Of Date
Determines out-of-date AUR packages w.r.t. upstream version
Stars: ✭ 33 (-85.27%)
Mutual labels:  archlinux, aur
Asus Fan Control
🌀 Fan control for ASUS devices running Linux.
Stars: ✭ 120 (-46.43%)
Mutual labels:  archlinux, aur

RUA Build Status crates.io

RUA is a build tool for ArchLinux, AUR. Its features:

  • Allows local patch application
  • Provides detailed information:
    • show upstream changes upon package upgrade
    • see code problems in PKGBUILD via shellcheck, taking care of special variables
    • warn if SUID files are present in an already built package, and show them
    • show file list, executable list and INSTALL script in already built packages
  • Minimize user distractions:
    • verify all build scripts once, build without interruptions
    • group built packages for batch review
  • Uses a security namespace jail:
    • supports --offline builds
    • builds in isolated filesystem, see safety section below
    • uses seccomp to limit available syscalls (e.g. the build cannot call ptrace)
    • the build cannot execute sudo (filesystem is mounted with nosuid)
  • Written in Rust

Use

rua search wesnoth

rua info freecad

rua install pinta # install or upgrade a package

rua upgrade # upgrade all AUR packages. You can selectively ignore packages by using --ignore or adding them to IgnorePkg in pacman.conf (same as with non-AUR packages and pacman). You can upgrade only specific packages with rua install A B C.

rua shellcheck path/to/my/PKGBUILD # run shellcheck on a PKGBUILD, discovering potential problems with the build instruction. Takes care of PKGBUILD-specific variables.

rua tarcheck xcalib.pkg.tar # if you already have a *.pkg.tar package built, run RUA checks on it (SUID, executable list, INSTALL script review etc).

rua builddir --offline /path/to/pkgbuild/directory # build a directory.

rua --help; rua subcommand --help # shows CLI help

Install dependencies

sudo pacman -S --needed git base-devel bubblewrap-suid xz shellcheck cargo

Install (the AUR way)

git clone https://aur.archlinux.org/rua.git
cd rua
makepkg -si

In the web interface, package is rua.

Install (the Rust way)

RUSTUP_TOOLCHAIN=stable cargo install --force rua

This does not include bash/zsh/fish completions, but everything else should work. If you use development version pacman-git, use cargo install --features git rua instead.

How it works / directories

directory meaning
~/.config/rua/pkg/ Step 1, directory where AUR packages are cloned into. You review and make local modifications here
~/.cache/rua/build/ Step 2, reviewed packages are copied here, and then built
~/.local/share/rua/checked_tars/ Step 3, directory where built and tarcheck-ed packages are stored (*.pkg.tar.xz)
~/.config/rua/wrap_args.d/ entrypoint for basic configuration of the security wrapper script
~/.config/rua/.system/ internal files
$GNUPGHOME/pubring.kbx
$GNUPGHOME/pubring.gpg
read-only access to these two files is granted when building, to allow signature verification
All other files All other files in ~ are not accessed by RUA and inaccessible by built packages (see Safety section below)

How it works / reviewing

Knowing the underlying machinery is not required to work with RUA, but if you're curious anyway, this section is for you.

All AUR packages are stored in designated git repositories, with upstream/master pointing to remote AUR head and local master meaning your reviewed and accepted state. Local branch does not track the remote one.

RUA works by fetching remote updates when needed, presenting remote changes to you and merging them if you accept them. Merging and basic diff view are built-in commands in RUA, and you can drop to shell and do more from git CLI if you want.

How it works / dependency grouping and installation

RUA will:

  1. Fetch the AUR package and all recursive dependencies.
  2. Prepare a summary of all pacman and AUR packages that will need installing. Show the summary to the user, confirm proceeding.
  3. Iterate over all AUR dependencies and ask to review the repo-s. Once we know that user really accepts all recursive changes, proceed.
  4. Propose installing all pacman dependencies.
  5. Build all AUR packages of maximum dependency "depth".
  6. Let the user review built artifacts (in batch).
  7. Install them. If any more packages are left, go two steps up.

If you have a dependency structure like this:

your_original_package
├── dependency_a
│   ├── a1
│   └── a2
└── dependency_b
    ├── b1
    └── b2

RUA will thus interrupt you 3 times, not 7 as if it would be plainly recursive. It also won't disrupt you if it knows recursion breaks down the line (with unsatisfiable dependencies).

Limitations

  • This tool focuses on AUR packages only, you cannot -Suy your system with it. Please use pacman for that.
  • Optional dependencies (optdepends) are not installed. They are skipped. Please check them out manually when you review PKGBUILD.
  • The tool does not handle versions. It will always install the latest version possible, and it will always assume that latest version is enough.
  • Development packages such as "-git" packages are only rebuilt when running rua upgrade --devel. No version checks are done to avoid unnecessary rebuilds. Merge requests welcomed.
  • Unless you explicitly enable it, builds do not share user home (~). This may result in maven/npm/cargo/whatever dependencies re-downloading with each build. See safety section below on how to whitelist certain directories.
  • Environment variables "PKGDEST" and "BUILDDIR" of makepkg.conf are not supported. Packages are built in isolation from each other, artifacts are stored in standard locations of this tool.
  • Due of safety restrictions, X11 access might not work during build.
  • Due to a bug in fakeroot, creation of root-owned packages inside PKGBUILD-s package() does not work. This happens when archives are extracted in package() function. Doing it in prepare() or giving a key like tar --no-same-owner is the work-around.

Safety

Do not install AUR packages you don't trust. RUA only adds build-time isolation and install-time control/review.

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.

Additionally, all builds are run in a namespace jail, with seccomp enabled and user, ipc, pid, uts, cgroup being unshared by default. If asked from CLI, builds can be run in offline mode.

Other

The RUA name is an inversion of "AUR".

This work was made possible by the excellent libraries of libalpm, raur, srcinfo and many others.

IRC: #rua @freenode.net

Project is shared under GPLv3+. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project (rua) by you, shall be licensed as GPLv3+, without any additional terms or conditions.

For authors, see Cargo.toml and git history.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].