Difference between revisions of "Releasing GotCloud"

From Genome Analysis Wiki
Jump to navigationJump to search
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
Back to parent: [[GotCloud]]
 
Back to parent: [[GotCloud]]
  
Software for GotCloud is kept in a '''git''' repository '''on github''' (eventually).
+
Software for GotCloud is kept in a '''git''' repository on '''github'''.
This document describes how we create the Debian and Redhat packages used with GotCloud.
 
  
'''Get the software''' (in this case from our local repository):
+
We also create a Debian package and tar file for GotCloud.
<code>
 
  cd ~/dev
 
  '''git clone ....git/gotcloud gotcloud'''
 
  Cloning into 'gotcloud'...
 
  done.
 
  '''ls gotcloud'''
 
  bin/  debian/  INSTALL.txt  README  scripts/  test/
 
</code>
 
  
'''Build the Packages'''
+
To release a new version of GotCloud:
 
+
# I recommend creating a new directory:
Debian binaries DEB
+
#: <code> cd ~/dev</code>
<code>
+
#: <code> git clone git@github.com:statgen/gotcloud.git</code>
  '''cd ~/dev/gotcloud'''
+
#: <code> cd gotcloud</code>
  '''debian/makedeb.sh bin'''
+
# Build the source
  dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
+
#: <code> cd src && make && cd ..</code>
  dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2
+
# Run the tests, ensure they all succeed
  dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
+
#: <code> cd src && make test && cd ..</code>
  dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
+
#: <code>./gotcloud test</code>
  dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions -Wl,-z,relro
+
# Update the version number (if you have not already).
  dpkg-buildpackage: source package gotcloud-bin
+
#* Edit release_version.txt
  dpkg-buildpackage: source version 1.0
+
#* Commit the new release number
  dpkg-buildpackage: source changed by Mary Kate Trost <mktrost@umich.edu>
+
#*: <code>git add release_version.txt</code>
  dpkg-buildpackage: host architecture amd64
+
#*: <code>git commit -m "Release 1.XX"</code>
    [lines deleted] 
+
#* Push to github
  dpkg-gencontrol -isp
+
#*: <code>git push</code>
  chown -R root.root debian/tmp
+
# Checkout latest branch and merge master & push
  chmod -R o-s,go=u,go-ws debian/tmp
+
#: <code>git checkout latest</code>
  dpkg --build debian/tmp .
+
#: <code>git merge master</code>
  dpkg-deb: building package `gotcloud-bin' in `./gotcloud-bin_1.0_amd64.deb'.
+
#: <code>git push</code>
  rm -rf tmp
+
#: <code>git checkout master</code>
  ''Package file now in /home/tpg/dev/gotcloud''
+
# Create and push a release tag
  ''-rw-r--r-- 1 tpg tpg 3366722 Dec  4 13:55 gotcloud-bin_1.0_amd64.deb''
+
#: <code>git tag -a gotcloud.1.XX -m 'version 1.XX'</code>
</code>
+
#: <code> git push origin gotcloud.1.XX</code>
 
+
# Create the debian packages
Debian test DEB
+
#* Generate the packages
<code>
+
#*: <code> ./debian/makedeb.sh bin =</code>
  '''cd ~/dev/gotcloud'''
+
#*: <code> ./debian/makedeb.sh test =</code>
  '''debian/makedeb.sh test'''
+
# Generate the release notes on github
  dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
+
#: On github, login
    [lines deleted]
+
#::Goto Tags, Select "Draft New Release"
  dpkg-gencontrol -isp
+
#::* Select the "Tag version" you created
  chown -R root.root debian/tmp
+
#::* Fill in the release notes
  chmod -R o-s,go=u,go-ws debian/tmp
+
# Update wiki release documentation (for full release)
  dpkg --build debian/tmp .
+
#* http://genome.sph.umich.edu/wiki/GotCloud:_Versions
  dpkg-deb: building package `gotcloud-test' in `./gotcloud-test_1.0_amd64.deb'.
+
# Send Email to google group (for full release)
  rm -rf tmp
+
#* gotcloud@googlegroups.com
  ''Package file now in /home/tpg/dev/gotcloud''
+
#* I usually do it from the groups site as an announcement & post on behalf of GotCloud (I may need to modify your permissions to do this)
  ''-rw-r--r-- 1 tpg tpg 433342982 Dec  4 14:04 gotcloud-test_1.0_amd64.deb''
+
#** https://groups.google.com/forum/?hl=en#!forum/gotcloud
</code>
+
# Install on mario
 
+
#* In the gotcloud directory where you generated the deb files, run:
Redhat binaries RPM
+
#*: <code>./debian/install_gotcloud_without_root.sh 1.16 /net/mario</code>
<code>
+
#* Install the latest gotcloud in the gotcloud.old directory (named by version) so someone can run a specific version
  '''cd ~/dev/gotcloud'''
+
#*: <code>./debian/install_gotcloud_without_root.sh 1.16 /net/mario/gotcloud.old</code>
  '''debian/makerpm.sh bin'''
+
#* Rename to the version name:
  dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
+
#*: <code>mv /net/mario/gotcloud.old/gotcloud /net/mario/gotcloud.old/gotcloud.1.XX</code>
    [lines deleted]
+
# Send email to csg group to inform them of the newly installed version on the cluster and of any relevant changes
  echo "Generate package: cd gotcloud-bin; dpkg-buildpackage -b -us -uc -rfakeroot"
+
#* gotcloudUsers@umich.edu
  Generate package: cd gotcloud-bin; dpkg-buildpackage -b -us -uc -rfakeroot
 
  rm -rf debian/tmp debian/errs
 
  install -d debian/tmp/DEBIAN
 
  cp debian/control debian/postinst debian/tmp/DEBIAN
 
  install -d debian/tmp/usr/share/doc/gotcloud-bin_1.0
 
  cp debian/changelog debian/tmp/usr/share/doc/gotcloud-bin_1.0
 
  cp README    debian/tmp/usr/share/doc/gotcloud-bin_1.0/README
 
  gzip -9      debian/tmp/usr/share/doc/gotcloud-bin_1.0/*
 
  cp debian/copyright debian/tmp/usr/share/doc/gotcloud-bin_1.0
 
  mkdir -p debian/tmp/usr/local/gotcloud
 
  cp -rp bin scripts rpmbin debian/tmp/usr/local/gotcloud
 
  Package file now in /home/tpg/dev/gotcloud
 
  -rw-r--r-- 1 tpg tpg 3366722 Dec  4 13:55 gotcloud-bin_1.0_amd64.deb
 
 
 
  Converting DEB into RPM
 
  Warning: alien is not running as root!
 
  Warning: Ownerships of files in the generated packages will probably be wrong.
 
  gotcloud-bin-1.0-2.x86_64.rpm generated
 
  -rw-r--r-- 1 tpg tpg 3378883 Dec  4 14:06 gotcloud-bin-1.0-2.x86_64.rpm
 
</code>
 
 
 
Redhat test RPM
 
<code>
 
  '''cd ~/dev/gotcloud'''
 
  '''debian/makerpm.sh test'''
 
  dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
 
    [lines deleted]
 
  echo "Generate package: cd gotcloud-test; dpkg-buildpackage -b -us -uc -rfakeroot"
 
  Generate package: cd gotcloud-test; dpkg-buildpackage -b -us -uc -rfakeroot
 
  rm -rf debian/tmp debian/errs
 
  install -d debian/tmp/DEBIAN
 
  cp debian/control debian/postinst debian/tmp/DEBIAN
 
  install -d debian/tmp/usr/share/doc/gotcloud-test_1.0
 
  cp debian/changelog debian/tmp/usr/share/doc/gotcloud-test_1.0
 
  cp README    debian/tmp/usr/share/doc/gotcloud-test_1.0/README
 
  gzip -9      debian/tmp/usr/share/doc/gotcloud-test_1.0/*
 
  cp debian/copyright debian/tmp/usr/share/doc/gotcloud-test_1.0
 
  mkdir -p debian/tmp/usr/local/gotcloud
 
  cp -rp test debian/tmp/usr/local/gotcloud
 
  dpkg-gencontrol -isp
 
  chown -R root.root debian/tmp
 
  chmod -R o-s,go=u,go-ws debian/tmp
 
  dpkg --build debian/tmp .
 
  dpkg-deb: building package `gotcloud-test' in `./gotcloud-test_1.0_amd64.deb'.
 
  rm -rf tmp
 
  Package file now in /home/tpg/dev/gotcloud
 
  -rw-r--r-- 1 tpg tpg 433342984 Dec  4 14:11 gotcloud-test_1.0_amd64.deb
 
 
 
  Converting DEB into RPM
 
  Warning: alien is not running as root!
 
  Warning: Ownerships of files in the generated packages will probably be wrong.
 
  gotcloud-test-1.0-2.x86_64.rpm generated
 
  -rw-r--r-- 1 tpg tpg 433492134 Dec  4 14:17 gotcloud-test-1.0-2.x86_64.rpm
 
</code>
 
 
 
Make these available via FTP:
 
 
 
<code>
 
  '''cd ~/dev/gotcloud'''
 
  '''ls -la *.deb *.rpm'''
 
  -rw-r--r-- 1 tpg tpg  3378883 Dec  4 14:06 gotcloud-bin-1.0-2.x86_64.rpm
 
  -rw-r--r-- 1 tpg tpg  3366722 Dec  4 13:55 gotcloud-bin_1.0_amd64.deb
 
  -rw-r--r-- 1 tpg tpg 433492134 Dec  4 14:17 gotcloud-test-1.0-2.x86_64.rpm
 
  -rw-r--r-- 1 tpg tpg 433342984 Dec  4 14:11 gotcloud-test_1.0_amd64.deb
 
 
 
  scp *.deb *.rpm gotcloud@share.sph.umich.edu
 
  gotcloud-bin_1.0_amd64.deb  ...
 
  gotcloud-bin_1.0_amd64.deb  ...
 
  gotcloud-test-1.0-2.x86_64.rpm  ...
 
  gotcloud-test_1.0_amd64.deb      ...
 
</code>
 
 
 
This makes the Debian and Redhat package files available to outsiders using anonymous FTP (or wget).
 

Latest revision as of 22:17, 6 November 2015

Back to parent: GotCloud

Software for GotCloud is kept in a git repository on github.

We also create a Debian package and tar file for GotCloud.

To release a new version of GotCloud:

  1. I recommend creating a new directory:
    cd ~/dev
    git clone git@github.com:statgen/gotcloud.git
    cd gotcloud
  2. Build the source
    cd src && make && cd ..
  3. Run the tests, ensure they all succeed
    cd src && make test && cd ..
    ./gotcloud test
  4. Update the version number (if you have not already).
    • Edit release_version.txt
    • Commit the new release number
      git add release_version.txt
      git commit -m "Release 1.XX"
    • Push to github
      git push
  5. Checkout latest branch and merge master & push
    git checkout latest
    git merge master
    git push
    git checkout master
  6. Create and push a release tag
    git tag -a gotcloud.1.XX -m 'version 1.XX'
    git push origin gotcloud.1.XX
  7. Create the debian packages
    • Generate the packages
      ./debian/makedeb.sh bin =
      ./debian/makedeb.sh test =
  8. Generate the release notes on github
    On github, login
    Goto Tags, Select "Draft New Release"
    • Select the "Tag version" you created
    • Fill in the release notes
  9. Update wiki release documentation (for full release)
  10. Send Email to google group (for full release)
  11. Install on mario
    • In the gotcloud directory where you generated the deb files, run:
      ./debian/install_gotcloud_without_root.sh 1.16 /net/mario
    • Install the latest gotcloud in the gotcloud.old directory (named by version) so someone can run a specific version
      ./debian/install_gotcloud_without_root.sh 1.16 /net/mario/gotcloud.old
    • Rename to the version name:
      mv /net/mario/gotcloud.old/gotcloud /net/mario/gotcloud.old/gotcloud.1.XX
  12. Send email to csg group to inform them of the newly installed version on the cluster and of any relevant changes
    • gotcloudUsers@umich.edu