]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "scripts/setlocalversion: git: Make -dirty check more robust"
authorGuenter Roeck <linux@roeck-us.net>
Tue, 6 Nov 2018 18:10:38 +0000 (10:10 -0800)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 11 Nov 2018 14:04:52 +0000 (23:04 +0900)
commit17a68e948a6da44b814bb056f2955608628cbe00
treede0321f379aeaed486800dd3148da642427edb41
parentdc3790910a78b9c81fdd920a095437798241c0bc
Revert "scripts/setlocalversion: git: Make -dirty check more robust"

This reverts commit 0247c7807cac73203cec868b1e4f71a47f944e7b.

The reverted patch results in attempted write access to the source
repository, even if that repository is mounted read-only.

Output from "strace git status -uno --porcelain":

getcwd("/tmp/linux-test", 129)          = 16
open("/tmp/linux-test/.git/index.lock", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0666) =
-1 EROFS (Read-only file system)

While git appears to be able to handle this situation, a monitored
build environment (such as the one used for Chrome OS kernel builds)
may detect it and bail out with an access violation error. On top of
that, the attempted write access suggests that git _will_ write to the
file even if a build output directory is specified. Users may have the
reasonable expectation that the source repository remains untouched in
that situation.

Fixes: 0247c7807cac7 ("scripts/setlocalversion: git: Make -dirty check more robust"
Cc: Genki Sky <sky@genki.is>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/setlocalversion