Releasing GotCloud: Difference between revisions

From Genome Analysis Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 2: Line 2:


Software for GotCloud is kept in a '''git''' repository '''on github''' (eventually).
Software for GotCloud is kept in a '''git''' repository '''on github''' (eventually).
This document describes how we create the Debian and Redhat packages used with GotCloud.
This document describes how we create the Debian package and tar file for GotCloud.


'''Get the software''' (in this case from our local repository):
'''Get the software''' (in this case from our local repository):
Line 22: Line 22:
'''Build the Packages'''
'''Build the Packages'''


Debian binaries DEB
Debian binaries DEB, TAR file
<code>
<code>
   '''cd ~/dev/gotcloud'''
   '''cd ~/dev/gotcloud'''
   '''debian/makedeb.sh bin''' (followed by the version number)
   '''debian/makedeb.sh bin =''' (or in place of '=' use a version number)
  dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 ...
   Making binaries in srcFirst time this will take a couple of minutes
    [lines deleted] 
   Binaries created as necessary
  dpkg-gencontrol -isp
   dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor):  
  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-bin' in `./gotcloud-bin_1.0_amd64.deb'.
  rm -rf tmp
  ''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''
</code>
 
Debian test DEB
<code>
  '''cd ~/dev/gotcloud'''
  '''debian/makedeb.sh test''' (followed by the version number)
   dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 ...
    [lines deleted]
  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 433342982 Dec 4 14:04 gotcloud-test_1.0_amd64.deb''
</code>
 
Redhat binaries RPM
<code>
   '''cd ~/dev/gotcloud'''
  '''debian/makerpm.sh bin'''
   dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 ...
     [lines deleted]
     [lines deleted]
   echo "Generate package: cd gotcloud-bin; dpkg-buildpackage -b -us -uc -rfakeroot"
   dpkg-deb: building package `gotcloud-bin' in `./gotcloud-bin_1.06_amd64.deb'.
  Generate package: cd gotcloud-bin; dpkg-buildpackage -b -us -uc -rfakeroot
   Debian package file created
  rm -rf debian/tmp debian/errs
   -rw-r--r-- 1 tpg tpg 7933560 May 20 08:28 /home/tpg/dev/gotcloud/gotcloud-bin_1.06_amd64.deb
  install -d debian/tmp/DEBIAN
   Creating tar file for 'bin'
  cp debian/control debian/postinst debian/tmp/DEBIAN
   Tar file created
  install -d debian/tmp/usr/share/doc/gotcloud-bin_1.0
   -rw-r--r-- 1 tpg tpg 7983521 May 20 08:28 /home/tpg/dev/gotcloud/gotcloud-bin_1.06.tar.gz
  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>
</code>


Redhat test RPM
Debian test DEB, TAR file
<code>
<code>
   '''cd ~/dev/gotcloud'''
   '''cd ~/dev/gotcloud'''
   '''debian/makerpm.sh test'''
   '''debian/makedeb.sh test =''' (or in place of '=' use a version number)
   dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 ...
  #############################################################
  #  Creating the 'test' package takes a pretty long time. Patience grasshopper...
  #############################################################
   dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): ...
     [lines deleted]
     [lines deleted]
  echo "Generate package: cd gotcloud-test; dpkg-buildpackage -b -us -uc -rfakeroot"
   dpkg-deb: building package `gotcloud-test' in `./gotcloud-test_1.06_amd64.deb'.
  Generate package: cd gotcloud-test; dpkg-buildpackage -b -us -uc -rfakeroot
   Debian package file created
  rm -rf debian/tmp debian/errs
   -rw-r--r-- 1 tpg tpg 382184656 May 20 08:41 /home/tpg/dev/gotcloud/gotcloud-test_1.06_amd64.deb
  install -d debian/tmp/DEBIAN
   Creating tar file for 'test'
  cp debian/control debian/postinst debian/tmp/DEBIAN
   Tar file created
  install -d debian/tmp/usr/share/doc/gotcloud-test_1.0
   -rw-r--r-- 1 tpg tpg 383138926 May 20 08:42 /home/tpg/dev/gotcloud/gotcloud-test
  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>
</code>


Line 120: Line 59:
<code>
<code>
   '''cd ~/dev/gotcloud'''
   '''cd ~/dev/gotcloud'''
   '''ls -la *.deb *.rpm'''
   '''ls -la *.deb *.tar.gz'''
   -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  7933560 May 20 08:28 gotcloud-bin_1.06_amd64.deb
   -rw-r--r-- 1 tpg tpg  3366722 Dec  4 13:55 gotcloud-bin_1.0_amd64.deb
   -rw-r--r-- 1 tpg tpg  7983521 May 20 08:28 gotcloud-bin_1.06.tar.gz
   -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 382184656 May 20 08:41 gotcloud-test_1.06_amd64.deb
   -rw-r--r-- 1 tpg tpg 433342984 Dec  4 14:11 gotcloud-test_1.0_amd64.deb
   -rw-r--r-- 1 tpg tpg 383138926 May 20 08:42 gotcloud-test_1.06.tar.gz
 
   '''scp *.deb *.rpm gotcloud@share.sph.umich.edu'''
   '''scp *.deb *.tar.gz 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>
</code>


This makes the Debian and Redhat package files available to outsiders using anonymous FTP (or wget).
This makes the Debian packages and tar files available to outsiders using anonymous FTP (or wget).

Revision as of 08:43, 20 May 2013

Back to parent: GotCloud

Software for GotCloud is kept in a git repository on github (eventually). This document describes how we create the Debian package and tar file for GotCloud.

Get the software (in this case from our local repository):

 cd ~/dev
 git clone ....git/gotcloud gotcloud
 Cloning into 'gotcloud'...
 done.
 ls gotcloud
 bin/  debian/  INSTALL.txt  README  scripts/  test/

Build the Source

 cd ~/dev/gotcloud/src
 make

Build the Packages

Debian binaries DEB, TAR file

 cd ~/dev/gotcloud
 debian/makedeb.sh bin = (or in place of '=' use a version number)
 Making binaries in src.  First time this will take a couple of minutes
 Binaries created as necessary
 dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): 
   [lines deleted]
 dpkg-deb: building package `gotcloud-bin' in `./gotcloud-bin_1.06_amd64.deb'.
 Debian package file created
 -rw-r--r-- 1 tpg tpg 7933560 May 20 08:28 /home/tpg/dev/gotcloud/gotcloud-bin_1.06_amd64.deb
 Creating tar file for 'bin'
 Tar file created
 -rw-r--r-- 1 tpg tpg 7983521 May 20 08:28 /home/tpg/dev/gotcloud/gotcloud-bin_1.06.tar.gz

Debian test DEB, TAR file

 cd ~/dev/gotcloud
 debian/makedeb.sh test = (or in place of '=' use a version number)
 #############################################################
 #  Creating the 'test' package takes a pretty long time. Patience grasshopper...
 #############################################################
 dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): ...
   [lines deleted]
 dpkg-deb: building package `gotcloud-test' in `./gotcloud-test_1.06_amd64.deb'.
 Debian package file created
 -rw-r--r-- 1 tpg tpg 382184656 May 20 08:41 /home/tpg/dev/gotcloud/gotcloud-test_1.06_amd64.deb
 Creating tar file for 'test'
 Tar file created
 -rw-r--r-- 1 tpg tpg 383138926 May 20 08:42 /home/tpg/dev/gotcloud/gotcloud-test

Make these available via FTP:

 cd ~/dev/gotcloud
 ls -la *.deb *.tar.gz
 -rw-r--r-- 1 tpg tpg   7933560 May 20 08:28 gotcloud-bin_1.06_amd64.deb
 -rw-r--r-- 1 tpg tpg   7983521 May 20 08:28 gotcloud-bin_1.06.tar.gz
 -rw-r--r-- 1 tpg tpg 382184656 May 20 08:41 gotcloud-test_1.06_amd64.deb
 -rw-r--r-- 1 tpg tpg 383138926 May 20 08:42 gotcloud-test_1.06.tar.gz

 scp *.deb *.tar.gz gotcloud@share.sph.umich.edu

This makes the Debian packages and tar files available to outsiders using anonymous FTP (or wget).