Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] download/git: fix trasnform-name
@ 2018-04-07 21:26 Yann E. MORIN
  2018-04-08  7:34 ` Ricardo Martincoski
  2018-04-08 15:41 ` Peter Korsgaard
  0 siblings, 2 replies; 5+ messages in thread
From: Yann E. MORIN @ 2018-04-07 21:26 UTC (permalink / raw)
  To: buildroot

When a package contains a relative symlink which first component is '..'
(thus pointing one directory higher), for example package 'meh' contains
this symlink:

    foo/bar -> ../buz

then it would be stored as 'meh-version./buz' because of the
transform-name pattern replacement.

Fix it to only match the leading './'.

Reported-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 support/download/git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/download/git b/support/download/git
index f07195b0d1..787b6bcca0 100755
--- a/support/download/git
+++ b/support/download/git
@@ -111,7 +111,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="s/^\.\//${basename}\//" \
 	--numeric-owner --owner=0 --group=0 --mtime="${date}" --format=gnu \
          -T "${output}.list.sorted" >"${output}.tar"
 gzip -6 -n <"${output}.tar" >"${output}"
-- 
2.14.1

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

end of thread, other threads:[~2018-04-08 15:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-07 21:26 [Buildroot] [PATCH] download/git: fix trasnform-name Yann E. MORIN
2018-04-08  7:34 ` Ricardo Martincoski
2018-04-08  8:24   ` Yann E. MORIN
2018-04-08 13:37     ` Ricardo Martincoski
2018-04-08 15:41 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox