linux-image-*-signed-template: Override lintian warnings about non-executable scripts

The scripts in question are maintainer scripts in a source package
(that happens to be inside a binary package) and shouldn't be
executable until they are installed into a new binary package.
This commit is contained in:
Ben Hutchings 2018-09-13 01:00:20 +01:00
parent 6cfab0cf13
commit 4b57c92b63
2 changed files with 17 additions and 5 deletions

View File

@ -183,11 +183,21 @@ class Gencontrol(Base):
cmds_binary_arch += ["$(MAKE) -f debian/rules.real install-signed PACKAGE_NAME='%s' %s" % (i['Package'], makeflags)]
makefile.add('binary-arch_%s_%s_%s_real' % (arch, featureset, flavour), cmds = cmds_binary_arch)
for name in ['postinst', 'postrm', 'preinst', 'prerm']:
self._substitute_file('image.%s' % name, vars,
self.template_debian_dir +
'/linux-image-%s%s.%s' %
(vars['abiname'], vars['localversion'], name))
os.makedirs(self.package_dir + '/usr/share/lintian/overrides', 0o755,
exist_ok=True)
with open(self.package_dir +
'/usr/share/lintian/overrides/%(template)s' % self.vars,
'a') as lintian_overrides:
for script_base in ['postinst', 'postrm', 'preinst', 'prerm']:
script_name = (self.template_debian_dir +
'/linux-image-%s%s.%s' %
(vars['abiname'], vars['localversion'],
script_base))
self._substitute_file('image.%s' % script_base, vars, script_name)
lintian_overrides.write('%s: script-not-executable %s\n' %
(self.vars['template'],
os.path.relpath(script_name,
self.package_dir)))
def write(self, packages, makefile):
self.write_changelog()

2
debian/changelog vendored
View File

@ -28,6 +28,8 @@ linux (4.19~rc3-1~exp2) UNRELEASED; urgency=medium
* linux-image-*-signed-template: Add ${misc:Depends} to Depends
* linux-image-*-signed-template: Include changelog and copyright files
* linux-image-*-signed-template: Depend on dpkg-dev
* linux-image-*-signed-template: Override lintian warnings about non-
executable scripts
-- Ben Hutchings <ben@decadent.org.uk> Mon, 10 Sep 2018 22:25:53 +0100