mbox series

[SRU,R/S,v3,0/1] UBUNTU: SAUCE: Create a linux-main-modules dependency toggle

Message ID cover.1788351016.git.alessio.faina@canonical.com
Headers show
Series UBUNTU: SAUCE: Create a linux-main-modules dependency toggle | expand

Message

Alessio Faina Sept. 2, 2026, 5:48 p.m. UTC
Buglink: https://bugs.launchpad.net/bugs/2166181

[ Impact ]

When linux-main-modules has been introduced, it added a forced
dependency on zfs; the module is not built by test servers and leave
developers in a bad state needing to build the module manually and
installing it. This patch is a proposal to create a toggle to remove the
dependency for test servers.

[ Fix ]

The fix is to add a do_linux_main_modules_depends variable in
0-common-vars.mk that can be externally triggered.
This will need a patch to the test servers to set the variable to false
when building the kernel.

[ Testing ]

Testing will check that not passing the variable to the build will
produce a kernel with the dependency enabled, while running it in a way
like the following one
do_linux_main_modules_depends=false dpkg-buildpackage -us -uc -b
will produce a kernel without the linux-main-modules dependencies.

Tested on the following kernels:
   - R/7.0.0-31
	 - S/7.1.3

[ What could go wrong ]

Canonical would produce one kernel with a dependency to lmm (i.e. zfs)
for production and one with no dependencies. This should be a small
impact as the module can be separately built and installed by a
developer in case of need.

[ History ]

v3: - Added stonking as additional target
		- Added missing buglink
    - Added debug logs in case the variable is set to FALSE and lmm is
			disabled
v2: https://lists.ubuntu.com/archives/kernel-team/2026-September/171430.html
    - Added comments in variant files to remind that the variable is used
			to toggle the dependency on linux-main-modules.
v1: https://lists.ubuntu.com/archives/kernel-team/2026-August/171304.html
    - Initial draft

Alessio Faina (1):
  UBUNTU: [packaging] Create a linux-main-modules dependency toggle

 debian.master/control.d/vars.generic     |  2 ++
 debian.master/control.d/vars.generic-64k |  2 ++
 debian/rules.d/0-common-vars.mk          | 11 +++++++++++
 debian/rules.d/1-maintainer.mk           |  1 +
 debian/scripts/control-create            |  5 +++++
 5 files changed, 21 insertions(+)

Comments

Edoardo Canepa Sept. 7, 2026, 2:30 p.m. UTC | #1
Acked-by: Edoardo Canepa <edoardo.canepa@canonical.com>

Please insert the buglink in the commit on apply.

On 9/2/26 20:48, Alessio Faina via kernel-team wrote:
> Buglink: https://bugs.launchpad.net/bugs/2166181
>
> [ Impact ]
>
> When linux-main-modules has been introduced, it added a forced
> dependency on zfs; the module is not built by test servers and leave
> developers in a bad state needing to build the module manually and
> installing it. This patch is a proposal to create a toggle to remove the
> dependency for test servers.
>
> [ Fix ]
>
> The fix is to add a do_linux_main_modules_depends variable in
> 0-common-vars.mk that can be externally triggered.
> This will need a patch to the test servers to set the variable to false
> when building the kernel.
>
> [ Testing ]
>
> Testing will check that not passing the variable to the build will
> produce a kernel with the dependency enabled, while running it in a way
> like the following one
> do_linux_main_modules_depends=false dpkg-buildpackage -us -uc -b
> will produce a kernel without the linux-main-modules dependencies.
>
> Tested on the following kernels:
>     - R/7.0.0-31
> 	 - S/7.1.3
>
> [ What could go wrong ]
>
> Canonical would produce one kernel with a dependency to lmm (i.e. zfs)
> for production and one with no dependencies. This should be a small
> impact as the module can be separately built and installed by a
> developer in case of need.
>
> [ History ]
>
> v3: - Added stonking as additional target
> 		- Added missing buglink
>      - Added debug logs in case the variable is set to FALSE and lmm is
> 			disabled
> v2: https://lists.ubuntu.com/archives/kernel-team/2026-September/171430.html
>      - Added comments in variant files to remind that the variable is used
> 			to toggle the dependency on linux-main-modules.
> v1: https://lists.ubuntu.com/archives/kernel-team/2026-August/171304.html
>      - Initial draft
>
> Alessio Faina (1):
>    UBUNTU: [packaging] Create a linux-main-modules dependency toggle
>
>   debian.master/control.d/vars.generic     |  2 ++
>   debian.master/control.d/vars.generic-64k |  2 ++
>   debian/rules.d/0-common-vars.mk          | 11 +++++++++++
>   debian/rules.d/1-maintainer.mk           |  1 +
>   debian/scripts/control-create            |  5 +++++
>   5 files changed, 21 insertions(+)
>
Stefan Bader Sept. 17, 2026, 6:57 a.m. UTC | #2
On 02/09/2026 19:48, Alessio Faina via kernel-team wrote:
> Buglink: https://bugs.launchpad.net/bugs/2166181
> 
> [ Impact ]
> 
> When linux-main-modules has been introduced, it added a forced
> dependency on zfs; the module is not built by test servers and leave
> developers in a bad state needing to build the module manually and
> installing it. This patch is a proposal to create a toggle to remove the
> dependency for test servers.
> 
> [ Fix ]
> 
> The fix is to add a do_linux_main_modules_depends variable in
> 0-common-vars.mk that can be externally triggered.
> This will need a patch to the test servers to set the variable to false
> when building the kernel.
> 
> [ Testing ]
> 
> Testing will check that not passing the variable to the build will
> produce a kernel with the dependency enabled, while running it in a way
> like the following one
> do_linux_main_modules_depends=false dpkg-buildpackage -us -uc -b
> will produce a kernel without the linux-main-modules dependencies.
> 
> Tested on the following kernels:
>     - R/7.0.0-31
> 	 - S/7.1.3
> 
> [ What could go wrong ]
> 
> Canonical would produce one kernel with a dependency to lmm (i.e. zfs)
> for production and one with no dependencies. This should be a small
> impact as the module can be separately built and installed by a
> developer in case of need.
> 
> [ History ]
> 
> v3: - Added stonking as additional target
> 		- Added missing buglink
>      - Added debug logs in case the variable is set to FALSE and lmm is
> 			disabled
> v2: https://lists.ubuntu.com/archives/kernel-team/2026-September/171430.html
>      - Added comments in variant files to remind that the variable is used
> 			to toggle the dependency on linux-main-modules.
> v1: https://lists.ubuntu.com/archives/kernel-team/2026-August/171304.html
>      - Initial draft
> 
> Alessio Faina (1):
>    UBUNTU: [packaging] Create a linux-main-modules dependency toggle
> 
>   debian.master/control.d/vars.generic     |  2 ++
>   debian.master/control.d/vars.generic-64k |  2 ++
>   debian/rules.d/0-common-vars.mk          | 11 +++++++++++
>   debian/rules.d/1-maintainer.mk           |  1 +
>   debian/scripts/control-create            |  5 +++++
>   5 files changed, 21 insertions(+)
> 
Applied to resolute:linux/master-next. Thanks.

-Stefan
Paolo Pisati Sept. 17, 2026, 8:19 a.m. UTC | #3
On Wed, Sep 02, 2026 at 07:48:44PM +0200, Alessio Faina via kernel-team wrote:
> Buglink: https://bugs.launchpad.net/bugs/2166181

Applied.