Commit graph

337 commits

Author SHA1 Message Date
Bastian Blank
edf17157af Provide config in templates 2025-12-05 15:45:07 +01:00
Bastian Blank
7aa0b25e85 Make dtb installation configurable 2025-12-05 14:59:27 +01:00
Bastian Blank
19d773eb1f Install vdso files if available
We don't need to know from the config if vdso files might be available.
We can just call the make target and let the build figure out if
something should exist.  This removes one full config entry that needs
to be maintained.
2025-12-01 20:42:20 +01:00
Ben Hutchings
58b7300f9f Implement configuration for Rust compiler and other build-dependencies
- Add build.rust_build_depends, and build.enable_rust configuration
  fields.  The enable_rust field is expected to be set
  per-architecture while rust_build_depends can be global.

- Define a pkg.linux.norust build profile which disables use of Rust.

- For architectures where build.enable_rust is set, Build-Depend on
  everything in build.rust_build_depends, with a restriction to
  <!pkg.linux.nokernel !pkg.linux.norust>.

This doesn't support compiling OOT modules written in Rust, which is a
rather harder problem.
2025-11-27 11:59:13 +01:00
Ben Hutchings
531df6658d d/l/p/debian_linux/debian.py: Allow adding restrictions to PackageRelationGroup
PackageRelationGroup already supports adding architecture
qualification to all its entries.  Add support for adding restrictions
(i.e. build profiles) in a similar way.
2025-11-27 11:59:13 +01:00
Ben Hutchings
a1e4fd68cc Add 'c_' prefix to compiler configuration field and variables
In preparation for adding a Rust compiler, qualify the existing
settings for the C compiler.
2025-11-27 11:59:10 +01:00
Bastian Blank
cfa696b83f Sort relations on output 2025-11-18 18:06:20 +01:00
Bastian Blank
b0515301df Fix build profile update 2025-10-25 00:23:12 +02:00
Bastian Blank
46ed385502 Add missing linux-libc-dev-*-cross variants 2025-10-24 21:09:01 +02:00
Bastian Blank
628e147dc2 Cleanup remaining version settings 2025-10-24 21:06:50 +02:00
Bastian Blank
00450e280f Introduce explicit test flavour 2025-10-24 19:04:00 +02:00
Bastian Blank
0d1e1f28df Replace manual dh_install calls with debhelper 2025-10-09 09:15:01 +02:00
Bastian Blank
5bd0225126 Replace manual symlinks with debhelper 2025-10-07 16:22:46 +02:00
Bastian Blank
419df8d9d7 Support version combinations of update and rc 2025-08-25 18:53:59 +02:00
Bastian Blank
943d1bc271 Don't export linux version modifier 2025-08-25 18:53:59 +02:00
Bastian Blank
14317463a1 Drop support for unused DFSG versions 2025-08-25 18:53:59 +02:00
Ben Hutchings
9f69c87684 Move package revision and ABI name policy to configuration
Currently the Debian-specific policy for the package's revision and
ABI name are in Python code.  Any downstream distributions that
deviate from Debian policy or use different suite names may need to
patch the code.

Replace this policy with per-release configuration:

- debian_linux.config_v2: Add ConfigDebianrelease dataclass with
  name_regex, abi_version_full, abi_suffix, and revision_regex
  properties.

  Add a debianrelease property (list of ConfigDebianrelease) in
  Config, and a corresponding debianreleases property in ConfigMerged.

- debian_linux.debian: Delete extra revision attributes from
  LinuxVersion.

- debian_linux.test_debian: Stop testing extra revision attributes
  on LinuxVersion.

- d/b/stable-update: Check for '~exp' in Debian revision instead of
  using linux_revision_experimental attribute.

- d/b/gencontrol.py: Find the matching release and use its properties
  to generate the ABI name and validate the revision.

- d/c/defines.toml: Define UNRELEASED, experimental, unstable,
  trixie/trixie-security, and bookworm-backports releases, and
  default rules for any other suite.

  Specify the same behaviour as before for ABI name.

  Specify slightly stricter revision validation, since we know what
  the target Debian release number should be if included.
2025-05-25 21:29:20 +02:00
Bastian Blank
34c659847c Merge build profiles into build-depends 2025-04-01 20:20:19 +02:00
Bastian Blank
06fd553be9 Generate debhelper files per architecture
debhelper supports to select files on a per-architecture (as
debian/package.filename.hostarch) or per-os (as
debian/package.filename.hostos) basis.

While we do not have the packages with different debhelper files for
different architectures, just support it if someone tries to do it.
2025-02-10 20:13:28 +01:00
Bastian Blank
a29dd5bcc5 Use Python 3.12 syntax for variable types 2025-02-04 13:58:55 +01:00
Bastian Blank
d05e5b3a24 Remove empty build profile entries from output 2025-01-23 12:31:48 +01:00
Bastian Blank
dd4784d8d4 Move <> of build profile restriction one level up 2025-01-23 12:31:48 +01:00
Bastian Blank
73b9604046 Build extra packages again 2024-08-22 20:07:59 +02:00
Bastian Blank
a47169bc27 Report undefined variable errors in templates 2024-08-22 19:56:00 +02:00
Bastian Blank
070c04268b Properly disable common headers packages 2024-08-04 23:16:35 +02:00
Bastian Blank
b077376995 Source all control files 2024-07-07 12:14:32 +02:00
Bastian Blank
00104bef69 Properly split source and binary package classes 2024-07-06 18:06:37 +02:00
Bastian Blank
1f3a3d2731 Convert control entries into dataclasses 2024-07-06 15:51:58 +02:00
Bastian Blank
fcb40db277 Make sure we have a quick flavour 2024-07-06 14:36:50 +02:00
Ben Hutchings
845911e17e d/l/p/debian_linux/firmware.py: Handle quoted filenames
linux-firmware.git now includes files with spaces in their names.  In
WHENCE, these are quoted.  Update parsing of File, RawFile, and Source
fields to handle this.
2024-07-06 01:33:36 +02:00
Ben Hutchings
66d1709747 d/l/p/debian_linux/firmware.py: Correctly handle multiple licences per section
The firmware WHENCE file has (usually) one section per driver, but in
some cases there are multiple groups of firmware used with the same
driver that are under different licences.

We don't really need to care about representing the per-driver
sections in the WHENCE file, but we do need to associate the licence
information with the right group of files.

To fix this:

- Rename the FirmwareSection class to FirmwareGroup, and update
  comments accordingly.

- When we see another field after a licence field, start a new group.
2024-07-06 00:55:06 +02:00
Ben Hutchings
877698bc1d d/l/p/debian_linux/firmware.py: Handle RawFile fields
The linux-firmware WHENCE file now has RawFile fields, for files which
the kernel won't try to decompress (whereas for most files it will).
Handle these identically to File fields.
2024-06-30 22:25:29 +02:00
Salvatore Bonaccorso
f0979e4373 lib/python/debian_linux: Fix two E201/E202 whitespace errors 2024-06-27 06:34:41 +02:00
Bastian Blank
a7a67cc5b9 Use new TOML config 2024-01-21 10:19:41 +01:00
Bastian Blank
c832f47490 Bootstrap restructured config in TOML format 2024-01-21 10:19:41 +01:00
Bastian Blank
cbe5c3540c Properly merge Build-Depends 2023-12-09 15:55:44 +01:00
Bastian Blank
0ec9c0a1fd Modernize class for build profiles 2023-12-09 15:55:44 +01:00
Bastian Blank
37c91bf163 Handle quite some broken type definitions 2023-11-18 23:08:13 +01:00
Bastian Blank
5434eef02b Do type checks in a lot more functions 2023-11-18 21:49:27 +01:00
Bastian Blank
6c1a03bcbe Remove unused extra argument 2023-11-18 21:09:11 +01:00
Bastian Blank
97a0e8ea00 Fix some style problems in Python code 2023-11-18 15:10:09 +01:00
Bastian Blank
b5ec162a44 Make a lot of objects copyable 2023-11-18 13:53:30 +01:00
Bastian Blank
0578dcf3d5 Modernize class for relation fields 2023-11-11 12:11:28 +01:00
Bastian Blank
7664378e1f Modernize class for description fields 2023-11-11 12:09:18 +01:00
Bastian Blank
f2d1aed18c Modernize class for architecture fields 2023-11-11 12:09:18 +01:00
Bastian Blank
10fba5454a Remove old methods 2023-11-11 12:09:18 +01:00
Bastian Blank
3d9299c3ea Merge branch 'waldi/news-template' into 'master'
Generate NEWS file from templates

See merge request kernel-team/linux!889
2023-11-05 12:57:12 +00:00
Bastian Blank
823c6d17ef Generate NEWS file from templates 2023-11-05 12:36:39 +01:00
Bastian Blank
a3d37c75b3 Don't preserve modes of generated templates
debhelper only cares about modes of files if it can be used to modify
their meaning, but then they are executed during the build.  We have our
own templating scheme, so we don't need that.
2023-11-05 12:21:03 +01:00
Bastian Blank
f42dbb3ceb Remove backward compatible part of rule names 2023-11-04 14:30:16 +01:00