Versioning a package for uploading to PPA

Solution 1:

The version of the resulting package comes from the version number provided in debian/changelog So you must have the appropriate version there.

1.0.3-1 will supersede an Ubuntu only upload versionized 1.0.3-0ubuntu1

$ dpkg --compare-versions 1.0.3-1 le 1.0.3-0ubuntu1 || echo "False"
False

But it will not supersede a version originating from Debian with Ubuntu changes, i.e. 1.0.3-1ubuntu1

$ dpkg --compare-versions 1.0.3-1 le 1.0.3-1ubuntu1 || echo "False"
$

The tilda (~) character has a special meaning in version numbers. For example:

$ dpkg --compare-versions 1.0.3-1 le 1.0.3-1~ppa1 || echo "False"
False

As your package is not originating from Debian, I go with a version number like 1.0.3-0~ppa1 This guarantees that it is less than either a version synced directly from Debian or introduced in Ubuntu,

So your change log should look like:

artha (1.0.3-0~ppa1) quantal; urgency=low

  * New upstream release.

 -- Your Name <[email protected]>  Sun, 07 Oct 2012 13:06:56 -0400

Whether to use debuild -S -sd or debuild -S -sa is really a different question, but here's a brief answer.

-sa ensures that the .orig.tar.bz2 will be uploaded. If you haven't made an upload of this upstream version before, use this.

-sd explicitly makes it so that only the debian.tar.gz or diff.tar.gz are uploaded. This is for when you are making a change to an upstream version that is already available in you target archive or PPA. This is because th original tarball should already be present there.