summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-09-11 21:54:30 +0200
committerChristian Breunig <christian@breunig.cc>2025-09-11 21:54:30 +0200
commitd7d15891d83d233222d9d17ed5d8abc6b8f69a55 (patch)
treec5fcee894dd94f862a9a3e473762ffbee990d3e6 /debian
parent859291467407c4ac33cf3aa9de73c11e6dda193f (diff)
downloadvyos-1x-d7d15891d83d233222d9d17ed5d8abc6b8f69a55.tar.gz
vyos-1x-d7d15891d83d233222d9d17ed5d8abc6b8f69a55.zip
Debian: T7762: re-apply extend package version with a number always counting up
Commit content of 562c21cb8 was lost in translation while integrating the libvyosconfig code as mono repo. This restores the behavior.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules8
1 files changed, 7 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index 2cb32b839..67bbcfa5e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,6 +29,12 @@ SERVICES_DIR := usr/libexec/vyos/services
DEB_TARGET_ARCH := $(shell dpkg-architecture -qDEB_TARGET_ARCH)
+# Base version prefix from debian/changelog
+BASE_VERSION := 999.0
+COMMIT_ID := $(shell echo -n g && git rev-parse --short HEAD)
+COMMIT_COUNT := $(shell git rev-list HEAD --count)
+DIRTY_FLAG := $(shell ! git diff --quiet || ! git diff --cached --quiet && echo -dirty || echo)
+
%:
dh $@ --with python3, --with quilt
@@ -37,7 +43,7 @@ DEB_TARGET_ARCH := $(shell dpkg-architecture -qDEB_TARGET_ARCH)
override_dh_strip_nondeterminism:
override_dh_gencontrol:
- dh_gencontrol -- -v$(shell (git describe --tags --long --match 'vyos/*' --match '1.4.*' --dirty 2>/dev/null || echo 0.0-no.git.tag) | sed -E 's%vyos/%%' | sed -E 's%-dirty%+dirty%')
+ dh_gencontrol -- -v$(BASE_VERSION)-$(COMMIT_COUNT)-$(COMMIT_ID)$(DIRTY_FLAG)
override_dh_auto_build:
make all