[OE-core] [PATCH] systemd: upgrade to 242

Jonas Bonn jonas at norrbonn.se
Fri Apr 26 14:45:36 UTC 2019


Hi Alex,

On 26/04/2019 16:14, Alex Kiernan wrote:
> On Thu, Apr 18, 2019 at 11:22 AM Andrej Valek <andrej.valek at siemens.com> wrote:
>>
>> PATCH REBASED:
>> ==============
>> 0001-do-not-disable-buffer-in-writing-files.patch
>> 0002-don-t-use-glibc-specific-qsort_r.patch
>> 0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch
>> 0004-add-fallback-parse_printf_format-implementation.patch
>> 0005-rules-watch-metadata-changes-in-ide-devices.patch
>> 0005-src-basic-missing.h-check-for-missing-strndupa.patch
>> 0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch
>> 0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
>> 0017-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
>> 0021-avoid-redefinition-of-prctl_mm_map-structure.patch
>> 0024-test-json.c-define-M_PIl.patch
>>
>> PATCH DROPPED:
>> ==============
>> 0001-meson-declare-version.h-as-dep-for-various-targets-t.patch
>> 0001-meson-declare-version.h-as-dependency-for-systemd.patch
>> 0013-test-hexdecoct.c-Include-missing.h-for-strndupa.patch
>>
>> PATCH ADDED:
>> 0025-fs-utilh-add-missing-sys-stat-include.patch
>>
>> Signed-off-by: Andrej Valek <andrej.valek at siemens.com>
>> ---
> 
> This change in 242 means I'm no longer getting network up after
> flashing a new image (I'm flashing the entire eMMC from an image):
> 
> * During package installation (with `ninja install`), we would create
> symlinks for systemd-networkd.service, systemd-networkd.socket,
> systemd-resolved.service, remote-cryptsetup.target, remote-fs.target,
> systemd-networkd-wait-online.service, and systemd-timesyncd.service
> in /etc, as if `systemctl enable` was called for those units, to make
> the system usable immediately after installation. Now this is not
> done anymore, and instead calling `systemctl preset-all` is
> recommended after the first installation of systemd.
> 
> I don't know if Jonas is still working on this series:
> 
> https://patchwork.openembedded.org/series/15497/

I haven't given up on it, but I had to put it aside for a bit due to 
more pressing matters.

> 
> as that looks like it has the kind of machinery we need (though I
> don't think this problem is specific to read only rootfs now) - I'm
> looking at the series in case he's not.

If you have a writable root, systemd will automatically do the 
preset-all for you; the catch is, systemd only does this if 
/etc/machine-id does not exist.  OE forces an empty /etc/machine-id onto 
all root images so this doesn't work; as such, you'll need to do the 
preset-all magic manually for ALL filesystems irregardless of whether 
they are read-only or not.

A better solution is drop the /etc/machine-id and let systemd create 
that automatically; then it will also do the automatic preset-all at 
first-boot.  The problem here is that the OE build farm detects images 
that stall at boot when /etc/machine-id isn't present; I wasn't able to 
find the cause of this but that's where you should be looking if you 
want to pursue this patch series.  Aside from that little glitch, I 
think the rest of it is fine.

And getting this working is also a big step towards making "stateless" 
systems (using the systemd terminology) work where /etc may be a tmpfs 
and gets populated at boot.

/Jonas

> 
> The quick-hack fix is to revert 01d2041e41f4 ("meson: stop creating
> enablement symlinks in /etc during installation"), but clearly that's
> not sustainable.
> 
> --
> Alex Kiernan
> 


More information about the Openembedded-core mailing list