Developers Documentation



301 error for file:

User Tools

Site Tools

File Layout

This document provides information on the file layout used for building RPMs on the ClearOS build system. This document is especially useful for those who are maintaining upstream packages during the migration to git/GitHub.

If you are not familiar with building RPMs, the getting started document is a good place to start. There are also other online resources that can provide help with the basics of building an RPM.


The build system for ClearOS 6 uses the old Plague software with CVS for source code management. That's old school… really old school. We are in the process of upgrading the build system to the more modern Koji build system which is used by Red Hat for their Fedora and Enterprise Linux products.

The file layout for building upstream packages on both the old and new build systems is essentially identical. To build an upstream RPM, configuration files, scripts and patches are typically required. The following table describes the basic structure:

Upstream sources filesources.downloadRequired
RPM spec fileminiupnpd.specRequired
Configuration filesminiupnpd.confOptional

You can see an example layout for the MiniUPnP package on GitHub.

There's probably nothing too surprising here except for the sources file. Instead of storing the tarball in the git source code management system, the URL to the upstream source is stored in the file.

The “” file will be replaced by the “sources” file when the migration to the Koji build system is completed.

Sources File -

When you are ready to build your RPM, create the with the following data:

md5sum tarball URL

For example:

7183a28a6dd47ef32d70a73204aa4a82 miniupnpd-1.6.20120121.tar.gz

Building the RPM

As long as you adhere to the file layout and have a file in place, you can use the clearos local command to build a test version of your RPM. You can give this a try in your development environment by using the MiniUPnP example:

yum install iptables-devel
mkdir /tmp/my_scratch
cd /tmp/my_scratch
git clone
cd miniupnpd
clearos local

Once the build system migration is complete, you will able to push a build up to the ClearOS build/repository infrastructure using a single command. For now, please contact the ClearOS development team to push your package to the build system.

Finishing Up

content/en_us/dev_packaging_upstream_packages.txt · Last modified: 2015/03/01 11:31 (external edit)