[OE-core] [OE-Core][PATCH v5 0/6] Fix systemd service enables/move towards "stateless" configuration

Paul Barker paul at betafive.co.uk
Tue Apr 30 12:37:44 UTC 2019


On Tue, 30 Apr 2019, at 13:33, Alex Kiernan wrote:
> On Tue, Apr 30, 2019 at 1:24 PM Paul Barker <paul at betafive.co.uk> wrote:
> >
> > On Tue, 30 Apr 2019, at 13:14, Alex Kiernan wrote:
> > > On Tue, Apr 30, 2019 at 1:08 PM Paul Barker <paul at betafive.co.uk> wrote:
> > > >
> > > > On Mon, 29 Apr 2019, at 15:44, Alex Kiernan wrote:
> > > > > As a result of the systemd 242 upgrade, which includes 01d2041e41f4
> > > > > ("meson: stop creating enablement symlinks in /etc during
> > > > > installation"), services such as systemd-networkd are no longer enabled
> > > > > in images.
> > > > >
> > > >
> > > > As an aside - is this systemd upgrade why on raspberrypi3 with master branches I recently have no console on tty1 and `/etc/systemd/system/getty.target.wants/getty at tty1.service` is missing?
> > > >
> > >
> > > I suspect so - certainly getty@ is one of the things that's was
> > > touched in the upstream commit.
> > >
> >
> > Doing some reading now.
> >
> > The discussion on https://github.com/systemd/systemd/issues/12345 suggests we should be running `systemctl preset-all` or at least `systemctl enable getty at tty1` on first boot.
> 
> That's what this patchset does (`systemctl preset-all`), or rather it
> builds images without /etc/machine-id which triggers systemd to do it.
> 
> > Maybe this should be handled at the BSP level so we can decide whether to enable getty at tty1 or not on a per-machine basis.
> >
> 
> Once I'm done you should be able to install preset files which then
> determine what gets enabled/disabled, the only real question I've got
> is if we should always do this at image build time, or leave it for
> first boot and let systemd do it (on read-write images at least).
> 
> > However, I can't see an easy way to resolve this at BSP level right now. I know how to add a systemd service file in a package and enable it but in this case we're looking to enable a service which is already installed. Reading through systemd.bbclass and the relevant docs doesn't give any suggestions. Is there any straightforward way to enable an already installed service?
> >
> 
> Personally, if I needed it fixing right now, I'd probably add a hack
> during rootfs build to put the symlinks in the right place.
> 

Thanks for the advice, I understand much better now. I think for now I'll pin oe-core to the last commit before the systemd upgrade (ac64c3b96b...) so we can carry on our development. I'll watch out for this patch series going into master and then test it out again.

Thanks,

-- 
Paul Barker
Managing Director & Principal Engineer
Beta Five Ltd


More information about the Openembedded-core mailing list