There are different ways to store the packages in the repositories (or in multiple repositories at your choice). svn-buildpackage normally expects a directory structure similar to the one well described in the Subversion Book, which looks like:
Example 1.1. Directory hierarchy example.
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 developer Foo for his own experiments. See
Subversion Book/Branches for more details about using
Subversion branches.
Also note that Tags work quite differently to 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 like:
Example 1.2. Example branch directory hierarchy
# 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 (function/package) but svn-inject prefers the one documented above. Both svn-buildpackage and svn-upgrade should be able to auto-detect the repository 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.
Finally, the working directory structure on your development system may look like:
Example 1.3. Example configuration
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