unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Brian Cully via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org>
To: guix-devel <guix-devel@gnu.org>
Subject: [core-updates] issues with python's zip
Date: Fri, 14 Apr 2023 18:47:04 -0400	[thread overview]
Message-ID: <87ildyf4y9.fsf@psyduck.jhoto.kublai.com> (raw)


I've run into issues with two packages on core-updates that fail 
to build because the zip library being used can't handle dates 
before 1980. I assume there are more.

Do we have a way to handle this gracefully? In the mean time I've 
patched both packages (‘sssd’ and ‘criu’) with a new build phase:

--8<---------------cut here---------------start------------->8---
          (add-before 'install 'change-file-datetimes
            (lambda _
              (use-modules (ice-9 ftw))
              (let ((dir ".")
                    (time 315532800)) ; 00:00:00 1-jan-1980 UTC
                (let loop ((prefix "")
                           (node (file-system-tree (pk ".:" 
                           dir))))
                  ;; unqualified use of ‘match’ leads to a syntax 
                  error when
                  ;; using ‘...’, so specify the module 
                  explicitly.
                  ((@ (ice-9 match) match) node
                   ((name stat) ; flat file
                    (when (not (eq? (stat:type stat) 'symlink))
                      (utime (string-append prefix name) time 
                      time)))
                   ((name stat children ...) ; directory
                    (utime (string-append prefix name) time time)
                    (for-each (lambda (child)
                                (loop (string-append prefix name
                                                     file-name-separator-string)
                                      child))
                              children)))))))
--8<---------------cut here---------------end--------------->8---

With this, the only outstanding issue with core-updates is #62820, 
which I'm baffled by. It appears to me as though the substitute is 
issuing up a broken ‘rules’ file, but since this is used by the 
keymap in ‘operating-system’, I would imagine a lot of people 
would have hit this bug, so why seemingly just me?

-bjc


             reply	other threads:[~2023-04-14 22:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14 22:47 Brian Cully via Development of GNU Guix and the GNU System distribution. [this message]
2023-04-15  1:21 ` [core-updates] issues with python's zip Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-04-19 22:19 ` Andreas Enge
  -- strict thread matches above, loose matches on Subject: below --
2023-04-20  3:20 Brian Cully via Development of GNU Guix and the GNU System distribution.

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=87ildyf4y9.fsf@psyduck.jhoto.kublai.com \
    --to=guix-devel@gnu.org \
    --cc=bjc@spork.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).