[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Managing Debian packages with Subversion

On Thu, Aug 28, 2003 at 10:24:57PM +0300, Fabian Fagerholm wrote:
> How do I manage a new Debian package with Subversion?
> The things I've found only scratch the surface a bit, assume a level
> of knowledge beyond mine, or assume you're migrating from CVS and
> already have made several initial decisions. Also, I'm hoping to
> include everything in the SVN repository, not just the debian/
> directory. I'm not considering Debian native packages, but regular
> packages that have an upstream tarball.
> Here's what I have so far:
>       * The repository will have a structure where the root contains
>         the trunk/, branches/ and tags/ directories.

I prefer an alternate structure where you start with the project as a
top level.  This keeps all project (package) related files under one
directory in the project:
Either way, I suggest the addition of a vendor/ directory to track
differences in upstream versions.  The reason for this will be clear
(see below).

>       * Projects will start their life in trunk/<project>, branches
>         being stored in branches/<project>-<branchname> and tags in
>         tags/.
>       * Initial package creation will follow the following pattern:
>               * Download upstream source and unpack,

- Import into the vendor/current folder
- Tag current state of vendor/current to vendor/source-version (copy)
- Populate trunk/ from vendor/current (copy)
- Check out trunk/

Working with the extracted upstream:
>               * debianize by dh_make,
>               * integrate into SVN somehow.

- copy new source-version/debian directory to trunk/debian
- add the new trunk/debian directory to subversion's control 
- adjust packaging scripts as needed
- commit changes

>       * Development cycle will follow the following pattern:
>               * Check out HEAD from SVN,
>               * make the required changes,
>               * commit. Nothing special here.


>       * When making a release... svn export?

Yes, that way you have a source structure devoid of the .svn
subdirectories.  I use the attached export script to ease the and build
process.  It assumes it is run from the project directory and that the
orig source file and the svn working copy (in a directory called trunk)
exist in the current directory.

>       * When upgrading to a newer upstream version... how?

This is where the vendor/ directory above helps.  The Subversion book
refers to this a a vendor branch.  Essentially you apply a diff between
the old and new upstream sources to the current devel trunk.  Details on
this are in the Subversion book.

> I stress again that I'm looking for a solution that stores
> *everything* in SVN, not only the debian/ directory.

This is exactly what I do with the Debian packages I create and

Jamin W. Collins

This is the typical unix way of doing things: you string together lots
of very specific tools to accomplish larger tasks. -- Vineet Kumar

Reply to: