Fix tix archive owner, group and permissions.

tix-build recorded the owner and group as the user building the package,
rather than setting the owner and group to user 0 (root).

tix-install tried to chown extracted files as the owner and group in the
archive, rather than the current user. It also applied the current umask
rather than restoring the same permissions.
This commit is contained in:
Jonas 'Sortie' Termansen 2016-03-26 12:41:08 +01:00
parent 05282c86d7
commit e770766cc8
3 changed files with 6 additions and 1 deletions

View File

@ -143,7 +143,7 @@ strip_tix() {
$HOST-strip -d "$DIR/data/libexec"* 2>/dev/null || true
$HOST-strip -d "$DIR/data/libexec/git-core/"* 2>/dev/null || true
$HOST-strip -d "$DIR/data/sbin/"* 2>/dev/null || true
(cd "$DIR" && tar -cJf port.tar.tix.xz tix data)
(cd "$DIR" && tar --numeric-owner --owner=0 --group=0 -cJf port.tar.tix.xz tix data)
cp "$DIR/port.tar.tix.xz" "$1"
rm -rf "$DIR"
}

View File

@ -738,6 +738,9 @@ void BuildPackage(metainfo_t* minfo)
"--remove-files",
"--create",
"--xz",
"--numeric-owner",
"--owner=0",
"--group=0",
"--file", package_tix,
"tix",
"data",

View File

@ -364,6 +364,8 @@ void InstallPackage(const char* tix_path)
"--extract",
"--file", tix_path,
"--keep-directory-symlink",
"--same-permissions",
"--no-same-owner",
data_and_prefix,
NULL
};