diff --git a/pkg/archive.py b/pkg/archive.py index 61727204..9c15f065 100644 --- a/pkg/archive.py +++ b/pkg/archive.py @@ -146,7 +146,7 @@ def __init__(self, # Instead, we manually re-implement gzopen from tarfile.py and set mtime. self.fileobj = gzip.GzipFile( filename=name, mode='w', compresslevel=9, mtime=self.default_mtime) - self.tar = tarfile.open(name=name, mode=mode, fileobj=self.fileobj) + self.tar = tarfile.open(name=name, mode=mode, fileobj=self.fileobj, format=tarfile.GNU_FORMAT) self.members = set([]) self.directories = set([]) diff --git a/pkg/make_deb.py b/pkg/make_deb.py index d34ac755..61340b59 100644 --- a/pkg/make_deb.py +++ b/pkg/make_deb.py @@ -146,7 +146,7 @@ def CreateDebControl(extrafiles=None, **kwargs): # Create the control.tar file tar = BytesIO() with gzip.GzipFile('control.tar.gz', mode='w', fileobj=tar, mtime=0) as gz: - with tarfile.open('control.tar.gz', mode='w', fileobj=gz) as f: + with tarfile.open('control.tar.gz', mode='w', fileobj=gz, format=tarfile.GNU_FORMAT) as f: tarinfo = tarfile.TarInfo('./control') control_file_data = controlfile.encode('utf-8') tarinfo.size = len(control_file_data)