Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2638940imu; Tue, 6 Nov 2018 19:10:58 -0800 (PST) X-Google-Smtp-Source: AJdET5fhe7lSbd9XODXJmTkMTjsUzT5qrfNFhmaz13orHy0ToMlBn3a1uu9jfrgJjXbRCWevzHDe X-Received: by 2002:a17:902:8f94:: with SMTP id z20-v6mr175641plo.175.1541560258439; Tue, 06 Nov 2018 19:10:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541560258; cv=none; d=google.com; s=arc-20160816; b=HnzFFl3yhs706VVXUvnUY+/PHyBZ/HfqWgpoZzqw9bE5QyWTDEmab2WCNvjrbIhX4c wpnDSW5MQXx+lJqzd/+Q+t6ve33eAgN6DQLtsWx1NsjCn98s7ct2baYcB/ouShl8bp3O j3+7JP5xdNz4NWerVJ6H093y1ynv+LquO2IAIPyfJWdepAr/CwJteaAs/HWPckzZVOyU XMMqXsQyw9bKVavZuK1MXKd2cqgFGzT4HTtQcCAP92i9wbYeeWvhHHJ4Tq4Hawmm5x4A pmyxGq85vGl7n+I5wCbOKC1ZX17lrOonDKjOYj9C8HI/HJz8wWyN+VjBZv8ggmlUh/1Z hQug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=0KxGE1l1hvDwEvo5Dt6Q6KB46aDDi66kl6cr8tjhWXg=; b=s12kz1c35qavnBYka3fS9eHwdNlpO3P3z5RKMObuiTqa6R0HG7PQepk2Iy29cBbZ+U y0ImKy6rScqYSsetjS50nXIEaJidL1MyYnPiGaw79YNe+vKfSMH9zqdTcImQHRZNj9Kg l0kuZbioIQe+ps2PfnmgzPdnj6Sbm0g6k7fPspldqtxcU6lLW9RiMfsmVacBjo886t5X lJPGXyqsli1p66MagpRAlm/IqhI/Vep13CvDidEi43HLCmlfped7xk9qM3P7Nu6WvJMp hgTU+jvBmZh3o0pboAnlVC6mcJTCcHFjrIaQPfO20X61+MR3sx2PK2anwmt41dIGe6LQ 2lxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f69-v6si40665618pgc.304.2018.11.06.19.10.40; Tue, 06 Nov 2018 19:10:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389303AbeKGMcW (ORCPT + 99 others); Wed, 7 Nov 2018 07:32:22 -0500 Received: from trent.utfs.org ([94.185.90.103]:50490 "EHLO trent.utfs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727749AbeKGMcW (ORCPT ); Wed, 7 Nov 2018 07:32:22 -0500 X-Greylist: delayed 343 seconds by postgrey-1.27 at vger.kernel.org; Wed, 07 Nov 2018 07:32:21 EST Received: from localhost (localhost [IPv6:::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by trent.utfs.org (Postfix) with ESMTPS id 5DCA25FA7B; Wed, 7 Nov 2018 03:58:13 +0100 (CET) Date: Tue, 6 Nov 2018 18:58:13 -0800 (PST) From: Christian Kujau To: Brian Norris cc: Genki Sky , Guenter Roeck , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" In-Reply-To: <20181107022156.GA254567@google.com> Message-ID: References: <1541527838-4585-1-git-send-email-linux@roeck-us.net> <20181106.192305.406697677@genki.is> <20181107022156.GA254567@google.com> User-Agent: Alpine 2.21.999 (DEB 277 2018-05-20) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 6 Nov 2018, Brian Norris wrote: > > Perhaps both scenarios could be satisfied by having > > scripts/setlocalversion first check if .git has write permissions, and > > acting accordingly. Looking into history, this actually used to be > > done, but cdf2bc632ebc ("scripts/setlocalversion on write-protected > > source tree", 2013-06-14) removed the updating of the index. > > A "writeable" check (e.g., [ -w . ]) would be sufficient for our case. > But I'm not so sure about that older NFS report, and I'm also not sure > that we should be writing to the source tree at all in this case. Maybe > we can also check whether there's a build output directory specified? FWIW, the issue I reported back in 2013[0] was not an ill-configured NFS export, but a read-only NFS export (and then a read-write exported NFS export, but the user compiling the kernel did not have write permission) and so "test -w .git" did not help in determining if the source tree can actually written to. And depending on the user's shell[1], this may or may not still be the case. So I'm all for the $(touch .git/some-file-here) test to decide if the kernel has to be modified during build. Christian. [0] https://lkml.org/lkml/2013/6/14/574 [1] https://manpages.debian.org/unstable/dash/dash.1.en.html > > However, I admit I don't understand the justification in that commit > > from 2013. I'm no NFS expert, but perhaps the real problem there is an > > incorrectly configured NFS setup (uid/gid mismatch between NFS > > client/server, or permissions mismatch between mount options and NFS > > server?). Christian Kujau: can you speak to that? > > > > Well, we could also make our check $(touch .git/some-file-here > > 2>/dev/null && ...) instead of $(test -w .git) to handle misconfigured > > NFS setups. But not sure if that has its own problems. > > Trying to 'touch' the source tree will also break us. No matter whether > you redirect stderr, our sandbox will still notice the build is doing > something fishy and complain. -- BOFH excuse #192: runaway cat on system.