systemd: move systemctl utility to separate subpackage
PATCH 1/1 systemd: move systemctl utility to separate subpackage
Move systemctl into separate subpackage to minimize dependencies from core systemd package.
--- meta/recipes-core/systemd/systemd_257.1.bb | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
meta/recipes-core/systemd/systemd_257.1.bb +14 -7
@@ -429,6 +429,7 @@ PACKAGE_BEFORE_PN = "\ ${PN}-mime \ ${PN}-networkd \ ${PN}-rpm-macros \ + ${PN}-systemctl \ ${PN}-udev-rules \ ${PN}-vconsole-setup \ ${PN}-zsh-completion \
@@ -678,13 +679,8 @@ CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ " FILES:${PN} = " ${base_bindir}/* \ - ${base_sbindir}/shutdown \ - ${base_sbindir}/halt \ - ${base_sbindir}/poweroff \ - ${base_sbindir}/runlevel \ ${base_sbindir}/telinit \ ${base_sbindir}/resolvconf \ - ${base_sbindir}/reboot \ ${base_sbindir}/init \ ${datadir}/dbus-1/services \ ${datadir}/dbus-1/system-services \
@@ -749,9 +745,19 @@ FILES:${PN} = " ${base_bindir}/* \ FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" +FILES:${PN}-systemctl = " \ + ${bindir}/systemctl \ + ${base_sbindir}/shutdown \ + ${base_sbindir}/halt \ + ${base_sbindir}/poweroff \ + ${base_sbindir}/runlevel \ + ${base_sbindir}/reboot \ +" + RDEPENDS:${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck util-linux-swaponoff" RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" RDEPENDS:${PN} += "volatile-binds" +RDEPENDS:${PN} += "${PN}-systemctl" RRECOMMENDS:${PN} += "${PN}-extra-utils \ udev-hwdb \
@@ -867,14 +873,15 @@ python do_warn_musl() { } addtask warn_musl before do_configure -ALTERNATIVE:${PN} = "halt reboot shutdown poweroff \ - ${@bb.utils.contains('PACKAGECONFIG', 'sysvinit', 'runlevel', '', d)} \ +ALTERNATIVE:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'sysvinit', 'runlevel', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}" ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" ALTERNATIVE_PRIORITY[resolv-conf] ?= "50" +ALTERNATIVE:${PN}-systemctl = "halt reboot shutdown poweroff runlevel" + ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" ALTERNATIVE_PRIORITY[halt] ?= "300"
Signature · 1 line
2.44.0
Quoted 2 lines · Oleksiy Obitotskyy via lists.openembedded.org
Move systemctl into separate subpackage to minimize dependencies from core systemd package.
In what situation would you have systemd or systemctl without the other?
Cheers,
Ross
Hi,
We have next situation:
- a lot of software components that depend on packages and deploy all packages they depend on locally inside component.
- some components directly depend on systemctl only (e.g. this binary used in scripts), so for every component we have to deploy whole systemd locally.
- finally, all/some of those components will be merged in some way and will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.
Regards,
Oleksiy
________________________________
From: Ross Burton <[email protected]>
Sent: Monday, February 10, 2025 12:47
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackage
Quoted 2 lines · Oleksiy Obitotskyy via lists.openembedded.org
Move systemctl into separate subpackage to minimize dependencies from core systemd package.
In what situation would you have systemd or systemctl without the other?
Cheers,
Ross
Quoted 4 lines · Oleksiy Obitotskyy via lists.openembedded.org
We have next situation:
- a lot of software components that depend on packages and deploy all packages they depend on locally inside component.
- some components directly depend on systemctl only (e.g. this binary used in scripts), so for every component we have to deploy whole systemd locally.
- finally, all/some of those components will be merged in some way and will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.
I'm sorry, but this does not quite make sense. You need to more specifically describe what 'deploying whole systemd' means, and why is that problematic.
Alex
Hi Alexander,
By 'deploying whole systemd' I mean next:
*
Every component copy and installs packages with libraries, utilities and config files in component local sysroot, i.e. directory used to create final component image:
*
libsystemd0_255.4
*
libsystemd-shared_255.4
*systemd_255.4
So, on disk we have duplication of files for every component that depend on the systemctl.
In case of separate subpackage we have one root component depend on the systemd and all other components will contain only systemd-systemctl package content.
Of course, I understand it's quite a specific scenario.
Regards,
Oleksiy
________________________________
From: Alexander Kanavin <[email protected]>
Sent: Monday, February 10, 2025 13:03
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackage
Quoted 4 lines · Oleksiy Obitotskyy via lists.openembedded.org
We have next situation:
- a lot of software components that depend on packages and deploy all packages they depend on locally inside component.
- some components directly depend on systemctl only (e.g. this binary used in scripts), so for every component we have to deploy whole systemd locally.
- finally, all/some of those components will be merged in some way and will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.
I'm sorry, but this does not quite make sense. You need to more specifically describe what 'deploying whole systemd' means, and why is that problematic.
Alex
They're not actually copied. They're hard-linked from sysroots-components/. This is a cheap operation and it doesn't waste disk space.
Alex
Quoted 48 lines · Oleksiy Obitotskyy via lists.openembedded.org
Hi Alexander,
By 'deploying whole systemd' I mean next:
Every component copy and installs packages with libraries, utilities and config files in component local sysroot, i.e. directory used to create final component image:
libsystemd0_255.4
libsystemd-shared_255.4
systemd_255.4So, on disk we have duplication of files for every component that depend on the systemctl.
In case of separate subpackage we have one root component depend on the systemd and all other components will contain only systemd-systemctl package content.Of course, I understand it's quite a specific scenario.
Regards,
Oleksiy________________________________
From: Alexander Kanavin <[email protected]>
Sent: Monday, February 10, 2025 13:03
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageQuoted 4 lines · Oleksiy Obitotskyy via lists.openembedded.org
We have next situation:
- a lot of software components that depend on packages and deploy all packages they depend on locally inside component.
- some components directly depend on systemctl only (e.g. this binary used in scripts), so for every component we have to deploy whole systemd locally.
- finally, all/some of those components will be merged in some way and will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.I'm sorry, but this does not quite make sense. You need to more specifically describe what 'deploying whole systemd' means, and why is that problematic.
Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#211106): https://lists.openembedded.org/g/openembedded-core/message/211106
Mute This Topic: https://lists.openembedded.org/mt/111032725/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Additionally, changing the packaging does not affect what is added to the sysroot.
//Peter
Quoted 77 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Alexander Kanavin via lists.openembedded.org
Sent: den 10 februari 2025 18:20
To: [email protected]
Cc: Ross Burton <[email protected]>; openembedded- [email protected]; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageThey're not actually copied. They're hard-linked from sysroots-components/. This is a cheap operation and it doesn't waste disk space.
Alex
Quoted 6 lines · Oleksiy Obitotskyy via lists.openembedded.org
Hi Alexander,
By 'deploying whole systemd' I mean next:
Every component copy and installs packages with libraries, utilities and
config files in component local sysroot, i.e. directory used to create final component image:
Quoted 6 lines
libsystemd0_255.4
libsystemd-shared_255.4
systemd_255.4So, on disk we have duplication of files for every component that depend
on the systemctl.
Quoted 1 line
In case of separate subpackage we have one root component depend on the
systemd and all other components will contain only systemd-systemctl package content.
Quoted 10 lines
Of course, I understand it's quite a specific scenario.
Regards,
Oleksiy________________________________
From: Alexander Kanavin <[email protected]>
Sent: Monday, February 10, 2025 13:03
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)Quoted 1 line
Cc Ross Burton <[email protected]>; openembedded-[email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Quoted 1 line
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to
separate subpackage
Quoted 6 lines
Quoted 2 lines · Oleksiy Obitotskyy via lists.openembedded.org
We have next situation:
- a lot of software components that depend on packages and deploy allpackages they depend on locally inside component.
Quoted 1 line
Quoted 1 line
- some components directly depend on systemctl only (e.g. this binary
used in scripts), so for every component we have to deploy whole systemd locally.
Quoted 1 line
Quoted 1 line
- finally, all/some of those components will be merged in some way and
will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.
Quoted 9 lines
I'm sorry, but this does not quite make sense. You need to more specifically describe what 'deploying whole systemd' means, and why is that problematic.
Alex
I'm sorry, I confused you mentioned term sysroot. It's not about yocto - we just use the same term because it's very similar to how it works into yocto.
We got packages as a result of yocto build and use these artefacts (packages) on next stage to populate software components content. For some reason we can't use the same approach with hardlink to deduplicate components content.
Regards,
Oleksiy
________________________________
From: Peter Kjellerstedt <[email protected]>
Sent: Monday, February 10, 2025 22:05
To: [email protected] <[email protected]>; Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: RE: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackage
Additionally, changing the packaging does not affect what is added to the sysroot.
//Peter
Quoted 77 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Alexander Kanavin via lists.openembedded.org
Sent: den 10 februari 2025 18:20
To: [email protected]
Cc: Ross Burton <[email protected]>; openembedded- [email protected]; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageThey're not actually copied. They're hard-linked from sysroots-components/. This is a cheap operation and it doesn't waste disk space.
Alex
Quoted 6 lines · Oleksiy Obitotskyy via lists.openembedded.org
Hi Alexander,
By 'deploying whole systemd' I mean next:
Every component copy and installs packages with libraries, utilities and
config files in component local sysroot, i.e. directory used to create final component image:
Quoted 6 lines
libsystemd0_255.4
libsystemd-shared_255.4
systemd_255.4So, on disk we have duplication of files for every component that depend
on the systemctl.
Quoted 1 line
In case of separate subpackage we have one root component depend on the
systemd and all other components will contain only systemd-systemctl package content.
Quoted 10 lines
Of course, I understand it's quite a specific scenario.
Regards,
Oleksiy________________________________
From: Alexander Kanavin <[email protected]>
Sent: Monday, February 10, 2025 13:03
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)Quoted 1 line
Cc Ross Burton <[email protected]>; openembedded-[email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Quoted 1 line
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to
separate subpackage
Quoted 6 lines
Quoted 2 lines · Oleksiy Obitotskyy via lists.openembedded.org
We have next situation:
- a lot of software components that depend on packages and deploy allpackages they depend on locally inside component.
Quoted 1 line
Quoted 1 line
- some components directly depend on systemctl only (e.g. this binary
used in scripts), so for every component we have to deploy whole systemd locally.
Quoted 1 line
Quoted 1 line
- finally, all/some of those components will be merged in some way and
will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.
Quoted 9 lines
I'm sorry, but this does not quite make sense. You need to more specifically describe what 'deploying whole systemd' means, and why is that problematic.
Alex
This still doesn’t make sense. Any target file is contained in one and only one package. Where is the duplication?
Alex
Quoted 111 lines · Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)
I'm sorry, I confused you mentioned term sysroot. It's not about yocto - we just use the same term because it's very similar
to how it works into yocto.
We got packages as a result of yocto build and use these artefacts (packages) on next stage to populate
software components content. For some reason we can't use the same approach with hardlink to deduplicate
components content.Regards,
Oleksiy------------------------------
*From:* Peter Kjellerstedt <[email protected]> *Sent:* Monday, February 10, 2025 22:05
*To:* [email protected] <[email protected]>; Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]> *Cc:* Ross Burton <[email protected]>; [email protected] < [email protected]>; Ruslan Bilovol (rbilovol) < [email protected]>
*Subject:* RE: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageAdditionally, changing the packaging does not affect what is added to the sysroot.
//Peter
Quoted 10 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Alexander Kanavin via lists.openembedded.org
Sent: den 10 februari 2025 18:20
To: [email protected]
Cc: Ross Burton <[email protected]>; openembedded- [email protected]; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility toseparate
Quoted 6 lines
subpackage
They're not actually copied. They're hard-linked from sysroots-components/. This is a cheap operation and it doesn't waste disk space.
Quoted 11 lines
Alex
Quoted 6 lines · Oleksiy Obitotskyy via lists.openembedded.org
Hi Alexander,
By 'deploying whole systemd' I mean next:
Every component copy and installs packages with libraries, utilities
and
Quoted 8 lines
config files in component local sysroot, i.e. directory used to create final component image:
Quoted 6 lines
libsystemd0_255.4
libsystemd-shared_255.4
systemd_255.4So, on disk we have duplication of files for every component that
depend
Quoted 24 lines
on the systemctl.
Quoted 1 line
In case of separate subpackage we have one root component depend on the
systemd and all other components will contain only systemd-systemctl package content.
Quoted 10 lines
Of course, I understand it's quite a specific scenario.
Regards,
Oleksiy________________________________
From: Alexander Kanavin <[email protected]>
Sent: Monday, February 10, 2025 13:03
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)Quoted 1 line
Cc Ross Burton <[email protected]>; openembedded-[email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Quoted 1 line
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to
separate subpackage
Quoted 4 lines
On Mon, 10 Feb 2025 at 13:01, Oleksiy Obitotskyy via lists.openembedded.org <[email protected]> wrote:
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
We have next situation:
- a lot of software components that depend on packages and deploy allpackages they depend on locally inside component.
Quoted 1 line
Quoted 1 line
- some components directly depend on systemctl only (e.g. this binary
used in scripts), so for every component we have to deploy whole systemd locally.
Quoted 1 line
Quoted 1 line
- finally, all/some of those components will be merged in some way
and
Quoted 11 lines
will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.
Quoted 9 lines
I'm sorry, but this does not quite make sense. You need to more specifically describe what 'deploying whole systemd' means, and why is that problematic.
Alex
Component deliver something and it's content consist of:
*
binaries/libraries/scripts, etc. that delivered by this component (service) itself
*
binaries/libraries, etc. on which component depends on
Technically content is per component subdirectory. Every component has its own isolated content.
If we have N components each require only systemd-systemctl it mean every component will store (on disk) whole systemd/libsystemd package files instead of systemctl binary.
Regards,
Oleksiy
________________________________
From: Alexander Kanavin <[email protected]>
Sent: Tuesday, February 11, 2025 19:31
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Peter Kjellerstedt <[email protected]>; Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackage
This still doesn’t make sense. Any target file is contained in one and only one package. Where is the duplication?
Alex
On Tue 11. Feb 2025 at 19.04, Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]<mailto:[email protected]>> wrote:
I'm sorry, I confused you mentioned term sysroot. It's not about yocto - we just use the same term because it's very similar to how it works into yocto.
We got packages as a result of yocto build and use these artefacts (packages) on next stage to populate
software components content. For some reason we can't use the same approach with hardlink to deduplicate
components content.
Regards,
Oleksiy
________________________________
From: Peter Kjellerstedt <[email protected]<mailto:[email protected]>>
Sent: Monday, February 10, 2025 22:05
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>; Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]<mailto:[email protected]>>
Cc: Ross Burton <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>; Ruslan Bilovol (rbilovol) <[email protected]<mailto:[email protected]>>
Subject: RE: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackage
Additionally, changing the packaging does not affect what is added to the sysroot.
//Peter
Quoted 77 lines
-----Original Message-----
From: [email protected]<mailto:[email protected]> <openembedded- [email protected]<mailto:[email protected]>> On Behalf Of Alexander Kanavin via lists.openembedded.org<http://lists.openembedded.org>
Sent: den 10 februari 2025 18:20
To: [email protected]<mailto:[email protected]>
Cc: Ross Burton <[email protected]<mailto:[email protected]>>; openembedded- [email protected]<mailto:[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]<mailto:[email protected]>>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate
subpackageThey're not actually copied. They're hard-linked from sysroots-components/. This is a cheap operation and it doesn't waste disk space.
Alex
Quoted 6 lines · On Mon, 10 Feb 2025 at 18:05, Oleksiy Obitotskyy via…
Hi Alexander,
By 'deploying whole systemd' I mean next:
Every component copy and installs packages with libraries, utilities and
config files in component local sysroot, i.e. directory used to create final component image:
Quoted 6 lines
libsystemd0_255.4
libsystemd-shared_255.4
systemd_255.4So, on disk we have duplication of files for every component that depend
on the systemctl.
Quoted 1 line
In case of separate subpackage we have one root component depend on the
systemd and all other components will contain only systemd-systemctl package content.
Quoted 10 lines
Of course, I understand it's quite a specific scenario.
Regards,
Oleksiy________________________________
From: Alexander Kanavin <[email protected]<mailto:[email protected]>>
Sent: Monday, February 10, 2025 13:03
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)<[email protected]<mailto:[email protected]>>
Quoted 1 line
Cc Ross Burton <[email protected]<mailto:[email protected]>>; openembedded-[email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>; Ruslan Bilovol (rbilovol) <[email protected]<mailto:[email protected]>>
Quoted 1 line
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to
separate subpackage
Quoted 6 lines
Quoted 2 lines · On Mon, 10 Feb 2025 at 13:01, Oleksiy Obitotskyy via…
We have next situation:
- a lot of software components that depend on packages and deploy allpackages they depend on locally inside component.
Quoted 1 line
Quoted 1 line
- some components directly depend on systemctl only (e.g. this binary
used in scripts), so for every component we have to deploy whole systemd locally.
Quoted 1 line
Quoted 1 line
- finally, all/some of those components will be merged in some way and
will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.
Quoted 9 lines
I'm sorry, but this does not quite make sense. You need to more specifically describe what 'deploying whole systemd' means, and why is that problematic.
Alex
But systemctl does depend on libsystemd-shared, so a copy of that will still be in every component. And libsystemd-shared itself pulls in a lot of stuff, and those libraries no doubt depend on further libraries:
linux-vdso.so.1 (0x00007ffe9e9d0000)
libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x00007fbc40540000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fbc404e9000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fbc404dd000)
libcrypt.so.2 => not found
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fbc4047a000)
libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007fbc40466000)
libseccomp.so.2 => /lib/x86_64-linux-gnu/libseccomp.so.2
(0x00007fbc40446000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbc3ff21000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbc3fd40000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbc40557000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1
(0x00007fbc40418000)
libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x00007fbc403e5000)
libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0
(0x00007fbc3fca6000)
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007fbc403dd000)Put it another way, what is the difference in a 'component' before and after this change, in size and amount of files?
I'm just struggling to justify this; it looks like a very niche need, driven by a custom, proprietary mechanism to install additional software into products. The change won't be useful to anyone else, while complicating systemd packaging further.
Alex
Quoted 124 lines · Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)
Component deliver something and it's content consist of:
binaries/libraries/scripts, etc. that delivered by this component (service) itself binaries/libraries, etc. on which component depends on
Technically content is per component subdirectory. Every component has its own isolated content.
If we have N components each require only systemd-systemctl it mean every component will store (on disk) whole systemd/libsystemd package files instead of systemctl binary.
Regards,
Oleksiy________________________________
From: Alexander Kanavin <[email protected]>
Sent: Tuesday, February 11, 2025 19:31
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Peter Kjellerstedt <[email protected]>; Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageThis still doesn’t make sense. Any target file is contained in one and only one package. Where is the duplication?
Alex
On Tue 11. Feb 2025 at 19.04, Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]> wrote:
I'm sorry, I confused you mentioned term sysroot. It's not about yocto - we just use the same term because it's very similar to how it works into yocto.
We got packages as a result of yocto build and use these artefacts (packages) on next stage to populate software components content. For some reason we can't use the same approach with hardlink to deduplicate components content.Regards,
Oleksiy________________________________
From: Peter Kjellerstedt <[email protected]>
Sent: Monday, February 10, 2025 22:05
To: [email protected] <[email protected]>; Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: RE: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageAdditionally, changing the packaging does not affect what is added to the sysroot.
//Peter
Quoted 77 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Alexander Kanavin via lists.openembedded.org
Sent: den 10 februari 2025 18:20
To: [email protected]
Cc: Ross Burton <[email protected]>; openembedded- [email protected]; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageThey're not actually copied. They're hard-linked from sysroots-components/. This is a cheap operation and it doesn't waste disk space.
Alex
Quoted 6 lines · Oleksiy Obitotskyy via lists.openembedded.org
Hi Alexander,
By 'deploying whole systemd' I mean next:
Every component copy and installs packages with libraries, utilities and
config files in component local sysroot, i.e. directory used to create final component image:
Quoted 6 lines
libsystemd0_255.4
libsystemd-shared_255.4
systemd_255.4So, on disk we have duplication of files for every component that depend
on the systemctl.
Quoted 1 line
In case of separate subpackage we have one root component depend on the
systemd and all other components will contain only systemd-systemctl package content.
Quoted 10 lines
Of course, I understand it's quite a specific scenario.
Regards,
Oleksiy________________________________
From: Alexander Kanavin <[email protected]>
Sent: Monday, February 10, 2025 13:03
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)Quoted 1 line
Cc Ross Burton <[email protected]>; openembedded-[email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Quoted 1 line
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to
separate subpackage
Quoted 6 lines
Quoted 2 lines · Oleksiy Obitotskyy via lists.openembedded.org
We have next situation:
- a lot of software components that depend on packages and deploy allpackages they depend on locally inside component.
Quoted 1 line
Quoted 1 line
- some components directly depend on systemctl only (e.g. this binary
used in scripts), so for every component we have to deploy whole systemd locally.
Quoted 1 line
Quoted 1 line
- finally, all/some of those components will be merged in some way and
will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.
Quoted 9 lines
I'm sorry, but this does not quite make sense. You need to more specifically describe what 'deploying whole systemd' means, and why is that problematic.
Alex
In practice getting rid of systemd and leaving only systemctl binary gives me approx. 20Mb disk space
3.0M libsystemd-shared 960K libsystemd 9.4M systemd 424K libnss-systemd
~5 Mb could be extra dependency libraries removed after systemd removal.
Regarding runtime dependencies - components will be merged on target and all dependencies will be resolved. All necessary libraries will be taken from one "base" component that will deliver whatever we need, like glibc, systemd, etc. We have only one "base" component (or more - it depends how many different libraries/versions we need to support).
Regards,
Oleksiy
________________________________
From: Alexander Kanavin <[email protected]>
Sent: Wednesday, February 12, 2025 11:16
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Peter Kjellerstedt <[email protected]>; Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackage
But systemctl does depend on libsystemd-shared, so a copy of that will still be in every component. And libsystemd-shared itself pulls in a lot of stuff, and those libraries no doubt depend on further libraries:
linux-vdso.so.1 (0x00007ffe9e9d0000)
libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x00007fbc40540000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fbc404e9000)
libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fbc404dd000)
libcrypt.so.2 => not found
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fbc4047a000)
libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007fbc40466000)
libseccomp.so.2 => /lib/x86_64-linux-gnu/libseccomp.so.2
(0x00007fbc40446000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbc3ff21000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbc3fd40000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbc40557000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1
(0x00007fbc40418000)
libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x00007fbc403e5000)
libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0
(0x00007fbc3fca6000)
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007fbc403dd000)Put it another way, what is the difference in a 'component' before and after this change, in size and amount of files?
I'm just struggling to justify this; it looks like a very niche need, driven by a custom, proprietary mechanism to install additional software into products. The change won't be useful to anyone else, while complicating systemd packaging further.
Alex
Quoted 124 lines · Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)
Component deliver something and it's content consist of:
binaries/libraries/scripts, etc. that delivered by this component (service) itself binaries/libraries, etc. on which component depends on
Technically content is per component subdirectory. Every component has its own isolated content.
If we have N components each require only systemd-systemctl it mean every component will store (on disk) whole systemd/libsystemd package files instead of systemctl binary.
Regards,
Oleksiy________________________________
From: Alexander Kanavin <[email protected]>
Sent: Tuesday, February 11, 2025 19:31
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Peter Kjellerstedt <[email protected]>; Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageThis still doesn’t make sense. Any target file is contained in one and only one package. Where is the duplication?
Alex
On Tue 11. Feb 2025 at 19.04, Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]> wrote:
I'm sorry, I confused you mentioned term sysroot. It's not about yocto - we just use the same term because it's very similar to how it works into yocto.
We got packages as a result of yocto build and use these artefacts (packages) on next stage to populate software components content. For some reason we can't use the same approach with hardlink to deduplicate components content.Regards,
Oleksiy________________________________
From: Peter Kjellerstedt <[email protected]>
Sent: Monday, February 10, 2025 22:05
To: [email protected] <[email protected]>; Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: RE: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageAdditionally, changing the packaging does not affect what is added to the sysroot.
//Peter
Quoted 77 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Alexander Kanavin via lists.openembedded.org
Sent: den 10 februari 2025 18:20
To: [email protected]
Cc: Ross Burton <[email protected]>; openembedded- [email protected]; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackageThey're not actually copied. They're hard-linked from sysroots-components/. This is a cheap operation and it doesn't waste disk space.
Alex
Quoted 6 lines · Oleksiy Obitotskyy via lists.openembedded.org
Hi Alexander,
By 'deploying whole systemd' I mean next:
Every component copy and installs packages with libraries, utilities and
config files in component local sysroot, i.e. directory used to create final component image:
Quoted 6 lines
libsystemd0_255.4
libsystemd-shared_255.4
systemd_255.4So, on disk we have duplication of files for every component that depend
on the systemctl.
Quoted 1 line
In case of separate subpackage we have one root component depend on the
systemd and all other components will contain only systemd-systemctl package content.
Quoted 10 lines
Of course, I understand it's quite a specific scenario.
Regards,
Oleksiy________________________________
From: Alexander Kanavin <[email protected]>
Sent: Monday, February 10, 2025 13:03
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)Quoted 1 line
Cc Ross Burton <[email protected]>; openembedded-[email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Quoted 1 line
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to
separate subpackage
Quoted 6 lines
Quoted 2 lines · Oleksiy Obitotskyy via lists.openembedded.org
We have next situation:
- a lot of software components that depend on packages and deploy allpackages they depend on locally inside component.
Quoted 1 line
Quoted 1 line
- some components directly depend on systemctl only (e.g. this binary
used in scripts), so for every component we have to deploy whole systemd locally.
Quoted 1 line
Quoted 1 line
- finally, all/some of those components will be merged in some way and
will use systemd/libsystemd, but until then it will be nice to get rid of such duplication.
Quoted 9 lines
I'm sorry, but this does not quite make sense. You need to more specifically describe what 'deploying whole systemd' means, and why is that problematic.
Alex
Quoted 1 line · Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)
In practice getting rid of systemd and leaving only systemctl binary
gives me approx. 20Mb disk space
Quoted 7 lines
3.0M libsystemd-shared 960K libsystemd 9.4M systemd 424K libnss-systemd~5 Mb could be extra dependency libraries removed after systemd removal.
libsystemd-shared shouldn't be there, as it is required by systemctl. So the savings are less.
Is it trying to save space on target device, or trying to save space on the build host? You really do need to describe your process in more detail.
There's also a standard mechanism for adding software to targets (or making the initial target rootfilesystems): packages and package manager. You need to explain why that is not being used.
Quoted 2 lines
Regarding runtime dependencies - components will be merged on target and all dependencies will be resolved. All necessary libraries will be taken from one "base" component that will deliver whatever we need, like glibc, systemd, etc. We have only one "base" component (or more - it depends how many different libraries/versions we need to support).
I guess what I'm trying to object is splitting things into smaller packages when the full set must be installed anyway. Accepting this would open the door for further such tweaks, which just make things more complex, without actual benefit for standard, commonly accepted ways to handle target installation.
Alex
Quoted 3 lines
Is it trying to save space on target device, or trying to save space on the build host? You really do need to describe your process in more detail.
It's attempt to save space on build host.
Quoted 6 lines
I guess what I'm trying to object is splitting things into smaller
packages when the full set must be installed anyway. Accepting this would open the door for further such tweaks, which just make things more complex, without actual benefit for standard, commonly accepted ways to handle target installation.
I agree with this.
Regards,
Oleksiy
________________________________
From: Alexander Kanavin <[email protected]>
Sent: Wednesday, February 12, 2025 16:19
To: Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco) <[email protected]>
Cc: Peter Kjellerstedt <[email protected]>; Ross Burton <[email protected]>; [email protected] <[email protected]>; Ruslan Bilovol (rbilovol) <[email protected]>
Subject: Re: [OE-core] [PATCH] systemd: move systemctl utility to separate subpackage
Quoted 1 line · Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)
In practice getting rid of systemd and leaving only systemctl binary
gives me approx. 20Mb disk space
Quoted 7 lines
3.0M libsystemd-shared 960K libsystemd 9.4M systemd 424K libnss-systemd~5 Mb could be extra dependency libraries removed after systemd removal.
libsystemd-shared shouldn't be there, as it is required by systemctl. So the savings are less.
Is it trying to save space on target device, or trying to save space on the build host? You really do need to describe your process in more detail.
There's also a standard mechanism for adding software to targets (or making the initial target rootfilesystems): packages and package manager. You need to explain why that is not being used.
Quoted 2 lines
Regarding runtime dependencies - components will be merged on target and all dependencies will be resolved. All necessary libraries will be taken from one "base" component that will deliver whatever we need, like glibc, systemd, etc. We have only one "base" component (or more - it depends how many different libraries/versions we need to support).
I guess what I'm trying to object is splitting things into smaller packages when the full set must be installed anyway. Accepting this would open the door for further such tweaks, which just make things more complex, without actual benefit for standard, commonly accepted ways to handle target installation.
Alex
Quoted 6 lines · Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)
Quoted 4 lines
Is it trying to save space on target device, or trying to save space on the build host? You really do need to describe your process in more detail.
It's attempt to save space on build host.
I wonder if you can special-case this in your scripts, e.g. remove the bulk of systemd, except systemctl and libsystemd-shared, after the 'sysroot' has been made?
Alex
Quoted 8 lines · Alexander Kanavin
Quoted 6 lines · Oleksiy Obitotskyy -X (oobitots - GLOBALLOGIC INC at Cisco)
Quoted 4 lines
Is it trying to save space on target device, or trying to save space on the build host? You really do need to describe your process in more detail.
It's attempt to save space on build host.
Oleksii wasn't clear enough here but the purpose of splitting bigger packages into smaller subpackages is to reduce image size.
Quoted 4 lines
I wonder if you can special-case this in your scripts, e.g. remove the bulk of systemd, except systemctl and libsystemd-shared, after the 'sysroot' has been made?
We used this approach (manually picking parts of package to reduce image size) previously, but found it too errorprone, as final user may not know what the real dependency are inside of package. To eliminate this issue, we decided to split some big package into subpackages to have better control on what is getting delivered to the final image, and also keep properly maintained dependencies inside of subpackages and between subpackages.
Thanks,
Ruslan