* [bug#37654] [PATCH] gnu-build-system: Don't try executing directories in bootstrap phase.
@ 2019-10-08 3:39 Brendan Tildesley
2020-01-30 12:41 ` Marius Bakke
2020-02-16 15:47 ` bug#37654: " Marius Bakke
0 siblings, 2 replies; 3+ messages in thread
From: Brendan Tildesley @ 2019-10-08 3:39 UTC (permalink / raw)
To: 37654
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
I just made this after discovering a source repo with a bootstrap
directory. Naturally it results in just about everything being rebuilt,
so it would a long time to fully test it, and I'm no experienced schemer
so I can't be sure this is the right way to add in this change. Feel
free to rewrite it a better way.
[-- Attachment #2: 0001-gnu-build-system-Don-t-try-executing-directories-in-.patch --]
[-- Type: text/x-patch, Size: 1699 bytes --]
From 3a602cccbd8711f40f6b981e5616289a5fdd0b56 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Tue, 8 Oct 2019 02:55:03 +1100
Subject: [PATCH] gnu-build-system: Don't try executing directories in
bootstrap phase.
* guix/build/gnu-build-system.scm: (bootstrap): Change the file-exists?
procedure to one that excludes directories, so that we do not mistake it for a
script. For example if the source includes a bootstrap/ directory.
---
guix/build/gnu-build-system.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index e5f3197b0a..6b4e74721b 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -177,12 +177,16 @@ working directory."
\"autoreconf\". Otherwise do nothing."
;; Note: Run that right after 'unpack' so that the generated files are
;; visible when the 'patch-source-shebangs' phase runs.
- (if (not (file-exists? "configure"))
+ (define (script-exists? file)
+ (and (file-exists? file)
+ (not (file-is-directory? file))))
+
+ (if (not (script-exists? "configure"))
;; First try one of the BOOTSTRAP-SCRIPTS. If none exists, and it's
;; clearly an Autoconf-based project, run 'autoreconf'. Otherwise, do
;; nothing (perhaps the user removed or overrode the 'configure' phase.)
- (let ((script (find file-exists? bootstrap-scripts)))
+ (let ((script (find script-exists? bootstrap-scripts)))
;; GNU packages often invoke the 'git-version-gen' script from
;; 'configure.ac' so make sure it has a valid shebang.
(false-if-file-not-found
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#37654] [PATCH] gnu-build-system: Don't try executing directories in bootstrap phase.
2019-10-08 3:39 [bug#37654] [PATCH] gnu-build-system: Don't try executing directories in bootstrap phase Brendan Tildesley
@ 2020-01-30 12:41 ` Marius Bakke
2020-02-16 15:47 ` bug#37654: " Marius Bakke
1 sibling, 0 replies; 3+ messages in thread
From: Marius Bakke @ 2020-01-30 12:41 UTC (permalink / raw)
To: Brendan Tildesley, 37654
[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]
Hello Brendan, sorry for the sloooow response.
Brendan Tildesley <mail@brendan.scot> writes:
> I just made this after discovering a source repo with a bootstrap
> directory. Naturally it results in just about everything being rebuilt,
> so it would a long time to fully test it, and I'm no experienced schemer
> so I can't be sure this is the right way to add in this change. Feel
> free to rewrite it a better way.
Were you able to verify that it DTRT?
> From 3a602cccbd8711f40f6b981e5616289a5fdd0b56 Mon Sep 17 00:00:00 2001
> From: Brendan Tildesley <mail@brendan.scot>
> Date: Tue, 8 Oct 2019 02:55:03 +1100
> Subject: [PATCH] gnu-build-system: Don't try executing directories in
> bootstrap phase.
>
> * guix/build/gnu-build-system.scm: (bootstrap): Change the file-exists?
> procedure to one that excludes directories, so that we do not mistake it for a
> script. For example if the source includes a bootstrap/ directory.
The patch LGTM.
Will push it in a few days unless anyone protests!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#37654: [PATCH] gnu-build-system: Don't try executing directories in bootstrap phase.
2019-10-08 3:39 [bug#37654] [PATCH] gnu-build-system: Don't try executing directories in bootstrap phase Brendan Tildesley
2020-01-30 12:41 ` Marius Bakke
@ 2020-02-16 15:47 ` Marius Bakke
1 sibling, 0 replies; 3+ messages in thread
From: Marius Bakke @ 2020-02-16 15:47 UTC (permalink / raw)
To: Brendan Tildesley, 37654-done
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
Brendan Tildesley <mail@brendan.scot> writes:
> Subject: [PATCH] gnu-build-system: Don't try executing directories in
> bootstrap phase.
>
> * guix/build/gnu-build-system.scm: (bootstrap): Change the file-exists?
> procedure to one that excludes directories, so that we do not mistake it for a
> script. For example if the source includes a bootstrap/ directory.
Finally pushed in a21bd6d5c208111fbf96e9b402cc5ca872f95109, thanks!
I also added a copyright line for you, hope that was okay.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-16 15:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 3:39 [bug#37654] [PATCH] gnu-build-system: Don't try executing directories in bootstrap phase Brendan Tildesley
2020-01-30 12:41 ` Marius Bakke
2020-02-16 15:47 ` bug#37654: " Marius Bakke
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).