dev-cmd/bottle: set uid/gid.

This is a more complete version of `--numeric-owner`.
This commit is contained in:
Mike McQuaid 2021-04-16 15:26:24 +01:00
parent 2b34ecfe18
commit 7a23bd3ecd
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -389,7 +389,14 @@ module Homebrew
sudo_purge sudo_purge
# Unset the owner/group for reproducible bottles. # Unset the owner/group for reproducible bottles.
# Tar then gzip for reproducible bottles. # Tar then gzip for reproducible bottles.
safe_system "tar", "--create", "--numeric-owner", "--file", tar_path, "#{f.name}/#{f.pkg_version}" owner_group_args = if OS.mac?
["--uid", "0", "--gid", "0"]
else
["--owner", "0", "--group", "0"]
end
safe_system "tar", "--create", "--numeric-owner",
*owner_group_args,
"--file", tar_path, "#{f.name}/#{f.pkg_version}"
sudo_purge sudo_purge
# Set more times for reproducible bottles. # Set more times for reproducible bottles.
tar_path.utime(tab.source_modified_time, tab.source_modified_time) tar_path.utime(tab.source_modified_time, tab.source_modified_time)