On Thu, 18 Jan 2018 21:48:00 + Niels Thykier wrote:
> Control: reassign -1 javahelper
>
> On Thu, 18 Jan 2018 23:41:19 +0200 Adrian Bunk wrote:
> > Package: debhelper
> > Version: 11.1.2
> > Severity: serious
> > Control: affects -1 javahelper src:zabbix
> >
> > https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/zabbix.html
> >
> > ...
> >jh_linkjars -O--max-parallel=4 -Nzabbix-frontend-php
> > -Nzabbix-java-gateway
> > Invalid option: N
> > Usage: jh_linkjars [options] [target]
> > Options:
> > -h --help: show this text
> > -V --version: show the version
> > -v --verbose: show more information while running
> > -t --transitive: transitively link jars
> > -n --no-act: don't actually do anything, just print the results
> > -u --unlink: remove the links instead of adding them
> > debian/rules:77: recipe for target 'binary' failed
> > make: *** [binary] Error 1
> >
> >
> > Works after downgrading to debhelper 11
> >
> >
>
>
> The -N option is a basic "shared" debhelper option required by any
> dh-like tool added to the debhelper sequence (similar to -p/-s/-i). The
> solution here is to have javahelper support that option.
>
> Thanks,
> ~Niels
>
>
>
Hi,
I have written some patches to rewrite most of the javatools helpers
into perl using Debhelper's Dh_Lib[1]. This would fix this problem and
avoid future instances of it.
While the patches do include jh_linkjars, I doubt that the bug will be
fixed until jh_build and jh_depends have also been rewritten.
Therefore, I am not tagging this bug with "patch".
Thanks,
~Niels
[1] The 0001 patch is strictly unrelated but avoids relying (fake)root
when building the package.
>From bf05b0189e84660fae137060931a490ab58d0fa2 Mon Sep 17 00:00:00 2001
From: Niels Thykier
Date: Sat, 7 Apr 2018 14:43:21 +
Subject: [PATCH 1/6] javatools can be built without (fake)root
Signed-off-by: Niels Thykier
---
debian/control | 1 +
1 file changed, 1 insertion(+)
diff --git a/debian/control b/debian/control
index c127665..6616958 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Build-Depends:
libtest-strict-perl,
markdown,
perl
+Rules-Requires-Root: no
Standards-Version: 4.1.3
Vcs-Git: https://anonscm.debian.org/git/pkg-java/javatools.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/javatools.git
--
2.16.3
>From 4f6064fa0e380e8b8f50b16e8852987431f1776f Mon Sep 17 00:00:00 2001
From: Niels Thykier
Date: Sat, 7 Apr 2018 15:05:06 +
Subject: [PATCH 2/6] Rewrite jh_classpath using Debhelper's Dh_Lib
Signed-off-by: Niels Thykier
---
debian/javahelper.manpages | 1 -
debian/rules | 1 +
jh_classpath | 221 +++--
jh_classpath.1 | 30 --
t/strict.t | 1 +
5 files changed, 135 insertions(+), 119 deletions(-)
delete mode 100644 jh_classpath.1
diff --git a/debian/javahelper.manpages b/debian/javahelper.manpages
index 8527947..6f02dc7 100644
--- a/debian/javahelper.manpages
+++ b/debian/javahelper.manpages
@@ -1,5 +1,4 @@
jh_build.1
-jh_classpath.1
jh_depends.1
jh_exec.1
jh_installjavadoc.1
diff --git a/debian/rules b/debian/rules
index 703676a..600be8f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,6 +20,7 @@ override_dh_auto_build: jh_lib.sh
$(POD2MAN) jh_setupenvironment tmp/jh_setupenvironment.1
$(POD2MAN) jh_compilefeatures tmp/jh_compilefeatures.1
$(POD2MAN) jh_manifest tmp/jh_manifest.1
+ $(POD2MAN) jh_classpath tmp/jh_classpath.1
$(POD2MAN) fetch-eclipse-source.pod tmp/fetch-eclipse-source.1
$(POD2MAN) -s 1 jh_clean.pod tmp/jh_clean.1
$(POD2MAN) $(MOD_PATH)/Eclipse.pm tmp/Debian::Javahelper::Eclipse.3
diff --git a/jh_classpath b/jh_classpath
index 3024f98..5aa61f2 100755
--- a/jh_classpath
+++ b/jh_classpath
@@ -1,94 +1,139 @@
-#!/bin/bash --
-
-set -e
-
-. /usr/share/javahelper/jh_lib.sh
-
-syntax()
-{
- echo -e "Usage: jh_classpath [options] [jar(s)]"
- echo -e "Options:"
- echo -e "\t-h --help: show this text"
- echo -e "\t-V --version: show the version"
- echo -e "\t-i --indep: act on all Arch: all packages"
- echo -e "\t-a --arch: act on all Arch-specific packages"
- echo -e "\t-s --same-arch: alias of --arch for compatibility with debhelper"
- echo -e "\t-p --package=: package to act on (default=all)"
- echo -e "\t-P --tmpdir=: package directory (default=\$CWD/debian/package)"
- echo -e "\t-c --classpath=: The classpath to set on the jar(s)"
- echo -e "\t-v --verbose: show more information while running"
- echo -e "\t-n --no-act: don't actually do anything, just print the results"
- exit 1
-}
+#!/usr/bin/perl
-ARGS="i indep a arch s same-arch p package P tmpdir v verbose n no-act c classpath" parseargs "$@"
+=head1 NAME
-dh_testdir
+jh_classpath - sets classpaths in jar files
-VERBOSE="`getarg v