OpenHIE Packages

All OpenHIE packages can be found under the following PPA: https://launchpad.net/~openhie

Packages are maintained by separate maintainers. Reference the "Uploaded By" name to discern who maintains which packages. As of 06/08/16, not all packages listed at the PPA are relevant to the installation of OpenHIE. Due to the separation of the DHIS2 installation from the OpenHIE installation, some of the packages in that PPA are no longer required.

Packaging a single component:

Please navigate to the packaging setup you have setup for uploading packages to launchpad.

For a Packaging a new Dhis2 App or building a new package:

 

For the output of each command i.e. the whole console log, please refer to the attachment on this page.

vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages$ mkdir approvals
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages$ cd approvals/
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ wget https://github.com/dhis2/data-approval-pepfar/releases/download/0.4.9/approvals.zip
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ unzip -d approvals approvals.zip 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ ls
approvals  approvals.zip
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ tar czf approvals_0.4.9.tar.gz approvals/*
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ ls
approvals  approvals_0.4.9.tar.gz  approvals.zip
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ dh_make -p approvals_0.4.9 -f approvals_0.4.9.tar.gz 
Type of package: single binary, indep binary, multiple binary, library, kernel module, kernel patch?
 [s/i/m/l/k/n] s
Maintainer name  : Sri Maurya Kummamuru
Email-Address    : maurya@openmrs.org 
Date             : Wed, 11 May 2016 16:52:36 +0000
Package Name     : approvals
Version          : 0.4.9
License          : blank
Type of Package  : Single
Hit <enter> to confirm: 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ cd approvals/vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ cd ..
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ rm -r approvals/*
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ cp -r debian approvals
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ cd approvals/vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ ls
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ mkdir -p var/lib/dhis2/dhis2/apps/
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ mkdir -p var/lib/dhis2/dhis2/apps/approvals
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ ls
debian  var
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ cd ..
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ unzip -d approvals/var/lib/dhis2/dhis2/apps/approvals/ approvals.zip 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ cd approvals/
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ cd debian/
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ ls
approvals.cron.d.ex    changelog  copyright  manpage.1.ex     menu.ex      preinst.ex     README.source  watch.ex
approvals.default.ex   compat     docs       manpage.sgml.ex  postinst.ex  prerm.ex       rules
approvals.doc-base.EX  control    init.d.ex  manpage.xml.ex   postrm.ex    README.Debian  source
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ rm *.ex
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ rm *.EX
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ ls
changelog  compat  control  copyright  docs  README.Debian  README.source  rules  source
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ vim control
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ cat control 
Source: approvals
Section: misc
Priority: optional
Maintainer: Sri Maurya Kummamuru <maurya@openmrs.org>
Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.4
Homepage: https://github.com/dhis2/data-approval-pepfar
#Vcs-Git: git://git.debian.org/collab-maint/approvals.git
#Vcs-Browser: http://git.debian.org/?p=collab-maint/approvals.git;a=summary
Package: approvals
Architecture: amd64
Depends: dhis2
Description: dhis2 data approvals app
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ vim copyright 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ rm copyright 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ vim copyright
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ ls
changelog  compat  control  copyright  docs  README.Debian  README.source  rules  source
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ rm README.Debian 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ vim source/format 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ vim rules
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ cat rules
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
	dh $@
override_dh_install:
	dh_install var/ /  
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals/debian$ cd ..
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ dch
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ cp approvals_0.4.9.tar.gz approvals_0.4.9.orig.tar.gz 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ cd approvals/
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ debuild -S
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ cd ..
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ pbuilder-dist trusty build approvals_0.4.9-1ubuntu1.dsc 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ dput ppa:openhie/datim approvals_0.4.9-1ubuntu1_source.changes 
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals$ cd approvals/
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ git init
Initialized empty Git repository in /vagrant/code/packages/approvals/approvals/.git/
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ git add *
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ git status
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ git commit -m "initial version"
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ git remote add origin https://github.com/openhie/deb-approvals.git
vagrant@vagrant-ubuntu-trusty-64:/vagrant/code/packages/approvals/approvals$ git push -u origin master

 

For updating an existing package:

Example 1 - nginx-datim

  1. Enter your packaging environment (See packaging environment setup documentation)

    vagrant up; vagrant ssh
  2. Set up packaging and updating directories for this package, if this was not done on this machine for this package before

    1. Create a directory to store the resultant packages and source code

      mkdir nginx-datim; cd nginx-datim;
    2. Pull the source code from the ohie repository

      mv deb-nginx-datim/ nginx-datim

       

    3. Create an `orig` tarball, which debuild will look for

      tar czf nginx-datim_1.0.0.orig.tar.gz nginx-datim/*
  3. Make necessary updates to package

  4. Update the package with the new modifications and push it to launchpad

    1. Change direction into project root

      1. you should see the `debian` and `etc` directories when running `dir`

      2. `cd nginx-datim` if dir shows `nginx-datim`
    2. Update git with the changes
    3. Update the change log and increment package version

      dch -i
    4. Build the new package

      debuild -S

       

    5. Push the changes to launchpad

      1. Change directory into the directory where debuild created the package into

        cd ..;

         

      2. Find the name of the most recent source.changes package file

         ll;

         

      3. Push the changes to launchpad

        dput ppa:openhie/datim <name of file>

         

        1. e.g., 

          dput ppa:openhie/datim nginx-datim_1.0.0-0ubuntu13_source.changes

           

           

           

Example 2

Verify the url's in the git are setup correctly:

ubuntu:~#git remote set-url origin git@github.com:username/deb-mechanismimporter.git
ubuntu:~#git remote add openhie git@github.com:OHIEDATIM/deb-mechanismimporter.git

 

Getting the changes if any from the openhie branch and updating your clone:

ubuntu:~#git pull openhie master
ubuntu:~#git push origin

 

Building the package:

ubuntu:~#dch -i
ubuntu:~#debuild -S

 

Putting the package and uploading it to launchpad:

ubuntu:~#cd ..
ubuntu:~#ll
ubuntu:~#dput ppa:openhie/datim mechanismimporter_1.0.0-0ubuntu11_source.changes
ubuntu:~#ll

 

Committing the changes added by building the package:

ubuntu:~#cd mechanismimporter/
ubuntu:~#git commit -am "adding changelog for xxx changes packaging"
ubuntu:~#git push openhie
ubuntu:~#git push origin

 


  • No labels