From f6df44433569c4c4bfb905ad8cc7cd576dad88a0 Mon Sep 17 00:00:00 2001 From: hedger Date: Tue, 23 May 2023 14:27:14 +0400 Subject: [PATCH] Removed user-specific data from tar artifacts --- scripts/sconsdist.py | 2 ++ scripts/update.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/scripts/sconsdist.py b/scripts/sconsdist.py index 46178113655..23f9526a0b5 100644 --- a/scripts/sconsdist.py +++ b/scripts/sconsdist.py @@ -275,6 +275,8 @@ def bundle_update_package(self): # Strip uid and gid in case of overflow def tar_filter(tarinfo): tarinfo.uid = tarinfo.gid = 0 + tarinfo.mtime = 0 + tarinfo.uname = tarinfo.gname = "furippa" return tarinfo tar.add(bundle_dir, arcname=bundle_dir_name, filter=tar_filter) diff --git a/scripts/update.py b/scripts/update.py index 0f3ee6ea8b9..9f0d95d94ee 100755 --- a/scripts/update.py +++ b/scripts/update.py @@ -211,6 +211,9 @@ def _tar_filter(self, tarinfo: tarfile.TarInfo): f"Cannot package resource: name '{tarinfo.name}' too long" ) raise ValueError("Resource name too long") + tarinfo.gid = tarinfo.uid = 0 + tarinfo.mtime = 0 + tarinfo.uname = tarinfo.gname = "furippa" return tarinfo def package_resources(self, srcdir: str, dst_name: str):