All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: kill update-rc.d when not using sysvinit
@ 2015-07-28 17:11 Abdur Rehman
  2015-07-28 20:46 ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Abdur Rehman @ 2015-07-28 17:11 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

Fixes a dependency on a nonexistent initscripts-functions package.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
---
 meta/recipes-extended/watchdog/watchdog_5.14.bb |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-extended/watchdog/watchdog_5.14.bb b/meta/recipes-extended/watchdog/watchdog_5.14.bb
index 9ec0a8e..7557597 100644
--- a/meta/recipes-extended/watchdog/watchdog_5.14.bb
+++ b/meta/recipes-extended/watchdog/watchdog_5.14.bb
@@ -28,3 +28,8 @@ RRECOMMENDS_${PN} = "kernel-module-softdog"
 do_install_append() {
 	install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
 }
+
+python () {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
-- 
1.7.9.5



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

* Re: [PATCH] watchdog: kill update-rc.d when not using sysvinit
  2015-07-28 17:11 [PATCH] watchdog: kill update-rc.d when not using sysvinit Abdur Rehman
@ 2015-07-28 20:46 ` Burton, Ross
  2015-07-29 18:05   ` Rehman, Abdur
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2015-07-28 20:46 UTC (permalink / raw)
  To: Abdur Rehman; +Cc: Christopher Larson, OE-core

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

On 28 July 2015 at 18:11, Abdur Rehman <abdur_rehman@mentor.com> wrote:

> +python () {
> +    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False,
> d):
> +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> +}
>

Isn't this what the update-rcd logic does already:

    # Check that this class isn't being inhibited (generally, by
    # systemd.bbclass) before doing any work.
    if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \
       not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):

Ross

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

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

* Re: [PATCH] watchdog: kill update-rc.d when not using sysvinit
  2015-07-28 20:46 ` Burton, Ross
@ 2015-07-29 18:05   ` Rehman, Abdur
  2015-07-29 18:35     ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Rehman, Abdur @ 2015-07-29 18:05 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Larson, Chris, OE-core

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

watchdog_5.14.bb does not inherit systemd, and so INHIBIT_UPDATERCD_BBCLASS does
not get set.

While trying to build watchdog with systemd in DISTRO_FEATURES but not sysvinit,
following warning is observed:
    WARNING: QA Issue: watchdog rdepends on initscripts-functions, but it isn't
    a build dependency? [build-deps]

Since sysvinit is not in DISTRO_FEATURES and INHIBIT_UPDATERCD_BBCLASS is not
set, the logic in update-rc.d.bbclass goes on to add an rdep for watchdog on
initscripts-functions, inside update_rcd_package(). And this results in the
QA warning.

The patch sets INHIBIT_UPDATERCD_BBCLASS in the recipe to force
populate_packages_updatercd() not to proceed with update_rcd_package().

Kindly suggest if there is a better way to tackle this issue.

Abdur Rehman
________________________________
From: Burton, Ross [ross.burton@intel.com]
Sent: Wednesday, July 29, 2015 1:46 AM
To: Rehman, Abdur
Cc: OE-core; Larson, Chris
Subject: Re: [OE-core] [PATCH] watchdog: kill update-rc.d when not using sysvinit


On 28 July 2015 at 18:11, Abdur Rehman <abdur_rehman@mentor.com<mailto:abdur_rehman@mentor.com>> wrote:
+python () {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}

Isn't this what the update-rcd logic does already:

    # Check that this class isn't being inhibited (generally, by
    # systemd.bbclass) before doing any work.
    if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d) or \
       not d.getVar("INHIBIT_UPDATERCD_BBCLASS", True):

Ross

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

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

* Re: [PATCH] watchdog: kill update-rc.d when not using sysvinit
  2015-07-29 18:05   ` Rehman, Abdur
@ 2015-07-29 18:35     ` Burton, Ross
  2015-07-29 19:27       ` Christopher Larson
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2015-07-29 18:35 UTC (permalink / raw)
  To: Rehman, Abdur; +Cc: Larson, Chris, OE-core

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

On 29 July 2015 at 19:05, Rehman, Abdur <Abdur_Rehman@mentor.com> wrote:

> watchdog_5.14.bb does not inherit systemd, and so
> INHIBIT_UPDATERCD_BBCLASS does
> not get set.
>
> While trying to build watchdog with systemd in DISTRO_FEATURES but not
> sysvinit,
> following warning is observed:
>     WARNING: QA Issue: watchdog rdepends on initscripts-functions, but it
> isn't
>     a build dependency? [build-deps]
>
> Since sysvinit is not in DISTRO_FEATURES and INHIBIT_UPDATERCD_BBCLASS is
> not
> set, the logic in update-rc.d.bbclass goes on to add an rdep for watchdog
> on
> initscripts-functions, inside update_rcd_package(). And this results in the
> QA warning.
>

When a class inherits update-rcd but not systemd, and the distro is systemd
only, update-rcd still runs (and has still run) as otherwise you don't get
any init scripts.  Setting inhibit will remove the init scripts, and the
watchdog daemon won't start.  I'm pretty sure this isn't what you intended.

Are you overriding VIRTUAL-RUNTIME_initscripts in your distro?  update-rcd
adds a dependency on that when it is inherited, which by default is
initscripts, so you get your build dependency there.  I suspect your distro
is overriding that variable when perhaps it shouldn't be.

Ross

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

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

* Re: [PATCH] watchdog: kill update-rc.d when not using sysvinit
  2015-07-29 18:35     ` Burton, Ross
@ 2015-07-29 19:27       ` Christopher Larson
  2015-07-29 19:48         ` Burton, Ross
  2015-07-29 20:19         ` Martin Jansa
  0 siblings, 2 replies; 10+ messages in thread
From: Christopher Larson @ 2015-07-29 19:27 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

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

On Wed, Jul 29, 2015 at 11:35 AM, Burton, Ross <ross.burton@intel.com>
wrote:

> On 29 July 2015 at 19:05, Rehman, Abdur <Abdur_Rehman@mentor.com> wrote:
>
>> watchdog_5.14.bb does not inherit systemd, and so
>> INHIBIT_UPDATERCD_BBCLASS does
>> not get set.
>>
>> While trying to build watchdog with systemd in DISTRO_FEATURES but not
>> sysvinit,
>> following warning is observed:
>>     WARNING: QA Issue: watchdog rdepends on initscripts-functions, but
>> it isn't
>>     a build dependency? [build-deps]
>>
>> Since sysvinit is not in DISTRO_FEATURES and INHIBIT_UPDATERCD_BBCLASS is
>> not
>> set, the logic in update-rc.d.bbclass goes on to add an rdep for watchdog
>> on
>> initscripts-functions, inside update_rcd_package(). And this results in
>> the
>> QA warning.
>>
>
> When a class inherits update-rcd but not systemd, and the distro is
> systemd only, update-rcd still runs (and has still run) as otherwise you
> don't get any init scripts.  Setting inhibit will remove the init scripts,
> and the watchdog daemon won't start.  I'm pretty sure this isn't what you
> intended.
>
> Are you overriding VIRTUAL-RUNTIME_initscripts in your distro?  update-rcd
> adds a dependency on that when it is inherited, which by default is
> initscripts, so you get your build dependency there.  I suspect your distro
> is overriding that variable when perhaps it shouldn't be.
>

I don’t think we really want initscripts installed in a systemd-only
distro, particularly if systemd is built with sysvcompat enabled, as we
don’t want to run the sysvinit scripts for services which are already
covered by systemd proper, unless I’m missing something?
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

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

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

* Re: [PATCH] watchdog: kill update-rc.d when not using sysvinit
  2015-07-29 19:27       ` Christopher Larson
@ 2015-07-29 19:48         ` Burton, Ross
  2015-07-29 20:09           ` Christopher Larson
  2015-07-29 20:19         ` Martin Jansa
  1 sibling, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2015-07-29 19:48 UTC (permalink / raw)
  To: Christopher Larson; +Cc: OE-core

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

On 29 July 2015 at 20:27, Christopher Larson <chris_larson@mentor.com>
wrote:

> I don’t think we really want initscripts installed in a systemd-only
> distro, particularly if systemd is built with sysvcompat enabled, as we
> don’t want to run the sysvinit scripts for services which are already
> covered by systemd proper, unless I’m missing something?
>

The dependency on initscripts via VIRTUAL-RUNTIME_initscripts is a DEPENDS,
so it's build time.  The runtime dependency is on initscripts-functions.

As far as I'm aware the sysv-generator used the rcX.d symlinks generated by
update-rcd to decide what to start when, so you can't just disable the
class and expect it to still work.

Ross

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

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

* Re: [PATCH] watchdog: kill update-rc.d when not using sysvinit
  2015-07-29 19:48         ` Burton, Ross
@ 2015-07-29 20:09           ` Christopher Larson
  2015-07-30 12:53             ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Christopher Larson @ 2015-07-29 20:09 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

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

On Wed, Jul 29, 2015 at 12:48 PM, Burton, Ross <ross.burton@intel.com>
wrote:

> On 29 July 2015 at 20:27, Christopher Larson <chris_larson@mentor.com>
> wrote:
>
>> I don’t think we really want initscripts installed in a systemd-only
>> distro, particularly if systemd is built with sysvcompat enabled, as we
>> don’t want to run the sysvinit scripts for services which are already
>> covered by systemd proper, unless I’m missing something?
>>
>
> The dependency on initscripts via VIRTUAL-RUNTIME_initscripts is a
> DEPENDS, so it's build time.  The runtime dependency is on
> initscripts-functions.
>
> As far as I'm aware the sysv-generator used the rcX.d symlinks generated
> by update-rcd to decide what to start when, so you can't just disable the
> class and expect it to still work.
>

VIRTUAL-RUNTIME_initscripts is installed at runtime (as you can tell by its
name) in packagegroup-core-boot and packagegroup-core-full-cmdline both. If
I don’t want it in my images, wiping the variable is the only method that
makes any sense.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

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

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

* Re: [PATCH] watchdog: kill update-rc.d when not using sysvinit
  2015-07-29 19:27       ` Christopher Larson
  2015-07-29 19:48         ` Burton, Ross
@ 2015-07-29 20:19         ` Martin Jansa
  1 sibling, 0 replies; 10+ messages in thread
From: Martin Jansa @ 2015-07-29 20:19 UTC (permalink / raw)
  To: Christopher Larson; +Cc: OE-core

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

On Wed, Jul 29, 2015 at 12:27:15PM -0700, Christopher Larson wrote:
> On Wed, Jul 29, 2015 at 11:35 AM, Burton, Ross <ross.burton@intel.com>
> wrote:
> 
> > On 29 July 2015 at 19:05, Rehman, Abdur <Abdur_Rehman@mentor.com> wrote:
> >
> >> watchdog_5.14.bb does not inherit systemd, and so
> >> INHIBIT_UPDATERCD_BBCLASS does
> >> not get set.
> >>
> >> While trying to build watchdog with systemd in DISTRO_FEATURES but not
> >> sysvinit,
> >> following warning is observed:
> >>     WARNING: QA Issue: watchdog rdepends on initscripts-functions, but
> >> it isn't
> >>     a build dependency? [build-deps]
> >>
> >> Since sysvinit is not in DISTRO_FEATURES and INHIBIT_UPDATERCD_BBCLASS is
> >> not
> >> set, the logic in update-rc.d.bbclass goes on to add an rdep for watchdog
> >> on
> >> initscripts-functions, inside update_rcd_package(). And this results in
> >> the
> >> QA warning.
> >>
> >
> > When a class inherits update-rcd but not systemd, and the distro is
> > systemd only, update-rcd still runs (and has still run) as otherwise you
> > don't get any init scripts.  Setting inhibit will remove the init scripts,
> > and the watchdog daemon won't start.  I'm pretty sure this isn't what you
> > intended.
> >
> > Are you overriding VIRTUAL-RUNTIME_initscripts in your distro?  update-rcd
> > adds a dependency on that when it is inherited, which by default is
> > initscripts, so you get your build dependency there.  I suspect your distro
> > is overriding that variable when perhaps it shouldn't be.
> >
> 
> I don’t think we really want initscripts installed in a systemd-only
> distro, particularly if systemd is built with sysvcompat enabled, as we
> don’t want to run the sysvinit scripts for services which are already
> covered by systemd proper, unless I’m missing something?

I agree and as work-around for this and similar issues I'm setting empty
VIRTUAL-RUNTIME_initscripts in systemd-only distros.

> -- 
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics

> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [PATCH] watchdog: kill update-rc.d when not using sysvinit
  2015-07-29 20:09           ` Christopher Larson
@ 2015-07-30 12:53             ` Burton, Ross
  2015-07-30 15:13               ` Christopher Larson
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2015-07-30 12:53 UTC (permalink / raw)
  To: Christopher Larson; +Cc: OE-core

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

On 29 July 2015 at 21:09, Christopher Larson <chris_larson@mentor.com>
wrote:

> The dependency on initscripts via VIRTUAL-RUNTIME_initscripts is a
>> DEPENDS, so it's build time.  The runtime dependency is on
>> initscripts-functions.
>>
>> As far as I'm aware the sysv-generator used the rcX.d symlinks generated
>> by update-rcd to decide what to start when, so you can't just disable the
>> class and expect it to still work.
>>
>
> VIRTUAL-RUNTIME_initscripts is installed at runtime (as you can tell by
> its name) in packagegroup-core-boot and packagegroup-core-full-cmdline
> both. If I don’t want it in my images, wiping the variable is the only
> method that makes any sense.


So there's the problem, and breaking watchdog isn't solving it.

Ross

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

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

* Re: [PATCH] watchdog: kill update-rc.d when not using sysvinit
  2015-07-30 12:53             ` Burton, Ross
@ 2015-07-30 15:13               ` Christopher Larson
  0 siblings, 0 replies; 10+ messages in thread
From: Christopher Larson @ 2015-07-30 15:13 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

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

On Thu, Jul 30, 2015 at 5:53 AM, Burton, Ross <ross.burton@intel.com> wrote:

> On 29 July 2015 at 21:09, Christopher Larson <chris_larson@mentor.com>
> wrote:
>
>> The dependency on initscripts via VIRTUAL-RUNTIME_initscripts is a
>>> DEPENDS, so it's build time.  The runtime dependency is on
>>> initscripts-functions.
>>>
>>> As far as I'm aware the sysv-generator used the rcX.d symlinks generated
>>> by update-rcd to decide what to start when, so you can't just disable the
>>> class and expect it to still work.
>>>
>>
>> VIRTUAL-RUNTIME_initscripts is installed at runtime (as you can tell by
>> its name) in packagegroup-core-boot and packagegroup-core-full-cmdline
>> both. If I don’t want it in my images, wiping the variable is the only
>> method that makes any sense.
>
>
> So there's the problem, and breaking watchdog isn't solving it.


I don’t think taking a package that won’t even install, breaking image
creation entirely, and letting it install, though not autostart, is
“breaking watchdog” any worse than it already was.

That said, a better approach would probably be for update-rc.d.bbclass to
explicitly DEPENDS on initscripts, not VIRTUAL-RUNTIME_initscripts. The
latter isn’t guaranteed to provide initscripts-functions, it could be any
recipe that provides baseline startup scripts. Adding initscripts directly
would ensure that the initscripts-functions runtime dependency is satisfied
in all cases.
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

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

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

end of thread, other threads:[~2015-07-30 15:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-28 17:11 [PATCH] watchdog: kill update-rc.d when not using sysvinit Abdur Rehman
2015-07-28 20:46 ` Burton, Ross
2015-07-29 18:05   ` Rehman, Abdur
2015-07-29 18:35     ` Burton, Ross
2015-07-29 19:27       ` Christopher Larson
2015-07-29 19:48         ` Burton, Ross
2015-07-29 20:09           ` Christopher Larson
2015-07-30 12:53             ` Burton, Ross
2015-07-30 15:13               ` Christopher Larson
2015-07-29 20:19         ` Martin Jansa

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.