The subversion-based source repository of Debian-Java can be inspected at http://svn.debian.org/wsvn/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 ewl-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 ewl-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://ewl-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://ewl-guest@svn.debian.org/svn/pkg-java/trunk/${PACKAGE}' \
         'svn+ssh://ewl-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
cp .../*.orig.tar.gz tarballs
svn checkout svn+ssh://ewl-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

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@svn.debian.org/svn/pkg-java/tags/${PACKAGE}/${VERSION}' \
         'svn+ssh://user@svn.debian.org/svn/pkg-java/branches/${PACKAGE}/${RELEASE}-security' \
        -m 'branching ${VERSION} for ${RELEASE}-security updates'


CategoryJava