This short document is only intended to give a short help in converting packages to Subversion management. It is primarily intended for developers not really familiar with Subversion or CVS management and/or converting from maintaining their packages using common tools (dpkg-dev, devscripts) only to version control system Subversion.
svn-buildpackage and other scripts around it has been created to do follow things:
There are currently three scripts provided by the svn-buildpackage package:
There are different ways to store the packages in the repositories (or in
multiple repositories at your choice). svn-buildpackage normaly
expects a directory structure similar to the one described in the Subversion
Book
, which looks like:
packageA/ trunk/ branches/ branches/upstream tags/ projectB/ trunk/ branches/ branches/developerFoo tags/
packageA above may be a typical upstream-based source package and a projectB
may be a Debian native package with a separate branch created by developerFoo
for his own experiments. See Subversion
Book/Branches
for more details about using Subversion branches.
Also note that Tags work quite different than those in CVS. Subversion does not maintain magic tags associated with some files. Instead, it tracks the file state and moves, so Tagging something means creating a copy (inside of the Repository, harddisk-space efficient) of a certain version of the file set. So the Debian branch of the released package source is contained in trunk/ and is tagged by copying (mirroring) the trunk tree to tags/DEBIAN-REVISION. The same happens for the upstream releases. In addition, the most recent upstream version is mirrored to branches/upstream/current. After few package upgrade cycles, the directory tree may look so:
# svn ls -R file:///home/user/svn-repo/dev/translucency branches/ branches/upstream/ branches/upstream/0.5.9/ branches/upstream/0.5.9/AUTHORS branches/upstream/0.5.9/COPYING ... branches/upstream/0.6.0/ branches/upstream/0.6.0/AUTHORS branches/upstream/0.6.0/COPYING ... branches/upstream/current/ branches/upstream/current/AUTHORS branches/upstream/current/COPYING ... same stuff as in 0.6.0 ... tags/ tags/0.5.9-1/ ... tags/0.5.9-1/debian/ tags/0.5.9-1/debian/README.Debian ... tags/0.6.0-1/ tags/0.6.0-1/AUTHORS ... tags/0.6.0-1/debian/ tags/0.6.0-1/debian/README.Debian tags/0.6.0-1/debian/changelog ... trunk/ trunk/AUTHORS trunk/COPYING ... trunk where 0.6.0-2 is beeing prepared ...
svn-buildpackage also supports the second repository layout suggested in the
Subversion
Book
. svn-inject however prefers the one documented above. Both
svn-buildpackage and svn-upgrade should be able to auto-detect the tree layout
and the location of package files.
In theory, you do not have to follow that examples and place the trunk,
branches and tags directory on the locations you like more. But
svn-buildpackage and other scripts won't locate the files automaticaly so you
will need to edit the .svn/deb-layout file in your working directory and set
paths. See the old abstract
about
how auto-detection works and the config
example
.
Finaly, the working directory structure on your development system may look so:
dev/ # base directory, may be under version control or not dev/foo # trunk directories of various packages dev/bar # contents correspond to trunk, see above dev/tarballs # where "orig" tarballs are stored, may be under VC or not dev/build-area # where the packages are exported temporarily and built
svn-buildpackage - maintaining Debian packages with Subversion
$LastChangedDate: 2004-02-14 01:03:11 +0100 (Sat, 14 Feb 2004) $