APPLIED/Cmnt: [SRU][J][PULL v2] Use new annotations model

Stefan Bader stefan.bader at canonical.com
Wed May 10 15:14:32 UTC 2023


On 09.05.23 18:13, Andrea Righi wrote:
> BugLink: https://bugs.launchpad.net/bugs/2019000
> 
> [Impact]
> 
> Starting with lunar we have introduced a new way to manage kernel
> configs, unifying the duplicated information defined in the annotations
> file + config chunks into an annotations-only model.
> 
> [Test case]
> 
> A kernel build can be considered a valid test case, in particular the
> specific command that is used to update the .config's for all the
> supported architectures and flavours:
> 
>   $ fakeroot debian/rules updateconfigs
> 
> [Fix]
> 
> Import the required changes in debian/ from lunar (with the required
> adjustments) to support the annotations-only model also in all the
> previous releases.
> 
> [Regression potential]
> 
> We may experience regressions during the updateconfigs step, especially
> with derivatives. Moreover, derivatives that want to transition to the
> new annotations model require to adjust the header in the annotations
> file as following (make sure to define the corresponding architectures
> and flavours):
> 
> # FORMAT: 4
> # ARCH: amd64 arm64 armhf ppc64el s390x
> # FLAVOUR: amd64-generic amd64-lowlatency arm64-generic arm64-generic-64k arm64-lowlatency arm64-lowlatency-64k armhf-generic armhf-generic-lpae ppc64el-generic s390x-generic
> 
> After adjusting the header a special command is provided to transition
> to the new annotations-only model:
> 
>   $ fakeroot debian/rules migrateconfigs
> 
> This command should automatically import the old configs into the new
> annotations file.
> 
> A kernel with this change applied can still support the old
> annotations+configs model, the transition to the new model is not
> mandatory.
> 
> Basically without using `fakeroot debian/rules migrateconfigs` the
> updateconfigs step will continue to use the old model and the old
> scripts (that is the safest approach to avoid potential unexpected
> .config changes).
> 
> ChangeLog v1 -> v2:
>   - send a PR instead of to avoid utf-8 encoding issues with email
> 
> ----------------------------------------------------------------
> 
> The following changes since commit f6fb572253ea4a145e115409272f80909a17bbf4:
> 
>    KVM: nVMX: add missing consistency checks for CR0 and CR4 (2023-05-03 09:49:34 +0200)
> 
> are available in the Git repository at:
> 
>    git://git.launchpad.net/~arighi/+git/linux jammy-annotations
> 
> for you to fetch changes up to bf8a9d8e616dc9aabae7b1f744f12c133f05b0e4:
> 
>    UBUNTU: [Config] migrate all configs into annotations (2023-05-09 15:57:41 +0200)
> 
> ----------------------------------------------------------------
> Andrea Righi (2):
>        UBUNTU: [Packaging] new annotations model infrastructure
>        UBUNTU: [Config] migrate all configs into annotations
> 
>   debian.master/config/README.rst                    |   185 +
>   debian.master/config/amd64/config.common.amd64     |   696 -
>   debian.master/config/amd64/config.flavour.generic  |    12 -
>   .../config/amd64/config.flavour.lowlatency         |    12 -
>   debian.master/config/annotations                   | 28063 +++++++++----------
>   debian.master/config/arm64/config.common.arm64     |   730 -
>   debian.master/config/arm64/config.flavour.generic  |    19 -
>   .../config/arm64/config.flavour.generic-64k        |    19 -
>   .../config/arm64/config.flavour.lowlatency         |    19 -
>   .../config/arm64/config.flavour.lowlatency-64k     |    19 -
>   debian.master/config/armhf/config.common.armhf     |   704 -
>   debian.master/config/armhf/config.flavour.generic  |    23 -
>   .../config/armhf/config.flavour.generic-lpae       |    23 -
>   debian.master/config/config.common.ubuntu          | 12827 ---------
>   debian.master/config/ppc64el/config.common.ppc64el |   702 -
>   .../config/ppc64el/config.flavour.generic          |     3 -
>   debian.master/config/s390x/config.common.s390x     |   623 -
>   debian.master/config/s390x/config.flavour.generic  |     3 -
>   debian/rules.d/1-maintainer.mk                     |    22 +-
>   debian/rules.d/2-binary-arch.mk                    |     9 +-
>   debian/rules.d/4-checks.mk                         |    12 +-
>   debian/scripts/misc/annotations                    |   274 +
>   debian/scripts/misc/final-checks                   |    16 +-
>   debian/scripts/misc/kconfig/__init__.py            |     0
>   debian/scripts/misc/kconfig/annotations.py         |   416 +
>   debian/scripts/misc/kernelconfig                   |   326 +-
>   debian/scripts/misc/migrate-annotations            |    35 +
>   debian/scripts/misc/old-kernelconfig               |   207 +
>   debian/snapcraft.mk                                |     6 +-
>   29 files changed, 15127 insertions(+), 30878 deletions(-)
>   create mode 100644 debian.master/config/README.rst
>   delete mode 100644 debian.master/config/amd64/config.common.amd64
>   delete mode 100644 debian.master/config/amd64/config.flavour.generic
>   delete mode 100644 debian.master/config/amd64/config.flavour.lowlatency
>   delete mode 100644 debian.master/config/arm64/config.common.arm64
>   delete mode 100644 debian.master/config/arm64/config.flavour.generic
>   delete mode 100644 debian.master/config/arm64/config.flavour.generic-64k
>   delete mode 100644 debian.master/config/arm64/config.flavour.lowlatency
>   delete mode 100644 debian.master/config/arm64/config.flavour.lowlatency-64k
>   delete mode 100644 debian.master/config/armhf/config.common.armhf
>   delete mode 100644 debian.master/config/armhf/config.flavour.generic
>   delete mode 100644 debian.master/config/armhf/config.flavour.generic-lpae
>   delete mode 100644 debian.master/config/config.common.ubuntu
>   delete mode 100644 debian.master/config/ppc64el/config.common.ppc64el
>   delete mode 100644 debian.master/config/ppc64el/config.flavour.generic
>   delete mode 100644 debian.master/config/s390x/config.common.s390x
>   delete mode 100644 debian.master/config/s390x/config.flavour.generic
>   create mode 100755 debian/scripts/misc/annotations
>   create mode 100644 debian/scripts/misc/kconfig/__init__.py
>   create mode 100644 debian/scripts/misc/kconfig/annotations.py
>   create mode 100755 debian/scripts/misc/migrate-annotations
>   create mode 100644 debian/scripts/misc/old-kernelconfig
> 

Applied to jammy:linux/master-next. But I had to move it under the 
latest stable update since that required adjustments to config. I  hope 
I did things correctly. At least there were no check errors and 
generated configs seemed to remain the same. Thanks.

-Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xE8675DEECBEECEA3.asc
Type: application/pgp-keys
Size: 44613 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230510/6dd30942/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230510/6dd30942/attachment-0001.sig>


More information about the kernel-team mailing list