systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
PATCH 1/2 systemd: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
* 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
--- meta/recipes-core/systemd/systemd_199.bb | 6 ++++++ 1 file changed, 6 insertions(+)
meta/recipes-core/systemd/systemd_199.bb +6 -0
@@ -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
Signature · 1 line
1.8.1.5
PATCH 2/2 dbus: set INHIBIT_UPDATERCD_BBCLASS without sysvinit in features
* 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
--- meta/recipes-core/dbus/dbus.inc | 6 ++++++ 1 file changed, 6 insertions(+)
meta/recipes-core/dbus/dbus.inc +6 -0
@@ -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 \
Signature · 1 line
1.8.1.5
Quoted 16 lines · Martin Jansa
* 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 postinstSigned-off-by Martin Jansa <[email protected]>--- meta/recipes-core/systemd/systemd_199.bb | 6 ++++++ 1 file changed, 6 insertions(+)meta/recipes-core/systemd/systemd_199.bb +0
-0@@ -239,6 +239,12 @@ INITSCRIPT_PACKAGES = "udev" INITSCRIPT_NAME_udev = "systemd-udevd"
meta/recipes-core/systemd/systemd_199.bb INITSCRIPT_PACKAGES = "udev" · line 249
Quoted 10 lines
meta/recipes-core/systemd/systemd_199.bb +6
-0INITSCRIPT_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
Quoted 19 lines · Richard Purdie
Quoted 18 lines · Martin Jansa
* 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 postinstSigned-off-by Martin Jansa <[email protected]>--- meta/recipes-core/systemd/systemd_199.bb | 6 ++++++ 1 file changed, 6 insertions(+)meta/recipes-core/systemd/systemd_199.bb +0
-0@@ -239,6 +239,12 @@ INITSCRIPT_PACKAGES = "udev" INITSCRIPT_NAME_udev = "systemd-udevd" INITSCRIPT_PARAMS_udev = "start 03 S ."
Quoted 10 lines
meta/recipes-core/systemd/systemd_199.bb INITSCRIPT_PACKAGES = "udev" · line 249
Quoted 8 lines
meta/recipes-core/systemd/systemd_199.bb +6
-0+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 telinitWould 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 :/.
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 31 lines · Martin Jansa
Quoted 19 lines · Richard Purdie
Quoted 18 lines · Martin Jansa
* 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 postinstSigned-off-by Martin Jansa <[email protected]>--- meta/recipes-core/systemd/systemd_199.bb | 6 ++++++ 1 file changed, 6 insertions(+)meta/recipes-core/systemd/systemd_199.bb +0
-0@@ -239,6 +239,12 @@ INITSCRIPT_PACKAGES = "udev" INITSCRIPT_NAME_udev = "systemd-udevd" INITSCRIPT_PARAMS_udev = "start 03 S ."Quoted 10 lines
meta/recipes-core/systemd/systemd_199.bb INITSCRIPT_PACKAGES = "udev" · line 249
Quoted 8 lines
meta/recipes-core/systemd/systemd_199.bb +6
-0+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 telinitWould this make sense to be in systemd.bbclass?
Quoted 2 lines
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.
Quoted 5 lines
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 inDISTRO_FEATURES.Lot's of fun with all init systems sharing the same PN :/.
:/.
Cheers,
Richard
Quoted 32 lines · Richard Purdie
Quoted 31 lines · Martin Jansa
Quoted 29 lines · Richard Purdie
Quoted 16 lines · Martin Jansa
* 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 postinstSigned-off-by Martin Jansa <[email protected]>--- meta/recipes-core/systemd/systemd_199.bb | 6 ++++++ 1 file changed, 6 insertions(+)meta/recipes-core/systemd/systemd_199.bb +0
-0@@ -239,6 +239,12 @@ INITSCRIPT_PACKAGES = "udev" INITSCRIPT_NAME_udev = "systemd-udevd"meta/recipes-core/systemd/systemd_199.bb INITSCRIPT_PACKAGES = "udev" · line 249
Quoted 10 lines
meta/recipes-core/systemd/systemd_199.bb +6
-0INITSCRIPT_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 telinitWould this make sense to be in systemd.bbclass?
Quoted 10 lines
Quoted 2 lines
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.
Quoted 5 lines
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 inDISTRO_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} stopfi
}
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
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Hi Martin,
Quoted 6 lines · Martin Jansa
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
Quoted 8 lines
${INIT_D_DIR}/${INITSCRIPT_NAME} stopfi
}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