public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/1] tools: use basename to identify file in gen-mach-types
@ 2025-08-26 14:25 Alexander Stein
  2025-11-07 14:42 ` Alexander Stein
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Stein @ 2025-08-26 14:25 UTC (permalink / raw)
  To: Russell King
  Cc: Bruce Ashfield, linux-arm-kernel, linux-kernel, Alexander Stein

From: Bruce Ashfield <bruce.ashfield@gmail.com>

FILENAME is replaced by the full path to the executing script. If
the script is executed via a fully specified path, that is captured
in the output. Although it doesn't impact the output, it does trigger
reproducibility warnings/errors.

So we introduce a basename() function in the script and use it to
make sure the output file contains only the name of the awk script.
The motivation for this change is Yocto emitting a build warning
  WARNING: linux-tq-6.12.41+git-r0 do_package_qa: QA Issue: File /usr/src/debug/linux-tq/6.12.41+git/arch/arm/include/generated/asm/mach-types.h in package linux-tq-src contains reference to TMPDIR [buildpaths]

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 arch/arm/tools/gen-mach-types | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types
index cbe1c33bb8710..ab69d408f9e12 100644
--- a/arch/arm/tools/gen-mach-types
+++ b/arch/arm/tools/gen-mach-types
@@ -21,10 +21,14 @@ NF == 3 {
 	  num[nr] = ""; nr++
 	}
 
+	function basename(file) {
+	   sub(".*/", "", file)
+	   return file
+	}
 
 END	{
 	  printf("/*\n");
-	  printf(" * This was automagically generated from %s!\n", FILENAME);
+	  printf(" * This was automagically generated from %s!\n", basename(FILENAME));
 	  printf(" * Do NOT edit\n");
 	  printf(" */\n\n");
 	  printf("#ifndef __ASM_ARM_MACH_TYPE_H\n");
-- 
2.43.0



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

* Re: [PATCH 1/1] tools: use basename to identify file in gen-mach-types
  2025-08-26 14:25 [PATCH 1/1] tools: use basename to identify file in gen-mach-types Alexander Stein
@ 2025-11-07 14:42 ` Alexander Stein
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Stein @ 2025-11-07 14:42 UTC (permalink / raw)
  To: Russell King; +Cc: Bruce Ashfield, linux-arm-kernel, linux-kernel

Hello,

Am Dienstag, 26. August 2025, 16:25:17 CET schrieb Alexander Stein:
> From: Bruce Ashfield <bruce.ashfield@gmail.com>
> 
> FILENAME is replaced by the full path to the executing script. If
> the script is executed via a fully specified path, that is captured
> in the output. Although it doesn't impact the output, it does trigger
> reproducibility warnings/errors.
> 
> So we introduce a basename() function in the script and use it to
> make sure the output file contains only the name of the awk script.
> The motivation for this change is Yocto emitting a build warning
>   WARNING: linux-tq-6.12.41+git-r0 do_package_qa: QA Issue: File /usr/src/debug/linux-tq/6.12.41+git/arch/arm/include/generated/asm/mach-types.h in package linux-tq-src contains reference to TMPDIR [buildpaths]
> 
> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Any feedback on this?

Thanks and best regards,
Alexander

> ---
>  arch/arm/tools/gen-mach-types | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types
> index cbe1c33bb8710..ab69d408f9e12 100644
> --- a/arch/arm/tools/gen-mach-types
> +++ b/arch/arm/tools/gen-mach-types
> @@ -21,10 +21,14 @@ NF == 3 {
>  	  num[nr] = ""; nr++
>  	}
>  
> +	function basename(file) {
> +	   sub(".*/", "", file)
> +	   return file
> +	}
>  
>  END	{
>  	  printf("/*\n");
> -	  printf(" * This was automagically generated from %s!\n", FILENAME);
> +	  printf(" * This was automagically generated from %s!\n", basename(FILENAME));
>  	  printf(" * Do NOT edit\n");
>  	  printf(" */\n\n");
>  	  printf("#ifndef __ASM_ARM_MACH_TYPE_H\n");
> 


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/




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

end of thread, other threads:[~2025-11-07 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26 14:25 [PATCH 1/1] tools: use basename to identify file in gen-mach-types Alexander Stein
2025-11-07 14:42 ` Alexander Stein

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