Developers Documentation

×

Warning

301 error for file:https://clearos.com/dokuwiki2/lib/exe/css.php?t=dokuwiki&tseed=82873f9c9a1f5784b951644363f20ef8

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.

Layout

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:

DescriptionExampleStatus
Upstream sources filesources.downloadRequired
RPM spec fileminiupnpd.specRequired
Configuration filesminiupnpd.confOptional
Scriptsminiupnpd-initOptional
Patchesminiupnpd-1.6.20120121-clearos.patchOptional

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 sources.download file.

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

Sources File - sources.download

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

md5sum tarball URL

For example:

7183a28a6dd47ef32d70a73204aa4a82 miniupnpd-1.6.20120121.tar.gz http://miniupnp.free.fr/files/download.php?file=miniupnpd-1.6.20120121.tar.gz

Building the RPM

As long as you adhere to the file layout and have a sources.download 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 https://github.com/pcbaldwin/miniupnpd.git
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)

https://clearos.com/dokuwiki2/lib/exe/indexer.php?id=content%3Aen_us%3Adev_packaging_upstream_packages&1710844475