All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific
@ 2023-02-15 13:00 Jose Quaresma
  2023-02-15 13:00 ` [OE-core][PATCH 2/2] kernel: autoload and probeconf are handled by kernel-module-split Jose Quaresma
  2023-02-15 13:25 ` [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific Otavio Salvador
  0 siblings, 2 replies; 10+ messages in thread
From: Jose Quaresma @ 2023-02-15 13:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jose Quaresma

The modules-load.d [1] - Configure kernel modules to load at boot
should install their configuration files in /usr/lib/modules-load.d.

The modprobe.d [2] - Configuration directory for modprobe
should install their configuration files in /lib/modprobe.d

[1] https://www.freedesktop.org/software/systemd/man/modules-load.d.html
[2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
 .../kernel-module-split.bbclass               | 30 +++++++++----------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/meta/classes-recipe/kernel-module-split.bbclass b/meta/classes-recipe/kernel-module-split.bbclass
index 50882c31a7..b70650888a 100644
--- a/meta/classes-recipe/kernel-module-split.bbclass
+++ b/meta/classes-recipe/kernel-module-split.bbclass
@@ -31,7 +31,8 @@ fi
 PACKAGE_WRITE_DEPS += "kmod-native depmodwrapper-cross"
 
 do_install:append() {
-	install -d ${D}${sysconfdir}/modules-load.d/ ${D}${sysconfdir}/modprobe.d/
+	install -d ${D}${libdir}/modules-load.d
+	install -d ${D}${nonarch_base_libdir}/modprobe.d
 }
 
 KERNEL_SPLIT_MODULES ?= "1"
@@ -93,8 +94,9 @@ python split_kernel_module_packages () {
 
         dvar = d.getVar('PKGD')
 
-        # If autoloading is requested, output /etc/modules-load.d/<name>.conf and append
+        # If autoloading is requested, output ${libdir}/modules-load.d/<name>.conf and append
         # appropriate modprobe commands to the postinst
+        autoloadpath = '%s/modules-load.d/%s.conf' % (d.getVar('libdir'), basename)
         autoloadlist = (d.getVar("KERNEL_MODULE_AUTOLOAD") or "").split()
         autoload = d.getVar('module_autoload_%s' % basename)
         if autoload and autoload == basename:
@@ -102,8 +104,7 @@ python split_kernel_module_packages () {
         if autoload and basename not in autoloadlist:
             bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename))
         if basename in autoloadlist:
-            name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
-            f = open(name, 'w')
+            f = open("%s%s" % (dvar, autoloadpath), 'w')
             if autoload:
                 for m in autoload.split():
                     f.write('%s\n' % m)
@@ -117,23 +118,19 @@ python split_kernel_module_packages () {
             d.setVar('pkg_postinst:%s' % pkg, postinst)
 
         # Write out any modconf fragment
+        modconfpath = '%s/modprobe.d/%s.conf' % (d.getVar('nonarch_base_libdir'), basename)
         modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split()
         modconf = d.getVar('module_conf_%s' % basename)
         if modconf and basename in modconflist:
-            name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
-            f = open(name, 'w')
+            f = open("%s%s" % (dvar, modconfpath), 'w')
             f.write("%s\n" % modconf)
             f.close()
         elif modconf:
             bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename))
 
-        files = d.getVar('FILES:%s' % pkg)
-        files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
-        d.setVar('FILES:%s' % pkg, files)
-
-        conffiles = d.getVar('CONFFILES:%s' % pkg)
-        conffiles = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (conffiles, basename, basename)
-        d.setVar('CONFFILES:%s' % pkg, conffiles)
+        appendfiles = " %s %s" % (autoloadpath, modconfpath)
+        d.appendVar('FILES:%s' % pkg, appendfiles)
+        d.appendVar('CONFFILES:%s' % pkg, appendfiles)
 
         if "description" in vals:
             old_desc = d.getVar('DESCRIPTION:' + pkg) or ""
@@ -167,10 +164,11 @@ python split_kernel_module_packages () {
     splitmods = d.getVar('KERNEL_SPLIT_MODULES')
     postinst = d.getVar('pkg_postinst:modules')
     postrm = d.getVar('pkg_postrm:modules')
+    nonarch_base_libdir = d.getVar("nonarch_base_libdir")
+    libdir = d.getVar("libdir")
 
     if splitmods != '1':
-        etcdir = d.getVar('sysconfdir')
-        d.appendVar('FILES:' + metapkg, '%s/modules-load.d/ %s/modprobe.d/ %s/modules/' % (etcdir, etcdir, d.getVar("nonarch_base_libdir")))
+        d.appendVar('FILES:' + metapkg, '%s/modules-load.d/ %s/modprobe.d/ %s/modules/' % (libdir, nonarch_base_libdir, nonarch_base_libdir))
         d.appendVar('pkg_postinst:%s' % metapkg, postinst)
         d.prependVar('pkg_postrm:%s' % metapkg, postrm);
         return
@@ -189,7 +187,7 @@ python split_kernel_module_packages () {
     # avoid warnings. removedirs only raises an OSError if an empty
     # directory cannot be removed.
     dvar = d.getVar('PKGD')
-    for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar), "%s/etc" % (dvar)]:
+    for dir in ["%s%s/modprobe.d" % (dvar, nonarch_base_libdir), "%s%s/modules-load.d" % (dvar, libdir)]:
         if len(os.listdir(dir)) == 0:
             os.rmdir(dir)
 }
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [OE-core][PATCH 2/2] kernel: autoload and probeconf are handled by kernel-module-split
  2023-02-15 13:00 [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific Jose Quaresma
@ 2023-02-15 13:00 ` Jose Quaresma
  2023-02-15 13:25 ` [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific Otavio Salvador
  1 sibling, 0 replies; 10+ messages in thread
From: Jose Quaresma @ 2023-02-15 13:00 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jose Quaresma

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
 meta/classes-recipe/kernel.bbclass | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index d327cd6888..5718600eee 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -478,8 +478,6 @@ kernel_do_install() {
 	install -m 0644 .config ${D}/${KERNEL_IMAGEDEST}/config-${KERNEL_VERSION}
 	install -m 0644 vmlinux ${D}/${KERNEL_IMAGEDEST}/vmlinux-${KERNEL_VERSION}
 	[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION}
-	install -d ${D}${sysconfdir}/modules-load.d
-	install -d ${D}${sysconfdir}/modprobe.d
 }
 
 # Must be ran no earlier than after do_kernel_checkout or else Makefile won't be in ${S}/Makefile
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific
  2023-02-15 13:00 [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific Jose Quaresma
  2023-02-15 13:00 ` [OE-core][PATCH 2/2] kernel: autoload and probeconf are handled by kernel-module-split Jose Quaresma
@ 2023-02-15 13:25 ` Otavio Salvador
  2023-02-15 15:10   ` Jose Quaresma
  1 sibling, 1 reply; 10+ messages in thread
From: Otavio Salvador @ 2023-02-15 13:25 UTC (permalink / raw)
  To: Jose Quaresma; +Cc: openembedded-core, Jose Quaresma

Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
<quaresma.jose@gmail.com> escreveu:
>
> The modules-load.d [1] - Configure kernel modules to load at boot
> should install their configuration files in /usr/lib/modules-load.d.
>
> The modprobe.d [2] - Configuration directory for modprobe
> should install their configuration files in /lib/modprobe.d
>
> [1] https://www.freedesktop.org/software/systemd/man/modules-load.d.html
> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
>
> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>


Did you validate this using busybox only? Using sysv and busybox need
to be validated as well.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific
  2023-02-15 13:25 ` [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific Otavio Salvador
@ 2023-02-15 15:10   ` Jose Quaresma
  2023-02-16  8:21     ` Ola x Nilsson
  0 siblings, 1 reply; 10+ messages in thread
From: Jose Quaresma @ 2023-02-15 15:10 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: openembedded-core, Jose Quaresma

[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]

Hi Octavio,

Otavio Salvador <otavio.salvador@ossystems.com.br> escreveu no dia quarta,
15/02/2023 à(s) 13:25:

> Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> <quaresma.jose@gmail.com> escreveu:
> >
> > The modules-load.d [1] - Configure kernel modules to load at boot
> > should install their configuration files in /usr/lib/modules-load.d.
> >
> > The modprobe.d [2] - Configuration directory for modprobe
> > should install their configuration files in /lib/modprobe.d
> >
> > [1] https://www.freedesktop.org/software/systemd/man/modules-load.d.html
> > [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
> >
> > Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
>
>
> Did you validate this using busybox only? Using sysv and busybox need
> to be validated as well.
>

Please drop this patch series because it doesn work with busybox.

Looks like busybox don't support other path than /etc:
https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658

So I need to implement this in another way, maybe relocating the files from
/etc only when systemd is enabled.

Thanks for raising the issue.

Jose


> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750
>


-- 
Best regards,

José Quaresma

[-- Attachment #2: Type: text/html, Size: 3248 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific
  2023-02-15 15:10   ` Jose Quaresma
@ 2023-02-16  8:21     ` Ola x Nilsson
  2023-02-16 11:08       ` Jose Quaresma
  0 siblings, 1 reply; 10+ messages in thread
From: Ola x Nilsson @ 2023-02-16  8:21 UTC (permalink / raw)
  To: Jose Quaresma; +Cc: Otavio Salvador, Jose Quaresma, openembedded-core


On Wed, Feb 15 2023, Jose Quaresma wrote:

> Hi Octavio,
>
> Otavio Salvador <otavio.salvador@ossystems.com.br<mailto:otavio.salvador@ossystems.com.br>> escreveu no dia quarta, 15/02/2023 à(s) 13:25:
> Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> <quaresma.jose@gmail.com<mailto:quaresma.jose@gmail.com>> escreveu:
>>
>> The modules-load.d [1] - Configure kernel modules to load at boot
>> should install their configuration files in /usr/lib/modules-load.d.
>>
>> The modprobe.d [2] - Configuration directory for modprobe
>> should install their configuration files in /lib/modprobe.d
>>
>> [1] https://www.freedesktop.org/software/systemd/man/modules-load.d.html
>> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
>>
>> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io<mailto:jose.quaresma@foundries.io>>
>
>
> Did you validate this using busybox only? Using sysv and busybox need
> to be validated as well.
>
> Please drop this patch series because it doesn work with busybox.
>
> Looks like busybox don't support other path than /etc:
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
>
> So I need to implement this in another way, maybe relocating the files from /etc only when systemd is enabled.
>
> Thanks for raising the issue.
>
> Jose
>

Hi,

Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
as well.

-- 
Ola x Nilsson


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific
  2023-02-16  8:21     ` Ola x Nilsson
@ 2023-02-16 11:08       ` Jose Quaresma
  2023-02-17 10:52         ` Peter Kjellerstedt
  0 siblings, 1 reply; 10+ messages in thread
From: Jose Quaresma @ 2023-02-16 11:08 UTC (permalink / raw)
  To: Ola x Nilsson; +Cc: Otavio Salvador, Jose Quaresma, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]

Ola x Nilsson <ola.x.nilsson@axis.com> escreveu no dia quinta, 16/02/2023
à(s) 08:22:

>
> On Wed, Feb 15 2023, Jose Quaresma wrote:
>
> > Hi Octavio,
> >
> > Otavio Salvador <otavio.salvador@ossystems.com.br<mailto:
> otavio.salvador@ossystems.com.br>> escreveu no dia quarta, 15/02/2023
> à(s) 13:25:
> > Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> > <quaresma.jose@gmail.com<mailto:quaresma.jose@gmail.com>> escreveu:
> >>
> >> The modules-load.d [1] - Configure kernel modules to load at boot
> >> should install their configuration files in /usr/lib/modules-load.d.
> >>
> >> The modprobe.d [2] - Configuration directory for modprobe
> >> should install their configuration files in /lib/modprobe.d
> >>
> >> [1]
> https://www.freedesktop.org/software/systemd/man/modules-load.d.html
> >> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
> >>
> >> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io<mailto:
> jose.quaresma@foundries.io>>
> >
> >
> > Did you validate this using busybox only? Using sysv and busybox need
> > to be validated as well.
> >
> > Please drop this patch series because it doesn work with busybox.
> >
> > Looks like busybox don't support other path than /etc:
> >
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
> >
> > So I need to implement this in another way, maybe relocating the files
> from /etc only when systemd is enabled.
> >
> > Thanks for raising the issue.
> >
> > Jose
> >
>
> Hi,
>
> Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
> as well.
>
> --
> Ola x Nilsson
>

Hi Ola,

We use usermerge too but I think the weird issue here is we need to have
this distribution specified only for systemd
excluding busybox and sysint as pointed out by Octavio.
The other solution is adding support on busybox and sysint if needed.

My idea is add a prefix variable with path "/etc" by default but
conditioned by systemd DISTRO_FEATURES

Thanks for the bug hint.

-- 
Best regards,

José Quaresma

[-- Attachment #2: Type: text/html, Size: 3711 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific
  2023-02-16 11:08       ` Jose Quaresma
@ 2023-02-17 10:52         ` Peter Kjellerstedt
  2023-02-17 16:53           ` Jose Quaresma
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Kjellerstedt @ 2023-02-17 10:52 UTC (permalink / raw)
  To: Jose Quaresma, Ola x Nilsson
  Cc: Otavio Salvador, Jose Quaresma,
	openembedded-core@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 3219 bytes --]

Wouldn’t the easiest solution be to define two variables:

modulesloaddir ??= "${sysconfdir}/modules-load.d "
modprobedir ??= "${sysconfdir}/modprobe.d "

then in init-manager-systemd.inc you could change them to:

modulesloaddir ?= "${nonarch_libdir}/modules-load.d"
modprobedir ?= "${nonarch_base_libdir}/modprobe.d"

Using a single prefix variable doesn’t really work since they need different paths in the latter case.

//Peter

From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Jose Quaresma
Sent: den 16 februari 2023 12:08
To: Ola x Nilsson <Ola.x.Nilsson@axis.com>
Cc: Otavio Salvador <otavio.salvador@ossystems.com.br>; Jose Quaresma <jose.quaresma@foundries.io>; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific


Ola x Nilsson <ola.x.nilsson@axis.com<mailto:ola.x.nilsson@axis.com>> escreveu no dia quinta, 16/02/2023 à(s) 08:22:

On Wed, Feb 15 2023, Jose Quaresma wrote:

> Hi Octavio,
>
> Otavio Salvador <otavio.salvador@ossystems.com.br<mailto:otavio.salvador@ossystems.com.br><mailto:otavio.salvador@ossystems.com.br<mailto:otavio.salvador@ossystems.com.br>>> escreveu no dia quarta, 15/02/2023 à(s) 13:25:
> Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> <quaresma.jose@gmail.com<mailto:quaresma.jose@gmail.com><mailto:quaresma.jose@gmail.com<mailto:quaresma.jose@gmail.com>>> escreveu:
>>
>> The modules-load.d [1] - Configure kernel modules to load at boot
>> should install their configuration files in /usr/lib/modules-load.d.
>>
>> The modprobe.d [2] - Configuration directory for modprobe
>> should install their configuration files in /lib/modprobe.d
>>
>> [1] https://www.freedesktop.org/software/systemd/man/modules-load.d.html
>> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html<https://www.man7.org/linux/man-pages/man5/modprobe.d.5.html>
>>
>> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io<mailto:jose.quaresma@foundries.io><mailto:jose.quaresma@foundries.io<mailto:jose.quaresma@foundries.io>>>
>
>
> Did you validate this using busybox only? Using sysv and busybox need
> to be validated as well.
>
> Please drop this patch series because it doesn work with busybox.
>
> Looks like busybox don't support other path than /etc:
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
>
> So I need to implement this in another way, maybe relocating the files from /etc only when systemd is enabled.
>
> Thanks for raising the issue.
>
> Jose
>

Hi,

Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
as well.

--
Ola x Nilsson

Hi Ola,

We use usermerge too but I think the weird issue here is we need to have this distribution specified only for systemd
excluding busybox and sysint as pointed out by Octavio.
The other solution is adding support on busybox and sysint if needed.

My idea is add a prefix variable with path "/etc" by default but conditioned by systemd DISTRO_FEATURES

Thanks for the bug hint.
--
Best regards,

José Quaresma

[-- Attachment #2: Type: text/html, Size: 8790 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific
  2023-02-17 10:52         ` Peter Kjellerstedt
@ 2023-02-17 16:53           ` Jose Quaresma
  2023-06-16 16:03             ` Peter Kjellerstedt
  0 siblings, 1 reply; 10+ messages in thread
From: Jose Quaresma @ 2023-02-17 16:53 UTC (permalink / raw)
  To: Peter Kjellerstedt
  Cc: Ola x Nilsson, Otavio Salvador, Jose Quaresma,
	openembedded-core@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 3827 bytes --]

Hi Peter,

Peter Kjellerstedt <peter.kjellerstedt@axis.com> escreveu no dia sexta,
17/02/2023 à(s) 10:52:

> Wouldn’t the easiest solution be to define two variables:
>
>
>
> modulesloaddir ??= "${sysconfdir}/modules-load.d "
>
> modprobedir ??= "${sysconfdir}/modprobe.d "
>
>
>
> then in init-manager-systemd.inc you could change them to:
>
>
>
> modulesloaddir ?= "${nonarch_libdir}/modules-load.d"
>
> modprobedir ?= "${nonarch_base_libdir}/modprobe.d"
>
>
>
> Using a single prefix variable doesn’t really work since they need
> different paths in the latter case.
>

I was thinking of something similar to what you suggest but only on the
class:

modulesloaddir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
'${nonarch_libdir}', '${sysconfdir}', d)}"
modprobedir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
'${nonarch_base_libdir}', '${sysconfdir}', d)}"

Anyway your approach looks good to me too so i'll use yours, hope I can
test it next week.

Jose


>
>
> //Peter
>
>
>
> *From:* openembedded-core@lists.openembedded.org <
> openembedded-core@lists.openembedded.org> *On Behalf Of *Jose Quaresma
> *Sent:* den 16 februari 2023 12:08
> *To:* Ola x Nilsson <Ola.x.Nilsson@axis.com>
> *Cc:* Otavio Salvador <otavio.salvador@ossystems.com.br>; Jose Quaresma <
> jose.quaresma@foundries.io>; openembedded-core@lists.openembedded.org
> *Subject:* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload
> and probeconf distribution specific
>
>
>
>
>
> Ola x Nilsson <ola.x.nilsson@axis.com> escreveu no dia quinta, 16/02/2023
> à(s) 08:22:
>
>
> On Wed, Feb 15 2023, Jose Quaresma wrote:
>
> > Hi Octavio,
> >
> > Otavio Salvador <otavio.salvador@ossystems.com.br<mailto:
> otavio.salvador@ossystems.com.br>> escreveu no dia quarta, 15/02/2023
> à(s) 13:25:
> > Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> > <quaresma.jose@gmail.com<mailto:quaresma.jose@gmail.com>> escreveu:
> >>
> >> The modules-load.d [1] - Configure kernel modules to load at boot
> >> should install their configuration files in /usr/lib/modules-load.d.
> >>
> >> The modprobe.d [2] - Configuration directory for modprobe
> >> should install their configuration files in /lib/modprobe.d
> >>
> >> [1]
> https://www.freedesktop.org/software/systemd/man/modules-load.d.html
> >> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
> <https://www.man7.org/linux/man-pages/man5/modprobe.d.5.html>
> >>
> >> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io<mailto:
> jose.quaresma@foundries.io>>
> >
> >
> > Did you validate this using busybox only? Using sysv and busybox need
> > to be validated as well.
> >
> > Please drop this patch series because it doesn work with busybox.
> >
> > Looks like busybox don't support other path than /etc:
> >
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
> >
> > So I need to implement this in another way, maybe relocating the files
> from /etc only when systemd is enabled.
> >
> > Thanks for raising the issue.
> >
> > Jose
> >
>
> Hi,
>
> Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
> as well.
>
> --
> Ola x Nilsson
>
>
> Hi Ola,
>
> We use usermerge too but I think the weird issue here is we need to have
> this distribution specified only for systemd
>
> excluding busybox and sysint as pointed out by Octavio.
>
> The other solution is adding support on busybox and sysint if needed.
>
> My idea is add a prefix variable with path "/etc" by default but
> conditioned by systemd DISTRO_FEATURES
>
> Thanks for the bug hint.
>
> --
>
> Best regards,
>
>
> José Quaresma
>


-- 
Best regards,

José Quaresma

[-- Attachment #2: Type: text/html, Size: 9145 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific
  2023-02-17 16:53           ` Jose Quaresma
@ 2023-06-16 16:03             ` Peter Kjellerstedt
  2023-06-19 23:20               ` Jose Quaresma
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Kjellerstedt @ 2023-06-16 16:03 UTC (permalink / raw)
  To: Jose Quaresma
  Cc: Ola x Nilsson, Otavio Salvador, Jose Quaresma,
	openembedded-core@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 4844 bytes --]

Did anything ever become of this? This is a change that at least we would appreciate.

//Peter

From: Jose Quaresma <quaresma.jose@gmail.com>
Sent: den 17 februari 2023 17:53
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: Ola x Nilsson <Ola.x.Nilsson@axis.com>; Otavio Salvador <otavio.salvador@ossystems.com.br>; Jose Quaresma <jose.quaresma@foundries.io>; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

Hi Peter,

Peter Kjellerstedt <peter.kjellerstedt@axis.com<mailto:peter.kjellerstedt@axis.com>> escreveu no dia sexta, 17/02/2023 à(s) 10:52:
Wouldn’t the easiest solution be to define two variables:
modulesloaddir ??= "${sysconfdir}/modules-load.d "
modprobedir ??= "${sysconfdir}/modprobe.d "
then in init-manager-systemd.inc you could change them to:
modulesloaddir ?= "${nonarch_libdir}/modules-load.d"
modprobedir ?= "${nonarch_base_libdir}/modprobe.d"
Using a single prefix variable doesn’t really work since they need different paths in the latter case.

I was thinking of something similar to what you suggest but only on the class:

modulesloaddir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${nonarch_libdir}', '${sysconfdir}', d)}<mailto:$%7b@bb.utils.contains('DISTRO_FEATURES',%20'systemd',%20'$%7bnonarch_libdir%7d',%20'$%7bsysconfdir%7d',%20d)%7d>"
modprobedir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${nonarch_base_libdir}', '${sysconfdir}', d)}<mailto:$%7b@bb.utils.contains('DISTRO_FEATURES',%20'systemd',%20'$%7bnonarch_base_libdir%7d',%20'$%7bsysconfdir%7d',%20d)%7d>"

Anyway your approach looks good to me too so i'll use yours, hope I can test it next week.

Jose


//Peter

From: openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org> <openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>> On Behalf Of Jose Quaresma
Sent: den 16 februari 2023 12:08
To: Ola x Nilsson <Ola.x.Nilsson@axis.com<mailto:Ola.x.Nilsson@axis.com>>
Cc: Otavio Salvador <otavio.salvador@ossystems.com.br<mailto:otavio.salvador@ossystems.com.br>>; Jose Quaresma <jose.quaresma@foundries.io<mailto:jose.quaresma@foundries.io>>; openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific


Ola x Nilsson <ola.x.nilsson@axis.com<mailto:ola.x.nilsson@axis.com>> escreveu no dia quinta, 16/02/2023 à(s) 08:22:

On Wed, Feb 15 2023, Jose Quaresma wrote:

> Hi Octavio,
>
> Otavio Salvador <otavio.salvador@ossystems.com.br<mailto:otavio.salvador@ossystems.com.br><mailto:otavio.salvador@ossystems.com.br<mailto:otavio.salvador@ossystems.com.br>>> escreveu no dia quarta, 15/02/2023 à(s) 13:25:
> Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> <quaresma.jose@gmail.com<mailto:quaresma.jose@gmail.com><mailto:quaresma.jose@gmail.com<mailto:quaresma.jose@gmail.com>>> escreveu:
>>
>> The modules-load.d [1] - Configure kernel modules to load at boot
>> should install their configuration files in /usr/lib/modules-load.d.
>>
>> The modprobe.d [2] - Configuration directory for modprobe
>> should install their configuration files in /lib/modprobe.d
>>
>> [1] https://www.freedesktop.org/software/systemd/man/modules-load.d.html
>> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html<https://www.man7.org/linux/man-pages/man5/modprobe.d.5.html>
>>
>> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io<mailto:jose.quaresma@foundries.io><mailto:jose.quaresma@foundries.io<mailto:jose.quaresma@foundries.io>>>
>
>
> Did you validate this using busybox only? Using sysv and busybox need
> to be validated as well.
>
> Please drop this patch series because it doesn work with busybox.
>
> Looks like busybox don't support other path than /etc:
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
>
> So I need to implement this in another way, maybe relocating the files from /etc only when systemd is enabled.
>
> Thanks for raising the issue.
>
> Jose
>

Hi,

Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
as well.

--
Ola x Nilsson

Hi Ola,

We use usermerge too but I think the weird issue here is we need to have this distribution specified only for systemd
excluding busybox and sysint as pointed out by Octavio.
The other solution is adding support on busybox and sysint if needed.

My idea is add a prefix variable with path "/etc" by default but conditioned by systemd DISTRO_FEATURES

Thanks for the bug hint.
--
Best regards,

José Quaresma


--
Best regards,

José Quaresma

[-- Attachment #2: Type: text/html, Size: 13169 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific
  2023-06-16 16:03             ` Peter Kjellerstedt
@ 2023-06-19 23:20               ` Jose Quaresma
  0 siblings, 0 replies; 10+ messages in thread
From: Jose Quaresma @ 2023-06-19 23:20 UTC (permalink / raw)
  To: Peter Kjellerstedt
  Cc: Ola x Nilsson, Otavio Salvador, Jose Quaresma,
	openembedded-core@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 4749 bytes --]

Peter Kjellerstedt <peter.kjellerstedt@axis.com> escreveu no dia sexta,
16/06/2023 à(s) 17:03:

> Did anything ever become of this? This is a change that at least we would
> appreciate.
>

Hi Pete,

V2 send with your suggestions:
https://lists.openembedded.org/g/openembedded-core/message/183123

Thanks for the remainder

Jose


>
>
> //Peter
>
>
>
> *From:* Jose Quaresma <quaresma.jose@gmail.com>
> *Sent:* den 17 februari 2023 17:53
> *To:* Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> *Cc:* Ola x Nilsson <Ola.x.Nilsson@axis.com>; Otavio Salvador <
> otavio.salvador@ossystems.com.br>; Jose Quaresma <
> jose.quaresma@foundries.io>; openembedded-core@lists.openembedded.org
> *Subject:* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload
> and probeconf distribution specific
>
>
>
> Hi Peter,
>
>
>
> Peter Kjellerstedt <peter.kjellerstedt@axis.com> escreveu no dia sexta,
> 17/02/2023 à(s) 10:52:
>
> Wouldn’t the easiest solution be to define two variables:
>
> modulesloaddir ??= "${sysconfdir}/modules-load.d "
> modprobedir ??= "${sysconfdir}/modprobe.d "
>
> then in init-manager-systemd.inc you could change them to:
>
> modulesloaddir ?= "${nonarch_libdir}/modules-load.d"
> modprobedir ?= "${nonarch_base_libdir}/modprobe.d"
>
> Using a single prefix variable doesn’t really work since they need
> different paths in the latter case.
>
>
> I was thinking of something similar to what you suggest but only on the
> class:
>
> modulesloaddir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
> '${nonarch_libdir}', '${sysconfdir}', d)}"
> modprobedir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
> '${nonarch_base_libdir}', '${sysconfdir}', d)}"
>
>
>
> Anyway your approach looks good to me too so i'll use yours, hope I can
> test it next week.
>
>
>
> Jose
>
>
>
>
>
> //Peter
>
>
>
> *From:* openembedded-core@lists.openembedded.org <
> openembedded-core@lists.openembedded.org> *On Behalf Of *Jose Quaresma
> *Sent:* den 16 februari 2023 12:08
> *To:* Ola x Nilsson <Ola.x.Nilsson@axis.com>
> *Cc:* Otavio Salvador <otavio.salvador@ossystems.com.br>; Jose Quaresma <
> jose.quaresma@foundries.io>; openembedded-core@lists.openembedded.org
> *Subject:* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload
> and probeconf distribution specific
>
>
>
>
>
> Ola x Nilsson <ola.x.nilsson@axis.com> escreveu no dia quinta, 16/02/2023
> à(s) 08:22:
>
>
> On Wed, Feb 15 2023, Jose Quaresma wrote:
>
> > Hi Octavio,
> >
> > Otavio Salvador <otavio.salvador@ossystems.com.br<mailto:
> otavio.salvador@ossystems.com.br>> escreveu no dia quarta, 15/02/2023
> à(s) 13:25:
> > Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> > <quaresma.jose@gmail.com<mailto:quaresma.jose@gmail.com>> escreveu:
> >>
> >> The modules-load.d [1] - Configure kernel modules to load at boot
> >> should install their configuration files in /usr/lib/modules-load.d.
> >>
> >> The modprobe.d [2] - Configuration directory for modprobe
> >> should install their configuration files in /lib/modprobe.d
> >>
> >> [1]
> https://www.freedesktop.org/software/systemd/man/modules-load.d.html
> >> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
> <https://www.man7.org/linux/man-pages/man5/modprobe.d.5.html>
> >>
> >> Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io<mailto:
> jose.quaresma@foundries.io>>
> >
> >
> > Did you validate this using busybox only? Using sysv and busybox need
> > to be validated as well.
> >
> > Please drop this patch series because it doesn work with busybox.
> >
> > Looks like busybox don't support other path than /etc:
> >
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
> >
> > So I need to implement this in another way, maybe relocating the files
> from /etc only when systemd is enabled.
> >
> > Thanks for raising the issue.
> >
> > Jose
> >
>
> Hi,
>
> Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
> as well.
>
> --
> Ola x Nilsson
>
>
> Hi Ola,
>
> We use usermerge too but I think the weird issue here is we need to have
> this distribution specified only for systemd
>
> excluding busybox and sysint as pointed out by Octavio.
>
> The other solution is adding support on busybox and sysint if needed.
>
> My idea is add a prefix variable with path "/etc" by default but
> conditioned by systemd DISTRO_FEATURES
>
> Thanks for the bug hint.
>
> --
>
> Best regards,
>
>
> José Quaresma
>
>
>
>
> --
>
> Best regards,
>
>
> José Quaresma
>


-- 
Best regards,

José Quaresma

[-- Attachment #2: Type: text/html, Size: 12715 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-19 23:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-15 13:00 [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific Jose Quaresma
2023-02-15 13:00 ` [OE-core][PATCH 2/2] kernel: autoload and probeconf are handled by kernel-module-split Jose Quaresma
2023-02-15 13:25 ` [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific Otavio Salvador
2023-02-15 15:10   ` Jose Quaresma
2023-02-16  8:21     ` Ola x Nilsson
2023-02-16 11:08       ` Jose Quaresma
2023-02-17 10:52         ` Peter Kjellerstedt
2023-02-17 16:53           ` Jose Quaresma
2023-06-16 16:03             ` Peter Kjellerstedt
2023-06-19 23:20               ` Jose Quaresma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.