mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: David Dgien via B4 Relay <devnull+dgienda125.gmail.com@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	 BAREBOX <barebox@lists.infradead.org>
Cc: David Dgien <dgienda125@gmail.com>
Subject: [PATCH] kbuild: Use uname for BAREBOX_COMPILE_HOST
Date: Fri, 31 Jan 2025 22:59:08 -0500	[thread overview]
Message-ID: <20250131-hostname-fix-v1-1-8d7ae619fcf4@gmail.com> (raw)

From: David Dgien <dgienda125@gmail.com>

Adoption of Linux Commit:

| commit 1e66d50ad3a1dbf0169b14d502be59a4b1213149
| Author: Chris Down <chris@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@chrisdown.name>
|     Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Signed-off-by: David Dgien <dgienda125@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@gmail.com>





             reply	other threads:[~2025-02-01  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-01  3:59 David Dgien via B4 Relay [this message]
2025-02-03  9:18 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250131-hostname-fix-v1-1-8d7ae619fcf4@gmail.com \
    --to=devnull+dgienda125.gmail.com@kernel.org \
    --cc=barebox@lists.infradead.org \
    --cc=dgienda125@gmail.com \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox