Skip to content

Commit 3c04d09

Browse files
ciernyrobimarko
authored andcommitted
download: improve rawgit tar reliability
Packages that depend on rawgit can fail on systems with the tar UID issue (https://bugzilla.redhat.com/show_bug.cgi?id=913406). Fix this by adding tar flags to overwrite UID/GID, as in the dl_tar_pack method. Signed-off-by: Ondrej Cierny <o.cierny@gmail.com> Link: openwrt/openwrt#19243 (cherry picked from commit d4d5fbd) Link: openwrt/openwrt#20185 Signed-off-by: Robert Marko <robimarko@gmail.com>
1 parent c1d14f2 commit 3c04d09

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/download.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,9 @@ define DownloadMethod/rawgit
232232
echo "Generating formal git archive (apply .gitattributes rules)" && \
233233
(cd $(SUBDIR) && git config core.abbrev 8 && \
234234
git archive --format=tar HEAD --output=../$(SUBDIR).tar.git) && \
235-
$(if $(filter skip,$(SUBMODULES)),true,$(TAR) --ignore-failed-read -C $(SUBDIR) -f $(SUBDIR).tar.git -r .git .gitmodules 2>/dev/null) && \
235+
$(if $(filter skip,$(SUBMODULES)),true, \
236+
$(TAR) --numeric-owner --owner=0 --group=0 --ignore-failed-read -C $(SUBDIR) -f $(SUBDIR).tar.git -r .git .gitmodules 2>/dev/null \
237+
) && \
236238
rm -rf $(SUBDIR) && mkdir $(SUBDIR) && \
237239
$(TAR) -C $(SUBDIR) -xf $(SUBDIR).tar.git && \
238240
(cd $(SUBDIR) && $(if $(filter skip,$(SUBMODULES)),true,git submodule update --init --recursive -- $(SUBMODULES) && \

0 commit comments

Comments
 (0)