RPM builds by Linux containers

This is a simple RPM build environment based on the official CentOS Docker image.

It can build RPMs in the environment, or on your local Fedora 29+ machine. CentOS rootless builds seem to not (still) work: as such you must be root to make it work on NethServer 7.


On Fedora 29+

$ sudo dnf install

On NethServer 7

# yum install nethserver-makerpms

Build RPMs

Requisites to build RPMs starting from a git repository:

  • The .spec file is placed at the root of the repository
  • In the specfile, source0 corresponds to the git archive output in tar.gz format (e.g. Source: %{name}-%{version}.tar.gz)
  • If a SHA1SUM file at the root of the repository exists, the integrity of additional source tarballs is checked against it

Additional missing tarballs are downloaded automatically with spectool during the build.

If the requirements are met, change directory to the repository root then run

makerpms *.spec

To build a NethServer 6 RPM pass the NSVER environment variable to makerpms

NSVER=6 makerpms *.spec


To speed up the build process, the YUM cache directory contents are preserved. Container instances share the named Podman volume makerpms-yum-cache.

To clear the YUM cache run

podman volume rm makerpms-yum-cache

Container images

The container images are built every week and are available at

  • nethserver/makerpms:7 is the default image, for noarch builds
  • nethserver/makerpms:buildsys7 is the image for x86_64 builds

To build the image locally run

cd /usr/share/nethserver-makerpms/
podman build -f Dockerfile-7 .

For more info about the image builds look at travis/

Images for NethServer 6 are available as well: just replace 7 with 6.