Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2675782imu; Tue, 6 Nov 2018 20:03:44 -0800 (PST) X-Google-Smtp-Source: AJdET5dI1s2gX+e+2Sg2bP+pZoXpAhHJ5cf9tD4MXhpB1ff1NTqDEYRCzOT8Syt1lv7L0Cg4RNKc X-Received: by 2002:a63:2d46:: with SMTP id t67mr322593pgt.140.1541563424337; Tue, 06 Nov 2018 20:03:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541563424; cv=none; d=google.com; s=arc-20160816; b=lEy4/o2p3bhq66VrjMVQKlZt3TlKXIkHtZO+bNKWU5159xxODtGaTYCR5h8YIjvc0J qo8NzFc4RmyxzjwDabtLH6wB05osfeeCxXWbQkA4/DgQJhJllJupZxmg4jD/inWPQEKc vLE9UvcTuGc1jItOn2Q5RzgXpLB1YQG+t/2HbVVDagcQbk+YzMViBCCNauheZXUgb18C u5VC3Evzr6bDKq0l+3lg5KMsoPPdmfnDrmxSet7Z/pmJ3BUYd16wL8Q2ijxEw2b0Hskh rz6DW/hhUqgkREQKYf9MJlGePdYgVp4/SIjLHGPvOAA6e2d67ktZBnr2eH04CmE0OxTu xPNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2TVMpBB+/DkTSAzbKQ3yKJofOCjBMw+vqbxmlxaqX54=; b=pieRBEQB829GbRZTC8RAeILGc6anNf5A/w97fqvtdCYR1Zbk3uXCtVx0TyDi3+gR80 qLtbxeQQeHsd1PyKPogqYwpikaNyQJ+Oo7Wy/X4E17/QI287ey+Ia+JIRHlmA4tD0xJo v1LlRmTytdytdsjVq09NTQ7UtVEJHDwxPGAZPgwqKLhce2mpU5OWolICtK1y5RLlx/Do B8c+feeL0RRgdxXxnJnmiRuyiIfyaNNkMIU7rIQcYkHmhef6ZBohX6l0AGXL0XbjWOJt FmSNwrIP3YPjCtzl20dxwBZdHi4bPdpi9CvV+lysXbTUGmjqsXMcOeCNBhNsFqgUooCS QjMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CEHyUHzJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 194si22902617pgg.519.2018.11.06.20.03.28; Tue, 06 Nov 2018 20:03:44 -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; dkim=pass header.i=@chromium.org header.s=google header.b=CEHyUHzJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730766AbeKGN3Z (ORCPT + 99 others); Wed, 7 Nov 2018 08:29:25 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:53220 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726312AbeKGN3Z (ORCPT ); Wed, 7 Nov 2018 08:29:25 -0500 Received: by mail-it1-f196.google.com with SMTP id t190-v6so15402482itb.2 for ; Tue, 06 Nov 2018 20:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2TVMpBB+/DkTSAzbKQ3yKJofOCjBMw+vqbxmlxaqX54=; b=CEHyUHzJEVdMEAPFT0/PCRezrhZMPNt25858rx6geg59XNvxrqYoKuIkUnGG8DyGbw PprzOle/uxVVVyYrSNaMnLJMYp2jctdJsH6/8gADp1nUZMBBxdDWJl0E5SaDrxlJT02t FSH+zTdmiwLOSji1E0k/JTKz6DraZP7XGrtnA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2TVMpBB+/DkTSAzbKQ3yKJofOCjBMw+vqbxmlxaqX54=; b=oYt7s8ZCSEjrwOAm1nlJ2PJfhqXq/96unpV0p02mLajmNB0l5r7hTUxFn+pMi1RhVi 8MY3rQQjOjpFWcu7IOrvxzcn0OdKFuKCqhasYFNMPw7JrFQx5nyAhtWkF3aiQYCR1nct poHiaZZGHTYNDvjnE4xbd7s5ZZSkhgdEHxuTMQ1FXsrpec/HxPRVnTk48sSn3d4v0Th5 +pnvVAh+sYqjyktYqJPJp4T9FEaheeykkComs13kKxsws60iazRG5I6cEEDpp4Hf4r2e GAZwahPV27Q5kaYNOjhtQQ3C2sjfGliTR5Uq5iiejaubTqkqvDFzIGTNaxxMf003Pze+ D2JA== X-Gm-Message-State: AGRZ1gJ0bPR8p7umQg93eEIY9S0tMybjApyLNM8ByLl7IvDNChxW1mZy 9ykg3N0QygR2Zg1pDeKtPrmCQxbTzAI= X-Received: by 2002:a02:3545:: with SMTP id y5-v6mr234718jae.7.1541563250937; Tue, 06 Nov 2018 20:00:50 -0800 (PST) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com. [209.85.166.43]) by smtp.gmail.com with ESMTPSA id f2sm1498628itb.44.2018.11.06.20.00.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Nov 2018 20:00:49 -0800 (PST) Received: by mail-io1-f43.google.com with SMTP id a5-v6so10963634ioq.8 for ; Tue, 06 Nov 2018 20:00:49 -0800 (PST) X-Received: by 2002:a6b:dc06:: with SMTP id s6-v6mr178399ioc.139.1541563248803; Tue, 06 Nov 2018 20:00:48 -0800 (PST) MIME-Version: 1.0 References: <1541527838-4585-1-git-send-email-linux@roeck-us.net> <20181106.192305.406697677@genki.is> <20181107022156.GA254567@google.com> In-Reply-To: From: Brian Norris Date: Tue, 6 Nov 2018 20:00:36 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" To: lists@nerdbynature.de Cc: sky@genki.is, Guenter Roeck , yamada.masahiro@socionext.com, Linux Kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 6, 2018 at 6:58 PM Christian Kujau wrote: > 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. What do you mean, "depending on the user's shell"? AFAICT, it's not really a shell-specific question, since POSIX defines '-w': http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html (I highly doubt we care about a non-POSIX /bin/sh.) But the dash man-page you point at is correctly noting that 'test -w' isn't sufficient for noticing a read-only mount (i.e., you have permissions, but the mount isn't writeable). Contrary to what Guenter said in his reply, our build isn't actually off a read-only mount -- it's just running without these write permissions, so 'test -w' will do the right thing. > So I'm all for the $(touch .git/some-file-here) test to decide if the > kernel has to be modified during build. I suppose that could work, if you do that only after checking 'test -w'. It's important to not even try to write to the source tree when not permitted. On a different tangent: how about the --no-optional-locks (see git(1))? Will this get you your "up-to-date" result without writing to the .git directory? I've only read the documentation, but not tested it. Brian > Christian. > > [0] https://lkml.org/lkml/2013/6/14/574 > [1] https://manpages.debian.org/unstable/dash/dash.1.en.html