summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorSimon Horman <simon.horman@netronome.com>2016-04-22 10:42:43 +0000
committerBen Pfaff <blp@ovn.org>2016-04-22 11:32:07 -0700
commit455f38e009203795c1a27673969a186002564dde (patch)
tree5d0153bab9dd393bd191b61bc2889581cc46c93d /debian
parent536ee6733cb263a9ef70863f0ff7e7eb3375df7a (diff)
downloadopenvswitch-455f38e009203795c1a27673969a186002564dde.tar.gz
debian: Fix treatment of upstream version that contains hyphens.
The Debian Policy Manual (https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version) says that the upstream_version may contain only alphanumerics and the characters . + - : ~ (full stop, plus, hyphen, colon, tilde) and should start with a digit. Currently, the upstream_version is defined in the debian/rules file: DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([0-9]:)*([^-]+).*,\2,p') The version number is taken from the dpkg-parsechangelog printout then the first part of the version number which does not contain hyphen is filtered out with sed. However the Debian Policy Manual says that hyphen is allowed in the upstream_version. This is not a problem with current vanilla OVS debian version. But, if a postfix string including a hyphen is added to the upstream_version then installation of datapath-dkms package will fail. Reported-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Tested-by: Zoltán Balogh <zoltan.balogh@ericsson.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules
index 2a70bd63f..7110851a2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,7 @@
PACKAGE=openvswitch
PACKAGE_DKMS=openvswitch-datapath-dkms
-DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([0-9]:)*([^-]+).*,\2,p')
+DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([0-9]+:)?([0-9][a-zA-Z0-9.+:~-]*)(-[a-zA-Z0-9*.~]*),\2,p')
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
PARALLEL = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))