Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp958224imu; Fri, 9 Nov 2018 08:41:34 -0800 (PST) X-Google-Smtp-Source: AJdET5fpW09nuutJxfWVK+OQiBwPI58VnZ8dzFRG1y/qsmbV9xI8tdAG52E1CDIpft3neosCfT2v X-Received: by 2002:a62:2741:: with SMTP id n62-v6mr9891341pfn.138.1541781694472; Fri, 09 Nov 2018 08:41:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541781694; cv=none; d=google.com; s=arc-20160816; b=SGidRa1pseTkexGgerFabVj376DoigBQSPzUNjRXha78iB9qnpnQ9M74vvdaOjU5jv yIsmxJZMXzXXWwvtGU2rkZfw3qCteHbhvh4rVvbWCkCq/Gw0U2LXCWUyon3mubMT0wRl aOdg+Z3eQY1poVidDWdlxSzQwNIfumXmmehXusIVukHoQpbbz8WQF3wtLVibcdWwo7K6 vlzYfPsjajhzn72/K+M3oNsgItd24BwhyGMJgNY/mMGU7KpDN53hOZAW9e+kmpMMKJil S2DXNm8vnJ5YcIQSpeKnNyuWr8LeFWjAYVIWBeXNwWbEa7ivHIcf9bqBpXd8qRW3JxdQ nIBA== 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:dkim-filter; bh=B1BJ/jXx67K4CCHSRAr/bWFbr+Z2VaERB2EjYTv9+NQ=; b=nzSpkMzKys+UfGBFA75Cb50BsfqwM19LIe6yTSozJ4HELy9XpJYfcOzf/6Q+Mplkd0 ckON/s0yCSwyqsqlL9NASE5JBheXzE/Sio+QOobhi2wpvke+9+dDfT1pueDUtoeMCUXq yL4kW1VXN26aWXnBFoQatLpnBL8elsiUxByP6PioWH7ZmXzpjxvkdut1lb14l4ZeamKh GjX3yQKfqqgFLbzGhLf6nhGDhhSyxW+3Afv9w5JVP4e/ODY0NzyvveQAhayoFPzwdrjq fyMNN2cZYnGiFk1zBihvcLpXEzCJfGhcl7alBhSV7vuhWMGIrEMoFd9J7cZiszms/IXF MmbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=CmGkAfZD; 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 a195-v6si8584603pfa.214.2018.11.09.08.41.12; Fri, 09 Nov 2018 08:41:34 -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=@nifty.com header.s=dec2015msa header.b=CmGkAfZD; 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 S1728564AbeKJCVb (ORCPT + 99 others); Fri, 9 Nov 2018 21:21:31 -0500 Received: from conssluserg-01.nifty.com ([210.131.2.80]:23884 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728172AbeKJCVa (ORCPT ); Fri, 9 Nov 2018 21:21:30 -0500 Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) (authenticated) by conssluserg-01.nifty.com with ESMTP id wA9Gdvqw026986 for ; Sat, 10 Nov 2018 01:39:57 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com wA9Gdvqw026986 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1541781597; bh=B1BJ/jXx67K4CCHSRAr/bWFbr+Z2VaERB2EjYTv9+NQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CmGkAfZDvpTZzgUtiRqd1AyhumWt3abIaYH8bI2ue5gftvCCwhPRoFl7AxSz5Vmmq 9ED81fm49NNvUIdNgLU7p8070WBUuhEp+aJiFJhjnnMcGqNwL7Thdw0DDafWuwAl2g 3POLolH/Lo4dHeta6iaI5LeyfOLAaSr/E80NgAnnLnc8wfxd4IyGgc2kF0FqocsNxw VQqUXz3S8KUCr9V5GRTuuHP2wap0ALzydIbPw/ZyRNzIIbtR6Mzco08QcoeOuIVsQb bj+Kvula/nLeqJ89xA4eRbr8x2M0Xtyi3E8PonLfcsTqVbL12uSjOKWnkzAa5TSJth EuymTw9lQz7XA== X-Nifty-SrcIP: [209.85.217.50] Received: by mail-vs1-f50.google.com with SMTP id h18so1387257vsj.4 for ; Fri, 09 Nov 2018 08:39:57 -0800 (PST) X-Gm-Message-State: AGRZ1gJrHUhqZ2U+StTvXSKEJecNQbn6jrTa6liT/x6+3mSSIRqIzGoM GRedlTzDSKX1j5E4wiyAru9X6STYeNL6o9IoZWk= X-Received: by 2002:a67:5f03:: with SMTP id t3mr4154624vsb.155.1541781596119; Fri, 09 Nov 2018 08:39:56 -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: Masahiro Yamada Date: Sat, 10 Nov 2018 01:39:20 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Revert "scripts/setlocalversion: git: Make -dirty check more robust" To: Christian Kujau Cc: Brian Norris , Genki Sky , Guenter Roeck , Linux Kernel Mailing List 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 Wed, Nov 7, 2018 at 12:05 PM Christian Kujau wrote: > > 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. Hmm, interesting. The result of "test -w ." depends on the implementation of "test" command. Bash's build-in 'test' did a good job for me; "test -w ." returns 1 for read-only mounted NFS. For Busybox's 'test', "test -w ." returns 0 for read-only (or writable, but without no-root-squash) NFS. > 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. -- Best Regards Masahiro Yamada