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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Jul 2017 15:36:16 -0700
From:   Dan Williams <dan.j.williams@...el.com>
To:     linux-nvdimm@...ts.01.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH 1/4] ndctl: switch to kernel versioning scheme

Similar to perf, now that ndctl is part of the kernel source tree it
also shares the version number of the source tree. This is consistent
with the policy of not maintaining separate version numbers for drivers
within the kernel tree.

The version can be overridden by a local 'version' file, but now the
default version will no longer be hard coded. Instead, it is derived
from the kernel's 'kernelversion' Makefile target. The policy appending
'.git${abbrev_commit}', and optionally '.dirty', for off-label releases
is still the default when a git tree is available.

Signed-off-by: Dan Williams <dan.j.williams@...el.com>
---
 tools/ndctl/git-version |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/ndctl/git-version b/tools/ndctl/git-version
index 8cc8d2f97bd6..a6461036ec8e 100755
--- a/tools/ndctl/git-version
+++ b/tools/ndctl/git-version
@@ -19,7 +19,7 @@ dirty() {
 	fi
 }
 
-DEF_VER=57.1
+DEF_VER=$(MAKEFLAGS= make -sC ../.. kernelversion)
 
 LF='
 '
@@ -29,7 +29,7 @@ LF='
 if test -f version; then
 	VN=$(cat version) || VN="$DEF_VER"
 elif test -d ${GIT_DIR:-.git} -o -f .git &&
-	VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
+	VN=$(git describe --match "v[4-9]*" --abbrev=7 HEAD 2>/dev/null) &&
 	case "$VN" in
 	*$LF*) (exit 1) ;;
 	v[0-9]*)
@@ -37,9 +37,9 @@ elif test -d ${GIT_DIR:-.git} -o -f .git &&
 	esac; then
 	VN=$(echo "$VN" | sed -e 's/-/./g');
 else
-	read COMMIT COMMIT_SUBJECT <<EOF
+	read COMMIT COMMIT_SUBJECT <<- EOF
 	$(git log --oneline --abbrev=8 -n1 HEAD 2>/dev/null)
-EOF
+	EOF
 	if [ -z $COMMIT ]; then
 		VN="${DEF_VER}+"
 	else

Powered by blists - more mailing lists