Bug#914748: ant: Fail when installed along with usrmerge and invoked via /bin/ant

2018-12-05 Thread Mo Zhou
I've fixed the opencv build failure in experimental due to the path
change of ant.

Fixed in version: 3.4.4+dfsg-1~exp1



Bug#914748: ant: Fail when installed along with usrmerge and invoked via /bin/ant

2018-11-27 Thread pini
On Mon, 26 Nov 2018 23:54:06 +0100 Emmanuel Bourg  wrote:
> Control: severity -1 normal
> 
> Le 26/11/2018 à 23:38, Gilles Filippini a écrit :
> 
> > To me this is RC because it makes opencv FTBFS on some official buildd
> > machines. No opinion at all about usrmerge.
> 
> My understanding is that usrmerge is optional at this point and the
> builders are going to be reverted to non usrmerged. For this reason I'm
> lowering the severity.
> 
> 
> > In any case the scriplet replaced by the patch is buggy.
> > How about pushing this patch upstream?
> 
> The patch looks good to me, thanks a lot. Do you know if readlink is
> commonly available on other Unix platforms?

I don't know. In case it's not, it's easy to test and fallback on the
removed snippet.

_g.



Bug#914748: ant: Fail when installed along with usrmerge and invoked via /bin/ant

2018-11-26 Thread Emmanuel Bourg
Control: severity -1 normal

Le 26/11/2018 à 23:38, Gilles Filippini a écrit :

> To me this is RC because it makes opencv FTBFS on some official buildd
> machines. No opinion at all about usrmerge.

My understanding is that usrmerge is optional at this point and the
builders are going to be reverted to non usrmerged. For this reason I'm
lowering the severity.


> In any case the scriplet replaced by the patch is buggy.
> How about pushing this patch upstream?

The patch looks good to me, thanks a lot. Do you know if readlink is
commonly available on other Unix platforms?

Emmanuel Bourg



Bug#914748: ant: Fail when installed along with usrmerge and invoked via /bin/ant

2018-11-26 Thread Gilles Filippini
Hi Markus,

Markus Koschany a écrit le 26/11/2018 à 23:10 :
> Hi,
> 
> Am 26.11.18 um 22:46 schrieb Gilles Filippini:
>> Package: ant
>> Version: 1.9.10-1
>> Severity: serious
>> Tags: patch
>> Justification: Causes FTBFS
>>
>> Hi,
>>
>> When installed along with usrmerge, ant can be invoked via /bin/ant. In this 
>> case it fails with:
> 
> [...]
> 
> Just some quick notes, not that I'm strongly opposed against usrmerge or
> dislike the idea in general but this is somehow odd. First of all why is
> this serious now? I know there is an ongoing discussion on debian-devel
> about usrmerge but when was it decided to file RC bugs and make this
> release-critical? I suppose opencv will work perfectly fine with the
> traditional file system layout?

To me this is RC because it makes opencv FTBFS on some official buildd
machines. No opinion at all about usrmerge.

> In any case it is not a very good idea to diverge from upstream or to
> carry yet another patch. I wonder why this hasn't been changed already
> because Fedora moved to this scheme already and they should have noticed
> that too.

In any case the scriplet replaced by the patch is buggy.
How about pushing this patch upstream?

Thanks,

_g.



signature.asc
Description: OpenPGP digital signature


Bug#914748: ant: Fail when installed along with usrmerge and invoked via /bin/ant

2018-11-26 Thread Markus Koschany
Hi,

Am 26.11.18 um 22:46 schrieb Gilles Filippini:
> Package: ant
> Version: 1.9.10-1
> Severity: serious
> Tags: patch
> Justification: Causes FTBFS
> 
> Hi,
> 
> When installed along with usrmerge, ant can be invoked via /bin/ant. In this 
> case it fails with:

[...]

Just some quick notes, not that I'm strongly opposed against usrmerge or
dislike the idea in general but this is somehow odd. First of all why is
this serious now? I know there is an ongoing discussion on debian-devel
about usrmerge but when was it decided to file RC bugs and make this
release-critical? I suppose opencv will work perfectly fine with the
traditional file system layout?

In any case it is not a very good idea to diverge from upstream or to
carry yet another patch. I wonder why this hasn't been changed already
because Fedora moved to this scheme already and they should have noticed
that too.

So far

Markus




signature.asc
Description: OpenPGP digital signature


Bug#914748: ant: Fail when installed along with usrmerge and invoked via /bin/ant

2018-11-26 Thread Gilles Filippini
Package: ant
Version: 1.9.10-1
Severity: serious
Tags: patch
Justification: Causes FTBFS

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

When installed along with usrmerge, ant can be invoked via /bin/ant. In this 
case it fails with:

/bin/ant: 1: cd: can't cd to /bin/../share/ant/bin/..
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
Caused by: java.lang.ClassNotFoundException: 
org.apache.tools.ant.launch.Launcher

The attached patch solves the problem for me.

Setting severity to serious because it causes FTBFS. See for example [1].

[1] 
https://buildd.debian.org/status/fetch.php?pkg=opencv=amd64=3.2.0%2Bdfsg-4.1%2Bb2=1542819371=0

Thanks,

_g.


-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEEoJObzArDE05WtIyR7+hsbH/+z4MFAlv8aaYACgkQ7+hsbH/+
z4MTeAf/dTyabk7caN+jIGWSZfSxW3HTob2CoGUHbTDclbZvVfX91PvbszNJlADO
kXgPZI6ngOky3gx0MwH8H/SqQFt2PamHFdfguSpxWG7ARIERxII7D0ifhFd4eU4V
S1RA/ZH1qP98pTX1FFDTBC4l3a8qqDXgIIOmhWqkqiXcbnG9nJMmOdQJWRDjVHQk
9YI3Si/M9wTATCF6fyQhCUG4YqstY6+5ITvuHnQzFhGebC7TElZDuwqF46ZGNnNp
0LXUZjj1A2/UYGzdx0t2YepcHHXd9tFbrDLUZN2OdIaxNorZGoq1xHAEA7x5ussm
gRyZebWqgf3B2jGmXs194+27iAt1XQ==
=Zgso
-END PGP SIGNATURE-
diff -Nru ant-1.10.5/debian/changelog ant-1.10.5/debian/changelog
--- ant-1.10.5/debian/changelog 2018-08-27 14:57:47.0 +0200
+++ ant-1.10.5/debian/changelog 2018-11-26 22:00:46.0 +0100
@@ -1,3 +1,11 @@
+ant (1.10.5-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * New patch usrmerge-proof.patch to fix failure when installed along
+with usrmerge and invoked via /bin/ant
+
+ -- Gilles Filippini   Mon, 26 Nov 2018 22:00:46 +0100
+
 ant (1.10.5-2) unstable; urgency=medium
 
   * Team upload.
diff -Nru ant-1.10.5/debian/patches/series ant-1.10.5/debian/patches/series
--- ant-1.10.5/debian/patches/series2018-08-27 14:57:47.0 +0200
+++ ant-1.10.5/debian/patches/series2018-11-26 21:55:03.0 +0100
@@ -4,3 +4,4 @@
 0013-auto-adjust-target.patch
 0015-javadoc-ignore-source-errors.patch
 0014-remove-java-activation-module.patch
+usrmerge-proof.patch
diff -Nru ant-1.10.5/debian/patches/usrmerge-proof.patch 
ant-1.10.5/debian/patches/usrmerge-proof.patch
--- ant-1.10.5/debian/patches/usrmerge-proof.patch  1970-01-01 
01:00:00.0 +0100
+++ ant-1.10.5/debian/patches/usrmerge-proof.patch  2018-11-26 
22:00:43.0 +0100
@@ -0,0 +1,26 @@
+Description: With usrmerge configured, ant may be called via /bin/ant.
+ In this case it fails with:
+  /bin/ant: 1: cd: can't cd to /bin/../share/ant/bin/..
+ Using 'readlink -f' instead of this cumbersome while loop solves the
+ problem.
+Index: ant-1.10.5/src/script/ant
+===
+--- ant-1.10.5.orig/src/script/ant
 ant-1.10.5/src/script/ant
+@@ -144,15 +144,7 @@ if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME"
+   progname=`basename "$0"`
+ 
+   # need this for relative symlinks
+-  while [ -h "$PRG" ]; do
+-ls=`ls -ld "$PRG"`
+-link=`expr "$ls" : '.*-> \(.*\)$'`
+-if expr "$link" : '/.*' > /dev/null; then
+-  PRG="$link"
+-else
+-  PRG=`dirname "$PRG"`"/$link"
+-fi
+-  done
++  PRG=`readlink -f $PRG`
+ 
+   ANT_HOME=`dirname "$PRG"`/..
+