Commit e265bb80 authored by Ben Hutchings's avatar Ben Hutchings

Merge branch 'waldi/signed-changelog' into 'master'

Write complete changelog and copyright to signing template

See merge request kernel-team/linux!31
parents c514e738 d8dc672d
......@@ -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 :-(
......
......@@ -530,7 +530,7 @@ install-signed-template_$(ARCH):
mkdir -p $(CODE_SIGNING_DIR)
PYTHONHASHSEED=0 debian/bin/gencontrol_signed.py $(ARCH)
cp -R debian/compat \
debian/signing_templates/copyright \
debian/copyright \
debian/signing_templates/README.source \
debian/signing_templates/rules \
debian/signing_templates/rules.real \
......
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
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Comment:
This file describes only the linux-signed source package. Its binary
packages are built largely from source in the linux source package,
which is described by the file 'copyright.linux'.
Files: debian/signatures/*
License: public-domain
Digital signatures and certificates are presumed not to be
copyrightable works, and no copyright is claimed for them.
Comment:
The signatures and certificates in this package cannot be regenerated
as-is without the associated private key material, but they can be
replaced using alternate private keys.
Files: debian/rules
Copyright: 2016,2018 Debian kernel team
License: GPL-2
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General Public
License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
Files: debian/*
Copyright: 2016,2018 Debian kernel team
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, the complete text of the GNU General Public
License version 2 can be found in `/usr/share/common-licenses/GPL-2'.
......@@ -44,12 +44,8 @@ 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
dh_compress -Xcopyright.linux
dh_compress
dh_fixperms
dh_installdeb
# Copy most package relations and description from unsigned package
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment