1. 24 6月, 2013 1 次提交
    • C
      scripts/setlocalversion on write-protected source tree · cdf2bc63
      Christian Kujau 提交于
      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: NChristian Kujau <lists@nerdbynature.de>
      Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      cdf2bc63
  2. 22 2月, 2013 1 次提交
  3. 27 3月, 2012 1 次提交
  4. 15 1月, 2011 1 次提交
  5. 06 9月, 2010 1 次提交
  6. 21 8月, 2010 1 次提交
    • M
      setlocalversion: Ignote SCMs above the linux source tree · 8558f59e
      Michal Marek 提交于
      Dan McGee <dpmcgee@gmail.com> writes:
      > Note that when in git, you get the appended "+" sign. If
      > LOCALVERSION_AUTO is set, you will get something like
      > "eee-gb01b08c-dirty" (whereas the copy of the tree in /tmp still
      > returns "eee"). It doesn't matter whether the working tree is dirty or
      > clean.
      >
      > Is there a way to disable this? I'm building from a clean tarball that
      > just happens to be unpacked inside a git repository. One would think
      > setting LOCALVERSION_AUTO to false would do it, but no such luck...
      
      Fix this by checking if the kernel source tree is the root of the git or
      hg repository. No fix for svn: If the kernel source is not tracked in
      the svn repository, it works as expected, otherwise determining the
      'repository root' is not really a defined task.
      Reported-and-tested-by: NDan McGee <dpmcgee@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      8558f59e
  7. 13 8月, 2010 1 次提交
  8. 21 7月, 2010 1 次提交
  9. 20 7月, 2010 1 次提交
    • M
      kbuild: Make the setlocalversion script POSIX-compliant · 6dc0c2f3
      Michał Górny 提交于
      The 'source' builtin is a bash alias to the '.' (dot) builtin. While the
      former is supported only by bash, the latter is specified in POSIX and
      works fine with all POSIX-compliant shells I am aware of.
      
      The '$_' special parameter is specific to bash. It is partially
      supported in dash too but it always evaluates to the current script path
      (which causes the script to enter a loop recursively re-executing
      itself). This is why I have replaced the two occurences of '$_' with the
      explicit parameter.
      
      The 'local' builtin is another example of bash-specific code. Although
      it is supported by all POSIX-compliant shells I am aware of, it is not
      part of POSIX specification and thus the code should not rely on it
      assigning a specific value to the local variable. Moreover, the 'posh'
      shell has a limited version of 'local' builtin not supporting direct
      variable assignments. Thus, I have broken one of the 'local'
      declarations down into a (non-POSIX) 'local' declaration and a plain
      (POSIX-compliant) variable assignment.
      Signed-off-by: NMichał Górny <gentoo@mgorny.alt.pl>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      6dc0c2f3
  10. 18 6月, 2010 1 次提交
    • M
      kbuild: Clean up and speed up the localversion logic · 09155120
      Michal Marek 提交于
      Now that we run scripts/setlocalversion during every build, it makes
      sense to move all the localversion logic there. This cleans up the
      toplevel Makefile and also makes sure that the script is called only
      once in 'make prepare' (previously, it would be called every time due to
      a variable expansion in an ifneq statement). No user-visible change is
      intended, unless one runs the setlocalversion script directly.
      Reported-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      09155120
  11. 15 6月, 2009 1 次提交
  12. 20 5月, 2009 1 次提交
  13. 01 5月, 2009 1 次提交
  14. 11 4月, 2009 1 次提交
  15. 15 2月, 2009 1 次提交
  16. 04 12月, 2008 2 次提交
  17. 30 10月, 2008 2 次提交
  18. 26 7月, 2008 1 次提交
  19. 03 2月, 2008 1 次提交
  20. 29 1月, 2008 4 次提交
  21. 17 6月, 2006 2 次提交
  22. 09 1月, 2006 1 次提交
  23. 07 1月, 2006 1 次提交
    • R
      kbuild: Use git in scripts/setlocalversion · 117a93db
      Rene Scharfe 提交于
      Currently scripts/setlocalversion is a Perl script that tries to figure
      out the current git commit ID of a repo without using git.  It also
      imports Digest::MD5 without using it and generally is too big for the
      small task it does. :]  And it always reports a git ID, even when the
      HEAD is tagged -- this is a bug.
      
      This patch replaces it with a Bourne Shell script that uses git
      commands to do the same.  I can't come up with a scenario where someone
      would use a git repo and refuse to install git core at the same time,
      so I think it's reasonable to assume git is available.
      
      The new script also reports uncommitted changes by adding -git_dirty to
      the version string.  Obviously you can't see from that _what_ has been
      changed from the last commit, so it's more of a reminder that you
      forgot to commit something.
      
      The script is easily extensible: simply add a check for Mercurial (or
      whatever) below the git check.
      
      Note: the script doesn't print a newline char anymore.  That's only
      because it was easier to implement it that way, not a feature (or bug).
      'make kernelrelease' doesn't care.
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Acked-by: NRyan Anderson <ryan@michonline.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      117a93db
  24. 11 8月, 2005 1 次提交