A contained AUR (ArchLinux User Respository) packages and local repository builder.
tomato builds a selection of AUR packages with pikaur in a Docker image, and publishes them through pacman tooling to a local pacman repository named tomato.
As such tomato is not a pacman wrapper, it is more an indirect AUR helper. It let the host system clean of build's dependencies, like base-devel.
The selection of AUR packages can be installed with a common pacman usage on the host.
usage: tomato [<options>] <operation> [...]
operations:
tomato add <package(s)> # add a package to the maintained list;
tomato del <package(s)> # remove a package from the maintained list;
tomato refresh [<package(s)>] # update tomato repository;
tomato sweep # rebuild tomato repository,
# will remove non building or non existing
# packages;
tomato list [all|status|split]
# list maintained packages;
tomato search <package(s)> # search an AUR package;
tomato version [number] # show version 0.9.0;
tomato (usage|help) # this help message.
tomato -Syu # or any other short variant (-Syuu, -Suy,
# ...), will update the tomato repository,
# and the host system.
options:
tomato --rebuild-image # build or rebuild the tomato Docker image;
tomato --default-mirrors # use the default mirrors of the base Docker
# image, when building or rebuilding the
# tomato Docker image;
tomato --remove-image # remove the tomato Docker image;
tomato --tomato-config <path> # path to custom tomato config;
tomato --edit # prompt to edit PKGBUILDs or build files;
tomato --remote-update # update tomato from the remote pre-built
# package.
Tomato v0.9.0
Install tomato
As an prebuilt package
tomato provides a prebuilt package with no other dependencies than pacman and can be installed with a pacman install command:
curl -L https://github.com/aji-prod/tomato/releases/download/v0.9.0/tomato-0.9.0-1-any.pkg.tar.zst > tomato-0.9.0-1-any.pkg.tar.zst
pacman -U ./tomato-0.9.0-1-any.pkg.tar.zst
As an AUR package
The AUR package can be installed with makepkg or any other AUR helper.
git clone --branch v0.9.0 --depth 1 https://github.com/aji-prod/tomato/ tomato
cd tomato
make pkg
pacman -U pkg/tomato-0.9.0-1-any.pkg.tar.zst
Enable tomato pacman repository
To install the AUR packages maintained by tomato the local pacman repository must be active for the host. Add the following section to pacman.conf:
[tomato]
SigLevel = Optional TrustAll
Server = file:///var/pkg/tomato
Enable the docker service
As tomato runs inside a docker image it is recommended to activate the docker service first.
systemctl enable docker
systemctl start docker
Enable tomato auto-update
As an AUR package, tomato can update itself[^](Update the tomato repository with the latest AUR packages versions), by first registering[^](Include an AUR package to the tomato repository) it:
tomato add tomato
Manage AUR packages
tomato search packagedesc
tomato add packagename
It can be then installed on the host with the pacman install command:
pacman -S packagename
tomato del packagename
If the package is installed on the host, it can be removed with the pacman uninstall command:
pacman -Rs packagename
tomato refresh
The host can be updated with pacman update command:
pacman -Syu
tomato provides a shortcut to update the host right after refreshing the tomato repository:
tomato -Syu
Which is an alias to:
pacman -Syu && tomato refresh && pacman -Syu
Note that any variation of the flag -Syu
flag will refresh the tomato repository and be passed to the
pacman command, such as:
tomato -Suuy
will be an alias to:
pacman -Suuy && tomato refresh && pacman -Suuy
Some package dependencies may resides over time within the tomato repository, like after a tomato del
command.
To removed unused dependencies from the tomato repository:
tomato sweep
Note that every packages will be rebuilt, packages that can no longer be built will be marked as waiting for an update, and will no more be available from the tomato repository until fixed.
To list the packages explicitly included to the tomato repository:
tomato list
To list all packages and versions available from the tomato repository:
tomato list all
To list all packages available from the tomato repository with theirs AUR status:
tomato list status
To list the split packages, or to list the packages explicitly included but not found from the tomato repository:
tomato list split
tomato provides some defaults to tell how to bind the Docker volumes with the host, and can be overridden with a key=value configuration file using:
- The
tomato --tomato-config=tomato.conf
flag, - Editing the
/etc/tomato.conf
file, - Or setting a local user configuration at
~/.config/tomato.conf
.
The default settings are defined as:
TOMATO_NAME=tomato # The tomato's docker image
TOMATO_IMGDIR=/usr/share/tomato # The tomato's docker files
TOMATO_PKGDIR=/var/pkg/tomato # The tomato's repository directory
TOMATO_PACDIR=/etc/pacman.d/mirrorlist # The host's mirrorlist
TOMATO_MAKEPKGCONF= # Let to use a specific makepkg.conf
TOMATO_PKGCACHEDIR=/var/cache/pacman/pkg # The pacman's cache directory
TOMATO_EDITOR=extra/vim:/usr/bin/vim # The tomato's editor
TOMATO_ULIMIT=nofile=1024:524288 # The docker's ulimit option
tomato provides a default makepkg.conf at /usr/share/tomato/makepkg.conf
.
All the packages built by tomato will be attributed to the Françoise 'Ed' Appledelhi <[email protected]> packager. The others options have the makepkg.conf defaults provided by ArchLinux.
To use another makepkg.conf override the TOMATO_MAKEPKGCONF=
key.
tomato uses the environment variable $EDITOR as editor if no TOMATO_EDITOR=
configuration was defined, or vim if neither is set.
To use another $EDITOR override the TOMATO_EDITOR=
key.
To prevent fakeroot to hang inside Docker a default ulimit, through the --ulimit
option, is passed to the docker build and docker run commands.
To remove the --ulimit
option, or to use another value, override the TOMATO_ULIMIT=
key.
For now, neither the GPG signatures from the AUR packages nor to build a package are supported and ignored.
tomato management can be helped with systemd and two systemd timers:
tomato-update-image.timer
,tomato-update-repository.timer
.
Calls tomato --rebuild-image
[^](Docker Image) monthly to synchronize the tomato local Docker image against the official ArchLinux Docker image.
Calls tomato refresh
[^](Update the tomato repository with the latest AUR packages versions) weekly to update the local tomato pacman repository.
To pass arguments to the systemd timers you can edit the TOMATO_ARGS=
key, located at /etc/conf.d/tomato-update.conf
.
/etc/conf.d/tomato-update.conf
needs first to be copied from /usr/share/tomato/tomato-update.conf
.
tomato uses a local Docker image based against the official ArchLinux Docker image.
Before using the first time tomato, it is required to build the local Docker image with the --rebuild-image
option, as tomato --rebuild-image [command]
.
The tomato's core resides in the script launched inside the Docker image, any tomato update will only be available after passing the --rebuild-image
option. It is also recommended to pass this option each new month as the official ArchLinux Docker image is updated monthly.
tomato --rebuild-image
The --rebuild-image
option can be combined with any other flags or commands.
tomato --rebuild-image --default-mirrors
The --default-mirrors
option avoids using the host's best first pacman mirror to use the default ArchLinux Docker image mirrors.
tomato --remove-image
Will ask Docker do delete the Docker image, can be combined with any other flags and takes precedence over the --rebuild-image
option.
tomato binds a few Docker volumes to share files between the host and the image.
The repository and the packages are stored in this volume, always mounted with read and write permissions.
host default:
/etc/pkg/tomato
To minimize the network access, the image shares the same pacman's cache with the host.
host default:
/var/cache/pacman/pkg
The mirrorlist used by the image is read from this volume, always mounted with a read only permission.
host default:
/etc/pacman.d/mirrorlist
.
A special volume which needs to points to a host file to be used, always mounted with a read only permission.
not mounted by default
The tomato name is a reference to a main character of the Cowboy Bebop series, Edward Wong Hau Pepelu Tivrusky IV.
Her best friend during her time [in an orphanage on Earth] was a boy named Tomato who was also passionate about computer science. She named her computer Tomato after him.^
Or you can try to repeat indefinitely and rapidly "automate AUR".
As most of the used tools have a GPLv2, GPLv3 or a compatible license, tomato follows the same path.