unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30845] More java packages
@ 2018-03-18 12:42 Julien Lepiller
  2018-03-18 13:05 ` [bug#30845] [PATCH 01/82] gnu: Add java-jline-2 Julien Lepiller
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 12:42 UTC (permalink / raw)
  To: 30845

Hi, here are 10 patches to add more java packages. They are part of
maven dependencies. I've created a branch with the rest of the patches
to get maven: https://framagit.org/tyreunom/guix/tree/maven. After
these 10 patches, 72 more patches will be required. We're almost there!

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 01/82] gnu: Add java-jline-2.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-19 22:13   ` Björn Höfling
  2018-03-18 13:05 ` [bug#30845] [PATCH 02/82] gnu: Update java-commons-cli to 1.4 Julien Lepiller
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/java.scm (java-jline-2): New variable.
---
 gnu/packages/java.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 5771366f6..1ae1d68e9 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9262,6 +9262,39 @@ similar in functionality to BSD editline and GNU readline but with additional
 features that bring it on par with the Z shell line editor.")
     (license license:bsd-3)))
 
+(define-public java-jline-2
+  (package
+    (inherit java-jline)
+    (version "2.14.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/jline/jline2/archive/jline-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
+    (arguments
+     `(#:jdk ,icedtea-8
+       ,@(package-arguments java-jline)))
+    (inputs
+     `(("java-jansi" ,java-jansi)
+       ("java-jansi-native" ,java-jansi-native)))
+    (native-inputs
+     `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
+       ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
+       ("java-powermock-api-easymock" ,java-powermock-api-easymock)
+       ("java-powermock-api-support" ,java-powermock-api-support)
+       ("java-powermock-core" ,java-powermock-core)
+       ("java-powermock-reflect" ,java-powermock-reflect)
+       ("java-easymock" ,java-easymock)
+       ("java-jboss-javassist" ,java-jboss-javassist)
+       ("java-objenesis" ,java-objenesis)
+       ("java-asm" ,java-asm)
+       ("java-hamcrest-core" ,java-hamcrest-core)
+       ("java-cglib" ,java-cglib)
+       ("java-junit" ,java-junit)
+       ("java-hawtjni" ,java-hawtjni)))))
+
 (define-public java-xmlunit
   (package
     (name "java-xmlunit")
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 02/82] gnu: Update java-commons-cli to 1.4.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
  2018-03-18 13:05 ` [bug#30845] [PATCH 01/82] gnu: Add java-jline-2 Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-19 22:13   ` Björn Höfling
  2018-03-18 13:05 ` [bug#30845] [PATCH 03/82] gnu: java-eclipse-jetty-security-9.2: Ignore test error Julien Lepiller
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/java.scm (java-commons-cli): Update to 1.4.
---
 gnu/packages/java.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 1ae1d68e9..fd0565976 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -5518,14 +5518,14 @@ logging framework for Java.")))
 (define-public java-commons-cli
   (package
     (name "java-commons-cli")
-    (version "1.3.1")
+    (version "1.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://apache/commons/cli/source/"
                                   "commons-cli-" version "-src.tar.gz"))
               (sha256
                (base32
-                "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
+                "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
     (build-system ant-build-system)
     ;; TODO: javadoc
     (arguments
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 03/82] gnu: java-eclipse-jetty-security-9.2: Ignore test error.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
  2018-03-18 13:05 ` [bug#30845] [PATCH 01/82] gnu: Add java-jline-2 Julien Lepiller
  2018-03-18 13:05 ` [bug#30845] [PATCH 02/82] gnu: Update java-commons-cli to 1.4 Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-19 22:20   ` Björn Höfling
  2018-03-18 13:05 ` [bug#30845] [PATCH 04/82] gnu: Add java-commons-bsf Julien Lepiller
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/web.scm (java-eclipse-jetty-security-9.2)[arguments]:
Ignore one failing test.
---
 gnu/packages/web.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index ceb7d9b7c..ed4fef740 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -6104,6 +6104,10 @@ infrastructure")))
     (inherit java-eclipse-jetty-security)
     (version (package-version java-eclipse-jetty-util-9.2))
     (source (package-source java-eclipse-jetty-util-9.2))
+    (arguments
+     `(#:test-exclude
+       (list "**/ConstraintTest.*")
+       ,@(package-arguments java-eclipse-jetty-security)))
     (inputs
      `(("util" ,java-eclipse-jetty-util-9.2)
        ("http" ,java-eclipse-jetty-http-9.2)
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 04/82] gnu: Add java-commons-bsf.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
                   ` (2 preceding siblings ...)
  2018-03-18 13:05 ` [bug#30845] [PATCH 03/82] gnu: java-eclipse-jetty-security-9.2: Ignore test error Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-19 22:21   ` Björn Höfling
  2018-03-18 13:05 ` [bug#30845] [PATCH 05/82] gnu: Add java-bouncycastle Julien Lepiller
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/java.scm (java-commons-bsf): New variable.
---
 gnu/packages/java.scm | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index fd0565976..b1ecf843d 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -4316,6 +4316,66 @@ in the @code{java.lang} package.  The following classes are included:
 @end itemize\n")
     (license license:asl2.0)))
 
+(define-public java-commons-bsf
+  (package
+    (name "java-commons-bsf")
+    (version "2.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  (for-each delete-file
+                            (find-files "." "\\.jar$"))
+                  #t))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:build-target "jar"
+       #:tests? #f; No test file
+       #:modules ((guix build ant-build-system)
+                  (guix build utils)
+                  (guix build java-utils)
+                  (sxml simple))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'create-properties
+           (lambda _
+             ;; This file is missing from the distribution
+             (call-with-output-file "build-properties.xml"
+               (lambda (port)
+                 (sxml->xml
+                  `(project (@ (basedir ".") (name "build-properties") (default ""))
+                     (property (@ (name "project.name") (value "bsf")))
+                     (property (@ (name "source.level") (value "1.5")))
+                     (property (@ (name "build.lib") (value "build/jar")))
+                     (property (@ (name "src.dir") (value "src")))
+                     (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
+                     (property (@ (name "build.tests") (value "build/test-classes")))
+                     (property (@ (name "build.dest") (value "build/classes"))))
+                  port)))))
+         (replace 'install (install-jars "build")))))
+    (native-inputs
+     `(("java-junit" ,java-junit)))
+    (inputs
+     `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
+    (home-page "https://commons.apache.org/proper/commons-bsf")
+    (synopsis "Bean Scripting Framework")
+    (description "The Bean Scripting Framework (BSF) is a set of Java classes
+which provides scripting language support within Java applications, and access
+to Java objects and methods from scripting languages.  BSF allows one to write
+JSPs in languages other than Java while providing access to the Java class
+library.  In addition, BSF permits any Java application to be implemented in
+part (or dynamically extended) by a language that is embedded within it.  This
+is achieved by providing an API that permits calling scripting language engines
+from within Java, as well as an object registry that exposes Java objects to
+these scripting language engines.")
+    (license license:asl2.0)))
+
 (define-public java-jsr305
   (package
     (name "java-jsr305")
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 05/82] gnu: Add java-bouncycastle.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
                   ` (3 preceding siblings ...)
  2018-03-18 13:05 ` [bug#30845] [PATCH 04/82] gnu: Add java-commons-bsf Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-19 22:32   ` Björn Höfling
  2018-03-18 13:05 ` [bug#30845] [PATCH 06/82] gnu: Add java-commons-httpclient Julien Lepiller
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/java.scm (java-bouncycastle): New variable.
(java-bouncycastle-bcprov, java-bouncycastle-bcpkix): Remove variable.
(java-kafka-clients): Use java-bouncycastle.
---
 gnu/packages/java.scm | 69 ++++++++++++++++-----------------------------------
 1 file changed, 21 insertions(+), 48 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index b1ecf843d..9f5b234bb 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8229,29 +8229,37 @@ by technical operatives or consultants working with enterprise platforms.")
 algorithms and xxHash hashing algorithm.")
     (license license:asl2.0)))
 
-(define-public java-bouncycastle-bcprov
+(define-public java-bouncycastle
   (package
-    (name "java-bouncycastle-bcprov")
+    (name "java-bouncycastle")
     (version "1.58")
     (source (origin
               (method url-fetch)
-              (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
+              (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
+                                  (substring version 0 1) "rv"
+                                  (substring version 2 4) ".tar.gz"))
+              ;(uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
               (sha256
                (base32
-                "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
+                ;"1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
+                "1sffl2w7sa48vfkq03zhc8x0kxycb747dprhq2z39kb45jlrf5f5"))))
     (build-system ant-build-system)
     (arguments
-     `(#:jar-name "bouncycastle-bcprov.jar"
-       #:tests? #f; no tests
-       #:source-dir "src"
+     `(#:tests? #f ;FIXME: how to run tests?
        #:phases
        (modify-phases %standard-phases
-         (add-before 'configure 'unzip-src
+         (replace 'build
            (lambda _
-             (mkdir-p "src")
-             (with-directory-excursion "src"
-               (invoke "unzip" "../src.zip"))
-             #t)))))
+             (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
+             (invoke "ant" "-f" "ant/jdk15+.xml" "build")
+             #t))
+         (replace 'check
+           (lambda _
+             (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
+         (replace 'install
+           (install-jars "build/artifacts/jdk1.5/jars")))))
+    (inputs
+     `(("java-javax-mail" ,java-javax-mail)))
     (native-inputs
      `(("unzip" ,unzip)
        ("junit" ,java-junit)))
@@ -8261,40 +8269,6 @@ algorithms and xxHash hashing algorithm.")
 for the Java programming language.")
     (license license:expat)))
 
-(define-public java-bouncycastle-bcpkix
-  (package
-    (name "java-bouncycastle-bcpkix")
-    (version "1.58")
-    (source (origin
-              (method url-fetch)
-              (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
-              (sha256
-               (base32
-                "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
-    (build-system ant-build-system)
-    (arguments
-     `(#:jar-name "bouncycastle-bcpkix.jar"
-       #:tests? #f; no tests
-       #:source-dir "src"
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'unzip-src
-           (lambda _
-             (mkdir-p "src")
-             (with-directory-excursion "src"
-               (invoke "unzip" "../src.zip"))
-             #t)))))
-    (native-inputs
-     `(("unzip" ,unzip)
-       ("junit" ,java-junit)))
-    (inputs
-     `(("bcprov" ,java-bouncycastle-bcprov)))
-    (home-page "https://www.bouncycastle.org")
-    (synopsis "Cryptographic library")
-    (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
-CMP, and CRMF.")
-    (license license:expat)))
-
 (define-public java-lmax-disruptor
   (package
     (name "java-lmax-disruptor")
@@ -8715,8 +8689,7 @@ protocol-independent framework to build mail and messaging applications.")
        ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
        ("powermock-junit4" ,java-powermock-modules-junit4)
        ("powermock-support" ,java-powermock-api-support)
-       ("bouncycastle" ,java-bouncycastle-bcprov)
-       ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
+       ("bouncycastle" ,java-bouncycastle)))
     (home-page "https://kafka.apache.org")
     (synopsis "Distributed streaming platform")
     (description "Kafka is a distributed streaming platform, which means:
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 06/82] gnu: Add java-commons-httpclient.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
                   ` (4 preceding siblings ...)
  2018-03-18 13:05 ` [bug#30845] [PATCH 05/82] gnu: Add java-bouncycastle Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-20 18:12   ` Björn Höfling
  2018-03-18 13:05 ` [bug#30845] [PATCH 07/82] gnu: Add java-commons-vfs Julien Lepiller
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/java.scm (java-commons-httpclient): New variable.
---
 gnu/packages/java.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 9f5b234bb..b8fd30ea5 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9430,3 +9430,47 @@ Java programmers to create two-dimensional charts and plots.  The library
 features an assortment of graph styles, including advanced scatter plots, bar
 graphs, and pie charts.")
     (license license:lgpl2.1+)))
+
+(define-public java-commons-httpclient
+  (package
+    (name "java-commons-httpclient")
+    (version "3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
+                                  "commons-httpclient/source/commons-httpclient-"
+                                  version "-src.tar.gz"))
+              (sha256
+               (base32
+                "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:build-target "compile"
+       #:test-target "test"
+       #:tests? #f; requires junit-textui (junit 3)
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-accent
+           (lambda _
+             (for-each (lambda (file)
+                         (with-fluids ((%default-port-encoding "ISO-8859-1"))
+                          (substitute* file
+                            (("\\* @author Ortwin .*") "* @author Ortwin Gluck\n"))))
+               '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
+                 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
+                 "src/test/org/apache/commons/httpclient/TestHttps.java"
+                 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (zero? (system* "ant" "dist"
+                             (string-append "-Ddist.home=" (assoc-ref outputs "out")
+                                            "/share/java"))))))))
+    (propagated-inputs
+     `(("java-commons-logging" ,java-commons-logging-minimal)
+       ("java-commons-codec" ,java-commons-codec)))
+    (home-page "https://hc.apache.org")
+    (synopsis "HTTP/1.1 compliant HTTP agent implementation")
+    (description "This package contains an HTTP/1.1 compliant HTTP agent
+implementation.  It also provides reusable components for client-side
+authentication, HTTP state management, and HTTP connection management.")
+    (license license:asl2.0)))
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 07/82] gnu: Add java-commons-vfs.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
                   ` (5 preceding siblings ...)
  2018-03-18 13:05 ` [bug#30845] [PATCH 06/82] gnu: Add java-commons-httpclient Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-20 18:12   ` Björn Höfling
  2018-03-18 13:05 ` [bug#30845] [PATCH 08/82] gnu: Add java-jakarta-oro Julien Lepiller
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/java.scm (java-commons-vfs): New variable.
---
 gnu/packages/java.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index b8fd30ea5..0ee4ade95 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9474,3 +9474,44 @@ graphs, and pie charts.")
 implementation.  It also provides reusable components for client-side
 authentication, HTTP state management, and HTTP connection management.")
     (license license:asl2.0)))
+
+(define-public java-commons-vfs
+  (package
+    (name "java-commons-vfs")
+    (version "2.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://apache/commons/vfs/source/"
+                                  "commons-vfs2-distribution-" version "-src.tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "commons-vfs.jar"
+       #:source-dir "commons-vfs2/src/main/java"
+       #:tests? #f; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'remove-hadoop-and-webdav
+           ; Remove these files as they are not required and depend on difficult
+           ; packages.
+           (lambda _
+             (for-each delete-file-recursively
+               '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
+                 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")))))))
+    (inputs
+     `(("java-commons-collections4" ,java-commons-collections4)
+       ("java-commons-compress" ,java-commons-compress)
+       ("java-commons-httpclient" ,java-commons-httpclient)
+       ("java-commons-logging-minimal" ,java-commons-logging-minimal)
+       ("java-commons-net" ,java-commons-net)
+       ("java-jsch" ,java-jsch)))
+    (home-page "http://commons.apache.org/proper/commons-vfs/")
+    (synopsis "Java filesystem library")
+    (description "Commons VFS provides a single API for accessing various
+different file systems.  It presents a uniform view of the files from various
+different sources, such as the files on local disk, on an HTTP server, or
+inside a Zip archive.")
+    (license license:asl2.0)))
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 08/82] gnu: Add java-jakarta-oro.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
                   ` (6 preceding siblings ...)
  2018-03-18 13:05 ` [bug#30845] [PATCH 07/82] gnu: Add java-commons-vfs Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-20 18:13   ` Björn Höfling
  2018-03-18 13:05 ` [bug#30845] [PATCH 09/82] gnu: Add java-native-access Julien Lepiller
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/java.scm (java-jakarta-oro): New variable.
---
 gnu/packages/java.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 0ee4ade95..37eeda0a6 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9515,3 +9515,35 @@ different file systems.  It presents a uniform view of the files from various
 different sources, such as the files on local disk, on an HTTP server, or
 inside a Zip archive.")
     (license license:asl2.0)))
+
+(define-public java-jakarta-oro
+  (package
+    (name "java-jakarta-oro")
+    (version "2.0.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
+                                  "jakarta-oro-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:build-target "package"
+       #:tests? #f; tests are run as part of the build process
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-bin
+           (lambda _
+             (delete-file (string-append "jakarta-oro-" ,version ".jar"))))
+         (replace 'install
+           (install-jars ,(string-append "jakarta-oro-" version))))))
+    (home-page "https://jakarta.apache.org/oro/")
+    (synopsis "Text-processing for Java")
+    (description "The Jakarta-ORO Java classes are a set of text-processing
+Java classes that provide Perl5 compatible regular expressions, AWK-like
+regular expressions, glob expressions, and utility classes for performing
+substitutions, splits, filtering filenames, etc.  This library is the successor
+of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
+from ORO, Inc.")
+    (license license:asl2.0)))
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 09/82] gnu: Add java-native-access.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
                   ` (7 preceding siblings ...)
  2018-03-18 13:05 ` [bug#30845] [PATCH 08/82] gnu: Add java-jakarta-oro Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-20 18:13   ` Björn Höfling
  2018-03-18 13:05 ` [bug#30845] [PATCH 10/82] gnu: Add java-native-access-platform Julien Lepiller
  2018-04-05 17:50 ` bug#30845: More java packages Julien Lepiller
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/java.scm (java-native-access): New variable.
---
 gnu/packages/java.scm | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 37eeda0a6..54b44a9d0 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9547,3 +9547,68 @@ substitutions, splits, filtering filenames, etc.  This library is the successor
 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
 from ORO, Inc.")
     (license license:asl2.0)))
+
+(define-public java-native-access
+  (package
+    (name "java-native-access")
+    (version "4.5.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/java-native-access/jna/"
+                                  "archive/" version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
+              (modules '((guix build utils)))
+              (snippet
+                `(for-each delete-file (find-files "." ".*.jar")))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:tests? #f; FIXME: tests require reflections.jar
+       #:test-target "test"
+       #:make-flags (list "-Ddynlink.native=true")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-build.xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "build.xml"
+               ;; Since we removed the bundled ant.jar, give the correct path
+               (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
+               ;; We removed generated native libraries. We can only rebuild one
+               ;; so don't fail if we can't find a native library for another architecture.
+               (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
+             ;; Copy test dependencies
+             (copy-file (string-append (assoc-ref inputs "java-junit")
+                                       "/share/java/junit.jar")
+                        "lib/junit.jar")
+             (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
+                                       "/share/java/hamcrest-core.jar")
+                        "lib/hamcrest-core.jar")
+             ;; FIXME: once reflections.jar is built, copy it to lib/test.
+             #t))
+         (add-before 'build 'build-native
+           (lambda _
+             (invoke "ant" "-Ddynlink.native=true" "native")
+             #t))
+         (replace 'install
+           (install-jars "build")))))
+    (inputs
+     `(("libffi" ,libffi)
+       ("libx11" ,libx11)
+       ("libxt" ,libxt)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)))
+    (home-page "https://github.com/java-native-access/jna")
+    (synopsis "Access to native shared libraries from Java")
+    (description "JNA provides Java programs easy access to native shared
+libraries without writing anything but Java code - no JNI or native code is
+required.  JNA allows you to call directly into native functions using natural
+Java method invocation.")
+    ;; Java Native Access project (JNA) is dual-licensed under 2
+    ;; alternative Open Source/Free licenses: LGPL 2.1 or later and
+    ;; Apache License 2.0. (starting with JNA version 4.0.0).
+    (license (list
+               license:asl2.0
+               license:lgpl2.1+))))
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 10/82] gnu: Add java-native-access-platform.
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
                   ` (8 preceding siblings ...)
  2018-03-18 13:05 ` [bug#30845] [PATCH 09/82] gnu: Add java-native-access Julien Lepiller
@ 2018-03-18 13:05 ` Julien Lepiller
  2018-03-20 18:13   ` Björn Höfling
  2018-04-05 17:50 ` bug#30845: More java packages Julien Lepiller
  10 siblings, 1 reply; 24+ messages in thread
From: Julien Lepiller @ 2018-03-18 13:05 UTC (permalink / raw)
  To: 30845

* gnu/packages/java.scm (java-native-access-platform): New variable.
---
 gnu/packages/java.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 54b44a9d0..fa11480eb 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9612,3 +9612,32 @@ Java method invocation.")
     (license (list
                license:asl2.0
                license:lgpl2.1+))))
+
+(define-public java-native-access-platform
+  (package
+    (inherit java-native-access)
+    (name "java-native-access-platform")
+    (arguments
+     `(#:test-target "test"
+       #:tests? #f; require jna-test.jar
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'chdir
+           (lambda _
+             (chdir "contrib/platform")))
+         (add-after 'chdir 'fix-ant
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "nbproject/project.properties"
+               (("../../build/jna.jar")
+                (string-append (assoc-ref inputs "java-native-access")
+                               "/share/java/jna.jar"))
+               (("../../lib/hamcrest-core-.*.jar")
+                (string-append (assoc-ref inputs "java-hamcrest-core")
+                               "/share/java/hamcrest-core.jar"))
+               (("../../lib/junit.jar")
+                (string-append (assoc-ref inputs "java-junit")
+                               "/share/java/junit.jar")))))
+         (replace 'install
+           (install-jars "dist")))))
+    (inputs
+     `(("java-native-access" ,java-native-access)))))
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 01/82] gnu: Add java-jline-2.
  2018-03-18 13:05 ` [bug#30845] [PATCH 01/82] gnu: Add java-jline-2 Julien Lepiller
@ 2018-03-19 22:13   ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-19 22:13 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

On Sun, 18 Mar 2018 14:05:21 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/java.scm (java-jline-2): New variable.
> ---
>  gnu/packages/java.scm | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 5771366f6..1ae1d68e9 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -9262,6 +9262,39 @@ similar in functionality to BSD editline and
> GNU readline but with additional features that bring it on par with
> the Z shell line editor.") (license license:bsd-3)))
>  
> +(define-public java-jline-2
> +  (package
> +    (inherit java-jline)
> +    (version "2.14.5")

LGTM

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 02/82] gnu: Update java-commons-cli to 1.4.
  2018-03-18 13:05 ` [bug#30845] [PATCH 02/82] gnu: Update java-commons-cli to 1.4 Julien Lepiller
@ 2018-03-19 22:13   ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-19 22:13 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 163 bytes --]

On Sun, 18 Mar 2018 14:05:22 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/java.scm (java-commons-cli): Update to 1.4.

LGTM

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 03/82] gnu: java-eclipse-jetty-security-9.2: Ignore test error.
  2018-03-18 13:05 ` [bug#30845] [PATCH 03/82] gnu: java-eclipse-jetty-security-9.2: Ignore test error Julien Lepiller
@ 2018-03-19 22:20   ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-19 22:20 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: rekado, 30845

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]

On Sun, 18 Mar 2018 14:05:23 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/web.scm (java-eclipse-jetty-security-9.2)[arguments]:
> Ignore one failing test.
> ---
>  gnu/packages/web.scm | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
> index ceb7d9b7c..ed4fef740 100644
> --- a/gnu/packages/web.scm
> +++ b/gnu/packages/web.scm
> @@ -6104,6 +6104,10 @@ infrastructure")))
>      (inherit java-eclipse-jetty-security)
>      (version (package-version java-eclipse-jetty-util-9.2))
>      (source (package-source java-eclipse-jetty-util-9.2))
> +    (arguments
> +     `(#:test-exclude
> +       (list "**/ConstraintTest.*")
> +       ,@(package-arguments java-eclipse-jetty-security)))
>      (inputs
>       `(("util" ,java-eclipse-jetty-util-9.2)
>         ("http" ,java-eclipse-jetty-http-9.2)


Can you fix the test or write a comment on why the test fails?

I git-bisected this one and found out:

f2785bd657c55cd36f436b1f6ee1af5d72683162 is the first bad commit
commit f2785bd657c55cd36f436b1f6ee1af5d72683162
Author: Ricardo Wurmus <rekado@elephly.net>
Date:   Sat Mar 10 18:35:31 2018 +0100

    gnu: icedtea-8: Build "out" reproducibly.
    
    Partially fixes <https://bugs.gnu.org/30730>.
    
    * gnu/packages/java.scm (icedtea-8)[arguments]: Add phases
    "patch-keystore" and "strip-jar-timestamps".
    [source]: Also patch DIST_ID in "configure" script.

I'm too tired to look into this now.

Maybe Ricardo has an idea on why this one fails?

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 04/82] gnu: Add java-commons-bsf.
  2018-03-18 13:05 ` [bug#30845] [PATCH 04/82] gnu: Add java-commons-bsf Julien Lepiller
@ 2018-03-19 22:21   ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-19 22:21 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

On Sun, 18 Mar 2018 14:05:24 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/java.scm (java-commons-bsf): New variable.

LGTM

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 05/82] gnu: Add java-bouncycastle.
  2018-03-18 13:05 ` [bug#30845] [PATCH 05/82] gnu: Add java-bouncycastle Julien Lepiller
@ 2018-03-19 22:32   ` Björn Höfling
  2018-03-20  8:06     ` julien lepiller
  0 siblings, 1 reply; 24+ messages in thread
From: Björn Höfling @ 2018-03-19 22:32 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 2558 bytes --]

On Sun, 18 Mar 2018 14:05:25 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/java.scm (java-bouncycastle): New variable.
> (java-bouncycastle-bcprov, java-bouncycastle-bcpkix): Remove variable.
> (java-kafka-clients): Use java-bouncycastle.

What's the difference between the old ones and the new one, besides of
the hosting site?

> ---
>  gnu/packages/java.scm | 69
> ++++++++++++++++----------------------------------- 1 file changed,
> 21 insertions(+), 48 deletions(-)
> 
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index b1ecf843d..9f5b234bb 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -8229,29 +8229,37 @@ by technical operatives or consultants
> working with enterprise platforms.") algorithms and xxHash hashing
> algorithm.") (license license:asl2.0)))
>  
> -(define-public java-bouncycastle-bcprov
> +(define-public java-bouncycastle
>    (package
> -    (name "java-bouncycastle-bcprov")
> +    (name "java-bouncycastle")
>      (version "1.58")

Upstream has 1.59 available that fixes a CVE. Can you use the newest
version, or do you need that specific one for Maven? If the latter is
the case, write a comment next to the version.

>      (source (origin
>                (method url-fetch)
> -              (uri
> "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
> +              (uri (string-append
> "https://github.com/bcgit/bc-java/archive/r"
> +                                  (substring version 0 1) "rv"
> +                                  (substring version 2 4) ".tar.gz"))
> +              ;(uri
> "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz") (sha256

Old URI is kept as a comment. Is that by intention? Why?

>                 (base32
> -
> "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
> +                ;"1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))

Same for the old hash. OK?


At least the 1.59 version contains two jars for the test:

bc-java-r1rv59$ find . -name "*.jar"
./test/libs/jna-4.3.0.jar
./test/libs/jna-platform-4.3.0.jar

Can you snip them away?

I tried to build it but it still hangs here:

[..]
test:
    [mkdir] Created dir: /tmp/guix-build-java-bouncycastle-1.58.drv-0/bc-java-r1rv58/build/jdk15on
    [junit] Test org.bouncycastle.mail.smime.test.AllTests FAILED


Maybe it takes a bit longer and I know something tomorrow.

Final review in that series for me for tonight :-)

Thank you,

Björn



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 05/82] gnu: Add java-bouncycastle.
  2018-03-19 22:32   ` Björn Höfling
@ 2018-03-20  8:06     ` julien lepiller
  2018-03-21  8:08       ` Björn Höfling
  0 siblings, 1 reply; 24+ messages in thread
From: julien lepiller @ 2018-03-20  8:06 UTC (permalink / raw)
  To: 30845

Le 2018-03-19 23:32, Björn Höfling a écrit :
> On Sun, 18 Mar 2018 14:05:25 +0100
> Julien Lepiller <julien@lepiller.eu> wrote:
> 
>> * gnu/packages/java.scm (java-bouncycastle): New variable.
>> (java-bouncycastle-bcprov, java-bouncycastle-bcpkix): Remove variable.
>> (java-kafka-clients): Use java-bouncycastle.
> 
> What's the difference between the old ones and the new one, besides of
> the hosting site?

The new one includes all subpackages (bouncycastle-bcprov, -bcpkix, 
-bcpg, -bcmail, …) and no generated source.

> 
>> ---
>>  gnu/packages/java.scm | 69
>> ++++++++++++++++----------------------------------- 1 file changed,
>> 21 insertions(+), 48 deletions(-)
>> 
>> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
>> index b1ecf843d..9f5b234bb 100644
>> --- a/gnu/packages/java.scm
>> +++ b/gnu/packages/java.scm
>> @@ -8229,29 +8229,37 @@ by technical operatives or consultants
>> working with enterprise platforms.") algorithms and xxHash hashing
>> algorithm.") (license license:asl2.0)))
>> 
>> -(define-public java-bouncycastle-bcprov
>> +(define-public java-bouncycastle
>>    (package
>> -    (name "java-bouncycastle-bcprov")
>> +    (name "java-bouncycastle")
>>      (version "1.58")
> 
> Upstream has 1.59 available that fixes a CVE. Can you use the newest
> version, or do you need that specific one for Maven? If the latter is
> the case, write a comment next to the version.

OK, I'll try with 1.59.

> 
>>      (source (origin
>>                (method url-fetch)
>> -              (uri
>> "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
>> +              (uri (string-append
>> "https://github.com/bcgit/bc-java/archive/r"
>> +                                  (substring version 0 1) "rv"
>> +                                  (substring version 2 4) ".tar.gz"))
>> +              ;(uri
>> "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz") (sha256
> 
> Old URI is kept as a comment. Is that by intention? Why?
Oops, my mistake.

> 
>>                 (base32
>> -
>> "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
>> +                
>> ;"1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
> 
> Same for the old hash. OK?
> 
> 
> At least the 1.59 version contains two jars for the test:
> 
> bc-java-r1rv59$ find . -name "*.jar"
> ./test/libs/jna-4.3.0.jar
> ./test/libs/jna-platform-4.3.0.jar
> 
> Can you snip them away?

Oh, good catch! But jna and jna-platform are patches 9 and 10, and they 
depend on bouncycastle...

> 
> I tried to build it but it still hangs here:
> 
> [..]
> test:
>     [mkdir] Created dir:
> /tmp/guix-build-java-bouncycastle-1.58.drv-0/bc-java-r1rv58/build/jdk15on
>     [junit] Test org.bouncycastle.mail.smime.test.AllTests FAILED
> 
> 
> Maybe it takes a bit longer and I know something tomorrow.

This phase takes a lot of time without output, but it eventually 
terminates. My only concern is that the first test fails, but the phase 
terminates correctly, so bouncycastle is installed disregarding test 
result. I'll investigate.

> 
> Final review in that series for me for tonight :-)
> 
> Thank you,
> 
> Björn

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 06/82] gnu: Add java-commons-httpclient.
  2018-03-18 13:05 ` [bug#30845] [PATCH 06/82] gnu: Add java-commons-httpclient Julien Lepiller
@ 2018-03-20 18:12   ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-20 18:12 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]

On Sun, 18 Mar 2018 14:05:26 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/java.scm (java-commons-httpclient): New variable.
> ---
>  gnu/packages/java.scm | 44
> ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44
> insertions(+)
> 

[..]

> +       (modify-phases %standard-phases
> +         (add-before 'build 'fix-accent
> +           (lambda _
> +             (for-each (lambda (file)
> +                         (with-fluids ((%default-port-encoding
> "ISO-8859-1"))
> +                          (substitute* file
> +                            (("\\* @author Ortwin .*") "* @author
> Ortwin Gluck\n"))))

To be picky: The ASCII-transcription of German character &uuml; is
"ue", not just "u" :-)

> +
> '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
> +                 "src/examples/TrivialApp.java"
> "src/examples/ClientApp.java"
> +
> "src/test/org/apache/commons/httpclient/TestHttps.java"
> +
> "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))))

This works and is OK.

I wonder how this works in general for Guix: Usually, Java uses the
system character encoding. Do we explicitly set one, or is this a
possible case of non-reproducibility? I know for Maven you can
explicitly set the character encoding, I have no idea for Ant.


> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (zero? (system* "ant" "dist"
> +                             (string-append
> "-Ddist.home=" (assoc-ref outputs "out")
> +                                            "/share/java"))))))))

Use invoke:

             (invoke "ant" "dist"
                             (string-append "-Ddist.home=" (assoc-ref
outputs "out") "/share/java")))))))


Otherwise, LGTM

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 07/82] gnu: Add java-commons-vfs.
  2018-03-18 13:05 ` [bug#30845] [PATCH 07/82] gnu: Add java-commons-vfs Julien Lepiller
@ 2018-03-20 18:12   ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-20 18:12 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 2679 bytes --]

On Sun, 18 Mar 2018 14:05:27 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/java.scm (java-commons-vfs): New variable.
> ---
>  gnu/packages/java.scm | 41 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
> 
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index b8fd30ea5..0ee4ade95 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -9474,3 +9474,44 @@ graphs, and pie charts.")
>  implementation.  It also provides reusable components for client-side
>  authentication, HTTP state management, and HTTP connection
> management.") (license license:asl2.0)))
> +
> +(define-public java-commons-vfs
> +  (package
> +    (name "java-commons-vfs")
> +    (version "2.2")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> "mirror://apache/commons/vfs/source/"
> +                                  "commons-vfs2-distribution-"
> version "-src.tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +              (sha256
> +               (base32

Snippets:


./commons-vfs2/src/test/resources/test-data/read-tests/dir1/subdir4.jar
./commons-vfs2/src/test/resources/test-data/nested.jar
./commons-vfs2/src/test/resources/test-data/test.jar


> +
> "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))))
> +    (build-system ant-build-system)
> +    (arguments
> +     `(#:jar-name "commons-vfs.jar"
> +       #:source-dir "commons-vfs2/src/main/java"
> +       #:tests? #f; no tests
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-before 'build 'remove-hadoop-and-webdav
> +           ; Remove these files as they are not required and depend
> on difficult
> +           ; packages.
> +           (lambda _
> +             (for-each delete-file-recursively
> +
> '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
> +
> "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")))))))
> +    (inputs
> +     `(("java-commons-collections4" ,java-commons-collections4)
> +       ("java-commons-compress" ,java-commons-compress)
> +       ("java-commons-httpclient" ,java-commons-httpclient)
> +       ("java-commons-logging-minimal" ,java-commons-logging-minimal)
> +       ("java-commons-net" ,java-commons-net)
> +       ("java-jsch" ,java-jsch)))

I wonder: When do you use "inputs", when "propagated-inputs" for the
ant-build-system? For commons-http-client you used "propagated-inputs".

For antlr3-3.3 there are even both "propagated-inputs" and "inputs".

Otherwise, LGTM.

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 08/82] gnu: Add java-jakarta-oro.
  2018-03-18 13:05 ` [bug#30845] [PATCH 08/82] gnu: Add java-jakarta-oro Julien Lepiller
@ 2018-03-20 18:13   ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-20 18:13 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 1774 bytes --]

On Sun, 18 Mar 2018 14:05:28 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/java.scm (java-jakarta-oro): New variable.
> ---
>  gnu/packages/java.scm | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 0ee4ade95..37eeda0a6 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -9515,3 +9515,35 @@ different file systems.  It presents a uniform
> view of the files from various different sources, such as the files
> on local disk, on an HTTP server, or inside a Zip archive.")
>      (license license:asl2.0)))
> +
> +(define-public java-jakarta-oro
> +  (package
> +    (name "java-jakarta-oro")
> +    (version "2.0.8")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> "https://archive.apache.org/dist/jakarta/oro/"
> +                                  "jakarta-oro-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +
> "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))))
> +    (build-system ant-build-system)
> +    (arguments
> +     `(#:build-target "package"
> +       #:tests? #f; tests are run as part of the build process
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'remove-bin
> +           (lambda _
> +             (delete-file (string-append "jakarta-oro-" ,version
> ".jar"))))

This needs to be a snippet, not part of a phase. Only then the
binaries/jars are removed from the result of "guix build -S".

[..]

> +    (license license:asl2.0)))

File "LICENSE" and some  example java-files I checked say it's ASL 1.1.

Otherwise, LGTM.

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 09/82] gnu: Add java-native-access.
  2018-03-18 13:05 ` [bug#30845] [PATCH 09/82] gnu: Add java-native-access Julien Lepiller
@ 2018-03-20 18:13   ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-20 18:13 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 2306 bytes --]

On Sun, 18 Mar 2018 14:05:29 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/java.scm (java-native-access): New variable.
> ---
>  gnu/packages/java.scm | 65
> +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed,
> 65 insertions(+)
> 
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 37eeda0a6..54b44a9d0 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -9547,3 +9547,68 @@ substitutions, splits, filtering filenames,
> etc.  This library is the successor of the OROMatcher, AwkTools,
> PerlTools, and TextTools libraries originally from ORO, Inc.")
>      (license license:asl2.0)))
> +
> +(define-public java-native-access
> +  (package
> +    (name "java-native-access")
> +    (version "4.5.1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append
> "https://github.com/java-native-access/jna/"
> +                                  "archive/" version ".tar.gz"))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +
> "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
> +              (modules '((guix build utils)))
> +              (snippet
> +                `(for-each delete-file (find-files "." ".*.jar")))))

Additionaly snip away: natives/libffi: First it has a different license
(Expat) and second you have it already as a dependency.

There is a "dist" directory. Please look at at. It contains some
binaries.
Maybe strip it totally away, as it doesn't give us more than the source
we have?

./dist/jna.aar: Binary.

dist/src-full.zip contains two jars:
./lib/junit.jar
./lib/clover.jar

So, snip it away.

src-full.zip:./native/libffi/LICENSE:
Is EXPAT. Either snip away or add to license list.

Not completely digged into the "dist" directory.

[..]

> +    ;; Java Native Access project (JNA) is dual-licensed under 2
> +    ;; alternative Open Source/Free licenses: LGPL 2.1 or later and
> +    ;; Apache License 2.0. (starting with JNA version 4.0.0).
> +    (license (list
> +               license:asl2.0
> +               license:lgpl2.1+))))


Remove "Open Source/" from comment.


Otherwise, LGTM

Björn


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 10/82] gnu: Add java-native-access-platform.
  2018-03-18 13:05 ` [bug#30845] [PATCH 10/82] gnu: Add java-native-access-platform Julien Lepiller
@ 2018-03-20 18:13   ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-20 18:13 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

On Sun, 18 Mar 2018 14:05:30 +0100
Julien Lepiller <julien@lepiller.eu> wrote:

> * gnu/packages/java.scm (java-native-access-platform): New variable.
> ---
>  gnu/packages/java.scm | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
> index 54b44a9d0..fa11480eb 100644
> --- a/gnu/packages/java.scm
> +++ b/gnu/packages/java.scm
> @@ -9612,3 +9612,32 @@ Java method invocation.")
>      (license (list
>                 license:asl2.0
>                 license:lgpl2.1+))))
> +
> +(define-public java-native-access-platform
> +  (package
> +    (inherit java-native-access)
> +    (name "java-native-access-platform")
[..]

This package inherits, has a different name, but same
synopsis/description. Can you write its own one, to make clear what's
the distinctive feature of this package?

Otherwise, LGTM.

Björn

PS: This is patch 10/82 and the last one in my inbox. I suppose you
just omitted the other ones and will present them in smaller chunks
later. Otherwise shout.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [bug#30845] [PATCH 05/82] gnu: Add java-bouncycastle.
  2018-03-20  8:06     ` julien lepiller
@ 2018-03-21  8:08       ` Björn Höfling
  0 siblings, 0 replies; 24+ messages in thread
From: Björn Höfling @ 2018-03-21  8:08 UTC (permalink / raw)
  To: julien lepiller; +Cc: 30845

[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]

On Tue, 20 Mar 2018 09:06:00 +0100
julien lepiller <julien@lepiller.eu> wrote:

> Le 2018-03-19 23:32, Björn Höfling a écrit :

[...]

> > At least the 1.59 version contains two jars for the test:
> > 
> > bc-java-r1rv59$ find . -name "*.jar"
> > ./test/libs/jna-4.3.0.jar
> > ./test/libs/jna-platform-4.3.0.jar
> > 
> > Can you snip them away?  
> 
> Oh, good catch! But jna and jna-platform are patches 9 and 10, and
> they depend on bouncycastle...

Hm. So maybe

1) Disable tests, or
2) Disable tests and just "(define" it as bouncycastle-bootstrap.
   Then build the jna-* packages with it.
   Then build the final (define-public .. bouncycastle) with tests
   enabled.

> 
> > 
> > I tried to build it but it still hangs here:
> > 
> > [..]
> > test:
> >     [mkdir] Created dir:
> > /tmp/guix-build-java-bouncycastle-1.58.drv-0/bc-java-r1rv58/build/jdk15on
> >     [junit] Test org.bouncycastle.mail.smime.test.AllTests FAILED
> > 
> > 
> > Maybe it takes a bit longer and I know something tomorrow.  
> 
> This phase takes a lot of time without output, but it eventually 
> terminates. My only concern is that the first test fails, but the
> phase terminates correctly, so bouncycastle is installed disregarding
> test result. I'll investigate.

Yes, finally it finished. But because it finishes sucessfully, the junit
test results get lost. Maybe one could add temporarily a #f to the last
phase (or a phase after 'test), so build directory gets kept (with -K
build option).

What I found strange is that it took much wall-time but CPU-activity
was often quite low.

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#30845: More java packages
  2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
                   ` (9 preceding siblings ...)
  2018-03-18 13:05 ` [bug#30845] [PATCH 10/82] gnu: Add java-native-access-platform Julien Lepiller
@ 2018-04-05 17:50 ` Julien Lepiller
  10 siblings, 0 replies; 24+ messages in thread
From: Julien Lepiller @ 2018-04-05 17:50 UTC (permalink / raw)
  To: 30845-done

Closing because I've pushed 8 of these patches as
49d743117b6b69788c2754e281d313197c331c6f -
cfb55cfc4a91d13f4c19fc167da0b39a840f7690

I didn't push patches about fixing java-eclipse-jetty-security and
adding bouncycastle. I still have to work on why the test doesn't pass
anymore and on bouncycastle.

Le Sun, 18 Mar 2018 13:42:11 +0100,
Julien Lepiller <julien@lepiller.eu> a écrit :

> Hi, here are 10 patches to add more java packages. They are part of
> maven dependencies. I've created a branch with the rest of the patches
> to get maven: https://framagit.org/tyreunom/guix/tree/maven. After
> these 10 patches, 72 more patches will be required. We're almost
> there!

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2018-04-05 17:51 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-18 12:42 [bug#30845] More java packages Julien Lepiller
2018-03-18 13:05 ` [bug#30845] [PATCH 01/82] gnu: Add java-jline-2 Julien Lepiller
2018-03-19 22:13   ` Björn Höfling
2018-03-18 13:05 ` [bug#30845] [PATCH 02/82] gnu: Update java-commons-cli to 1.4 Julien Lepiller
2018-03-19 22:13   ` Björn Höfling
2018-03-18 13:05 ` [bug#30845] [PATCH 03/82] gnu: java-eclipse-jetty-security-9.2: Ignore test error Julien Lepiller
2018-03-19 22:20   ` Björn Höfling
2018-03-18 13:05 ` [bug#30845] [PATCH 04/82] gnu: Add java-commons-bsf Julien Lepiller
2018-03-19 22:21   ` Björn Höfling
2018-03-18 13:05 ` [bug#30845] [PATCH 05/82] gnu: Add java-bouncycastle Julien Lepiller
2018-03-19 22:32   ` Björn Höfling
2018-03-20  8:06     ` julien lepiller
2018-03-21  8:08       ` Björn Höfling
2018-03-18 13:05 ` [bug#30845] [PATCH 06/82] gnu: Add java-commons-httpclient Julien Lepiller
2018-03-20 18:12   ` Björn Höfling
2018-03-18 13:05 ` [bug#30845] [PATCH 07/82] gnu: Add java-commons-vfs Julien Lepiller
2018-03-20 18:12   ` Björn Höfling
2018-03-18 13:05 ` [bug#30845] [PATCH 08/82] gnu: Add java-jakarta-oro Julien Lepiller
2018-03-20 18:13   ` Björn Höfling
2018-03-18 13:05 ` [bug#30845] [PATCH 09/82] gnu: Add java-native-access Julien Lepiller
2018-03-20 18:13   ` Björn Höfling
2018-03-18 13:05 ` [bug#30845] [PATCH 10/82] gnu: Add java-native-access-platform Julien Lepiller
2018-03-20 18:13   ` Björn Höfling
2018-04-05 17:50 ` bug#30845: More java packages Julien Lepiller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).