]> git.proxmox.com Git - mirror_frr.git/commitdiff
backports: error out on upstream/downstream version mismatch
authorsmccroskey <smccroskey@cumulusnetworks.com>
Thu, 27 Apr 2017 21:27:09 +0000 (14:27 -0700)
committerMartin Winter <mwinter@opensourcerouting.org>
Tue, 10 Oct 2017 14:52:46 +0000 (07:52 -0700)
The quilt source format expects the upstream tarball's version to
correspond roughly to the debian version of the package, and errors
will be thrown (at unpack time, in our case) if it doesn't.  Do a
sanity check when we're building the source package to make sure they
match up.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
debian/backports/rules

index 4d082af1b1b421083d698e5632940ee4f3d55c0e..63bbedf77745caeeea120d3a82d22f99fee138b4 100644 (file)
@@ -84,6 +84,14 @@ ifeq ($$(SOURCEFORMAT_$(1)),3.0 (quilt))
 # this target depends on the orig.tar.gz file, for which there is no target in
 # this makefile. It is assumed to either already exist or be built by a target
 # provided elsewhere in debian/rules (e.g. via pristine-tar)
+$$(if $$(findstring $(ORIG_VERSION),$$(DEBIAN_VERSION_$(1))), \
+       $$(info downstream version matches upstream version (good)), \
+       $$(error quilt format expects downstream version \
+               ($$(DEBIAN_VERSION_$(1))) to contain upstream version \
+               ($(ORIG_VERSION)). Make a new debian/changelog entry \
+               to reflect the new upstream release) \
+)
+
 $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).dsc: \
                $(TARBALLDIR)/$(SRCPKG)_$(ORIG_VERSION).orig.tar.gz \
                $(TARBALLDIR)/$(SRCPKG)_$$(DEBIAN_VERSION_$(1)).debian.tar.xz