Changes between Version 50 and Version 51 of DebianUbuntuPackaging


Ignore:
Timestamp:
Jan 13, 2016, 12:24:50 AM (8 years ago)
Author:
martinl
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DebianUbuntuPackaging

    v50 v51  
    2222=== Git workflow using the GRASS specific branches ===
    2323
     24==== Set up building environment ====
     25
     26Install requirements:
     27
     28{{{
     29sudo apt-get install git-buildpackage
     30# on Debian also
     31sudo apt-get install ubuntu-archive-keyring
     32}}}
     33
     34===== Set sudo access =====
     35
     36Run
     37
     38{{{
     39sudo visudo
     40}}}
     41
     42and add lines bellow:
     43
     44{{{
     45# Cmnd alias specification
     46Cmnd_Alias PBUILDERS=/usr/sbin/pbuilder, /usr/sbin/cowbuilder
     47
     48# User privilege specification
     49<username>     ALL=(root)     NOPASSWD:PBUILDERS
     50}}}
     51
     52===== Configuration file =====
     53
     54Configuration file for pbuilder (`~/.pbuilderrc`):
     55
     56{{{
     57# Optionally set the architecture to the host architecture if none set. Note
     58# that you can set your own default (i.e. ${ARCH:="i386"}).
     59: ${ARCH:="$(dpkg --print-architecture)"}
     60
     61NAME="$DIST"
     62if [ -n "${ARCH}" ]; then
     63    NAME="$NAME-$ARCH"
     64    DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
     65fi
     66BASETGZ="/var/cache/pbuilder/$NAME-base.tgz"
     67DISTRIBUTION="$DIST"
     68BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
     69APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"
     70BUILDPLACE="/var/cache/pbuilder/build/"
     71
     72DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
     73MIRRORSITE="http://cz.archive.ubuntu.com/ubuntu/"
     74OTHERMIRROR="deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu $DIST main"
     75COMPONENTS="main restricted universe multiverse"
     76
     77BUILDRESULT=/root/tmp/pbuilder-results
     78HOOKDIR=/root/pbuilder-hooks
     79EXTRAPACKAGES="${EXTRAPACKAGES} devscripts gnupg patchutils vim-tiny openssh-client lintian"
     80ALLOWUNTRUSTED=yes
     81}}}
     82
     83It's a good idea to configure also lintian pbuilder hook:
     84
     85{{{
     86mkdir ~/pbuilder-hooks
     87cp /usr/share/doc/pbuilder/examples/B90lintian ~/pbuilder-hooks/
     88sed -i 's/lintian -I --show-overrides/& --pedantic -E/; s/^su /##&/; s/^#su /su /' ~/pbuilder-hooks/B90lintian
     89}}}
     90
     91==== Create chroot environment ====
     92
     93Create specific chroot environment by (example for Ubuntu Wily - 15.10):
     94
     95{{{
     96export DIST=wily
     97sudo -E cowbuilder --create --distribution=$DIST --basepath=/var/cache/pbuilder/base-${DIST}-ubuntugis.cow --save-after-login --login
     98}}
     99
     100=== Build new package ===
     101
     102Clone Git repository
     103
     104{{{
     105debcheckout --user <username> --git-track '*' grass pkg-grass
     106cd pkg-grass
     107}}}
     108
     109and checkout selected branch (example for Ubuntu Wily - 15.10):
     110
     111{{{
     112export DIST=wily
     113git checkout ubuntugis/$DIST
     114}}}
     115
     116Update changelog by
     117
     118{{{
     119dch -i
     120}}}
     121
     122a put lines (example for GRASS GIS 7.0.3RC1):
     123
     124{{{
     125grass (7.0.3~rc1-1~wily1) wily; urgency=medium
     126
     127  * New upstream release candidate.
     128
     129 -- [commiters_name] <[commiters_email]>  Tue, 12 Jan 2016 20:57:45 +0100
     130}}}
     131
     132Commit changes to Git repository:
     133
     134{{{
     135git commit -am"New upstream release candidate (7.0.3RC1)"
     136git push
     137}}}
     138
     139Build package:
     140
     141{{{
     142gbp buildpackage --git-pbuilder --git-dist=${DIST}-ubuntugis --git-debian-branch=ubuntugis/$DIST
     143}}}
     144
     145Sign created package
     146
     147{{{
     148debsign ../grass_7.0.3~rc1-1~wily1_<architecture>.changes
     149}}}
     150
     151and upload to Launchpad:
     152
     153{{{
     154dput ppa:grass/grass-stable ../ggrass_7.0.3~rc1-1~wily1_<architecture>.changes
     155}}}
     156
     157Tag release version in Git repository:
     158
     159{{{
     160git tag ubuntugis-wily/7.0.3RC1
     161git push --tags
     162}}}
     163
     164==== Notes ====
     165
     166===== Create new branch for Ubuntu version =====
     167
     168{{{
     169git checkout -b ubuntugis/wily experimental
     170git push origin ubuntugis/wily
     171}}}
    24172=== Build package from tarball ===
    25173