Write a complete changelog to signing template
This commit is contained in:
parent
c514e73827
commit
4739547302
|
@ -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 :-(
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
linux-signed-@arch@ (1) unstable; urgency=medium
|
||||
|
||||
* Add template source package for signing
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Fri, 06 Apr 2018 10:36:20 +0100
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue