Skip to main content

This is a tool to test a Gentoo ebuild and its dependencies. The idea is that the ebuild is emerged in a clean (and current) stage3 Docker container.

https://badge.fury.io/py/ebuildtester.svg Documentation Status GitHub Actions Join the chat at https://gitter.im/ebuildtester/ebuildtester Get it from the Snap Store

Requirements

Using require Docker and FUSE.

If you plan to use specific storage driver options (by passing --storage-opt), be aware that these are specific to the configured Docker storage driver. Refer to the Docker documentation about storage drivers for more information. Particularly see the list of options per storage driver.

System-wide configuration of the storage driver used by Docker is done in /etc/docker/daemon.json. For example, to select the devicemapper storage driver, specify:

{
  "storage-driver": "devicemapper"
}

Usage

We are going to assume that the user has a local git clone of the portage tree in

/usr/local/git/gentoo

We have added a new ebuild and would like to verify that the build dependencies are all correct. We can build the package (ATOM) with:

ebuildtester --portage-dir /usr/local/git/gentoo \
  --atom ATOM \
  --use USE1 USE2

where we have specified two USE flags, USE1 and USE2. The ebuildtester command will now create a docker container and start installing the ATOM. All specified dependencies will be installed as well.

Command line arguments

The command understands the following command line arguments:

usage: ebuildtester [-h] [--version] [--atom ATOM [ATOM ...]] [--binhost BINHOST] [--live-ebuild]
                    [--manual] --portage-dir PORTAGE_DIR [--overlay-dir OVERLAY_DIR] [--update]
                    [--install-basic-packages] [--threads N] [--use USE [USE ...]]
                    [--global-use GLOBAL_USE [GLOBAL_USE ...]] [--unmask ATOM] [--unstable]
                    [--gcc-version VER] [--python-single-target PYTHON_SINGLE_TARGET]
                    [--python-targets PYTHON_TARGETS] [--rm] [--storage-opt STORAGE_OPT [STORAGE_OPT ...]]
                    [--with-X] [--with-vnc] [--profile PROFILE] [--features FEATURES [FEATURES ...]]
                    [--docker-image DOCKER_IMAGE] [--docker-command DOCKER_COMMAND] [--pull]
                    [--show-options] [--ccache CCACHE_DIR] [--batch]

A dockerized approach to test a Gentoo package within a clean stage3.

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --atom ATOM [ATOM ...]
                        The package atom(s) to install
  --binhost BINHOST     Binhost URI
  --live-ebuild         Unmask the live ebuild of the atom
  --manual              Install package manually
  --portage-dir PORTAGE_DIR
                        The local portage directory
  --overlay-dir OVERLAY_DIR
                        Add overlay dir (can be used multiple times)
  --update              Update container before installing atom
  --install-basic-packages
                        Install basic packages after container starts
  --threads N           Use N (default 8) threads to build packages
  --use USE [USE ...]   The use flags for the atom
  --global-use GLOBAL_USE [GLOBAL_USE ...]
                        Set global USE flag
  --unmask ATOM         Unmask atom (can be used multiple times)
  --unstable            Globally 'unstable' system, i.e. ~amd64
  --gcc-version VER     Use gcc version VER
  --python-single-target PYTHON_SINGLE_TARGET
                        Specify a PYTHON_SINGLE_TARGET
  --python-targets PYTHON_TARGETS
                        Specify a PYTHON_TARGETS
  --rm                  Remove container after session is done
  --storage-opt STORAGE_OPT [STORAGE_OPT ...]
                        Storage driver options for all volumes (same as Docker param)
  --with-X              Globally enable the X USE flag
  --with-vnc            Install VNC server to test graphical applications
  --profile PROFILE     The profile to use (default = default/linux/amd64/23.0)
  --features FEATURES [FEATURES ...]
                        Set FEATURES, see https://wiki.gentoo.org/wiki/FEATURES (default = ['-sandbox',
                        '-usersandbox', 'userfetch'])
  --docker-image DOCKER_IMAGE
                        Specify the docker image to use (default = gentoo/stage3)
  --docker-command DOCKER_COMMAND
                        Specify the docker command
  --pull                Download latest docker image
  --show-options        Show currently selected options and defaults
  --ccache CCACHE_DIR   Path to mount that contains ccache cache
  --batch               Do not drop into interactive shell

It is also possible to store default values in a toml configuration file at ~/.config/ebuildtester/config.toml. The next example shows all the configuration options that are currently available:

portage_dir = "/var/db/repos/gentoo"
overlay_dir = ["/var/db/repos/guru"]

features = ["sandbox", "usersandbox", "userfetch"]

install_basic_packages = false
docker_command = "docker"
unstable = true
update = true
batch = false
pull = true
rm = true

Metadata

Release files for ebuildtester 47

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ebuildtester 47
File Size Uploaded
ebuildtester-47.tar.gz 82.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ebuildtester 47
File Interpreter ABI Platform
ebuildtester-47-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 95.7 kB

Release files / ebuildtester-47.tar.gz

Download URL ebuildtester-47.tar.gz
Size 82.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a4b550041f59643a97e2a6f9c90772e8e45974ca1be0168c3655350f2fe5942a
BLAKE2b-256 checksum
How to use checksums
19933256c86292d4682fe23c4f213cee4686b45df5f3642446d4ce68ae3e4a7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 10, 2025.

Transparency log

Release files / ebuildtester-47-py2.py3-none-any.whl

Download URL ebuildtester-47-py2.py3-none-any.whl
Size 13.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
15833bee7d67fbe91d27c1366efe49b5d3ebc9906f314a73559c34a44548cd12
BLAKE2b-256 checksum
How to use checksums
a501019beb0bb436c4cef2bb9dcaf134a50dc5973d72d596c9b93c910995f6c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 10, 2025.

Transparency log

Release history Release notifications | RSS feed

48

2 release files

This release

47 This release

2 release files

46

2 release files

44

2 release files

42

2 release files

41

2 release files

40

1 release file

0.1.37

2 release files

0.1.36

2 release files

0.1.35

2 release files

0.1.34

2 release files

0.1.33

2 release files

0.1.30

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.26

2 release files

0.1.19

1 release file

0.1.16

2 release files

0.1.15

3 release files

0.1.12

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

3 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page