Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/sconsdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions scripts/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down