[2/1] perf tools: don't include signature in version strings

Message ID 20221226195015.venelpockrns7uk4@tarta.nabijaczleweli.xyz
State New
Headers
Series None |

Commit Message

Ahelenia Ziemiańska Dec. 26, 2022, 7:50 p.m. UTC
  This explodes the build if HEAD is signed, since the generated version
is gpg: Signature made Mon 26 Dec 2022 20:34:48 CET, then a few more
lines, then the SHA.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
 tools/perf/Documentation/Makefile | 2 +-
 tools/perf/util/PERF-VERSION-GEN  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

Namhyung Kim Dec. 27, 2022, 8:29 p.m. UTC | #1
On Mon, Dec 26, 2022 at 11:50 AM Ahelenia Ziemiańska
<nabijaczleweli@nabijaczleweli.xyz> wrote:
>
> This explodes the build if HEAD is signed, since the generated version
> is gpg: Signature made Mon 26 Dec 2022 20:34:48 CET, then a few more
> lines, then the SHA.
>
> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


> ---
>  tools/perf/Documentation/Makefile | 2 +-
>  tools/perf/util/PERF-VERSION-GEN  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
> index 6e7b88917ca0..ba5d942e4c6a 100644
> --- a/tools/perf/Documentation/Makefile
> +++ b/tools/perf/Documentation/Makefile
> @@ -267,7 +267,7 @@ $(OUTPUT)%.xml : %.txt
>         $(ASCIIDOC) -b docbook -d manpage \
>                 $(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) \
>                 -aperf_date=$(shell git log -1 --pretty="format:%cd" \
> -                               --date=short $<) \
> +                               --date=short --no-show-signature $<) \
>                 -o $@+ $< && \
>         mv $@+ $@
>
> diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
> index 3cc42821d9b3..d7dc7c28508c 100755
> --- a/tools/perf/util/PERF-VERSION-GEN
> +++ b/tools/perf/util/PERF-VERSION-GEN
> @@ -19,7 +19,7 @@ TAG=
>  if test -d ../../.git -o -f ../../.git
>  then
>         TAG=$(MAKEFLAGS= make -sC ../.. kernelversion)
> -       CID=$(git log -1 --abbrev=12 --pretty=format:"%h" 2>/dev/null) && CID="-g$CID"
> +       CID=$(git log -1 --abbrev=12 --pretty=format:"%h" --no-show-signature 2>/dev/null) && CID="-g$CID"
>  elif test -f ../../PERF-VERSION-FILE
>  then
>         TAG=$(cut -d' ' -f3 ../../PERF-VERSION-FILE | sed -e 's/\"//g')
> --
> 2.30.2
  

Patch

diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index 6e7b88917ca0..ba5d942e4c6a 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -267,7 +267,7 @@  $(OUTPUT)%.xml : %.txt
 	$(ASCIIDOC) -b docbook -d manpage \
 		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) \
 		-aperf_date=$(shell git log -1 --pretty="format:%cd" \
-				--date=short $<) \
+				--date=short --no-show-signature $<) \
 		-o $@+ $< && \
 	mv $@+ $@
 
diff --git a/tools/perf/util/PERF-VERSION-GEN b/tools/perf/util/PERF-VERSION-GEN
index 3cc42821d9b3..d7dc7c28508c 100755
--- a/tools/perf/util/PERF-VERSION-GEN
+++ b/tools/perf/util/PERF-VERSION-GEN
@@ -19,7 +19,7 @@  TAG=
 if test -d ../../.git -o -f ../../.git
 then
 	TAG=$(MAKEFLAGS= make -sC ../.. kernelversion)
-	CID=$(git log -1 --abbrev=12 --pretty=format:"%h" 2>/dev/null) && CID="-g$CID"
+	CID=$(git log -1 --abbrev=12 --pretty=format:"%h" --no-show-signature 2>/dev/null) && CID="-g$CID"
 elif test -f ../../PERF-VERSION-FILE
 then
 	TAG=$(cut -d' ' -f3 ../../PERF-VERSION-FILE | sed -e 's/\"//g')