Update Notes on packaging authored by Chiara Marmo's avatar Chiara Marmo
#### First time procedure #### First time procedure
The aravis repo already created on salsa (ssh or https) The aravis repo already created on salsa (ssh or https)
``` ```
$ git clone git@salsa.debian.org:debian-astro-team/aravis.git $ git clone git@salsa.debian.org:debian-astro-team/aravis.git
``` ```
or or
``` ```
$ git clone https://salsa.debian.org/debian-astro-team/aravis.git $ git clone https://salsa.debian.org/debian-astro-team/aravis.git
``` ```
then then
``` ```
$ wget https://github.com/AravisProject/aravis/archive/ARAVIS_0_5_10.tar.gz $ wget https://github.com/AravisProject/aravis/archive/ARAVIS_0_5_10.tar.gz
$ mv ARAVIS_0_5_10.tar.gz aravis_0.5.10.orig.tar.gz $ mv ARAVIS_0_5_10.tar.gz aravis_0.5.10.orig.tar.gz
$ cd aravis $ cd aravis
$ git checkout -b upstream $ git checkout -b upstream
$ tar xf ../aravis_0.5.10.orig.tar.gz --strip-components=1 $ tar xf ../aravis_0.5.10.orig.tar.gz --strip-components=1
$ git add --all $ git add --all
$ git commit -m "Initial upstream version 0.5" $ git commit -m "Initial upstream version 0.5"
$ git tag upstream/0.5 $ git tag upstream/0.5
$ pristine-tar commit ../aravis_0.5.10.orig.tar.gz $ pristine-tar commit ../aravis_0.5.10.orig.tar.gz
$ git checkout -b master $ git checkout -b master
``` ```
Create debian files Create debian files
``` ```
$ mkdir debian $ mkdir debian
$ echo 9 > debian/compat $ echo 9 > debian/compat
$ mkdir debian/source $ mkdir debian/source
$ echo "3.0 (quilt)" > debian/source/format $ echo "3.0 (quilt)" > debian/source/format
$ dch --create --package aravis -v 0.5.6-1 $ dch --create --package aravis -v 0.5.6-1
$ mkdir debian/patches $ mkdir debian/patches
``` ```
After creation of `control`, `rules`, and `copyright` After creation of `control`, `rules`, and `copyright`
``` ```
$ git add debian/ $ git add debian/
$ git commit -m "Initial Debian files" $ git commit -m "Initial Debian files"
``` ```
Building the package Building the package
``` ```
$ sudo pbuilder update $ sudo pbuilder update
$ sudo pdebuild $ sudo pdebuild
``` ```
##### How to create and build patches with quilt ##### How to create and build patches with quilt
``` ```
$ quilt new <patchname>.diff $ quilt new <patchname>.diff
$ quilt add <sourcefile> $ quilt add <sourcefile>
``` ```
Make your change to <sourcefile> Make your change to <sourcefile>
``` ```
$ quilt refresh $ quilt refresh
$ quilt pop -a $ quilt pop -a
``` ```
Then apply your patch Then apply your patch
``` ```
$ quilt push -a $ quilt push -a
``` ```
How to edit an existing patch How to edit an existing patch
``` ```
$ quilt push <patchname>.diff $ quilt push <patchname>.diff
``` ```
Now edit then when finished Now edit then when finished
``` ```
$ quilt refresh <patchname>.diff $ quilt refresh <patchname>.diff
$ quilt pop -a $ quilt pop -a
``` ```
##### Installation tested with ##### Installation tested with
``` ```
$ sudo dpgk -i /var/cache/pbuilder/result/aravis_0.5.10-1_amd64.deb $ sudo dpgk -i /var/cache/pbuilder/result/aravis_0.5.10-1_amd64.deb
$ sudo dpkg -r aravis $ sudo dpkg -r aravis
``` ```
##### Lintian hook ##### Lintian hook
``` ```
$ sudo mkdir /var/cache/pbuilder/hooks/ $ sudo mkdir /var/cache/pbuilder/hooks/
$ sudo cp /usr/share/doc/pbuilder/examples/B90lintian /var/cache/pbuilder/hooks/ $ sudo cp /usr/share/doc/pbuilder/examples/B90lintian /var/cache/pbuilder/hooks/
``` ```
`/root/.pbuilderrc` file contains `/root/.pbuilderrc` file contains
``` ```
HOOKDIR=/var/cache/pbuilder/hooks/ HOOKDIR=/var/cache/pbuilder/hooks/
``` BUILDPLACE="/home/debian/pbuilder/build/"
BUILDRESULT="/home/debian/pbuilder/$NAME/result/"
##### To update to a new version: ```
``` ##### To update to a new version:
$ wget https://github.com/AravisProject/aravis/archive/ARAVIS_0_5_11.tar.gz
$ mv ARAVIS_0_5_11.tar.gz aravis_0.5.11.orig.tar.gz ```
$ cd aravis $ wget https://github.com/AravisProject/aravis/archive/ARAVIS_0_5_11.tar.gz
$ git checkout upstream $ mv ARAVIS_0_5_11.tar.gz aravis_0.5.11.orig.tar.gz
$ git rm -r * $ cd aravis
$ tar xf ../aravis_0.5.11.orig.tar.gz --strip-components=1 $ git checkout upstream
$ git add --all $ git rm -r *
$ git commit -m "Updating upstream version 0.5.11" $ tar xf ../aravis_0.5.11.orig.tar.gz --strip-components=1
$ git tag upstream/0.5.11 $ git add --all
$ pristine-tar commit ../aravis_0.5.11.orig.tar.gz $ git commit -m "Updating upstream version 0.5.11"
$ git checkout master $ git tag upstream/0.5.11
$ git merge upstream -m "Merged upstream version 0.5.11" $ pristine-tar commit ../aravis_0.5.11.orig.tar.gz
``` $ git checkout master
$ git merge upstream -m "Merged upstream version 0.5.11"
```
change the version in debian/changelog then push the master, pristine-tar, and upstream branches. change the version in debian/changelog then push the master, pristine-tar, and upstream branches.
\ No newline at end of file