Skip to content

RFC Introduce services as a (long-term) replacement for _INSTALL_INIT_(SYSV|SYSTEMD) (branch yem/services)

Yann E. MORIN buildroot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7package infra: print the name of the package being parsedMakefile package/pkg-generic.mk package/pkg-utils.mk+12 -00 replies
2/7Makefile: always scan packages' .mk files, even with no .configMakefile+2 -60 replies
3/7Makefile: introduce a intermediate rule before the configuratorsMakefile+20 -180 replies
4/7packages: introduce a generated kconfig snippet in the menuconfigConfig.in Makefile package/Config.in+11 -10 replies
5/7packages: generate services sub-menuMakefile package/pkg-generic.mk+17 -10 replies
6/7pkg-generic: act on enabled servicespackage/pkg-generic.mk+21 -10 replies
7/7package/busybox: add afake services as examplepackage/busybox/S98bar package/busybox/S99foo package/busybox/bar.defaults +1 more+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Buildroot] [PATCH 0/7] [RFC] Introduce services as a (long-term) replacement for _INSTALL_INIT_(SYSV|SYSTEMD) (branch yem/services)

Hello All!

Following up on Gustavo's proposal [0] on a clean up on our init scripts (and eventually our systemd unit files), here is an *RFC* series that tries to implement Gustavo's idea.

The series is split in four parts:

- patches 1-3 are preparatory work, and not much interesting in the

    Grand Scheme of Life;

- patches 4-5 introduce a generated kconfig snippet, that contains the list of services for each enabled packages, that the user can enable/disable at will, directly from the menuconfig (for now, the default is that all services are disabled, that can be changed later);

- patch 6 is the guts that installs the service files:
- installs the service's startup script,
- enables/disables the service,
- installs the service's configuration, if it exists;

- patch 7 is just an example (with empty scripts) of how to declare services in a package.

To be noted:
- the code will need some revamp; this is just meant to be an RFC!
- only sysv init is handled for now
- this is by far incomplete even for the sysv case
- the /etc/config/ part has been left out for now; it would anyway most probably provided via a rootfs-overlay
- the manual part is missing
- there are typoes all over the place :-/

As usual: on your mark, get set, comment! ;-)

[0] http://lists.busybox.net/pipermail/buildroot/2015-March/121086.html

Regards,
Yann E. MORIN.

The following changes since commit a4788aa6157d1496cdd32cb9802710d4e97bc550:

btrfs-progs: bump to version 3.19 (2015-03-11 22:38:36 +0100)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/services

for you to fetch changes up to f2c8684c9a6cfa5cfe8d776ac8ce4693667c329f:

[NOT TO BE APPLIED] package/busybox: add afake services as example (2015-03-11 23:08:51 +0100)

----------------------------------------------------------------
Yann E. MORIN (7):
package infra: print the name of the package being parsed
Makefile: always scan packages' .mk files, even with no .config
Makefile: introduce a intermediate rule before the configurators
packages: introduce a generated kconfig snippet in the menuconfig
packages: generate services sub-menu
[INCOMPLETE] pkg-generic: act on enabled services
[NOT TO BE APPLIED] package/busybox: add afake services as example

 Config.in                    |  4 +++
 Makefile                     | 67 ++++++++++++++++++++++++++++----------------
 package/Config.in            |  2 ++
 package/busybox/S98bar       |  0
 package/busybox/S99foo       |  0
 package/busybox/bar.defaults |  1 +
 package/busybox/busybox.mk   |  2 ++
 package/pkg-generic.mk       | 28 ++++++++++++++++++
 package/pkg-utils.mk         |  3 ++
 9 files changed, 83 insertions(+), 24 deletions(-)
 create mode 100644 package/busybox/S98bar
 create mode 100644 package/busybox/S99foo
 create mode 100644 package/busybox/bar.defaults
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'