diff --git a/debian/bin/gencontrol_signed.py b/debian/bin/gencontrol_signed.py index eb265f1a2..ba5480053 100755 --- a/debian/bin/gencontrol_signed.py +++ b/debian/bin/gencontrol_signed.py @@ -176,33 +176,31 @@ class Gencontrol(Base): self.write_files_json() def write_changelog(self): - changelog_text = self.substitute(self.templates['changelog.in'], - self.vars) - changelog = Changelog(file=io.StringIO(changelog_text)) - # We need to insert a new version entry. # Take the distribution and urgency from the linux changelog, and # the base version from the changelog template. vars = self.vars.copy() + vars['source'] = self.changelog[0].source vars['distribution'] = self.changelog[0].distribution vars['urgency'] = self.changelog[0].urgency - vars['maintainer'] = self.changelog[0].maintainer - vars['date'] = self.changelog[0].date - vars['signedsourceversion'] = (changelog[0].version.complete + '+' + - re.sub(r'-', r'+', - vars['imagebinaryversion'])) + vars['signedsourceversion'] = (re.sub(r'-', r'+', vars['imagebinaryversion'])) with codecs.open(self.template_debian_dir + '/changelog', 'w', 'utf-8') as f: f.write(self.substitute('''\ linux-signed-@arch@ (@signedsourceversion@) @distribution@; urgency=@urgency@ - * Update to linux @imagebinaryversion@ - - -- @maintainer@ @date@ + * Sign kernel from @source@ @imagebinaryversion@ ''', - vars)) - f.write(changelog_text) + vars)) + + with codecs.open('debian/changelog', 'r', 'utf-8') as changelog_in: + # Ignore first two header lines + changelog_in.readline() + changelog_in.readline() + + for d in changelog_in.read(): + f.write(d) def write_files_json(self): # Can't raise from a lambda function :-( diff --git a/debian/signing_templates/changelog.in b/debian/signing_templates/changelog.in deleted file mode 100644 index af5b58db1..000000000 --- a/debian/signing_templates/changelog.in +++ /dev/null @@ -1,6 +0,0 @@ -linux-signed-@arch@ (1) unstable; urgency=medium - - * Add template source package for signing - - -- Ben Hutchings Fri, 06 Apr 2018 10:36:20 +0100 - diff --git a/debian/signing_templates/rules.real b/debian/signing_templates/rules.real index e073a4476..50ea62080 100644 --- a/debian/signing_templates/rules.real +++ b/debian/signing_templates/rules.real @@ -44,8 +44,6 @@ install-signed: $(PACKAGE_DIR)/usr/share/bug/$(PACKAGE_NAME)/info dh_install dh_installchangelogs - cp /usr/share/doc/$(IMAGE_PACKAGE_NAME)/changelog.Debian.gz \ - $(PACKAGE_DIR)/usr/share/doc/$(PACKAGE_NAME)/changelog.linux.gz dh_installdocs cp /usr/share/doc/$(IMAGE_PACKAGE_NAME)/copyright \ $(PACKAGE_DIR)/usr/share/doc/$(PACKAGE_NAME)/copyright.linux