unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fix bug #25304 (restore libtool ltmain.sh shebang)
@ 2017-01-01 14:45 ng0
  2017-01-01 14:45 ` [PATCH] gnu: libtool: Restore ltmain.sh shebang ng0
  2017-01-01 15:24 ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' ng0
  0 siblings, 2 replies; 12+ messages in thread
From: ng0 @ 2017-01-01 14:45 UTC (permalink / raw)
  To: guix-devel


The file which ends up in the store now has /bin/sh as shebang and the bug should be fixed in theory.

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

* [PATCH] gnu: libtool: Restore ltmain.sh shebang.
  2017-01-01 14:45 Fix bug #25304 (restore libtool ltmain.sh shebang) ng0
@ 2017-01-01 14:45 ` ng0
  2017-01-01 14:50   ` Ricardo Wurmus
  2017-01-01 15:24 ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' ng0
  1 sibling, 1 reply; 12+ messages in thread
From: ng0 @ 2017-01-01 14:45 UTC (permalink / raw)
  To: guix-devel

This fixes <http://bugs.gnu.org/25304>

* gnu/packages/autotools.scm (libtool): Restore ltmain.sh shebang.
[arguments]: Use 'modify-phases' syntax.  Add new phase 'restory-ltmain-shebang'.
---
 gnu/packages/autotools.scm | 37 +++++++++++++++++++++++--------------
 1 file changed, 23 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 72492e70e..217517ade 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
+;;; Copyright © 2017 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages bash)
   #:use-module (guix utils)
   #:use-module (guix packages)
@@ -300,6 +302,7 @@ Makefile, simplifying the entire process for the developer.")
     (propagated-inputs `(("m4" ,m4)))
     (native-inputs `(("m4" ,m4)
                      ("perl" ,perl)
+                     ("help2man" ,help2man) ;because we modify ltmain.sh
                      ("automake" ,automake)      ;some tests rely on 'aclocal'
                      ("autoconf" ,(autoconf-wrapper)))) ;others on 'autom4te'
 
@@ -313,21 +316,27 @@ Makefile, simplifying the entire process for the developer.")
                                       (or (%current-target-system)
                                           (%current-system))))
 
-       #:phases (alist-cons-before
-                 'check 'pre-check
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   ;; Run the test suite in parallel, if possible.
-                   (setenv "TESTSUITEFLAGS"
-                           (string-append
-                            "-j"
-                            (number->string (parallel-job-count))))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       ;; Run the test suite in parallel, if possible.
+                       (setenv "TESTSUITEFLAGS"
+                               (string-append
+                                "-j"
+                                (number->string (parallel-job-count))))
+
+                       ;; Path references to /bin/sh.
+                       (let ((bash (assoc-ref inputs "bash")))
+                         (substitute* "tests/testsuite"
+                           (("/bin/sh")
+                            (string-append bash "/bin/bash"))))))
+         (add-after 'patch-source-shebangs 'restore-ltmain-shebang
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "build-aux/ltmain.in"
+                        (((string-append (assoc-ref inputs "bash") "/bin/sh"))
+                         "/bin/sh")))))))
 
-                   ;; Path references to /bin/sh.
-                   (let ((bash (assoc-ref inputs "bash")))
-                     (substitute* "tests/testsuite"
-                       (("/bin/sh")
-                        (string-append bash "/bin/bash")))))
-                 %standard-phases)))
     (synopsis "Generic shared library support tools")
     (description
      "GNU Libtool helps in the creation and use of shared libraries, by
-- 
2.11.0

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

* Re: [PATCH] gnu: libtool: Restore ltmain.sh shebang.
  2017-01-01 14:45 ` [PATCH] gnu: libtool: Restore ltmain.sh shebang ng0
@ 2017-01-01 14:50   ` Ricardo Wurmus
  0 siblings, 0 replies; 12+ messages in thread
From: Ricardo Wurmus @ 2017-01-01 14:50 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel


ng0 <ng0@libertad.pw> writes:

> This fixes <http://bugs.gnu.org/25304>
>
> * gnu/packages/autotools.scm (libtool): Restore ltmain.sh shebang.
> [arguments]: Use 'modify-phases' syntax.  Add new phase 'restory-ltmain-shebang'.

Please separate these two changes.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
http://elephly.net

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

* [PATCH 1/2] gnu: libtool: Use 'modify-phases'.
  2017-01-01 14:45 Fix bug #25304 (restore libtool ltmain.sh shebang) ng0
  2017-01-01 14:45 ` [PATCH] gnu: libtool: Restore ltmain.sh shebang ng0
@ 2017-01-01 15:24 ` ng0
  2017-01-01 15:24   ` [PATCH 2/2] gnu: libtool: Restore ltmain.sh shebang ng0
  2017-01-05  1:09   ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' Leo Famulari
  1 sibling, 2 replies; 12+ messages in thread
From: ng0 @ 2017-01-01 15:24 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
[arguments]: Use 'modify-phases'.
---
 gnu/packages/autotools.scm | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 72492e70e..1c9e062d6 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
+;;; Copyright © 2017 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -26,6 +27,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages bash)
   #:use-module (guix utils)
   #:use-module (guix packages)
@@ -300,6 +302,7 @@ Makefile, simplifying the entire process for the developer.")
     (propagated-inputs `(("m4" ,m4)))
     (native-inputs `(("m4" ,m4)
                      ("perl" ,perl)
+                     ("help2man" ,help2man) ;because we modify ltmain.sh
                      ("automake" ,automake)      ;some tests rely on 'aclocal'
                      ("autoconf" ,(autoconf-wrapper)))) ;others on 'autom4te'
 
@@ -313,21 +316,22 @@ Makefile, simplifying the entire process for the developer.")
                                       (or (%current-target-system)
                                           (%current-system))))
 
-       #:phases (alist-cons-before
-                 'check 'pre-check
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   ;; Run the test suite in parallel, if possible.
-                   (setenv "TESTSUITEFLAGS"
-                           (string-append
-                            "-j"
-                            (number->string (parallel-job-count))))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       ;; Run the test suite in parallel, if possible.
+                       (setenv "TESTSUITEFLAGS"
+                               (string-append
+                                "-j"
+                                (number->string (parallel-job-count))))
+
+                       ;; Path references to /bin/sh.
+                       (let ((bash (assoc-ref inputs "bash")))
+                         (substitute* "tests/testsuite"
+                           (("/bin/sh")
+                            (string-append bash "/bin/bash")))))))))
 
-                   ;; Path references to /bin/sh.
-                   (let ((bash (assoc-ref inputs "bash")))
-                     (substitute* "tests/testsuite"
-                       (("/bin/sh")
-                        (string-append bash "/bin/bash")))))
-                 %standard-phases)))
     (synopsis "Generic shared library support tools")
     (description
      "GNU Libtool helps in the creation and use of shared libraries, by
-- 
2.11.0

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

* [PATCH 2/2] gnu: libtool: Restore ltmain.sh shebang.
  2017-01-01 15:24 ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' ng0
@ 2017-01-01 15:24   ` ng0
  2017-01-05  1:09   ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' Leo Famulari
  1 sibling, 0 replies; 12+ messages in thread
From: ng0 @ 2017-01-01 15:24 UTC (permalink / raw)
  To: guix-devel

This fixes <http://bugs.gnu.org/25304>

 * gnu/packages/autotools.scm (libtool): Restore ltmain.sh shebang.
 [arguments]: Add new phase 'restory-ltmain-shebang'.
---
 gnu/packages/autotools.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 1c9e062d6..217517ade 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -330,7 +330,12 @@ Makefile, simplifying the entire process for the developer.")
                        (let ((bash (assoc-ref inputs "bash")))
                          (substitute* "tests/testsuite"
                            (("/bin/sh")
-                            (string-append bash "/bin/bash")))))))))
+                            (string-append bash "/bin/bash"))))))
+         (add-after 'patch-source-shebangs 'restore-ltmain-shebang
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "build-aux/ltmain.in"
+                        (((string-append (assoc-ref inputs "bash") "/bin/sh"))
+                         "/bin/sh")))))))
 
     (synopsis "Generic shared library support tools")
     (description
-- 
2.11.0

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

* Re: [PATCH 1/2] gnu: libtool: Use 'modify-phases'.
  2017-01-01 15:24 ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' ng0
  2017-01-01 15:24   ` [PATCH 2/2] gnu: libtool: Restore ltmain.sh shebang ng0
@ 2017-01-05  1:09   ` Leo Famulari
  2017-01-05 10:04     ` ng0
                       ` (2 more replies)
  1 sibling, 3 replies; 12+ messages in thread
From: Leo Famulari @ 2017-01-05  1:09 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 346 bytes --]

On Sun, Jan 01, 2017 at 03:24:27PM +0000, ng0 wrote:
> * gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
> [arguments]: Use 'modify-phases'.

> +                     ("help2man" ,help2man) ;because we modify ltmain.sh

This should go in the other patch, right?

I attached a revised patch series with that change, and another bug fix.

[-- Attachment #1.2: 0001-gnu-libtool-Use-modify-phases.patch --]
[-- Type: text/plain, Size: 2778 bytes --]

From 7f0fce3f71be7da461de89fb5f6f47289c6498b6 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@libertad.pw>
Date: Sun, 1 Jan 2017 15:24:27 +0000
Subject: [PATCH 1/3] gnu: libtool: Use 'modify-phases'.

* gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
[arguments]: Use 'modify-phases'.

Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/packages/autotools.scm | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 72492e70e..64a1e68bf 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 David Thompson <davet@gnu.org>
+;;; Copyright © 2017 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -313,21 +314,22 @@ Makefile, simplifying the entire process for the developer.")
                                       (or (%current-target-system)
                                           (%current-system))))
 
-       #:phases (alist-cons-before
-                 'check 'pre-check
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   ;; Run the test suite in parallel, if possible.
-                   (setenv "TESTSUITEFLAGS"
-                           (string-append
-                            "-j"
-                            (number->string (parallel-job-count))))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       ;; Run the test suite in parallel, if possible.
+                       (setenv "TESTSUITEFLAGS"
+                               (string-append
+                                "-j"
+                                (number->string (parallel-job-count))))
+
+                       ;; Path references to /bin/sh.
+                       (let ((bash (assoc-ref inputs "bash")))
+                         (substitute* "tests/testsuite"
+                           (("/bin/sh")
+                            (string-append bash "/bin/bash")))))))))
 
-                   ;; Path references to /bin/sh.
-                   (let ((bash (assoc-ref inputs "bash")))
-                     (substitute* "tests/testsuite"
-                       (("/bin/sh")
-                        (string-append bash "/bin/bash")))))
-                 %standard-phases)))
     (synopsis "Generic shared library support tools")
     (description
      "GNU Libtool helps in the creation and use of shared libraries, by
-- 
2.11.0


[-- Attachment #1.3: 0002-gnu-libtool-Restore-ltmain.sh-shebang.patch --]
[-- Type: text/plain, Size: 2186 bytes --]

From fc60e04d85ab171538333fe5aa47c2e6849b02e3 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@libertad.pw>
Date: Sun, 1 Jan 2017 15:24:28 +0000
Subject: [PATCH 2/3] gnu: libtool: Restore ltmain.sh shebang.

This fixes <http://bugs.gnu.org/25304>

* gnu/packages/autotools.scm (libtool)[arguments]: Add new phase
'restore-ltmain-shebang'.
[native-inputs]: Add help2man.

Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/packages/autotools.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 64a1e68bf..217517ade 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -27,6 +27,7 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages bash)
   #:use-module (guix utils)
   #:use-module (guix packages)
@@ -301,6 +302,7 @@ Makefile, simplifying the entire process for the developer.")
     (propagated-inputs `(("m4" ,m4)))
     (native-inputs `(("m4" ,m4)
                      ("perl" ,perl)
+                     ("help2man" ,help2man) ;because we modify ltmain.sh
                      ("automake" ,automake)      ;some tests rely on 'aclocal'
                      ("autoconf" ,(autoconf-wrapper)))) ;others on 'autom4te'
 
@@ -328,7 +330,12 @@ Makefile, simplifying the entire process for the developer.")
                        (let ((bash (assoc-ref inputs "bash")))
                          (substitute* "tests/testsuite"
                            (("/bin/sh")
-                            (string-append bash "/bin/bash")))))))))
+                            (string-append bash "/bin/bash"))))))
+         (add-after 'patch-source-shebangs 'restore-ltmain-shebang
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "build-aux/ltmain.in"
+                        (((string-append (assoc-ref inputs "bash") "/bin/sh"))
+                         "/bin/sh")))))))
 
     (synopsis "Generic shared library support tools")
     (description
-- 
2.11.0


[-- Attachment #1.4: 0003-gnu-libtool-Don-t-replace-sh-reference-with-bash.patch --]
[-- Type: text/plain, Size: 1532 bytes --]

From 809120b991603b8c557be7481be2bbae29bd8a7f Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Wed, 4 Jan 2017 19:44:27 -0500
Subject: [PATCH 3/3] gnu: libtool: Don't replace 'sh' reference with 'bash'.

Bash behaves differently based on how it is invoked (see Invocation in bash(1)).

* gnu/packages/autotools.scm (libtool)[arguments]: Use /bin/sh instead
of /bin/bash in 'pre-check' phase. Fix typo in comment.
---
 gnu/packages/autotools.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 217517ade..926767855 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -326,11 +326,11 @@ Makefile, simplifying the entire process for the developer.")
                                 "-j"
                                 (number->string (parallel-job-count))))
 
-                       ;; Path references to /bin/sh.
+                       ;; Patch references to /bin/sh.
                        (let ((bash (assoc-ref inputs "bash")))
                          (substitute* "tests/testsuite"
                            (("/bin/sh")
-                            (string-append bash "/bin/bash"))))))
+                            (string-append bash "/bin/sh"))))))
          (add-after 'patch-source-shebangs 'restore-ltmain-shebang
                     (lambda* (#:key inputs #:allow-other-keys)
                       (substitute* "build-aux/ltmain.in"
-- 
2.11.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 1/2] gnu: libtool: Use 'modify-phases'.
  2017-01-05  1:09   ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' Leo Famulari
@ 2017-01-05 10:04     ` ng0
  2017-01-05 10:36     ` Ludovic Courtès
  2017-01-05 13:50     ` Marius Bakke
  2 siblings, 0 replies; 12+ messages in thread
From: ng0 @ 2017-01-05 10:04 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> writes:

> On Sun, Jan 01, 2017 at 03:24:27PM +0000, ng0 wrote:
>> * gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
>> [arguments]: Use 'modify-phases'.
>
>> +                     ("help2man" ,help2man) ;because we modify ltmain.sh
>
> This should go in the other patch, right?

Yes. Good catch, thanks. The series below looks good to me.

> I attached a revised patch series with that change, and another bug fix.
> From 7f0fce3f71be7da461de89fb5f6f47289c6498b6 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@libertad.pw>
> Date: Sun, 1 Jan 2017 15:24:27 +0000
> Subject: [PATCH 1/3] gnu: libtool: Use 'modify-phases'.
>
> * gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
> [arguments]: Use 'modify-phases'.
>
> Signed-off-by: Leo Famulari <leo@famulari.name>
> ---
>  gnu/packages/autotools.scm | 30 ++++++++++++++++--------------
>  1 file changed, 16 insertions(+), 14 deletions(-)
>
> diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
> index 72492e70e..64a1e68bf 100644
> --- a/gnu/packages/autotools.scm
> +++ b/gnu/packages/autotools.scm
> @@ -5,6 +5,7 @@
>  ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
>  ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
>  ;;; Copyright © 2016 David Thompson <davet@gnu.org>
> +;;; Copyright © 2017 ng0 <ng0@libertad.pw>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -313,21 +314,22 @@ Makefile, simplifying the entire process for the developer.")
>                                        (or (%current-target-system)
>                                            (%current-system))))
>  
> -       #:phases (alist-cons-before
> -                 'check 'pre-check
> -                 (lambda* (#:key inputs #:allow-other-keys)
> -                   ;; Run the test suite in parallel, if possible.
> -                   (setenv "TESTSUITEFLAGS"
> -                           (string-append
> -                            "-j"
> -                            (number->string (parallel-job-count))))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-before 'check 'pre-check
> +                     (lambda* (#:key inputs #:allow-other-keys)
> +                       ;; Run the test suite in parallel, if possible.
> +                       (setenv "TESTSUITEFLAGS"
> +                               (string-append
> +                                "-j"
> +                                (number->string (parallel-job-count))))
> +
> +                       ;; Path references to /bin/sh.
> +                       (let ((bash (assoc-ref inputs "bash")))
> +                         (substitute* "tests/testsuite"
> +                           (("/bin/sh")
> +                            (string-append bash "/bin/bash")))))))))
>  
> -                   ;; Path references to /bin/sh.
> -                   (let ((bash (assoc-ref inputs "bash")))
> -                     (substitute* "tests/testsuite"
> -                       (("/bin/sh")
> -                        (string-append bash "/bin/bash")))))
> -                 %standard-phases)))
>      (synopsis "Generic shared library support tools")
>      (description
>       "GNU Libtool helps in the creation and use of shared libraries, by
> -- 
> 2.11.0
>
> From fc60e04d85ab171538333fe5aa47c2e6849b02e3 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@libertad.pw>
> Date: Sun, 1 Jan 2017 15:24:28 +0000
> Subject: [PATCH 2/3] gnu: libtool: Restore ltmain.sh shebang.
>
> This fixes <http://bugs.gnu.org/25304>
>
> * gnu/packages/autotools.scm (libtool)[arguments]: Add new phase
> 'restore-ltmain-shebang'.
> [native-inputs]: Add help2man.
>
> Signed-off-by: Leo Famulari <leo@famulari.name>
> ---
>  gnu/packages/autotools.scm | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
> index 64a1e68bf..217517ade 100644
> --- a/gnu/packages/autotools.scm
> +++ b/gnu/packages/autotools.scm
> @@ -27,6 +27,7 @@
>    #:use-module (gnu packages)
>    #:use-module (gnu packages perl)
>    #:use-module (gnu packages m4)
> +  #:use-module (gnu packages man)
>    #:use-module (gnu packages bash)
>    #:use-module (guix utils)
>    #:use-module (guix packages)
> @@ -301,6 +302,7 @@ Makefile, simplifying the entire process for the developer.")
>      (propagated-inputs `(("m4" ,m4)))
>      (native-inputs `(("m4" ,m4)
>                       ("perl" ,perl)
> +                     ("help2man" ,help2man) ;because we modify ltmain.sh
>                       ("automake" ,automake)      ;some tests rely on 'aclocal'
>                       ("autoconf" ,(autoconf-wrapper)))) ;others on 'autom4te'
>  
> @@ -328,7 +330,12 @@ Makefile, simplifying the entire process for the developer.")
>                         (let ((bash (assoc-ref inputs "bash")))
>                           (substitute* "tests/testsuite"
>                             (("/bin/sh")
> -                            (string-append bash "/bin/bash")))))))))
> +                            (string-append bash "/bin/bash"))))))
> +         (add-after 'patch-source-shebangs 'restore-ltmain-shebang
> +                    (lambda* (#:key inputs #:allow-other-keys)
> +                      (substitute* "build-aux/ltmain.in"
> +                        (((string-append (assoc-ref inputs "bash") "/bin/sh"))
> +                         "/bin/sh")))))))
>  
>      (synopsis "Generic shared library support tools")
>      (description
> -- 
> 2.11.0
>
> From 809120b991603b8c557be7481be2bbae29bd8a7f Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Wed, 4 Jan 2017 19:44:27 -0500
> Subject: [PATCH 3/3] gnu: libtool: Don't replace 'sh' reference with 'bash'.
>
> Bash behaves differently based on how it is invoked (see Invocation in bash(1)).
>
> * gnu/packages/autotools.scm (libtool)[arguments]: Use /bin/sh instead
> of /bin/bash in 'pre-check' phase. Fix typo in comment.
> ---
>  gnu/packages/autotools.scm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
> index 217517ade..926767855 100644
> --- a/gnu/packages/autotools.scm
> +++ b/gnu/packages/autotools.scm
> @@ -326,11 +326,11 @@ Makefile, simplifying the entire process for the developer.")
>                                  "-j"
>                                  (number->string (parallel-job-count))))
>  
> -                       ;; Path references to /bin/sh.
> +                       ;; Patch references to /bin/sh.
>                         (let ((bash (assoc-ref inputs "bash")))
>                           (substitute* "tests/testsuite"
>                             (("/bin/sh")
> -                            (string-append bash "/bin/bash"))))))
> +                            (string-append bash "/bin/sh"))))))
>           (add-after 'patch-source-shebangs 'restore-ltmain-shebang
>                      (lambda* (#:key inputs #:allow-other-keys)
>                        (substitute* "build-aux/ltmain.in"
> -- 
> 2.11.0
>

-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org

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

* Re: [PATCH 1/2] gnu: libtool: Use 'modify-phases'.
  2017-01-05  1:09   ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' Leo Famulari
  2017-01-05 10:04     ` ng0
@ 2017-01-05 10:36     ` Ludovic Courtès
  2017-01-05 10:55       ` ng0
  2017-01-05 15:43       ` Leo Famulari
  2017-01-05 13:50     ` Marius Bakke
  2 siblings, 2 replies; 12+ messages in thread
From: Ludovic Courtès @ 2017-01-05 10:36 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> skribis:

> On Sun, Jan 01, 2017 at 03:24:27PM +0000, ng0 wrote:
>> * gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
>> [arguments]: Use 'modify-phases'.
>
>> +                     ("help2man" ,help2man) ;because we modify ltmain.sh
>
> This should go in the other patch, right?
>
> I attached a revised patch series with that change, and another bug fix.
>
> From 7f0fce3f71be7da461de89fb5f6f47289c6498b6 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@libertad.pw>
> Date: Sun, 1 Jan 2017 15:24:27 +0000
> Subject: [PATCH 1/3] gnu: libtool: Use 'modify-phases'.
>
> * gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
> [arguments]: Use 'modify-phases'.
>
> Signed-off-by: Leo Famulari <leo@famulari.name>

[...]

> +       (modify-phases %standard-phases
> +         (add-before 'check 'pre-check
> +                     (lambda* (#:key inputs #:allow-other-keys)

Could you align “(” below the ‘d’ of ‘add-before’?

> From fc60e04d85ab171538333fe5aa47c2e6849b02e3 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@libertad.pw>
> Date: Sun, 1 Jan 2017 15:24:28 +0000
> Subject: [PATCH 2/3] gnu: libtool: Restore ltmain.sh shebang.
>
> This fixes <http://bugs.gnu.org/25304>
>
> * gnu/packages/autotools.scm (libtool)[arguments]: Add new phase
> 'restore-ltmain-shebang'.
> [native-inputs]: Add help2man.
>
> Signed-off-by: Leo Famulari <leo@famulari.name>

[...]

> +         (add-after 'patch-source-shebangs 'restore-ltmain-shebang
> +                    (lambda* (#:key inputs #:allow-other-keys)

Likewise.

> +                      (substitute* "build-aux/ltmain.in"
> +                        (((string-append (assoc-ref inputs "bash") "/bin/sh"))
> +                         "/bin/sh")))))))

We should use literal strings for patterns, like:

  (substitute* …
    (("^#!.*/bin/sh$") …))

> From 809120b991603b8c557be7481be2bbae29bd8a7f Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Wed, 4 Jan 2017 19:44:27 -0500
> Subject: [PATCH 3/3] gnu: libtool: Don't replace 'sh' reference with 'bash'.
>
> Bash behaves differently based on how it is invoked (see Invocation in bash(1)).
>
> * gnu/packages/autotools.scm (libtool)[arguments]: Use /bin/sh instead
> of /bin/bash in 'pre-check' phase. Fix typo in comment.

Makes sense.

Could you push them to ‘core-updates’?

Thank you Leo & ng0!

Ludo’.

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

* Re: [PATCH 1/2] gnu: libtool: Use 'modify-phases'.
  2017-01-05 10:36     ` Ludovic Courtès
@ 2017-01-05 10:55       ` ng0
  2017-01-05 15:43       ` Leo Famulari
  1 sibling, 0 replies; 12+ messages in thread
From: ng0 @ 2017-01-05 10:55 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès <ludo@gnu.org> writes:

> Leo Famulari <leo@famulari.name> skribis:
>
>> On Sun, Jan 01, 2017 at 03:24:27PM +0000, ng0 wrote:
>>> * gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
>>> [arguments]: Use 'modify-phases'.
>>
>>> +                     ("help2man" ,help2man) ;because we modify ltmain.sh
>>
>> This should go in the other patch, right?
>>
>> I attached a revised patch series with that change, and another bug fix.
>>
>> From 7f0fce3f71be7da461de89fb5f6f47289c6498b6 Mon Sep 17 00:00:00 2001
>> From: ng0 <ng0@libertad.pw>
>> Date: Sun, 1 Jan 2017 15:24:27 +0000
>> Subject: [PATCH 1/3] gnu: libtool: Use 'modify-phases'.
>>
>> * gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
>> [arguments]: Use 'modify-phases'.
>>
>> Signed-off-by: Leo Famulari <leo@famulari.name>
>
> [...]
>
>> +       (modify-phases %standard-phases
>> +         (add-before 'check 'pre-check
>> +                     (lambda* (#:key inputs #:allow-other-keys)
>
> Could you align “(” below the ‘d’ of ‘add-before’?

Sorry.
I wonder what happened here, this happens with all new files I
have. Seems like at some point the emacs version I have started
ignoring the .emacs.d/scheme-indent-function.el I have...

>> From fc60e04d85ab171538333fe5aa47c2e6849b02e3 Mon Sep 17 00:00:00 2001
>> From: ng0 <ng0@libertad.pw>
>> Date: Sun, 1 Jan 2017 15:24:28 +0000
>> Subject: [PATCH 2/3] gnu: libtool: Restore ltmain.sh shebang.
>>
>> This fixes <http://bugs.gnu.org/25304>
>>
>> * gnu/packages/autotools.scm (libtool)[arguments]: Add new phase
>> 'restore-ltmain-shebang'.
>> [native-inputs]: Add help2man.
>>
>> Signed-off-by: Leo Famulari <leo@famulari.name>
>
> [...]
>
>> +         (add-after 'patch-source-shebangs 'restore-ltmain-shebang
>> +                    (lambda* (#:key inputs #:allow-other-keys)
>
> Likewise.
>
>> +                      (substitute* "build-aux/ltmain.in"
>> +                        (((string-append (assoc-ref inputs "bash") "/bin/sh"))
>> +                         "/bin/sh")))))))
>
> We should use literal strings for patterns, like:
>
>   (substitute* …
>     (("^#!.*/bin/sh$") …))
>
>> From 809120b991603b8c557be7481be2bbae29bd8a7f Mon Sep 17 00:00:00 2001
>> From: Leo Famulari <leo@famulari.name>
>> Date: Wed, 4 Jan 2017 19:44:27 -0500
>> Subject: [PATCH 3/3] gnu: libtool: Don't replace 'sh' reference with 'bash'.
>>
>> Bash behaves differently based on how it is invoked (see Invocation in bash(1)).
>>
>> * gnu/packages/autotools.scm (libtool)[arguments]: Use /bin/sh instead
>> of /bin/bash in 'pre-check' phase. Fix typo in comment.
>
> Makes sense.
>
> Could you push them to ‘core-updates’?
>
> Thank you Leo & ng0!
>
> Ludo’.
>

-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org

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

* Re: [PATCH 1/2] gnu: libtool: Use 'modify-phases'.
  2017-01-05  1:09   ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' Leo Famulari
  2017-01-05 10:04     ` ng0
  2017-01-05 10:36     ` Ludovic Courtès
@ 2017-01-05 13:50     ` Marius Bakke
  2017-01-05 15:46       ` Leo Famulari
  2 siblings, 1 reply; 12+ messages in thread
From: Marius Bakke @ 2017-01-05 13:50 UTC (permalink / raw)
  To: Leo Famulari, ng0; +Cc: guix-devel

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

Leo Famulari <leo@famulari.name> writes:

> On Sun, Jan 01, 2017 at 03:24:27PM +0000, ng0 wrote:
>> * gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
>> [arguments]: Use 'modify-phases'.
>
>> +                     ("help2man" ,help2man) ;because we modify ltmain.sh
>
> This should go in the other patch, right?
>
> I attached a revised patch series with that change, and another bug fix.
> From 7f0fce3f71be7da461de89fb5f6f47289c6498b6 Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@libertad.pw>
> Date: Sun, 1 Jan 2017 15:24:27 +0000
> Subject: [PATCH 1/3] gnu: libtool: Use 'modify-phases'.
>
> * gnu/packages/autotools.scm (libtool): Use 'modify-phases'.
> [arguments]: Use 'modify-phases'.
>
> Signed-off-by: Leo Famulari <leo@famulari.name>
> ---
>  gnu/packages/autotools.scm | 30 ++++++++++++++++--------------
>  1 file changed, 16 insertions(+), 14 deletions(-)
>
> diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
> index 72492e70e..64a1e68bf 100644
> --- a/gnu/packages/autotools.scm
> +++ b/gnu/packages/autotools.scm
> @@ -5,6 +5,7 @@
>  ;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
>  ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
>  ;;; Copyright © 2016 David Thompson <davet@gnu.org>
> +;;; Copyright © 2017 ng0 <ng0@libertad.pw>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -313,21 +314,22 @@ Makefile, simplifying the entire process for the developer.")
>                                        (or (%current-target-system)
>                                            (%current-system))))
>  
> -       #:phases (alist-cons-before
> -                 'check 'pre-check
> -                 (lambda* (#:key inputs #:allow-other-keys)
> -                   ;; Run the test suite in parallel, if possible.
> -                   (setenv "TESTSUITEFLAGS"
> -                           (string-append
> -                            "-j"
> -                            (number->string (parallel-job-count))))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-before 'check 'pre-check
> +                     (lambda* (#:key inputs #:allow-other-keys)
> +                       ;; Run the test suite in parallel, if possible.
> +                       (setenv "TESTSUITEFLAGS"
> +                               (string-append
> +                                "-j"
> +                                (number->string (parallel-job-count))))
> +
> +                       ;; Path references to /bin/sh.
> +                       (let ((bash (assoc-ref inputs "bash")))
> +                         (substitute* "tests/testsuite"
> +                           (("/bin/sh")
> +                            (string-append bash "/bin/bash")))))))))

There was a discussion about making "substitute*" return #t if one or
more substitutions were done, is that implemented yet? If not, please
make sure phases end on a truthy value :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* Re: [PATCH 1/2] gnu: libtool: Use 'modify-phases'.
  2017-01-05 10:36     ` Ludovic Courtès
  2017-01-05 10:55       ` ng0
@ 2017-01-05 15:43       ` Leo Famulari
  1 sibling, 0 replies; 12+ messages in thread
From: Leo Famulari @ 2017-01-05 15:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

On Thu, Jan 05, 2017 at 11:36:55AM +0100, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
> > On Sun, Jan 01, 2017 at 03:24:27PM +0000, ng0 wrote:

> > +       (modify-phases %standard-phases
> > +         (add-before 'check 'pre-check
> > +                     (lambda* (#:key inputs #:allow-other-keys)
> 
> Could you align “(” below the ‘d’ of ‘add-before’?

Done.

> > +         (add-after 'patch-source-shebangs 'restore-ltmain-shebang
> > +                    (lambda* (#:key inputs #:allow-other-keys)
> 
> Likewise.

Done.

> > +                      (substitute* "build-aux/ltmain.in"
> > +                        (((string-append (assoc-ref inputs "bash") "/bin/sh"))
> > +                         "/bin/sh")))))))
> 
> We should use literal strings for patterns, like:
> 
>   (substitute* …
>     (("^#!.*/bin/sh$") …))

Done.

> > From 809120b991603b8c557be7481be2bbae29bd8a7f Mon Sep 17 00:00:00 2001
> > From: Leo Famulari <leo@famulari.name>
> > Date: Wed, 4 Jan 2017 19:44:27 -0500
> > Subject: [PATCH 3/3] gnu: libtool: Don't replace 'sh' reference with 'bash'.
> >
> > Bash behaves differently based on how it is invoked (see Invocation in bash(1)).
> >
> > * gnu/packages/autotools.scm (libtool)[arguments]: Use /bin/sh instead
> > of /bin/bash in 'pre-check' phase. Fix typo in comment.
> 
> Makes sense.

More are coming!

> Could you push them to ‘core-updates’?

Done!

> Thank you Leo & ng0!

Thanks ng0!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 1/2] gnu: libtool: Use 'modify-phases'.
  2017-01-05 13:50     ` Marius Bakke
@ 2017-01-05 15:46       ` Leo Famulari
  0 siblings, 0 replies; 12+ messages in thread
From: Leo Famulari @ 2017-01-05 15:46 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

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

On Thu, Jan 05, 2017 at 02:50:05PM +0100, Marius Bakke wrote:
> There was a discussion about making "substitute*" return #t if one or
> more substitutions were done, is that implemented yet? If not, please
> make sure phases end on a truthy value :-)

Done!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-01-05 15:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-01 14:45 Fix bug #25304 (restore libtool ltmain.sh shebang) ng0
2017-01-01 14:45 ` [PATCH] gnu: libtool: Restore ltmain.sh shebang ng0
2017-01-01 14:50   ` Ricardo Wurmus
2017-01-01 15:24 ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' ng0
2017-01-01 15:24   ` [PATCH 2/2] gnu: libtool: Restore ltmain.sh shebang ng0
2017-01-05  1:09   ` [PATCH 1/2] gnu: libtool: Use 'modify-phases' Leo Famulari
2017-01-05 10:04     ` ng0
2017-01-05 10:36     ` Ludovic Courtès
2017-01-05 10:55       ` ng0
2017-01-05 15:43       ` Leo Famulari
2017-01-05 13:50     ` Marius Bakke
2017-01-05 15:46       ` Leo Famulari

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).