Skip to contentSkip to conversation

package/openrc: needs kmod

PATCH New Yann E. MORIN 3 participants 6 messages Feb 28, 2020 – Mar 14, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/openrc: needs kmod

openrc provides scritps that have been written for the big-gun kmod, and so use options unknown to the biusybox' provided applets:

- Busybox modprobe does not have a "--first-time" option,
- the "--verbose" option is just "-v",
- the "--use-blacklist" option is just "-b". Also blacklist support is not selected in our default busybox configuration.

One of two options, is to "fix" or "adapt" openrc's scripts to busybox, which means for the openrc package to go peek into files from the busybox package, which is not nice, and can't work because that is not available by the time we scan our Makefiles.

The other option, which this patch implements, is to just add a dependency onto kmod and its tools.

---
 package/openrc/Config.in | 3 +++
 1 file changed, 3 insertions(+)
package/openrc/Config.in +3 -0
index 796858f404..4691be63a2 100644
@@ -3,6 +3,9 @@ config BR2_PACKAGE_OPENRC
 	depends on BR2_USE_MMU # fork()
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_INIT_OPENRC
+	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod tools
+	select BR2_PACKAGE_KMOD # runtime
+	select BR2_PACKAGE_KMOD_TOOLS # runtime
 	select BR2_PACKAGE_NCURSES
 	help
 	  Init that works on top of pid 1 (for example
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/openrc: needs kmod

Quoted 40 lines · Yann E. MORIN

openrc provides scritps that have been written for the big-gun kmod, and so use options unknown to the biusybox' provided applets:

- Busybox modprobe does not have a "--first-time" option,
- the "--verbose" option is just "-v",
- the "--use-blacklist" option is just "-b". Also blacklist support is not selected in our default busybox configuration.

One of two options, is to "fix" or "adapt" openrc's scripts to busybox, which means for the openrc package to go peek into files from the busybox package, which is not nice, and can't work because that is not available by the time we scan our Makefiles.

The other option, which this patch implements, is to just add a dependency onto kmod and its tools.

---
 package/openrc/Config.in | 3 +++
 1 file changed, 3 insertions(+)
package/openrc/Config.in +3 -1
index 796858f404..4691be63a2 100644
@@ -3,6 +3,9 @@ config BR2_PACKAGE_OPENRC
        depends on BR2_USE_MMU # fork()
        depends on !BR2_STATIC_LIBS
        depends on BR2_INIT_OPENRC
+       select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod tools
+       select BR2_PACKAGE_KMOD # runtime
+       select BR2_PACKAGE_KMOD_TOOLS # runtime
        select BR2_PACKAGE_NCURSES
        help
          Init that works on top of pid 1 (for example
--
Quoted 2 lines

2.20.1

What about doing the opposite?

1. Always patch openrc to support busybox.' modprobe.
2. In busybox, select modprobe+blacklist if openrc is selected but kmod tools are not selected.

This would be cleaner and seems to be reasonable, since busybox already sets several configurations based on the selection of other packages.

Signature · 1 line
Carlos Santos <[email protected]>
#2 lore raw

PATCH 1/1 package/openrc: needs kmod

On 2020-02-28 18:47 -0300, Carlos Santos spake thusly:

Quoted 46 lines · Yann E. MORIN
Quoted 40 lines

openrc provides scritps that have been written for the big-gun kmod, and so use options unknown to the biusybox' provided applets:

- Busybox modprobe does not have a "--first-time" option,
- the "--verbose" option is just "-v",
- the "--use-blacklist" option is just "-b". Also blacklist support is not selected in our default busybox configuration.

One of two options, is to "fix" or "adapt" openrc's scripts to busybox, which means for the openrc package to go peek into files from the busybox package, which is not nice, and can't work because that is not available by the time we scan our Makefiles.

The other option, which this patch implements, is to just add a dependency onto kmod and its tools.

---
 package/openrc/Config.in | 3 +++
 1 file changed, 3 insertions(+)
package/openrc/Config.in +3 -1
index 796858f404..4691be63a2 100644
@@ -3,6 +3,9 @@ config BR2_PACKAGE_OPENRC
        depends on BR2_USE_MMU # fork()
        depends on !BR2_STATIC_LIBS
        depends on BR2_INIT_OPENRC
+       select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod tools
+       select BR2_PACKAGE_KMOD # runtime
+       select BR2_PACKAGE_KMOD_TOOLS # runtime
        select BR2_PACKAGE_NCURSES
        help
          Init that works on top of pid 1 (for example
--
Quoted 2 lines

2.20.1

What about doing the opposite?

Quoted 1 line

1. Always patch openrc to support busybox.' modprobe.

That is akin to a feature patch, so should have to be done upstream first. Otherwise, we'd have to endlessly maintain that patch...

Quoted 2 lines

2. In busybox, select modprobe+blacklist if openrc is selected but kmod tools are not selected.

Or just tweak our default busybox config to enable modprobe + blacklist and be done with that. And we don't care about kmod being enabled or not, because kmod will always win against busybox in any case.

Quoted 3 lines

This would be cleaner and seems to be reasonable, since busybox already sets several configurations based on the selection of other packages.

The only one that is dependent on another package is PAM support, and that one is special. All other config tweaks only depend on architecture (e.g. MMU support), system settings (e.g. mdev for /dev handling), or on busybox' own config in Buildroot (e.g. support for individual binaries).

Furthermore, for the imminent release, this is currently the simplest solution we have. We can refine it afterwards.

Regards,
Yann E. MORIN.

Quoted 2 lines
Signature · 1 line
Carlos Santos <[email protected]>
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 package/openrc: needs kmod

Quoted 69 lines · Yann E. MORIN

On 2020-02-28 18:47 -0300, Carlos Santos spake thusly:

Quoted 46 lines · Yann E. MORIN
Quoted 40 lines

openrc provides scritps that have been written for the big-gun kmod, and so use options unknown to the biusybox' provided applets:

- Busybox modprobe does not have a "--first-time" option,
- the "--verbose" option is just "-v",
- the "--use-blacklist" option is just "-b". Also blacklist support is not selected in our default busybox configuration.

One of two options, is to "fix" or "adapt" openrc's scripts to busybox, which means for the openrc package to go peek into files from the busybox package, which is not nice, and can't work because that is not available by the time we scan our Makefiles.

The other option, which this patch implements, is to just add a dependency onto kmod and its tools.

---
 package/openrc/Config.in | 3 +++
 1 file changed, 3 insertions(+)
package/openrc/Config.in +3 -1
index 796858f404..4691be63a2 100644
@@ -3,6 +3,9 @@ config BR2_PACKAGE_OPENRC
        depends on BR2_USE_MMU # fork()
        depends on !BR2_STATIC_LIBS
        depends on BR2_INIT_OPENRC
+       select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod tools
+       select BR2_PACKAGE_KMOD # runtime
+       select BR2_PACKAGE_KMOD_TOOLS # runtime
        select BR2_PACKAGE_NCURSES
        help
          Init that works on top of pid 1 (for example
--
Quoted 2 lines

2.20.1

What about doing the opposite?

Quoted 1 line

1. Always patch openrc to support busybox.' modprobe.

That is akin to a feature patch, so should have to be done upstream first. Otherwise, we'd have to endlessly maintain that patch...

Quoted 2 lines

2. In busybox, select modprobe+blacklist if openrc is selected but kmod tools are not selected.

Or just tweak our default busybox config to enable modprobe + blacklist and be done with that. And we don't care about kmod being enabled or not, because kmod will always win against busybox in any case.

Quoted 3 lines

This would be cleaner and seems to be reasonable, since busybox already sets several configurations based on the selection of other packages.

The only one that is dependent on another package is PAM support, and that one is special. All other config tweaks only depend on architecture (e.g. MMU support), system settings (e.g. mdev for /dev handling), or on busybox' own config in Buildroot (e.g. support for individual binaries).

Quoted 5 lines

Furthermore, for the imminent release, this is currently the simplest solution we have. We can refine it afterwards.

Regards,
Yann E. MORIN.

OK, I submitted a pull request upstream:

    https://github.com/OpenRC/openrc/pull/354

Meanwhile,

#4 lore raw

PATCH 1/1 package/openrc: needs kmod

In reply to Yann E. MORIN
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

openrc provides scritps that have been written for the big-gun kmod, and so use options unknown to the biusybox' provided applets:

- Busybox modprobe does not have a "--first-time" option,
- the "--verbose" option is just "-v",
- the "--use-blacklist" option is just "-b". Also blacklist support is not selected in our default busybox configuration.

One of two options, is to "fix" or "adapt" openrc's scripts to busybox, which means for the openrc package to go peek into files from the busybox package, which is not nice, and can't work because that is not available by the time we scan our Makefiles.

Quoted 7 lines

The other option, which this patch implements, is to just add a dependency onto kmod and its tools.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/1 package/openrc: needs kmod

In reply to Yann E. MORIN
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

openrc provides scritps that have been written for the big-gun kmod, and so use options unknown to the biusybox' provided applets:

- Busybox modprobe does not have a "--first-time" option,
- the "--verbose" option is just "-v",
- the "--use-blacklist" option is just "-b". Also blacklist support is not selected in our default busybox configuration.

One of two options, is to "fix" or "adapt" openrc's scripts to busybox, which means for the openrc package to go peek into files from the busybox package, which is not nice, and can't work because that is not available by the time we scan our Makefiles.

Quoted 7 lines

The other option, which this patch implements, is to just add a dependency onto kmod and its tools.

Committed to 2019.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard