[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#62181: [PATCH 1/2] gnu: gnulib: Reset the shebangs.
From: |
Ludovic Courtès |
Subject: |
bug#62181: [PATCH 1/2] gnu: gnulib: Reset the shebangs. |
Date: |
Thu, 16 Mar 2023 11:43:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Vivien Kraus <vivien@planete-kraus.eu> skribis:
> * 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.
[...]
> + (add-after 'install 'reset-shebangs
s/reset/restore/ ?
> + (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"))))))))
How about:
(substitute* (find-files …)
(("^#! ?(.*)/bin/([a-zA-Z0-9-]+)" _ prefix program)
(string-append "#!/bin/" program "\n")))
?
Ludo’.
- bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash, Ludovic Courtès, 2023/03/14
- bug#62181: [PATCH 0/2] Re: bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash, Vivien Kraus, 2023/03/14
- bug#62181: [PATCH 0/2] Re: bug#62181: Gnulib package keeps references to clisp, Python, Perl, and Bash, Ludovic Courtès, 2023/03/16
- bug#62181: [PATCH v2 0/2] Drop references to other store items in /src, with better style, Vivien Kraus, 2023/03/16