bauerbill

Project Meta

AUR:33511
Arch Forum Thread:88247
Binary Package:xyne-any/bauerbill-2010.08.26.1-1-any.pkg.tar.xz
Manpage:manpages/bauerbill
PKGBUILD:pkgbuilds/bauerbill
Repos:[xyne-any]
Source Package:bauerbill-2010.08.26.1.tar.gz
Taurball:bauerbill.tar.gz
Version:2010.08.26.1

About

Bauerbill is an extension of Powerpill that supports downloading and building packages from ABS, the AUR. CPAN and Hackage. As an extension of Powerpill it supports download acceleration via parallel and segmented downloads, including for source files when building packages. It also includes internal support for Reflector, Rebase and PkgD. Read the bauerbill and powerpill man pages for a more information.

Quick Feature Overview

  • AUR support (downloading, full dependency resolution, building, installation)
  • CPAN support (downloading, full dependency resolution, building, installation)
  • Hackage support (downloading, full dependency resolution, building, installation)
  • ABS support (can build all packages from source from any repo which provides the $repo.abs.tar.gz archive)
  • parallelization for faster downloads (single, combined package and source downloads for upgrades with aria2c, parallel searches, parallel taurball downloads, etc)
  • drops privileges to build when run as root, checks for sudo to install packages when run as non-root
  • unified sync db and AUR search (bauerbill -Ss, bauerbill -Si) with support for multiple search arguments
  • tracks all dependencies during build operations and cleans up makedepends when done
  • PKGBUILD inspection prompt with support for viewing, editing, backup up, diffing and patching files interactively
  • options to automatically patch and build specified packages
  • option to trust ABS PKGBUILDs to fully automate repo package building
  • option to trust specific AUR users to fully automate AUR package building
  • built-in Reflector support for finding additional mirrors for downloads
  • built-in PkgD support for retrieving packages over a LAN
  • build-in Rebase support for selective database extraction... also displays a list of changes during each operation

Caveat for CPAN Users

Some of the official Arch Linux Perl packages do not specify their full provides array. This breaks dependency checking for Pacman for several packages and it must be fixed by the packager. To get around this, you can use pacpan to patch the local database while waiting for the packagers to update their packages. You must do this if you wish to avoid problems while using CPAN support in Bauerbill.

In particular, look at pacpan's "--check-local" and "--fix-provides" options to check the correctness and fix the provides arrays of installed packages, respectively.

Various Command Examples

Upgrade the entire system as root, syncing the database with Rebase and building all target packages from source as user "me":

bauerbill -Syu --rebase --abs --build-as me

Same as above, but including AUR packages and without inspecting ABS package or packages from Xyne on the AUR:

bauerbill -Syu --rebase --abs --build-as me --aur --trust-abs --trusted-user xyne

Same as above, but including AUR packages and without inspecting ABS package or packages from Xyne on the AUR:

bauerbill -Syu --rebase --abs --build-as me --aur --trust-abs --trusted-user xyne

Download all upgradable packages to /tmp/cache without installing them, using the 45 most up-to-date mirrors:

bauerbill -Suw --reflect "-l 45" --cachedir /tmp/cache

List all available upgrades, including AUR packages:

bauerbill -Qu --aur

Search for the CPAN package which contains the "Crypt::Util" modules (example 1):

bauerbill -Ss --cpan Crypt::Util

(example 2):

bauerbill -Ss --cpan perl-crypt-util

Search for information on perl-config-general in the AUR and on CPAN:

bauerbill -Si perl-config-general --aur --cpan

Example output:

Repository     : CPAN
Name           : perl-config-general
Version        : 2.44
Description    : CPAN package (no description found)
URL            : http://search.cpan.org/dist/Config-General/
Licenses       : unknown
Architecture   : i686 x86_64
Packager       : Xyne::Arch::CPAN
Groups         : None
Provides       : perl-config-general-extended=2.03 perl-config-general-interpolated=2.11
Depends On     : perl-file-glob perl-file-spec-functions perl-filehandle perl-io-file
Build Deps     : None
Optional Deps  : None
Conflicts With : None
Replaces       : None

Repository     : AUR
ID             : 10433
Name           : perl-config-general
Version        : 2.44-1
Description    : Generic config file parser
URL            : http://search.cpan.org/dist/Config-General/
AURPage        : http://aur.archlinux.org/packages.php?ID=10433
URLPath        : http://aur.archlinux.org/packages/perl-config-general/perl-config-general.tar.gz
License        : GPL PerlArtistic
CategoryID     : 10
LocationID     : 2
NumVotes       : 62
OutOfDate      : 0

Again, check the man page above for the full list of options. Also note that most of these can be set in the configuration file to avoid typing them on the command line each time. Remember that Bauerbill, like Powerpill, is a Pacman wrapper. All pacman operations and options should work normally.

The Name

As this is an extension of Powerpill, I wanted a name that was reminiscent of Powerpill. I toyed with the idea of "Paurpill", the pronunciation of which can be pulled towards "powerpill" (or "purple"), but when I tried to get "abs" in the name, Bauerbill jumped right up at me. "Bauen" means "build" in German (including the abstract senses) and literally a "bauer" is a builder, although it mostly means "farmer" in modern German. Still, "Bauerbill" can be taken to mean "Builder Bill", which made me think of Bob the Builder (Bob der Baumeister in German). It can also be read negatively as Bill the Boor too, but hey. Let's hope it does more building than booring.

Terminology

Taurball

A tarball containing a PKGBUILD and local source files required by makepkg to build the package. The name comes from t-AUR-ball, as one uploads these archives to the AUR.

TODO

With varying levels of motivation:

  • support full dependency resolution when installing binary packages with "-U"
  • support full dependency resolution when building packages from taurballs
  • continue to improve PKGBUILD parser
  • gradually clean up the code
  • nag AUR maintainers to improve rpc options (multiple query arguments, include maintainer tag in "info", etc)
  • make the output of different commands customizable
  • get other repos to include $repo.abs.tar.gz archives

FAQ

Can you change the output to match *'s output?

This is somewhat problematic because not everyone uses the same wrappers/binaries. If I hardcode the output to match one, then others will notice that it jars with their normal output. Detecting the expected output on each system would just add unnecessary complexity to the code and require updates whenever a new wrapper/binary appears or an existing one changes. I'm still (lazily) considering ways to enable customization of the output so that each user can decide for him-/herself how to format the output.

Why doesn't pacman-color seem to work?

It does. The problem is that some output which mixes the results of repo and AUR results is generated by bauerbill itself, i.e. not by pacman-color. This output emulates default pacman output (i.e. no colors) so it seems like pacman-color is completely ignored. This is related to the issue above with customization of the output.

Why didn't you just add this to Powerpill?

Bauerbill really is Powerpill with modifications. Bauerbill uses the same backend Perl modules as Powerpill along with some others that handle the AUR etc. I created a second frontend because Powerpill was in the Community repository and it had been previously decided that applications in the official repositories should not be able to install packages from the AUR automatically. Security is the main concern but there is also a sense that users should learn how to handle the AUR themselves before they begin to use tools to automate it. This is also why Bauerbill has not been added to the Community repository despite the number of votes that it has received.

Troubleshooting

Reducing CPU and memory overhead?

This can be an issue because Perl threads are not light-weight.

Each time Perl creates a thread, all data structures in memory are copied. Bauerbill originally used aggressive threading to parallelize as much as possible, which lead to heavy memory usage depending on things such as how many foreign packages were installed. To remedy this, the "--threads" option was added to control the number of threads and a default limit was set.

To reduce memory uses, use "--threads 0" (or 1) to disable threading, then work your way up until you reach a nice balance between memory usage and speed.

The configuration file at $XDG_CONFIG_HOME/powerpill/bauerbill.conf is not detected.

The value of \$XDG_CONFIG_HOME depends on the identity of the user running the process. Either move the configuration file to the appropriate destination or use the --config option to specify the path. This script will provide information about the effective user and the paths checked for testing if you need it.

Building from source fails.

When this happens it's usually due to limitations of the PKGBUILD parser. These include a lack of support for conditional statements which are often used to set variables based on architecture, e.g.

[ "$CARCH" == "x86_64" ] && depends=('foo' 'bar' 'baz')

If you encounter this problem then edit the PKGBUILD at the prompt and remove the conditional statements. If you enable the PatchDir option then you can back up the PKGBUILD, edit it, diff it and then patch it the next time you build it (all from the prompt in bauerbill).

Some downloads keep failing.

These are usually source downloads with incorrect URLs, again due to limitations in the PKGBUILD parser. You can either edit the PKGBUILD at the prompt and simplify it to make sure that the correct sources are detected, or you can ignore the failed download and let makepkg handle it later when it builds the package.

Aria2 fails to redirect but Wget works.

It seems that some mirror operators give Wget special treatment. You can find some suggested workarounds here.

/home/projects/bauerbill