From 57a22c395cd4156a087d70cd4604592e32a99da7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 30 Dec 2018 09:03:29 +0100 Subject: Writing exact package version into web/version.txt. The update-check is not run automatically and the update-button is not shown on Debian. If the update-check is triggered manually, it expects version.txt to contain something, therefore on Debian it contained '0'. As it does not matter what value is in there, there is no gain in writing an inaccurate one either. Therefore, let's write the exact package version in it. Note: version.txt is by default exposed to the web via http://localhost:19999/version.txt. Anyone who can access netdata can also see what exact version you're running. Signed-off-by: Daniel Baumann --- debian/rules | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 56e9db248..02f2b2858 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,8 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) TOP = $(CURDIR)/debian/netdata +VERSION := $(shell dpkg-parsechangelog -SVersion) + export DH_VERBOSE = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all @@ -32,8 +34,8 @@ override_dh_install-arch: $(MULTIARCH_INSTALL) override_dh_install-indep: dh_install - # Deactivate automatic update check - echo 0 > $(TOP)-data/usr/share/netdata/web/version.txt + # Setting package version (update check) + echo $(VERSION) > $(TOP)-data/usr/share/netdata/web/version.txt override_dh_fixperms-arch: dh_fixperms -- cgit v1.2.3