diff options
author | Raptor Engineering Development Team <support@raptorengineering.com> | 2019-04-18 06:14:18 +0000 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2019-04-18 06:14:18 +0000 |
commit | c2b02f0bf1ed7d908fb7574e519cdd15736cebd3 (patch) | |
tree | ef28044007183fcbd788066f37665c5c2c6905d8 | |
parent | e01dcd0974861a2c26eed6a66829a2d0bc5356d7 (diff) | |
download | buildroot-c2b02f0bf1ed7d908fb7574e519cdd15736cebd3.tar.gz buildroot-c2b02f0bf1ed7d908fb7574e519cdd15736cebd3.zip |
Restrict tar transform to regular files
Without this 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
-rwxr-xr-x | support/download/git | 2 |
1 files changed, 1 insertions, 1 deletions
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}" |