From patchwork Fri May 12 22:36:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Cully X-Patchwork-Id: 49976 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 978B727BBF1; Fri, 12 May 2023 23:37:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 673BE27BBEE for ; Fri, 12 May 2023 23:37:25 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxbNo-0005vX-LP; Fri, 12 May 2023 18:37:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxbNn-0005uo-Ei for guix-patches@gnu.org; Fri, 12 May 2023 18:37:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxbNn-0006y9-6h for guix-patches@gnu.org; Fri, 12 May 2023 18:37:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxbNn-0001my-2l for guix-patches@gnu.org; Fri, 12 May 2023 18:37:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63149] [PATCH v2] gnu: criu: Fix build References: In-Reply-To: Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 May 2023 22:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63149 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63149@debbugs.gnu.org Cc: Brian Cully Received: via spool by 63149-submit@debbugs.gnu.org id=B63149.16839309986803 (code B ref 63149); Fri, 12 May 2023 22:37:03 +0000 Received: (at 63149) by debbugs.gnu.org; 12 May 2023 22:36:38 +0000 Received: from localhost ([127.0.0.1]:33927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxbNN-0001lf-NS for submit@debbugs.gnu.org; Fri, 12 May 2023 18:36:38 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:64438 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxbNM-0001lY-Nm for 63149@debbugs.gnu.org; Fri, 12 May 2023 18:36:37 -0400 Received: from psyduck.jhoto.kublai.com (ool-18b8e9e7.dyn.optonline.net [24.184.233.231]) by mail.spork.org (Postfix) with ESMTPSA id 925C0A79F; Fri, 12 May 2023 18:36:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1683930995; bh=e57qJcKEhHzFCsy+AXpKJBUplEAl6b1Pb5EqQDiXSGQ=; h=From:To:Cc:Subject:Date; b=EKNKnlgbw/d7z2/7kMQCH439MQoxSVaJ7UB1wSiCVDXIg0RiMHVzHKr/7bYUz+cS+ rIeB9tnzbIIXWtXonQKTVhGyE5YH+0194yRJyWB8p3TRuPEPgWOq2mKk2hishqz00b OTfItMUvIvg8kQytXGvcama2alzobadtFw1LY7ZQ= Date: Fri, 12 May 2023 18:36:29 -0400 Message-Id: <825d10894496a97e5e45033bc6e8dba5a5b1141d.1683930989.git.bjc@spork.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Brian Cully X-ACL-Warn: , Brian Cully via Guix-patches X-Patchwork-Original-From: Brian Cully via Guix-patches via From: Brian Cully Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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(-) base-commit: b363fab46f5af42b3f653e2fee1834477bd5aacd prerequisite-patch-id: 8a03c5e8bcd4c526b93c558d550725887f932e41 prerequisite-patch-id: 89400c29b4c30dfbe8492aff1751ca583397b4f0 prerequisite-patch-id: a1963f772e753239b80e6a7b0d9f55e0ab4d662b 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))