8000 auditwheel crashes when SOURCE_DATE_EPOCH is less than 315532800 · Issue #566 · pypa/auditwheel · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
auditwheel crashes when SOURCE_DATE_EPOCH is less than 315532800 #566
Closed
@tabbyrobin

Description

@tabbyrobin

This likely arises as a consequence of the fact that auditwheel uses SOURCE_DATE_EPOCH to set ZIP timestamps, but ZIP uses DOS timestamps that cannot express times before unix epoch time 315532800.

Minimal example to reproduce:

wget https://github.com/pypa/auditwheel/raw/refs/heads/main/tests/integration/arch-wheels/glibc/testsimple-0.0.1-cp313-cp313-linux_x86_64.whl
SOURCE_DATE_EPOCH=315532799 pipx run auditwheel==6.3.0 repair testsimple-0.0.1-cp313-cp313-linux_x86_64.whl

Traceback:

> SOURCE_DATE_EPOCH=315532799 pipx run auditwheel==6.3.0 repair testsimple-0.0.1-cp313-cp313-linux_x86_64.whl
⚠️  auditwheel is already on your PATH and installed at /home/user/.local/bin/auditwheel. Downloading
    and running anyway.
INFO:auditwheel.main_repair:Repairing testsimple-0.0.1-cp313-cp313-linux_x86_64.whl
INFO:auditwheel.wheeltools:Previous filename tags: linux_x86_64
INFO:auditwheel.wheeltools:New filename tags: manylinux_2_5_x86_64, manylinux1_x86_64
INFO:auditwheel.wheeltools:Previous WHEEL info tags: cp313-cp313-linux_x86_64
INFO:auditwheel.wheeltools:New WHEEL info tags: cp313-cp313-manylinux_2_5_x86_64, cp313-cp313-manylinux1_x86_64
Traceback (most recent call last):
  File "/home/user/.local/pipx/.cache/98b64e7971674bc/bin/auditwheel", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/user/.local/pipx/.cache/98b64e7971674bc/lib/python3.11/site-packages/auditwheel/main.py", line 53, in main
    result: int | None = args.func(args, p)
                         ^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/.cache/98b64e7971674bc/lib/python3.11/site-packages/auditwheel/main_repair.py", line 203, in execute
    out_wheel = repair_wheel(
                ^^^^^^^^^^^^^
  File "/home/user/.local/pipx/.cache/98b64e7971674bc/lib/python3.11/site-packages/auditwheel/repair.py", line 60, in repair_wheel
    with InWheelCtx(wheel_path) as ctx:
  File "/home/user/.local/pipx/.cache/98b64e7971674bc/lib/python3.11/site-packages/auditwheel/wheeltools.py", line 136, in __exit__
    dir2zip(self.name, self.out_wheel, self.zip_compression_level, date_time)
  File "/home/user/.local/pipx/.cache/98b64e7971674bc/lib/python3.11/site-packages/auditwheel/tools.py", line 160, in dir2zip
    z.writestr(zinfo, fp.read(), compresslevel=zip_compression_level)
  File "/usr/lib/python3.11/zipfile.py", line 1843, in writestr
    with self.open(zinfo, mode='w') as dest:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1556, in open
    return self._open_to_write(zinfo, force_zip64=force_zip64)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 1657, in _open_to_write
    self.fp.write(zinfo.FileHeader(zip64))
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/zipfile.py", line 477, in FileHeader
    header = struct.pack(structFileHeader, stringFileHeader,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: ushort format requires 0 <= number <= 65535

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0