From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 00/20] system: properly handle systemd as init system
Date: Tue, 18 Jul 2017 19:25:41 +0200 [thread overview]
Message-ID: <cover.1500398733.git.yann.morin.1998@free.fr> (raw)
Hello All!
This series is a proposal to fix our handling of systemd as an init
system.
Our default skeleton is not well suited for systemd:
- we have /var/log a symlink to /tmp/log, but the way systemd starts
hides the journals:
- start systemd-journald, stores journals in /tmp/log/ (because of
the redirection above)
- mounts a tmpfs over /tmp, thus hidding the journals.
- on a read-only rootfs, systemd expects /var to be read-write, which
we do not provide.
All of this sounds trivial, but fixing it is definitely not.
The overall idea is that we need different skeletons, one for each type
of init systems: sysv, systemd, others (aka custom).
The skeleton package becomes a virtual package, that is provided by one
of four implementations:
- skeleton-sysv or skeleton-systemd, as their names imply, for either
SysV- or systemd-based systems, and which depend on skeleton-common;
- skeleton-common, that provides base files and directories comon to
all skeletons (except custom, below); skeleton-common is also a
provider for the skeleton virtual package, for use with no-init (aka
custom init) systems;
- skeleton-custom, for user-provided custom skeleton, and of which we
expect it is fully prepared; skeleton-custom does not depend on
skeleton-common.
A series of runtime tests have also been added, running on the QEMU
vexpress:
init system rootfs DHCP?
-------------------------------------
busybox ext4 no
busybox ext4 eth0
busybox squashfs no
busybox squashfs eth0
* systemd-ifupdown ext4 eth0
systemd-ifupdown squashfs eth0
** systemd-networkd ext4 eth0
systemd-networkd squashfs eth0
*** systemd-full ext4 eth0
systemd-full squashfs eth0
+ no-init squashfs no
* systemd-networkd: only what gets selected automatically when
systemd is used as init system, with all other options unset;
** systemd-ifupdown: like systemd-networkd, but with networkd
disabled, thus using ifupdown instead;
*** systemd-full: all systemd options enabled, implies networkd;
+ a shell is launched as init
Those new tests are not exhaustive, especially the systemd one; instead,
they just test basic features: what init is being used, and did we get
an IP adress for eth0? More tests can be added later on.
Changes v2 -> v3:
- too much to note, mostly rewriten from scratch
Changes v1 -> v2:
- enhance the commit logs
Regards,
Yann E. MORIN.
The following changes since commit bc801efacb298e2297024f83e960eaf8a45dd39f
python-coherence: bump to the latest upstream commit (2017-07-17 11:28:58 +0200)
are available in the git repository at:
git://git.buildroot.org/~ymorin/git/buildroot.git
for you to fetch changes up to 95f6965c48dbf2f754818e2bec1f2d3891015475
support/testing: add runtime testing for init systems (2017-07-18 18:59:05 +0200)
----------------------------------------------------------------
Yann E. MORIN (20):
support/tests: allow properly indented config fragment
core/pkg-generic: add variable to skip skeleton dependency
package/skeleton: add macro to rsync skeleton directory
package/skeleton: make SKELETON_LIB_SYMLINK a macro
system: provide package-wide system variables and macros
system: move setting getty to the corresponding init systems
system: move remounting / to the corresponding init systems
system: with no init system, only allow custom skeleton
package/skeleton: drop dependency on host-mkpasswd
package/skeleton: select it rather than default to y
package/skeleton: split out into skeleton-custom
package/skeleton: split out into skeleton-common
package/skeleton: make it a virtual package
package/skeleton-common: simplify staging install
package/skeleton: introduce sysv- and systemd-specific skeletons
system: separate sysv and systemd parts of the skeleton
sytem: no-init systems may use our default, common skeleton
fs: add pre- and post-command hooks
system: make systemd work on a read-only rootfs
support/testing: add runtime testing for init systems
Makefile | 1 +
fs/common.mk | 4 +
package/Config.in | 4 +
package/busybox/busybox.mk | 15 +-
package/pkg-generic.mk | 11 +-
package/skeleton-common/Config.in | 31 ++++
package/skeleton-common/skeleton-common.mk | 92 +++++++++
package/skeleton-custom/Config.in | 6 +
package/skeleton-custom/skeleton-custom.mk | 107 +++++++++++
package/skeleton-systemd/Config.in | 7 +
package/skeleton-systemd/skeleton-systemd.mk | 71 +++++++
package/skeleton-sysv/Config.in | 7 +
package/skeleton-sysv/skeleton-sysv.mk | 22 +++
{system => package/skeleton-sysv}/skeleton/dev/log | 0
.../skeleton-sysv}/skeleton/dev/pts/.empty | 0
.../skeleton-sysv}/skeleton/dev/shm/.empty | 0
.../skeleton-sysv}/skeleton/etc/fstab | 0
.../skeleton-sysv}/skeleton/var/cache | 0
.../skeleton-sysv}/skeleton/var/lib/misc | 0
.../skeleton-sysv}/skeleton/var/lock | 0
{system => package/skeleton-sysv}/skeleton/var/log | 0
{system => package/skeleton-sysv}/skeleton/var/run | 0
.../skeleton-sysv}/skeleton/var/spool | 0
{system => package/skeleton-sysv}/skeleton/var/tmp | 0
package/skeleton/Config.in | 8 +-
package/skeleton/skeleton.mk | 206 +--------------------
package/sysvinit/sysvinit.mk | 11 ++
support/testing/infra/builder.py | 3 +-
.../testing/tests/init/__init__.py | 0
support/testing/tests/init/base.py | 47 +++++
support/testing/tests/init/test_busybox.py | 67 +++++++
support/testing/tests/init/test_none.py | 32 ++++
support/testing/tests/init/test_systemd.py | 145 +++++++++++++++
system/Config.in | 13 +-
system/skeleton/dev/{pts => }/.empty | 0
system/system.mk | 88 +++++++++
36 files changed, 787 insertions(+), 211 deletions(-)
create mode 100644 package/skeleton-common/Config.in
create mode 100644 package/skeleton-common/skeleton-common.mk
create mode 100644 package/skeleton-custom/Config.in
create mode 100644 package/skeleton-custom/skeleton-custom.mk
create mode 100644 package/skeleton-systemd/Config.in
create mode 100644 package/skeleton-systemd/skeleton-systemd.mk
create mode 100644 package/skeleton-sysv/Config.in
create mode 100644 package/skeleton-sysv/skeleton-sysv.mk
rename {system => package/skeleton-sysv}/skeleton/dev/log (100%)
copy {system => package/skeleton-sysv}/skeleton/dev/pts/.empty (100%)
rename {system => package/skeleton-sysv}/skeleton/dev/shm/.empty (100%)
rename {system => package/skeleton-sysv}/skeleton/etc/fstab (100%)
rename {system => package/skeleton-sysv}/skeleton/var/cache (100%)
rename {system => package/skeleton-sysv}/skeleton/var/lib/misc (100%)
rename {system => package/skeleton-sysv}/skeleton/var/lock (100%)
rename {system => package/skeleton-sysv}/skeleton/var/log (100%)
rename {system => package/skeleton-sysv}/skeleton/var/run (100%)
rename {system => package/skeleton-sysv}/skeleton/var/spool (100%)
rename {system => package/skeleton-sysv}/skeleton/var/tmp (100%)
copy system/skeleton/dev/pts/.empty => support/testing/tests/init/__init__.py (100%)
create mode 100644 support/testing/tests/init/base.py
create mode 100644 support/testing/tests/init/test_busybox.py
create mode 100644 support/testing/tests/init/test_none.py
create mode 100644 support/testing/tests/init/test_systemd.py
rename system/skeleton/dev/{pts => }/.empty (100%)
create mode 100644 system/system.mk
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
next reply other threads:[~2017-07-18 17:25 UTC|newest]
Thread overview: 108+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-18 17:25 Yann E. MORIN [this message]
2017-07-18 17:25 ` [Buildroot] [PATCH 01/20] support/tests: allow properly indented config fragment Yann E. MORIN
2017-07-18 20:45 ` Yann E. MORIN
2017-07-18 17:25 ` [Buildroot] [PATCH 02/20] core/pkg-generic: add variable to skip skeleton dependency Yann E. MORIN
2017-07-22 12:27 ` Arnout Vandecappelle
2017-07-23 9:12 ` Peter Korsgaard
2017-07-23 9:21 ` Yann E. MORIN
2017-07-23 13:01 ` Peter Korsgaard
2017-07-22 13:41 ` Thomas Petazzoni
2017-07-18 17:25 ` [Buildroot] [PATCH 03/20] package/skeleton: add macro to rsync skeleton directory Yann E. MORIN
2017-07-22 12:34 ` Arnout Vandecappelle
2017-07-22 13:02 ` Arnout Vandecappelle
2017-07-22 14:33 ` Yann E. MORIN
2017-07-22 13:42 ` Thomas Petazzoni
2017-07-18 17:25 ` [Buildroot] [PATCH 04/20] package/skeleton: make SKELETON_LIB_SYMLINK a macro Yann E. MORIN
2017-07-22 12:56 ` Arnout Vandecappelle
2017-07-22 19:47 ` Thomas Petazzoni
2017-07-22 21:02 ` [Buildroot] Is MIPS_NABI32 a 64-bit architecture? [was: [PATCH 04/20] package/skeleton: make SKELETON_LIB_SYMLINK a macro] Arnout Vandecappelle
2017-07-22 13:50 ` [Buildroot] [PATCH 04/20] package/skeleton: make SKELETON_LIB_SYMLINK a macro Thomas Petazzoni
2017-07-22 14:23 ` Yann E. MORIN
2017-07-22 19:45 ` Thomas Petazzoni
2017-07-18 17:25 ` [Buildroot] [PATCH 05/20] system: provide package-wide system variables and macros Yann E. MORIN
2017-07-22 13:00 ` Arnout Vandecappelle
2017-07-18 17:25 ` [Buildroot] [PATCH 06/20] system: move setting getty to the corresponding init systems Yann E. MORIN
2017-07-22 13:11 ` Arnout Vandecappelle
2017-07-22 19:57 ` Thomas Petazzoni
2017-07-22 21:13 ` Arnout Vandecappelle
2017-07-22 20:34 ` Thomas Petazzoni
2017-07-18 17:25 ` [Buildroot] [PATCH 07/20] system: move remounting / " Yann E. MORIN
2017-07-22 13:16 ` Arnout Vandecappelle
2017-07-22 20:36 ` Thomas Petazzoni
2017-07-18 17:25 ` [Buildroot] [PATCH 08/20] system: with no init system, only allow custom skeleton Yann E. MORIN
2017-07-22 13:28 ` Arnout Vandecappelle
2017-07-22 13:53 ` Yann E. MORIN
2017-07-22 21:18 ` Arnout Vandecappelle
2017-07-22 22:12 ` Yann E. MORIN
2017-07-18 17:25 ` [Buildroot] [PATCH 09/20] package/skeleton: drop dependency on host-mkpasswd Yann E. MORIN
2017-07-22 21:24 ` Arnout Vandecappelle
2017-07-22 22:32 ` Yann E. MORIN
2017-07-18 17:25 ` [Buildroot] [PATCH 10/20] package/skeleton: select it rather than default to y Yann E. MORIN
2017-07-22 21:47 ` Arnout Vandecappelle
2017-07-18 17:25 ` [Buildroot] [PATCH 11/20] package/skeleton: split out into skeleton-custom Yann E. MORIN
2017-07-22 22:31 ` Arnout Vandecappelle
2017-07-22 22:38 ` Arnout Vandecappelle
2017-07-23 9:45 ` Yann E. MORIN
2017-07-18 17:25 ` [Buildroot] [PATCH 12/20] package/skeleton: split out into skeleton-common Yann E. MORIN
2017-07-22 23:06 ` Arnout Vandecappelle
2017-07-23 9:48 ` Yann E. MORIN
2017-07-23 20:32 ` Arnout Vandecappelle
2017-07-24 7:19 ` Thomas Petazzoni
2017-07-24 15:19 ` Yann E. MORIN
2017-07-18 17:25 ` [Buildroot] [PATCH 13/20] package/skeleton: make it a virtual package Yann E. MORIN
2017-07-22 23:36 ` Arnout Vandecappelle
2017-07-23 10:13 ` Yann E. MORIN
2017-07-23 20:48 ` Arnout Vandecappelle
2017-07-18 17:25 ` [Buildroot] [PATCH 14/20] package/skeleton-common: simplify staging install Yann E. MORIN
2017-07-22 23:38 ` Arnout Vandecappelle
2017-07-18 17:25 ` [Buildroot] [PATCH 15/20] package/skeleton: introduce sysv- and systemd-specific skeletons Yann E. MORIN
2017-07-22 23:49 ` Arnout Vandecappelle
2017-07-23 10:15 ` Yann E. MORIN
2017-07-18 17:25 ` [Buildroot] [PATCH 16/20] system: separate sysv and systemd parts of the skeleton Yann E. MORIN
2017-07-23 0:08 ` Arnout Vandecappelle
2017-07-23 0:13 ` Arnout Vandecappelle
2017-07-23 10:31 ` Yann E. MORIN
2017-07-23 10:24 ` Yann E. MORIN
2017-07-23 13:32 ` Arnout Vandecappelle
2017-07-23 13:39 ` Arnout Vandecappelle
2017-07-23 13:41 ` Yann E. MORIN
2017-07-18 17:25 ` [Buildroot] [PATCH 17/20] sytem: no-init systems may use our default, common skeleton Yann E. MORIN
2017-07-23 0:18 ` Arnout Vandecappelle
2017-07-23 10:37 ` Yann E. MORIN
2017-07-18 17:25 ` [Buildroot] [PATCH 18/20] fs: add pre- and post-command hooks Yann E. MORIN
2017-07-23 13:42 ` Arnout Vandecappelle
2017-07-23 14:17 ` Yann E. MORIN
2017-07-23 21:51 ` Arnout Vandecappelle
2017-07-24 16:01 ` Yann E. MORIN
2017-07-24 22:23 ` Arnout Vandecappelle
2017-07-18 17:25 ` [Buildroot] [PATCH 19/20] system: make systemd work on a read-only rootfs Yann E. MORIN
2017-07-23 22:18 ` Arnout Vandecappelle
2017-07-24 15:45 ` Yann E. MORIN
2017-07-24 22:44 ` Arnout Vandecappelle
2017-07-25 16:07 ` Yann E. MORIN
2017-07-25 22:24 ` Arnout Vandecappelle
2017-07-18 17:25 ` [Buildroot] [PATCH 20/20] support/testing: add runtime testing for init systems Yann E. MORIN
2017-07-22 14:32 ` Arnout Vandecappelle
2017-07-22 14:45 ` Yann E. MORIN
2017-07-22 19:30 ` Thomas Petazzoni
2017-07-22 19:53 ` Arnout Vandecappelle
2017-07-22 20:10 ` Thomas Petazzoni
2017-07-22 22:50 ` Yann E. MORIN
2017-07-23 7:58 ` Thomas Petazzoni
2017-07-23 9:26 ` Yann E. MORIN
2017-07-23 18:13 ` [Buildroot] TestIso9660GrubExternal and TestIso9660GrubInternal failing Ricardo Martincoski
2017-07-23 20:02 ` Yann E. MORIN
2017-07-23 20:28 ` Yann E. MORIN
2017-07-23 20:39 ` Yann E. MORIN
2017-07-24 7:13 ` Thomas Petazzoni
2017-07-24 11:07 ` Ricardo Martincoski
2017-07-24 15:18 ` Yann E. MORIN
2017-07-24 15:20 ` [Buildroot] [PATCH 20/20] support/testing: add runtime testing for init systems Andrey Smirnov
2017-07-24 15:50 ` Yann E. MORIN
2017-07-19 20:14 ` [Buildroot] [PATCH 00/20] system: properly handle systemd as init system Andrey Yurovsky
2017-07-19 20:53 ` Thomas Petazzoni
2017-07-19 22:17 ` Andrey Yurovsky
2017-07-20 7:32 ` Thomas Petazzoni
2017-07-21 22:15 ` Marcus Hoffmann
2017-07-28 20:41 ` Marcus Hoffmann
2017-07-28 20:54 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1500398733.git.yann.morin.1998@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox