From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 0E13C37F0E4 for ; Tue, 20 Jan 2026 19:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768938834; cv=none; b=kT1bfSOcQSIBmwbiXMHjVPe91yZ4gQCTu54AsJ2hLu2x8ddqRqeQHtLewTqQhG9WIkrSYYXr341BsNCHyrdWV1MAIhMLfy91Gqe3adEw33GU/+SGbJqJuyOEBS5UX9xibkIbs25kATttuR9VAYNSVlEyT4uV2uwWlilDiGqaYW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768938834; c=relaxed/simple; bh=SGry9sh68kwELDKIdJIRRmG29w6MHwsJc9F33zh8doQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aniVscGurtKT4MCOfEOm609Yxr+6lCeeIeyoLXQtvZnSyXlxQbOfEVgbsUmBhaSDHjkUFNsF6LCMhFtvUKIUF2RIMOBCBYGc8Uk+As6nBYR4IXE4KZBJ3KHIjfKoGeJj6OgCjd5JXwNA4fji6rJGvRWYkX0tlpAyPDfACWr406s= 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=tK66K6ie; arc=none smtp.client-ip=91.218.175.182 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="tK66K6ie" Message-ID: <5364d5ec-f30c-40d6-9a99-c251fec3868c@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1768938829; 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=ZUGtXQFZZ4O5fl2DGSy010+08iBrE+9BMYtw/44nDN8=; b=tK66K6ieZW/6AujEvyXa7Fb5DjfKqaHcN7mWRzk9XVYfBw5U03m0upAbyWalvExZMDNdJ7 yynJ6VazMS9wdVDiTeayNZEUMoXhhNuKDo8tP+kB5Nkgehq31elNQlwElPB1EwfxaGg9tr pFhOqdrz5CKiTzUOZTROAEjuBP+AQHs= Date: Tue, 20 Jan 2026 11:53:42 -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: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Gary Guo Cc: 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 , 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: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 1/20/26 11:38 AM, Thomas Weißschuh wrote: > On 2026-01-20 19:15:11+0000, Gary Guo wrote: >> On Tue Jan 20, 2026 at 6:59 PM GMT, Ihor Solodrai wrote: >>> 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). >> >> My typical experience is that when I see an error about /bin/bash not found, I >> just use "bash