* [PATCH] GTM19-448: Fix script to work without realpath
@ 2024-11-12 18:38 Aleksandar Rakic
2024-11-12 19:54 ` Richard Henderson
2024-11-12 21:18 ` Alex Bennée
0 siblings, 2 replies; 3+ messages in thread
From: Aleksandar Rakic @ 2024-11-12 18:38 UTC (permalink / raw)
To: qemu-devel
Cc: djordje.todorovic, cfu, arikalo, philmd, Aleksandar Rakic,
Faraz Shahbazker
The archive-source.sh script depends on realpath command, which was
introduced in coreutils-8.15. CentOS-6 build systems use coreutils-4.7,
which does not have realpath, so fix the script to use 'readlink -e' to
perform the same action.
Cherry-picked 5d1d5766f0219ce2bec4e41c2467317df920ec0a
and 8003ab4032772a0e5b46e5983fe06268d3469289
from https://github.com/MIPS/gnutools-qemu
An instance of a pipeline of QEMU CI jobs run with input
variable QEMU_CI=1 for this patch is available here:
https://gitlab.com/rakicaleksandar1999/qemu/-/pipelines/1538854588
and for the master branch is available here:
https://gitlab.com/rakicaleksandar1999/qemu/-/pipelines/1533465414
Signed-off-by: Faraz Shahbazker <fshahbazker@wavecomp.com>
Signed-off-by: Chao-ying Fu <cfu@mips.com>
Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com>
---
scripts/archive-source.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index 30677c3ec9..bfaa0c1483 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -18,7 +18,13 @@ if test $# -lt 1; then
error "Usage: $0 <output tarball>"
fi
-tar_file=$(realpath "$1")
+which realpath
+if [ $? -eq 0 ]; then
+ tar_file=$(realpath -s "$1")
+else
+ d=$(dirname "$1")
+ tar_file=$(readlink -e "$d")"/"$(basename "$1")
+fi
sub_tdir=$(mktemp -d "${tar_file%.tar}.sub.XXXXXXXX")
sub_file="${sub_tdir}/submodule.tar"
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] GTM19-448: Fix script to work without realpath
2024-11-12 18:38 [PATCH] GTM19-448: Fix script to work without realpath Aleksandar Rakic
@ 2024-11-12 19:54 ` Richard Henderson
2024-11-12 21:18 ` Alex Bennée
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2024-11-12 19:54 UTC (permalink / raw)
To: Aleksandar Rakic, qemu-devel
Cc: djordje.todorovic, cfu, arikalo, philmd, Aleksandar Rakic,
Faraz Shahbazker
On 11/12/24 10:38, Aleksandar Rakic wrote:
> The archive-source.sh script depends on realpath command, which was
> introduced in coreutils-8.15. CentOS-6 build systems use coreutils-4.7,
> which does not have realpath, so fix the script to use 'readlink -e' to
> perform the same action.
Centos 6 is not supported. Neither is Centos 7, come to that.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] GTM19-448: Fix script to work without realpath
2024-11-12 18:38 [PATCH] GTM19-448: Fix script to work without realpath Aleksandar Rakic
2024-11-12 19:54 ` Richard Henderson
@ 2024-11-12 21:18 ` Alex Bennée
1 sibling, 0 replies; 3+ messages in thread
From: Alex Bennée @ 2024-11-12 21:18 UTC (permalink / raw)
To: Aleksandar Rakic
Cc: qemu-devel, djordje.todorovic, cfu, arikalo, philmd,
Aleksandar Rakic, Faraz Shahbazker
Aleksandar Rakic <rakicaleksandar1999@gmail.com> writes:
> The archive-source.sh script depends on realpath command, which was
> introduced in coreutils-8.15. CentOS-6 build systems use coreutils-4.7,
> which does not have realpath, so fix the script to use 'readlink -e' to
> perform the same action.
Isn't CentOS-6 outside of our supported build platform range? We aim for
latest stable release + 5 years. CentOS got to 8 before being replaced
with CentOS Stream.
>
> Cherry-picked 5d1d5766f0219ce2bec4e41c2467317df920ec0a
> and 8003ab4032772a0e5b46e5983fe06268d3469289
> from https://github.com/MIPS/gnutools-qemu
>
> An instance of a pipeline of QEMU CI jobs run with input
> variable QEMU_CI=1 for this patch is available here:
> https://gitlab.com/rakicaleksandar1999/qemu/-/pipelines/1538854588
> and for the master branch is available here:
> https://gitlab.com/rakicaleksandar1999/qemu/-/pipelines/1533465414
>
> Signed-off-by: Faraz Shahbazker <fshahbazker@wavecomp.com>
> Signed-off-by: Chao-ying Fu <cfu@mips.com>
> Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com>
> ---
> scripts/archive-source.sh | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
> index 30677c3ec9..bfaa0c1483 100755
> --- a/scripts/archive-source.sh
> +++ b/scripts/archive-source.sh
> @@ -18,7 +18,13 @@ if test $# -lt 1; then
> error "Usage: $0 <output tarball>"
> fi
>
> -tar_file=$(realpath "$1")
> +which realpath
> +if [ $? -eq 0 ]; then
> + tar_file=$(realpath -s "$1")
> +else
> + d=$(dirname "$1")
> + tar_file=$(readlink -e "$d")"/"$(basename "$1")
> +fi
> sub_tdir=$(mktemp -d "${tar_file%.tar}.sub.XXXXXXXX")
> sub_file="${sub_tdir}/submodule.tar"
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-12 21:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 18:38 [PATCH] GTM19-448: Fix script to work without realpath Aleksandar Rakic
2024-11-12 19:54 ` Richard Henderson
2024-11-12 21:18 ` Alex Bennée
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.