Flow Selection and Aggregation MA/Developers/Release management
From GEANT2-JRA1 Wiki
Flowsa-ma navigation
Contents
Other topics
Here you can find how we build our packages.
Contents |
Making a release svn branch
You need to fork your code to a branch, where you can prepare your code for this package. This way you can do some adjustments to your code to optimize it for the package. if you make a tag, you shouldn't edit it anymore, which can bring you into trouble. If you are finished with the branch you could make a tag, but I don't see the need in perfSONAR.
$ svn copy https://svn.internet2.edu/svn/perfsonar/trunk/ps-mdm-flowsa-ma \ https://svn.internet2.edu/svn/perfsonar/branch/ps-mdm-<VERSION>
Making a tar.gz from a tag
$ svn export https://svn.internet2.edu/svn/perfsonar/branches/surfnet_java-flowsa-ma-<VERSION> $ tar zcvf surfnet_java-flowsa-ma-<VERSION>.tar.gz surfnet_java-flowsa-ma-<VERSION>
Making a .war from a .tar.gz
We use maven to build, so you need to install this:
# yum install maven2 $ tar zxvf ps-mdm-flowsa-ma-<VERSION> $ cd ps-mdm-flowsa-ma-<VERSION> $ mvn package
.war file will be in build/.
Building a RPM from tar.gz
# yum install maven2 rpmdevtools
$ cd ~
$ mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS,TMP}
create ~/.rpmmacros with content (or more if you want):
%_topdir /home/gijs/rpmbuild %_tmppath /home/gijs/rpmbuild/TMP %_gpg_name Gijs Molenaar <gijs.molenaar@surfnet.nl>
The last line is for signing of the packages, you can specify the key to use (if you want to sign)
$ cd ~/rpmbuild/SOURCES $ wget ps-mdm-flowsa-ma-<VERSION>.tar.gz $ cd ~/rpmbuild/SPECS $ cp ../BUILD/surfnet_java-flowsa-ma-<VERSION>/contrib/ps-mdm-flowsa-ma.specs . $ rpmbuild -bb ~/rpmbuild/SPECS/ps-mdm-flowsa-ma.specs
RPM will be in ~/rpmbuild/RPMS/noarch
I've used the fedora RPM guide a lot: http://docs.fedoraproject.org/drafts/rpm-guide-en/
Building a DEB from tar.gz
- Unpack the tar.gz somewhere
- Put your debian build files in the debian folder in the source (should be in trunk/packages/deb)
- run dpkg-buildpackage
- package will be in ..
What I usually do is just do an co of the debian build files somewhere, export the service code branch somewhere else, and then symlink the build files to a 'debian' subfolder in the exported service code folder. version number is extracted from the changelog, so if you want to bump the version number you should add a new changelog entry with 'dch'.
I've used the debian maintainer guide a lot: http://www.us.debian.org/doc/maint-guide/
