From patchwork Thu Mar 24 08:28:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zoltan Balogh X-Patchwork-Id: 601486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3qW02v4G1rz9sCk for ; Thu, 24 Mar 2016 19:29:10 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 948B3108A0; Thu, 24 Mar 2016 01:29:02 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id B3A8E10773 for ; Thu, 24 Mar 2016 01:29:01 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id E70B11E00AD for ; Thu, 24 Mar 2016 02:29:00 -0600 (MDT) X-ASG-Debug-ID: 1458808140-09eadd79ea163390001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id pBvd1u8q5A5RQQNj (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 24 Mar 2016 02:29:00 -0600 (MDT) X-Barracuda-Envelope-From: zoltan.balogh@ericsson.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO sessmg22.ericsson.net) (193.180.251.58) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 24 Mar 2016 08:28:59 -0000 Received-SPF: pass (mx1-pf2.cudamail.com: SPF record at ericsson.com designates 193.180.251.58 as permitted sender) X-Barracuda-Apparent-Source-IP: 193.180.251.58 X-Barracuda-RBL-IP: 193.180.251.58 X-AuditID: c1b4fb3a-f79d86d000005b69-30-56f3a5467598 Received: from ESESSHC024.ericsson.se (Unknown_Domain [153.88.183.90]) by sessmg22.ericsson.net (Symantec Mail Security) with SMTP id A9.8D.23401.645A3F65; Thu, 24 Mar 2016 09:28:54 +0100 (CET) Received: from ESESSMB305.ericsson.se ([169.254.5.198]) by ESESSHC024.ericsson.se ([153.88.183.90]) with mapi id 14.03.0248.002; Thu, 24 Mar 2016 09:28:54 +0100 X-CudaMail-Envelope-Sender: zoltan.balogh@ericsson.com From: =?iso-8859-1?Q?Zolt=E1n_Balogh?= To: "dev@openvswitch.org" X-CudaMail-MID: CM-E2-323005595 X-CudaMail-DTE: 032416 X-CudaMail-Originating-IP: 193.180.251.58 Thread-Topic: [PATCH] debian : upstream_version fix - resubmitted X-ASG-Orig-Subj: [##CM-E2-323005595##][PATCH] debian : upstream_version fix - resubmitted Thread-Index: AdGFpfNwGh1alZ1CRFKicVsUYV2mUw== Date: Thu, 24 Mar 2016 08:28:53 +0000 Message-ID: <397FD63D94A70042B39B21380C6225A829B2A631@ESESSMB305.ericsson.se> Accept-Language: hu-HU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [153.88.183.19] MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsUyM2J7lK7b0s9hBu/nKFocPb2H2YHR49nN /4wBjFFcNimpOZllqUX6dglcGUsuX2QpaOKreDffp4HxO3cXIyeHhICJRPv270wQtpjEhXvr 2boYuTiEBA4zStz/2MAO4SxhlDj2+wxYFZuAs8T13S/ZQGwRAX2JQz1nWUBsYQEbiXnvPkHF HSUerVrAAmHrSUzffwPMZhFQlWh+tQOshlfAV2LeuY+MXYwcHIwCshIP11qAhJkFxCVuPZkP dZCAxJI955khbFGJl4//sULYihLtTxsYIer1JG5MncIGYWtLLFv4mhlivKDEyZlPWCYwCs9C MnYWkpZZSFpmIWlZwMiyilG0OLW4ODfdyEgvtSgzubg4P08vL7VkEyMwwA9u+W21g/Hgc8dD jAIcjEo8vB/kP4cJsSaWFVfmHmKU4GBWEuE1WwwU4k1JrKxKLcqPLyrNSS0+xCjNwaIkzsv2 6XKYkEB6YklqdmpqQWoRTJaJg1OqgdFNIGOTrdDyuA79B1YfZJLFlRstroul132c42p48ueE AylhRo+2W5x/8Pqpmb6xjF3UbHnpfdKbnl3VkuvnizwfNYV74dyg77YZ88/+f5xj2HDcWG1l NpPkwQ9XbvNcubPhmaiUYdzRayer8hs+XLJvTTM4s/G115KGCPNLn1SCr29X07qc9liJpTgj 0VCLuag4EQA33Nf0bAIAAA== X-GBUdb-Analysis: 0, 193.180.251.58, Ugly c=0.374854 p=-0.315789 Source Normal X-MessageSniffer-Rules: 0-0-0-5805-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1458808140 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.10 X-Barracuda-Spam-Status: No, SCORE=0.10 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.28114 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS Subject: [ovs-dev] [PATCH] debian : upstream_version fix - resubmitted X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" Hi, 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. I think the following patch solves this problem. Signed-off-by: Zoltán Balogh diff --git a/debian/rules b/debian/rules index d8e90c7..70539ab 100755 --- a/debian/rules +++ b/debian/rules @@ -13,7 +13,9 @@ PACKAGE=openvswitch PACKAGE_DKMS=openvswitch-datapath-dkms -DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([0-9]:)*([^-]+).*,\2,p') +DEB_VERSION=$(shell dpkg-parsechangelog | awk '/^Version: / {print $$2}' | sed -rne 's,([0-9]:)+([.])*,\2,p') +DEB_REVISION=$(shell expr "$(DEB_VERSION)" : '.*\(-.*\)' ) +DEB_UPSTREAM_VERSION=$(shell version=$(DEB_VERSION); expr + $${version%"$(DEB_REVISION)"}) ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) PARALLEL = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))