14 Commits

Author SHA1 Message Date
Paolo Pisati 81914dd14e Revert "UBUNTU: [Packaging] Add debian/control sanity check"
This reverts commit 8482350050.

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2024-04-04 23:49:02 +02:00
Juerg Haefliger 8482350050 UBUNTU: [Packaging] Add debian/control sanity check
BugLink: https://bugs.launchpad.net.bugs/2043994

Only the main linux source packages should produce linux-source-PKGVER
binary packages. Add a simple check that fails if debian/control looks
fishy.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2024-03-11 09:41:27 +01:00
Dimitri John Ledkov 5f068dd3bc UBUNTU: [Packaging] Remove in-tree abi checks
linux-buildinfo packages are now externally compared by swm, with
results approving or rejecting updates based on the stable
tracker. Those checks also allow hints and overrides to accept
intentional changes.

Also these are done on the correct pair-wise comparisons, especially
when two streams are being cranked.

The above eliminates the need to identify previous build abi,
download, extract it, vendor it in, and assert it at build time.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
2024-03-11 09:41:23 +01:00
Dimitri John Ledkov bd433ee34b UBUNTU: [Packaging] Remove all custom retpoline-extract code
BugLink: https://bugs.launchpad.net/bugs/2046440

Now that retpoline & SLS mitigration checks are enforced during build
via objtool patch, drop all custom retpoline packaging, abi files, and
checks.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:41:19 +01:00
Juerg Haefliger fcda365ceb UBUNTU: [Packaging] checks/final-checks: Fix shellcheck issues
Fix the following shellcheck reported issues:
  - SC2145 (error): Argument mixes string and array. Use * or separate argument.
  - SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
  - SC2086 (info): Double quote to prevent globbing and word splitting.
  - SC2140 (warning): Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?
  - SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.
  - SC2001 (style): See if you can use ${variable//search/replace} instead.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Andrei Gherzan <andrei.gherzan@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:40:48 +01:00
Juerg Haefliger 6fd7f75e20 UBUNTU: [Packaging] checks/final-checks: check existance of Makefile first
Check that the per-arch Makefile exists before trying to read it.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Andrei Gherzan <andrei.gherzan@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:40:48 +01:00
Juerg Haefliger 72456d5e26 UBUNTU: [Packaging] checks/final-checks: Remove old configs handling
There are still some references to the old config/config.common.ubuntu file
which no longer exists, so remove them.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Andrei Gherzan <andrei.gherzan@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:40:48 +01:00
Juerg Haefliger c66e49e483 UBUNTU: [Packaging] Drop support of old config handling
All kernels and their derivatives have been migrated to the new annotations
scheme by now so clean up the tree and drop the support of the old config
handling.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:40:40 +01:00
Juerg Haefliger 6cee3921f9 UBUNTU: [Packaging] checks/final-checks: Honor 'do_skip_checks'
The final-checks script is doing some final ABI checkig that should be
skipped if 'do_skip_checks' is true. Just like the other checker scripts
in debian/scripts/checks.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2024-03-11 09:40:34 +01:00
Juerg Haefliger 2a272fbe40 UBUNTU: [Packaging] Move final-checks script to debian/scripts/checks
Move the final-checks script to debian/scripts/checks so that all the
checker scripts are in one place.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
2024-03-11 09:40:34 +01:00
Juerg Haefliger 2e5e631350 UBUNTU: [Packaging] checks/module-signature-check: Add 'skip_checks' argument
Add an optional 'skip_checks' argument to match the other checker scripts.
This is used for mainline builds to not fail a build even if the checker
script finds problems.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:40:16 +01:00
Juerg Haefliger 9532b18cac UBUNTU: [Packaging] checks/retpoline-check: Make 'skipretpoline' argument optional
Make the 'skipretpoline' argument optional and also more robust to match
the other checker scripts.

While at it, drop the invalid/unused 5th argument from the call site in
the rules file.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:40:16 +01:00
Andrea Righi ea57d726fc UBUNTU: [Packaging] abi-check: ignore failures when abi check is skipped
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:40:14 +01:00
Juerg Haefliger 78021e8a72 UBUNTU: [Packaging] Move checker scripts to debian/scripts/checks
Tidy up the scripts directory and move all checker scripts to a new
subdirectory.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-03-11 09:40:09 +01:00