Message ID | 878re4q4z3.fsf@psyduck.jhoto.kublai.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> 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 <patchwork@mira.cbaines.net>; 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 <guix-patches-bounces@gnu.org>) 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 <Debian-debbugs@debbugs.gnu.org>) 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 <Debian-debbugs@debbugs.gnu.org>) 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 <Debian-debbugs@debbugs.gnu.org>) 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 <bjc@spork.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 04 May 2023 01:08:02 +0000 Resent-Message-ID: <handler.63044.B63044.168316246418929@debbugs.gnu.org> 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 <bjc@spork.org> Cc: 63044@debbugs.gnu.org, Ludovic =?utf-8?q?Court=C3=A8s?= <ludo@gnu.org>, Lars-Dominik Braun <lars@6xq.net>, jgart <jgart@dismail.de> 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 <debbugs-submit-bounces@debbugs.gnu.org>) 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 <bjc@spork.org>) 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> <ZE9c6SjAY/gF3BOA@philomena> <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 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-to: Brian Cully <bjc@spork.org> X-ACL-Warn: , Brian Cully via Guix-patches <guix-patches@gnu.org> From: Brian Cully via Guix-patches via <guix-patches@gnu.org> 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 |
Series |
[bug#63044] gnu: python-setuptools: Disable date checking in bdist_egg.py
|
|
Commit Message
brian cully
May 4, 2023, 12:37 a.m. UTC
Brian Cully <bjc@spork.org> writes: > Ludovic Courtès <ludo@gnu.org> 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
Comments
Hi, Brian Cully <bjc@spork.org> skribis: > 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. Yes. I’m surprised we didn’t hit a problem before, despite having thousands of Python packages. Can we work around it for the one package that hits that bug? (Until a fix like you propose lands.) > 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. If you can use @@ to get at ‘ensure-no-mtimes-pre-1980’, I’d still suggest to do that for ‘criu’. Does that make sense? Or am I overlooking something? Thanks, Ludo’.
Ludovic Courtès <ludo@gnu.org> writes: > Yes. I’m surprised we didn’t hit a problem before, despite > having > thousands of Python packages. Can we work around it for the one > package > that hits that bug? (Until a fix like you propose lands.) Yeah, I've given up trying to do this the “right” way. See #63149 for an updated patch that just copies in the ensure-mtime procedure with a change to check for symlinks. > If you can use @@ to get at ‘ensure-no-mtimes-pre-1980’, I’d > still > suggest to do that for ‘criu’. This is what I've done for ‘sssd’, see #63091. For ‘criu’, see above. -bjc
Hi, > --8<---------------cut here---------------start------------->8--- > 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)))) > > --8<---------------cut here---------------end--------------->8--- I’m going to include this patch in the python-team branch. We’re looking at a massive rebuild due to #63139 anyways, as you said. In theory there’s nothing wrong with patching setuptools like this, but I’d like to avoid it, because that substitute* can just break silently in the future. Cheers, Lars
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))))