[linux-signed] 01/03: Fix handling of binNMU suffix on linux-image version
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Mon Sep 26 00:47:27 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch sid
in repository linux-signed.
commit 59661979a114c4b19f37e0a0548b0035baf1efdb
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Sun Sep 25 23:24:17 2016 +0100
Fix handling of binNMU suffix on linux-image version
Currently we assume linux-image and linux-support packages have the
same binary version. This is not the case after a binNMU as that
won't affect arch:all packages. (Of course, we currently can't handle
a binNMU for specific architectures at all.)
We also need to drop the binNMU suffix from Built-Using fields.
---
debian/bin/gencontrol.py | 8 +++++++-
debian/bin/sign.py | 5 ++++-
debian/changelog | 6 ++++++
debian/templates/control.image.in | 2 +-
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py
index 7c75aaa..877dace 100755
--- a/debian/bin/gencontrol.py
+++ b/debian/bin/gencontrol.py
@@ -17,6 +17,10 @@ class Gencontrol(Base):
config_entry = self.config['version',]
self.version = VersionLinux(config_entry['source'])
+
+ # Check current linux-support version
+ assert self.version.complete == re.sub(r'\+b\d+$', r'', image_version)
+
self.abiname = config_entry['abiname']
self.vars = {
'upstreamversion': self.version.linux_upstream,
@@ -24,6 +28,7 @@ class Gencontrol(Base):
'source_upstream': self.version.upstream,
'abiname': self.abiname,
'imageversion': image_version,
+ 'imagesourceversion': self.version.complete,
}
self.package_version = image_version + signed_version_suffix
@@ -37,8 +42,9 @@ class Gencontrol(Base):
makeflags['PACKAGE_VERSION'] = self.package_version
def do_main_packages(self, packages, vars, makeflags, extra):
+ # Assume that arch:all packages do not get binNMU'd
packages['source']['Build-Depends'].append(
- 'linux-support-%(abiname)s (= %(imageversion)s)' % vars)
+ 'linux-support-%(abiname)s (= %(imagesourceversion)s)' % vars)
def do_arch_setup(self, vars, makeflags, arch, extra):
super(Gencontrol, self).do_main_setup(vars, makeflags, extra)
diff --git a/debian/bin/sign.py b/debian/bin/sign.py
index c2e0317..7895825 100755
--- a/debian/bin/sign.py
+++ b/debian/bin/sign.py
@@ -165,7 +165,10 @@ def sign_image_efi(image_name, signature_name, privkey_name, cert_name):
def sign(config_name, imageversion_str, modules_privkey_name, modules_cert_name,
image_privkey_name, image_cert_name, mirror_url, suite):
config = ConfigCoreDump(fp=open(config_name, 'rb'))
- assert config['version',]['source'] == imageversion_str
+
+ # Check current linux-support version
+ assert config['version',]['source'] == re.sub(r'\+b\d+$', r'', imageversion_str)
+
abiname = config['version',]['abiname']
imageversion = VersionLinux(imageversion_str)
kbuild_dir = '/usr/lib/linux-kbuild-%s' % imageversion.linux_version
diff --git a/debian/changelog b/debian/changelog
index 4efd0c6..4577164 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+linux-signed (2.5) UNRELEASED; urgency=medium
+
+ * Fix handling of binNMU suffix on linux-image version
+
+ -- Ben Hutchings <ben at decadent.org.uk> Sun, 25 Sep 2016 23:18:06 +0100
+
linux-signed (2.4) unstable; urgency=medium
* Validate version suffiix to ensure it sorts lowe than stable security
diff --git a/debian/templates/control.image.in b/debian/templates/control.image.in
index 3582fa5..d6b847c 100644
--- a/debian/templates/control.image.in
+++ b/debian/templates/control.image.in
@@ -9,4 +9,4 @@ Description: ${unsigned:DescriptionShort} (signed)
${unsigned:DescriptionLong}
.
${signed:Description}
-Built-Using: linux (= @imageversion@)
+Built-Using: linux (= @imagesourceversion@)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux-signed.git
More information about the Kernel-svn-changes
mailing list