mbox series

[SRU,J,0/2] Use new annotations model

Message ID 20230509145032.168795-1-andrea.righi@canonical.com
Headers show
Series Use new annotations model | expand

Message

Andrea Righi May 9, 2023, 2:50 p.m. UTC
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).

----------------------------------------------------------------
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

Comments

Andrea Righi May 9, 2023, 4:10 p.m. UTC | #1
NACK and sending a v2 as a pull request to avoid utf-8 / encoding issues
with email.

-Andrea

On Tue, May 09, 2023 at 04:50:30PM +0200, 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).
> 
> ----------------------------------------------------------------
> 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
Luke Nowakowski-Krijger May 10, 2023, 11:46 a.m. UTC | #2
Acked-by: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>

On Tue, May 9, 2023 at 4:51 PM Andrea Righi <andrea.righi@canonical.com>
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).
>
> ----------------------------------------------------------------
> 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
>
>
> --
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>