From 3a891f85978c045b5f30f8882e615a9a2d5f752c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Fri, 31 Oct 2014 01:02:06 +0000 Subject: [PATCH] Add '.0' to the kernel version string (Closes: #742226, #745984) svn path=/dists/sid/linux/; revision=21985 --- debian/bin/gencontrol.py | 14 +++++++++----- debian/changelog | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 6d0e0fdc2..08c4f7f91 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -60,7 +60,7 @@ class Gencontrol(Base): makeflags.update({ 'VERSION': self.version.linux_version, 'UPSTREAMVERSION': self.version.linux_upstream, - 'ABINAME': self.abiname, + 'ABINAME': self.abiname_version + self.abiname_part, 'ABINAME_PART': self.abiname_part, 'SOURCEVERSION': self.version.complete, }) @@ -130,7 +130,7 @@ class Gencontrol(Base): except KeyError: abiname_part = self.abiname_part makeflags['ABINAME'] = vars['abiname'] = \ - self.version.linux_upstream + abiname_part + self.abiname_version + abiname_part makeflags['ABINAME_PART'] = abiname_part if foreign_kernel: @@ -466,17 +466,21 @@ class Gencontrol(Base): self.abiname_part = '' else: self.abiname_part = '-%s' % self.config['abi', ]['abiname'] - self.abiname = self.version.linux_upstream + self.abiname_part + # We need to keep at least three version components to avoid + # userland breakage (e.g. #742226, #745984). + self.abiname_version = re.sub('^(\d+\.\d+)(?=-|$)', r'\1.0', + self.version.linux_upstream) self.vars = { 'upstreamversion': self.version.linux_upstream, 'version': self.version.linux_version, 'source_upstream': self.version.upstream, 'source_package': self.changelog[0].source, - 'abiname': self.abiname, + 'abiname': self.abiname_version + self.abiname_part, } self.config['version', ] = {'source': self.version.complete, 'upstream': self.version.linux_upstream, - 'abiname': self.abiname} + 'abiname': (self.abiname_version + + self.abiname_part)} distribution = self.changelog[0].distribution if distribution in ('unstable', ): diff --git a/debian/changelog b/debian/changelog index f06620148..d12de0989 100644 --- a/debian/changelog +++ b/debian/changelog @@ -118,6 +118,7 @@ linux (3.16.7-1) UNRELEASED; urgency=medium (Closes: #765590) * rtsx_usb_ms: Use msleep_interruptible() in polling loop (Closes: #765717) * Bump ABI to 4 + * Add '.0' to the kernel version string (Closes: #742226, #745984) [ Mauricio Faria de Oliveira ] * [ppc64el] Disable CONFIG_CMDLINE{,_BOOL} usage for setting consoles