[OE-core] [PATCH 0/7] systemd patches

ChenQi Qi.Chen at windriver.com
Wed Jan 2 07:58:42 UTC 2019


Hi Jonas,

I'd like to talk about this patchset from a non-technical view.
And to be brief, my conclusion is suggesting using some switch, e.g. 
DISTRO_FEATURE, to control this 'stateless' behavior.
Please see details below.

This patchset is based on two assumptions:
1) Users would generally want 'stateless' system. Or in other words, 
they would prefer 'stateless' more than 'stateful'.
2) Other softwares/upstreams are also working against this 'stateless' goal.

 From the current situation, both are not that true. As your [PATCH 7/7] 
points out, even systemd defaults to install things under /etc.

Cleaning up systemd's /etc files while leaving other softwares requiring 
/etc files is not that pleasant. At a minimum, systemd users who are not 
aware of this 'stateless' concept would be confused. "Where's my 
/etc/systemd/system.conf file?!" They would ask.
So I'd suggest using something like 'stateless' DISTRO_FEATURE (just 
like 'usrmerge') to control each recipe's behavior.

Best Regards,
Chen Qi

On 12/31/2018 08:05 PM, Jonas Bonn wrote:
> These patches make some modifications to systemd with the long-term goal
> of being able to run OE in systemd's "stateless" configuration.
> "Stateless" boils down to building an image with empty /etc and /var
> directories so that volatile (tmpfs) filesystems can be mounted there;
> this requires that the system subsequently be able to populate these
> directories dynamically, which systemd mostly takes care of if things
> are done right.
>
> In these patches:
> i)    Don't include machine-id in writable images so that systemd can run
> its first-boot machinery
> ii)   Move systemd configuration files out of /etc
> iii)  Allow systemd to dynamically enable services and populate
> /etc/systemd/system via the presets mechanism
>
> There's a long way to go to get to a working "stateless" configuration.
> Getting to a "volatile" system (just empty /var) should be easier and
> I'll post patches moving things in that direction shortly.
>
> /Jonas
>
> Jonas Bonn (7):
>    systemd: do not create machine-id
>    systemd-conf: simplify creation of configuration
>    systemd: move additional conffiles to systemd-conf
>    systemd: create preset files instead of installing in image
>    systemd-systemctl-native: simplify and support preset-all
>    rootfs-postcommands: call preset-all for read-only-rootfs
>    systemd: do not pre-enable services, rely on presets
>
>   meta/classes/rootfs-postcommands.bbclass      |  8 ++++
>   meta/classes/systemd.bbclass                  | 33 +++++++-------
>   meta/recipes-core/systemd/systemd-conf.bb     | 45 +++++++------------
>   .../systemd/systemd-systemctl/systemctl       | 36 +++------------
>   meta/recipes-core/systemd/systemd_239.bb      |  4 ++
>   5 files changed, 52 insertions(+), 74 deletions(-)
>



More information about the Openembedded-core mailing list