From: Vivien Kraus via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>, 62181@debbugs.gnu.org
Subject: bug#62181: [PATCH 1/2] gnu: gnulib: Reset the shebangs.
Date: Tue, 14 Mar 2023 09:58:34 +0100 [thread overview]
Message-ID: <e5ba9ddbc8797fe1de18e54edf26b3f588341e67.1678790200.git.vivien@planete-kraus.eu> (raw)
In-Reply-To: <cover.1678790200.git.vivien@planete-kraus.eu>
* gnu/packages/build-tools.scm (gnulib) [phase reset-shebangs]: After
installation, rewrite the /gnu/store shebangs in the distributed build-aux
files.
[inputs, native-inputs]: Add bash-minimal.
[phase let-autogen-execute-gnulib-tool]: Specify a shell to execute
gnulib-tool from autogen.sh.
---
gnu/packages/build-tools.scm | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 28ab77bbb4..f93a72f2f5 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -973,12 +973,32 @@ (define (find-ucd-files . names)
("NormalizationTest.txt" . "uninorm")
("auxiliary/GraphemeBreakTest.txt" . "unigbrk")
("auxiliary/WordBreakTest.txt" . "uniwbrk")))
- (delete-file "gen-uni-tables")))))))
- (inputs ;; Shebangs for some auxiliary build files.
- (list python perl clisp))
+ (delete-file "gen-uni-tables"))))
+ (add-after 'install 'reset-shebangs
+ (lambda _
+ (for-each
+ (lambda (file)
+ (false-if-exception
+ ;; Might fail on binary files, this is not a problem.
+ (substitute* file
+ ((#$(file-append (this-package-native-input "bash-minimal")
+ "/bin/sh"))
+ "/bin/sh")
+ ((#$(file-append (this-package-native-input "python")
+ "/bin/python3"))
+ "/usr/bin/env python3")
+ ((#$(file-append (this-package-native-input "perl")
+ "/bin/perl"))
+ "/usr/bin/perl")
+ ((#$(file-append (this-package-native-input "clisp")
+ "/bin/clisp"))
+ "/usr/bin/clisp"))))
+ (find-files (string-append #$output "/src/gnulib"))))))))
+ (inputs ;; Shebang for gnulib-tool
+ (list bash-minimal))
(native-inputs
(list
- python perl clisp
+ bash-minimal python perl clisp
;; Unicode data:
ucd-next
;; Programs for the tests:
--
2.39.2
next prev parent reply other threads:[~2023-03-14 10:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-14 8:34 bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash Ludovic Courtès
2023-03-14 10:36 ` bug#62181: [PATCH 0/2] " Vivien Kraus via Bug reports for GNU Guix
2023-03-14 8:58 ` Vivien Kraus via Bug reports for GNU Guix [this message]
2023-03-16 10:43 ` bug#62181: [PATCH 1/2] gnu: gnulib: Reset the shebangs Ludovic Courtès
2023-03-14 10:33 ` bug#62181: [PATCH 2/2] gnu: guile-gnutls: Do not expect gnulib shebangs to work Vivien Kraus via Bug reports for GNU Guix
2023-03-16 10:48 ` Ludovic Courtès
2023-03-16 10:56 ` Vivien Kraus via Bug reports for GNU Guix
2023-03-16 10:41 ` bug#62181: [PATCH 0/2] Re: bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash Ludovic Courtès
2023-03-16 10:54 ` Vivien Kraus via Bug reports for GNU Guix
2023-03-16 19:41 ` bug#62181: [PATCH v2 0/2] Drop references to other store items in /src, with better style Vivien Kraus via Bug reports for GNU Guix
2023-03-14 8:58 ` bug#62181: [PATCH v2 1/2] gnu: gnulib: Reset the shebangs Vivien Kraus via Bug reports for GNU Guix
2023-03-17 21:48 ` Ludovic Courtès
2023-03-18 9:06 ` Vivien Kraus via Bug reports for GNU Guix
2023-03-14 10:33 ` bug#62181: [PATCH v2 2/2] gnu: guile-gnutls: Do not expect gnulib shebangs to work Vivien Kraus via Bug reports for GNU Guix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5ba9ddbc8797fe1de18e54edf26b3f588341e67.1678790200.git.vivien@planete-kraus.eu \
--to=bug-guix@gnu.org \
--cc=62181@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=vivien@planete-kraus.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).