All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] systemd: fix dependency issue related to serial getty
@ 2017-09-05  8:07 Chen Qi
  2017-09-05  8:07 ` [PATCH 1/2] systemd: change some RRECOMMENDS to RDEPENDS Chen Qi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chen Qi @ 2017-09-05  8:07 UTC (permalink / raw
  To: openembedded-core

The following changes since commit 15eac6befb6c4d16bc1b814e040bd7bf006a5bee:

  linux-yocto: add linux-yocto 4.12 bbappends (2017-08-31 23:37:10 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/systemd-serialgetty
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd-serialgetty

Chen Qi (2):
  systemd: change some RRECOMMENDS to RDEPENDS
  systemd-serialgetty: remove systemd from RDEPENDS

 meta/recipes-core/systemd/systemd-serialgetty.bb | 2 --
 meta/recipes-core/systemd/systemd_234.bb         | 8 ++++----
 2 files changed, 4 insertions(+), 6 deletions(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] systemd: change some RRECOMMENDS to RDEPENDS
  2017-09-05  8:07 [PATCH 0/2] systemd: fix dependency issue related to serial getty Chen Qi
@ 2017-09-05  8:07 ` Chen Qi
  2017-09-22  9:34   ` Martin Jansa
  2017-09-05  8:08 ` [PATCH 2/2] systemd-serialgetty: remove systemd from RDEPENDS Chen Qi
  2017-09-11  1:43 ` [PATCH 0/2] systemd: fix dependency issue related to serial getty ChenQi
  2 siblings, 1 reply; 6+ messages in thread
From: Chen Qi @ 2017-09-05  8:07 UTC (permalink / raw
  To: openembedded-core

Set NO_RECOMMENDATIONS to "1", build and start a systemd image, and we
could not get serial getty spawned, thus causing the user not able to
login via serial port.

E.g.
MACHINE=qemux86-64 bitbake core-image-minimal
runqemu qemux86-64 nographic

And we cannot login onto the system.

Move util-linux-agetty and systemd-serialgetty (determined by PACKAGECONFIG)
from RRECOMMENDS to RDEPENDS to fix the above problem.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/systemd/systemd_234.bb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb
index 2736f38..2695e15 100644
--- a/meta/recipes-core/systemd/systemd_234.bb
+++ b/meta/recipes-core/systemd/systemd_234.bb
@@ -492,13 +492,13 @@ FILES_${PN} = " ${base_bindir}/* \
 
 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 util-linux-mount udev (= ${EXTENDPKGV}) util-linux-agetty"
+RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
 RDEPENDS_${PN} += "volatile-binds update-rc.d"
 
-RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)} \
-                      systemd-extra-utils \
+RRECOMMENDS_${PN} += "systemd-extra-utils \
                       systemd-compat-units udev-hwdb \
-                      util-linux-agetty  util-linux-fsck e2fsprogs-e2fsck \
+                      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] 6+ messages in thread

* [PATCH 2/2] systemd-serialgetty: remove systemd from RDEPENDS
  2017-09-05  8:07 [PATCH 0/2] systemd: fix dependency issue related to serial getty Chen Qi
  2017-09-05  8:07 ` [PATCH 1/2] systemd: change some RRECOMMENDS to RDEPENDS Chen Qi
@ 2017-09-05  8:08 ` Chen Qi
  2017-09-11  1:43 ` [PATCH 0/2] systemd: fix dependency issue related to serial getty ChenQi
  2 siblings, 0 replies; 6+ messages in thread
From: Chen Qi @ 2017-09-05  8:08 UTC (permalink / raw
  To: openembedded-core

By setting systemd-serialgetty to rdepend on systemd, we are making
configuration files have runtime dependency on the main utility that
uses those configuration files. Applied with the same logic, we should
make any package that provides service files under /etc/init.d/ to have
runtime dependency on sysvinit. And this is not right.

So we should remove systemd from RDEPENDS of systemd-serialgetty.

Besides, as we have changed systemd to have systemd-serialgetty in its
RDEPENDS by default, we should avoid circular dependency issue.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/systemd/systemd-serialgetty.bb | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd-serialgetty.bb b/meta/recipes-core/systemd/systemd-serialgetty.bb
index 768b130..8d1ec7c 100644
--- a/meta/recipes-core/systemd/systemd-serialgetty.bb
+++ b/meta/recipes-core/systemd/systemd-serialgetty.bb
@@ -38,8 +38,6 @@ do_install() {
 	fi
 }
 
-RDEPENDS_${PN} = "systemd"
-
 # This is a machine specific file
 FILES_${PN} = "${systemd_unitdir}/system/*.service ${sysconfdir}"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] systemd: fix dependency issue related to serial getty
  2017-09-05  8:07 [PATCH 0/2] systemd: fix dependency issue related to serial getty Chen Qi
  2017-09-05  8:07 ` [PATCH 1/2] systemd: change some RRECOMMENDS to RDEPENDS Chen Qi
  2017-09-05  8:08 ` [PATCH 2/2] systemd-serialgetty: remove systemd from RDEPENDS Chen Qi
@ 2017-09-11  1:43 ` ChenQi
  2 siblings, 0 replies; 6+ messages in thread
From: ChenQi @ 2017-09-11  1:43 UTC (permalink / raw
  To: openembedded-core

ping

On 09/05/2017 04:07 PM, Chen Qi wrote:
> The following changes since commit 15eac6befb6c4d16bc1b814e040bd7bf006a5bee:
>
>    linux-yocto: add linux-yocto 4.12 bbappends (2017-08-31 23:37:10 +0100)
>
> are available in the git repository at:
>
>    git://git.pokylinux.org/poky-contrib ChenQi/systemd-serialgetty
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd-serialgetty
>
> Chen Qi (2):
>    systemd: change some RRECOMMENDS to RDEPENDS
>    systemd-serialgetty: remove systemd from RDEPENDS
>
>   meta/recipes-core/systemd/systemd-serialgetty.bb | 2 --
>   meta/recipes-core/systemd/systemd_234.bb         | 8 ++++----
>   2 files changed, 4 insertions(+), 6 deletions(-)
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] systemd: change some RRECOMMENDS to RDEPENDS
  2017-09-05  8:07 ` [PATCH 1/2] systemd: change some RRECOMMENDS to RDEPENDS Chen Qi
@ 2017-09-22  9:34   ` Martin Jansa
  2017-09-26  8:38     ` ChenQi
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2017-09-22  9:34 UTC (permalink / raw
  To: Chen Qi; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2815 bytes --]

This doesn't seem to work correctly for MACHINEs with empty SERIAL_CONSOLE,
because with empty SERIAL_CONSOLE there is no systemd-serialgetty package
(because it's also empty) and the build fails with:

Collected errors:
 * calculate_dependencies_for: Cannot satisfy the following dependencies
for packagegroup-core-boot:
 *      systemd-serialgetty *
 * opkg_solver_install: Cannot install package packagegroup-core-boot.

If you're setting NO_RECOMMENDATIONS to "1", then you should expect that
some recommended functionality will be missing, no?

On Tue, Sep 5, 2017 at 10:07 AM, Chen Qi <Qi.Chen@windriver.com> wrote:

> Set NO_RECOMMENDATIONS to "1", build and start a systemd image, and we
> could not get serial getty spawned, thus causing the user not able to
> login via serial port.
>
> E.g.
> MACHINE=qemux86-64 bitbake core-image-minimal
> runqemu qemux86-64 nographic
>
> And we cannot login onto the system.
>
> Move util-linux-agetty and systemd-serialgetty (determined by
> PACKAGECONFIG)
> from RRECOMMENDS to RDEPENDS to fix the above problem.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-core/systemd/systemd_234.bb | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-core/systemd/systemd_234.bb
> b/meta/recipes-core/systemd/systemd_234.bb
> index 2736f38..2695e15 100644
> --- a/meta/recipes-core/systemd/systemd_234.bb
> +++ b/meta/recipes-core/systemd/systemd_234.bb
> @@ -492,13 +492,13 @@ FILES_${PN} = " ${base_bindir}/* \
>
>  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 util-linux-mount udev (= ${EXTENDPKGV})
> util-linux-agetty"
> +RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'serial-getty-generator', '', 'systemd-serialgetty', d)}"
>  RDEPENDS_${PN} += "volatile-binds update-rc.d"
>
> -RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
> 'serial-getty-generator', '', 'systemd-serialgetty', d)} \
> -                      systemd-extra-utils \
> +RRECOMMENDS_${PN} += "systemd-extra-utils \
>                        systemd-compat-units udev-hwdb \
> -                      util-linux-agetty  util-linux-fsck e2fsprogs-e2fsck
> \
> +                      util-linux-fsck e2fsprogs-e2fsck \
>                        kernel-module-autofs4 kernel-module-unix
> kernel-module-ipv6 \
>                        os-release \
>  "
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 4240 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] systemd: change some RRECOMMENDS to RDEPENDS
  2017-09-22  9:34   ` Martin Jansa
@ 2017-09-26  8:38     ` ChenQi
  0 siblings, 0 replies; 6+ messages in thread
From: ChenQi @ 2017-09-26  8:38 UTC (permalink / raw
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 4048 bytes --]

On 09/22/2017 05:34 PM, Martin Jansa wrote:
> This doesn't seem to work correctly for MACHINEs with 
> empty SERIAL_CONSOLE, because with empty SERIAL_CONSOLE there is no 
> systemd-serialgetty package (because it's also empty) and the build 
> fails with:
>
> Collected errors:
>  * calculate_dependencies_for: Cannot satisfy the following 
> dependencies for packagegroup-core-boot:
>  *      systemd-serialgetty *
>  * opkg_solver_install: Cannot install package packagegroup-core-boot.
>
> If you're setting NO_RECOMMENDATIONS to "1", then you should expect 
> that some recommended functionality will be missing, no?
>

Hi Martin,

Thanks a lot for pointing out this situation.
I've sent out a follow-up fix which sets ALLOW_EMPTY_${PN} = "1" in 
systemd-serialtty.bb.
I hope this would be sufficient.

I agree with you that if NO_RECOMMENDATIONS is set to "1", the lack of 
some functionality is allowed.
But if the user doesn't set anything related to serial console, and he's 
building our reference image (e.g. core-image-minimal) on our supported 
BSP (e.g. qemux86-64), the user should not be astonished by being unable 
to get to login.

Anyway, I hope my follow-up fix would fix things up.

Best Regards,
Chen Qi

> On Tue, Sep 5, 2017 at 10:07 AM, Chen Qi <Qi.Chen@windriver.com 
> <mailto:Qi.Chen@windriver.com>> wrote:
>
>     Set NO_RECOMMENDATIONS to "1", build and start a systemd image, and we
>     could not get serial getty spawned, thus causing the user not able to
>     login via serial port.
>
>     E.g.
>     MACHINE=qemux86-64 bitbake core-image-minimal
>     runqemu qemux86-64 nographic
>
>     And we cannot login onto the system.
>
>     Move util-linux-agetty and systemd-serialgetty (determined by
>     PACKAGECONFIG)
>     from RRECOMMENDS to RDEPENDS to fix the above problem.
>
>     Signed-off-by: Chen Qi <Qi.Chen@windriver.com
>     <mailto:Qi.Chen@windriver.com>>
>     ---
>      meta/recipes-core/systemd/systemd_234.bb <http://systemd_234.bb>
>     | 8 ++++----
>      1 file changed, 4 insertions(+), 4 deletions(-)
>
>     diff --git a/meta/recipes-core/systemd/systemd_234.bb
>     <http://systemd_234.bb> b/meta/recipes-core/systemd/systemd_234.bb
>     <http://systemd_234.bb>
>     index 2736f38..2695e15 100644
>     --- a/meta/recipes-core/systemd/systemd_234.bb <http://systemd_234.bb>
>     +++ b/meta/recipes-core/systemd/systemd_234.bb <http://systemd_234.bb>
>     @@ -492,13 +492,13 @@ FILES_${PN} = " ${base_bindir}/* \
>
>      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 util-linux-mount udev (=
>     ${EXTENDPKGV}) util-linux-agetty"
>     +RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
>     'serial-getty-generator', '', 'systemd-serialgetty', d)}"
>      RDEPENDS_${PN} += "volatile-binds update-rc.d"
>
>     -RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG',
>     'serial-getty-generator', '', 'systemd-serialgetty', d)} \
>     -                      systemd-extra-utils \
>     +RRECOMMENDS_${PN} += "systemd-extra-utils \
>                            systemd-compat-units udev-hwdb \
>     -                      util-linux-agetty  util-linux-fsck
>     e2fsprogs-e2fsck \
>     +                      util-linux-fsck e2fsprogs-e2fsck \
>                            kernel-module-autofs4 kernel-module-unix
>     kernel-module-ipv6 \
>                            os-release \
>      "
>     --
>     1.9.1
>
>     --
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>
>


[-- Attachment #2: Type: text/html, Size: 7031 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-26  8:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-05  8:07 [PATCH 0/2] systemd: fix dependency issue related to serial getty Chen Qi
2017-09-05  8:07 ` [PATCH 1/2] systemd: change some RRECOMMENDS to RDEPENDS Chen Qi
2017-09-22  9:34   ` Martin Jansa
2017-09-26  8:38     ` ChenQi
2017-09-05  8:08 ` [PATCH 2/2] systemd-serialgetty: remove systemd from RDEPENDS Chen Qi
2017-09-11  1:43 ` [PATCH 0/2] systemd: fix dependency issue related to serial getty ChenQi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.