Backport packages from DebianGIS

From OTBWiki
Jump to: navigation, search

Setup DEBEMAIL and DEBFULLNAME

I assume, you have this ready before you land on this page. But I include them anyway. Here are the commands that I used to backport packages from DebianGIS (ossim,otb) mkdir ~/ubuntugis ; cd ubuntugis

export DEBEMAIL=your-email-registred-on-launchpad
export DEBFULLNAME="Real Name"

Note that a gpg key must be available on launchpad that matches your email given in DEBEMAIL.

If not when you upload packages it will say "uploaded sucessfully". But in reality the package never gets to ppa.

setup build evironment

mkdir ~/pbuilder-hooks
cp /usr/share/doc/pbuilder/examples/B90lintian ~/pbuilder-hooks/
sed -i 's/lintian -I --show-overrides/& --pedantic -E/; s/^su /##&/; s/^#su /su /' ~/pbuilder-hooks/B90lintian

#To build package for another distribution. Change trusty to one of (precise, vivid, wily)
sudo cowbuilder --create --distribution=trusty --basepath=/var/cache/pbuilder/base-trusty.cow -hookdir=/home/<user>/pbuilder-hooks/

Update your chroot to add ubuntugis-unstable ppa

sudo cowbuilder --login --distribution=trusty --basepath=/var/cache/pbuilder/base-trusty.cow -hookdir=/home/<user>/pbuilder-hooks/ --save-after-exec

(you will enter into a shell)

apt-get install -y software-properties-common 

add-apt-repository ppa:ubuntugis/ubuntugis-unstable

apt-get update

Checkout sources

#change ossim to otb, otb-monteverdi depending on your project. It must exist on DebianGIS
debcheckout --git-track='*' git://git.debian.org/git/pkg-grass/ossim.git

change distribution name (precise/trusty/vivid/wily)

cd ossim
dch  -v 1.8.20+ds-2trusty1 -D trusty "rebuild for trusty


You will get something like this:

ossim (1.8.20.3+ds-2trusty1) trusty; urgency=medium

  * rebuild for trusty

 -- OTB Team <contact@orfeo-toolbox.org>  Thu, 07 Jan 2016 14:56:59 +0100

Build the package locally

git-buildpackage --git-pbuilder --git-dist=trusty

check if build succeeded. You may need to modify debian/control depending on the Ubuntu version and dependencies used by the package.

Create source.change including FULL Source code using debuild

debuild -k<your-gpg-key-id> -S -sa
  1. Check if there are any serious lintian errors.

upload this to testing ppa

debrelease --dput -S ppa:ubuntugis/ubuntugis-unstable

It is also good to avoid pushing directly to ubuntugis-ubstable and use a staging ppa ubuntugis-unstable-staging. This ppa must have a dependency to ppa:ubuntugis/ubuntugis-unstable. You can first push to your staging ppa and If the build suceeded on launchpad, You can copy the package to ubuntugis-unstable via launchpad Copy Packages interface.

debrelease --dput -S ppa:rashadkm/ubuntugis-unstable-staging

References

http://pkg-grass.alioth.debian.org/policy/packaging.html