GNU bug report logs - #36695
[PATCH 0/3] Enhancemante for the ant-build-system

Previous Next

Package: guix-patches;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Tue, 16 Jul 2019 20:09:02 UTC

Severity: normal

Tags: patch

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36695 in the body.
You can then email your comments to 36695 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#36695; Package guix-patches. (Tue, 16 Jul 2019 20:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 16 Jul 2019 20:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/3] Enhancemante for the ant-build-system
Date: Tue, 16 Jul 2019 22:08:39 +0200
Here are some old patches I found when cleaning up my repository. I created
them as part of my efforts for building maven. I'm not sure whether these are
still useful.

Hartmut Goebel (3):
  guix: ant-build-system: Use ant-task "jar" instead of executing "jar".
  guix: ant-build-system: Put dummy project-name into default build.xml.
  guix: ant-build-system: Use absolute path as base-dir.

 guix/build/ant-build-system.scm | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#36695; Package guix-patches. (Tue, 16 Jul 2019 20:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 36695 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 36695 <at> debbugs.gnu.org
Subject: [PATCH 1/3] guix: ant-build-system: Use ant-task "jar" instead of
 executing "jar".
Date: Tue, 16 Jul 2019 22:10:18 +0200
* guix/build/ant-build-system.scm (default-build.xml): Change XML for
  target "jar" to use ant-task "jar" instead of "exec".
---
 guix/build/ant-build-system.scm | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm
index d79a2d55ed..a0dd6f0fb4 100644
--- a/guix/build/ant-build-system.scm
+++ b/guix/build/ant-build-system.scm
@@ -118,10 +118,9 @@
                  (target (@ (name "jar")
                             (depends "compile, manifest"))
                          (mkdir (@ (dir "${jar.dir}")))
-                         (exec (@ (executable "jar"))
-                               (arg (@ (line ,(string-append "-cmf ${manifest.file} "
-                                                             "${jar.dir}/" jar-name
-                                                             " -C ${classes.dir} ."))))))
+                         (jar (@ (destfile ,(string-append "${jar.dir}/" jar-name))
+                                 (manifest "${manifest.file}")
+                                 (basedir "${classes.dir}"))))
 
                  (target (@ (name "install"))
                          (copy (@ (todir "${dist.dir}"))
-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#36695; Package guix-patches. (Tue, 16 Jul 2019 20:11:03 GMT) Full text and rfc822 format available.

Message #11 received at 36695 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 36695 <at> debbugs.gnu.org
Subject: [PATCH 2/3] guix: ant-build-system: Put dummy project-name into
 default build.xml.
Date: Tue, 16 Jul 2019 22:10:19 +0200
Without this, ant reported error messages like
Target "tests" does not exist in the project "null".
Simple using the jar-name is a good compromise.

* guix/build/ant-build-system.scm (default-build.xml): Add attribute
  to sxml expression.
---
 guix/build/ant-build-system.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm
index a0dd6f0fb4..49549c1b4b 100644
--- a/guix/build/ant-build-system.scm
+++ b/guix/build/ant-build-system.scm
@@ -43,7 +43,8 @@
   (call-with-output-file "build.xml"
     (lambda (port)
       (sxml->xml
-       `(project (@ (basedir "."))
+       `(project (@ (basedir ".")
+                    (name ,jar-name))
                  (property (@ (name "classes.dir")
                               (value "${basedir}/build/classes")))
                  (property (@ (name "manifest.dir")
-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#36695; Package guix-patches. (Tue, 16 Jul 2019 20:11:03 GMT) Full text and rfc822 format available.

Message #14 received at 36695 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 36695 <at> debbugs.gnu.org
Subject: [PATCH 3/3] guix: ant-build-system: Use absolute path as base-dir.
Date: Tue, 16 Jul 2019 22:10:20 +0200
This allows to chdir into some sub-project prior to building.

* guix/build/ant-build-system.scm (default-build.xml): Add parameter.
  (configure): Pass current directory as base-dir to default-build.xml.
---
 guix/build/ant-build-system.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm
index 49549c1b4b..3fe7808db5 100644
--- a/guix/build/ant-build-system.scm
+++ b/guix/build/ant-build-system.scm
@@ -36,6 +36,7 @@
 ;; Code:
 
 (define* (default-build.xml jar-name prefix #:optional
+                            (base-dir ".")
                             (source-dir ".") (test-dir "./test") (main-class #f)
                             (test-include '("**/*Test.java"))
                             (test-exclude '("**/Abstract*Test.java")))
@@ -43,7 +44,7 @@
   (call-with-output-file "build.xml"
     (lambda (port)
       (sxml->xml
-       `(project (@ (basedir ".")
+       `(project (@ (basedir ,base-dir)
                     (name ,jar-name))
                  (property (@ (name "classes.dir")
                               (value "${basedir}/build/classes")))
@@ -162,6 +163,7 @@ to the default GNU unpack strategy."
     (default-build.xml jar-name
                        (string-append (assoc-ref outputs "out")
                                       "/share/java")
+                       (getcwd)
                        source-dir test-dir main-class test-include test-exclude))
   (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
   (setenv "CLASSPATH" (generate-classpath inputs))
-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#36695; Package guix-patches. (Wed, 17 Jul 2019 08:18:01 GMT) Full text and rfc822 format available.

Message #17 received at 36695 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>,36695 <at> debbugs.gnu.org
Subject: Re: [bug#36695] [PATCH 3/3] guix: ant-build-system: Use absolute path
 as base-dir.
Date: Wed, 17 Jul 2019 10:17:06 +0200
Le 16 juillet 2019 22:10:20 GMT+02:00, Hartmut Goebel <h.goebel <at> crazy-compilers.com> a écrit :
>This allows to chdir into some sub-project prior to building.
>
>* guix/build/ant-build-system.scm (default-build.xml): Add parameter.
>  (configure): Pass current directory as base-dir to default-build.xml.
>---
> guix/build/ant-build-system.scm | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/guix/build/ant-build-system.scm
>b/guix/build/ant-build-system.scm
>index 49549c1b4b..3fe7808db5 100644
>--- a/guix/build/ant-build-system.scm
>+++ b/guix/build/ant-build-system.scm
>@@ -36,6 +36,7 @@
> ;; Code:
> 
> (define* (default-build.xml jar-name prefix #:optional
>+                            (base-dir ".")
>                   (source-dir ".") (test-dir "./test") (main-class #f)
>                             (test-include '("**/*Test.java"))
>                             (test-exclude '("**/Abstract*Test.java")))
>@@ -43,7 +44,7 @@
>   (call-with-output-file "build.xml"
>     (lambda (port)
>       (sxml->xml
>-       `(project (@ (basedir ".")
>+       `(project (@ (basedir ,base-dir)
>                     (name ,jar-name))
>                  (property (@ (name "classes.dir")
>                               (value "${basedir}/build/classes")))
>@@ -162,6 +163,7 @@ to the default GNU unpack strategy."
>     (default-build.xml jar-name
>                        (string-append (assoc-ref outputs "out")
>                                       "/share/java")
>+                       (getcwd)
>             source-dir test-dir main-class test-include test-exclude))
>   (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
>   (setenv "CLASSPATH" (generate-classpath inputs))

I don't understand the point of that patch. I can already add a chdir phase just after unpack to do just that. What does this patch give us?

The other two patches lgtm, but I think they need to go to staging instead of master, because they will cause a rebuild of every java package.




Information forwarded to guix-patches <at> gnu.org:
bug#36695; Package guix-patches. (Fri, 19 Jul 2019 10:44:03 GMT) Full text and rfc822 format available.

Message #20 received at 36695 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: Julien Lepiller <julien <at> lepiller.eu>, 36695 <at> debbugs.gnu.org
Subject: Re: [bug#36695] [PATCH 3/3] guix: ant-build-system: Use absolute path
 as base-dir.
Date: Fri, 19 Jul 2019 12:43:50 +0200
Am 17.07.19 um 10:17 schrieb Julien Lepiller:
> I don't understand the point of that patch. I can already add a chdir phase just after unpack to do just that. What does this patch give us?

This patch only ensures the build-directory is an absolute path instead
of a relative one. It does not enable to specify the build-dir as an
option to the ant-build-system. Thus it is different from using a chdir
phase.

As this patch is some years old now, I can't remember the exact case.
AFAIR the relative path did not work for some packages for some reason.

Please let me know if I should include this one, too. (No reasoning
necessary.)

(I'm just waiting for your answer to avoid rebuilding all java-packages
twice - even on staging)

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |






Information forwarded to guix-patches <at> gnu.org:
bug#36695; Package guix-patches. (Fri, 19 Jul 2019 10:58:02 GMT) Full text and rfc822 format available.

Message #23 received at 36695 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>,36695 <at> debbugs.gnu.org
Subject: Re: [bug#36695] [PATCH 3/3] guix: ant-build-system: Use absolute path
 as base-dir.
Date: Fri, 19 Jul 2019 12:57:21 +0200
Le 19 juillet 2019 12:43:50 GMT+02:00, Hartmut Goebel <h.goebel <at> crazy-compilers.com> a écrit :
>Am 17.07.19 um 10:17 schrieb Julien Lepiller:
>> I don't understand the point of that patch. I can already add a chdir
>phase just after unpack to do just that. What does this patch give us?
>
>This patch only ensures the build-directory is an absolute path instead
>of a relative one. It does not enable to specify the build-dir as an
>option to the ant-build-system. Thus it is different from using a chdir
>phase.
>
>As this patch is some years old now, I can't remember the exact case.
>AFAIR the relative path did not work for some packages for some reason.
>
>Please let me know if I should include this one, too. (No reasoning
>necessary.)
>
>(I'm just waiting for your answer to avoid rebuilding all java-packages
>twice - even on staging)

I'm fine with this patch, but I still don't see the point.




Information forwarded to guix-patches <at> gnu.org:
bug#36695; Package guix-patches. (Fri, 19 Jul 2019 10:58:03 GMT) Full text and rfc822 format available.

Message #26 received at 36695 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>,36695 <at> debbugs.gnu.org
Subject: Re: [bug#36695] [PATCH 3/3] guix: ant-build-system: Use absolute path
 as base-dir.
Date: Fri, 19 Jul 2019 12:56:15 +0200
Le 19 juillet 2019 12:43:50 GMT+02:00, Hartmut Goebel <h.goebel <at> crazy-compilers.com> a écrit :
>Am 17.07.19 um 10:17 schrieb Julien Lepiller:
>> I don't understand the point of that patch. I can already add a chdir
>phase just after unpack to do just that. What does this patch give us?
>
>This patch only ensures the build-directory is an absolute path instead
>of a relative one. It does not enable to specify the build-dir as an
>option to the ant-build-system. Thus it is different from using a chdir
>phase.
>
>As this patch is some years old now, I can't remember the exact case.
>AFAIR the relative path did not work for some packages for some reason.
>
>Please let me know if I should include this one, too. (No reasoning
>necessary.)
>
>(I'm just waiting for your answer to avoid rebuilding all java-packages
>twice - even on staging)

I'm fine with this patch, but I still don't see the point.




Information forwarded to guix-patches <at> gnu.org:
bug#36695; Package guix-patches. (Fri, 19 Jul 2019 11:05:01 GMT) Full text and rfc822 format available.

Message #29 received at 36695 <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: Julien Lepiller <julien <at> lepiller.eu>, 36695 <at> debbugs.gnu.org
Subject: Re: [bug#36695] [PATCH 3/3] guix: ant-build-system: Use absolute path
 as base-dir.
Date: Fri, 19 Jul 2019 13:04:03 +0200
Am 19.07.19 um 12:56 schrieb Julien Lepiller:
> I'm fine with this patch, but I still don't see the point.

So I'll leave it out - it can still be fixed if it actually occurs in a
current package.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





Reply sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
You have taken responsibility. (Thu, 25 Jul 2019 08:27:01 GMT) Full text and rfc822 format available.

Notification sent to Hartmut Goebel <h.goebel <at> crazy-compilers.com>:
bug acknowledged by developer. (Thu, 25 Jul 2019 08:27:02 GMT) Full text and rfc822 format available.

Message #34 received at 36695-close <at> debbugs.gnu.org (full text, mbox):

From: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
To: 36695-close <at> debbugs.gnu.org
Subject: Re: [PATCH 0/3] Enhancemants for the ant-build-system
Date: Thu, 25 Jul 2019 10:26:06 +0200
Pushed first two patched to staging as
cbad3570db3e692af55eac5b69cb6db062a39d77.

Last one left off.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel <at> crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Aug 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.