summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2016-12-02 15:21:50 +0100
committerRaphaël Hertzog <hertzog@debian.org>2016-12-02 15:23:20 +0100
commitb8f7f19015055fc4c7ef30e3787721ac2218ed3b (patch)
tree6f2bc8be3148f843545d986a543b7bf2ea526aa5
parent7ad6c408e559a1755beb63db8186e002a56bb7a7 (diff)
downloadvyos-live-build-b8f7f19015055fc4c7ef30e3787721ac2218ed3b.tar.gz
vyos-live-build-b8f7f19015055fc4c7ef30e3787721ac2218ed3b.zip
Fix version of live-build that is displayed by lb --version
Now we generate the VERSION file at install time or at package build time.
-rw-r--r--Makefile3
-rw-r--r--VERSION1
-rw-r--r--debian/changelog2
-rwxr-xr-xdebian/rules5
4 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4604af562..00b30357a 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,8 @@ build:
install:
# Installing shared data
mkdir -p $(DESTDIR)/usr/share/live/build
- cp -r data functions VERSION $(DESTDIR)/usr/share/live/build
+ cp -r data functions $(DESTDIR)/usr/share/live/build
+ sed -e 's/.*(\(.*\)).*/\1/; q' debian/changelog >$(DESTDIR)/usr/share/live/build/VERSION
cp -r share/* $(DESTDIR)/usr/share/live/build
# Installing executables
diff --git a/VERSION b/VERSION
deleted file mode 100644
index 50f22a7b8..000000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-5.0~a11-1
diff --git a/debian/changelog b/debian/changelog
index 660d02bac..0e18b1e62 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,6 +41,8 @@ live-build (1:20161128) UNRELEASED; urgency=medium
* Use a grub theme that integrates reasonably well with the current
background picture.
* Default for LB_UNION_FILESYSTEM is now "overlay" just like in live-boot.
+ * Update the way we generate the version of live-build that is displayed by
+ lb --version.
[ Kristian Klausen ]
* Include ext{3,4} journal size when calculating image size. Closes: #801712
diff --git a/debian/rules b/debian/rules
index 2d2e62735..92cbff285 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,11 +1,16 @@
#!/usr/bin/make -f
+include /usr/share/dpkg/pkg-info.mk
+
%:
dh $@
override_dh_auto_install:
dh_auto_install -- DESTDIR=debian/live-build
+ # Update VERSION file
+ echo $(DEB_VERSION) >debian/live-build/usr/share/live/build/VERSION
+
# Removing unused files
rm -f debian/live-build/usr/share/doc/live-build/COPYING