Debian/Ruby Extras - Using Subversion
Using the Subversion repository
Follow the instructions for building the pkg-ruby-extras packages.
If you need general help with Subversion, an online book is available.
Repository structure
Our repository is structured like this:
pkg-ruby-extras
+-- packages
+-- libfoo-ruby
+-- libbar-ruby
+-- ...
+-- packages-wip
+-- libblop-ruby
+-- libbaz-ruby
+-- ...
+-- tools
+-- ...
+-- website
+-- ...
All our packages will live inside the packages/ and packages-wip/
directories. packages-wip/ contains packages which have not been uploaded to
Debian yet (WIP stands for Work In Progress), and packages are moved to
packages/ after their first upload. Each package directory will have a
structure common to subversion-managed projects:
libfoo-ruby
+-- branches
+-- tags
+-- trunk
trunk is where your current version lives. tags is where you copy snapshots
when uploading. So there must be one tagged copy for each uploaded version of a
package. branches is were you can make copies to experiment something new without
breaking the trunk. Those are common-used conventions: you can look with more
details in the SVN Book.
Injecting a new package to Subversion
First, you have to build your package outside of the SVN tree. You should get something like that:.
|-- libfeedparser-ruby-0.1/ (build dir)
|-- libfeedparser-ruby1.8-dev_0.1-1_all.deb
|-- libfeedparser-ruby1.8_0.1-1_all.deb
|-- libfeedparser-ruby_0.1-1.diff.gz
|-- libfeedparser-ruby_0.1-1.dsc
|-- libfeedparser-ruby_0.1-1_i386.changes
|-- libfeedparser-ruby_0.1.orig.tar.gz
`-- libxfeedparser-ruby_0.1-1_all.deb
Then just do:
svn-inject -v -o libfeedparser-ruby_0.1-1.dsc \
svn+ssh://LOGIN@svn.debian.org/svn/pkg-ruby-extras/packages-wip/
You should not try to import your package manually: this handles a lot of small gory details you do not want to know.
N.B. Make sure that you have registered a SSH key, else you will be prompted for your password a good dozen of times.
This script creates abranches directory in svn that we do not use. You should remove this directory after the svn-inject operation. Get first a fresh copy of the package you just injected in svn, then delete the unneeded branches directory.
$ cd Debian/packages
$ svn co svn+ssh://svn.debian.org/svn/pkg-ruby-extras/packages-wip/libfoo-ruby
[...]
$ cd libfoo-ruby
$ svn remove branches
[...]
$ svn commit -m "Deleted branches directory."
Checking out
You can check a package out by using:
$ svn checkout svn+ssh://svn.debian.org/svn/pkg-ruby-extras/packages-wip/libfoo-ruby
Alternatively, you can check out only the package’s current version:
$ svn checkout svn+ssh://svn.debian.org/svn/pkg-ruby-extras/packages-wip/libfoo-ruby/trunk
Or the whole repository:
$ svn checkout svn+ssh://svn.debian.org/svn/pkg-ruby-extras
Building with svn-buildpackage
First, you must download upstream sources.
Then you have to change do the trunk directory:
$ cd libfoo-ruby/trunk
Inside trunk/, you can build the package with svn-buildpackage:
$ svn-buildpackage -rfakeroot
Releasing and tagging
After releasing the package, its current state must be tagged to keep the exact
source used to build the uploaded package. This can be done from the package
directory with (assuming the released version is 0.1-1):
$ svn copy trunk tags/0.1-1
Alternatively, you can tell svn-buildpackage to automatically tag the release
after building using the option --svn-tag. You can also optionally use
debcommit -r if you have the devscripts package installed.
Attention: use this option only when you are sure that this build will be the final build, just before upload.
Package upload checklist
- Update your repository (just in case).
- Rebuild the package (without
--svn-ignore-new!). - Check everything is alright and do whatever tests you always do.
- Change the latest changelog entry distribution to “unstable” (or whatever is appropriate).
- Rebuild again with
pbuilder! - Perform small checks, final
lintian&lindacheck. - Upload the package.
- Tag with
svn-buildpackage --svn-tag-only. - Commit the new changelog entry for the
UNRELEASEDdistribution.
We will soon release a bash source file with useful aliases. If you are
interested, write to our mailing list, pkg-ruby-extras-maintainers (at
lists.alioth.debian.org).