all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#44835: gnu/ci.go: Embeds build path, breaking reproducible builds
       [not found] <87r1ojgzdh.fsf@yucca>
@ 2020-11-26 21:39 ` Ludovic Courtès
  2020-12-01  9:41   ` Mathieu Othacehe
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2020-11-26 21:39 UTC (permalink / raw)
  To: Vagrant Cascadian; +Cc: Mathieu Othacehe, 44835

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

Hi!

Vagrant Cascadian <vagrant@reproducible-builds.org> skribis:

> My *wild* guess is it maybe has something to do with the use of
> canonicalize-path:
>
>   (define (find-current-checkout arguments)
>   "Find the first checkout of ARGUMENTS that provided the current file.
> Return #f if no such checkout is found."
>   (let ((current-root
>          (canonicalize-path
>           (string-append (dirname (current-filename)) "/.."))))
>     (find (lambda (argument)
>             (and=> (assq-ref argument 'file-name)
>                    (lambda (name)
>                      (string=? name current-root)))) arguments)))

‘canonicalize-path’ is called at run time, so that’s fine.  However,
‘current-filename’ is a macro that captures the source file name at
build time, so it’s the likely culprit here.

I was going to go with something like:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 520 bytes --]

diff --git a/gnu/ci.scm b/gnu/ci.scm
index 5548d9560e..0bacfbe025 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -488,7 +488,8 @@ valid."
 Return #f if no such checkout is found."
   (let ((current-root
          (canonicalize-path
-          (string-append (dirname (current-filename)) "/.."))))
+          (string-append (dirname (search-path %load-path "gnu/ci.scm"))
+                         "/.."))))
     (find (lambda (argument)
             (and=> (assq-ref argument 'file-name)
                    (lambda (name)

[-- Attachment #3: Type: text/plain, Size: 266 bytes --]


… but I don’t think we can assume that the checkout is in the
‘%load-path’ when this code is executed.  WDYT, Mathieu?

Looking at f71b0a0012d46bd30ead1a14ed58fd59647415e2, which introduced
this, there might be other options too.

Thanks,
Ludo’.

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

* bug#44835: gnu/ci.go: Embeds build path, breaking reproducible builds
  2020-11-26 21:39 ` bug#44835: gnu/ci.go: Embeds build path, breaking reproducible builds Ludovic Courtès
@ 2020-12-01  9:41   ` Mathieu Othacehe
  2020-12-03 13:23     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Othacehe @ 2020-12-01  9:41 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 44835, Vagrant Cascadian


Hey,

> … but I don’t think we can assume that the checkout is in the
> ‘%load-path’ when this code is executed.  WDYT, Mathieu?

Cuirass happens to add checkouts to the %load-path just before loading
this file.

I tested your path, it works fine. I think it is acceptable as this (gnu
ci) interface needs a big rework anyway.

I can apply your patch if it's ok for you.

Thanks,

Mathieu




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

* bug#44835: gnu/ci.go: Embeds build path, breaking reproducible builds
  2020-12-01  9:41   ` Mathieu Othacehe
@ 2020-12-03 13:23     ` Ludovic Courtès
  2024-03-07 21:46       ` Vagrant Cascadian
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2020-12-03 13:23 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 44835, Vagrant Cascadian

Hi,

Mathieu Othacehe <othacehe@gnu.org> skribis:

>> … but I don’t think we can assume that the checkout is in the
>> ‘%load-path’ when this code is executed.  WDYT, Mathieu?
>
> Cuirass happens to add checkouts to the %load-path just before loading
> this file.

Is that systematic?  Isn’t it only when ‘load_path_inputs’ is non-empty?

> I tested your path, it works fine. I think it is acceptable as this (gnu
> ci) interface needs a big rework anyway.
>
> I can apply your patch if it's ok for you.

Sure if you’re confident you can go ahead.  :-)

Thanks,
Ludo’.




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

* bug#44835: gnu/ci.go: Embeds build path, breaking reproducible builds
  2020-12-03 13:23     ` Ludovic Courtès
@ 2024-03-07 21:46       ` Vagrant Cascadian
  0 siblings, 0 replies; 4+ messages in thread
From: Vagrant Cascadian @ 2024-03-07 21:46 UTC (permalink / raw)
  To: Ludovic Courtès, Mathieu Othacehe; +Cc: 44835-done

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

On 2020-12-03, Ludovic Courtès wrote:
> Mathieu Othacehe <othacehe@gnu.org> skribis:
>
>>> … but I don’t think we can assume that the checkout is in the
>>> ‘%load-path’ when this code is executed.  WDYT, Mathieu?
>>
>> Cuirass happens to add checkouts to the %load-path just before loading
>> this file.
>
> Is that systematic?  Isn’t it only when ‘load_path_inputs’ is non-empty?
>
>> I tested your path, it works fine. I think it is acceptable as this (gnu
>> ci) interface needs a big rework anyway.
>>
>> I can apply your patch if it's ok for you.
>
> Sure if you’re confident you can go ahead.  :-)

This looks to have been fixed some time ago in:

  76bea3f8bcd951ded88dfb7f8cad5bc3e5a1701f ci: Remove hydra support.

live well,
  vagrant

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

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

end of thread, other threads:[~2024-03-07 21:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87r1ojgzdh.fsf@yucca>
2020-11-26 21:39 ` bug#44835: gnu/ci.go: Embeds build path, breaking reproducible builds Ludovic Courtès
2020-12-01  9:41   ` Mathieu Othacehe
2020-12-03 13:23     ` Ludovic Courtès
2024-03-07 21:46       ` Vagrant Cascadian

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.