[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Java Team blog


[Are you subscribed to debian-java? Then I don't need to CC you.]

Am 05.05.2016 um 05:17 schrieb Christopher Hoskin:
> Thanks for setting up the blog.
> Regarding "Outlook, goals and request for help", I'm interested in
> helping out. I've been trying to get involved for a while, but to be
> honest, I'm finding the learning curve rather steep. Some blog posts
> covering how to get started and how to tackle some of the problems that
> crop up when packaging anything non-trivial would be really helpful.

I intend to write some packaging articles this month that will also be
included in our wiki, so everyone should be able to add more examples
and better explanations.

> (For a bit of background, I'm coming at this from the perspective of
> someone who wants to run various bits of "enterprise middleware" on
> Debian rather than someone who is a Java developer. Examples of the
> applications I'd like to help package are Shibboleth IdP [0], Grouper
> [1], Syncope [2] and their dependencies. I have a fair bit of experience
> packaging Perl modules for Debian[3] despite not being a Perl programmer
> either, and I generally prefer going off and doing my own
> research/pouring through source code before bothering others for help.
> However, I've yet to manage to get any Java libraries into Debian. I'm
> not yet a Debian Developer, but I am in the process of applying[4].)

Sometimes it doesn't seem to be the case but Java packaging is a very
rational process too. :) My advise to you is: (I'll take Syncope as an

Download the sources and find out what build-dependencies are needed.


Identify the build system

Syncope is a Maven based project because there is a pom.xml file in the
root directory. Find out what <dependencies></dependencies> are already
packaged for Debian and what are missing currently. Apparently Syncope
consists of multiple modules. Do you need all of them? Find out what a
user would really need to find this package useful. Then package the
rest step by step. Split this huge problem into many smaller pieces. For
instance there is a paragraph about Apache Wicket, a web framework. A
lot of code on the client side depends on it. Looks like a rather
important piece of software for Syncope but perhaps you don't need it at
all because you are only interested in server and core components and
then you can just ignore it.

Now that you know that Syncope is a pure Maven project, your tool of
choice is clear: maven-debian-helper. There is a helper script called
mh_make that will help you to create an initial debian directory. You
should try to ignore the missing dependencies in the beginning.

I think Syncope is comparable to ActiveMQ, packagingwise at least. [1]
For most Maven projects debian/rules with compat 9 is as simple as:

#!/usr/bin/make -f
export JAVA_HOME=/usr/lib/jvm/default-java

	dh $@ --parallel --buildsystem=maven

The tricky part is maven.rules and maven.ignoreRules where you have to
rewrite the version numbers in the original pom.xml file and replace
them with a versionless "debian" string. Maven is a version centric tool
but Debian tries to avoid shipping multiple versions of the same
library. (code duplication, security and maintenance hell)

> Re goals, the Perl Packaging team make use of Debian's Continuing
> Integration[5]. Given that, as I understand it, Java applications
> packaged for Debian make use of the versions of libraries that have been
> packaged for Debian rather than the precise version specified in the POM
> file (or equivalent), I would have thought this would be something you'd
> also want to adopt?

Nobody has worked on CI yet but because of the reproducible builds project
we are aware of build failures, thanks to Chris Lamb who reports those
issues. However I agree having more autopkgtests would be a good thing.



[1] https://sources.debian.net/src/activemq/5.13.2%2Bdfsg-2/debian/rules/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: