]> git.proxmox.com Git - zfsonlinux.git/commitdiff
zfs/debian: embed downstream revision in META file
authorStoiko Ivanov <s.ivanov@proxmox.com>
Thu, 23 May 2019 21:11:31 +0000 (23:11 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 24 May 2019 09:44:34 +0000 (11:44 +0200)
taken from spl/debian/rules
Additionally refactor the actual change into a separate target.
This is needed when building the kernel-modules from an rc-tag (e.g. 0.8.0-rc5)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Makefile
zfs/debian/rules

index 736c1415ab955f380748ddfb0c741e8434c784e8..238b0f16121801653edb183f38d638a66b50c6c6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,7 @@ dsc: ${DSCS}
 kernel: dsc
        dpkg-source -x ${SPL_DSC} ../pkg-spl
        dpkg-source -x ${ZFS_DSC} ../pkg-zfs
+       $(MAKE) -C ../pkg-zfs -f debian/rules adapt_meta_file
 
 .PHONY: dinstall
 dinstall: ${DEBS}
index 8a31d0790c02bc2c1cd340162a5e25e2b3273e15..8f002c996d7888c943266da768c4a2ee3fc2bf79 100755 (executable)
@@ -2,15 +2,23 @@
 
 include /usr/share/dpkg/default.mk
 
+VERSION := $(DEB_VERSION_UPSTREAM)
+REVISION := $(shell echo $(DEB_VERSION) | cut -d- -f2)
+
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
        dh $@ --with autoreconf,python3,systemd --parallel
 
-override_dh_autoreconf:
+adapt_meta_file:
        @# Embed the downstream version in the module.
-       @sed -e 's/^Version:.*/Version:      $(DEB_VERSION_UPSTREAM)/' -i.orig META
+       @sed \
+         -e 's/^Version:.*/Version:      $(VERSION)/' \
+         -e 's/^Release:.*/Release:      $(REVISION)/' \
+         -i.orig META
+
 
+override_dh_autoreconf: adapt_meta_file
        dh_autoreconf
 
 override_dh_auto_configure: