[cosmic/bionic/xenial/trusty][PATCH] UBUNTU: [Packaging] Sort the config file for single arch and single flavour kernels

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[cosmic/bionic/xenial/trusty][PATCH] UBUNTU: [Packaging] Sort the config file for single arch and single flavour kernels

Marcelo Henrique Cerri
BugLink: http://bugs.launchpad.net/bugs/1792387

Single arch and single flavour kernels, such as the cloud kernels, are
currently shipping a config file (that is installed under /boot) that
is not properly ordered as the ones generated the master kernels.

The problem occurs because `make silendoldconfig` in
"debian/rules.d/2-binary-arch.mk" does not re-writes the config file
(and thus does not sort it) when no changes are made.

Change the "2-binary-arch.mk" makefile to force the re-generation of
the config file if its header was generated by splitconfig, since
that's the way the config fragments are kept in
"debian.<branch>/config".

Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
---
 debian/rules.d/2-binary-arch.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index aaf3d43379ed..ea68d49dfe1a 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -30,6 +30,8 @@ $(stampdir)/stamp-prepare-tree-%: $(commonconfdir)/config.common.$(family) $(arc
  cat $^ | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(raw_kernelversion)"/' > $(builddir)/build-$*/.config
  find $(builddir)/build-$* -name "*.ko" | xargs rm -f
  $(build_cd) $(kmake) $(build_O) -j1 silentoldconfig prepare scripts
+ head -n 3 $(builddir)/build-$*/.config | grep -qF splitconfig.pl && \
+ yes "" | $(build_cd) $(kmake) $(build_O) -j1 oldconfig || true
  touch $@
 
 # Used by developers as a shortcut to prepare a tree for compilation.
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

Cmnt: [cosmic/bionic/xenial/trusty][PATCH] UBUNTU: [Packaging] Sort the config file for single arch and single flavour kernels

Marcelo Henrique Cerri
I tested the patch with bionic and xenial, and it doesn't affect the
generation of the config file as expected. I also tested it with
linux-azure and it fixed the problem regarding the config file
sorting.

--
Regards,
Marcelo

On Thu, Sep 13, 2018 at 10:53:25AM -0300, Marcelo Henrique Cerri wrote:

> BugLink: http://bugs.launchpad.net/bugs/1792387
>
> Single arch and single flavour kernels, such as the cloud kernels, are
> currently shipping a config file (that is installed under /boot) that
> is not properly ordered as the ones generated the master kernels.
>
> The problem occurs because `make silendoldconfig` in
> "debian/rules.d/2-binary-arch.mk" does not re-writes the config file
> (and thus does not sort it) when no changes are made.
>
> Change the "2-binary-arch.mk" makefile to force the re-generation of
> the config file if its header was generated by splitconfig, since
> that's the way the config fragments are kept in
> "debian.<branch>/config".
>
> Signed-off-by: Marcelo Henrique Cerri <[hidden email]>
> ---
>  debian/rules.d/2-binary-arch.mk | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index aaf3d43379ed..ea68d49dfe1a 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -30,6 +30,8 @@ $(stampdir)/stamp-prepare-tree-%: $(commonconfdir)/config.common.$(family) $(arc
>   cat $^ | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(raw_kernelversion)"/' > $(builddir)/build-$*/.config
>   find $(builddir)/build-$* -name "*.ko" | xargs rm -f
>   $(build_cd) $(kmake) $(build_O) -j1 silentoldconfig prepare scripts
> + head -n 3 $(builddir)/build-$*/.config | grep -qF splitconfig.pl && \
> + yes "" | $(build_cd) $(kmake) $(build_O) -j1 oldconfig || true
>   touch $@
>  
>  # Used by developers as a shortcut to prepare a tree for compilation.
> --
> 2.17.1
>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

NACK: [cosmic/bionic/xenial/trusty][PATCH] UBUNTU: [Packaging] Sort the config file for single arch and single flavour kernels

Marcelo Henrique Cerri
In reply to this post by Marcelo Henrique Cerri
I will submit a new version of the patch soon using a different
approach.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team