GNU bug report logs - #63149
[PATCH] gnu: criu: Fix build

Previous Next

Package: guix-patches;

Reported by: Brian Cully <bjc <at> spork.org>

Date: Fri, 28 Apr 2023 14:06:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63149 in the body.
You can then email your comments to 63149 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#63149; Package guix-patches. (Fri, 28 Apr 2023 14:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brian Cully <bjc <at> spork.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 28 Apr 2023 14:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brian Cully <bjc <at> spork.org>
To: guix-patches <at> gnu.org
Cc: Brian Cully <bjc <at> spork.org>
Subject: [PATCH] gnu: criu: Fix build
Date: Fri, 28 Apr 2023 10:04:25 -0400
Use python-toolchain explicitly in order to pull in our patched ZipFile
creation which ignores timestamp.

* gnu/packages/virtualization.scm (criu) [native-inputs]: Add python-toolchain.
---
 gnu/packages/virtualization.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 4a0d6b0096..d9fc8108dc 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1748,7 +1748,6 @@ (define-public criu
                (for-each delete-file (find-files out "\\.a$"))))))))
     (inputs
      `(("protobuf" ,protobuf)
-       ("python" ,python)
        ("python-protobuf" ,python-protobuf)
        ("iproute" ,iproute)
        ("libaio" ,libaio)
@@ -1763,7 +1762,8 @@ (define-public criu
            asciidoc
            xmlto
            docbook-xml
-           docbook-xsl))
+           docbook-xsl
+           python-toolchain))
     (propagated-inputs
      ;; included by 'rpc.pb-c.h'
      (list protobuf-c))
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#63149; Package guix-patches. (Fri, 28 Apr 2023 14:07:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brian Cully <bjc <at> spork.org>
To: Brian Cully <bjc <at> spork.org>
Cc: guix-patches <at> gnu.org
Subject: Re: [PATCH] gnu: criu: Fix build
Date: Fri, 28 Apr 2023 10:05:35 -0400
Note that the complete fix for criu requires patch #63044, or 
something similar to fix the ZipFile issue.

-bjc




Information forwarded to guix-patches <at> gnu.org:
bug#63149; Package guix-patches. (Fri, 12 May 2023 22:37:03 GMT) Full text and rfc822 format available.

Message #11 received at 63149 <at> debbugs.gnu.org (full text, mbox):

From: Brian Cully <bjc <at> spork.org>
To: 63149 <at> debbugs.gnu.org
Cc: Brian Cully <bjc <at> spork.org>
Subject: [PATCH v2] gnu: criu: Fix build
Date: Fri, 12 May 2023 18:36:29 -0400
Ensure all files being built are dated no earlier than 1980 by copying in a
modified (@@ (guix build python-build-system) ensure-no-mtimes-pre-1980) which
is symlink-aware. This copy should be removed when the original procedure is
modified to avoid calling UTIME on symlinks.

* gnu/packages/virtualization.scm (criu) [ensure-no-mtimes-pre-1980]: new
phase.
* gnu/packages/virtualization.scm (criu) [inputs]: Remove python.
* gnu/packages/virtualization.scm (criu) [native-inputs]: Add
python-toolchain.
---
 gnu/packages/virtualization.scm | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 4a0d6b0096..c88fd31146 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1697,6 +1697,8 @@ (define-public criu
              (string-append "XMLTO="
                             (search-input-file %build-inputs
                                                "/bin/xmlto")))
+       #:modules ((ice-9 ftw)
+                  ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)            ; no configure script
@@ -1719,6 +1721,17 @@ (define-public criu
              (substitute* "criu/include/plugin.h"
                (("/var") (string-append (assoc-ref outputs "out"))))
              ))
+         ;; TODO: use
+         ;; (@@ (guix build python-build-system) ensure-no-mtimes-pre-1980)
+         ;; when it no longer throws due to trying to call UTIME on symlinks.
+         (add-after 'unpack 'ensure-no-mtimes-pre-1980
+           (lambda _
+             (let ((early-1980 315619200))  ; 1980-01-02 UTC
+               (ftw "." (lambda (file stat flag)
+                          (unless (or (<= early-1980 (stat:mtime stat))
+                                      (eq? (stat:type stat) 'symlink))
+                            (utime file early-1980 early-1980))
+                          #t)))))
          (add-before 'build 'fix-symlink
            (lambda* (#:key inputs #:allow-other-keys)
              ;; The file 'images/google/protobuf/descriptor.proto' points to
@@ -1748,7 +1761,6 @@ (define-public criu
                (for-each delete-file (find-files out "\\.a$"))))))))
     (inputs
      `(("protobuf" ,protobuf)
-       ("python" ,python)
        ("python-protobuf" ,python-protobuf)
        ("iproute" ,iproute)
        ("libaio" ,libaio)
@@ -1763,7 +1775,8 @@ (define-public criu
            asciidoc
            xmlto
            docbook-xml
-           docbook-xsl))
+           docbook-xsl
+           python-toolchain))
     (propagated-inputs
      ;; included by 'rpc.pb-c.h'
      (list protobuf-c))

base-commit: b363fab46f5af42b3f653e2fee1834477bd5aacd
prerequisite-patch-id: 8a03c5e8bcd4c526b93c558d550725887f932e41
prerequisite-patch-id: 89400c29b4c30dfbe8492aff1751ca583397b4f0
prerequisite-patch-id: a1963f772e753239b80e6a7b0d9f55e0ab4d662b
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#63149; Package guix-patches. (Fri, 12 May 2023 23:01:02 GMT) Full text and rfc822 format available.

Message #14 received at 63149 <at> debbugs.gnu.org (full text, mbox):

From: Brian Cully <bjc <at> spork.org>
To: 63149 <at> debbugs.gnu.org
Subject: Re: bug#63149: [PATCH] gnu: criu: Fix build
Date: Fri, 12 May 2023 19:00:36 -0400
I've decided to just patch the mtime conversion directly into criu,
rather than trying to factor it out. This is mainly because the original
version of ‘ensure-no-mtimes-pre-1980’ throws an error when it attempts
to change timestamps of symlinks. Ideally, that will be fixed someday,
but that will cause huge downstream changes.

In the mean-time, we can use this, and delete it after fixing
‘ensure-no-mtimes-pre-1980’.

-bjc




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 19 May 2023 14:03:02 GMT) Full text and rfc822 format available.

Notification sent to Brian Cully <bjc <at> spork.org>:
bug acknowledged by developer. (Fri, 19 May 2023 14:03:02 GMT) Full text and rfc822 format available.

Message #19 received at 63149-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Brian Cully <bjc <at> spork.org>
Cc: 63149-done <at> debbugs.gnu.org
Subject: Re: bug#63149: [PATCH] gnu: criu: Fix build
Date: Fri, 19 May 2023 16:02:03 +0200
Hi,

Brian Cully <bjc <at> spork.org> skribis:

> Ensure all files being built are dated no earlier than 1980 by copying in a
> modified (@@ (guix build python-build-system) ensure-no-mtimes-pre-1980) which
> is symlink-aware. This copy should be removed when the original procedure is
> modified to avoid calling UTIME on symlinks.
>
> * gnu/packages/virtualization.scm (criu) [ensure-no-mtimes-pre-1980]: new
> phase.
> * gnu/packages/virtualization.scm (criu) [inputs]: Remove python.
> * gnu/packages/virtualization.scm (criu) [native-inputs]: Add
> python-toolchain.

Tweaked the commit log and applied.

Thank you, and apologies for the delay!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 17 Jun 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.