[FL-3328] Removed user-specific data from tar artifacts (#2691)

This commit is contained in:
hedger 2023-05-23 14:51:21 +04:00 committed by GitHub
parent 5f1ac6e1b1
commit a821a2fcc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -275,6 +275,8 @@ class Main(App):
# 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)

View file

@ -211,6 +211,9 @@ class Main(App):
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):