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

Alex Kiernan alex.kiernan at gmail.com
Fri Apr 26 15:36:32 UTC 2019


On Fri, Apr 26, 2019 at 3:45 PM Jonas Bonn <jonas at norrbonn.se> wrote:
>
> 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.
>

Don't we all end up in those kind of problems!

> >
> > 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.

Ah... that's useful information that I didn't know.

Whilst I do have a writeable /etc, I'm running under OSTree, so I
don't want /etc mutated in the normal use case as I want to ensure
that changes in /etc are correctly propagated across upgrades (OSTree
does a three way merge of /etc using the current /etc and what was
shipped as defaults in the previous deployment and the new
deployment).

> 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.
>

Thanks, I'll see if I can chase that one down.

> 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.
>

Yeah, that's something I'd like to get to.

--
Alex Kiernan


More information about the Openembedded-core mailing list