From ae6d41980a2fdb6e98db5479ebf56a1595b1ed75 Mon Sep 17 00:00:00 2001 From: Georgy Lukyanov Date: Wed, 24 Jul 2024 18:27:35 +0200 Subject: [PATCH] Use `gnu` tar format for the bug reports (#4548) This change enforces the GNU format of tar files instead of the default POSIX.1-2001 pax format. This is necessary because: - the filenames in the bug reports are often longer than the format-portable restriction of 256 characters - the Haskell [library](https://hackage.haskell.org/package/tar-0.6.3.0/changelog) we use to work with tar does not support the pax format. However, it does support the GNU format which also allows long names. --- pyk/src/pyk/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyk/src/pyk/utils.py b/pyk/src/pyk/utils.py index 04c650482e2..243acda6280 100644 --- a/pyk/src/pyk/utils.py +++ b/pyk/src/pyk/utils.py @@ -681,7 +681,7 @@ def __init__(self, bug_report: Path) -> None: def add_file(self, finput: Path, arcname: Path) -> None: if str(finput) not in self._file_remap: self._file_remap[str(finput)] = str(arcname) - with tarfile.open(self._bug_report, 'a') as tar: + with tarfile.open(self._bug_report, 'a', format=tarfile.GNU_FORMAT) as tar: tar.add(finput, arcname=arcname) _LOGGER.info(f'Added file to bug report {self._bug_report}:{arcname}: {finput}')