Commit Graph

521 Commits

Author SHA1 Message Date
Ben Hutchings 196afb7474 debian/bin/gencontrol.py: Fix handling of debug info switches
Setting $DEBIAN_KERNEL_DISABLE_DEBUG or clearing the [build]debug-info
config variable should disable generation of debug info and associated
packages.  However the recent refactoring of the handling of such
environment variables resulted in different switches being obeyed in
different places.

Set the build_debug variable based on both switches and then use that
consistently.

(cherry picked from commit 36f061ce80471a0203c174c4e241b70af913c260)
2020-09-17 19:14:40 +01:00
Bastian Blank 57f0533e9a Add flag to disable signed code 2020-09-05 09:18:19 +02:00
Bastian Blank 413fadb4aa Factor out debug info disable flag 2020-09-05 09:18:19 +02:00
Bastian Blank 4899f5039c Factor out installer modules disable flag 2020-09-05 09:18:19 +02:00
Ben Hutchings 0965371222 debian/bin/genpatch-rt: Fix series generation from git 2019-11-24 23:58:14 +00:00
Ben Hutchings 98cbc347d3 debian/bin: Fix Python static checker regressions (Closes: #928618) 2019-05-07 21:04:05 +01:00
Ben Hutchings 8f20d53908 [armel/marvell,sh4] linux-image: Recommend apparmor, like all other configs
The "recommends" field set in the [image] section for these
configurations overrode the field at the top level.  We want
gencontrol.py to concatenate the relations in this section at all
levels.

The ConfigCore.get_merge method supports doing this, but only with
list fields So we need to specify in the config schema that these
fields are comma-separated lists.
2019-04-22 00:30:48 +01:00
Vagrant Cascadian 58ef63e9e2 debian/bin/gencontrol_signed.py: Sort list of modules before adding to
.json file, fixing reproducibility issues.
2019-04-17 19:51:35 +00:00
Ben Hutchings e3c916c6d7 debian/bin/abiupdate.py: Change default URLs to use https: scheme
Since we don't use the Release and Packages files to verify the
packages we download, it's worth using TLS to reduce the risk of
a man-in-the-middle corrupting them.

ftp.ports.debian.org and security.debian.org don't support TLS
in general, so use deb.debian.org for the ports and security
archives.
2019-03-18 23:11:23 +00:00
Ben Hutchings 0e10941761 debian/bin/abiupdate.py: Automatically select the correct archive to fetch from
If the changelog distribution is *-security, fetch from the security
archive.  Otherwise, try the main archive, ports, incoming, and
incoming.ports in that order.
2019-03-18 22:53:16 +00:00
Ben Hutchings 1dc1f9d062 debian/bin/gencontrol_signed.py: Use merge_packages instead of open-coding it
We already used it for udebs but not for the regular signed image
package.
2019-03-11 01:20:40 +00:00
Ben Hutchings dcd90f6ce7 debian/control: Assert that linux-{image,headers} templates describe 1 package
We only process the first package found in these templates so fail
if there are more.
2019-03-11 00:43:51 +00:00
Ben Hutchings 14ab885d53 debian/bin/gencontrol.py: Remove unused code for extra package templates 2019-03-11 00:43:41 +00:00
Ben Hutchings 4454021eb3 debian/bin/gencontrol_signed.py: Put all files.json fields under "packages"
Follow the schema change made in
3a07a08a82
2019-03-10 22:46:07 +00:00
Ben Hutchings 96e3ed26a7 debian/bin/gencontrol.py: Add rules to build debian/build/config.*
It is no longer possible to run the "setup" rules without a compiler,
because Kconfig symbols can depend on compiler properties.  Add a way
to invoke just the first step of setup, which merges the kconfig files
and overrides together.
2019-03-05 19:11:48 +00:00
Ben Hutchings 09f2b8df70 gencontrol: Introduce and use arch/featureset/flavour iterator functions 2019-03-05 19:11:48 +00:00
Luca Boccassi 380ff19d50 Don't add linux-source to d/control when source: false
With the recent refactor, setting source: false in debian/config/defines
is no longer enough to disable the linux-source-$ver package build, as
dh_listpackages is used to determine what is built.
Do not add linux-source-$ver to d/control if it is disabled.
2019-01-18 20:57:32 +00:00
Ben Hutchings 80c2596a7c Add pkg.linux.nokernel build profile that excludes kernel image/header packages
This should mostly be useful for testing changes that only affect
the userland packages.
2019-01-01 19:27:10 +00:00
Ben Hutchings fdd6dadb4a Use dh_listpackages to determine which packages to build
The packages we should build are restricted by:

* Package configuration in debian/config (limits which binary packages are
  included in debian/control)
* Architecture (specified per package in debian/templates/control.* and
  then in debian/control)
* Build profile (specified per package in debian/templates/control.* and
  then in debian/control)

The logic for these restrictions is currently repeated in
debian/rules.real, but sometimes it becomes inconsistent with
debian/control (as with my recent changes for libbpf).

dh_listpackages reads debian/control and filters it by the current
host architecture and build profiles, so that it reliably reports
which packages we should build.

Therefore:

* Replace the logic in debian/rules.real with checks for package names
  in the output of dh_listpackages
* Remove the redundant flag variables passed by debian/rules and
  debian/rules.gen
* Remove the special-casing of stage1 in debian/rules and
  debian/rules.gen
2019-01-01 18:29:56 +00:00
Ben Hutchings f8450c79c8 Fix pycodestyle "inalid escape sequence" warnings 2018-12-28 15:35:50 +00:00
Ben Hutchings a54c09f109 Fix pycodestyle "line break after binary operator" warnings 2018-12-28 15:35:38 +00:00
Uwe Kleine-König f100f671db test-patches: allow to automatically determine flavour for rc and bpo kernels
This allows to detect the current flavour (here: "amd64") for an rc kernel
(here: $(uname -r) = 4.19.0-rc4-amd64). Also a bpo release is correctly
detected with this change.
2018-11-08 22:43:04 +01:00
Ben Hutchings be3a9537f5 Move generation of CONFIG_BUILD_SALT to gencontrol.py
CONFIG_DEBUG_INFO and CONFIG_MODULE_SIG are added in gencontrol.py,
so be consistent with that.

This unfortunately requires some ugly escaping of quotes.
2018-10-14 21:37:57 +01:00
Ben Hutchings 3fedd6e488 debian/bin/gencontrol.py: Delete code that enumerates Debian revisions
Gencontrol.parse_changelog() makes a list of all Debian versions with
the same upstream version, but doesn't use it.  This is left over from
the old multiple-series patch system which was removed in 2012.
2018-10-03 01:28:18 +01:00
Ben Hutchings 91fad79906 Add Python static checks and unit tests to autopkgtest tests 2018-10-01 23:10:03 +01:00
Ben Hutchings 5ac818997a debian/bin/gencontrol.py, debian/templates: Rename tests/control template
The current template is for running selftests against a kernel image,
so s/main/image/.
2018-10-01 23:09:51 +01:00
Ben Hutchings 8cafaf07ae debian/bin, debian/lib/python: Delete write-only vars reported by pyflakes 2018-10-01 21:50:59 +01:00
Ben Hutchings 169ec06045 debian/bin, debian/lib/python: Clean up imports based on pyflakes report
- Add explicit imports for all needed modules, rather than indirectly
  (accidentally!) importing them with "from ... import *"
- Replace all "from ... import *" statements, which inhibit static
  checking, with explicit lists of names to import
- Delete the remaining unneeded imports reported by pyflakes
2018-10-01 21:45:55 +01:00
Ben Hutchings 9cfb948048 debian/bin, debian/rules.real: Add symlink to Python package directory instead of editing path
This fixes one of the remaining classes of pycodestyle errors.
2018-10-01 21:41:58 +01:00
Ben Hutchings af0098b10a debian/bin, debian/lib/python: Fix most errors reported by pycodestyle
Fix coding style violations reported by pycodestyle.  This is
mostly a matter of reformatting code, particularly to eliminate
over-long lines.  I also rename one variable ("l" is considered
visually ambiguous) and change a bare "except" to explicitly
catch all exceptions.

There are three types of error or warning remaining:

- debian/bin/...: E402 module level import not at top of file
  Scripts in debian/bin need to modify the import path before
  importing from debian/lib/python.
- E127 continuation line over-indented for visual indent
  This seems to be a false positive.  pycodestyle doesn't seem to be
  happy with any level of indent (including 0) on a continuation line
  in a "with" statement.
- debian/lib/python/debian_linux/debian.py:15:2: W291 trailing whitespace
  This is a false positive.  The trailing spaces are in a long
  string and are intentional.
2018-10-01 21:41:23 +01:00
Ben Hutchings 337682dc35 Release linux (4.18.8-1).
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAluhDZUACgkQ57/I7JWG
 EQkLvQ//QqqAfJXjwZt3Iy+dcYieLqmhy4/KtjVvFP8EKSyfdeWl0awb3szbmMs5
 cy2p5q17mafVZTx9MCppp4y1modMBZrMC6hmB9UAoU0j1GnKHNbtddzA3+uo1dmw
 i2LudGseb8LSL5z6g95P4SozSNNeFPIOLSYxkGVnlG3sUdlhlRYCvYf9k8BKUEbx
 sU0yDXQOhf0kBLsRXW8QfJEBHv5ivr9/Q+s9e71NUpVWaEOZwgfJacM/QWcY8+J4
 2o0XlHtS9+r0Ik0RK5Zyt8eun1sH1cb4Lta9LZjvRLWpCqXNpPSus6V8qENngcyw
 X9ZGWi3nMiR4OOuEMGMxbzXXzWreg9MNPyM5/kVfJKlsLi1xP7ufhnstR+j2/tTJ
 guVLDw73B4RyOwH2p4Kh1Pk0hACagI9AeKfjSBTMMlv2rD6FDfuJlSgEYUIK/NLl
 lsefkkKu2EZVdhIBEGDnu80+V2AuoTYXpEknvbnvlYZ1wLNXb73GIFptWu18dfOy
 fZ4cEWDxuKd52nbsjKlQmaxlFGSfjmmWliorhrU84FZsRjvFARGWWPwnjk8fwcpD
 +D0GASqx37iw1gQK8yNQER3dxHzVh1blIKhADgEWJXsaeHcfyDHziShX7FZ8n6G5
 HQBaynaG0Qc9fWd8O6xmX6wsP/vGRFJchbWwa5Gd7L2cCmur1Vk=
 =lopf
 -----END PGP SIGNATURE-----

Merge tag 'debian/4.18.8-1'

Release linux (4.18.8-1).

- Drop ABI reference files and ABI maintenance patch
- Replace ccp driver patch with upstream version that applies to 4.19
2018-09-18 15:49:53 +01:00
Ben Hutchings 4b57c92b63 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.
2018-09-13 11:19:42 +01:00
Ben Hutchings 6cfab0cf13 gencontrol_signed.py: Add package_dir attribute for template package dir 2018-09-13 11:19:42 +01:00
Ben Hutchings 6854f1871e gencontrol_signed.py: Add template package name to self.vars 2018-09-13 11:19:42 +01:00
Ben Hutchings 8d93bb4a9e debian/{watch,bin/uscan-hook}: Drop uscan hook in favour of uupdate
uscan now does the file removals, which makes the hook script
redundant.  Not only that, but the orig tarball passed to the hook is
no longer a symlink to the upstream filename, so genorig.py doesn't
recognise the filename and fails.
2018-09-13 01:53:29 +01:00
Ben Hutchings 26224f8bb8 Move featureset patches and series file to debian/patches-<featureset>.
Fixes lintian warning patch-file-present-but-not-mentioned-in-series.

Also preparation for using dgit, which will remove everything except
the main patch series under debian/patches.
2018-09-13 01:52:52 +01:00
Ben Hutchings 07b57afec5 Move all patch generation scripts to debian/bin
Rename them to genpatch-{aufs,lockdown,rt}

Fixes lintian warning patch-file-present-but-not-mentioned-in-series.

Also preparation for using dgit, which will remove everything except
the main patch series under debian/patches.
2018-09-13 01:52:36 +01:00
Ben Hutchings cbebd8c763 udeb: Merge configuration directories and files across architectures
Merge the configuration and default-configuration directories,
using per-architecture overrides in package-list.

This requires a newer version of kernel-wedge to support
Depends_<arch> properly.

The only immediate change to debian/control is to remove the
different description for nic-modules on sparc64.
2018-09-03 18:01:21 +01:00
Ben Hutchings 1dce7a1eb1 gencontrol_signed.py: Fix silly errors in certificate fingerprint handling
I thought I had tested my previous changes, but evidently not.

- Fix syntax error in assertion
- Add digest algorithm argument to get_cert_fingerprint() call
2018-08-26 20:50:56 +01:00
Ben Hutchings 6033fc28e8 debian/bin: Change "#!/usr/bin/env python3" to "#!/usr/bin/python3" 2018-08-25 23:19:09 +01:00
Ben Hutchings 2ade725761 fix-shebang: Use the correct operation for comparing strings 2018-08-25 23:15:18 +01:00
Ben Hutchings fac6a14424 Remove our private patch system, which is no longer needed
I converted the main patch series to quilt format in 3.2.20-1, but
this patch system was still used by genorig.py.  One useful
feature that was not available elsewhere was using patch + unifdef
to exclude only part of a source file.  However no source files
have needed this since 3.16-rc4 and I don't expect this to ever
be needed again.

The preceding changes moved the file removal/exclusion list into
debian/copyright and the disabling of broken features into the
main patch series, so the private patch system isn't doing
anything.

So we can now remove it completely.
2018-08-11 13:27:04 +01:00
Ben Hutchings 4aa097dc5e debian/bin/genorig.py: Add support for debian/copyright Files-Excluded field
This isn't part of the machine-readable copyright format 1.0, but is
an extension supported by mk-origtargz.
2018-08-10 14:30:18 +01:00
Ben Hutchings 5254e35d9d debian/bin/gencontrol_signed.py: Add certificate fingerprints to template metadata
The signing service will check which certificates we trust, in order
to avoid mistakenly creating a chain of trust to a test signing key.
2018-08-03 15:44:35 +08:00
Ben Hutchings b5fe66a8db linux-kbuild: Change "#!/usr/bin/env perl" to "#!/usr/bin/perl" 2018-08-02 17:32:53 +08:00
Ben Hutchings a14e37b110 Move config files from linux-source to an arch-dependent linux-config package
In Linux 4.18, various compiler version and feature tests are invoked
via kconfig rather than via kbuild.  This means that we generally
cannot generate kconfig files for foreign architectures.

Move the config files to a new linux-config-<version> package which is
arch-dependent (and also M-A: same).

Make linux-config-<version> and linux-source-<version> recommend each
other.
2018-07-03 15:12:33 +01:00
Ben Hutchings ae6ef24f0d Fix linux-{doc,manual,source,support} package names in rules.real
I only fixed the control file before.

(cherry picked from commit 146c11a13da5643966cd6d07f437b183dc34a19e)
2018-07-02 00:08:22 +01:00
Ben Hutchings 3ff18afde5 debian/bin/gencontrol.py: Remove check for old [packages]tools config field
This was split into tools-versioned and tools-unversioned.
2018-06-26 22:27:55 +01:00
Bastian Blank 228a2446d1 genorig.py: Provide xz parameters to tar itself 2018-06-13 10:18:32 +02:00
Bastian Blank 4739547302 Write a complete changelog to signing template 2018-05-29 10:27:27 +02:00