How to package proprietary software

How to package proprietary software

nicubunu_PackageI like to work with open source code. But it is not always possible. Sometimes you have to deal with proprietary code. And sometimes you have to distribute it. I like to distribute software as RPM package because it allows me to put together patches, post-install scripts and configuration files. But how can I create and distribute proprietary software without violating license? The answer is “nosrc.rpm“.

For example – let assume that you want to distribute Oracle Database Server with your custom settings and patches. The oracle-server.spec file may look like this:

Everything you need to grow your career.

With your free Red Hat Developer program membership, unlock our library of cheat sheets and ebooks on next-generation application development.


Summary: Oracle 10g Database Server Enterprise Edition
License: Oracle License
Group: Applications/Databases
Name: oracle-server-x86_64
Release: 78%{?dist}
Source0: 10201_database_linux_x86_64.cpio.gz

Usually you build it using:

rpmbuild -bs oracle-server.spec

which would create oracle-server- But that would contains those archives, which you are not allowed to redistribute.

The solution is to alter your spec file like:

Source0: 10201_database_linux_x86_64.cpio.gz
NoSource: 0, 1

and then run:

rpmbuild -bs oracle-server.spec

This will create file oracle-server-
Resulting source package will include your scriptlets, patches, but will not include those archives. Positive side effects is that resulting file is much smaller.

You can freely distribute the resulting nosrc.rpm file.

Now you have to instruct your users to do:

yum install rpmdevtools

Then they have to download those archives (in this case from and place them in ~/rpmbuild/SOURCES. Then they finish with:

rpm -Uvh oracle-server-
rpmbuild -ba ~/rpmbuild/SPECS/oracle-server.spec

And users will end up with binary rpm packages, which they can install. Without violating their proprietary license.

Take advantage of your Red Hat Developers membership and download Red Hat Enterprise Linux today at no cost.