[v2,03/13] system/Config.in: add new init - openrc
diff mbox series

Message ID 20190512195550.24457-3-michal.lyszczek@bofc.pl
State Accepted
Headers show
Series
  • [v2,01/13] package/openrc: new package (v0.41.2)
Related show

Commit Message

Michał Łyszczek May 12, 2019, 7:55 p.m. UTC
This is very basic settings for openrc init.

* system/Config.in
  Allows to select openrc as init system (which auto selects
  openrc-skeleton and openrc package).

* package/ifupdown-scripts/Config.in
  openrc has its own service to bring up/down interfaces, so
  ifupdown-scripts should not be enabled when openrc is enabled to
  prevent service clash.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>

---
Changes v1 -> v2
  None
---
 package/ifupdown-scripts/Config.in | 2 +-
 package/openrc/Config.in           | 1 +
 system/Config.in                   | 6 ++++++
 3 files changed, 8 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni May 18, 2019, 9:18 p.m. UTC | #1
Hello,

On Sun, 12 May 2019 21:55:40 +0200
Michał Łyszczek <michal.lyszczek@bofc.pl> wrote:

> This is very basic settings for openrc init.
> 
> * system/Config.in
>   Allows to select openrc as init system (which auto selects
>   openrc-skeleton and openrc package).
> 
> * package/ifupdown-scripts/Config.in
>   openrc has its own service to bring up/down interfaces, so
>   ifupdown-scripts should not be enabled when openrc is enabled to
>   prevent service clash.
> 
> Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>

I've applied, with some changes, see below.

> diff --git a/package/openrc/Config.in b/package/openrc/Config.in
> index 4baeed60ae..f79279533f 100644
> --- a/package/openrc/Config.in
> +++ b/package/openrc/Config.in
> @@ -1,6 +1,7 @@
>  config BR2_PACKAGE_OPENRC
>  	bool "OpenRC"
>  	select BR2_PACKAGE_NCURSES
> +	depends on BR2_INIT_OPENRC

"depends on" must be before selects, otherwise "make check-package"
complains.
> +config BR2_INIT_OPENRC
> +	bool "OpenRC"
> +	depends on BR2_USE_MMU

I have replicated this BR2_USE_MMU dependency on the openrc package.
Also, a !BR2_STATIC_LIBS dependency was missing, which I have added to
both BR2_PACKAGE_OPENRC and BR2_INIT_OPENRC.

And due to this !BR2_STATIC_LIBS dependency, I've added a Config.in
comment as well.

Thanks,

Thomas

Patch
diff mbox series

diff --git a/package/ifupdown-scripts/Config.in b/package/ifupdown-scripts/Config.in
index 2f4b0d5467..4b984bc30c 100644
--- a/package/ifupdown-scripts/Config.in
+++ b/package/ifupdown-scripts/Config.in
@@ -1,7 +1,7 @@ 
 config BR2_PACKAGE_IFUPDOWN_SCRIPTS
 	bool "ifupdown scripts"
 	default y if BR2_ROOTFS_SKELETON_DEFAULT
-	depends on !BR2_PACKAGE_SYSTEMD_NETWORKD
+	depends on !BR2_PACKAGE_SYSTEMD_NETWORKD && !BR2_PACKAGE_OPENRC
 	help
 	  Set of scripts used by ifupdown (either the standalone one,
 	  or the busybox one) to bring network up, or tear it down.
diff --git a/package/openrc/Config.in b/package/openrc/Config.in
index 4baeed60ae..f79279533f 100644
--- a/package/openrc/Config.in
+++ b/package/openrc/Config.in
@@ -1,6 +1,7 @@ 
 config BR2_PACKAGE_OPENRC
 	bool "OpenRC"
 	select BR2_PACKAGE_NCURSES
+	depends on BR2_INIT_OPENRC
 	help
 	  Init that works on top of pid 1 (for example openrc-init). By default
 	  it does quite a lot on startup (like setting hwclock, mounting
diff --git a/system/Config.in b/system/Config.in
index 498b56e222..808fc070f3 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -11,6 +11,7 @@  config BR2_ROOTFS_SKELETON_DEFAULT
 	bool "default target skeleton"
 	select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_INIT_SYSV
 	select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_INIT_BUSYBOX
+	select BR2_PACKAGE_SKELETON_INIT_OPENRC if BR2_INIT_OPENRC
 	select BR2_PACKAGE_SKELETON_INIT_SYSTEMD if BR2_INIT_SYSTEMD
 	select BR2_PACKAGE_SKELETON_INIT_NONE if BR2_INIT_NONE
 	help
@@ -98,6 +99,11 @@  config BR2_INIT_SYSV
 	select BR2_PACKAGE_INITSCRIPTS
 	select BR2_PACKAGE_SYSVINIT
 
+config BR2_INIT_OPENRC
+	bool "OpenRC"
+	depends on BR2_USE_MMU
+	select BR2_PACKAGE_OPENRC
+
 # In Buildroot, we decided not to support a split-usr when systemd is
 # used as an init system. This is a design decision, not a systemd
 # issue. Thus the select is with BR2_INIT_SYSTEMD (below) rather than