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

Re: Question regarding OpenMRS packaging - JAR dependencies in source?

On Tue Nov 09 17:06, Misha Koshelev wrote:
> Dear All:
> Please pardon my disturbance on your list.

No problem, we're always happy to help (-:

> On Tue, Nov 9, 2010 at 3:32 PM, Luca Falavigna <ftpmaster@debian.org> wrote:
> > There are a lot of .jar files which contain .class binary objects.
> > Are correspondant source files shipped in upstream tarball?
> > Is there a way to recreate those .jar files at build time?

> You will note that, if you browse the "source tarball":
> http://ftp.de.debian.org/debian/pool/main/w/weirdx/weirdx_1.0.32.orig.tar.gz
> there is a jar file with similar binary artifacts (misc/weirdx.jar).
> I was wondering if you had any input on Luca's question?

The difference here is that in the weirdx case, those class files are just
pre-built from the source for that package. The jar is ignored during the
Debian package build and another jar which is built from source is actually
used. AIUI in your case those class files are for dependencies, for which you
don't have the source.

If I were repacking the source tarball for any other reason I would remove that
jar file, but it's not required to do so for just that.

Where the pre-built artifacts are dependencies without source they should be
stripped from the tarball and the application altered to use dependencies
shipped in their own Debian packages.

On Wed Nov 10 07:57, Andreas Tille wrote:
> On Tue, Nov 09, 2010 at 07:03:25PM -0600, Misha Koshelev wrote:
> > 
> > Specifically, if I understand correctly the problem with tools such as
> > Maven is that, during _build_ time, network access is not allowed.
> I can confirm that the Debian package process should work on a
> box without network connection.

Indeed, there is some support for building maven packages against a local
Debian repository (see the various mvn-* packages), but that also requires the
dependencies to be packaged using this system.

> > Do I understand correctly that if I simply include code to download
> > JAR sources and, say, put them in a jar-sources folder, in
> > debian/orig-tar.sh, which is called from debian/watch by uscan, all
> > will be kosher?
> I think so.  However, as far as I (from a non-Java packagers
> perspective) would see things the best way would be to create Debian
> packages from those dependencies with their own source package creating
> the jars you need and let OpenMRS depend from these packages.  I have
> heard "rumors" that this might be a hard job for some Java apps.

Indeed, you should create those Debian packages from their own sources and
depend on them in OpenMRS. We have be working to make this easier;  javahelper
provides tools both to make packaging the libraries easier and to help with
altering the applications to use the system libraries (in particular,
jh_linkjars will create a symlink pit to the system libraries in the directory
that the application expects to have its own copies).


Attachment: signature.asc
Description: Digital signature

Reply to: