Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
@ 2013-04-04 16:42 Martin Jansa
  2013-04-04 16:42 ` [PATCH 2/2] dbus: " Martin Jansa
  2013-04-04 16:46 ` [PATCH 1/2] systemd: " Richard Purdie
  0 siblings, 2 replies; 7+ messages in thread
From: Martin Jansa @ 2013-04-04 16:42 UTC (permalink / raw)
  To: openembedded-core

* fixes udev configure in run-postinsts failing with:
  update-rc.d: /etc/init.d/systemd-udev: file does not exist
  because systemd-udev is installed only with sysvinit in features
  but update-rc.d was always called from PN postinst

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-core/systemd/systemd_199.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
index ba1d133..e574548 100644
--- a/meta/recipes-core/systemd/systemd_199.bb
+++ b/meta/recipes-core/systemd/systemd_199.bb
@@ -239,6 +239,12 @@ INITSCRIPT_PACKAGES = "udev"
 INITSCRIPT_NAME_udev = "systemd-udevd"
 INITSCRIPT_PARAMS_udev = "start 03 S ."
 
+python __anonymous() {
+    features = d.getVar("DISTRO_FEATURES", True).split()
+    if "sysvinit" not in features:
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
 # TODO:
 # u-a for runlevel and telinit
 
-- 
1.8.1.5




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

* [PATCH 2/2] dbus: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
  2013-04-04 16:42 [PATCH 1/2] systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features Martin Jansa
@ 2013-04-04 16:42 ` Martin Jansa
  2013-04-04 16:46 ` [PATCH 1/2] systemd: " Richard Purdie
  1 sibling, 0 replies; 7+ messages in thread
From: Martin Jansa @ 2013-04-04 16:42 UTC (permalink / raw)
  To: openembedded-core

* fixes udev configure in run-postinsts failing with:
  update-rc.d: /etc/init.d/dbus-1: file does not exist
  because dbus-udev is installed only with sysvinit in features
  but update-rc.d was always called from PN postinst

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-core/dbus/dbus.inc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index bfd1167..2be5bda 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -24,6 +24,12 @@ inherit useradd autotools pkgconfig gettext update-rc.d
 INITSCRIPT_NAME = "dbus-1"
 INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
 
+python __anonymous() {
+    features = d.getVar("DISTRO_FEATURES", True).split()
+    if "sysvinit" not in features:
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "-r netdev"
 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
-- 
1.8.1.5




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

* Re: [PATCH 1/2] systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
  2013-04-04 16:42 [PATCH 1/2] systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features Martin Jansa
  2013-04-04 16:42 ` [PATCH 2/2] dbus: " Martin Jansa
@ 2013-04-04 16:46 ` Richard Purdie
  2013-04-04 16:55   ` Martin Jansa
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2013-04-04 16:46 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On Thu, 2013-04-04 at 18:42 +0200, Martin Jansa wrote:
> * fixes udev configure in run-postinsts failing with:
>   update-rc.d: /etc/init.d/systemd-udev: file does not exist
>   because systemd-udev is installed only with sysvinit in features
>   but update-rc.d was always called from PN postinst
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/recipes-core/systemd/systemd_199.bb | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
> index ba1d133..e574548 100644
> --- a/meta/recipes-core/systemd/systemd_199.bb
> +++ b/meta/recipes-core/systemd/systemd_199.bb
> @@ -239,6 +239,12 @@ INITSCRIPT_PACKAGES = "udev"
>  INITSCRIPT_NAME_udev = "systemd-udevd"
>  INITSCRIPT_PARAMS_udev = "start 03 S ."
>  
> +python __anonymous() {
> +    features = d.getVar("DISTRO_FEATURES", True).split()
> +    if "sysvinit" not in features:
> +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> +}
> +
>  # TODO:
>  # u-a for runlevel and telinit

Would this make sense to be in systemd.bbclass?

Cheers,

Richard






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

* Re: [PATCH 1/2] systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
  2013-04-04 16:46 ` [PATCH 1/2] systemd: " Richard Purdie
@ 2013-04-04 16:55   ` Martin Jansa
  2013-04-04 22:38     ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2013-04-04 16:55 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

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

On Thu, Apr 04, 2013 at 05:46:48PM +0100, Richard Purdie wrote:
> On Thu, 2013-04-04 at 18:42 +0200, Martin Jansa wrote:
> > * fixes udev configure in run-postinsts failing with:
> >   update-rc.d: /etc/init.d/systemd-udev: file does not exist
> >   because systemd-udev is installed only with sysvinit in features
> >   but update-rc.d was always called from PN postinst
> > 
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  meta/recipes-core/systemd/systemd_199.bb | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
> > index ba1d133..e574548 100644
> > --- a/meta/recipes-core/systemd/systemd_199.bb
> > +++ b/meta/recipes-core/systemd/systemd_199.bb
> > @@ -239,6 +239,12 @@ INITSCRIPT_PACKAGES = "udev"
> >  INITSCRIPT_NAME_udev = "systemd-udevd"
> >  INITSCRIPT_PARAMS_udev = "start 03 S ."
> >  
> > +python __anonymous() {
> > +    features = d.getVar("DISTRO_FEATURES", True).split()
> > +    if "sysvinit" not in features:
> > +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> > +}
> > +
> >  # TODO:
> >  # u-a for runlevel and telinit
> 
> Would this make sense to be in systemd.bbclass?

Similar logic is in systemd.bbclass already, but systemd is not inherited from
systemd and dbus recipes.

Also the version from systemd.bbclass does check also for systemd in
DISTRO_FEATURES, but that's not wanted here, because decision to install init.d
script is based only on sysvinit in DISTRO_FEATURES.

Lot's of fun with all init systems sharing the same PN :/.

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

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

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

* Re: [PATCH 1/2] systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
  2013-04-04 16:55   ` Martin Jansa
@ 2013-04-04 22:38     ` Richard Purdie
  2013-04-08 19:03       ` Martin Jansa
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2013-04-04 22:38 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On Thu, 2013-04-04 at 18:55 +0200, Martin Jansa wrote:
> On Thu, Apr 04, 2013 at 05:46:48PM +0100, Richard Purdie wrote:
> > On Thu, 2013-04-04 at 18:42 +0200, Martin Jansa wrote:
> > > * fixes udev configure in run-postinsts failing with:
> > >   update-rc.d: /etc/init.d/systemd-udev: file does not exist
> > >   because systemd-udev is installed only with sysvinit in features
> > >   but update-rc.d was always called from PN postinst
> > > 
> > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > > ---
> > >  meta/recipes-core/systemd/systemd_199.bb | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> > > 
> > > diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
> > > index ba1d133..e574548 100644
> > > --- a/meta/recipes-core/systemd/systemd_199.bb
> > > +++ b/meta/recipes-core/systemd/systemd_199.bb
> > > @@ -239,6 +239,12 @@ INITSCRIPT_PACKAGES = "udev"
> > >  INITSCRIPT_NAME_udev = "systemd-udevd"
> > >  INITSCRIPT_PARAMS_udev = "start 03 S ."
> > >  
> > > +python __anonymous() {
> > > +    features = d.getVar("DISTRO_FEATURES", True).split()
> > > +    if "sysvinit" not in features:
> > > +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> > > +}
> > > +
> > >  # TODO:
> > >  # u-a for runlevel and telinit
> > 
> > Would this make sense to be in systemd.bbclass?
> 
> Similar logic is in systemd.bbclass already, but systemd is not inherited from
> systemd and dbus recipes.

Ok, fair enough. I hadn't realised that.

> Also the version from systemd.bbclass does check also for systemd in
> DISTRO_FEATURES, but that's not wanted here, because decision to install init.d
> script is based only on sysvinit in DISTRO_FEATURES.
> 
> Lot's of fun with all init systems sharing the same PN :/.

:/.

Cheers,

Richard




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

* Re: [PATCH 1/2] systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
  2013-04-04 22:38     ` Richard Purdie
@ 2013-04-08 19:03       ` Martin Jansa
  2013-04-16 15:11         ` Burton, Ross
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2013-04-08 19:03 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

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

On Thu, Apr 04, 2013 at 11:38:41PM +0100, Richard Purdie wrote:
> On Thu, 2013-04-04 at 18:55 +0200, Martin Jansa wrote:
> > On Thu, Apr 04, 2013 at 05:46:48PM +0100, Richard Purdie wrote:
> > > On Thu, 2013-04-04 at 18:42 +0200, Martin Jansa wrote:
> > > > * fixes udev configure in run-postinsts failing with:
> > > >   update-rc.d: /etc/init.d/systemd-udev: file does not exist
> > > >   because systemd-udev is installed only with sysvinit in features
> > > >   but update-rc.d was always called from PN postinst
> > > > 
> > > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > > > ---
> > > >  meta/recipes-core/systemd/systemd_199.bb | 6 ++++++
> > > >  1 file changed, 6 insertions(+)
> > > > 
> > > > diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
> > > > index ba1d133..e574548 100644
> > > > --- a/meta/recipes-core/systemd/systemd_199.bb
> > > > +++ b/meta/recipes-core/systemd/systemd_199.bb
> > > > @@ -239,6 +239,12 @@ INITSCRIPT_PACKAGES = "udev"
> > > >  INITSCRIPT_NAME_udev = "systemd-udevd"
> > > >  INITSCRIPT_PARAMS_udev = "start 03 S ."
> > > >  
> > > > +python __anonymous() {
> > > > +    features = d.getVar("DISTRO_FEATURES", True).split()
> > > > +    if "sysvinit" not in features:
> > > > +        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
> > > > +}
> > > > +
> > > >  # TODO:
> > > >  # u-a for runlevel and telinit
> > > 
> > > Would this make sense to be in systemd.bbclass?
> > 
> > Similar logic is in systemd.bbclass already, but systemd is not inherited from
> > systemd and dbus recipes.
> 
> Ok, fair enough. I hadn't realised that.
> 
> > Also the version from systemd.bbclass does check also for systemd in
> > DISTRO_FEATURES, but that's not wanted here, because decision to install init.d
> > script is based only on sysvinit in DISTRO_FEATURES.
> > 
> > Lot's of fun with all init systems sharing the same PN :/.

There is also error from prerm :/

//var/lib/opkg/info/dbus-1.prerm: line 3: /etc/init.d/dbus-1: No such file or directory

updatercd_prerm() {
if test "x$D" = "x"; then
        ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
fi
}

not sure if testing update-rc.d existence like in postinst/postrm 
if type update-rc.d >/dev/null 2>/dev/null; then
is right way, checking ${INIT_D_DIR}/${INITSCRIPT_NAME}
existence will possibly hide some real issues...

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

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

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

* Re: [PATCH 1/2] systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
  2013-04-08 19:03       ` Martin Jansa
@ 2013-04-16 15:11         ` Burton, Ross
  0 siblings, 0 replies; 7+ messages in thread
From: Burton, Ross @ 2013-04-16 15:11 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

Hi Martin,

On 8 April 2013 20:03, Martin Jansa <martin.jansa@gmail.com> wrote:
> There is also error from prerm :/
>
> //var/lib/opkg/info/dbus-1.prerm: line 3: /etc/init.d/dbus-1: No such file or directory
>
> updatercd_prerm() {
> if test "x$D" = "x"; then
>         ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
> fi
> }
>
> not sure if testing update-rc.d existence like in postinst/postrm
> if type update-rc.d >/dev/null 2>/dev/null; then
> is right way, checking ${INIT_D_DIR}/${INITSCRIPT_NAME}
> existence will possibly hide some real issues...

This fragment doesn't exist with your explicit inhibit update-rc.d
patch, so this is effectively resolved.

Ross



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

end of thread, other threads:[~2013-04-16 15:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 16:42 [PATCH 1/2] systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features Martin Jansa
2013-04-04 16:42 ` [PATCH 2/2] dbus: " Martin Jansa
2013-04-04 16:46 ` [PATCH 1/2] systemd: " Richard Purdie
2013-04-04 16:55   ` Martin Jansa
2013-04-04 22:38     ` Richard Purdie
2013-04-08 19:03       ` Martin Jansa
2013-04-16 15:11         ` Burton, Ross

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox