For this example we'll rebuild the GDAL Precise package.
- Let's download the files we need from Launchpad.
We need to download the
This step can be done in the Host machine.$ cd ~/vm/ubuntugis/packages $ mkdir gdal $ cd gdal $ wget https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable/+files/gdal_1.10.0.orig.tar.gz $ wget https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable/+files/gdal_1.10.0-1~precise1.debian.tar.gz $ wget https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable/+files/gdal_1.10.0-1~precise1.dsc
- With these files downloaded, we simply need to extract the
This step can be done in the host machine$ dpkg-source -x gdal_1.10.0-1~precise1.dsc gdal
- Then you can
cdinto the folder and update the changelog for a rebuild or make change to the package if you want.
This step should be done in the VM# On the host $ vagrant up && vagrant ssh# in the VM $ cd /vagrant/packages/gdal/gdal $ dch -p -D precise -l precise "Launchpad rebuild for Precise"
You can then open
debian/changelogand add entries if you have made other changes to the package. You can also use Quilt to modify or create patches for the package, the patches are located in (debian/patches)
- With the changelog updated, we can now create the debian source package.
This step should be done in the VM$ debuild -S -sd
If you are building a new package or a new version that is not already on Launchpad, you have to use
debuild -S -sathat way
dputwill also upload the
- Now we can try the build using pbuilder-dist
This step should be done in the VM$ pbuilder-dist precise amd64 build ../gdal_1.10.0-1~precise2.dsc
Since the source packages are uploaded to Launchpad to be built and used with UbuntuGIS, we only use pbuilder to test the build since it's faster then uploading it first to see if it works. Pbuilder will create the
~/pbuilder/precise_result/so you could use the
.debthere if you want.
- If the build succeeded, we are now ready to upload the package to UbuntuGIS-unstable.
This step should be done in the VM$ dput ubuntugis-unstable ../gdal_1.10.0-1~precise2_source.changes
That's it! The package is uploaded to Launchpad to be built and published.