From patchwork Thu May 4 00:37:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brian Cully X-Patchwork-Id: 49774 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 C8F2027BBEA; Thu, 4 May 2023 02:08:15 +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 9B0CE27BBE9 for ; Thu, 4 May 2023 02:08:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puNS0-0007O8-K8; Wed, 03 May 2023 21:08:04 -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 1puNRz-0007Nk-Au for guix-patches@gnu.org; Wed, 03 May 2023 21:08: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 1puNRz-0004hF-2x for guix-patches@gnu.org; Wed, 03 May 2023 21:08:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1puNRy-0004vj-H5 for guix-patches@gnu.org; Wed, 03 May 2023 21:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63044] [PATCH] gnu: python-setuptools: Disable date checking in bdist_egg.py Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 May 2023 01:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63044 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Brian Cully Cc: 63044@debbugs.gnu.org, Ludovic =?utf-8?q?Court=C3=A8s?= , Lars-Dominik Braun , jgart Received: via spool by 63044-submit@debbugs.gnu.org id=B63044.168316246418929 (code B ref 63044); Thu, 04 May 2023 01:08:02 +0000 Received: (at 63044) by debbugs.gnu.org; 4 May 2023 01:07:44 +0000 Received: from localhost ([127.0.0.1]:48112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puNRg-0004vF-4y for submit@debbugs.gnu.org; Wed, 03 May 2023 21:07:44 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:58612 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puNRa-0004v3-T6 for 63044@debbugs.gnu.org; Wed, 03 May 2023 21:07:42 -0400 Received: from psyduck (ool-18b8e9e7.dyn.optonline.net [24.184.233.231]) by mail.spork.org (Postfix) with ESMTPSA id CAC5496B4; Wed, 3 May 2023 21:07:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1683162458; bh=N90IiTpRSVqrYher0y0Xrh74D9kN0qMwaJ6gdbnCFto=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=tBHr/qLj5rqRSgXy+udc5+6n36mO9oLmm1xsbewZGAhgcjlRTBOT9bo+5BEtiv9vM ChKqTJK/nqO1G1oVvdJRy9wDjzRHBPeLoWq7cUpMYX7Io6+QC/M3YJ1gQGD+tBw9N1 r2GCj15LY7W31FUuC3ZOcy/Hnc8DAfl+bSHp7vVw= References: <87ildm3zf6.fsf@psyduck.jhoto.kublai.com> <87bkjd46wo.fsf@psyduck.jhoto.kublai.com> <87jzxtqf4m.fsf_-_@gnu.org> <87jzxskkpv.fsf@psyduck.jhoto.kublai.com> <87r0rxyydq.fsf@gnu.org> <87ild9oysd.fsf@psyduck.jhoto.kublai.com> User-agent: mu4e 1.10.2; emacs 28.2 Date: Wed, 03 May 2023 20:37:14 -0400 In-reply-to: <87ild9oysd.fsf@psyduck.jhoto.kublai.com> Message-ID: <878re4q4z3.fsf@psyduck.jhoto.kublai.com> 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 Brian Cully writes: > Ludovic Courtès writes: > >> The way to do that is to add (guix build python-build-system) >> to >> #:imported-modules and #:modules in those packages, and then to >> use >> ‘modify-phases’ to add that ‘ensure-no-mtimes-pre-1980’ phase >> to >> those >> of ‘gnu-build-system’. >> >> How does that sound, Brian? > > That sounds reasonable to me. I'll update the ticket in a bit > with > these changes. This turns out to be trickier than it first appears: For one thing, ‘ensure-no-mtimes-pre-1980’ isn't exported from (guix build python-build-system). I can use ‘@@’ to reference it, but that seems less-than-ideal. A larger problem is that ‘ensure-no-mtimes-pre-1980’ has a bug: it blindly tries to change the utime of files even if they're symlinks, which raises an “operation not permitted” exception. It's easy enough to fix this, but since it changes ‘python-build-system’, it causes a tremendous amount of rebuilding. I'm not sure how to proceed. The bug with the build system should certainly be fixed, but it'll be disruptive. Until then, at least ‘criu’ will remain broken — though ‘sssd’ is now building correctly with the new phase. This is the patch: --8<---------------cut here---------------start------------->8--- --8<---------------cut here---------------end--------------->8--- -bjc diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm index aa04664b25..1236ea62cd 100644 --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -270,7 +270,8 @@ (define* (ensure-no-mtimes-pre-1980 #:rest _) ;; timestamps before 1980. (let ((early-1980 315619200)) ; 1980-01-02 UTC (ftw "." (lambda (file stat flag) - (unless (<= early-1980 (stat:mtime stat)) + (unless (or (<= early-1980 (stat:mtime stat)) + (eq? (stat:type stat) 'symlink)) (utime file early-1980 early-1980)) #t))))