Bug#826734: mh_install doesn't work with dh-exec

2016-06-08 Thread Ondřej Surý
My understanding from what algernon said in IRC, it's just a matter of
using standard debhelper interface to access to debian/.poms file.

Perhaps a small dh/mh helper like this:

$ cat mh_readpoms
#!/usr/bin/perl -w
use strict;
use Debian::Debhelper::Dh_Lib;

my $package = $ARGV[0];

init();

if ($package) {
  my $file = pkgfile($package,"poms");
  if ($file) {
  my @poms=filedoublearray($file);
  foreach my $pom (@poms) {
print join(" ", @$pom) . "\n";
  }
  }
}

and do:

mh_readpoms $p | while read ...

in the main mh_install function.

This might just do the trick as filedoublearray call is needed for
dh-exec to kick-in.

Cheers,
-- 
Ondřej Surý 
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
Knot Resolver (https://www.knot-resolver.cz/) – secure, privacy-aware,
fast DNS(SEC) resolver

On Wed, Jun 8, 2016, at 15:28, Emmanuel Bourg wrote:
> Le 8/06/2016 à 15:18, Ondřej Surý a écrit :
> 
> > java/lib/icepatch2-3.6.2.pom --artifact=java/lib/icepatch2-3.6.2.jar
> > java/lib/glacier2-3.6.2.pom --artifact=java/lib/glacier2-3.6.2.jar
> > java/lib/freeze-3.6.2.pom --artifact=java/lib/freeze-3.6.2.jar
> 
> Thank you for the example. mh_install supports wildcards for the
> --artifact parameter. You can write something like this:
> 
> path/to/pom.xml --artifact=lib/foo-*.jar
> 
> But this won't work with your example since the path of the pom also
> contains the version number.
> 
> I'm not sure we can easily interface mh_install with dh-exec, but it
> should be possible to teach him to expand the environment variables.
> 
> Emmanuel Bourg
> 

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#826734: mh_install doesn't work with dh-exec

2016-06-08 Thread Emmanuel Bourg
Le 8/06/2016 à 15:18, Ondřej Surý a écrit :

> java/lib/icepatch2-3.6.2.pom --artifact=java/lib/icepatch2-3.6.2.jar
> java/lib/glacier2-3.6.2.pom --artifact=java/lib/glacier2-3.6.2.jar
> java/lib/freeze-3.6.2.pom --artifact=java/lib/freeze-3.6.2.jar

Thank you for the example. mh_install supports wildcards for the
--artifact parameter. You can write something like this:

path/to/pom.xml --artifact=lib/foo-*.jar

But this won't work with your example since the path of the pom also
contains the version number.

I'm not sure we can easily interface mh_install with dh-exec, but it
should be possible to teach him to expand the environment variables.

Emmanuel Bourg

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#826734: mh_install doesn't work with dh-exec

2016-06-08 Thread Ondřej Surý
Hi Emmanuel,

this is the debian/libzeroc-ice-java.poms:

$ cat debian/libzeroc-ice-java.poms
java/lib/ice-3.6.2.pom --artifact=java/lib/ice-3.6.2.jar
java/lib/icebox-3.6.2.pom --artifact=java/lib/icebox-3.6.2.jar
java/lib/icediscovery-3.6.2.pom
--artifact=java/lib/icediscovery-3.6.2.jar
java/lib/icelocatordiscovery-3.6.2.pom
--artifact=java/lib/icelocatordiscovery-3.6.2.jar
java/lib/icegrid-3.6.2.pom --artifact=java/lib/icegrid-3.6.2.jar
java/lib/icestorm-3.6.2.pom --artifact=java/lib/icestorm-3.6.2.jar
java/lib/icepatch2-3.6.2.pom --artifact=java/lib/icepatch2-3.6.2.jar
java/lib/glacier2-3.6.2.pom --artifact=java/lib/glacier2-3.6.2.jar
java/lib/freeze-3.6.2.pom --artifact=java/lib/freeze-3.6.2.jar

and here's f.e. debian/libzeroc-ice-java.links:

$ cat debian/libzeroc-ice-java.links 
#!/usr/bin/dh-exec
usr/share/java/freeze-${VERSION}.jar usr/share/java/freeze.jar
usr/share/java/glacier2-${VERSION}.jar usr/share/java/glacier2.jar
usr/share/java/ice-${VERSION}.jar usr/share/java/ice.jar
usr/share/java/icebox-${VERSION}.jar usr/share/java/icebox.jar
usr/share/java/icediscovery-${VERSION}.jar
usr/share/java/icediscovery.jar
usr/share/java/icelocatordiscovery-${VERSION}.jar
usr/share/java/icelocatordiscovery.jar
usr/share/java/icegrid-${VERSION}.jar usr/share/java/icegrid.jar
usr/share/java/icepatch2-${VERSION}.jar usr/share/java/icepatch2.jar
usr/share/java/icestorm-${VERSION}.jar usr/share/java/icestorm.jar
usr/share/java/freeze-${VERSION}-source.jar
usr/share/java/freeze-source.jar
usr/share/java/glacier2-${VERSION}-source.jar
usr/share/java/glacier2-source.jar
usr/share/java/ice-${VERSION}-source.jar usr/share/java/ice-source.jar
usr/share/java/icebox-${VERSION}-source.jar
usr/share/java/icebox-source.jar
usr/share/java/icediscovery-${VERSION}-source.jar
usr/share/java/icediscovery-source.jar
usr/share/java/icelocatordiscovery-${VERSION}-source.jar
usr/share/java/icelocatordiscovery-source.jar
usr/share/java/icegrid-${VERSION}-source.jar
usr/share/java/icegrid-source.jar
usr/share/java/icepatch2-${VERSION}-source.jar
usr/share/java/icepatch2-source.jar
usr/share/java/icestorm-${VERSION}-source.jar
usr/share/java/icestorm-source.jar

With upstream bump to 3.6.3, I will have to modify *.poms, but *.links
will be ok, as I export VERSION from the d/rules.

(P.S.: I have no clue about Java at all, so this is what the package has
and I only used dh-exec to make it simpler).

Cheers,
-- 
Ondřej Surý 
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
Knot Resolver (https://www.knot-resolver.cz/) – secure, privacy-aware,
fast DNS(SEC) resolver

On Wed, Jun 8, 2016, at 15:15, Emmanuel Bourg wrote:
> Hi Ondřej,
> 
> What kind of substitution would you like to perform in the debian/*.poms
> files? Could you post an example please?
> 
> Emmanuel Bourg
> 

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#826734: mh_install doesn't work with dh-exec

2016-06-08 Thread Emmanuel Bourg
Hi Ondřej,

What kind of substitution would you like to perform in the debian/*.poms
files? Could you post an example please?

Emmanuel Bourg

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#826734: mh_install doesn't work with dh-exec

2016-06-08 Thread Ondřej Surý
Package: maven-repo-helper
Version: 1.8.12
Severity: normal

Dear maintainer(s),

I have recently helped with zeroc-ice packaging and the debian/*.poms
contains an upstream version number, so it would be very convenient if
dh-exec would work, so I could dynamically replace ${VERSION} at the
build time.

Unfortunately the build breaks as it looks like mh_install is not
using standard debhelper mechanisms to access the files:

14:39 < algernon> ondrej: hm, perhaps mh_install is doing its own
magic, and doesn't go through debhelpers thing that makes executable
files work :/ │

Could you perhaps work with dh-exec maintainer to resolve this?

Cheers,
Ondrej

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'unstable'), (700, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.5.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.