public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ihor Solodrai <ihor.solodrai@linux.dev>
To: Gary Guo <gary@garyguo.net>, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/gen-btf.sh: fix shebang for NixOS
Date: Tue, 20 Jan 2026 10:59:03 -0800	[thread overview]
Message-ID: <b53ee085-d9d2-4365-a5bc-d61e2bce97f8@linux.dev> (raw)
In-Reply-To: <20260120182034.3647092-1-gary@kernel.org>

On 1/20/26 10:20 AM, Gary Guo wrote:
> From: Gary Guo <gary@garyguo.net>
> 
> NixOS only puts /usr/bin/env and /bin/sh at the standard location as
> required by POSIX, but not other shells. Other program that kernel build
> depends on is supplied via PATH, so shebang needs to use /usr/bin/env to
> find them.
> 
> This has been done to a few other scripts already, e.g.
> gen_test_kallsyms.sh or decode_stacktrace.sh.
> 
> Fixes: 522397d05e7d ("resolve_btfids: Change in-place update with raw binary output")
> Signed-off-by: Gary Guo <gary@garyguo.net>
> ---
>  scripts/gen-btf.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/gen-btf.sh b/scripts/gen-btf.sh
> index be21ccee3487..4cd3159f2ddb 100755
> --- a/scripts/gen-btf.sh
> +++ b/scripts/gen-btf.sh
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/usr/bin/env bash
>  # SPDX-License-Identifier: GPL-2.0
>  # Copyright (c) 2025 Meta Platforms, Inc. and affiliates.
>  #
> 
> base-commit: 053966c344dbd346e71305f530e91ea77916189f

Hi Gary, thanks for the patch.

I'm guessing this came up because gen-btf.sh is part of the vmlinux
build, and link-vmlinux.sh has #!/bin/sh (not bash).

But I wonder if all of these need the same change then:

$ git log --oneline -n1
24d479d26b25 (HEAD, tag: v6.19-rc6) Linux 6.19-rc6
$ grep -r '#!/bin/bash' ./scripts/
./scripts/check-uapi.sh:#!/bin/bash
./scripts/decodecode:#!/bin/bash
./scripts/extract-fwblobs:#!/bin/bash
./scripts/gfp-translate:#!/bin/bash
./scripts/git-resolve.sh:#!/bin/bash
./scripts/mkuboot.sh:#!/bin/bash
./scripts/objdiff:#!/bin/bash
./scripts/objdump-func:#!/bin/bash
./scripts/prune-kernel:#!/bin/bash
./scripts/tags.sh:#!/bin/bash
./scripts/tracing/ftrace-bisect.sh:#!/bin/bash
./scripts/livepatch/klp-build:#!/bin/bash


  reply	other threads:[~2026-01-20 18:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 18:20 [PATCH] scripts/gen-btf.sh: fix shebang for NixOS Gary Guo
2026-01-20 18:59 ` Ihor Solodrai [this message]
2026-01-20 19:15   ` Gary Guo
2026-01-20 19:38     ` Thomas Weißschuh
2026-01-20 19:53       ` Ihor Solodrai
2026-01-20 23:54         ` Gary Guo
2026-01-21  4:49           ` Ihor Solodrai
2026-01-21  4:52             ` Alexei Starovoitov
2026-01-21  5:04               ` Ihor Solodrai
2026-01-21 16:09                 ` Alexei Starovoitov

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=b53ee085-d9d2-4365-a5bc-d61e2bce97f8@linux.dev \
    --to=ihor.solodrai@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=gary@garyguo.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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