Skip to content

Hello All!

Yann E. MORIN buildroot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest14 patches 0 repliesNew

Changes in v4 from the cover letter

- fix the read-only support (Arnout)
- add reviewed-by tags from Arnout. Thanks a lot!
- enhance some commit logs after those reviews
- simplify no-init skeleton-common (Arnout)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14system: with no init system, only allow custom skeletonsystem/Config.in+6 -01 reply
2/14package/skeleton: drop dependency on host-mkpasswdpackage/skeleton/skeleton.mk system/Config.in+1 -11 reply
3/14package/skeleton: select it rather than default to ypackage/skeleton/Config.in system/Config.in+2 -11 reply
4/14package/skeleton: split out into skeleton-custompackage/Config.in package/skeleton-custom/Config.in package/skeleton-custom/skeleton-custom.mk +2 more+112 -505 replies
5/14package/skeleton: split out into skeleton-commonpackage/Config.in package/skeleton-common/Config.in package/skeleton-common/skeleton-common.mk +2 more+102 -870 replies
6/14package/skeleton: make it a virtual packagepackage/skeleton-common/Config.in package/skeleton-common/skeleton-common.mk package/skeleton-custom/Config.in +4 more+24 -110 replies
7/14package/skeleton-common: simplify staging installpackage/skeleton-common/skeleton-common.mk+5 -90 replies
8/14package/skeleton: introduce sysv- and systemd-specific skeletonspackage/Config.in package/skeleton-common/Config.in package/skeleton-common/skeleton-common.mk +5 more+58 -100 replies
9/14system: separate sysv and systemd parts of the skeletonpackage/skeleton-systemd/skeleton-systemd.mk package/skeleton-sysv/skeleton-sysv.mk package/skeleton-sysv/skeleton/dev/log +11 more+11 -00 replies
10/14system: no-init systems may use our default, common skeletonpackage/skeleton-common/Config.in system/Config.in+16 -40 replies
11/14support/testing: add runtime testing for init systemssupport/testing/tests/init/__init__.py support/testing/tests/init/base.py support/testing/tests/init/test_busybox.py +2 more+228 -00 replies
12/14fs: add pre- and post-command hooksfs/common.mk package/pkg-generic.mk+8 -00 replies
13/14system: make systemd work on a read-only rootfspackage/skeleton-systemd/skeleton-systemd.mk system/Config.in+48 -30 replies
14/14support/testing: add runtime testing for read-only systemdsupport/testing/tests/init/systemd-factory/var/foo/bar support/testing/tests/init/test_systemd.py+71 -00 replies

Reviews trailers per patch

9 of 14 patches have a Reviewed-by or Acked-by.

PatchArnout Vandecappelle (Essensium/Mind)Romain Naour
1/14R-b
2/14R-b
3/14R-b
4/14
5/14R-b
6/14
7/14R-b
8/14R-b
9/14R-b
10/14
11/14
12/14R-b
13/14R-b
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [Buildroot] [PATCH 00/14 v4] Hello All!

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. Read-only rootfs will be handled in a separate series.

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.

Eventually, we add support for runing systemd on a read-only rootfs. This requires that we play tricks with /var and the systemd-tmpfiles factory feautre.

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 v3 -> v4:
- fix the read-only support (Arnout)
- add reviewed-by tags from Arnout. Thanks a lot!
- enhance some commit logs after those reviews
- simplify no-init skeleton-common (Arnout)

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 de46cc9be0873fbd60b19552c5687ad142aa0c99

test-pkg: use merge_config.sh to merge the fragments (2017-07-25 23:07:03 +0200)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to bcdaf713d6a72b04818c74b1810db0beac85972b

support/testing: add runtime testing for read-only systemd (2017-07-25 23:11:14 +0200)

----------------------------------------------------------------
Yann E. MORIN (14):
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
system: no-init systems may use our default, common skeleton support/testing: add runtime testing for init systems
fs: add pre- and post-command hooks
system: make systemd work on a read-only rootfs support/testing: add runtime testing for read-only systemd

 fs/common.mk                                       |   4 +
 package/Config.in                                  |   4 +
 package/pkg-generic.mk                             |   4 +
 package/skeleton-common/Config.in                  |  17 +++
 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                       | 141 +------------------
 .../testing/tests/init/__init__.py                 |   0
 support/testing/tests/init/base.py                 |  47 +++++++
 .../testing/tests/init/systemd-factory/var/foo/bar |   1 +
 support/testing/tests/init/test_busybox.py         |  67 +++++++++
 support/testing/tests/init/test_none.py            |  32 +++++
 support/testing/tests/init/test_systemd.py         | 152 +++++++++++++++++++++
 system/Config.in                                   |  13 +-
 system/skeleton/dev/{pts => }/.empty               |   0
 32 files changed, 659 insertions(+), 143 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/systemd-factory/var/foo/bar
 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%)
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.  |
'------------------------------^-------^------------------^--------------------'