mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 22:40:25 +00:00
[FL-3328] Removed user-specific data from tar artifacts (#2691)
This commit is contained in:
parent
5f1ac6e1b1
commit
a821a2fcc0
2 changed files with 5 additions and 0 deletions
|
@ -275,6 +275,8 @@ class Main(App):
|
||||||
# Strip uid and gid in case of overflow
|
# Strip uid and gid in case of overflow
|
||||||
def tar_filter(tarinfo):
|
def tar_filter(tarinfo):
|
||||||
tarinfo.uid = tarinfo.gid = 0
|
tarinfo.uid = tarinfo.gid = 0
|
||||||
|
tarinfo.mtime = 0
|
||||||
|
tarinfo.uname = tarinfo.gname = "furippa"
|
||||||
return tarinfo
|
return tarinfo
|
||||||
|
|
||||||
tar.add(bundle_dir, arcname=bundle_dir_name, filter=tar_filter)
|
tar.add(bundle_dir, arcname=bundle_dir_name, filter=tar_filter)
|
||||||
|
|
|
@ -211,6 +211,9 @@ class Main(App):
|
||||||
f"Cannot package resource: name '{tarinfo.name}' too long"
|
f"Cannot package resource: name '{tarinfo.name}' too long"
|
||||||
)
|
)
|
||||||
raise ValueError("Resource name too long")
|
raise ValueError("Resource name too long")
|
||||||
|
tarinfo.gid = tarinfo.uid = 0
|
||||||
|
tarinfo.mtime = 0
|
||||||
|
tarinfo.uname = tarinfo.gname = "furippa"
|
||||||
return tarinfo
|
return tarinfo
|
||||||
|
|
||||||
def package_resources(self, srcdir: str, dst_name: str):
|
def package_resources(self, srcdir: str, dst_name: str):
|
||||||
|
|
Loading…
Reference in a new issue