Re: Packaging a maven project for Debian
Le 19/07/2016 à 13:23, Guillaume Lederrey a écrit :
> Thanks for the help! I managed to get a package built for stormpot.
> The tests and javadoc are not built. My experiments are at
> https://github.com/gehel/stormpot/tree/debian. I added the debian
> config files to the original source tree. I'm not sure if that is the
> way things are usually done, or if a separate repo, just for the
> debian stuff is better.
There are several possible workflows for building Debian packages,
cloning the upstream repository and using a branch for the debian files
is one of them, but within the Java team we standardized on another
workflow with 3 branches:
- upstream: contains the upstream code, with one commit per new release
- master: the main branch with the debian/* files, new releases are
merged from the 'upstream' branch
- pristine-tar: generated by gbp to store the upstream tarball
When I create a new package I usually start just like you did by
cloning the upstream repository. When the debian/* files are ready and
the upstream tarball created in the parent directory I run this script:
http://paste.debian.net/783111/ which creates the right repository
structure. I then push the repository to alioth.
When you want to update the package to a more recent version, you create
the new upstream tarball and then run gbp from the master branch:
gbp import-orig --verbose --merge --pristine-tar <tarball>
> There are probably tons of things that are wrong in this package. I'll
> be happy to fix them if you point them out.
The package looks good for a first attempt, congratulations :) I suspect
that you built the package on Jessie, it's preferable to work in sid
instead to use the latest packaging tools and dependencies.
Here are some improvements you could make:
- debian/control: set Standards-Version to 3.9.8
- debian/control: use an https URL for Vcs-Git
- debian/control: remove libmaven-compiler-plugin-2.5-java (not needed in sid)
- debian/control: improve the package description
- debian/rules: use the DH sequencer instead of CDBS
(that's now the default with mh_make in sid)
- remove debian/maven.publishedRules and debian/maven.cleanIgnoreRules
- debian/patches/simplify-inception-year is probably not needed
> Any idea what I should do next?
The next steps are:
1. file and ITP for the new package and set the bug number in
debian/changelog. Use:
reportbug --list-cc debian-java@lists.debian.org --offline wnpp
2. create the packaging repository on alioth:
- create an account on https://alioth.debian.org if you don't have one already
- join the pkg-java group: https://alioth.debian.org/project/request.php?group_id=30085
- log into alioth with SSH, cd /srv/git.debian.org/git/pkg-java
and run ./setup-repository <packagename>
- push the repository (git push --all -u && git push --tags)
3. ask a sponsor to review and upload your package (on the debian-java list)
4. move to the next package :)
Emmanuel Bourg
Reply to: