builder: Untar with --no-same-owner

Without this if you run as root (which is generally a poor idea) it will
extract the sources with the user/group specified on the archive, which
is never what you want when building code.
tingping/wmclass
Alexander Larsson 2016-05-12 19:35:32 +02:00
parent c5e178f339
commit 9d6bc99649
1 changed files with 1 additions and 1 deletions

View File

@ -534,7 +534,7 @@ builder_source_archive_extract (BuilderSource *source,
{
g_autofree char *strip_components = g_strdup_printf ("--strip-components=%u", self->strip_components);
/* Note: tar_decompress_flag can return NULL, so put it last */
if (!tar (dest, error, "xf", archive_path, strip_components, tar_decompress_flag (type), NULL))
if (!tar (dest, error, "xf", archive_path, "--no-same-owner", strip_components, tar_decompress_flag (type), NULL))
return FALSE;
}
else if (type == ZIP)