To build RPMs for NethServer the following methods are provided:
- nethserver-makerpms for local builds with Podman  and Travis CI automated builds
- nethserver-mock local build with the Mock  configuration files pointing to NethServer YUM repositories
Both methods allow to build also RPMs from other projects. Check out the documentation carefully.
Development vs Release builds¶
A common convention about
.spec files says that the
Release tag has to append
dist macro as suffix in a similar way:
- when the package is built for a release, use the
- when the package is compiled for QA/testing, the
distmacro should reference the source code git commit hash. For instance,
distcan be set to
This convention ensures that each RPM is unique and it is always possible to reproduce the build and its history.
In particular, when building for QA/testing, the build methods linked above prepend the
number of commits in the git log history since the last tagged release commit,
.g, followed by a short git commit hash reference.
If the last commit in the repo has a release tag, the
dist macro is set to
A tagged release commit is a git commit with a tag, starting with a digit
and not containing any “-” (minus) symbol.
0ok are valid release tags, whilst
0.1.2-1 are not.
The releasetag command helps to create a properly tagged release commit in the RPM source code repository.
Once RPMs are built, they can be uploaded to
Ask on community.nethserver.org to obtain the SFTP account required for this purpose.
Use the uploadrpms command to publish the RPMs in the current working directory. The command looks like the following
$ uploadrpms firstname.lastname@example.org:nscom/7.8.2003/nethforge-testing *.rpm
7.8.2003 with the correct NS version number. Also replace
with the target repository name.
As alternative to the above manual procedure, it is possible to run the build on Travis CI:
it automatically publishes the RPMs to
packages.nethserver.org, too. Refer to
|||Podman is a daemonless Linux container engine. https://podman.io/|
|||Mock is a tool for building packages. http://fedoraproject.org/wiki/Projects/Mock|