* [PATCHv2 0/5] systemd split networkd package
@ 2024-12-12 15:55 Adrian Freihofer
2024-12-12 15:55 ` [PATCHv2 1/5] busybox: add klogd service to FILES Adrian Freihofer
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Adrian Freihofer @ 2024-12-12 15:55 UTC (permalink / raw)
To: openembedded-core; +Cc: Adrian Freihofer
v2 fixes the build warning
First of all, this patch series fixes a bug in systemd.bbclass that
forces service files with an Also= relationship to be in the same
package. This may often be the case, but as long as the RDEPENDS
between the packages are set correctly, it is no problem to distribute
the service files over several packages.
If service files referenced with Also= are no longer automatically added
to the list of FILES, build errors caused by unpacked files are
expected. A bitbake world has shown that there are only two recipes in
oe-core that use automatic packing: busybox and dropbear. There are 2
patches that fix this.
Also= relation are probably most often used for sockets. Consequently
the systemd.bbclass should also allow to split socket files into
separate packages. However, that's proably practically not used and
would cause tons of packaging errors. Therefore the automatic packaging
feature for sockets is not changed.
The latest patch splits systemd-networkd into its own package. This adds
a little extra complexity, but splitting systemd into packages is a good
step towards making Yocto more usable in binary form.
Adrian Freihofer (5):
busybox: add klogd service to FILES
dropbear: add dropbearkey.service to FILES
systemd.bbclass: refactor adding files
systemd.bbclass: do not automatically add Also services
systemd: split networkd into its own package
meta/classes-recipe/systemd.bbclass | 28 ++++++++-----------
meta/recipes-core/busybox/busybox.inc | 9 +++++-
.../recipes-core/dropbear/dropbear_2024.86.bb | 2 ++
meta/recipes-core/systemd/systemd_256.8.bb | 28 +++++++++++++++++--
4 files changed, 47 insertions(+), 20 deletions(-)
--
2.47.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCHv2 1/5] busybox: add klogd service to FILES 2024-12-12 15:55 [PATCHv2 0/5] systemd split networkd package Adrian Freihofer @ 2024-12-12 15:55 ` Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 2/5] dropbear: add dropbearkey.service " Adrian Freihofer ` (4 subsequent siblings) 5 siblings, 0 replies; 13+ messages in thread From: Adrian Freihofer @ 2024-12-12 15:55 UTC (permalink / raw) To: openembedded-core; +Cc: Adrian Freihofer From: Adrian Freihofer <adrian.freihofer@siemens.com> busybox syslog.service file contains: Also=busybox-klogd.service That's why busybox-klog.service got automatically added to FILES:busybox-syslog. Since this incorrect auto adding feature gets dropped from systemd.bbclass this needs to be added explicitly. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> --- meta/recipes-core/busybox/busybox.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 67a9111e5bd..f778cff0f4a 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -24,7 +24,14 @@ EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${ PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" FILES:${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" -FILES:${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_system_unitdir}/syslog.service ${sysconfdir}/default/busybox-syslog" +FILES:${PN}-syslog = "\ + ${sysconfdir}/init.d/syslog* \ + ${sysconfdir}/syslog-startup.conf* \ + ${sysconfdir}/syslog.conf* \ + ${systemd_system_unitdir}/syslog.service \ + ${systemd_system_unitdir}/busybox-klogd.service \ + ${sysconfdir}/default/busybox-syslog \ +" FILES:${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf ${sysconfdir}/mdev/*" FILES:${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" FILES:${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc" -- 2.47.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv2 2/5] dropbear: add dropbearkey.service to FILES 2024-12-12 15:55 [PATCHv2 0/5] systemd split networkd package Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 1/5] busybox: add klogd service to FILES Adrian Freihofer @ 2024-12-12 15:55 ` Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 3/5] systemd.bbclass: refactor adding files Adrian Freihofer ` (3 subsequent siblings) 5 siblings, 0 replies; 13+ messages in thread From: Adrian Freihofer @ 2024-12-12 15:55 UTC (permalink / raw) To: openembedded-core; +Cc: Adrian Freihofer From: Adrian Freihofer <adrian.freihofer@siemens.com> dropbear.socket file contains: Also=dropbearkey.service That's why dropbearkey.service got automatically added to FILES. Since this incorrect auto adding feature gets dropped from systemd.bbclass this needs to be added explicitly. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> --- meta/recipes-core/dropbear/dropbear_2024.86.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-core/dropbear/dropbear_2024.86.bb b/meta/recipes-core/dropbear/dropbear_2024.86.bb index e3f4d17896c..be246a0ccd5 100644 --- a/meta/recipes-core/dropbear/dropbear_2024.86.bb +++ b/meta/recipes-core/dropbear/dropbear_2024.86.bb @@ -129,3 +129,5 @@ pkg_postrm:${PN} () { } CONFFILES:${PN} = "${sysconfdir}/default/dropbear" + +FILES:${PN} += "${systemd_system_unitdir}/dropbearkey.service" -- 2.47.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv2 3/5] systemd.bbclass: refactor adding files 2024-12-12 15:55 [PATCHv2 0/5] systemd split networkd package Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 1/5] busybox: add klogd service to FILES Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 2/5] dropbear: add dropbearkey.service " Adrian Freihofer @ 2024-12-12 15:55 ` Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 4/5] systemd.bbclass: do not automatically add Also services Adrian Freihofer ` (2 subsequent siblings) 5 siblings, 0 replies; 13+ messages in thread From: Adrian Freihofer @ 2024-12-12 15:55 UTC (permalink / raw) To: openembedded-core; +Cc: Adrian Freihofer From: Adrian Freihofer <adrian.freihofer@siemens.com> The keys variable was intended as an array of keys. But it looks like this has not been used for more than 10 years now. Adding files automatically to packages needs probably anyway very specific code rather than a generic loop. Lets simplify this a bit. Using python code should also not be slower for these usually small files. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> --- meta/classes-recipe/systemd.bbclass | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/meta/classes-recipe/systemd.bbclass b/meta/classes-recipe/systemd.bbclass index 7324af8555d..be77da48125 100644 --- a/meta/classes-recipe/systemd.bbclass +++ b/meta/classes-recipe/systemd.bbclass @@ -124,29 +124,26 @@ python systemd_populate_packages() { return appended # Add systemd files to FILES:*-systemd, parse for Also= and follow recursive - def systemd_add_files_and_parse(pkg_systemd, path, service, keys): + def systemd_add_files_and_parse(pkg_systemd, path, service): # avoid infinite recursion if systemd_append_file(pkg_systemd, oe.path.join(path, service)): fullpath = oe.path.join(d.getVar("D"), path, service) if service.find('.service') != -1: # for *.service add *@.service service_base = service.replace('.service', '') - systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service', keys) + systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') if service.find('.socket') != -1: # for *.socket add *.service and *@.service service_base = service.replace('.socket', '') - systemd_add_files_and_parse(pkg_systemd, path, service_base + '.service', keys) - systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service', keys) - for key in keys.split(): - # recurse all dependencies found in keys ('Also';'Conflicts';..) and add to files - cmd = "grep %s %s | sed 's,%s=,,g' | tr ',' '\\n'" % (key, shlex.quote(fullpath), key) - pipe = os.popen(cmd, 'r') - line = pipe.readline() - while line: - line = line.replace('\n', '') - systemd_add_files_and_parse(pkg_systemd, path, line, keys) - line = pipe.readline() - pipe.close() + systemd_add_files_and_parse(pkg_systemd, path, service_base + '.service') + systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') + # Add all units which have an Also= referring a unit in this package to this package as well. + with open(fullpath, 'r') as unit_f: + for line in unit_f: + if line.startswith('Also'): + also_unit = line.split('=', 1)[1].strip() + bb.warn("also: %s" % also_unit) + systemd_add_files_and_parse(pkg_systemd, path, also_unit) # Check service-files and call systemd_add_files_and_parse for each entry def systemd_check_services(): @@ -155,7 +152,6 @@ python systemd_populate_packages() { searchpaths.append(d.getVar("systemd_user_unitdir")) systemd_packages = d.getVar('SYSTEMD_PACKAGES') - keys = 'Also' # scan for all in SYSTEMD_SERVICE[] for pkg_systemd in systemd_packages.split(): for service in get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd).split(): @@ -179,7 +175,7 @@ python systemd_populate_packages() { break if path_found != '': - systemd_add_files_and_parse(pkg_systemd, path_found, service, keys) + systemd_add_files_and_parse(pkg_systemd, path_found, service) else: bb.fatal("Didn't find service unit '{0}', specified in SYSTEMD_SERVICE:{1}. {2}".format( service, pkg_systemd, "Also looked for service unit '{0}'.".format(base) if base is not None else "")) -- 2.47.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv2 4/5] systemd.bbclass: do not automatically add Also services 2024-12-12 15:55 [PATCHv2 0/5] systemd split networkd package Adrian Freihofer ` (2 preceding siblings ...) 2024-12-12 15:55 ` [PATCHv2 3/5] systemd.bbclass: refactor adding files Adrian Freihofer @ 2024-12-12 15:55 ` Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 5/5] systemd: split networkd into its own package Adrian Freihofer 2024-12-13 11:18 ` [OE-core] [PATCHv2 0/5] systemd split networkd package Richard Purdie 5 siblings, 0 replies; 13+ messages in thread From: Adrian Freihofer @ 2024-12-12 15:55 UTC (permalink / raw) To: openembedded-core; +Cc: Adrian Freihofer From: Adrian Freihofer <adrian.freihofer@siemens.com> Starting a systemd service “Also” does not mean that both services must be in the same package. However, the systemd.bbclass enforces this. Example: a.service: [Install] Also=b.service If a.service is packed in package A, b.service is automatically packed into package A as well. This happens even if b.service is explicitly added to package B using FILES and SYSTEMD_SERVICE variables. The automatic packing of socket files with the corresponding service files is probably a widely used feature of systemd.bbclass. This bahavior does not change. Adding regular service files to a package just because it is another service in the same package that "Also" uses the service is a bug that this commit fixes. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> --- meta/classes-recipe/systemd.bbclass | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/classes-recipe/systemd.bbclass b/meta/classes-recipe/systemd.bbclass index be77da48125..4b4470b7b34 100644 --- a/meta/classes-recipe/systemd.bbclass +++ b/meta/classes-recipe/systemd.bbclass @@ -132,18 +132,18 @@ python systemd_populate_packages() { # for *.service add *@.service service_base = service.replace('.service', '') systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') + # Add the socket unit which is referred by the Also= in this service file to the same package. + with open(fullpath, 'r') as unit_f: + for line in unit_f: + if line.startswith('Also'): + also_unit = line.split('=', 1)[1].strip() + if also_unit.find('.socket') != -1: + systemd_add_files_and_parse(pkg_systemd, path, also_unit) if service.find('.socket') != -1: # for *.socket add *.service and *@.service service_base = service.replace('.socket', '') systemd_add_files_and_parse(pkg_systemd, path, service_base + '.service') systemd_add_files_and_parse(pkg_systemd, path, service_base + '@.service') - # Add all units which have an Also= referring a unit in this package to this package as well. - with open(fullpath, 'r') as unit_f: - for line in unit_f: - if line.startswith('Also'): - also_unit = line.split('=', 1)[1].strip() - bb.warn("also: %s" % also_unit) - systemd_add_files_and_parse(pkg_systemd, path, also_unit) # Check service-files and call systemd_add_files_and_parse for each entry def systemd_check_services(): -- 2.47.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv2 5/5] systemd: split networkd into its own package 2024-12-12 15:55 [PATCHv2 0/5] systemd split networkd package Adrian Freihofer ` (3 preceding siblings ...) 2024-12-12 15:55 ` [PATCHv2 4/5] systemd.bbclass: do not automatically add Also services Adrian Freihofer @ 2024-12-12 15:55 ` Adrian Freihofer 2024-12-13 13:53 ` [OE-core] " Bruce Ashfield 2024-12-13 11:18 ` [OE-core] [PATCHv2 0/5] systemd split networkd package Richard Purdie 5 siblings, 1 reply; 13+ messages in thread From: Adrian Freihofer @ 2024-12-12 15:55 UTC (permalink / raw) To: openembedded-core; +Cc: Adrian Freihofer From: Adrian Freihofer <adrian.freihofer@siemens.com> Support of images with different network management implementations without having to recompile systemd and other components. Fedora does this as well since systemd version 246.6-2: https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec#_578 This proves that it is technically possible and officially supported by systemd. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> --- meta/recipes-core/systemd/systemd_256.8.bb | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/systemd/systemd_256.8.bb b/meta/recipes-core/systemd/systemd_256.8.bb index c1915d7e941..0710377d32d 100644 --- a/meta/recipes-core/systemd/systemd_256.8.bb +++ b/meta/recipes-core/systemd/systemd_256.8.bb @@ -412,6 +412,7 @@ PACKAGE_BEFORE_PN = "\ ${PN}-journal-remote \ ${PN}-kernel-install \ ${PN}-mime \ + ${PN}-networkd \ ${PN}-rpm-macros \ ${PN}-udev-rules \ ${PN}-vconsole-setup \ @@ -440,6 +441,7 @@ SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfm ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)} \ " SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" @@ -448,12 +450,13 @@ USERADD_PACKAGES = "${PN} \ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)} \ " GROUPADD_PARAM:${PN} = "-r systemd-journal;" GROUPADD_PARAM:udev = "-r render" GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" -USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}" +USERADD_PARAM:${PN}-networkd = "--system -d / -M --shell /sbin/nologin systemd-network" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${datadir}/polkit-1 polkitd;', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}" @@ -620,6 +623,27 @@ FILES:${PN}-extra-utils = "\ FILES:${PN}-mime = "${MIMEDIR}" RRECOMMENDS:${PN} += "${PN}-mime" +FILES:${PN}-networkd = "\ + ${bindir}/networkctl \ + ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \ + ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ + ${datadir}/polkit-1/actions/org.freedesktop.network1.policy \ + ${nonarch_libdir}/sysusers.d/systemd-network.conf \ + ${nonarch_libdir}/tmpfiles.d/systemd-network.conf \ + ${sysconfdir}/systemd/networkd.conf \ + ${systemd_system_unitdir}/systemd-networkd* \ + ${systemd_unitdir}/network/*.network \ + ${systemd_unitdir}/network/*.network.example \ + ${systemd_unitdir}/networkd.conf \ + ${systemd_unitdir}/systemd-networkd* \ +" +# systemd-networkd-persistent-storage.service BindsTo=systemd-networkd.service +# systemd-networkd.service has Also=systemd-networkd-wait-online.service +SYSTEMD_SERVICE:${PN}-networkd = "systemd-networkd.service" +CONFFILES:${PN}-networkd = "${sysconfdir}/systemd/networkd.conf" +RDEPENDS:${PN}-networkd += "${PN}" +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)}" + FILES:${PN}-udev-rules = "\ ${nonarch_libdir}/udev/rules.d/70-uaccess.rules \ ${nonarch_libdir}/udev/rules.d/71-seat.rules \ @@ -630,7 +654,6 @@ FILES:${PN}-udev-rules = "\ CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ ${sysconfdir}/systemd/journald.conf \ ${sysconfdir}/systemd/logind.conf \ - ${sysconfdir}/systemd/networkd.conf \ ${sysconfdir}/systemd/pstore.conf \ ${sysconfdir}/systemd/resolved.conf \ ${sysconfdir}/systemd/sleep.conf \ @@ -698,7 +721,6 @@ FILES:${PN} = " ${base_bindir}/* \ ${nonarch_libdir}/modprobe.d/README \ ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', d)} \ -- 2.47.0 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [OE-core] [PATCHv2 5/5] systemd: split networkd into its own package 2024-12-12 15:55 ` [PATCHv2 5/5] systemd: split networkd into its own package Adrian Freihofer @ 2024-12-13 13:53 ` Bruce Ashfield 2024-12-13 21:48 ` Adrian Freihofer 0 siblings, 1 reply; 13+ messages in thread From: Bruce Ashfield @ 2024-12-13 13:53 UTC (permalink / raw) To: adrian.freihofer; +Cc: openembedded-core, Adrian Freihofer [-- Attachment #1: Type: text/plain, Size: 6909 bytes --] On Thu, Dec 12, 2024 at 11:44 AM Adrian Freihofer via lists.openembedded.org <adrian.freihofer=gmail.com@lists.openembedded.org> wrote: > From: Adrian Freihofer <adrian.freihofer@siemens.com> > > Support of images with different network management implementations > without having to recompile systemd and other components. > > Fedora does this as well since systemd version 246.6-2: > https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec#_578 > This proves that it is technically possible and officially supported by > systemd. > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > --- > meta/recipes-core/systemd/systemd_256.8.bb | 28 +++++++++++++++++++--- > 1 file changed, 25 insertions(+), 3 deletions(-) > > diff --git a/meta/recipes-core/systemd/systemd_256.8.bb > b/meta/recipes-core/systemd/systemd_256.8.bb > index c1915d7e941..0710377d32d 100644 > --- a/meta/recipes-core/systemd/systemd_256.8.bb > +++ b/meta/recipes-core/systemd/systemd_256.8.bb > @@ -412,6 +412,7 @@ PACKAGE_BEFORE_PN = "\ > ${PN}-journal-remote \ > ${PN}-kernel-install \ > ${PN}-mime \ > + ${PN}-networkd \ > ${PN}-rpm-macros \ > ${PN}-udev-rules \ > ${PN}-vconsole-setup \ > @@ -440,6 +441,7 @@ SYSTEMD_PACKAGES = > "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfm > ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', > '${PN}-journal-gatewayd', '', d)} \ > ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', > '${PN}-journal-remote', '', d)} \ > ${@bb.utils.contains('PACKAGECONFIG', > 'journal-upload', '${PN}-journal-upload', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', > '${PN}-networkd', '', d)} \ > " > SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" > > @@ -448,12 +450,13 @@ USERADD_PACKAGES = "${PN} \ > ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', > '${PN}-journal-gatewayd', '', d)} \ > ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', > '${PN}-journal-remote', '', d)} \ > ${@bb.utils.contains('PACKAGECONFIG', > 'journal-upload', '${PN}-journal-upload', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', > '${PN}-networkd', '', d)} \ > " > Possibly an already asked and answered question (I scanned quickly, but I didn't see it). Is there any reason why networkd shouldn't be in the default PACKAGECONFIG ? This is a change of behaviour, that should be opt-in, not opt-out. Bruce > GROUPADD_PARAM:${PN} = "-r systemd-journal;" > GROUPADD_PARAM:udev = "-r render" > GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', > 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" > USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', > '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" > -USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', > '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}" > +USERADD_PARAM:${PN}-networkd = "--system -d / -M --shell /sbin/nologin > systemd-network" > USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', > '--system --no-create-home --user-group --home-dir ${datadir}/polkit-1 > polkitd;', '', d)}" > USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', > '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" > USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', > 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', > '', d)}" > @@ -620,6 +623,27 @@ FILES:${PN}-extra-utils = "\ > FILES:${PN}-mime = "${MIMEDIR}" > RRECOMMENDS:${PN} += "${PN}-mime" > > +FILES:${PN}-networkd = "\ > + ${bindir}/networkctl \ > + ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \ > + ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ > + ${datadir}/polkit-1/actions/org.freedesktop.network1.policy \ > + ${nonarch_libdir}/sysusers.d/systemd-network.conf \ > + ${nonarch_libdir}/tmpfiles.d/systemd-network.conf \ > + ${sysconfdir}/systemd/networkd.conf \ > + ${systemd_system_unitdir}/systemd-networkd* \ > + ${systemd_unitdir}/network/*.network \ > + ${systemd_unitdir}/network/*.network.example \ > + ${systemd_unitdir}/networkd.conf \ > + ${systemd_unitdir}/systemd-networkd* \ > +" > +# systemd-networkd-persistent-storage.service > BindsTo=systemd-networkd.service > +# systemd-networkd.service has Also=systemd-networkd-wait-online.service > +SYSTEMD_SERVICE:${PN}-networkd = "systemd-networkd.service" > +CONFFILES:${PN}-networkd = "${sysconfdir}/systemd/networkd.conf" > +RDEPENDS:${PN}-networkd += "${PN}" > +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', > '${PN}-networkd', '', d)}" > + > FILES:${PN}-udev-rules = "\ > ${nonarch_libdir}/udev/rules.d/70-uaccess.rules \ > ${nonarch_libdir}/udev/rules.d/71-seat.rules \ > @@ -630,7 +654,6 @@ FILES:${PN}-udev-rules = "\ > CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ > ${sysconfdir}/systemd/journald.conf \ > ${sysconfdir}/systemd/logind.conf \ > - ${sysconfdir}/systemd/networkd.conf \ > ${sysconfdir}/systemd/pstore.conf \ > ${sysconfdir}/systemd/resolved.conf \ > ${sysconfdir}/systemd/sleep.conf \ > @@ -698,7 +721,6 @@ FILES:${PN} = " ${base_bindir}/* \ > ${nonarch_libdir}/modprobe.d/README \ > ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf > \ > ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ > - ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ > ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ > ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ > ${@bb.utils.contains('PACKAGECONFIG', > 'polkit_hostnamed_fallback', > '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', > d)} \ > -- > 2.47.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#208658): > https://lists.openembedded.org/g/openembedded-core/message/208658 > Mute This Topic: https://lists.openembedded.org/mt/110082903/1050810 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ > bruce.ashfield@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II [-- Attachment #2: Type: text/html, Size: 10184 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core] [PATCHv2 5/5] systemd: split networkd into its own package 2024-12-13 13:53 ` [OE-core] " Bruce Ashfield @ 2024-12-13 21:48 ` Adrian Freihofer 2024-12-16 4:41 ` Bruce Ashfield 0 siblings, 1 reply; 13+ messages in thread From: Adrian Freihofer @ 2024-12-13 21:48 UTC (permalink / raw) To: Bruce Ashfield; +Cc: openembedded-core, Adrian Freihofer [-- Attachment #1: Type: text/plain, Size: 7431 bytes --] Am Fr., 13. Dez. 2024 um 14:54 Uhr schrieb Bruce Ashfield < bruce.ashfield@gmail.com>: > > > On Thu, Dec 12, 2024 at 11:44 AM Adrian Freihofer via > lists.openembedded.org <adrian.freihofer=gmail.com@lists.openembedded.org> > wrote: > >> From: Adrian Freihofer <adrian.freihofer@siemens.com> >> >> Support of images with different network management implementations >> without having to recompile systemd and other components. >> >> Fedora does this as well since systemd version 246.6-2: >> >> https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec#_578 >> This proves that it is technically possible and officially supported by >> systemd. >> >> Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> >> --- >> meta/recipes-core/systemd/systemd_256.8.bb | 28 +++++++++++++++++++--- >> 1 file changed, 25 insertions(+), 3 deletions(-) >> >> diff --git a/meta/recipes-core/systemd/systemd_256.8.bb >> b/meta/recipes-core/systemd/systemd_256.8.bb >> index c1915d7e941..0710377d32d 100644 >> --- a/meta/recipes-core/systemd/systemd_256.8.bb >> +++ b/meta/recipes-core/systemd/systemd_256.8.bb >> @@ -412,6 +412,7 @@ PACKAGE_BEFORE_PN = "\ >> ${PN}-journal-remote \ >> ${PN}-kernel-install \ >> ${PN}-mime \ >> + ${PN}-networkd \ >> ${PN}-rpm-macros \ >> ${PN}-udev-rules \ >> ${PN}-vconsole-setup \ >> @@ -440,6 +441,7 @@ SYSTEMD_PACKAGES = >> "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfm >> ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', >> '${PN}-journal-gatewayd', '', d)} \ >> ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', >> '${PN}-journal-remote', '', d)} \ >> ${@bb.utils.contains('PACKAGECONFIG', >> 'journal-upload', '${PN}-journal-upload', '', d)} \ >> + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', >> '${PN}-networkd', '', d)} \ >> " >> SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" >> >> @@ -448,12 +450,13 @@ USERADD_PACKAGES = "${PN} \ >> ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', >> '${PN}-journal-gatewayd', '', d)} \ >> ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', >> '${PN}-journal-remote', '', d)} \ >> ${@bb.utils.contains('PACKAGECONFIG', >> 'journal-upload', '${PN}-journal-upload', '', d)} \ >> + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', >> '${PN}-networkd', '', d)} \ >> " >> > > Possibly an already asked and answered question (I scanned quickly, but I > didn't see it). > > Is there any reason why networkd shouldn't be in the default PACKAGECONFIG > ? This is a change of behaviour, that should be opt-in, not opt-out. > I'm not sure what you mean. networkd was and remains part of the default PACKAGECONFIG. My intention is not to change the default behavior. Could you give me a hint where this is mistakenly happening anyway in this case? Adrian > > Bruce > > > >> GROUPADD_PARAM:${PN} = "-r systemd-journal;" >> GROUPADD_PARAM:udev = "-r render" >> GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >> 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" >> USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >> 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', >> d)}" >> -USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >> 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', >> d)}" >> +USERADD_PARAM:${PN}-networkd = "--system -d / -M --shell /sbin/nologin >> systemd-network" >> USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', >> '--system --no-create-home --user-group --home-dir ${datadir}/polkit-1 >> polkitd;', '', d)}" >> USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >> 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', >> d)}" >> USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >> 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', >> '', d)}" >> @@ -620,6 +623,27 @@ FILES:${PN}-extra-utils = "\ >> FILES:${PN}-mime = "${MIMEDIR}" >> RRECOMMENDS:${PN} += "${PN}-mime" >> >> +FILES:${PN}-networkd = "\ >> + ${bindir}/networkctl \ >> + ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \ >> + ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ >> + ${datadir}/polkit-1/actions/org.freedesktop.network1.policy \ >> + ${nonarch_libdir}/sysusers.d/systemd-network.conf \ >> + ${nonarch_libdir}/tmpfiles.d/systemd-network.conf \ >> + ${sysconfdir}/systemd/networkd.conf \ >> + ${systemd_system_unitdir}/systemd-networkd* \ >> + ${systemd_unitdir}/network/*.network \ >> + ${systemd_unitdir}/network/*.network.example \ >> + ${systemd_unitdir}/networkd.conf \ >> + ${systemd_unitdir}/systemd-networkd* \ >> +" >> +# systemd-networkd-persistent-storage.service >> BindsTo=systemd-networkd.service >> +# systemd-networkd.service has Also=systemd-networkd-wait-online.service >> +SYSTEMD_SERVICE:${PN}-networkd = "systemd-networkd.service" >> +CONFFILES:${PN}-networkd = "${sysconfdir}/systemd/networkd.conf" >> +RDEPENDS:${PN}-networkd += "${PN}" >> +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', >> '${PN}-networkd', '', d)}" >> + >> FILES:${PN}-udev-rules = "\ >> ${nonarch_libdir}/udev/rules.d/70-uaccess.rules \ >> ${nonarch_libdir}/udev/rules.d/71-seat.rules \ >> @@ -630,7 +654,6 @@ FILES:${PN}-udev-rules = "\ >> CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ >> ${sysconfdir}/systemd/journald.conf \ >> ${sysconfdir}/systemd/logind.conf \ >> - ${sysconfdir}/systemd/networkd.conf \ >> ${sysconfdir}/systemd/pstore.conf \ >> ${sysconfdir}/systemd/resolved.conf \ >> ${sysconfdir}/systemd/sleep.conf \ >> @@ -698,7 +721,6 @@ FILES:${PN} = " ${base_bindir}/* \ >> ${nonarch_libdir}/modprobe.d/README \ >> >> ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ >> ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ >> - ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf >> \ >> ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf >> \ >> ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf >> \ >> ${@bb.utils.contains('PACKAGECONFIG', >> 'polkit_hostnamed_fallback', >> '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', >> d)} \ >> -- >> 2.47.0 >> >> >> -=-=-=-=-=-=-=-=-=-=-=- >> Links: You receive all messages sent to this group. >> View/Reply Online (#208658): >> https://lists.openembedded.org/g/openembedded-core/message/208658 >> Mute This Topic: https://lists.openembedded.org/mt/110082903/1050810 >> Group Owner: openembedded-core+owner@lists.openembedded.org >> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ >> bruce.ashfield@gmail.com] >> -=-=-=-=-=-=-=-=-=-=-=- >> >> > > -- > - Thou shalt not follow the NULL pointer, for chaos and madness await thee > at its end > - "Use the force Harry" - Gandalf, Star Trek II > > [-- Attachment #2: Type: text/html, Size: 11051 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core] [PATCHv2 5/5] systemd: split networkd into its own package 2024-12-13 21:48 ` Adrian Freihofer @ 2024-12-16 4:41 ` Bruce Ashfield 2024-12-16 16:08 ` Freihofer, Adrian 0 siblings, 1 reply; 13+ messages in thread From: Bruce Ashfield @ 2024-12-16 4:41 UTC (permalink / raw) To: Adrian Freihofer; +Cc: openembedded-core, Adrian Freihofer [-- Attachment #1: Type: text/plain, Size: 8662 bytes --] On Fri, Dec 13, 2024 at 4:48 PM Adrian Freihofer <adrian.freihofer@gmail.com> wrote: > Am Fr., 13. Dez. 2024 um 14:54 Uhr schrieb Bruce Ashfield < > bruce.ashfield@gmail.com>: > >> >> >> On Thu, Dec 12, 2024 at 11:44 AM Adrian Freihofer via >> lists.openembedded.org <adrian.freihofer=gmail.com@lists.openembedded.org> >> wrote: >> >>> From: Adrian Freihofer <adrian.freihofer@siemens.com> >>> >>> Support of images with different network management implementations >>> without having to recompile systemd and other components. >>> >>> Fedora does this as well since systemd version 246.6-2: >>> >>> https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec#_578 >>> This proves that it is technically possible and officially supported by >>> systemd. >>> >>> Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> >>> --- >>> meta/recipes-core/systemd/systemd_256.8.bb | 28 +++++++++++++++++++--- >>> 1 file changed, 25 insertions(+), 3 deletions(-) >>> >>> diff --git a/meta/recipes-core/systemd/systemd_256.8.bb >>> b/meta/recipes-core/systemd/systemd_256.8.bb >>> index c1915d7e941..0710377d32d 100644 >>> --- a/meta/recipes-core/systemd/systemd_256.8.bb >>> +++ b/meta/recipes-core/systemd/systemd_256.8.bb >>> @@ -412,6 +412,7 @@ PACKAGE_BEFORE_PN = "\ >>> ${PN}-journal-remote \ >>> ${PN}-kernel-install \ >>> ${PN}-mime \ >>> + ${PN}-networkd \ >>> ${PN}-rpm-macros \ >>> ${PN}-udev-rules \ >>> ${PN}-vconsole-setup \ >>> @@ -440,6 +441,7 @@ SYSTEMD_PACKAGES = >>> "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfm >>> ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', >>> '${PN}-journal-gatewayd', '', d)} \ >>> ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', >>> '${PN}-journal-remote', '', d)} \ >>> ${@bb.utils.contains('PACKAGECONFIG', >>> 'journal-upload', '${PN}-journal-upload', '', d)} \ >>> + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', >>> '${PN}-networkd', '', d)} \ >>> " >>> SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" >>> >>> @@ -448,12 +450,13 @@ USERADD_PACKAGES = "${PN} \ >>> ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', >>> '${PN}-journal-gatewayd', '', d)} \ >>> ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', >>> '${PN}-journal-remote', '', d)} \ >>> ${@bb.utils.contains('PACKAGECONFIG', >>> 'journal-upload', '${PN}-journal-upload', '', d)} \ >>> + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', >>> '${PN}-networkd', '', d)} \ >>> " >>> >> >> Possibly an already asked and answered question (I scanned quickly, but I >> didn't see it). >> >> Is there any reason why networkd shouldn't be in the default >> PACKAGECONFIG ? This is a change of behaviour, that should be opt-in, not >> opt-out. >> > I'm not sure what you mean. networkd was and remains part of the default > PACKAGECONFIG. > My intention is not to change the default behavior. Could you give me a > hint where this is mistakenly happening anyway in this case? > I almost always read patches looking at the patch itself, and don't do any research or looking outside of the patch itself. If something isn't explained in the patch or causes me to wonder, it usually means that the patch commit needs some tweaking. In this case from the context of this patch, I see you packaging based on a PACKAGECONFIG, but since the PACKAGECONFIG isn't in the patch itself, I have no idea what the default of the recipe in question is. I also only see RRECOMMENDS for the new package on the main PN, which means that someone without rrecommends enabled will see different behaviour. So my point would be that the comment that the default isn't changed (and then describe what that is so), as well as commenting on rrecommends vs rdepends, should be captured in the commit log. Bruce > > > Adrian > >> >> Bruce >> >> >> >>> GROUPADD_PARAM:${PN} = "-r systemd-journal;" >>> GROUPADD_PARAM:udev = "-r render" >>> GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >>> 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" >>> USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >>> 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', >>> d)}" >>> -USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >>> 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', >>> d)}" >>> +USERADD_PARAM:${PN}-networkd = "--system -d / -M --shell /sbin/nologin >>> systemd-network" >>> USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', >>> '--system --no-create-home --user-group --home-dir ${datadir}/polkit-1 >>> polkitd;', '', d)}" >>> USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >>> 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', >>> d)}" >>> USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', >>> 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', >>> '', d)}" >>> @@ -620,6 +623,27 @@ FILES:${PN}-extra-utils = "\ >>> FILES:${PN}-mime = "${MIMEDIR}" >>> RRECOMMENDS:${PN} += "${PN}-mime" >>> >>> +FILES:${PN}-networkd = "\ >>> + ${bindir}/networkctl \ >>> + ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \ >>> + ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ >>> + ${datadir}/polkit-1/actions/org.freedesktop.network1.policy \ >>> + ${nonarch_libdir}/sysusers.d/systemd-network.conf \ >>> + ${nonarch_libdir}/tmpfiles.d/systemd-network.conf \ >>> + ${sysconfdir}/systemd/networkd.conf \ >>> + ${systemd_system_unitdir}/systemd-networkd* \ >>> + ${systemd_unitdir}/network/*.network \ >>> + ${systemd_unitdir}/network/*.network.example \ >>> + ${systemd_unitdir}/networkd.conf \ >>> + ${systemd_unitdir}/systemd-networkd* \ >>> +" >>> +# systemd-networkd-persistent-storage.service >>> BindsTo=systemd-networkd.service >>> +# systemd-networkd.service has Also=systemd-networkd-wait-online.service >>> +SYSTEMD_SERVICE:${PN}-networkd = "systemd-networkd.service" >>> +CONFFILES:${PN}-networkd = "${sysconfdir}/systemd/networkd.conf" >>> +RDEPENDS:${PN}-networkd += "${PN}" >>> +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', >>> '${PN}-networkd', '', d)}" >>> + >>> FILES:${PN}-udev-rules = "\ >>> ${nonarch_libdir}/udev/rules.d/70-uaccess.rules >>> \ >>> ${nonarch_libdir}/udev/rules.d/71-seat.rules \ >>> @@ -630,7 +654,6 @@ FILES:${PN}-udev-rules = "\ >>> CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ >>> ${sysconfdir}/systemd/journald.conf \ >>> ${sysconfdir}/systemd/logind.conf \ >>> - ${sysconfdir}/systemd/networkd.conf \ >>> ${sysconfdir}/systemd/pstore.conf \ >>> ${sysconfdir}/systemd/resolved.conf \ >>> ${sysconfdir}/systemd/sleep.conf \ >>> @@ -698,7 +721,6 @@ FILES:${PN} = " ${base_bindir}/* \ >>> ${nonarch_libdir}/modprobe.d/README \ >>> >>> ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ >>> ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf >>> \ >>> - >>> ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ >>> >>> ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ >>> >>> ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ >>> ${@bb.utils.contains('PACKAGECONFIG', >>> 'polkit_hostnamed_fallback', >>> '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', >>> d)} \ >>> -- >>> 2.47.0 >>> >>> >>> -=-=-=-=-=-=-=-=-=-=-=- >>> Links: You receive all messages sent to this group. >>> View/Reply Online (#208658): >>> https://lists.openembedded.org/g/openembedded-core/message/208658 >>> Mute This Topic: https://lists.openembedded.org/mt/110082903/1050810 >>> Group Owner: openembedded-core+owner@lists.openembedded.org >>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ >>> bruce.ashfield@gmail.com] >>> -=-=-=-=-=-=-=-=-=-=-=- >>> >>> >> >> -- >> - Thou shalt not follow the NULL pointer, for chaos and madness await >> thee at its end >> - "Use the force Harry" - Gandalf, Star Trek II >> >> -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II [-- Attachment #2: Type: text/html, Size: 14244 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core] [PATCHv2 5/5] systemd: split networkd into its own package 2024-12-16 4:41 ` Bruce Ashfield @ 2024-12-16 16:08 ` Freihofer, Adrian 2024-12-16 16:13 ` Bruce Ashfield 0 siblings, 1 reply; 13+ messages in thread From: Freihofer, Adrian @ 2024-12-16 16:08 UTC (permalink / raw) To: bruce.ashfield@gmail.com, adrian.freihofer@gmail.com Cc: openembedded-core@lists.openembedded.org [-- Attachment #1: Type: text/plain, Size: 8197 bytes --] On Sun, 2024-12-15 at 23:41 -0500, Bruce Ashfield wrote: On Fri, Dec 13, 2024 at 4:48 PM Adrian Freihofer <adrian.freihofer@gmail.com<mailto:adrian.freihofer@gmail.com>> wrote: Am Fr., 13. Dez. 2024 um 14:54 Uhr schrieb Bruce Ashfield <bruce.ashfield@gmail.com<mailto:bruce.ashfield@gmail.com>>: On Thu, Dec 12, 2024 at 11:44 AM Adrian Freihofer via lists.openembedded.org<http://lists.openembedded.org/> <adrian.freihofer=gmail.com@lists.openembedded.org<mailto:gmail.com@lists.openembedded.org>> wrote: From: Adrian Freihofer <adrian.freihofer@siemens.com<mailto:adrian.freihofer@siemens.com>> Support of images with different network management implementations without having to recompile systemd and other components. Fedora does this as well since systemd version 246.6-2: https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec#_578 This proves that it is technically possible and officially supported by systemd. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com<mailto:adrian.freihofer@siemens.com>> --- meta/recipes-core/systemd/systemd_256.8.bb<http://systemd_256.8.bb/> | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/systemd/systemd_256.8.bb<http://systemd_256.8.bb/> b/meta/recipes-core/systemd/systemd_256.8.bb<http://systemd_256.8.bb/> index c1915d7e941..0710377d32d 100644 --- a/meta/recipes-core/systemd/systemd_256.8.bb<http://systemd_256.8.bb/> +++ b/meta/recipes-core/systemd/systemd_256.8.bb<http://systemd_256.8.bb/> @@ -412,6 +412,7 @@ PACKAGE_BEFORE_PN = "\ ${PN}-journal-remote \ ${PN}-kernel-install \ ${PN}-mime \ + ${PN}-networkd \ ${PN}-rpm-macros \ ${PN}-udev-rules \ ${PN}-vconsole-setup \ @@ -440,6 +441,7 @@ SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfm ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)} \ " SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" @@ -448,12 +450,13 @@ USERADD_PACKAGES = "${PN} \ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)} \ " Possibly an already asked and answered question (I scanned quickly, but I didn't see it). Is there any reason why networkd shouldn't be in the default PACKAGECONFIG ? This is a change of behaviour, that should be opt-in, not opt-out. I'm not sure what you mean. networkd was and remains part of the default PACKAGECONFIG. My intention is not to change the default behavior. Could you give me a hint where this is mistakenly happening anyway in this case? I almost always read patches looking at the patch itself, and don't do any research or looking outside of the patch itself. If something isn't explained in the patch or causes me to wonder, it usually means that the patch commit needs some tweaking. In this case from the context of this patch, I see you packaging based on a PACKAGECONFIG, but since the PACKAGECONFIG isn't in the patch itself, I have no idea what the default of the recipe in question is. I also only see RRECOMMENDS for the new package on the main PN, which means that someone without rrecommends enabled will see different behaviour. So my point would be that the comment that the default isn't changed (and then describe what that is so), as well as commenting on rrecommends vs rdepends, should be captured in the commit log. Thank you for the explanation. Now it's understandable. Your suggesting that I should add something like the following sentence to the commit message: The systemd package RRECOMMENDS the new package systemd-networkd. As long as the RRECOMMENDED packages are not excluded, the change is expected to be fully backward compatible. However, for builds where the RRECOMMENDED packages are not installed, systemd-networkd was installed before this commit, but no longer after this commit. Adrian Bruce Adrian Bruce GROUPADD_PARAM:${PN} = "-r systemd-journal;" GROUPADD_PARAM:udev = "-r render" GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" -USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}" +USERADD_PARAM:${PN}-networkd = "--system -d / -M --shell /sbin/nologin systemd-network" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${datadir}/polkit-1 polkitd;', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}" @@ -620,6 +623,27 @@ FILES:${PN}-extra-utils = "\ FILES:${PN}-mime = "${MIMEDIR}" RRECOMMENDS:${PN} += "${PN}-mime" +FILES:${PN}-networkd = "\ + ${bindir}/networkctl \ + ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \ + ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ + ${datadir}/polkit-1/actions/org.freedesktop.network1.policy \ + ${nonarch_libdir}/sysusers.d/systemd-network.conf \ + ${nonarch_libdir}/tmpfiles.d/systemd-network.conf \ + ${sysconfdir}/systemd/networkd.conf \ + ${systemd_system_unitdir}/systemd-networkd* \ + ${systemd_unitdir}/network/*.network \ + ${systemd_unitdir}/network/*.network.example \ + ${systemd_unitdir}/networkd.conf \ + ${systemd_unitdir}/systemd-networkd* \ +" +# systemd-networkd-persistent-storage.service BindsTo=systemd-networkd.service +# systemd-networkd.service has Also=systemd-networkd-wait-online.service +SYSTEMD_SERVICE:${PN}-networkd = "systemd-networkd.service" +CONFFILES:${PN}-networkd = "${sysconfdir}/systemd/networkd.conf" +RDEPENDS:${PN}-networkd += "${PN}" +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '${PN}-networkd', '', d)}" + FILES:${PN}-udev-rules = "\ ${nonarch_libdir}/udev/rules.d/70-uaccess.rules \ ${nonarch_libdir}/udev/rules.d/71-seat.rules \ @@ -630,7 +654,6 @@ FILES:${PN}-udev-rules = "\ CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ ${sysconfdir}/systemd/journald.conf \ ${sysconfdir}/systemd/logind.conf \ - ${sysconfdir}/systemd/networkd.conf \ ${sysconfdir}/systemd/pstore.conf \ ${sysconfdir}/systemd/resolved.conf \ ${sysconfdir}/systemd/sleep.conf \ @@ -698,7 +721,6 @@ FILES:${PN} = " ${base_bindir}/* \ ${nonarch_libdir}/modprobe.d/README \ ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ - ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', d)} \ [-- Attachment #2: Type: text/html, Size: 16391 bytes --] ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [OE-core] [PATCHv2 5/5] systemd: split networkd into its own package 2024-12-16 16:08 ` Freihofer, Adrian @ 2024-12-16 16:13 ` Bruce Ashfield 0 siblings, 0 replies; 13+ messages in thread From: Bruce Ashfield @ 2024-12-16 16:13 UTC (permalink / raw) To: Freihofer, Adrian Cc: adrian.freihofer@gmail.com, openembedded-core@lists.openembedded.org [-- Attachment #1: Type: text/plain, Size: 8559 bytes --] On Mon, Dec 16, 2024 at 11:08 AM Freihofer, Adrian < adrian.freihofer@siemens.com> wrote: > On Sun, 2024-12-15 at 23:41 -0500, Bruce Ashfield wrote: > > > > On Fri, Dec 13, 2024 at 4:48 PM Adrian Freihofer < > adrian.freihofer@gmail.com> wrote: > > Am Fr., 13. Dez. 2024 um 14:54 Uhr schrieb Bruce Ashfield < > bruce.ashfield@gmail.com>: > > > > On Thu, Dec 12, 2024 at 11:44 AM Adrian Freihofer via > lists.openembedded.org <adrian.freihofer=gmail.com@lists.openembedded.org> > wrote: > > From: Adrian Freihofer <adrian.freihofer@siemens.com> > > Support of images with different network management implementations > without having to recompile systemd and other components. > > Fedora does this as well since systemd version 246.6-2: > https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/systemd.spec#_578 > This proves that it is technically possible and officially supported by > systemd. > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > --- > meta/recipes-core/systemd/systemd_256.8.bb | 28 +++++++++++++++++++--- > 1 file changed, 25 insertions(+), 3 deletions(-) > > diff --git a/meta/recipes-core/systemd/systemd_256.8.bb > b/meta/recipes-core/systemd/systemd_256.8.bb > index c1915d7e941..0710377d32d 100644 > --- a/meta/recipes-core/systemd/systemd_256.8.bb > +++ b/meta/recipes-core/systemd/systemd_256.8.bb > @@ -412,6 +412,7 @@ PACKAGE_BEFORE_PN = "\ > ${PN}-journal-remote \ > ${PN}-kernel-install \ > ${PN}-mime \ > + ${PN}-networkd \ > ${PN}-rpm-macros \ > ${PN}-udev-rules \ > ${PN}-vconsole-setup \ > @@ -440,6 +441,7 @@ SYSTEMD_PACKAGES = > "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfm > ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', > '${PN}-journal-gatewayd', '', d)} \ > ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', > '${PN}-journal-remote', '', d)} \ > ${@bb.utils.contains('PACKAGECONFIG', > 'journal-upload', '${PN}-journal-upload', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', > '${PN}-networkd', '', d)} \ > " > SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" > > @@ -448,12 +450,13 @@ USERADD_PACKAGES = "${PN} \ > ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', > '${PN}-journal-gatewayd', '', d)} \ > ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', > '${PN}-journal-remote', '', d)} \ > ${@bb.utils.contains('PACKAGECONFIG', > 'journal-upload', '${PN}-journal-upload', '', d)} \ > + ${@bb.utils.contains('PACKAGECONFIG', 'networkd', > '${PN}-networkd', '', d)} \ > " > > > Possibly an already asked and answered question (I scanned quickly, but I > didn't see it). > > Is there any reason why networkd shouldn't be in the default PACKAGECONFIG > ? This is a change of behaviour, that should be opt-in, not opt-out. > > I'm not sure what you mean. networkd was and remains part of the default > PACKAGECONFIG. > My intention is not to change the default behavior. Could you give me a > hint where this is mistakenly happening anyway in this case? > > > I almost always read patches looking at the patch itself, and don't > do any research or looking outside of the patch itself. If something > isn't explained in the patch or causes me to wonder, it usually means > that the patch commit needs some tweaking. > > In this case from the context of this patch, I see you packaging > based on a PACKAGECONFIG, but since the PACKAGECONFIG > isn't in the patch itself, I have no idea what the default of the recipe > in question is. > > I also only see RRECOMMENDS for the new package on the main > PN, which means that someone without rrecommends enabled > will see different behaviour. > > So my point would be that the comment that the default isn't > changed (and then describe what that is so), as well as commenting > on rrecommends vs rdepends, should be captured in the commit > log. > > > Thank you for the explanation. Now it's understandable. Your suggesting > that I should add something like the following sentence to the commit > message: > > The systemd package RRECOMMENDS the new package systemd-networkd. As long > as the RRECOMMENDED packages are not excluded, the change is expected to be > fully backward compatible. > However, for builds where the RRECOMMENDED packages are not installed, > systemd-networkd was installed before this commit, but no longer after this > commit. > > Yes, that's it. That'd do the job! Bruce > Adrian > > > Bruce > > > > > > > Adrian > > > Bruce > > > > GROUPADD_PARAM:${PN} = "-r systemd-journal;" > GROUPADD_PARAM:udev = "-r render" > GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', > 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" > USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', > '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" > -USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', > '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}" > +USERADD_PARAM:${PN}-networkd = "--system -d / -M --shell /sbin/nologin > systemd-network" > USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', > '--system --no-create-home --user-group --home-dir ${datadir}/polkit-1 > polkitd;', '', d)}" > USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', > '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" > USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', > 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', > '', d)}" > @@ -620,6 +623,27 @@ FILES:${PN}-extra-utils = "\ > FILES:${PN}-mime = "${MIMEDIR}" > RRECOMMENDS:${PN} += "${PN}-mime" > > +FILES:${PN}-networkd = "\ > + ${bindir}/networkctl \ > + ${datadir}/dbus-1/system-services/org.freedesktop.network1.service \ > + ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ > + ${datadir}/polkit-1/actions/org.freedesktop.network1.policy \ > + ${nonarch_libdir}/sysusers.d/systemd-network.conf \ > + ${nonarch_libdir}/tmpfiles.d/systemd-network.conf \ > + ${sysconfdir}/systemd/networkd.conf \ > + ${systemd_system_unitdir}/systemd-networkd* \ > + ${systemd_unitdir}/network/*.network \ > + ${systemd_unitdir}/network/*.network.example \ > + ${systemd_unitdir}/networkd.conf \ > + ${systemd_unitdir}/systemd-networkd* \ > +" > +# systemd-networkd-persistent-storage.service > BindsTo=systemd-networkd.service > +# systemd-networkd.service has Also=systemd-networkd-wait-online.service > +SYSTEMD_SERVICE:${PN}-networkd = "systemd-networkd.service" > +CONFFILES:${PN}-networkd = "${sysconfdir}/systemd/networkd.conf" > +RDEPENDS:${PN}-networkd += "${PN}" > +RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', > '${PN}-networkd', '', d)}" > + > FILES:${PN}-udev-rules = "\ > ${nonarch_libdir}/udev/rules.d/70-uaccess.rules \ > ${nonarch_libdir}/udev/rules.d/71-seat.rules \ > @@ -630,7 +654,6 @@ FILES:${PN}-udev-rules = "\ > CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ > ${sysconfdir}/systemd/journald.conf \ > ${sysconfdir}/systemd/logind.conf \ > - ${sysconfdir}/systemd/networkd.conf \ > ${sysconfdir}/systemd/pstore.conf \ > ${sysconfdir}/systemd/resolved.conf \ > ${sysconfdir}/systemd/sleep.conf \ > @@ -698,7 +721,6 @@ FILES:${PN} = " ${base_bindir}/* \ > ${nonarch_libdir}/modprobe.d/README \ > ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf > \ > ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ > - ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ > ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ > ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ > ${@bb.utils.contains('PACKAGECONFIG', > 'polkit_hostnamed_fallback', > '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', > d)} \ > > > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II [-- Attachment #2: Type: text/html, Size: 14875 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core] [PATCHv2 0/5] systemd split networkd package 2024-12-12 15:55 [PATCHv2 0/5] systemd split networkd package Adrian Freihofer ` (4 preceding siblings ...) 2024-12-12 15:55 ` [PATCHv2 5/5] systemd: split networkd into its own package Adrian Freihofer @ 2024-12-13 11:18 ` Richard Purdie 2024-12-13 21:27 ` Adrian Freihofer 5 siblings, 1 reply; 13+ messages in thread From: Richard Purdie @ 2024-12-13 11:18 UTC (permalink / raw) To: adrian.freihofer, openembedded-core On Thu, 2024-12-12 at 16:55 +0100, Adrian Freihofer via lists.openembedded.org wrote: > v2 fixes the build warning > > First of all, this patch series fixes a bug in systemd.bbclass that > forces service files with an Also= relationship to be in the same > package. This may often be the case, but as long as the RDEPENDS > between the packages are set correctly, it is no problem to distribute > the service files over several packages. > > If service files referenced with Also= are no longer automatically added > to the list of FILES, build errors caused by unpacked files are > expected. A bitbake world has shown that there are only two recipes in > oe-core that use automatic packing: busybox and dropbear. There are 2 > patches that fix this. > > Also= relation are probably most often used for sockets. Consequently > the systemd.bbclass should also allow to split socket files into > separate packages. However, that's proably practically not used and > would cause tons of packaging errors. Therefore the automatic packaging > feature for sockets is not changed. > > The latest patch splits systemd-networkd into its own package. This adds > a little extra complexity, but splitting systemd into packages is a good > step towards making Yocto more usable in binary form. The changes to busybox and dropbear suggests there are some considerations needed here from a migration perspective as people upgrade past this change? Is there some documentation we should be adding to the migration guide along with these changes? Cheers, Richard ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core] [PATCHv2 0/5] systemd split networkd package 2024-12-13 11:18 ` [OE-core] [PATCHv2 0/5] systemd split networkd package Richard Purdie @ 2024-12-13 21:27 ` Adrian Freihofer 0 siblings, 0 replies; 13+ messages in thread From: Adrian Freihofer @ 2024-12-13 21:27 UTC (permalink / raw) To: Richard Purdie; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 2308 bytes --] Am Fr., 13. Dez. 2024 um 12:18 Uhr schrieb Richard Purdie < richard.purdie@linuxfoundation.org>: > On Thu, 2024-12-12 at 16:55 +0100, Adrian Freihofer via > lists.openembedded.org wrote: > > v2 fixes the build warning > > > > First of all, this patch series fixes a bug in systemd.bbclass that > > forces service files with an Also= relationship to be in the same > > package. This may often be the case, but as long as the RDEPENDS > > between the packages are set correctly, it is no problem to distribute > > the service files over several packages. > > > > If service files referenced with Also= are no longer automatically added > > to the list of FILES, build errors caused by unpacked files are > > expected. A bitbake world has shown that there are only two recipes in > > oe-core that use automatic packing: busybox and dropbear. There are 2 > > patches that fix this. > > > > Also= relation are probably most often used for sockets. Consequently > > the systemd.bbclass should also allow to split socket files into > > separate packages. However, that's proably practically not used and > > would cause tons of packaging errors. Therefore the automatic packaging > > feature for sockets is not changed. > > > > The latest patch splits systemd-networkd into its own package. This adds > > a little extra complexity, but splitting systemd into packages is a good > > step towards making Yocto more usable in binary form. > > The changes to busybox and dropbear suggests there are some > considerations needed here from a migration perspective as people > upgrade past this change? Is there some documentation we should be > adding to the migration guide along with these changes? > Yes, there is a certain risk that some recipes will require adjustments. Maybe something like this would be helpful: If a systemd service file had referred to other service files by “Also” starting them, the other service files were automatically added to the FILES variable of the same package. This prevents such services from being packaged into different packages. Therefore, this automatic has been removed for service files (but not for socket files). Now all service files must be explicitly added to FILES. Adrian > > Cheers, > > Richard > > > [-- Attachment #2: Type: text/html, Size: 3177 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-12-16 16:13 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-12-12 15:55 [PATCHv2 0/5] systemd split networkd package Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 1/5] busybox: add klogd service to FILES Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 2/5] dropbear: add dropbearkey.service " Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 3/5] systemd.bbclass: refactor adding files Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 4/5] systemd.bbclass: do not automatically add Also services Adrian Freihofer 2024-12-12 15:55 ` [PATCHv2 5/5] systemd: split networkd into its own package Adrian Freihofer 2024-12-13 13:53 ` [OE-core] " Bruce Ashfield 2024-12-13 21:48 ` Adrian Freihofer 2024-12-16 4:41 ` Bruce Ashfield 2024-12-16 16:08 ` Freihofer, Adrian 2024-12-16 16:13 ` Bruce Ashfield 2024-12-13 11:18 ` [OE-core] [PATCHv2 0/5] systemd split networkd package Richard Purdie 2024-12-13 21:27 ` Adrian Freihofer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox