Skip to content

Commit a821a2f

Browse files
authored
[FL-3328] Removed user-specific data from tar artifacts (#2691)
1 parent 5f1ac6e commit a821a2f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

scripts/sconsdist.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ def bundle_update_package(self):
275275
# Strip uid and gid in case of overflow
276276
def tar_filter(tarinfo):
277277
tarinfo.uid = tarinfo.gid = 0
278+
tarinfo.mtime = 0
279+
tarinfo.uname = tarinfo.gname = "furippa"
278280
return tarinfo
279281

280282
tar.add(bundle_dir, arcname=bundle_dir_name, filter=tar_filter)

scripts/update.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ def _tar_filter(self, tarinfo: tarfile.TarInfo):
211211
f"Cannot package resource: name '{tarinfo.name}' too long"
212212
)
213213
raise ValueError("Resource name too long")
214+
tarinfo.gid = tarinfo.uid = 0
215+
tarinfo.mtime = 0
216+
tarinfo.uname = tarinfo.gname = "furippa"
214217
return tarinfo
215218

216219
def package_resources(self, srcdir: str, dst_name: str):

0 commit comments

Comments
 (0)