Skip to content

Commit 85c96a1

Browse files
committed
explain behaviour behind numeric permission reset in reproducible tarballs
1 parent ed26075 commit 85c96a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

easybuild/tools/filetools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2804,7 +2804,8 @@ def reproducible_filter(tarinfo):
28042804
group_mode = (user_mode >> 3) & ~stat.S_IWGRP # user mode without write
28052805
other_mode = group_mode >> 3 # same as group mode
28062806
tarinfo.mode = (tarinfo.mode & ~0o77) | group_mode | other_mode
2807-
# reset ownership numeric UID/GID 0
2807+
# reset ownership to numeric UID/GID 0
2808+
# equivalent in GNU tar to 'tar --owner=0 --group=0 --numeric-owner'
28082809
tarinfo.uid = tarinfo.gid = 0
28092810
tarinfo.uname = tarinfo.gname = ""
28102811
return tarinfo

0 commit comments

Comments
 (0)