[PATCH] kbuild: Use uname for BAREBOX_COMPILE_HOST
David Dgien via B4 Relay
devnull+dgienda125.gmail.com at kernel.org
Fri Jan 31 19:59:08 PST 2025
From: David Dgien <dgienda125 at gmail.com>
Adoption of Linux Commit:
| commit 1e66d50ad3a1dbf0169b14d502be59a4b1213149
| Author: Chris Down <chris at chrisdown.name>
| Date: Tue Oct 20 10:34:59 2020 +0100
|
| kbuild: Use uname for LINUX_COMPILE_HOST detection
|
| `hostname` may not be present on some systems as it's not mandated by
| POSIX/SUSv4. This isn't just a theoretical problem: on Arch Linux,
| `hostname` is provided by `inetutils`, which isn't part of the base
| distribution.
|
| ./scripts/mkcompile_h: line 38: hostname: command not found
|
| Use `uname -n` instead, which is more likely to be available (and
| mandated by standards).
|
| Signed-off-by: Chris Down <chris at chrisdown.name>
| Signed-off-by: Masahiro Yamada <masahiroy at kernel.org>
Signed-off-by: David Dgien <dgienda125 at gmail.com>
---
scripts/mkcompile_h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 49aadc153d44995c23ccc5bc604c2370384387ae..0cc6aa8f0585767435fc6c8537b878925a81a691 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -46,7 +46,7 @@ else
BAREBOX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
- BAREBOX_COMPILE_HOST=`hostname`
+ BAREBOX_COMPILE_HOST=`uname -n`
else
BAREBOX_COMPILE_HOST=$KBUILD_BUILD_HOST
fi
---
base-commit: b2a15c383ddc4f31792e48e395a425e5c3658dd1
change-id: 20250131-hostname-fix-5171778dd905
Best regards,
--
David Dgien <dgienda125 at gmail.com>
More information about the barebox
mailing list