mbox series

[0/3] systemd: split timesync and networkd to packages

Message ID 20230208071251.5412-1-peter.marko@siemens.com
Headers show
Series systemd: split timesync and networkd to packages | expand

Message

Peter Marko Feb. 8, 2023, 7:12 a.m. UTC
Motivation for this patch series is sstate-cache reuse.

Basically we have dozen of products with several
different systemd configurations.
Problem is that there are many recipes which depend on systemd.
(or their packaging depends on it)
Especially qtwebengine which takes hours to build and created
sstate objects have several hundereds of gigabytes.

So instead of:
  PACKAGECONFIG:remove:pn-systemd = " timesyncd"
we would like to do just:
  BAD_RECOMMENDATIONS += "systemd-timesyncd"

That allows reuse of sstate-cache for such recipes because
it will build identically, just install to rootfs differently.

One alternative we considered was via systemd-conf, but binaries still
occupy space in rootfs which is not desirable for some devices:
  ln -sf /dev/null ${D}${sysconfdir}/systemd/system/systemd-timesyncd.service

Please comment if you think that we should take a different
approach which is more in line with Yocto project best practices.

Peter Marko (3):
  systemd: split timesyncd to its own package
  systemd.bbclass: add non-recursive service packaging
  systemd: split networkd to its own package

 documentation/ref-manual/variables.rst     | 10 ++++
 meta/classes-recipe/systemd.bbclass        | 15 ++---
 meta/recipes-core/systemd/systemd_252.4.bb | 64 ++++++++++++++++++++--
 3 files changed, 78 insertions(+), 11 deletions(-)

Comments

Alexander Kanavin Feb. 8, 2023, 7:38 a.m. UTC | #1
On Wed, 8 Feb 2023 at 08:13, Peter Marko <peter.marko@siemens.com> wrote:
> One alternative we considered was via systemd-conf, but binaries still
> occupy space in rootfs which is not desirable for some devices:
>   ln -sf /dev/null ${D}${sysconfdir}/systemd/system/systemd-timesyncd.service

On the other hand it's only a single line of code, instead of doubling
the ways systemd services can be packaged, chosen via a global,
publicly documented variable. When you are writing new code paths,
consider the ever-growing maintenance burden, always, please.

I'm leaning towards installing the services, but not starting them approach.

Alex
ChenQi Feb. 8, 2023, 7:53 a.m. UTC | #2
I think using systemd-conf to solve your original problem is more 
reasonable.
After all, the extra rootfs space is very small.

Also, BAD_RECOMMENDATIONS is not supported well for deb package backend.
poky/meta/classes-recipe/rootfs_deb.bbclass: bb.warn("Debian package 
install does not support BAD_RECOMMENDATIONS")

Regards,
Qi

On 2/8/23 15:38, Alexander Kanavin wrote:
> On Wed, 8 Feb 2023 at 08:13, Peter Marko <peter.marko@siemens.com> wrote:
>> One alternative we considered was via systemd-conf, but binaries still
>> occupy space in rootfs which is not desirable for some devices:
>>    ln -sf /dev/null ${D}${sysconfdir}/systemd/system/systemd-timesyncd.service
> On the other hand it's only a single line of code, instead of doubling
> the ways systemd services can be packaged, chosen via a global,
> publicly documented variable. When you are writing new code paths,
> consider the ever-growing maintenance burden, always, please.
>
> I'm leaning towards installing the services, but not starting them approach.
>
> Alex
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#176893): https://lists.openembedded.org/g/openembedded-core/message/176893
> Mute This Topic: https://lists.openembedded.org/mt/96825676/7304865
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [Qi.Chen@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>