[Pkg-zfsonlinux-devel] [PATCH 4/4] Use the deb revision instead of the META release.

Richard Laager rlaager at wiktel.com
Sun Sep 15 07:19:54 UTC 2013


From: Darik Horn <dajhorn at vanadac.com>

If ZoL is built from a git clone, then the current commit hash is put
into the Release field of the META file.

Do the same thing, but for GBP snapshot builds and PPA releases.
---
 debian/rules |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index ac3fff5..cae6d99 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,8 @@ LSB_DISTRIBUTOR := $(shell lsb_release -is)
 NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
 VERSION := $(shell dpkg-parsechangelog \
   | awk '$$1 == "Version:" { print $$2; }' | cut -d- -f1)
+REVISION := $(shell dpkg-parsechangelog \
+  | awk '$$1 == "Version:" { print $$2; }' | cut -d- -f2-)
 
 DKMSFILES := module include config zfs.release.in autogen.sh META AUTHORS \
 		DISCLAIMER COPYRIGHT OPENSOLARIS.LICENSE README.markdown
@@ -36,7 +38,10 @@ ifeq ($(BUILD_UDEB), true)
 endif
 
 	@# Embed the downstream version in the module.
-	@sed -e 's/^Version:.*/Version:      $(VERSION)/' -i.orig META
+	@sed \
+	  -e 's/^Version:.*/Version:      $(VERSION)/' \
+	  -e 's/^Release:.*/Release:      $(REVISION)/' \
+	  -i.orig META
 
 	@# Create the makefiles and configure script.
 	./autogen.sh
-- 
1.7.9.5




More information about the Pkg-zfsonlinux-devel mailing list