From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 8NzNIzBpQGQd2AAASxT56A (envelope-from ) for ; Thu, 20 Apr 2023 00:20:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ACSfIzBpQGSy7gAAauVa8A (envelope-from ) for ; Thu, 20 Apr 2023 00:20:32 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5BB52B107 for ; Thu, 20 Apr 2023 00:20:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppG9d-0002nw-9o; Wed, 19 Apr 2023 18:19:57 -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 1ppG9b-0002nh-Gn for guix-devel@gnu.org; Wed, 19 Apr 2023 18:19:55 -0400 Received: from hera.aquilenet.fr ([2a0c:e300::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppG9Y-0006cw-Kp for guix-devel@gnu.org; Wed, 19 Apr 2023 18:19:55 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 414BD2145; Thu, 20 Apr 2023 00:19:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A-1eLI1IGvaV; Thu, 20 Apr 2023 00:19:47 +0200 (CEST) Received: from jurong (unknown [IPv6:2001:861:c4:f2f0::c64]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 5DE0712C; Thu, 20 Apr 2023 00:19:47 +0200 (CEST) Date: Thu, 20 Apr 2023 00:19:45 +0200 From: Andreas Enge To: Brian Cully Cc: guix-devel Subject: Re: [core-updates] issues with python's zip Message-ID: References: <87ildyf4y9.fsf@psyduck.jhoto.kublai.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87ildyf4y9.fsf@psyduck.jhoto.kublai.com> Received-SPF: pass client-ip=2a0c:e300::1; envelope-from=andreas@enge.fr; helo=hera.aquilenet.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681942832; a=rsa-sha256; cv=none; b=c7cbXiV9OumgEz1Qg9/VKDEhlQLqFMzeLhj/EeXWGS8xQH15gAGUsxPs1YfY3ZYLhvAsOX GUS/Sx+wBeMpIi6hJUSy1oh8/QJA54AWeDT8zLxIM86d1HC760TaHazQY3Cd/BpttdFQPB oRbAzGMi7Xl4fHktLPRIejukq0SpsI0ktMqYeaifcF07Zd5+Ohf3i/UXb4LjpnfYfQP47q XiXoBUu3R+6GPDbNFHWrD39pW2b4D8td58En0DTobNtt234ycgrHA1KXaXKm8TlLp3DRRy xf7A9i4lfuM1TzaTrLmTSwUwMJpDTqNs5tfcYq8wK8axGET0yExvdM70Opi8qg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681942832; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nkWcW9So32OztCDP/tyPGzJRKA3DlI3ABsDKYNU0SSM=; b=DG8qpiUsit8ZoR0GbxkeR3ygUilnlX0McFt5ea7s8fo1Wpene8o0PW1pBWsd51p/vgSzh9 0jSYk1qx6ZmtsTnHw5wTStP4gWQ2eI5hTfcmS3L0cEqzYCXr1COqzWJG0MsA+Jmua20A19 uVGzR+FLfWRzUEV1aakSAcTgpSYu2X6gvfsLTAocjEXC2yhkTxCw/5Tl/JgeGXHub7cLKB PMvX0FiFgTUVyzxkpy02Uc0Sud8LJGOV9OLvjNhbzQbdx8VH7e1gXokuAAsX5a3pHGEaQ8 lZn48nbLFqMBlNgHp2DMRCay0hCdKqUZHc8+keXAXhtZZTkxhN9wInAM47T6Hw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.51 X-Spam-Score: -2.51 X-Migadu-Queue-Id: 5BB52B107 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-TUID: rcoEmLVXe3Kb Hello, Am Fri, Apr 14, 2023 at 06:47:04PM -0400 schrieb Brian Cully via Development of GNU Guix and the GNU System distribution.: > 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: criu fails like this for me: copying crit.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... pycriu.images.__pycache__.__init__.cpython-310: module references __file__ creating dist creating 'dist/crit-3.17.1-py3.10.egg' and adding 'build/bdist.linux-x86_64/egg' to it Traceback (most recent call last): File "/tmp/guix-build-criu-3.17.1.drv-0/source/scripts/crit-setup.py", line 16, in setup(name="crit", File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 177, in setup return run_commands(dist) File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 193, in run_commands dist.run_commands() File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands self.run_command(cmd) File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/command/install.py", line 74, in run self.do_egg_install() File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/command/install.py", line 123, in do_egg_install self.run_command('bdist_egg') File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 317, in run_command self.distribution.run_command(command) File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/command/bdist_egg.py", line 226, in run make_zipfile(self.egg_output, archive_root, verbose=self.verbose, File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/command/bdist_egg.py", line 452, in make_zipfile visit(z, dirname, files) File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/command/bdist_egg.py", line 445, in visit z.write(path, p) File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/zipfile.py", line 1739, in write zinfo = ZipInfo.from_file(filename, arcname, File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/zipfile.py", line 518, in from_file zinfo = cls(arcname, date_time) File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/zipfile.py", line 362, in __init__ raise ValueError('ZIP does not support timestamps before 1980') ValueError: ZIP does not support timestamps before 1980 I came across this: https://docs.python.org/3/library/zipfile.html#zipfile-objects So apparently when creating a zipfile object (this is the constructor we are looking at, right?), one can pass a parameter that tells it to not bother about time stamps of old files. Then it is a matter of finding out where it happens. I think it is line 450 of (in my case) /gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/lib/python3.10/site-packages/setuptools/command/bdist_egg.py which reads z = zipfile.ZipFile(zip_filename, mode, compression=compression) Maybe we should patch our Python so that it becomes z = zipfile.ZipFile(zip_filename, mode, compression=compression, strict_timestamps=False) ? (not before the core-updates merge, however) But is a bit surprising that it does not happen all the time; or are only a few packages calling bdist_egg.py? Andreas