AUR external package builder

Overview

AUR Build Server

Goal

This project aims to provide an external package making server based on any PKGBUILD based project. Right now it pulls AUR packages builds them with makepkg and serves them on a custom Arch repo.

Building

cargo build

or Docker image:

docker build -t aur-build-server:latest .

Running

Because the program uses pacman to install dependencies it needs root. However running it directly in root is a bad idea. The better way would be to run it with a user that has a no password root authorized access to pacman. Right now there's a Dockerfile that does that except a little more extreme by allowing all root with no password.

You can run a local developer env by using the provided docker-compose and then exec into it like so :

docker-compose up -d
docker-compose exec app /bin/bash

and run your cargo run inside that container

USAGE:
    aur-build-server [OPTIONS]

OPTIONS:
    -c, --config-path <CONFIG_PATH>    [default: config/config.json]
    -h, --help                         Print help information
    -l, --log-path <LOG_PATH>          [default: aur-build-server.log]
    -L, --log-level <LOG_LEVEL>        [default: debug]
    -p, --port <PORT>                  [default: 8888]
    -s, --sign                         
    -V, --version                      Print version information

Api

  • GET /repo Exposes the created Arch repository
  • GET /api/packages Json response including current state of build of all packages
  • GET /api/packages/rebuild Launches a rebuild for all the packages
  • GET /api/packages/rebuild/{package_name} Launches a rebuild for the specified package
  • GET /api/start Starts the workers to process packages
  • GET /api/stop Stops the workers processing packages
  • GET /api/commit Pull built packages that where not yet included in the repository.
  • GET /api/logs/:package_name/:suffix Get build logs for a given package_name. Valid options for suffix are
    • stdout : stdout output of makepkg
    • stderr : stderr output of makepkg
    • stdout_before : stdout output of run_before command if any
    • stderr_before : stderr output of run_before command if any
    • stdout_deps : stdout output of pacman install of dependencies
    • stderr_deps : stderr output of pacman install of dependencies

Api Authentication

The API can be protected using an API key specified in the config.json file. You can auth a request by including the API key in the Authorization header or with ?apikey= as a query string.

TODO

  • Some stuff is still hardcoded (like repo name)
  • Better logging of builds (stdout & stderr of last try)
  • Sometimes race conditions occurs when multiple makepkg processes are syncdeps, find a way to solve this
  • Make use of a proper logging library
  • Restrict sudoers more in Dockerfile
  • Handle command line arguments in docker image
  • More documentation on cmd args
  • Support packages that have AUR packages as deps
  • Include CRON-like system to try to rebuild package regularly
  • Support patching repos
  • Handle config hot reloading
  • Currently, packages are only rebuilt when the there's a new commit on the cloned AUR repository. That may not be the best method for all AUR packages. Include a way to force some packages to always be rebuilt.
  • Probably better api than only GET routes ?
You might also like...
Print pacman package files

Paccat Print pacman package files Usage paccat [options] targets -- files a target can be specified as pkgname, repo/pkgname, url or file

Tool to build OSX package installers

📦 Pak MacOS package installer builder What does pak do? Pak builds MacOS package installers from a project file. Since apple removed PackageBuilder f

Rust crate `needleman_wunsch` of the `fasebare` package: reading FASTA sequences, Needleman-Wunsch alignment

fasebare Rust crate needleman_wunsch of the fasebare package: reading FASTA sequences, Needleman-Wunsch alignment. Synopsis The crate needleman_wunsch

Gecko's trusty package manager and command-line utility.
Gecko's trusty package manager and command-line utility.

Geckos have super-powers, ya'know? Grip is Gecko's trusty package manager and command-line utility. USAGE: grip [FLAGS] [file] [SUBCOMMAND] FLAGS

Yfin is the Official package manager for the Y-flat programming language
Yfin is the Official package manager for the Y-flat programming language

Yfin is the Official package manager for the Y-flat programming language. Yfin allows the user to install, upgrade, and uninstall packages. It also allows a user to initialize a package with the Y-flat package structure and files automatically generated. In future, Yfin will also allow users to publish packages.

A Rust CLI to provide last publish dates for packages in a package-lock.json file

NPM Package Age A Rust CLI which if you provide a npm lockfile (package-lock.json to start), it will give you a listing of all of the packages & the l

Yet another package manager for Rust.

Rpip Installing. Make sure you have just (packages) installed! Once you have just installed move into the root directory (where this file is) and run

🚀 Supercharge your development with easy to setup package scripts

Mist 🚀 Supercharge your development with easy to setup package scripts. Works with every codebase regardless of the language or framework used! Note:

The official command-line interface for the makedeb Package Repository

mpr-cli This is the repository for the MPR CLI, the official command-line interface for the makedeb Package Repository. Installation Users have a few

Comments
  • build(deps): bump regex from 1.5.4 to 1.5.5

    build(deps): bump regex from 1.5.4 to 1.5.5

    Bumps regex from 1.5.4 to 1.5.5.

    Changelog

    Sourced from regex's changelog.

    1.5.5 (2022-03-08)

    This releases fixes a security bug in the regex compiler. This bug permits a vector for a denial-of-service attack in cases where the regex being compiled is untrusted. There are no known problems where the regex is itself trusted, including in cases of untrusted haystacks.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Owner
Seïfane Idouchach
Seïfane Idouchach
Yay - Yet another Yogurt - An AUR Helper written in Go

Yay Yet Another Yogurt - An AUR Helper Written in Go Help translate yay: Transifex Features Advanced dependency solving PKGBUILD downloading from ABS

J Guerreiro 8.6k Jan 1, 2023
A simple AUR helper made in Rust.

AURme A simple AUR helper made in Rust. Description AURme is a simple and minimalist tool made to help users install, update and maintain packages fro

Marco Padeiro 7 Jun 23, 2023
A container image builder tool for OCI (distrobox/toolbox, also podman/docker)

Distrobox Boost A container image builder tool for Open Container Initiative (distrobox/toolbox, also podman/docker). Distrobox is good enough in runn

xz-dev 6 Aug 15, 2023
The joker_query is a cute query builder, with Joker can implement most complex queries with sugar syntax

joker_query The joker_query is most sugared query builder of Rust, with joker_query can implement most complex queries with sugar syntax Features − (O

DanyalMh 8 Dec 13, 2023
Execution of and interaction with external processes and pipelines

subprocess The subprocess library provides facilities for execution of and interaction with external processes and pipelines, inspired by Python's sub

Hrvoje Nikšić 375 Jan 2, 2023
Cucumber testing framework for Rust. Fully native, no external test runners or dependencies.

Cucumber testing framework for Rust An implementation of the Cucumber testing framework for Rust. Fully native, no external test runners or dependenci

Cucumber Rust 393 Dec 31, 2022
REC2 (Rusty External Command and Control) is client and server tool allowing auditor to execute command from VirusTotal and Mastodon APIs written in Rust. 🦀

Information: REC2 is an old personal project (early 2023) that I didn't continue development on. It's part of a list of projects that helped me to lea

Quentin Texier (g0h4n) 104 Oct 7, 2023
Open-source, external CS2 cheat.

?? ProExt - A game enhancer for CS2 ?? Features: ESP ??️ Aimbot ?? Triggerbot ?? Crosshair ⌖ Radar ?? Bomb Timer ?? Spectator List ?? Styling ??️ ...a

Vytrol 5 Nov 29, 2023
Rust library for integrating local LLMs (with llama.cpp) and external LLM APIs.

Table of Contents About The Project Getting Started Roadmap Contributing License Contact A rust interface for the OpenAI API and Llama.cpp ./server AP

Shelby Jenkins 4 Dec 18, 2023
The PC-based component of a two-part Linux driver for using a TI calculator as an external keyboard

Introduction i68apollo is the computer-based component of the two-part i68 (*I*nput from Motorola *68*000[fn:4]-based calculator) prototype userspace

Joseph Burke 4 Aug 17, 2024