* [PATCH 0/3] Fix bash:include and build recutils' Bash builtin.
@ 2015-10-18 19:40 Leo Famulari
2015-10-18 19:40 ` [PATCH 1/3] gnu: bash: Install more headers in "include" output Leo Famulari
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Leo Famulari @ 2015-10-18 19:40 UTC (permalink / raw)
To: guix-devel
The Bash patches update the install-headers-phase to make all the Bash
headers available in bash:include. Basically, I copied the relevant
portions of the Debian rules file for the bash-builtins package [1].
There is still some work that could be done — e.g. there are examples of
loadable Bash builtins that could go in the docs.
The regex should be selecting any file whose name ends in .h in the
"include/" directory of the source tarball (someone better double-check
it though — I'm no regex expert!). I separated it from the existing
file-copying routines because the contents of "include/" should go in
the top-level of the output's "include/bash" directory. This is
different from the files copied from other tarball directories — they
get copied along with their folders. I also altered the code to use
'install-file' instead of 'mkdir-p' and 'copy-file', reducing the amount
of boilerplate code.
The recutils patch tells recutils where to find the Bash headers so that
the recutils' Bash builtin 'readrec' can be built.
[1]
line 254 onwards:
https://sources.debian.net/src/bash/4.3-11/debian/rules/
Leo Famulari (3):
gnu: bash: Install more headers in "include" output.
gnu: bash: Use 'install-file' instead of 'mkdir-p' and 'copy-file'.
gnu: recutils: Build the Bash builtin, readrec.
gnu/packages/bash.scm | 10 ++++++----
gnu/packages/databases.scm | 12 ++++++++----
2 files changed, 14 insertions(+), 8 deletions(-)
--
2.6.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] gnu: bash: Install more headers in "include" output.
2015-10-18 19:40 [PATCH 0/3] Fix bash:include and build recutils' Bash builtin Leo Famulari
@ 2015-10-18 19:40 ` Leo Famulari
2015-10-21 19:22 ` Ludovic Courtès
2015-10-18 19:40 ` [PATCH 2/3] gnu: bash: Use 'install-file' instead of 'mkdir-p' and 'copy-file' Leo Famulari
2015-10-18 19:40 ` [PATCH 3/3] gnu: recutils: Build the Bash builtin, readrec Leo Famulari
2 siblings, 1 reply; 6+ messages in thread
From: Leo Famulari @ 2015-10-18 19:40 UTC (permalink / raw)
To: guix-devel
* gnu/packages/bash.com (bash): Include contents of include directory in
"include" output.
---
gnu/packages/bash.scm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 180c64e..e1ddd7c 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -143,9 +144,16 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
;; guile-bash expect.
(let ((include (string-append (assoc-ref outputs "include")
"/include/bash"))
+ (includes "^\\./include/[^/]+\\.h$")
(headers "^\\./(builtins/|lib/glob/|lib/tilde/|)[^/]+\\.h$"))
(mkdir-p include)
(for-each (lambda (file)
+ (when ((@ (ice-9 regex) string-match) includes file)
+ (let ((directory (string-append include)))
+ (mkdir-p directory)
+ (copy-file file
+ (string-append directory "/"
+ (basename file)))))
(when ((@ (ice-9 regex) string-match) headers file)
(let ((directory (string-append include "/"
(dirname file))))
@@ -154,6 +162,7 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
(string-append directory "/"
(basename file))))))
(find-files "." "\\.h$"))
+ (delete-file (string-append include "/" "y.tab.h"))
#t)))
(version "4.3"))
(package
--
2.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] gnu: bash: Use 'install-file' instead of 'mkdir-p' and 'copy-file'.
2015-10-18 19:40 [PATCH 0/3] Fix bash:include and build recutils' Bash builtin Leo Famulari
2015-10-18 19:40 ` [PATCH 1/3] gnu: bash: Install more headers in "include" output Leo Famulari
@ 2015-10-18 19:40 ` Leo Famulari
2015-10-18 19:40 ` [PATCH 3/3] gnu: recutils: Build the Bash builtin, readrec Leo Famulari
2 siblings, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2015-10-18 19:40 UTC (permalink / raw)
To: guix-devel
* gnu/packages/bash.scm (bash): Use 'install-file' instead of 'mkdir-p'
and 'copy-file'.
---
gnu/packages/bash.scm | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index e1ddd7c..c65f3c8 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -149,18 +149,11 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
(mkdir-p include)
(for-each (lambda (file)
(when ((@ (ice-9 regex) string-match) includes file)
- (let ((directory (string-append include)))
- (mkdir-p directory)
- (copy-file file
- (string-append directory "/"
- (basename file)))))
+ (install-file file include))
(when ((@ (ice-9 regex) string-match) headers file)
(let ((directory (string-append include "/"
(dirname file))))
- (mkdir-p directory)
- (copy-file file
- (string-append directory "/"
- (basename file))))))
+ (install-file file directory))))
(find-files "." "\\.h$"))
(delete-file (string-append include "/" "y.tab.h"))
#t)))
--
2.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] gnu: recutils: Build the Bash builtin, readrec.
2015-10-18 19:40 [PATCH 0/3] Fix bash:include and build recutils' Bash builtin Leo Famulari
2015-10-18 19:40 ` [PATCH 1/3] gnu: bash: Install more headers in "include" output Leo Famulari
2015-10-18 19:40 ` [PATCH 2/3] gnu: bash: Use 'install-file' instead of 'mkdir-p' and 'copy-file' Leo Famulari
@ 2015-10-18 19:40 ` Leo Famulari
2 siblings, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2015-10-18 19:40 UTC (permalink / raw)
To: guix-devel
* gnu/packages/databases.scm (recutils)[native-inputs]: Add bash:include.
[arguments]: Add configure-flag with path to headers provided by
bash:include.
---
gnu/packages/databases.scm | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index a174241..7e669d6 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -24,6 +25,7 @@
(define-module (gnu packages databases)
#:use-module (gnu packages)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages perl)
#:use-module (gnu packages language)
#:use-module (gnu packages linux)
@@ -286,16 +288,18 @@ pictures, sounds, or video.")
;; Running tests in parallel leads to test failures and crashes in
;; torture/utils.
- (arguments '(#:parallel-tests? #f))
+ (arguments '(#:parallel-tests? #f
+ #:configure-flags
+ (list (string-append "--with-bash-headers="
+ (assoc-ref %build-inputs "bash:include")
+ "/include/bash"))))
(native-inputs `(("emacs" ,emacs-no-x)
("bc" ,bc)
+ ("bash:include" ,bash "include")
("libuuid", util-linux)))
;; TODO: Add more optional inputs.
- ;; FIXME: Our Bash doesn't have development headers (need for the 'readrec'
- ;; built-in command), but it's not clear how to get them installed.
- ;; See <https://lists.gnu.org/archive/html/bug-bash/2014-03/msg00125.html>.
(inputs `(("curl" ,curl)
("libgcrypt" ,libgcrypt)
("check" ,check)))
--
2.6.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] gnu: bash: Install more headers in "include" output.
2015-10-18 19:40 ` [PATCH 1/3] gnu: bash: Install more headers in "include" output Leo Famulari
@ 2015-10-21 19:22 ` Ludovic Courtès
2015-10-22 22:56 ` Leo Famulari
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2015-10-21 19:22 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
Leo Famulari <leo@famulari.name> skribis:
> * gnu/packages/bash.com (bash): Include contents of include directory in
> "include" output.
[...]
> + (when ((@ (ice-9 regex) string-match) includes file)
I added a #:modules to avoid the ‘@’ here.
Pushed to ‘core-updates’ along with the two subsequent patches!
For the record, I tested the Bash build with:
./pre-inst-env guix build -e \
'(@@ (gnu packages commencement) static-bash-for-glibc)'
That way I was just building the minimum needed to test the change. I
did not test the recutils change though.
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] gnu: bash: Install more headers in "include" output.
2015-10-21 19:22 ` Ludovic Courtès
@ 2015-10-22 22:56 ` Leo Famulari
0 siblings, 0 replies; 6+ messages in thread
From: Leo Famulari @ 2015-10-22 22:56 UTC (permalink / raw)
To: guix-devel
Thanks!
I actually asked about the '@' on #guile and their response was
basically "if you have to ask, don't use it." But it was already in
use... ;)
On Wed, Oct 21, 2015, at 15:22, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
>
> > * gnu/packages/bash.com (bash): Include contents of include directory in
> > "include" output.
>
> [...]
>
> > + (when ((@ (ice-9 regex) string-match) includes file)
>
> I added a #:modules to avoid the ‘@’ here.
>
> Pushed to ‘core-updates’ along with the two subsequent patches!
>
> For the record, I tested the Bash build with:
>
> ./pre-inst-env guix build -e \
> '(@@ (gnu packages commencement) static-bash-for-glibc)'
>
> That way I was just building the minimum needed to test the change. I
> did not test the recutils change though.
>
> Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-22 22:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-18 19:40 [PATCH 0/3] Fix bash:include and build recutils' Bash builtin Leo Famulari
2015-10-18 19:40 ` [PATCH 1/3] gnu: bash: Install more headers in "include" output Leo Famulari
2015-10-21 19:22 ` Ludovic Courtès
2015-10-22 22:56 ` Leo Famulari
2015-10-18 19:40 ` [PATCH 2/3] gnu: bash: Use 'install-file' instead of 'mkdir-p' and 'copy-file' Leo Famulari
2015-10-18 19:40 ` [PATCH 3/3] gnu: recutils: Build the Bash builtin, readrec Leo Famulari
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.