Nosrc-RPM: Packages for proprietary software

Linux@DUKE does a lot of packaging for proprietary software which we cannot distribute outside of Duke. However, we would like to share our sometimes extensive effort with others by providing .nosrc.rpm files. These files are like .src.rpm, except the proprietary source is not included, since we cannot legally distribute them.

Currently Available:

Generic Packaging Instructions

Set up your environment

First, you need a build tree. You may already have one in /usr/src/RPM, but as rebuilding package as root is evil, we recommend that you create one to a place where your normal user account allows you to write, such as your home directory. This build tree should have the following structure:

rpm
|-- BUILD
|-- RPMS
|   |-- i386
|   |-- i586
|   |-- i686
|   |-- x86_64
|   `-- noarch
|-- SOURCES
|-- SPECS
|-- SRPMS
`-- tmp
      

Now you need to do some rpm configuration. A simple ~/.rpmmacros with the following contents should be enough:

%_topdir        %(echo ${HOME}/rpm)
%_tmppath       %{_topdir}/tmp

%packager       Firstname Lastname 

# Uncomment to have built RPMs land in RPMS/ instead of RPMS//
#%_rpmfilename  %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
      

Of course, substitute your own name to the above. Note that all macros are only default values for tags not explicitly filled in spec files.

Rebuilding .nosrc.rpm packages

Normal command for rebuilding a standard source package (.src.rpm) is: rpmbuild --rebuild foo-x.y.z-w.src.rpm. If you are using an older (pre-4.0.2?) version of rpm, substitute rpmbuild with rpm in the command. Note that rpmbuild is usually part of the rpm-build package.

However, if you try to do that on a .nosrc.rpm package, you will get an error about missing sources. You will need to first obtain the source and copy it into your SOURCES directory in order for this to work. Every package we provide obtains the sources in different ways, so look for a .txt file in the directory with all the .nosrc.rpm files for instructions on how to obtain and/or generate the source file needed to create the RPM.

Once you have placed the needed sources into your SOURCES directory, your package should be ready to rebuild. Run "rpmbuild --rebuild package-x.y.z-v.nosrc.rpm" and if everything goes well, the binary RPMs will be written into your RPMS/(arch) directory.

Note on Java: A lot of these packages depend on Java. They are all set to interoperate with jpackage.org java packages, but you may edit the .spec files to set a different location. See jpackage.org for more information.

Questions, Problems?

If you have any questions or problems with the .nosrc.rpm packages we provide, please feel free to email linux.[at].duke.edu with your questions, and maybe we will be able to resolve the problem.

Please do not ask us if you can have the sources, as we will ignore such requests.