Syncing the Debian packaging information

This is instructions on how to make the debian directory in the SpamAssassin source match that from the Debian and Ubuntu packaging. This is used in the daily Ubuntu builds mentioned on DownloadFromSvn.

The Debian and Ubuntu packages of SpamAssassin have been identical lately. Consistency is nice. If the Ubuntu package version does not contain the string "ubuntu", then it's identical to Debian's.

Grab trunk:

svn checkout http://svn.apache.org/repos/asf/spamassassin/trunk

Grab the SA source package stuff from Debian or Ubuntu: http://packages.debian.org/spamassassin http://packages.ubuntu.com/spamassassin
Click the latest version, then under "Download Source Package" on the right, grab the spamassassin_*.debian.tar.gz file, which contains all the variations from our upstream tarball.

Extract the tarball. It'll create a debian directory.

Delete everything under the debian directory in trunk:

cd trunk; find debian -type f | grep -v .svn | xargs svn rm

Copy the new debian directory into trunk:

cp -a ../debian/* debian/

Remove any unnecessary patches (currently 50_sa-learn_fix_empty_list_handling and 85_disable_SSLv2). Remove their files in debian/patches, and remove them from the file debian/patches/series. Make any other necessary changes (currently none).

Tell svn that you copied the files:

find debian -type f | grep -v .svn | xargs svn add

If the MANIFEST file includes files from the debian directory, update them. Remove everything that starts with debian and replace it with the results of find debian -type f | grep -v .svn | sort. Currently, they're not being included in the MANIFEST. I don't know why not.

Test and commit.

For some reason, I haven't been able to get local binary package builds to throw the necessary errors when attempting to apply a patch which has already been applied upstream. So the best way to test is to build via launchpad. Which is a pain.

If you don't have commit access, open a bug and attach your patch (created via svn diff > update_debian_packaging.patch).

Consider opening bugs to apply remaining Debian patches to trunk. More consistency is better. Current remaining patches:

Manually rebuilding via launchpad

  1. You'll need to be a member of http://launchpad.net/~spamassassin - click the "Join the team".

  2. Commit changes to SpamAssassin trunk.

  3. Go to http://code.launchpad.net/~vcs-imports/spamassassin/trunk

  4. Log in.
  5. Click the "Import Now" button in the "Import details" section just to the right of "The next import is scheduled to run in N hours." The button is not there if you're not logged in. (Wait for the import to finish.)
  6. Go to http://code.launchpad.net/~spamassassin/+recipe/spamassassin-daily

  7. Click "Request build(s)" (in green near the bottom). Request a build for a release you can test on. (Wait for the build to finish.)
  8. Install the freshly built packages from that PPA and test.
  9. Request builds for the rest of the releases, and verify that they built successfully.

If a build fails, follow the "buildlog" links. They generally give useful errors. The #launchpad channel on irc.freenode.net is often helpful.

Manually building locally

  1. Download trunk:

svn checkout http://svn.apache.org/repos/asf/spamassassin/trunk
cd trunk

  1. In the trunk directory, create a pkgrules directory containing the rules from the latest sa-update, something like:

sudo sa-update; mkdir pkgrules; cp /var/lib/spamassassin/3.003002/updates_spamassassin_org/* pkgrules/

  1. Create the .orig.tar.gz

tar -zcvf ../spamassassin_3.3.2.orig.tar.gz .

  1. In the trunk directory, run the build command:

debuild -us -uc -sa

SyncDebianPackaging (last edited 2011-10-28 03:08:48 by Darxus)