Description: | Extension of Powerpill with AUR and ABS support. |
Latest Version: | 2021.12.31 |
Source Code: | src/ |
Architecture: |
|
Dependencies: |
|
Build Dependencies: |
|
Arch Repositories: |
|
AUR Page: | bauerbill |
Arch Forum Thread: | 205834 |
Tags: |
Bauerbill is an extension of Powerpill with AUR and ABS support. It includes a number of features to automate package configuration and basic trust management. It outputs build scripts in Bash that can be further customized as needed or run automatically via a provided wrapper. See the list of features and the documentation below. See the Powerpill page for further configuration details.
Do a full system upgrade with AUR support:
sudo bauerbill -Syu --aur
./build/download.sh
./build/build.sh
This is equivalent to using the wrapper script, which will be used for the rest of the examples:
bb-wrapper -Syu --aur
Full system upgrade with all upgradable packages built from source via ABS:
bb-wrapper -Syu --build-targets
Install some AUR package foo
with full dependency
resolution:
bb-wrapper -S --aur foo
Generate the download and build scripts for some AUR package
foo
without pre-installing the sync dependencies. The
dependencies will be managed by makepkg
when the packages
are built.
bauerbill -S --aur --no-predeps foo
Rebuild and re-install powerpill
from the AUR instead of
my repo:
bb-wrapper -S --aur AUR/powerpill
List all packages availabe in the repos and the AUR:
bauerbill -Sl --aur
Search for all repo and AUR packages with the term “foo”:
bauerbill -Ss --aur foo
Get information about powerpill
from both my repo and
the AUR package:
bauerbill -Si --aur powerpill AUR/powerpill
Generate build scripts with dependency resolution for multiple AUR packages without pre-emptive sync dependency installation (i.e. this can be run without root privileges):
bauerbill -S --aur --nobqd aurpkg1 aurpkg2 aurpkg3 ...
Generate build scripts with dependency resolution for multiple repo and AUR packages without pre-emptive sync dependency installation (i.e. this can be run without root privileges):
bauerbill -S --build-targets --aur --nobqd repopkg1 repopkg2 repopkg3 aurpkg1 aurpkg2 ...
Gather around children!
Powerpill was the first community contribution that I posted years ago when I began using Arch. It started as a simple wrapper script around Pacman and Aria2 but thanks to multiple issues and noobish myopy, it gradually grew to a monstruous labyrinthine ecosystem of several Perl modules that re-implemented a lot of ALPM (Pacman’s backend, written in C). Had I known better and had the skills, I would have tried to create proper Perl bindings for ALPM, but nope.
The modules worked and several package-oriented utilities arose from them (e.g. Reflector). Eventually a few years ago I ended up creating the original Bauerbill which was an extension of Powerpill with AUR and ABS support. It worked relatively well and experienced modest popularity during its first run. All was well and the land knew peace and updated systems, until one fateful day when Allan truly did break everything. :P
There was a major release of Pacman that converted the sync databases to archives along with some other changes iirc, which broke critical functionality in my Perl modules. This was entirely my own fault for having designed them so poorly (read: not at all) and although I could have fudged the code even further to work around the changes, it just wasn’t worth it to me and so I let that ecosystem die.
I bid my farewell to Perl, whom I had been seeing less and less as I had begun spending ever more time with Python. pyalpm and numerous package APIs emerged and I started writing code around them. Several tools appeared or reappeared: by popular demand Reflector was quickly reborn, then a series of metalink scripts resulted in pm2ml, “powerpill lite” wrapper scripts, and finally a fully functional re-incarnation of Powerpill. New AUR APIs and functionality continued to appear as well and gradually python3-aur grew out of various interface wrappers. I was slowly collecting everything needed to recreate Bauerbill but I just didn’t have the time to sit down and put it all together. I finally found some time during the last few days.
Bauerbill is finally reborn!
With this new version of Bauerbill I have taken a different approach
that will hopefully prove both more versatile and more maintainable.
Instead of trying to be a Pacman emulator that transparently wraps the
AUR and ABS, this is a Powerpill extension that generates scripts to
build packages. A simple wrapper script (bb-wrapper
) is
provided to make this transparent to the user.
Using scripts to run all fo the build commands makes the process more transparent and configurable for the user while avoiding all of the concerns of privilege management (e.g. upgrading system as root, dropping root privileges to build packages, escalating privileges to install built packages).
The scripts invoke the utility bb-query_trust
which can
track the user’s list of trusted AUR users and packages combinations
(see below).
When run with AUR or ABS support, bauerbill will generate 2 or 3 script files in the output directory:
The generated scripts are configurable via the Bauerbill configuration file:
Note that all of these hooks and commands can be configured per package using pattern matching for versatility. See the bauerbill.json man page for details.
bb-query_trust is a tool to check if a package should be trusted for building given its maintainers and modification time. If all maintainers are in a custom list of trusted users then the package will be trusted, otherwise if the specific combination of package, maintainers and optionally the mtime has previously been trusted then it will be trusted again. If neither condition is met then the user can choose to trust the package, trust the combination indefinitely, or trust the maintainers.
If the package is not trusted then the script will exit with an error. It is used to stop execution of the build and dlownload scripts.
PKGBUILDs are executable scripts and are run by makepkg but building packages. They come from an untrusted source and may harm your system due to incompetence or malice. You should always check a PKGBUILD and the related files befure running makepkg.
bauerbill.json - Bauerbill configuration file
The Bauerbill configuration file is a plain JSON file. By default it
is located at /etc/bauerbill/bauerbill.conf
. The main
object is a dictionary that holds multiple dictionaries. The latter are
considered sections of the configuration file and contain options
related to different parts of Bauerbill.
Note that all fields, including section names, are in lower case in
the file. Upper case may appear in the man page during automatic
conversion of the markdown file. For example, the first section is
makepkg commands
, not
MAKEPKG COMMANDS
.
A mapping of expected executables to their commands,
e.g. "pacman": ["/usr/bin/pacman"]
. These can be used to
wrap other commands or enforce certain options.
A list of glob patterns. Patterns with “/” are matched against qualified package names (<repo>/<pkgname>). Patterns without are matched against unqualified package names (<pkgname>). Any package that matches is added to the build queue.
The default time-to-live for cached data.
This is just a list of glob patterns to match VCS packages,
e.g. ["*-git", "*-svn"]
.
This section contains 2 subsections: build
and
download
. These determine the makepkg commands to use for
building and download packages, respectively. These commands can be
configured per package using glob patterns along with a default command.
Both subsections follow the same format with the following keys:
null
or omitted. If included, it must be a
list of 2-tuples. The first item is a glob pattern that will be tested
against “<repo>/<pkgbase>” (e.g. “/reflector” will match
”community/reflector” and ”AUR/” will match all AUR packages). The
second item is a makepkg command with arguments as a list, e.g
['makepkg', '-irs', '--config', '/path/to/custom/makepkg.conf']
.
This command must install the package and accept
--asdeps
and --pkg
as possible arguments.
Simple example:
"custom" : [["AUR/*", ["makepkg", "-irs", "--config", "/path/to/custom/makepkg.conf"]]]
VCS patterns
. This key may be null
or omitted.
Each command must be a list where each item is a shell “word”,
e.g. ["makepkg", "-irs", "--config", "/path/to/some/config"]
.
Each item will be interpolated using Python string formatting so curly
braces must be escaped (i.e. “{” should be “{{” and “}” should be “}}”).
The possible mappings are the names in BuildablePkgMapping
in Bauerbill.py
(e.g. ["{Name}", "{LastModified}"]
) and “PacmanConfig”.
Additional makepkg arguments will be added to the command as
necessary when generating the different scripts, for example
--asdeps
or --pkg
.
/tmp/bbhooks
will then look for
scripts in /tmp/bbhooks/linux/prebuild
before building the
linux
package.
["{PackageBase}", "{LastModified}"]
. This section may
be empty.
commands ; This also follows the same format as the makepkg commands sections above but each value is a list of lists where the inner lists are commands to be run. Their arguments will also be interpolated. This section may be empty.
$ bauerbill --help
USAGE
bauerbill [bauerbill options] [pacman args]
OPTIONS
Bauerbill should accept the same arguments as Powerpill, e.g.
bauerbill -Syu
See "pacman --help" for further help.
The following additional arguments are supported:
--aur
Enable AUR support.
--aur-only
Enable AUR support and limit some operations such as system upgrades to AUR packages.
--bb-config <BB-CONFIG>
The bauerbill JSON configuration file.
--bb-quiet
Suppress warning messages for AUR operations.
--build
Build target packages that can be built.
--build-all
Build targets and dependencies.
--build-dir <BUILD-DIR>
The directory in which to save generated scripts.
--build-vcs
Rebuild all rebuildable VCS packages (e.g. foo-git, bar-hg)
--nobqd
(no build queue deps) Do not install calculated sync deps for build queue directly. Use this option to allow makepkg to handle all sync deps. The advantage is that the build scripts can be generated without root. The disadvantage is that some deps may be installed and removed multiple times if they are required by multiple build targets.
makepkgx
which is a patched version of makepkg
that accepts the old –pkg option for selective installation of packages
from a package group. makepkgx
also include an option to
pass a custom configuration file to pacman (--pconfig
)PacmanConfig
to the list of interpolable values
in the configuration file commands.bauerbill.json
have been
updated.bb-wrapper
.bauerbill.json
are now a list
of 2-tuples which are tested in order.["AUR/*", ["makepkg", "-irs", "--config", "/path/to/custom/makepkg.conf"]]
.bb-query_trust
. Given that the only currently untrusted
buildable packages are from the AUR, this just prefixes everything with
‘AUR/’ but in the future there may be other build sources. Edit your
bb-query_trust
combinations file and prefix ‘AUR/’ to
preserve prevous combinations. See bb-query_trust --help
to
find the file’s path.-Qu --aur
.--bb-quiet
option to suppress AUR query
warnings.--build-targets
to
--build
.--nobqd
for generating build scripts
without pre-emptive dependency installation. The scripts can now be
created without ever needing root.bb-query_trust
.bb-query_trust
.--build-vcs
option to select VCS packages for
rebuilding.--bb-scripts-dir
to
--build-dir
.pkg-list_anachronistic_installations
)