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.
This commit is contained in:
Alexander Larsson committed 2016-05-12 19:35:32 +02:00
1 parent c5e178f339
commit 9d6bc99649
1 file changed
+1 -1
+1 -1
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)