Guidelines for Packages Maintained on svn.debian.org:/svn/pkg-java

This chapter adds additional guidelines for packages maintained on Alioth's subversion repository. Please read the page Java/JavaVcs first if you have not done yet.

The subversion root URL is svn+ssh://svn.debian.org/svn/pkg-java/. Every source package has its trunk in svn+ssh://svn.debian.org/svn/pkg-java/trunk/SOURCE where SOURCE is the name of the source package. There are similar directories for tags and branches: svn+ssh://svn.debian.org/svn/pkg-java/tags/SOURCE and svn+ssh://svn.debian.org/svn/pkg-java/branches/SOURCE.

Multiple versions of the same source package SHOULD have their individual directories in trunk and SHOULD NOT share the same directory, e.g. svn+ssh://svn.debian.org/svn/pkg-java/trunk/junit and svn+ssh://svn.debian.org/svn/pkg-java/trunk/junit4 is correct but svn+ssh://svn.debian.org/svn/pkg-java/trunk/junit/version3 and svn+ssh://svn.debian.org/svn/pkg-java/trunk/junit/version4 would be incorrect.

Old and no longer maintained packages SHOULD be moved from trunk to svn+ssh://svn.debian.org/svn/pkg-java/old/.

Renamed source packages MUST be renamed in trunk, too. It is RECOMMENDED to recreate the old directory and commit a README file there with the information about the rename.

You SHOULD NOT import upstream source into Debian's svn repository. You SHOULD import only the debian directory. Setting the property mergeWithUpstream to 1 for this directory is RECOMMENDED for using svn-buildpackage.

You MUST create a tag in the tags directory for every successful upload.

Practical information

This chapter gives instructions for using certain tools. The subversion-based source repository of Debian-Java can be inspected at http://anonscm.debian.org/viewvc/pkg-java/.

initial import

USER=<your username on debian>
PACKAGE=$(basename ` pwd`) # replace with your package name
cd ${PACKAGE}
svn list "svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/trunk/"
debuild clean
svn import debian "svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/trunk/${PACKAGE}/debian"
svn mkdir "svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/tags/${PACKAGE}"
svn mkdir "svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/branches/${PACKAGE}"

initial import, the svn-inject way

This way is much easier and takes care of a lot of small details. Please first check that:

Host alioth.debian.org
        User USER-guest

The part about the login is important as it makes it much easier for other people to work on the package you imported. It also saves you from all the ${USER}-guest@ in the URLS.Then, import with the following command:

svn-inject -o -l 2  $PACKAGE.dsc svn+ssh://svn.debian.org/svn/pkg-java/

This takes care of all the small details of importing (in particular setting the mergeWithUpstream property, but also many other details.

working, updating, committing

svn checkout svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/trunk/${PACKAGE}
cd ${PACKAGE}
svn update
svn add DIR|FILE
svn commit

creating a tag

svn copy 'svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/trunk/${PACKAGE}' \
         'svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/tags/${PACKAGE}/RELEASE_1_2_2-8' \
        -m 'SOME COMMENT'

You can also use svn-buildpackage to create the tag. (This is similar to the sequence for svn-buildpackage below, but only generates the tag.)

svn-buildpackage --svn-tag-only

using svn-buildpackage

mkdir WORKINGDIR
cd WORKINGDIR
mkdir tarballs build-area
cp .../*.orig.tar.gz tarballs
svn checkout svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/trunk/${PACKAGE}
cd ${PACKAGE}
svn propset mergeWithUpstream 1 debian
svn commit (svn update)
svn-buildpackage --svn-ignore -us -uc -rfakeroot
svn-buildpackage --svn-lintian -rfakeroot
svn-buildpackage --svn-tag -rfakeroot

(created packages land in directory build-area)

Updating a package

rm ../*.gz
uscan --no-symlink
svn-upgrade ../*.gz
rm ../*.gz

Then edit/test/commit as normal.

If uscan fails, update or create the debian/watch file.

Branching for stable-security

Create a branch from the tag that corresponds to the version of the package released in stable. Edit debian/control and update the Vcs-Svn: and Vcs-Browser: fields to point to the branch.

svn copy 'svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/tags/${PACKAGE}/${VERSION}' \
         'svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/branches/${PACKAGE}/${RELEASE}-security' \
        -m 'branching ${VERSION} for ${RELEASE}-security updates'

After a package upload to stable-security, create the release tag manually, as svn-buildpackage won't place it correctly in the tree.

svn copy 'svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/branches/${PACKAGE}/${RELEASE}-security' \
         'svn+ssh://${USER}-guest@svn.debian.org/svn/pkg-java/tags/${PACKAGE}/${SECURITY-VERSION}' \
        -m 'tagging ${SECURITY-VERSION} upload'


CategoryJava