unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brian Cully via Guix-patches via <guix-patches@gnu.org>
To: Brian Cully <bjc@spork.org>
Cc: 63044@debbugs.gnu.org, "Ludovic Courtès" <ludo@gnu.org>,
	"Lars-Dominik Braun" <lars@6xq.net>, jgart <jgart@dismail.de>
Subject: [bug#63044] [PATCH] gnu: python-setuptools: Disable date checking in bdist_egg.py
Date: Wed, 03 May 2023 20:37:14 -0400	[thread overview]
Message-ID: <878re4q4z3.fsf@psyduck.jhoto.kublai.com> (raw)
In-Reply-To: <87ild9oysd.fsf@psyduck.jhoto.kublai.com>


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---
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---


-bjc




  reply	other threads:[~2023-05-04  1:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-24  0:14 [bug#63044] [PATCH core-updates] Fix criu and sssd Brian Cully via Guix-patches via
2023-04-24  1:18 ` [bug#63044] [PATCH 1/4] gnu: criu: Use gexps Brian Cully via Guix-patches via
2023-04-24  1:18   ` [bug#63044] [PATCH 2/4] guix: utils: add `change-file-timestamps-recursively' procedure Brian Cully via Guix-patches via
2023-04-24  1:18   ` [bug#63044] [PATCH 3/4] gnu: sssd: Change timestamps to 1-Jan-1980 before compressing Brian Cully via Guix-patches via
2023-04-24  1:18   ` [bug#63044] [PATCH 4/4] gnu: criu: " Brian Cully via Guix-patches via
2023-04-24 15:49 ` [bug#63044] [PATCH core-updates] Fix criu and sssd Brian Cully via Guix-patches via
2023-04-30 20:39   ` [bug#63044] [PATCH] gnu: python-setuptools: Disable date checking in bdist_egg.py Ludovic Courtès
2023-05-01  6:32     ` Lars-Dominik Braun
2023-05-01 17:36       ` Brian Cully via Guix-patches via
2023-05-03 20:05         ` Ludovic Courtès
2023-05-03 22:05           ` Brian Cully via Guix-patches via
2023-05-04  0:37             ` Brian Cully via Guix-patches via [this message]
2023-05-10 15:18               ` Ludovic Courtès
2023-05-12 22:37                 ` Brian Cully via Guix-patches via
2023-05-13  7:11               ` Lars-Dominik Braun
2023-05-02  0:32   ` jgart via Guix-patches via
2023-04-25 14:35 ` [bug#63044] [PATCH v2] gnu: python: " Brian Cully via Guix-patches via
2023-04-28 13:59   ` [bug#63044] [PATCH core-updates] Fix criu and sssd Brian Cully via Guix-patches via
2023-04-28 14:01 ` [bug#63044] [PATCH v3] gnu: python-setuptools: Disable date checking in bdist_egg.py Brian Cully via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878re4q4z3.fsf@psyduck.jhoto.kublai.com \
    --to=guix-patches@gnu.org \
    --cc=63044@debbugs.gnu.org \
    --cc=bjc@spork.org \
    --cc=jgart@dismail.de \
    --cc=lars@6xq.net \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).