[Debian-med-packaging] Bug#842815: Help needed for change of build system to gradle of package libsis-jhdf5-java
Andreas Tille
andreas at an3as.eu
Tue Aug 14 10:32:21 BST 2018
Hi,
upstream of libsis-jhdf5-java[1] has switched to gradle in its new
version that is compatible with HDF5 1.10. I tried to adapt debian/rules
from previous manual build to buildsystem=gradle but got:
...
Parallel execution is an incubating feature.
Evaluating root project 'libsis-jhdf5-java' using build file '/build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/build.gradle'.
Compiling build file '/build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/build.gradle' using SubsetScriptTransformer.
Compiling build file '/build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/build.gradle' using BuildScriptTransformer.
Compiling script '/build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/javaproject.gradle' using SubsetScriptTransformer.
Compiling script '/build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/repository.gradle' using SubsetScriptTransformer.
Compiling script '/build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/repository.gradle' using BuildScriptTransformer.
Creating new cache for metadata-2.23/module-versions, path /build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/.gradle/caches/modules-2/metadata-2.23/module-versions.bin, access org.gradle.cache. internal.DefaultCacheAccess at 350dec85
FAILURE: Build failed with an exception.
* Where:
Build file '/build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating root project 'libsis-jhdf5-java'.
> Could not resolve all dependencies for configuration 'classpath'.
> Could not resolve cisd:cisd-ant-tasks:+.
Required by:
unspecified:unspecified:unspecified
> No cached version listing for cisd:cisd-ant-tasks:+ available for offline mode.
* Try:
Run with --debug option to get more log output.
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'libsis-jhdf5-java'.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:92)
...
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.DynamicVersionResolver.resolve(DynamicVersionResolver.java:67)
... 104 more
BUILD FAILED
Total time: 5.829 secs
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Build file '/build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/build. gradle' line: 1
A problem occurred evaluating root project 'libsis-jhdf5-java'.] from daemon DaemonInfo{pid=26176, address=[01070135-56e1-461a-92ea-35d94d1e1ee5 port:41021, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Busy, lastBusy=1534230750655, context=DefaultDaemonContext[uid=37bdd18f-143d-4071-ab24-f17f8d67fb44,javaHome=/usr/lib/jvm/java-10-openjdk-amd64,daemonRegistryDir=/build/libsis-jhdf5-java-18.08~pre+ git20180805.da55947+dfsg/.gradle/daemon,pid=26176,idleTimeout=120000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
Since I had no idea how to fix this I simply tried to remove this
dependency definition (ant is installed as Build-Dependency anyway) and
thus I tried the following quilt patch:
$ git diff
diff --git a/debian/patches/fix_build_dir.patch b/debian/patches/fix_build_dir.patch
index 1d652b2..163553c 100644
--- a/debian/patches/fix_build_dir.patch
+++ b/debian/patches/fix_build_dir.patch
@@ -4,7 +4,7 @@ Description: Do not make wrong assumptions about directory name
--- a/javaproject.gradle
+++ b/javaproject.gradle
-@@ -50,7 +50,7 @@ sourceSets {
+@@ -50,13 +50,9 @@ sourceSets {
buildDir = 'targets/gradle'
buildscript {
@@ -12,4 +12,10 @@ Description: Do not make wrong assumptions about directory name
+ apply from: 'repository.gradle'
repositories repositoryConfig
-
+-
+- dependencies {
+- classpath 'cisd:cisd-ant-tasks:+'
+- }
+ }
+
+ repositories repositoryConfig
This leads to:
...
FAILURE: Build failed with an exception.
* Where:
Build file '/build/libsis-jhdf5-java-18.08~pre+git20180805.da55947+dfsg/build.gradle' line: 40
* What went wrong:
A problem occurred evaluating root project 'libsis-jhdf5-java'.
> Could not resolve all dependencies for configuration ':runtime'.
> Could not resolve cisd:cisd-args4j:+.
Required by:
project :
> No cached version listing for cisd:cisd-args4j:+ available for offline mode.
> Could not resolve cisd:cisd-base:+.
Required by:
project :
> No cached version listing for cisd:cisd-base:+ available for offline mode.
> Could not resolve rinn:restrictions:+.
Required by:
project :
> No cached version listing for rinn:restrictions:+ available for offline mode.
* Try:
Run with --debug option to get more log output.
I wonder how I could deal with these classpath definitions in the gradle
input. Or would you suggest to rather stick to manual build as it was
done before?
Kind regards
Andreas.
[1] https://salsa.debian.org/med-team/libsis-jhdf5-java
--
http://fam-tille.de
More information about the Debian-med-packaging
mailing list