[bug#63145,1/3] gnu: maven-*-*: Fix - add missing shebang to the sisu.sh.
Commit Message
* gnu/packages/maven.scm
- maven-settings-builder
- maven-model-builder
- maven-resolver-provider
- maven-core-bootstrap
- maven-embedder
The sisu.sh script must have a shebang on the first line, otherwise an
'In execvp of ...: Exec format error' is indicated.
---
gnu/packages/maven.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)
Comments
Hi Rostislav,
I pushed patches minutes ago fixing the same thing:
https://issues.guix.gnu.org/63094
They lack the nice factorization that you add, but they use
‘substitute*’ instead of calling out to ‘sed’, which is the preferred
way to do it.
We could definitely factorize along the lines of what you propose.
Would you like to update these two patches?
Thanks,
Ludo’.
Hi Rostislav,
On 2023-04-28 14:13, Rostislav Svoboda wrote:
> * gnu/packages/maven.scm
> - maven-settings-builder
> - maven-model-builder
> - maven-resolver-provider
> - maven-core-bootstrap
> - maven-embedder
> The sisu.sh script must have a shebang on the first line, otherwise an
> 'In execvp of ...: Exec format error' is indicated.
I think there's something strange going on with the maven-3.0-… packages, as I'm getting:
--8<---------------cut here---------------start------------->8---
## Guix commit is 94ac93042f09b4ba68b7b64ed1feeebd3dab1ea4.
$ ./pre-inst-env guix build maven-settings-builder@3.0
…
phase `patch-generated-file-shebangs' succeeded after 0.0 seconds
starting phase `generate-sisu-named'
phase `generate-sisu-named' succeeded after 0.1 seconds
starting phase `generate-components.xml'
In execvp of ./components.sh: Exec format error
error: in phase 'generate-components.xml': uncaught exception:
%exception #<&invoke-error program: "./components.sh" arguments: ("maven-settings-builder/src/main/java" "build/classes/META-INF/plexus/components.xml") exit-status: 127 term-signal: #f stop-signal: #f>
phase `generate-components.xml' failed after 0.0 seconds
command "./components.sh" "maven-settings-builder/src/main/java" "build/classes/META-INF/plexus/components.xml" failed with status 127
builder for `/gnu/store/czr1iwlh0krl0qwskkg6s862x2r9shhy-maven-settings-builder-3.0.drv' failed with exit code 1
build of /gnu/store/czr1iwlh0krl0qwskkg6s862x2r9shhy-maven-settings-builder-3.0.drv failed
…
--8<---------------cut here---------------end--------------->8---
@@ -1365,6 +1365,9 @@ (define-public maven-settings-builder
#:test-dir "maven-settings-builder/src/test"
#:phases
(modify-phases %standard-phases
+ (add-before 'patch-source-shebangs 'add-missing-shebang
+ (lambda _
+ (invoke "sed" "-i" "1s;^;#!/bin/sh\\n\\n;" "./sisu.sh")))
(add-before 'build 'generate-sisu-named
(lambda _
(mkdir-p "build/classes/META-INF/sisu")
@@ -1396,6 +1399,9 @@ (define-public maven-model-builder
#:test-dir "src/test"
#:phases
(modify-phases %standard-phases
+ (add-before 'patch-source-shebangs 'add-missing-shebang
+ (lambda _
+ (invoke "sed" "-i" "1s;^;#!/bin/sh\\n\\n;" "./sisu.sh")))
(add-before 'configure 'chdir
(lambda _
;; Required for tests that rely on the package's default
@@ -1501,6 +1507,9 @@ (define-public maven-resolver-provider
#:tests? #f; dependency loop on maven-core (@Component RepositorySystem)
#:phases
(modify-phases %standard-phases
+ (add-before 'patch-source-shebangs 'add-missing-shebang
+ (lambda _
+ (invoke "sed" "-i" "1s;^;#!/bin/sh\\n\\n;" "./sisu.sh")))
(add-before 'build 'generate-sisu-named
(lambda _
(mkdir-p "build/classes/META-INF/sisu")
@@ -1591,6 +1600,9 @@ (define-public maven-core-bootstrap
#:tests? #f
#:phases
(modify-phases %standard-phases
+ (add-before 'patch-source-shebangs 'add-missing-shebang
+ (lambda _
+ (invoke "sed" "-i" "1s;^;#!/bin/sh\\n\\n;" "./sisu.sh")))
(add-before 'configure 'chdir
(lambda _
;; Required for generating components.xml in maven-core
@@ -1822,6 +1834,9 @@ (define-public maven-embedder
#:jdk ,icedtea-8
#:phases
(modify-phases %standard-phases
+ (add-before 'patch-source-shebangs 'add-missing-shebang
+ (lambda _
+ (invoke "sed" "-i" "1s;^;#!/bin/sh\\n\\n;" "./sisu.sh")))
(add-before 'build 'generate-sisu-named
(lambda _
(mkdir-p "build/classes/META-INF/sisu")