From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EEC3344D02C for ; Tue, 20 Jan 2026 18:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768935566; cv=none; b=X0xrRF4nbpPCrqZ9lFCmiEXtRz7VxShVaEzcSc7/rjKxj8cbA1w2GFErb0Gv19kI+Wxbdw3/Htrm8YT1emJ+aABX9gqulPs838D+KFUNeBc1IFMkAIKL+me7G6Goi4V6fjlPV3aVbYg+2vG+EhrBTME3zfE0c9EGTPLuiWtgnsg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768935566; c=relaxed/simple; bh=Ta27cmPUr9U6KYn68SgfQJZDlRR8kgDyO1DzrKY4nn4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Qk8apuEuYKyxQL2/Li/y2sUtNOw9Edj2FHAVPdPYGco0B7HBPqwGUHFIO8nsj7/DA8au+2PxeFkfPaMiIo0xLaSub1kcd0TPP5o9eEad04XP4Z1gZTYSFRDhed/o6Y1bWuZIwR1FOkmQ5QI6RYbSczzmaSeTMVGmXaPbAOq1Oy0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=hSyEHjj/; arc=none smtp.client-ip=91.218.175.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="hSyEHjj/" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1768935550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EzSGa4fk8ZToFJf/TRU+xKf4WcJa5YezEBW6JkV0l2Y=; b=hSyEHjj/V2Pw3FaA3O4SwuRNxlcKF1AhXZIB7yifbJ+FDBQxgwJS6c64Izk72DlQSap1jX LT93waZ+MH2qZapd5V99OaMulGNPRn8AUYN2IkMj+vDXYoEjEPi3CadUu3DwwSLsS4PGQm Yw7GPOogmCU/763bYPmIXP42B+/vHEc= Date: Tue, 20 Jan 2026 10:59:03 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] scripts/gen-btf.sh: fix shebang for NixOS To: Gary Guo , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260120182034.3647092-1-gary@kernel.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Ihor Solodrai In-Reply-To: <20260120182034.3647092-1-gary@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 1/20/26 10:20 AM, Gary Guo wrote: > From: Gary Guo > > 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 > --- > 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