diff options
| author | Ondrej Cierny | 2025-06-27 02:39:37 +0000 |
|---|---|---|
| committer | Robert Marko | 2025-10-05 10:16:58 +0000 |
| commit | 3c04d09336e363c2489c15b57b119ee6d1aa4127 (patch) | |
| tree | 4a67374aab1a78439ae32e1ea9dd1644c414acec | |
| parent | c1d14f27348f10308f8d87d39255f39a503e3d23 (diff) | |
| download | openwrt-3c04d09336e363c2489c15b57b119ee6d1aa4127.tar.gz | |
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: https://github.com/openwrt/openwrt/pull/19243
(cherry picked from commit d4d5fbd375a7d7e2fddb667afc21c221cb966130)
Link: https://github.com/openwrt/openwrt/pull/20185
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | include/download.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/download.mk b/include/download.mk index 7f34302773..518a14e035 100644 --- a/include/download.mk +++ b/include/download.mk @@ -232,7 +232,9 @@ define DownloadMethod/rawgit echo "Generating formal git archive (apply .gitattributes rules)" && \ (cd $(SUBDIR) && git config core.abbrev 8 && \ git archive --format=tar HEAD --output=../$(SUBDIR).tar.git) && \ - $(if $(filter skip,$(SUBMODULES)),true,$(TAR) --ignore-failed-read -C $(SUBDIR) -f $(SUBDIR).tar.git -r .git .gitmodules 2>/dev/null) && \ + $(if $(filter skip,$(SUBMODULES)),true, \ + $(TAR) --numeric-owner --owner=0 --group=0 --ignore-failed-read -C $(SUBDIR) -f $(SUBDIR).tar.git -r .git .gitmodules 2>/dev/null \ + ) && \ rm -rf $(SUBDIR) && mkdir $(SUBDIR) && \ $(TAR) -C $(SUBDIR) -xf $(SUBDIR).tar.git && \ (cd $(SUBDIR) && $(if $(filter skip,$(SUBMODULES)),true,git submodule update --init --recursive -- $(SUBMODULES) && \ |