From patchwork Sat May 4 22:42:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIEjDtmZsaW5n?= X-Patchwork-Id: 13901 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 449BF16F9C; Sat, 4 May 2019 23:43:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id B1E3116F99 for ; Sat, 4 May 2019 23:43:09 +0100 (BST) Received: from localhost ([127.0.0.1]:33674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hN3N7-0004eH-9g for patchwork@mira.cbaines.net; Sat, 04 May 2019 18:43:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hN3N3-0004bz-D1 for guix-patches@gnu.org; Sat, 04 May 2019 18:43:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hN3N2-0002zM-0J for guix-patches@gnu.org; Sat, 04 May 2019 18:43:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39059) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hN3N0-0002yb-CC for guix-patches@gnu.org; Sat, 04 May 2019 18:43:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hN3N0-0007ek-8m for guix-patches@gnu.org; Sat, 04 May 2019 18:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35570] [PATCH 7/8] gnu: java-tomcat: Build the full Tomcat package. Resent-From: =?utf-8?b?QmrDtnJuIEjDtmZsaW5n?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 May 2019 22:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35570 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 35570@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155700973829363 (code B ref -1); Sat, 04 May 2019 22:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 May 2019 22:42:18 +0000 Received: from localhost ([127.0.0.1]:52600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hN3MH-0007dX-PL for submit@debbugs.gnu.org; Sat, 04 May 2019 18:42:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hN3MF-0007dK-CO for submit@debbugs.gnu.org; Sat, 04 May 2019 18:42:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:46492) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hN3MA-0001h2-7q for submit@debbugs.gnu.org; Sat, 04 May 2019 18:42:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hN3M9-0004EG-1T for guix-patches@gnu.org; Sat, 04 May 2019 18:42:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hN3M7-0001d1-RM for guix-patches@gnu.org; Sat, 04 May 2019 18:42:09 -0400 Received: from m4s11.vlinux.de ([83.151.27.109]:35774 helo=bjoernhoefling.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hN3M7-0001ab-Gv for guix-patches@gnu.org; Sat, 04 May 2019 18:42:07 -0400 Received: from alma-ubu (p508AC174.dip0.t-ipconnect.de [80.138.193.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bjoernhoefling.de (Postfix) with ESMTPSA id 1426A3F85A for ; Sun, 5 May 2019 00:42:07 +0200 (CEST) Date: Sun, 5 May 2019 00:42:06 +0200 From: =?utf-8?b?QmrDtnJuIEjDtmZsaW5n?= Message-ID: <20190505004206.23197eea@alma-ubu> In-Reply-To: <20190505003450.3bc9058a@alma-ubu> References: <20190505003450.3bc9058a@alma-ubu> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Currently java-tomcat uses the deploy build target. In that way, it is built like a library, with only the jar files. This commit will change the arget to deploy to build the full tomcat package. * gnu/packages/web.scm (java-tomcat)[source]: Remove bat-files in snippet. [inputs]: Remove java-eclipse-jdt-core, add java-commons-daemon, java-ecj. [native-inputs]: Remove. [arguments]: Use "deploy" build-target, add phases 'modify-deploy, 'symlink-commons-daemon, 'symlink-java-ecj, change 'install phase. --- gnu/packages/web.scm | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) + (out-lib (string-append (assoc-ref outputs "out") "/lib")) + (target (string-append out-lib "/java-ecj.jar"))) + (symlink java-ecj-jar target) + #t))) (add-after 'unpack 'generate-properties (lambda _ ;; This could have been passed to make-flags, but getcwd returns @@ -5592,7 +5619,10 @@ encoder/decoder based on the draft-12 specification for UBJSON.") (string-append "base.path=" (getcwd) "/downloads\n")))) #t)) (replace 'install - (install-jars "output/build/lib"))))) + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (copy-recursively "output/build" out)) + #t))))) (home-page "https://tomcat.apache.org") (synopsis "Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket") diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 3d9070f169..cb9af0a781 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -5552,14 +5552,14 @@ encoder/decoder based on the draft-12 specification for UBJSON.") (snippet '(begin (for-each delete-file (find-files "." "\\.jar$")) + (for-each delete-file (find-files "." "\\.bat$")) #t)))) (build-system ant-build-system) (inputs - `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core))) - (native-inputs - `(("java-junit" ,java-junit))) + `(("java-commons-daemon" ,java-commons-daemon) + ("java-ecj" ,java-ecj))) (arguments - `(#:build-target "package" + `(#:build-target "deploy" #:tests? #f; requires downloading some files. #:phases (modify-phases %standard-phases @@ -5582,6 +5582,33 @@ encoder/decoder based on the draft-12 specification for UBJSON.") (("")) #t)) + (add-after 'unpack 'modify-deploy + (lambda _ + ;; The Tomcat build downloads and copies these files to the + ;; bin and lib directory. + ;; We instead symlink to the input (see below). + (substitute* "build.xml" + (("") "")) + #t)) + (add-after 'install 'symlink-commons-daemon + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((commons-daemon (assoc-ref inputs "java-commons-daemon")) + (files (find-files commons-daemon "commons-daemon-.*\\.jar")) + (daemon-jar (car files)) + (out-bin (string-append (assoc-ref outputs "out") "/bin")) + (target (string-append out-bin "/commons-daemon.jar"))) + (symlink daemon-jar target) + #t))) + (add-after 'install 'symlink-java-ecj + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((java-ecj (assoc-ref inputs "java-ecj")) + (files (find-files java-ecj "ecj.*\\.jar")) + (java-ecj-jar (car files))