All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
@ 2012-03-23  6:43 Martin Jansa
  2012-03-23  9:16 ` Richard Purdie
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Jansa @ 2012-03-23  6:43 UTC (permalink / raw)
  To: openembedded-core

* /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/classes/kernel.bbclass |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 169df33..975ae13 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -122,6 +122,7 @@ kernel_do_install() {
 	install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
 	[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
 	install -d ${D}/etc/modutils
+	install -d ${D}/etc/modules-load.d
 	install -d ${D}/etc/modprobe.d
 
 	#
@@ -411,6 +412,11 @@ python populate_packages_prepend () {
 			for m in autoload.split():
 				f.write('%s\n' % m)
 			f.close()
+			name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
+			f = open(name, 'w')
+			for m in autoload.split():
+				f.write('%s\n' % m)
+			f.close()
 			postinst = d.getVar('pkg_postinst_%s' % pkg, True)
 			if not postinst:
 				bb.fatal("pkg_postinst_%s not defined" % pkg)
@@ -426,7 +432,7 @@ python populate_packages_prepend () {
 			f.close()
 
 		files = d.getVar('FILES_%s' % pkg, True)
-		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename)
+		files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename, basename)
 		d.setVar('FILES_%s' % pkg, files)
 
 		if vals.has_key("description"):
@@ -456,7 +462,7 @@ python populate_packages_prepend () {
 	# avoid warnings. removedirs only raises an OSError if an empty
 	# directory cannot be removed.
 	dvar = d.getVar('PKGD', True)
-	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar)]:
+	for dir in ["%s/etc/modutils" % (dvar), "%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
 		if len(os.listdir(dir)) == 0:
 			os.rmdir(dir)
 
-- 
1.7.8.5




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

* Re: [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23  6:43 [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too Martin Jansa
@ 2012-03-23  9:16 ` Richard Purdie
  2012-03-23  9:36   ` Martin Jansa
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2012-03-23  9:16 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-03-23 at 07:43 +0100, Martin Jansa wrote:
> * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/classes/kernel.bbclass |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)

Since these look identical couldn't we symlink them? I'm not a big fan
of writing duplicate data to a package :/.

Cheers,

Richard




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

* Re: [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23  9:16 ` Richard Purdie
@ 2012-03-23  9:36   ` Martin Jansa
  2012-03-23 11:39     ` Richard Purdie
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Jansa @ 2012-03-23  9:36 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

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

On Fri, Mar 23, 2012 at 09:16:33AM +0000, Richard Purdie wrote:
> On Fri, 2012-03-23 at 07:43 +0100, Martin Jansa wrote:
> > * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> > 
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  meta/classes/kernel.bbclass |   10 ++++++++--
> >  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> Since these look identical couldn't we symlink them? I'm not a big fan
> of writing duplicate data to a package :/.

OK I'll change it in v2

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23  9:36   ` Martin Jansa
@ 2012-03-23 11:39     ` Richard Purdie
  2012-03-23 11:49       ` Martin Jansa
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2012-03-23 11:39 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-03-23 at 10:36 +0100, Martin Jansa wrote:
> On Fri, Mar 23, 2012 at 09:16:33AM +0000, Richard Purdie wrote:
> > On Fri, 2012-03-23 at 07:43 +0100, Martin Jansa wrote:
> > > * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> > > 
> > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > > ---
> > >  meta/classes/kernel.bbclass |   10 ++++++++--
> > >  1 files changed, 8 insertions(+), 2 deletions(-)
> > 
> > Since these look identical couldn't we symlink them? I'm not a big fan
> > of writing duplicate data to a package :/.
> 
> OK I'll change it in v2

Note that I'm wondering if we can just symlink the directory entirely
rather than the files themselves. There may be a reason that is a bad
idea but I don't know...

Cheers,

Richard




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

* Re: [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 11:39     ` Richard Purdie
@ 2012-03-23 11:49       ` Martin Jansa
  2012-03-23 12:22         ` Richard Purdie
  0 siblings, 1 reply; 9+ messages in thread
From: Martin Jansa @ 2012-03-23 11:49 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

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

On Fri, Mar 23, 2012 at 11:39:53AM +0000, Richard Purdie wrote:
> On Fri, 2012-03-23 at 10:36 +0100, Martin Jansa wrote:
> > On Fri, Mar 23, 2012 at 09:16:33AM +0000, Richard Purdie wrote:
> > > On Fri, 2012-03-23 at 07:43 +0100, Martin Jansa wrote:
> > > > * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> > > > 
> > > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > > > ---
> > > >  meta/classes/kernel.bbclass |   10 ++++++++--
> > > >  1 files changed, 8 insertions(+), 2 deletions(-)
> > > 
> > > Since these look identical couldn't we symlink them? I'm not a big fan
> > > of writing duplicate data to a package :/.
> > 
> > OK I'll change it in v2
> 
> Note that I'm wondering if we can just symlink the directory entirely
> rather than the files themselves. There may be a reason that is a bad
> idea but I don't know...

There are different filenames (notice .conf in the end) so I have patch
doing symlinks for files not directories.

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 11:49       ` Martin Jansa
@ 2012-03-23 12:22         ` Richard Purdie
  2012-03-23 12:27           ` Koen Kooi
  2012-03-23 12:30           ` Martin Jansa
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Purdie @ 2012-03-23 12:22 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-03-23 at 12:49 +0100, Martin Jansa wrote:
> On Fri, Mar 23, 2012 at 11:39:53AM +0000, Richard Purdie wrote:
> > On Fri, 2012-03-23 at 10:36 +0100, Martin Jansa wrote:
> > > On Fri, Mar 23, 2012 at 09:16:33AM +0000, Richard Purdie wrote:
> > > > On Fri, 2012-03-23 at 07:43 +0100, Martin Jansa wrote:
> > > > > * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> > > > > 
> > > > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > > > > ---
> > > > >  meta/classes/kernel.bbclass |   10 ++++++++--
> > > > >  1 files changed, 8 insertions(+), 2 deletions(-)
> > > > 
> > > > Since these look identical couldn't we symlink them? I'm not a big fan
> > > > of writing duplicate data to a package :/.
> > > 
> > > OK I'll change it in v2
> > 
> > Note that I'm wondering if we can just symlink the directory entirely
> > rather than the files themselves. There may be a reason that is a bad
> > idea but I don't know...
> 
> There are different filenames (notice .conf in the end) so I have patch
> doing symlinks for files not directories.

I'd seen the modprobe.d conf files and thought here was some similarity.
I have to admit I think systemd is nuts for requiring a copy of these
files when it could have used the existing layout. It looks like change
for the sake of change :(.

I'm nearly tempted to suggest we should just patch systemd to use the
other filenames...

Cheers,

Richard




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

* Re: [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 12:22         ` Richard Purdie
@ 2012-03-23 12:27           ` Koen Kooi
  2012-03-23 12:30           ` Martin Jansa
  1 sibling, 0 replies; 9+ messages in thread
From: Koen Kooi @ 2012-03-23 12:27 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 23 mrt. 2012, om 13:22 heeft Richard Purdie het volgende geschreven:

> On Fri, 2012-03-23 at 12:49 +0100, Martin Jansa wrote:
>> On Fri, Mar 23, 2012 at 11:39:53AM +0000, Richard Purdie wrote:
>>> On Fri, 2012-03-23 at 10:36 +0100, Martin Jansa wrote:
>>>> On Fri, Mar 23, 2012 at 09:16:33AM +0000, Richard Purdie wrote:
>>>>> On Fri, 2012-03-23 at 07:43 +0100, Martin Jansa wrote:
>>>>>> * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
>>>>>> 
>>>>>> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>>>>>> ---
>>>>>> meta/classes/kernel.bbclass |   10 ++++++++--
>>>>>> 1 files changed, 8 insertions(+), 2 deletions(-)
>>>>> 
>>>>> Since these look identical couldn't we symlink them? I'm not a big fan
>>>>> of writing duplicate data to a package :/.
>>>> 
>>>> OK I'll change it in v2
>>> 
>>> Note that I'm wondering if we can just symlink the directory entirely
>>> rather than the files themselves. There may be a reason that is a bad
>>> idea but I don't know...
>> 
>> There are different filenames (notice .conf in the end) so I have patch
>> doing symlinks for files not directories.
> 
> I'd seen the modprobe.d conf files and thought here was some similarity.
> I have to admit I think systemd is nuts for requiring a copy of these
> files when it could have used the existing layout. It looks like change
> for the sake of change :(.
> 
> I'm nearly tempted to suggest we should just patch systemd to use the
> other filenames...

The point the systemd developers want to make is to use the same path across all distros out there. Patching it would defeat the purpose. Unless we want to fork and maintain our own init system and scripts, like we do with sysvinit currently.

regards,

Koen


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

* Re: [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 12:22         ` Richard Purdie
  2012-03-23 12:27           ` Koen Kooi
@ 2012-03-23 12:30           ` Martin Jansa
  2012-03-23 12:42             ` Richard Purdie
  1 sibling, 1 reply; 9+ messages in thread
From: Martin Jansa @ 2012-03-23 12:30 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

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

On Fri, Mar 23, 2012 at 12:22:03PM +0000, Richard Purdie wrote:
> On Fri, 2012-03-23 at 12:49 +0100, Martin Jansa wrote:
> > On Fri, Mar 23, 2012 at 11:39:53AM +0000, Richard Purdie wrote:
> > > On Fri, 2012-03-23 at 10:36 +0100, Martin Jansa wrote:
> > > > On Fri, Mar 23, 2012 at 09:16:33AM +0000, Richard Purdie wrote:
> > > > > On Fri, 2012-03-23 at 07:43 +0100, Martin Jansa wrote:
> > > > > > * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> > > > > > 
> > > > > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > > > > > ---
> > > > > >  meta/classes/kernel.bbclass |   10 ++++++++--
> > > > > >  1 files changed, 8 insertions(+), 2 deletions(-)
> > > > > 
> > > > > Since these look identical couldn't we symlink them? I'm not a big fan
> > > > > of writing duplicate data to a package :/.
> > > > 
> > > > OK I'll change it in v2
> > > 
> > > Note that I'm wondering if we can just symlink the directory entirely
> > > rather than the files themselves. There may be a reason that is a bad
> > > idea but I don't know...
> > 
> > There are different filenames (notice .conf in the end) so I have patch
> > doing symlinks for files not directories.
> 
> I'd seen the modprobe.d conf files and thought here was some similarity.

but that's for module options e.g.

SHR root@gjama ~ $ cat /etc/modprobe.d/g_ether.conf
options g_ether dev_addr=00:1F:11:01:2C:9F host_addr=00:1F:11:01:2C:A0

not for module_autoload

> I have to admit I think systemd is nuts for requiring a copy of these
> files when it could have used the existing layout. It looks like change
> for the sake of change :(.

then why not patch 
/usr/sbin/update-modules
to read /etc/modules-load.d/*.conf instead of /etc/modutils/* as this is
just simple script imported from debian to produce /etc/modules file
which is IMHO all what we need for old init script
(modutils-initscripts) to read.

> I'm nearly tempted to suggest we should just patch systemd to use the
> other filenames...
> 
> Cheers,
> 
> Richard
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too
  2012-03-23 12:30           ` Martin Jansa
@ 2012-03-23 12:42             ` Richard Purdie
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2012-03-23 12:42 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-03-23 at 13:30 +0100, Martin Jansa wrote:
> On Fri, Mar 23, 2012 at 12:22:03PM +0000, Richard Purdie wrote:
> > On Fri, 2012-03-23 at 12:49 +0100, Martin Jansa wrote:
> > > On Fri, Mar 23, 2012 at 11:39:53AM +0000, Richard Purdie wrote:
> > > > On Fri, 2012-03-23 at 10:36 +0100, Martin Jansa wrote:
> > > > > On Fri, Mar 23, 2012 at 09:16:33AM +0000, Richard Purdie wrote:
> > > > > > On Fri, 2012-03-23 at 07:43 +0100, Martin Jansa wrote:
> > > > > > > * /etc/modules-load.d/foo.conf is used by systemd like /etc/modutils/foo was with sysvinit
> > > > > > > 
> > > > > > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > > > > > > ---
> > > > > > >  meta/classes/kernel.bbclass |   10 ++++++++--
> > > > > > >  1 files changed, 8 insertions(+), 2 deletions(-)
> > > > > > 
> > > > > > Since these look identical couldn't we symlink them? I'm not a big fan
> > > > > > of writing duplicate data to a package :/.
> > > > > 
> > > > > OK I'll change it in v2
> > > > 
> > > > Note that I'm wondering if we can just symlink the directory entirely
> > > > rather than the files themselves. There may be a reason that is a bad
> > > > idea but I don't know...
> > > 
> > > There are different filenames (notice .conf in the end) so I have patch
> > > doing symlinks for files not directories.
> > 
> > I'd seen the modprobe.d conf files and thought here was some similarity.
> 
> but that's for module options e.g.
> 
> SHR root@gjama ~ $ cat /etc/modprobe.d/g_ether.conf
> options g_ether dev_addr=00:1F:11:01:2C:9F host_addr=00:1F:11:01:2C:A0
> 
> not for module_autoload

Right, I understood that when I looked at the code in detail.

> > I have to admit I think systemd is nuts for requiring a copy of these
> > files when it could have used the existing layout. It looks like change
> > for the sake of change :(.
> 
> then why not patch 
> /usr/sbin/update-modules
> to read /etc/modules-load.d/*.conf instead of /etc/modutils/* as this is
> just simple script imported from debian to produce /etc/modules file
> which is IMHO all what we need for old init script
> (modutils-initscripts) to read.

I'd be open to that assuming we can have some kind of reasonable story
on compatibility.

Cheers,

Richard




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

end of thread, other threads:[~2012-03-23 12:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23  6:43 [PATCH] kernel.bbclass: populate /etc/modules-load.d/ with module_autoload entries too Martin Jansa
2012-03-23  9:16 ` Richard Purdie
2012-03-23  9:36   ` Martin Jansa
2012-03-23 11:39     ` Richard Purdie
2012-03-23 11:49       ` Martin Jansa
2012-03-23 12:22         ` Richard Purdie
2012-03-23 12:27           ` Koen Kooi
2012-03-23 12:30           ` Martin Jansa
2012-03-23 12:42             ` Richard Purdie

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.