GNU bug report logs - #57749
[patch] maven: fix build with java-slf4j-simple-source expanded

Previous Next

Package: guix;

Reported by: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>

Date: Mon, 12 Sep 2022 12:36:01 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

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 57749 in the body.
You can then email your comments to 57749 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 bug-guix <at> gnu.org:
bug#57749; Package guix. (Mon, 12 Sep 2022 12:36:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 12 Sep 2022 12:36:01 GMT) Full text and rfc822 format available.

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

From: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
To: bug-guix <at> gnu.org
Subject: [patch] maven: fix build with java-slf4j-simple-source expanded
Date: Mon, 12 Sep 2022 14:33:04 +0200
[Message part 1 (text/plain, inline)]
Hi,

Maven failed to build for me, because java-slf4j-simple-source is no
longer a tarball, but an expanded directory of files.

Copying the files from Scheme makes it build. A patch is attached.


[0001-gnu-maven-fix-build-with-java-slf4j-simple-source-ex.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#57749; Package guix. (Mon, 12 Sep 2022 14:14:02 GMT) Full text and rfc822 format available.

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

From: Julien Lepiller <julien <at> lepiller.eu>
To: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>, 57749 <at> debbugs.gnu.org
Subject: Re: bug#57749: [patch] maven: fix build with java-slf4j-simple-source expanded
Date: Mon, 12 Sep 2022 16:13:35 +0200
[Message part 1 (text/plain, inline)]
I don't think checking for file-exists before mkdir-p makes much sense. Doesn't mkdir-p make the same checks already?

I thought find-files required two arguments? Also the first argument could be simplified to input-folder

Otherwise LGTM, but I can't push myself currently. Thanks!

Le 12 septembre 2022 14:33:04 GMT+02:00, "Dr. Arne Babenhauserheide" <arne_bab <at> web.de> a écrit :
>Hi,
>
>Maven failed to build for me, because java-slf4j-simple-source is no
>longer a tarball, but an expanded directory of files.
>
>Copying the files from Scheme makes it build. A patch is attached.
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#57749; Package guix. (Mon, 12 Sep 2022 15:56:02 GMT) Full text and rfc822 format available.

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

From: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: 57749 <at> debbugs.gnu.org
Subject: Re: bug#57749: [patch] maven: fix build with
 java-slf4j-simple-source expanded
Date: Mon, 12 Sep 2022 17:45:57 +0200
[Message part 1 (text/plain, inline)]
Julien Lepiller <julien <at> lepiller.eu> writes:

> I don't think checking for file-exists before mkdir-p makes much sense. Doesn't mkdir-p make the same
> checks already?

You’re right — thank you!

> I thought find-files required two arguments? Also the first argument
> could be simplified to input-folder

The second argument is #:optional. But yes, it should be input-folder —
that was the whole point of the first let.

Thank you!

> Otherwise LGTM, but I can't push myself currently. Thanks!

Here’s the updated patch:

[0001-gnu-maven-fix-build-with-java-slf4j-simple-source-ex.patch (text/x-patch, inline)]
From 12164a5b46ad0a5c27c42b426ad94df8f9910b48 Mon Sep 17 00:00:00 2001
From: Arne Babenhauserheide <arne_bab <at> web.de>
Date: Mon, 12 Sep 2022 14:31:42 +0200
Subject: [PATCH] gnu: maven: fix build with java-slf4j-simple-source expanded

* gnu/packages/maven.scm (maven): copy files from source.
---
 gnu/packages/maven.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 28ec4eb9a8..f198c2a475 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2019 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
 ;;; Copyright © 2020 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
+;;; Copyright © 2022 Arne Babenhauserheide <arne_bab <at> web.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1787,7 +1788,16 @@ (define-public maven-slf4j-provider
            (lambda* (#:key inputs #:allow-other-keys)
              (mkdir-p "generated-sources")
              (with-directory-excursion "generated-sources"
-               (invoke "tar" "xf" (assoc-ref inputs "java-slf4j-simple-source"))
+               (let ((input-folder (assoc-ref inputs "java-slf4j-simple-source")))
+                 ;; copy all files
+                 (for-each (lambda (filename)
+                             (let ((target ;; remove folder prefix plus slash
+                                    (string-drop
+                                     filename
+                                     (1+ (string-length input-folder)))))
+                               (mkdir-p (dirname target))
+                               (copy-file filename target)))
+                           (find-files input-folder)))
                (for-each delete-file (find-files "." "StaticLoggerBinder.java")))
              (for-each
                (lambda (simple)
-- 
2.37.3

[Message part 3 (text/plain, inline)]
Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#57749; Package guix. (Wed, 21 Sep 2022 21:45:01 GMT) Full text and rfc822 format available.

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

From: "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: 57749 <at> debbugs.gnu.org
Subject: Re: bug#57749: [patch] maven: fix build with
 java-slf4j-simple-source expanded
Date: Wed, 21 Sep 2022 23:42:43 +0200
[Message part 1 (text/plain, inline)]
"Dr. Arne Babenhauserheide" <arne_bab <at> web.de> writes:
> Julien Lepiller <julien <at> lepiller.eu> writes:
>> Otherwise LGTM, but I can't push myself currently. Thanks!
>
> Here’s the updated patch:

Can you push again?
(sorry to come back, I just don’t want this to get lost)

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#57749; Package guix. (Thu, 22 Sep 2022 08:20:02 GMT) Full text and rfc822 format available.

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

From: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
To: 57749 <at> debbugs.gnu.org
Subject: Re: bug#57749: [patch] maven: fix build with java-slf4j-simple-source
 expanded
Date: Thu, 22 Sep 2022 10:19:16 +0200
It seems like this issue has been resolved by the
79897a37012a9bfbcb460cfe0aaaf32aab79dbe5 if so then please close this
issue.

Thanks




Reply sent to Julien Lepiller <julien <at> lepiller.eu>:
You have taken responsibility. (Thu, 22 Sep 2022 19:51:01 GMT) Full text and rfc822 format available.

Notification sent to "Dr. Arne Babenhauserheide" <arne_bab <at> web.de>:
bug acknowledged by developer. (Thu, 22 Sep 2022 19:51:02 GMT) Full text and rfc822 format available.

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

From: Julien Lepiller <julien <at> lepiller.eu>
To: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
Cc: 57749-close <at> debbugs.gnu.org
Subject: Re: bug#57749: [patch] maven: fix build with
 java-slf4j-simple-source expanded
Date: Thu, 22 Sep 2022 21:50:26 +0200
Le Thu, 22 Sep 2022 10:19:16 +0200,
Rostislav Svoboda <rostislav.svoboda <at> gmail.com> a écrit :

> It seems like this issue has been resolved by the
> 79897a37012a9bfbcb460cfe0aaaf32aab79dbe5 if so then please close this
> issue.
> 
> Thanks
> 
> 
> 

Ah indeed, a similar patch was sent independently and pushed before
this. I was hoping another commiter would have pushed this patch, but
in the end maven-slf4j-provider was fixed :)

Closing this since it's no longer relevant. Thanks again!




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

This bug report was last modified 1 year and 186 days ago.

Previous Next


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