* [PATCH 0/1] systemd: fix runtime dependency @ 2014-10-16 9:19 Chen Qi 2014-10-16 9:19 ` [PATCH 1/1] " Chen Qi 0 siblings, 1 reply; 8+ messages in thread From: Chen Qi @ 2014-10-16 9:19 UTC (permalink / raw) To: openembedded-core The following changes since commit fcbd1b19383daf5e160a864df1418130da01be28: build-appliance-image: Update to dizzy head revision (2014-10-11 08:11:11 +0100) are available in the git repository at: git://git.openembedded.org/openembedded-core-contrib ChenQi/systemd-rdepends http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/systemd-rdepends Chen Qi (1): systemd: fix runtime dependency meta/recipes-core/systemd/systemd-serialgetty.bb | 2 -- meta/recipes-core/systemd/systemd_216.bb | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/1] systemd: fix runtime dependency 2014-10-16 9:19 [PATCH 0/1] systemd: fix runtime dependency Chen Qi @ 2014-10-16 9:19 ` Chen Qi 2014-10-16 10:59 ` Peter A. Bigot 2014-10-16 11:06 ` Enrico Scholz 0 siblings, 2 replies; 8+ messages in thread From: Chen Qi @ 2014-10-16 9:19 UTC (permalink / raw) To: openembedded-core Previously, if we set 'NO_RECOMMENDATIONS' to "1", we cannot reach login in systemd systems. The problem is that several runtime dependencies are coded as 'recommended' in our project. This patch makes the following changes. 1. Add util-linux-agetty as a runtime dependency. Otherwise, getty services in systemd cannot start correctly. 2. Add systemd-serialgetty as a runtime dependency. Otherwise, serialgetty services cannot start correctly in systemd and we would have problem when using `runqemu qemux86 nographic'. 3. Remove 'systemd' from RDEPENDS of systemd-serialgetty. systemd-serialgetty justs ships systemd unit files, even if the init manager is 'sysvinit', these files do no harm. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- meta/recipes-core/systemd/systemd-serialgetty.bb | 2 -- meta/recipes-core/systemd/systemd_216.bb | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb index 1c34d5c..f3acaad 100644 --- a/meta/recipes-core/systemd/systemd-serialgetty.bb +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb @@ -36,8 +36,6 @@ do_install() { fi } -RDEPENDS_${PN} = "systemd" - # This is a machine specific file FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb index ebf9395..62fe5c7 100644 --- a/meta/recipes-core/systemd/systemd_216.bb +++ b/meta/recipes-core/systemd/systemd_216.bb @@ -267,11 +267,10 @@ FILES_${PN} = " ${base_bindir}/* \ FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" -RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})" +RDEPENDS_${PN} += "kmod dbus systemd-serialgetty util-linux-mount util-linux-agetty udev (= ${EXTENDPKGV})" RDEPENDS_${PN} += "volatile-binds" -RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\ - util-linux-agetty \ +RRECOMMENDS_${PN} += "systemd-compat-units udev-hwdb\ util-linux-fsck e2fsprogs-e2fsck \ kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \ " -- 1.9.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] systemd: fix runtime dependency 2014-10-16 9:19 ` [PATCH 1/1] " Chen Qi @ 2014-10-16 10:59 ` Peter A. Bigot 2014-10-16 11:49 ` ChenQi 2014-10-16 11:06 ` Enrico Scholz 1 sibling, 1 reply; 8+ messages in thread From: Peter A. Bigot @ 2014-10-16 10:59 UTC (permalink / raw) To: openembedded-core On 10/16/2014 04:19 AM, Chen Qi wrote: > Previously, if we set 'NO_RECOMMENDATIONS' to "1", we cannot reach login > in systemd systems. The problem is that several runtime dependencies are > coded as 'recommended' in our project. > > This patch makes the following changes. > 1. Add util-linux-agetty as a runtime dependency. > Otherwise, getty services in systemd cannot start correctly. > 2. Add systemd-serialgetty as a runtime dependency. > Otherwise, serialgetty services cannot start correctly in systemd and > we would have problem when using `runqemu qemux86 nographic'. > 3. Remove 'systemd' from RDEPENDS of systemd-serialgetty. > systemd-serialgetty justs ships systemd unit files, even if the init > manager is 'sysvinit', these files do no harm. This looks really weird. It doesn't make any sense that systemd should depend on systemd-serialgetty; the original dependency was right. serialgetty works fine under systemd with all my configurations as-is. I think you need to look more closely at your project-specific configuration to understand why things aren't getting set up correctly for you. Peter > > Signed-off-by: Chen Qi <Qi.Chen@windriver.com> > --- > meta/recipes-core/systemd/systemd-serialgetty.bb | 2 -- > meta/recipes-core/systemd/systemd_216.bb | 5 ++--- > 2 files changed, 2 insertions(+), 5 deletions(-) > > diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb > index 1c34d5c..f3acaad 100644 > --- a/meta/recipes-core/systemd/systemd-serialgetty.bb > +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb > @@ -36,8 +36,6 @@ do_install() { > fi > } > > -RDEPENDS_${PN} = "systemd" > - > # This is a machine specific file > FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}" > PACKAGE_ARCH = "${MACHINE_ARCH}" > diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb > index ebf9395..62fe5c7 100644 > --- a/meta/recipes-core/systemd/systemd_216.bb > +++ b/meta/recipes-core/systemd/systemd_216.bb > @@ -267,11 +267,10 @@ FILES_${PN} = " ${base_bindir}/* \ > FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" > FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" > > -RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})" > +RDEPENDS_${PN} += "kmod dbus systemd-serialgetty util-linux-mount util-linux-agetty udev (= ${EXTENDPKGV})" > RDEPENDS_${PN} += "volatile-binds" > > -RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units udev-hwdb\ > - util-linux-agetty \ > +RRECOMMENDS_${PN} += "systemd-compat-units udev-hwdb\ > util-linux-fsck e2fsprogs-e2fsck \ > kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 os-release \ > " ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] systemd: fix runtime dependency 2014-10-16 10:59 ` Peter A. Bigot @ 2014-10-16 11:49 ` ChenQi 2014-10-16 12:32 ` Peter A. Bigot 0 siblings, 1 reply; 8+ messages in thread From: ChenQi @ 2014-10-16 11:49 UTC (permalink / raw) To: openembedded-core On 10/16/2014 06:59 PM, Peter A. Bigot wrote: > On 10/16/2014 04:19 AM, Chen Qi wrote: >> Previously, if we set 'NO_RECOMMENDATIONS' to "1", we cannot reach login >> in systemd systems. The problem is that several runtime dependencies are >> coded as 'recommended' in our project. >> >> This patch makes the following changes. >> 1. Add util-linux-agetty as a runtime dependency. >> Otherwise, getty services in systemd cannot start correctly. >> 2. Add systemd-serialgetty as a runtime dependency. >> Otherwise, serialgetty services cannot start correctly in systemd >> and >> we would have problem when using `runqemu qemux86 nographic'. >> 3. Remove 'systemd' from RDEPENDS of systemd-serialgetty. >> systemd-serialgetty justs ships systemd unit files, even if the init >> manager is 'sysvinit', these files do no harm. > > This looks really weird. It doesn't make any sense that systemd > should depend on systemd-serialgetty; the original dependency was right. > If systemd-serialgetty should rdepends on systemd, then in the same logic, we should also change sysvinit-inittab to rdepend on sysvinit. I don't think this is right. > serialgetty works fine under systemd with all my configurations as-is. > Yes. But it needs to be first installed to work correctly. > I think you need to look more closely at your project-specific > configuration to understand why things aren't getting set up correctly > for you. > You can hand-edit local.conf with IMAGE_INSTALL_remove/_append to workaround a lot of runtime dependency issue. The problem is that setting 'NO_RECOMMENDATIONS' to "1" is valid, however, such valid configuration would raise a non-workable minimal image. Try the following steps with the current project. 1. set NO_RECOMMENDATIONS to "1" in local.conf 2. Change in local.conf to use systemd as the init manager 3. bitbake core-image-minimal 4. runqemu qemux86 nographic My point is that a system should let users login in on serial console. Our sysvinit based system does this, and our systemd based system should also do this. > Peter > > >> >> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> >> --- >> meta/recipes-core/systemd/systemd-serialgetty.bb | 2 -- >> meta/recipes-core/systemd/systemd_216.bb | 5 ++--- >> 2 files changed, 2 insertions(+), 5 deletions(-) >> >> diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb >> b/meta/recipes-core/systemd/systemd-serialgetty.bb >> index 1c34d5c..f3acaad 100644 >> --- a/meta/recipes-core/systemd/systemd-serialgetty.bb >> +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb >> @@ -36,8 +36,6 @@ do_install() { >> fi >> } >> -RDEPENDS_${PN} = "systemd" >> - >> # This is a machine specific file >> FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}" >> PACKAGE_ARCH = "${MACHINE_ARCH}" >> diff --git a/meta/recipes-core/systemd/systemd_216.bb >> b/meta/recipes-core/systemd/systemd_216.bb >> index ebf9395..62fe5c7 100644 >> --- a/meta/recipes-core/systemd/systemd_216.bb >> +++ b/meta/recipes-core/systemd/systemd_216.bb >> @@ -267,11 +267,10 @@ FILES_${PN} = " ${base_bindir}/* \ >> FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug >> ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" >> FILES_${PN}-dev += "${base_libdir}/security/*.la >> ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" >> -RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})" >> +RDEPENDS_${PN} += "kmod dbus systemd-serialgetty util-linux-mount >> util-linux-agetty udev (= ${EXTENDPKGV})" >> RDEPENDS_${PN} += "volatile-binds" >> -RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units >> udev-hwdb\ >> - util-linux-agetty \ >> +RRECOMMENDS_${PN} += "systemd-compat-units udev-hwdb\ >> util-linux-fsck e2fsprogs-e2fsck \ >> kernel-module-autofs4 kernel-module-unix >> kernel-module-ipv6 os-release \ >> " > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] systemd: fix runtime dependency 2014-10-16 11:49 ` ChenQi @ 2014-10-16 12:32 ` Peter A. Bigot 0 siblings, 0 replies; 8+ messages in thread From: Peter A. Bigot @ 2014-10-16 12:32 UTC (permalink / raw) To: openembedded-core [-- Attachment #1: Type: text/plain, Size: 5324 bytes --] On 10/16/2014 06:49 AM, ChenQi wrote: > On 10/16/2014 06:59 PM, Peter A. Bigot wrote: >> On 10/16/2014 04:19 AM, Chen Qi wrote: >>> Previously, if we set 'NO_RECOMMENDATIONS' to "1", we cannot reach >>> login >>> in systemd systems. The problem is that several runtime dependencies >>> are >>> coded as 'recommended' in our project. >>> >>> This patch makes the following changes. >>> 1. Add util-linux-agetty as a runtime dependency. >>> Otherwise, getty services in systemd cannot start correctly. >>> 2. Add systemd-serialgetty as a runtime dependency. >>> Otherwise, serialgetty services cannot start correctly in >>> systemd and >>> we would have problem when using `runqemu qemux86 nographic'. >>> 3. Remove 'systemd' from RDEPENDS of systemd-serialgetty. >>> systemd-serialgetty justs ships systemd unit files, even if the >>> init >>> manager is 'sysvinit', these files do no harm. >> >> This looks really weird. It doesn't make any sense that systemd >> should depend on systemd-serialgetty; the original dependency was right. >> > > If systemd-serialgetty should rdepends on systemd, then in the same > logic, we should also change sysvinit-inittab to rdepend on sysvinit. > I don't think this is right. OK, that makes sense: systemd-serialgetty doesn't depend on systemd, it's just not particularly useful without it. Without digging into details, I could see a case for removing the RDEPENDS on systemd from systemd-serialgetty. Maybe RRECOMMENDS is better. However, so much more so does systemd not depend on systemd-serialgetty, so adding the dependency in the reverse direction is simply wrong. A system without a serial console is unusual but not invalid. > >> serialgetty works fine under systemd with all my configurations as-is. >> > > Yes. But it needs to be first installed to work correctly. Agreed. >> I think you need to look more closely at your project-specific >> configuration to understand why things aren't getting set up >> correctly for you. >> > > You can hand-edit local.conf with IMAGE_INSTALL_remove/_append to > workaround a lot of runtime dependency issue. The problem is that > setting 'NO_RECOMMENDATIONS' to "1" is valid, however, such valid > configuration would raise a non-workable minimal image. The documentation for NO_RECOMMENDATIONS has: http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-NO_RECOMMENDATIONS Note: Some recommended packages might be required for certain system functionality, such as kernel modules. It is up to you to add packages with the |IMAGE_INSTALL| <http://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-IMAGE_INSTALL> variable. AFAICT, if this doesn't work for you because you use NO_RECOMMENDATIONS, it's a problem with your configuration, not with OE. Peter > > Try the following steps with the current project. > 1. set NO_RECOMMENDATIONS to "1" in local.conf > 2. Change in local.conf to use systemd as the init manager > 3. bitbake core-image-minimal > 4. runqemu qemux86 nographic > > My point is that a system should let users login in on serial console. > Our sysvinit based system does this, and our systemd based system > should also do this. > >> Peter >> >> >>> >>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com> >>> --- >>> meta/recipes-core/systemd/systemd-serialgetty.bb | 2 -- >>> meta/recipes-core/systemd/systemd_216.bb | 5 ++--- >>> 2 files changed, 2 insertions(+), 5 deletions(-) >>> >>> diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb >>> b/meta/recipes-core/systemd/systemd-serialgetty.bb >>> index 1c34d5c..f3acaad 100644 >>> --- a/meta/recipes-core/systemd/systemd-serialgetty.bb >>> +++ b/meta/recipes-core/systemd/systemd-serialgetty.bb >>> @@ -36,8 +36,6 @@ do_install() { >>> fi >>> } >>> -RDEPENDS_${PN} = "systemd" >>> - >>> # This is a machine specific file >>> FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}" >>> PACKAGE_ARCH = "${MACHINE_ARCH}" >>> diff --git a/meta/recipes-core/systemd/systemd_216.bb >>> b/meta/recipes-core/systemd/systemd_216.bb >>> index ebf9395..62fe5c7 100644 >>> --- a/meta/recipes-core/systemd/systemd_216.bb >>> +++ b/meta/recipes-core/systemd/systemd_216.bb >>> @@ -267,11 +267,10 @@ FILES_${PN} = " ${base_bindir}/* \ >>> FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug >>> ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/" >>> FILES_${PN}-dev += "${base_libdir}/security/*.la >>> ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" >>> -RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= >>> ${EXTENDPKGV})" >>> +RDEPENDS_${PN} += "kmod dbus systemd-serialgetty util-linux-mount >>> util-linux-agetty udev (= ${EXTENDPKGV})" >>> RDEPENDS_${PN} += "volatile-binds" >>> -RRECOMMENDS_${PN} += "systemd-serialgetty systemd-compat-units >>> udev-hwdb\ >>> - util-linux-agetty \ >>> +RRECOMMENDS_${PN} += "systemd-compat-units udev-hwdb\ >>> util-linux-fsck e2fsprogs-e2fsck \ >>> kernel-module-autofs4 kernel-module-unix >>> kernel-module-ipv6 os-release \ >>> " >> > [-- Attachment #2: Type: text/html, Size: 8242 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] systemd: fix runtime dependency 2014-10-16 9:19 ` [PATCH 1/1] " Chen Qi 2014-10-16 10:59 ` Peter A. Bigot @ 2014-10-16 11:06 ` Enrico Scholz 2014-10-16 11:29 ` Peter A. Bigot 2014-10-16 11:38 ` ChenQi 1 sibling, 2 replies; 8+ messages in thread From: Enrico Scholz @ 2014-10-16 11:06 UTC (permalink / raw) To: openembedded-core Chen Qi <Qi.Chen-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> writes: > Previously, if we set 'NO_RECOMMENDATIONS' to "1", we cannot reach login > in systemd systems. IMO, this is just a configuration issue and can be fixed much better in a higher level packagegroup recipe. RRECOMMENDS for serial getty are fine; although a serial console is very common on embedded systems, it is not strictly necessary. > This patch makes the following changes. > 1. Add util-linux-agetty as a runtime dependency. > Otherwise, getty services in systemd cannot start correctly. afais, it would make more sense to move this dependency into systemd-serialgetty (and not systemd as in your patch). Or are there other units in systemd which call agetty? Enrico ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] systemd: fix runtime dependency 2014-10-16 11:06 ` Enrico Scholz @ 2014-10-16 11:29 ` Peter A. Bigot 2014-10-16 11:38 ` ChenQi 1 sibling, 0 replies; 8+ messages in thread From: Peter A. Bigot @ 2014-10-16 11:29 UTC (permalink / raw) To: openembedded-core On 10/16/2014 06:06 AM, Enrico Scholz wrote: > Chen Qi <Qi.Chen-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> writes: > >> Previously, if we set 'NO_RECOMMENDATIONS' to "1", we cannot reach login >> in systemd systems. > IMO, this is just a configuration issue and can be fixed much better in > a higher level packagegroup recipe. RRECOMMENDS for serial getty are > fine; although a serial console is very common on embedded systems, it > is not strictly necessary. > > >> This patch makes the following changes. >> 1. Add util-linux-agetty as a runtime dependency. >> Otherwise, getty services in systemd cannot start correctly. > afais, it would make more sense to move this dependency into > systemd-serialgetty (and not systemd as in your patch). Or are there > other units in systemd which call agetty? There are other units that use getty. OE's systemd has a patch to use getty not agetty but for some reason console-getty is not one of the units patched (maybe the unit was created after the patch was made); that probably needs to be reviewed. There is at least one other oe-core provider of getty (viz. mingetty); at one point it was important to use one of them (I forget which) on gumstix Overo boards. Peter ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] systemd: fix runtime dependency 2014-10-16 11:06 ` Enrico Scholz 2014-10-16 11:29 ` Peter A. Bigot @ 2014-10-16 11:38 ` ChenQi 1 sibling, 0 replies; 8+ messages in thread From: ChenQi @ 2014-10-16 11:38 UTC (permalink / raw) To: openembedded-core On 10/16/2014 07:06 PM, Enrico Scholz wrote: > Chen Qi <Qi.Chen-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> writes: > >> Previously, if we set 'NO_RECOMMENDATIONS' to "1", we cannot reach login >> in systemd systems. > IMO, this is just a configuration issue and can be fixed much better in > a higher level packagegroup recipe. RRECOMMENDS for serial getty are > fine; although a serial console is very common on embedded systems, it > is not strictly necessary. > These serial-getty@.service is part of the systemd package. In our system, it's first removed from systemd package, then generated from a separate recipe. That's just a configuration file which occupies almost no space in image. However, without it, you cannot use serial console in systemd system. In sysvinit, the serial console configuration is in /etc/inittab. I just can't see any advantage of not using serial-getty@.service. >> This patch makes the following changes. >> 1. Add util-linux-agetty as a runtime dependency. >> Otherwise, getty services in systemd cannot start correctly. > afais, it would make more sense to move this dependency into > systemd-serialgetty (and not systemd as in your patch). Or are there > other units in systemd which call agetty? > > > Enrico getty@.service util-linux-agetty is really a necessity, otherwise you just don't console. //Chen Qi ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-10-16 12:32 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-16 9:19 [PATCH 0/1] systemd: fix runtime dependency Chen Qi 2014-10-16 9:19 ` [PATCH 1/1] " Chen Qi 2014-10-16 10:59 ` Peter A. Bigot 2014-10-16 11:49 ` ChenQi 2014-10-16 12:32 ` Peter A. Bigot 2014-10-16 11:06 ` Enrico Scholz 2014-10-16 11:29 ` Peter A. Bigot 2014-10-16 11:38 ` ChenQi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox