1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

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"* 2>/dev/null || true
$HOST-strip -d "$DIR/data/libexec/git-core/"* 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 $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" cp "$DIR/port.tar.tix.xz" "$1"
rm -rf "$DIR" rm -rf "$DIR"
} }

View file

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

View file

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