+ scripts-setlocalversion-on-write-protected-source-tree.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + scripts-setlocalversion-on-write-protected-source-tree.patch added to -mm tree
To: lists@xxxxxxxxxxxxxxx,mmarek@xxxxxxx,nico-linuxsetlocalversion@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Tue, 18 Jun 2013 14:10:30 -0700


The patch titled
     Subject: scripts/setlocalversion on write-protected source tree
has been added to the -mm tree.  Its filename is
     scripts-setlocalversion-on-write-protected-source-tree.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Christian Kujau <lists@xxxxxxxxxxxxxxx>
Subject: scripts/setlocalversion on write-protected source tree

I just stumbled across another[0] issue when scripts/setlocalversion
operates on a write-protected source tree.  Back then[0] the source tree
was on an read-only NFS share, so "test -w" was introduced before "git
update-index" was run.

This time, the source tree is on read/write NFS share, but the permissions
are world-readable and only a specific user (or root) can write.  Thus,
"test -w ." returns "0" and then runs "git update-index", producing the
following message (on a dirty tree):

  fatal: Unable to create '/usr/local/src/linux-git/.git/index.lock': Permission denied

While it says "fatal", compilation continues just fine.

However, I don't think a kernel compilation should alter the source tree
(or the .git directory) in any way and I don't see how removing "git
update-index" could do any harm.  The Mercurial and SVN routines in
scripts/setlocalversion don't have any tree-modifying commands, AFAICS. 
So, maybe the patch below would be acceptable.

[0] https://patchwork.kernel.org/patch/29718/

Signed-off-by: Christian Kujau <lists@xxxxxxxxxxxxxxx>
Cc: Nico Schottelius <nico-linuxsetlocalversion@xxxxxxxxxxxxxxx>
Cc: Michal Marek <mmarek@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/setlocalversion |    3 ---
 1 file changed, 3 deletions(-)

diff -puN scripts/setlocalversion~scripts-setlocalversion-on-write-protected-source-tree scripts/setlocalversion
--- a/scripts/setlocalversion~scripts-setlocalversion-on-write-protected-source-tree
+++ a/scripts/setlocalversion
@@ -71,9 +71,6 @@ scm_version()
 			printf -- '-svn%s' "`git svn find-rev $head`"
 		fi
 
-		# Update index only on r/w media
-		[ -w . ] && git update-index --refresh --unmerged > /dev/null
-
 		# Check for uncommitted changes
 		if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then
 			printf '%s' -dirty
_

Patches currently in -mm which might be from lists@xxxxxxxxxxxxxxx are

scripts-setlocalversion-on-write-protected-source-tree.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux