All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Restrict tar transform to regular files Without this
@ 2019-04-26 16:49 Timothy Pearson
  2019-04-27  8:25 ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Timothy Pearson @ 2019-04-26 16:49 UTC (permalink / raw)
  To: buildroot

 restriction, symlinks are rewritten and corrupted.

Example without the restriction:

Input tree (valid):
package-githash/file1
package-githash/link -> ./file1

Output tree (broken):
package-githash/file1
package-githash/link -> package-githash/file1
---
 support/download/git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/download/git b/support/download/git
index 17ca04eb98..1acb795c81 100755
--- a/support/download/git
+++ b/support/download/git
@@ -190,7 +190,7 @@ LC_ALL=C sort <"${output}.list" >"${output}.list.sorted"
 
 # Create GNU-format tarballs, since that's the format of the tarballs on
 # sources.buildroot.org and used in the *.hash files
-tar cf - --transform="s#^\./#${basename}/#" \
+tar cf - --transform="flags=r;s#^\./#${basename}/#" \
          --numeric-owner --owner=0 --group=0 --mtime="${date}" --format=gnu \
          -T "${output}.list.sorted" >"${output}.tar"
 gzip -6 -n <"${output}.tar" >"${output}"

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-27  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-26 16:49 [Buildroot] [PATCH] Restrict tar transform to regular files Without this Timothy Pearson
2019-04-27  8:25 ` Yann E. MORIN
2019-04-27  8:49   ` Timothy Pearson
2019-04-27  9:14     ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.