RPM: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
Line 50: Line 50:
;remove the packages you just installed:Do this step if you're on a build host an you don't want libdap, etc., permanently installed. ''sudo yum remove bes bes-devel libdap libdap-devel''
;remove the packages you just installed:Do this step if you're on a build host an you don't want libdap, etc., permanently installed. ''sudo yum remove bes bes-devel libdap libdap-devel''


<!-- old
== Procedure ==
== Procedure ==
# When a release is ready, follow the steps in [wiki:ReleaseGuide the release guide] for making a source release
# When a release is ready, follow the steps in [wiki:ReleaseGuide the release guide] for making a source release
Line 63: Line 64:
#** You'll probably need to be root to do this. But don't, set up a .rpmmacros file and configure rpm to use an alternative set of directories. You'll then need to mirror the directories in /usr/src/redhat somewhere (e.g., under $HOME). See the explanation above.
#** You'll probably need to be root to do this. But don't, set up a .rpmmacros file and configure rpm to use an alternative set of directories. You'll then need to mirror the directories in /usr/src/redhat somewhere (e.g., under $HOME). See the explanation above.
#** It might be that you have to install a package (e.g. libdap) to build another (libnc-dap). If so, make sure to remove it once you're done, esp. on a development machine. Leaving a package installed makes it much more likely that package's files will wind up as 'required' by other packages (like libdap.so.6 requiring libdap.so.4).
#** It might be that you have to install a package (e.g. libdap) to build another (libnc-dap). If so, make sure to remove it once you're done, esp. on a development machine. Leaving a package installed makes it much more likely that package's files will wind up as 'required' by other packages (like libdap.so.6 requiring libdap.so.4).
# Transfer the binaries to the web site. They go under /pub/binary. Each group of files for a given version should go in a subdirectory named for that version. As of 15 April 2008, we're not doing that, but we should since it will make the pages lots easier to maintain (moving the old versions to the `old` subdirectory means the old links have to be updated on all of the pages). Also, it makes it confusing for users when we do a release in steps unless they pay attention to the version numbers on the rpm files.
# Transfer the binaries to the web site. They go under /pub/binary. Each group of files for a given version should go in a subdirectory named for that version. As of 15 April 2008, we're not doing that, but we should since it will make the pages lots easier to maintain (moving the old versions to the `old` subdirectory means the old links have to be updated on all of the pages). Also, it makes it confusing for users when we do a release in steps unless they pay attention to the version numbers on the rpm files. -->

Revision as of 00:00, 22 September 2015

<< back to Developer Info

About Building RPMs

Once a release is made, it's time to make the binaries.

The owner of a project is responsible for the source distribution and most of the binaries. Everyone should be able to make Linux binaries. For OS/X and Win32, if you have those platforms, build the binaries. If not, ask someone to help or post to the opendap-tech list and see if we can get a contributed binary.

About RPMs

Documentation for RPM and rpmbuild, in particular is hard to come by. Here's some good information: Fedora RPM Guidelines


Building RPMs for use with EPEL

There are some tricks to building the RPMs, but for the most part, its just make rpm. However, you can make this easier if you do two things:

  1. Install the EPEL yum repository. Get epel-release-6-8.noarch.rpm and install it using sudo yum install epel-release-6-8.noarch.rpm. Then install packages needed to read various file formats: yum install netcdf-devel hdf-devel hdf5-devel libicu-devel cfitsio-devel
  2. Set up the rpmbuild directory structure in $HOME and then build as yourself and not root. (Here are instructions for CentOS)
build the libdap rpms
cd libdap4, make rpm
install (temporarily) the libdap rpm packages
You need to do this because libdap and libdap-devel are dependencies for the BES rpms and their builds. Use sudo yum install ~/rpmbuild/RPMS/x86_64/libdap*.rpm
build the bes rpms
cd bes, make rpm
test the bes rpms (if you want)
sudo yum install ~/rpmbuild/RPMS/x86_64/bes.rpm, then run besctl start and bescmdln. Type show version; in to the latter, you should get an xml document that lists the BES's components. Stop the server with besctl stop
remove the packages you just installed
Do this step if you're on a build host an you don't want libdap, etc., permanently installed. sudo yum remove bes bes-devel libdap libdap-devel

Building RPMs that Include Statically Linked Handlers

Build RPMs that are usable for NASA takes a bit more work because NASA uses hdf4/hdfeos2 for lots of its data and there is no rpm for hdfeos2. As a result, you will need to build a version of the hdf4 handler that is statically linked to the hdfeps2 and hdf4 libraries. Not a huge problem, but it's an extra step. However, there is a bonus for doing this extra work: You also get the handlers that build GeoTIFF and JPEG2000 responses, an updated FITS handler and a handler that uses GDAL to read any of the formats it supports, including data stored in GeoTIFF files.

Note: There are actually two different 'static' RPM build options for the BES, and here I describe the one that builds every handler using static linking so that EPEL is not required at all. Read the Makefiles, and spec files to find out more. The 'it uses EPEL' and 'it uses static linking' are the two most useful options.

There's considerable overlap with the instructions from the above section, but there are key differences for the BES parts, highlighted in red below.

Build the dependencies for the BES handlers that have no (usable) RPM in CentOS 6
cd hyrax-dependencies, make -j9 for-static-rpm CONFIGURE_FLAGS=--disable-shared
Build the libdap rpms
cd libdap4, make rpm
install (temporarily) the libdap rpm packages
You need to do this because libdap and libdap-devel are dependencies for the BES rpms and their builds. Use sudo yum install ~/rpmbuild/RPMS/x86_64/libdap*.rpm
build the bes rpms
cd bes, make all-static-rpm
test the bes rpms (if you want)
sudo yum install ~/rpmbuild/RPMS/x86_64/bes*.rpm, then run besctl start and bescmdln. Type show version; in to the latter, you should get an xml document that lists the BES's components. Stop the server with besctl stop
remove the packages you just installed
Do this step if you're on a build host an you don't want libdap, etc., permanently installed. sudo yum remove bes bes-devel libdap libdap-devel