Skip to main content

A container approach to test a Gentoo package within a clean stage3 container

Project description

This script is a tool to test a Gentoo ebuild and its dependencies. The idea is that the package 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

Requirements

You require Docker and FUSE. Docker must be configured to use the devicemapper storage driver. This can be achieved with the following inside /etc/docker/daemon.json:

{
  "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] [--docker-image DOCKER_IMAGE] [--pull]

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

optional arguments:
  -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/17.1)
  --docker-image DOCKER_IMAGE
                        Specify the docker image to use (default = gentoo/stage3)
  --pull                Download latest docker image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ebuildtester-0.1.33.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ebuildtester-0.1.33-py2.py3-none-any.whl (11.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ebuildtester-0.1.33.tar.gz.

File metadata

  • Download URL: ebuildtester-0.1.33.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for ebuildtester-0.1.33.tar.gz
Algorithm Hash digest
SHA256 bd20b056f668146cfb65cea99ee07e4962ad7ac4564200e76b384c8d929377c2
MD5 6efa59585da8cd8a8fedeb27c4212fd8
BLAKE2b-256 26df23afb7f2157cf5e0701ab4a14f959bad57f734a07ff311aef92567e5eb22

See more details on using hashes here.

File details

Details for the file ebuildtester-0.1.33-py2.py3-none-any.whl.

File metadata

  • Download URL: ebuildtester-0.1.33-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for ebuildtester-0.1.33-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ec0f78a6329bb0d223e85fbe0e3ad77b59f036efb4be87e0e3f181eb7c2f63f7
MD5 8a6e72ec28fc14c6071b26b65c6fdcee
BLAKE2b-256 ba3a201c7619a6205f6ace2a9d107c0522aabc2e0c07098e022ab944fa0ec792

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page