Source: firefox Severity: normal Tags: patch Dear Maintainer, The current debian/upstream.mk seems to be figuring out the source and version values manually by calling dpkg-parsechangelog. Instead, one could include pkg-info.mk and use the variables exported by that make file in order to avoid the manual processing.
I'm attaching a patch to indicate what I mean. -- System Information: Debian Release: stretch/sid APT prefers testing-debug APT policy: (500, 'testing-debug'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: armhf, i386 Kernel: Linux 4.9.0-rc8-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff --git a/debian/upstream.mk b/debian/upstream.mk index c05237baca5..7952ef95c2d 100644 --- a/debian/upstream.mk +++ b/debian/upstream.mk @@ -1,3 +1,5 @@ +include /usr/share/dpkg/pkg-info.mk + # Generic rules to help download sources from archive.mozilla.org. # Define the following variables before including this file: # PRODUCT - product codename (e.g. browser) @@ -22,9 +24,8 @@ export JS_SO_VERSION := $(firstword $(GRE_VERSION))d export GRE_VERSION := $(firstword $(GRE_VERSION)) # Last version in debian/changelog -DEBIAN_SRC_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^\(Source\|Version\): *// p') -DEBIAN_SOURCE := $(firstword $(DEBIAN_SRC_VERSION)) -DEBIAN_VERSION := $(word 2, $(DEBIAN_SRC_VERSION)) +DEBIAN_SOURCE := $(DEB_SOURCE) +DEBIAN_VERSION := $(DEB_VERSION) # Debian part of the above version (anything after the last dash) DEBIAN_RELEASE := $(lastword $(subst -, ,$(DEBIAN_VERSION))) # Upstream part of the debian/changelog version (anything before the last dash) @@ -56,11 +57,11 @@ PRODUCT_NAME := $(DEBIAN_SOURCE) # Check if the version in debian/changelog matches actual upstream version # as VERSION_FILTER transforms it. FILTERED_UPSTREAM_VERSION := $(shell echo $(UPSTREAM_VERSION) | $(VERSION_FILTER)) -ifneq ($(FILTERED_UPSTREAM_VERSION),$(subst esr,,$(firstword $(subst ~b, ,$(UPSTREAM_RELEASE))))) -$(error Upstream version in debian/changelog ($(UPSTREAM_RELEASE)) does not match actual upstream version ($(FILTERED_UPSTREAM_VERSION))) +ifneq ($(FILTERED_UPSTREAM_VERSION),$(DEB_VERSION_UPSTREAM)) +$(error Upstream version in debian/changelog ($(DEB_VERSION_UPSTREAM)) does not match actual upstream version ($(FILTERED_UPSTREAM_VERSION))) endif -VERSION = $(UPSTREAM_RELEASE) +VERSION = $(DEB_VERSION_UPSTREAM) $(call lazy,SOURCE_TARBALL_EXT,$$(shell sed -n '/^SOURCE_TAR/s/.*\.tar\.//p' toolkit/mozapps/installer/upload-files.mk)) SOURCE_TARBALL = $(DEBIAN_SOURCE)_$(VERSION)$(SOURCE_BUILD_DATE:%=+%).orig.tar.$(SOURCE_TARBALL_EXT) SOURCE_TARBALL_LOCATION = ..