guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/08: gnu: criu: Change file mtimes to fix build.


From: guix-commits
Subject: 03/08: gnu: criu: Change file mtimes to fix build.
Date: Wed, 2 Aug 2023 06:38:40 -0400 (EDT)

lbraun pushed a commit to branch pyproject-toml
in repository guix.

commit a0d4c891e6cf3522c6769e82d888d906445363f5
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Sat May 13 15:31:22 2023 +0200

    gnu: criu: Change file mtimes to fix build.
    
    * gnu/packages/virtualization.scm (criu)[arguments]: Add
    python-build-system to #:modules and #:imported modules, add phase
    'ensure-no-mtimes-pre-1980.
---
 gnu/packages/virtualization.scm | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 9556fbc61e..04059fc73e 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -143,6 +143,7 @@
   #:use-module (guix git-download)
   #:use-module (guix gexp)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix modules)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
@@ -1750,8 +1751,12 @@ domains, their live performance and resource utilization 
statistics.")
              (string-append "XMLTO="
                             (search-input-file %build-inputs
                                                "/bin/xmlto")))
-       #:modules ((ice-9 ftw)
-                  ,@%gnu-build-system-modules)
+      #:modules ((guix build gnu-build-system)
+                  (guix build utils)
+                  ((guix build python-build-system)
+                   #:select (ensure-no-mtimes-pre-1980)))
+      #:imported-modules ,(append %gnu-build-system-modules
+                                 %python-build-system-modules)
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)            ; no configure script
@@ -1774,17 +1779,8 @@ domains, their live performance and resource utilization 
statistics.")
              (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)))))
+                    ensure-no-mtimes-pre-1980)
          (add-before 'build 'fix-symlink
            (lambda* (#:key inputs #:allow-other-keys)
              ;; The file 'images/google/protobuf/descriptor.proto' points to



reply via email to

[Prev in Thread] Current Thread [Next in Thread]