Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 717274 - sci-geosciences/josm-99999 now depends on ivy
Summary: sci-geosciences/josm-99999 now depends on ivy
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 3 votes (vote)
Assignee: Sci-geo Project
Depends on: 794598
  Show dependency tree
Reported: 2020-04-13 07:02 UTC by Jean-Claude Repetto
Modified: 2021-08-04 17:49 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---

Complete build log (file_717274.txt,3.05 KB, text/plain)
2020-04-13 07:06 UTC, Jean-Claude Repetto
Working ebuild with ivy (josm-99999-r1.ebuild,2.30 KB, text/plain)
2020-10-04 16:39 UTC, Julien Papasian
Working ebuild with ivy (josm-99999.ebuild,2.37 KB, patch)
2020-11-05 17:30 UTC, Jean-Claude Repetto
Details | Diff
Build log (build.log,70.65 KB, text/x-log)
2021-01-05 10:37 UTC, Jean-Claude Repetto
New working ebuild with ivy (josm-99999.ebuild,2.42 KB, text/plain)
2021-03-04 18:02 UTC, Jean-Claude Repetto

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Claude Repetto 2020-04-13 07:02:42 UTC

Build fails:

      [get] Getting:
      [get] To: /var/tmp/portage/sci-geosciences/josm-99999/work/josm-99999/tools/ivy/ivy-2.5.0.jar
      [get] Error getting to /var/tmp/portage/sci-geosciences/josm-99999/work/josm-99999/tools/ivy/ivy-2.5.0.jar

Reproducible: Always

GENTOO_VM=icedtea-bin-8  CLASSPATH="" JAVA_HOME="/opt/icedtea-bin-3.10.0"
JAVACFLAGS="-source 1.8 -target 1.8" COMPILER="javac"
Comment 1 Jean-Claude Repetto 2020-04-13 07:06:58 UTC
Created attachment 632584 [details]
Complete build log
Comment 2 Jonas Stein gentoo-dev 2020-04-13 17:56:39 UTC
probably since josm-16239
Comment 3 Julien Papasian 2020-10-04 16:39:25 UTC
Created attachment 663760 [details]
Working ebuild with ivy

In case someone is looking for a working ebuild (tested with 17084), I attached one.
You will need to disable network sandbox for ivy to download dependencies for JOSM (instructions provided in ebuild).
Comment 4 Jean-Claude Repetto 2020-10-04 17:11:09 UTC
Hi Julien,

Thanks for your ebuild.

I have put this line in /etc/portage/package.env:
FEATURES=\"-network-sandbox\" sci-geosciences/josm

But when I run "emerge josm", I get this error:
--- Invalid atom in /etc/portage/package.env: FEATURES=\"-network-sandbox\"
Comment 5 Jean-Claude Repetto 2020-10-06 06:26:17 UTC
I removed the backslashes, same problem:
--- Invalid atom in /etc/portage/package.env: FEATURES="-network-sandbox"
Comment 6 Julien Papasian 2020-10-11 09:35:08 UTC
Hello, sorry for late reply, I wasn't subscribed to the thread.

Try this way:

1) Create /etc/portage/env/nonetworksandbox.conf
2) Put in it:
FEATURES="${FEATURES} -network-sandbox"
3) In /etc/portage/package.env, add:
sci-geosciences/josm nonetworksandbox.conf
Comment 7 Jean-Claude Repetto 2020-10-11 20:39:57 UTC
Hi Julien,

Thank you very much, it works now!

There is still a little problem, the version number is unknown:

2020-10-11 20:09:19.586 WARNING: Unexpected JOSM version number in revision file, value is 'UNKNOWN'

In the JOSM splash screen:
Strange version - You should update!

Comment 8 Jean-Claude Repetto 2020-11-05 17:30:41 UTC
Created attachment 670094 [details, diff]
Working ebuild with ivy

I have fixed the "UNKNOWN" version of josm.
Comment 9 Jean-Claude Repetto 2020-11-21 18:03:05 UTC
Please merge this ebuild. The current ebuild in the portage tree is not working.
Comment 10 Jean-Claude Repetto 2021-01-05 10:30:20 UTC
Today I am trying to emerge JOSM to update it. But now it fails:
>>> Compiling source in /var/tmp/portage/sci-geosciences/josm-99999/work/josm-99999 ...
 * Disabling all optional ANT_TASKS
Buildfile: /var/tmp/portage/sci-geosciences/josm-99999/work/josm-99999/build.xml


      [get] Getting:
      [get] To: /var/tmp/portage/sci-geosciences/josm-99999/work/josm-99999/tools/ivy/ivy-2.5.0.jar

[ns0:resolve] :: Apache Ivy 2.5.0 - 20191020104435 :: ::
[ns0:resolve] :: loading settings :: file = /var/tmp/portage/sci-geosciences/josm-99999/work/josm-99999/ivysettings.xml
 * ACCESS DENIED:  mkdir:        /var/lib/portage/home/.ivy2
(This message is repeated a lot of times)

Then lots of messages like:

F: mkdir
S: deny
P: /var/lib/portage/home/.ivy2
A: /var/lib/portage/home/.ivy2
R: /var/lib/portage/home/.ivy2
C: /opt/openjdk-bin-8.272_p10/bin/java -classpath /usr/share/ant/lib/ant-launcher.jar:/opt/openjdk-bin-8.272_p10/lib/tools.jar -Dant.home=/usr/share/ant -Dant.library.dir=/usr/share/ant/lib -cp  -Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore -Dmaven.test.skip=true dist-optimized -DnoJavaFX=true 

Any idea?
Comment 11 Jean-Claude Repetto 2021-01-05 10:37:02 UTC
Created attachment 681256 [details]
Build log
Comment 12 Julien Papasian 2021-01-05 10:59:22 UTC
For some reason, it's trying to write files in /var/lib/portage/ which is forbidden. It's probably only cache (I can see it reading in /var/lib/portage/home/.ivy2/cache).

I guess, it requires a patch (build.xml, maybe other files?) to put the directory in portage tmp.
The faulty line is probably at the beginning (appears twice):
<dirname property="base.dir" file="${ant.file.josm}" />

Best would be to identify when it stopped working, so we can look at josm repo and find out the culprit commit and make a revert patch. When was your last successful build? If you have eix, it will show you with:
$ eix sci-geosciences/josm

Mine was 24 nov 2020.
Comment 13 Jean-Claude Repetto 2021-01-05 11:02:07 UTC
My latest successful build was on December 3, 2020.
Comment 14 Julien Papasian 2021-01-05 13:48:40 UTC
TL;DR: workaround on last paragraph.

I see nothing relevant between Dec 3rd and today:

The few lines modified on build.xml are unrelated (JUnit).

Since it's not related to ant-ivy which has not been updated, I looked around the new package acct-user/portage added recently and we can see the following home directory in /etc/passwd:

I don't know if it has changed since this new package, or if permissions on these folders have changed. I tried downgrading portage to 3.0.4 with no luck.

Best is probably to find a way to change the home directory temporarily (or patch the directory that is used for build time) directly in the ebuild, if someone knows how to do it.

In the meantime, I edited /etc/passwd to change portage home directory to /var/tmp/portage/home, created /var/tmp/portage/home, chowned portage:portage /var/tmp/portage/home and it worked. I reverted back /etc/passwd to /var/lib/portage/home to avoid any issue with other packages.
Comment 15 and 2021-03-04 16:10:59 UTC
you can override default ivy user dir like

> eant dist-optimized -DnoJavaFX=true -Divy.default.ivy.user.dir="${WORKDIR}"/ivy/
Comment 16 Jean-Claude Repetto 2021-03-04 18:00:55 UTC
Thank you very much, it worked very well.
Comment 17 Jean-Claude Repetto 2021-03-04 18:02:20 UTC
Created attachment 689367 [details]
New working ebuild with ivy
Comment 18 Henning Schild 2021-08-04 17:49:09 UTC
Note that "sci-geosciences/josm-bin" was recently added as a new package. Switching to it might just solve this one for some people, while others might not like -bin. Give it a try and maybe rant on -bin.