From patchwork Tue Sep 1 15:11:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 248936 Delivered-To: patch@linaro.org Received: by 2002:a17:906:6447:0:0:0:0 with SMTP id l7csp3723432ejn; Tue, 1 Sep 2020 09:14:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWZATJ43Vuv9o1RbTWBoQ4xr0pQLffHd0CAaCFOuBcGatjID96kNn2N+3zOMp6qCJRMIv2 X-Received: by 2002:a17:906:aac7:: with SMTP id kt7mr2119793ejb.548.1598976874108; Tue, 01 Sep 2020 09:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598976874; cv=none; d=google.com; s=arc-20160816; b=G9q5l65Xd4bnaA26mwpmfgnekC9vKPcNi7G2Q+DA+Ux2lodyuvPueDwyDr8q7LOygA PLHKvUH0b+te2EiF/dJDnry2mid9O1mSolH9jezhyPNIDq0FmCrPNM5TJe2GgTjj3Nas 8WTS/OjZaJITFNAHosIOkeU8TmCA5X+rqv8Ao0kopMvODmA2gkngqS07VqzoLrGCBqnf Tx4g8XQTXPJJu9L9h9kt18YDe0VIVOIBwoInxCOe6hUaFddV4+p6RmznogpM4JdP2ZVm 7L/XiE6C4b85gSAMzSBR/JirpCINZdYWHS8PHgfGu2MaymztTjiidRtsarMz6ueLCjhl JJYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j19i1Ki852vKTDVvXGCl2OhjuRFBvfU8i5gMbnaXjNc=; b=ij8u+g526ZccE9TsQSWCd2KUFgSB6LSnjPB7ZLsE2obRTuZZR3dRz/jCU2xVkuuG3h 3evjTK7PjnTATrqUR+hrPQxY3Qg1cyGXm2fvWR4oXSeQnIBRijHsIWhKT9khiIM7Ag+s yaSzMxe9vitGb4t5sAK1e1ASmfMLhLlgSwbQ7wBUkYqVAV74+UFwa3xvGKuweQyNRl+s kA5qlV1YH8SpLufyM1eUicbBD5ulMxF9vdVfcMFfp3UtYsKaqGpZxCHJa6Vkjt2Bq7cB Mzl8sOge/3WyFR0b0AZWA5Ne/eeDAIXF+u/azVddkDCH8oHLBMbKpiG21iBQI8phwXj3 SyUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o50LXZrz; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si886205eju.153.2020.09.01.09.14.33; Tue, 01 Sep 2020 09:14:34 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=o50LXZrz; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731726AbgIAQOb (ORCPT + 15 others); Tue, 1 Sep 2020 12:14:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:40996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731133AbgIAPfT (ORCPT ); Tue, 1 Sep 2020 11:35:19 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 67F0D21534; Tue, 1 Sep 2020 15:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598974518; bh=6rbQeazlOHI8QHX/gELFfQVrLBu/1GXRAgCTuifkOAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o50LXZrzKk9yk+xkFj4iokOItu0O1CxC06xwG6oDBznmXUS8GqGd44mWRhVwUfqXJ MBz4WlM1QsKvQ5iTKKnQGMeqsNTlhS4oDO9Odwhhi79GmBQxIMAKIXTh3mcbzOpy2P i7w939iZImhkDkfUD3NJ4q/ZRmhz8zDVFmqPnVEw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Matthias Maennich Subject: [PATCH 5.4 208/214] kheaders: remove the last bashism to allow sh to run it Date: Tue, 1 Sep 2020 17:11:28 +0200 Message-Id: <20200901151002.887700110@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200901150952.963606936@linuxfoundation.org> References: <20200901150952.963606936@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Masahiro Yamada commit 1463f74f492eea7191f0178e01f3d38371a48210 upstream. 'pushd' ... 'popd' is the last bash-specific code in this script. One way to avoid it is to run the code in a sub-shell. With that addressed, you can run this script with sh. I replaced $(BASH) with $(CONFIG_SHELL), and I changed the hashbang to #!/bin/sh. Signed-off-by: Masahiro Yamada Signed-off-by: Matthias Maennich Signed-off-by: Greg Kroah-Hartman --- kernel/Makefile | 2 +- kernel/gen_kheaders.sh | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) --- a/kernel/Makefile +++ b/kernel/Makefile @@ -128,7 +128,7 @@ $(obj)/config_data.gz: $(KCONFIG_CONFIG) $(obj)/kheaders.o: $(obj)/kheaders_data.tar.xz quiet_cmd_genikh = CHK $(obj)/kheaders_data.tar.xz - cmd_genikh = $(BASH) $(srctree)/kernel/gen_kheaders.sh $@ + cmd_genikh = $(CONFIG_SHELL) $(srctree)/kernel/gen_kheaders.sh $@ $(obj)/kheaders_data.tar.xz: FORCE $(call cmd,genikh) --- a/kernel/gen_kheaders.sh +++ b/kernel/gen_kheaders.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # SPDX-License-Identifier: GPL-2.0 # This script generates an archive consisting of kernel headers @@ -57,11 +57,12 @@ rm -rf $cpio_dir mkdir $cpio_dir if [ "$building_out_of_srctree" ]; then - pushd $srctree > /dev/null - for f in $dir_list - do find "$f" -name "*.h"; - done | cpio --quiet -pd $cpio_dir - popd > /dev/null + ( + cd $srctree + for f in $dir_list + do find "$f" -name "*.h"; + done | cpio --quiet -pd $cpio_dir + ) fi # The second CPIO can complain if files already exist which can happen with out