Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5903959rwb; Tue, 17 Jan 2023 21:20:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXtt6QOoPDKsuBdcLv0y4bzq+vordmHJuXP3CDLdmF+Ndzrid/wv+a3n0zzMnFc5ThmAcu2Z X-Received: by 2002:a17:903:30c9:b0:193:37a7:cc1c with SMTP id s9-20020a17090330c900b0019337a7cc1cmr5781930plc.56.1674019235208; Tue, 17 Jan 2023 21:20:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674019235; cv=none; d=google.com; s=arc-20160816; b=GDqxhxQtRhmaurttfyfd8f6P6eQYZnA3JURR8DadSyVbxGVugprpBKmuBGyKtFHN/A lKVLIu7VSmMZj2j1EvKppoehAllCFuBTRmcTAhC0Ln47FQiONzk3BEW4uAIXbXdZ5EHO 2+Do5iLweOzd9jPHqqwqLlhjMP0diuDeJuBmcD1D1qawZ6Vsp6Bvx4jlpyQj9L8daLJm qH7rFse5BK28qvolopnihhLkzAcSF/a0fZMn+sMZnMzARcbfXWtPA6jcQ4dtCMdGXNyQ gbywAd33yQVfwZE+CPRwrhOIAN7ptzVwM/ASTz5mqrKQXLwlonZ3wZk/HxP5J6d+jyTR cUeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Q1Zux+Tv2nHujkRmp2hRgjm+2mEHFmo/kxBvq5ws0B8=; b=UGP6/+XMNUblktWhtopvRb148+SOS86zvALPVkOjpeh/P58JJmJPt+BnPWG6pdtPpi AafavXYdxip8jU0ETq/uRprKkk76D8kxv0tIZ2pBSUphOb0eY2BXvxgPxzpGAXd/D+wV YmtkUoFL0S1bcUBwvt8YzydtnnDoJfqXJht0ee6Kcyt1IWTiotG4sKz386VwEDGP2/Zy /tc/90MyOHpgsM78Zwm/4yXJd4xeSQ7DVuxrGDtBHsVL86PlzBhREA8uXC5OmSRUN30U zNmlT77emKtsagLC/D3hiFej+BYPQmsBwbXHGD5XpKtgdrUeydx9y8YzaEvgm2efQdXX 2DiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YEjnc3+m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m17-20020a170902db1100b00194b62f7147si1758865plx.345.2023.01.17.21.20.29; Tue, 17 Jan 2023 21:20:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YEjnc3+m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229690AbjARFDh (ORCPT + 47 others); Wed, 18 Jan 2023 00:03:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbjARFD2 (ORCPT ); Wed, 18 Jan 2023 00:03:28 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B688530F2; Tue, 17 Jan 2023 21:03:23 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1D5C0615B3; Wed, 18 Jan 2023 05:03:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 795C8C433F1; Wed, 18 Jan 2023 05:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674018202; bh=Z13dWD4V4kzQr0mX5r5RbTrVyA9DIQDhBvDTdQOR2PY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YEjnc3+mhyvHMw8QzoWaOOdZUI79wCJGlWhJAmeyuNs1Q/ZPZDm2ZQL3eVGdschH9 mSakoJKVbyrSsw68mjlxcNVlnyP806oZi1LsqgJM0ALsUwB7xNldGsWqhjGxOvNTW1 g/CDiyww+v8aFVpUuvxBuBRyRopX5dXS5uJuXVFywC0humpZvGWwb9VXlDbH73DU5K oU6lsSBTQyMH8LQVPB0p2mAtG3LU0ahUnLSJjAn4xJVn8GtbzqKj8h6ONbjvZTyF24 QC1TnNmTTFBODmIbQELpCrAN2BJwmf6eQ+PbHN2PiLpUzhl9PVBXaan7IVigwfYOZG qHRdea960jifA== Received: by mail-oi1-f182.google.com with SMTP id p185so6668354oif.2; Tue, 17 Jan 2023 21:03:22 -0800 (PST) X-Gm-Message-State: AFqh2koP3nMbcPfAn80fHbKYMJxTYUjrrYarHp8dp3xf0KFJ12aIdoF/ uJwJU9it6EL7Bb0idFjrCxjb21SJGNanct+Ok5M= X-Received: by 2002:aca:acd5:0:b0:364:5d10:7202 with SMTP id v204-20020acaacd5000000b003645d107202mr263716oie.194.1674018201671; Tue, 17 Jan 2023 21:03:21 -0800 (PST) MIME-Version: 1.0 References: <20230117-kernel-kheaders-gitignore-v2-1-1c29b3adf04a@weissschuh.net> <20230118005830.pqupfqnwwkd64q3g@t-8ch.de> In-Reply-To: <20230118005830.pqupfqnwwkd64q3g@t-8ch.de> From: Masahiro Yamada Date: Wed, 18 Jan 2023 14:02:45 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] kheaders: ignore and clean temporary kheaders_data directory To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Nicolas Schier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 18, 2023 at 10:10 AM Thomas Wei=C3=9Fschuh wrote: > > On Tue, Jan 17, 2023 at 11:24:47PM +0900, Masahiro Yamada wrote: > > On Tue, Jan 17, 2023 at 10:50 PM Thomas Wei=C3=9Fschuh wrote: > > > > > > If the kheaders archive generation is interrupted then this directory > > > may be left. > > > Ignore it, it will be deleted by the next run of kernel/gen_kheaders.= sh. > > > Also add it to clean-files so it can be cleaned up by make. > > > > > > Signed-off-by: Thomas Wei=C3=9Fschuh > > > > > > Or, just rename the temporary directory. > > For example, > > > > cpio_dir=3D$outdir/$(dirname $tarfile)/.tmp_cpio_dir > > > > > > > > Dot files are ignored. > > 'make clean' removes the .tmp_* pattern. > > This sounds great. > > Unfortunately 'make clean' only cleans files and not directories based > on this pattern. Agh, you are right. Can you extend .tmp_* to match any file type? Maybe, something like this? \( -name '*.[aios]' -o [snip] '*.*.symversions' \) -type f -print -o -name '.tmp_*' -print > > Should it be extended? > > > > --- > > > Changes in v2: > > > - Also add the directory to clean-files > > > - Link to v1: https://lore.kernel.org/r/20230117-kernel-kheaders-giti= gnore-v1-1-2a3a070efd0d@weissschuh.net > > > --- > > > kernel/.gitignore | 1 + > > > kernel/Makefile | 2 +- > > > 2 files changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/kernel/.gitignore b/kernel/.gitignore > > > index c6b299a6b786..57ab1d703763 100644 > > > --- a/kernel/.gitignore > > > +++ b/kernel/.gitignore > > > @@ -1,3 +1,4 @@ > > > # SPDX-License-Identifier: GPL-2.0-only > > > /config_data > > > /kheaders.md5 > > > +/kheaders_data.tar.xz.tmp/ > > > diff --git a/kernel/Makefile b/kernel/Makefile > > > index 10ef068f598d..f3535944f635 100644 > > > --- a/kernel/Makefile > > > +++ b/kernel/Makefile > > > @@ -156,4 +156,4 @@ quiet_cmd_genikh =3D CHK $(obj)/kheaders_data= .tar.xz > > > $(obj)/kheaders_data.tar.xz: FORCE > > > $(call cmd,genikh) > > > > > > -clean-files :=3D kheaders_data.tar.xz kheaders.md5 > > > +clean-files :=3D kheaders_data.tar.xz kheaders.md5 kheaders_data.tar= .xz.tmp > > > > > > --- > > > base-commit: d532dd102151cc69fcd00b13e5a9689b23c0c8d9 > > > change-id: 20230117-kernel-kheaders-gitignore-f0d73456cb6b > > > > > > Best regards, > > > -- > > > Thomas Wei=C3=9Fschuh --=20 Best Regards Masahiro Yamada