[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix unreproducible “guix pack -f docker” (hard link)
From: |
zimoun |
Subject: |
[PATCH] Fix unreproducible “guix pack -f docker” (hard link) |
Date: |
Mon, 08 Feb 2021 19:44:15 +0100 |
Hi Ludo,
On Sat, 06 Feb 2021 at 22:46, Ludovic Courtès <ludo@gnu.org> wrote:
> Having looked at the tar manual (info "(tar) hard links"), it seems
> clear that this is the default behavior and that we have to pass
> ‘--hard-dereference’ to avoid it.
Attached a patch that fixes the issue, I guess. Well, I am not sure to
understand all correctly, yet. :-)
Now the 2 images have the same checksum on my 2 machines.
WDYT?
Cheers,
simon
>From 70e113ecccc831d2a111f7c8598157d41fe0de86 Mon Sep 17 00:00:00 2001
From: zimoun <zimon.toutoune@gmail.com>
Date: Mon, 8 Feb 2021 19:37:25 +0100
Subject: [PATCH] guix: docker: Fix undeterministic hard link.
* guix/docker.scm (%tar-determinism-options): Add '--hard-dereference'.
---
guix/docker.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/guix/docker.scm b/guix/docker.scm
index 97ac6d982b..39e85b7fc2 100644
--- a/guix/docker.scm
+++ b/guix/docker.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -112,7 +113,7 @@ Return a version of TAG that follows these rules."
(define %tar-determinism-options
;; GNU tar options to produce archives deterministically.
- '("--sort=name" "--mtime=@1"
+ '("--sort=name" "--mtime=@1" "--hard-dereference"
"--owner=root:0" "--group=root:0"))
(define directive-file
base-commit: 4cd8bab7d4b345c5538b8d039d84a957df7a235f
--
2.29.2
- Unreproducible “guix pack -f docker” because config.scm-builder, zimoun, 2021/02/01
- Re: Unreproducible “guix pack -f docker” because config.scm-builder, zimoun, 2021/02/02
- Re: Unreproducible “guix pack -f docker” because config.scm-builder, Ludovic Courtès, 2021/02/02
- Re: Unreproducible “guix pack -f docker” because config.scm-builder, zimoun, 2021/02/02
- Re: Unreproducible “guix pack -f docker” because config.scm-builder, Ludovic Courtès, 2021/02/05
- Re: Unreproducible “guix pack -f docker” because config.scm-builder, zimoun, 2021/02/05
- Re: Unreproducible “guix pack -f docker” because config.scm-builder, Ludovic Courtès, 2021/02/06
- [PATCH] Fix unreproducible “guix pack -f docker” (hard link),
zimoun <=
- Message not available
- Re: Unreproducible “guix pack -f docker” because config.scm-builder, Ludovic Courtès, 2021/02/09
- Re: Unreproducible “guix pack -f docker” because config.scm-builder, zimoun, 2021/02/09