Pegasus Enhancement Proposal (PEP)
PEP #: 204
Title: OpenPegasus Linux RPM Build Process
Version: 1.2
Created: 23 October 2004
Authors: Denise Eckstein
Status: Approved (Ballot 94)
Version History:
Version | Date | Author | Change Description |
---|---|---|---|
1.0 | 23 Oct 2004 | Denise Eckstein | Initial Submission. |
1.1 | 26 Feb 2005 | Denise Eckstein | Updates based on review comments. |
1.2 | 01 Mar 2005 | Denise Eckstein |
|
Abstract: This PEP describes the steps required to create OpenPegasus Linux source and binary RPMs. The RPM Package Manager (RPM) is a tool commonly used by Linux applications to install, uninstall, verify, query, and update computer software packages (http://www.rpm.org/).
The following steps may be used to build Linux source and binary RPMs.
(1) Be sure that the value of CVSROOT has been set. Note that you do not need CVS write access to create the Linux RPMs, but you do need to login to CVS. Please refer to step 1 under Build Steps for login instructions.
(2) The directions will vary slightly depending on which distribution you have installed on your build system. Instructions for Red Hat (PEGASUS_DISTRIBUTION=REDHAT) and SuSE (PEGASUS_DISTRIBUTION=SUSE) are included in this document.
(3) You will need to know the name of the CVS tag corresponding to the
version of OpenPegasus that you are building. E.g.,
export PEGASUS_RPM_CVS_TAG=RELEASE_2_4_0-RC2
(4) Finally you will need to know the values of VERSION and RELEASE defined
in the SPEC file, pegasus/rpm/tog-pegasus.spec. E.g.,
export PEGASUS_RPM_VERSION=2.4RC2
export PEGASUS_RPM_RELEASE=1
(1) The first step is to create an OpenPegasus source directory using the cvs export command.
Note: Prior to executing the cvs export command, you must first login to cvs, using the cvs login command. You can use the "anon" username to login to CVS to build the Linux source and binary RPMs. The password for "anon" is "anon". E.g.,
export CVSROOT=:pserver:anon@cvs.opengroup.org:/cvs/MSB
cvs login
Logging in to :pserver:anon@cvs.opengroup.org:2401/cvs/MSB
CVS password:anon
rm -rf pegasus
cvs export -r $(PEGASUS_RPM_CVS_TAG) pegasus
rm -rf pegasus/src/Java
mv pegasus tog-pegasus-$(PEGASUS_RPM_VERSION)
(2) The second step is to move the SPEC file and SOURCE TAR file into the
appropriate RPM build directories. Note that the RPM files used for Red
Hat and SUSE are slightly different.
The RPM build directories used for Red Hat are defined as follows:
ifeq ($(PEGASUS_DISTRIBUTION),REDHAT)
PEGASUS_RPM_SPEC_DIRECTORY=/usr/src/redhat/SPECS/
PEGASUS_RPM_SRC_DIRECTORY=/usr/src/redhat/SOURCES/
PEGASUS_RPM_BUILD_DIRECTORY=/usr/src/redhat/BUILD/
endif
The RPM build directories used for SUSE are defined as follows:
ifeq ($(PEGASUS_DISTRIBUTION),SUSE)
PEGASUS_RPM_SPEC_DIRECTORY=/usr/src/packages/SPECS/
PEGASUS_RPM_SRC_DIRECTORY=/usr/src/packages/SOURCES/
PEGASUS_RPM_BUILD_DIRECTORY=/usr/src/packages/BUILD/
endif
cp tog-pegasus-$(PEGASUS_RPM_VERSION)/rpm/tog-pegasus.spec $(PEGASUS_RPM_SPEC_DIRECTORY)
tar czf tog-pegasus-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).tar.gz tog-pegasus-$(PEGASUS_RPM_VERSION)
cp tog-pegasus-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).tar.gz $(PEGASUS_RPM_SRC_DIRECTORY)
rm -rf $(PEGASUS_RPM_BUILD_DIRECTORY)tog-pegasus
(3) The final step is to build the RPMs.
rpmbuild -ba $(PEGASUS_RPM_SPEC_DIRECTORY)tog-pegasus.spec
The following RPMs will be created for Red Hat:
/usr/src/redhat/SRPMS/tog-pegasus-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).src.rpm
/usr/src/redhat/RPMS/i386/tog-pegasus-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).i386.rpm
/usr/src/redhat/RPMS/i386/tog-pegasus-sdk-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).i386.rpm
/usr/src/redhat/RPMS/i386/tog-pegasus-test-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).i386.rpm
/usr/src/redhat/RPMS/i386/tog-pegasus-debuginfo-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).i386.rpm
The following RPMs will be created for SUSE:
/usr/src/packages/SRPMS/tog-pegasus-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).src.rpm
/usr/src/packages/RPMS/i586/tog-pegasus-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).i586.rpm
/usr/src/packages/RPMS/i586/tog-pegasus-sdk-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).i586.rpm
/usr/src/packages/RPMS/i586/tog-pegasus-test-$(PEGASUS_RPM_VERSION)-$(PEGASUS_RPM_RELEASE).i586.rpm
You can use the following steps to create a CVS Tag that can be used to build Linux source and binary RPMs. These steps do require CVS write access. Note: the anon user does NOT have write access and therefore cannot be used to create a CVS tag.
(1) You will need to update the VERSION and RELEASE values in the SPEC
file, pegasus/rpm/tog-pegasus.spec. E.g.,
Version: 2.4RC2
Release: 1
(2) You should then create a CVS tag using the rtag command. E.g.,
$(CVSUSER) rtag -r RELEASE_2_4-branch RELEASE_2_4_0-RC2 pegasus
Copyright (c) 2004 EMC Corporation; Hewlett-Packard Development Company, L.P.; IBM Corp.; The Open Group;
VERITAS Software Corporation
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including without
limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following conditions:
THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL
COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Template last modified: January 20th 2004 by Martin Kirk
Template version: 1.6