From: Yann E. MORIN Date: Sat, 7 Apr 2018 21:26:14 +0000 (+0200) Subject: download/git: fix transform-name X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=54785851eeb775720aac8a0b6b423fda26ac8f27;p=buildroot.git download/git: fix transform-name 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 Signed-off-by: "Yann E. MORIN" Cc: Ricardo Martincoski Cc: Peter Korsgaard Cc: Maxime Hadjinlian Reviewed-by: Ricardo Martincoski Tested-by: Ricardo Martincoski Signed-off-by: Peter Korsgaard --- 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}"