lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <52798635.70209@gmail.com>
Date:	Tue, 05 Nov 2013 16:58:45 -0700
From:	David Ahern <dsahern@...il.com>
To:	Ingo Molnar <mingo@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC:	LKML <linux-kernel@...r.kernel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Jiri Olsa <jolsa@...hat.com>
Subject: Re: perf version not set when building out of tree

On 11/1/13, 1:02 AM, Ingo Molnar wrote:
> I think we should pack the PERF-VERSION-FILE with the tarball and
> use that. This needs roughly 3 changes:
>
>   - make PERF-VERSION-FILE part of the tarball
>   - make sure it's not zapped on 'make clean'
>   - don't try to regenerate it if there's no git repository to get a version from

Solution was actually kind of easy. The head commit is already saved to 
HEAD file when the tar is generated:

diff --git a/perf/tools/perf/util/PERF-VERSION-GEN 
b/perf/tools/perf/util/PERF-VERSION-GEN
index 15a77b7c0e36..2155882e7c1d 100755
--- a/perf/tools/perf/util/PERF-VERSION-GEN
+++ b/perf/tools/perf/util/PERF-VERSION-GEN
@@ -19,6 +19,9 @@ if test -d ../../.git -o -f ../../.git
  then
     TAG=$(git describe --abbrev=0 --match "v[0-9].[0-9]*" 2>/dev/null )
     CID=$(git log -1 --abbrev=4 --pretty=format:"%h" 2>/dev/null) && 
CID="-g$CID"
+elif test -f ../../HEAD
+then
+   TAG=$(cat ../../HEAD)
  fi
  if test -z "$TAG"
  then

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ