Bug#819422: javahelper: jh_exec fails without error message when symlinks point to files not in the package

Sascha Steinbiss satta at tetrinetsucht.de
Mon Mar 28 11:45:30 UTC 2016


Package: javahelper
Version: 0.54
Severity: normal

Dear Maintainer,

I think I have discovered an issue in javahelper. I am using javahelper to package a Java
library that can also be run as a standalone tool. My intention was to build two
binary packages, one with the jar (using a .jlibs file) and another one (depending on the lib)
just containing a symlink to the jar installed in /usr/share/java to /usr/bin (to make use of
jarwrapper) using a .links file.
I ran into an issue with javahelper, where when presented with a .links file where a symlink
is defined involving a file outside the package, it would just fail during the build with no
appropriate error message:

dh binary --with javahelper
[...]
Installing library orchid.jar into package liborchid-java
   jh_classpath
   jh_manifest
	find debian/orchid  -name '*.jar'
	find debian/liborchid-java  -name '*.jar'
	Found symlink usr/share/java/orchid.jar
	Found usr/share/java/orchid-1.0.0~git20150502.jar
	Reading manifest from debian/liborchid-java/usr/share/java/orchid-1.0.0~git20150502.jar
	No update of debian/liborchid-java/usr/share/java/orchid-1.0.0~git20150502.jar required.
   jh_exec
Searching /build/orchid-1.0.0~git20150502/debian/orchid for orchid
debian/rules:7: recipe for target 'binary' failed
make: *** [binary] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2

I guess this case isn't handled? This is just a suspicion raised in #debian-mentors.
I have worked around the issue by just adding a small wrapper script instead of linking and using
jarwrapper. However, I'd like to bring this to your attention -- an error message would be nice here.
You can reproduce the problem by checking out commit 2779f36dd1c02699a6ee747760bfd6cc3f64ffa6 from
https://anonscm.debian.org/cgit/users/sascha-guest/orchid.git.

Cheers
Sascha

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.4.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Init: systemd (via /run/systemd/system)

Versions of packages javahelper depends on:
ii  bsdmainutils         9.0.9
ii  dctrl-tools          2.24-2
ii  debhelper            9.20160313
ii  devscripts           2.16.2
ii  dpkg-dev             1.18.4
ii  libarchive-zip-perl  1.56-2
ii  perl                 5.22.1-9

javahelper recommends no packages.

Versions of packages javahelper suggests:
pn  cvs       <none>
ii  gawk      1:4.1.3+dfsg-0.1
pn  tofrodos  <none>

-- no debconf information



More information about the pkg-java-maintainers mailing list