* [PATCH 0/2] update-alternatives rework with update-alternatives.bbclass
@ 2013-04-09 14:02 Radu Moisan
2013-04-09 14:02 ` [PATCH 1/2] systemd: use update-alternatives.bbclass Radu Moisan
2013-04-09 14:02 ` [PATCH 2/2] systemd: set default.target to multi-user.target Radu Moisan
0 siblings, 2 replies; 8+ messages in thread
From: Radu Moisan @ 2013-04-09 14:02 UTC (permalink / raw)
To: openembedded-core
Radu Moisan (2):
systemd: use update-alternatives.bbclass
systemd: set default.target to multi-user.target
meta/recipes-core/systemd/systemd_199.bb | 40 +++++++++++++++++++-----------
1 file changed, 25 insertions(+), 15 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] systemd: use update-alternatives.bbclass
2013-04-09 14:02 [PATCH 0/2] update-alternatives rework with update-alternatives.bbclass Radu Moisan
@ 2013-04-09 14:02 ` Radu Moisan
2013-04-09 14:53 ` Burton, Ross
2013-04-09 14:02 ` [PATCH 2/2] systemd: set default.target to multi-user.target Radu Moisan
1 sibling, 1 reply; 8+ messages in thread
From: Radu Moisan @ 2013-04-09 14:02 UTC (permalink / raw)
To: openembedded-core
switch from using plain update-alternatives command to
update-alternatives.bbclass style
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
---
meta/recipes-core/systemd/systemd_199.bb | 36 +++++++++++++++++-------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
index 2464b83..354e557 100644
--- a/meta/recipes-core/systemd/systemd_199.bb
+++ b/meta/recipes-core/systemd/systemd_199.bb
@@ -16,7 +16,7 @@ DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
SECTION = "base/shell"
-inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d update-alternatives
SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
file://touchscreen.rules \
@@ -251,21 +251,27 @@ python __anonymous() {
# TODO:
# u-a for runlevel and telinit
-pkg_postinst_systemd () {
-update-alternatives --install ${base_sbindir}/init init ${systemd_unitdir}/systemd 300
-update-alternatives --install ${base_sbindir}/halt halt ${base_bindir}/systemctl 300
-update-alternatives --install ${base_sbindir}/reboot reboot ${base_bindir}/systemctl 300
-update-alternatives --install ${base_sbindir}/shutdown shutdown ${base_bindir}/systemctl 300
-update-alternatives --install ${base_sbindir}/poweroff poweroff ${base_bindir}/systemctl 300
-}
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff"
-pkg_prerm_systemd () {
-update-alternatives --remove init ${systemd_unitdir}/systemd
-update-alternatives --remove halt ${base_bindir}/systemctl
-update-alternatives --remove reboot ${base_bindir}/systemctl
-update-alternatives --remove shutdown ${base_bindir}/systemctl
-update-alternatives --remove poweroff ${base_bindir}/systemctl
-}
+ALTERNATIVE_TARGET[init] = "${systemd_unitdir}/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
pkg_postinst_udev-hwdb () {
if test -n "$D"; then
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] systemd: set default.target to multi-user.target
2013-04-09 14:02 [PATCH 0/2] update-alternatives rework with update-alternatives.bbclass Radu Moisan
2013-04-09 14:02 ` [PATCH 1/2] systemd: use update-alternatives.bbclass Radu Moisan
@ 2013-04-09 14:02 ` Radu Moisan
2013-04-09 14:58 ` Burton, Ross
1 sibling, 1 reply; 8+ messages in thread
From: Radu Moisan @ 2013-04-09 14:02 UTC (permalink / raw)
To: openembedded-core
This fixes a service dependency issue;
When graphical.target is the default mode, systemd
will try to start display-manager.service which is not
available on some targets.
For xserver-nodm-init we would then have something like:
inherit update-alternatives
ALTERNATIVE_${PN} = "systemd-def-target"
ALTERNATIVE_TARGET[systemd-def-target] =
"${systemd_unitdir}/system/graphical.target"
ALTERNATIVE_LINK_NAME[systemd-def-target] =
"${systemd_unitdir}/system/default.target"
ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"
Fixes [Yocto #3816]
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
---
meta/recipes-core/systemd/systemd_199.bb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
index 354e557..bd5881b 100644
--- a/meta/recipes-core/systemd/systemd_199.bb
+++ b/meta/recipes-core/systemd/systemd_199.bb
@@ -251,7 +251,7 @@ python __anonymous() {
# TODO:
# u-a for runlevel and telinit
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff"
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff systemd-def-target"
ALTERNATIVE_TARGET[init] = "${systemd_unitdir}/systemd"
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
@@ -273,6 +273,10 @@ ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+ALTERNATIVE_TARGET[systemd-def-target] = "${systemd_unitdir}/system/multi-user.target"
+ALTERNATIVE_LINK_NAME[systemd-def-target] = "${systemd_unitdir}/system/default.target"
+ALTERNATIVE_PRIORITY[systemd-def-target] ?= "1"
+
pkg_postinst_udev-hwdb () {
if test -n "$D"; then
exit 1
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] systemd: set default.target to multi-user.target
2013-04-09 14:09 [PATCH 0/2 v2]systemd: update-alternatives rework with update-alternatives.bbclass Radu Moisan
@ 2013-04-09 14:09 ` Radu Moisan
0 siblings, 0 replies; 8+ messages in thread
From: Radu Moisan @ 2013-04-09 14:09 UTC (permalink / raw)
To: openembedded-core
This fixes a service dependency issue;
When graphical.target is the default mode, systemd
will try to start display-manager.service which is not
available on some targets.
For xserver-nodm-init we would then have something like:
inherit update-alternatives
ALTERNATIVE_${PN} = "systemd-def-target"
ALTERNATIVE_TARGET[systemd-def-target] =
"${systemd_unitdir}/system/graphical.target"
ALTERNATIVE_LINK_NAME[systemd-def-target] =
"${systemd_unitdir}/system/default.target"
ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"
Fixes [Yocto #3816]
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
---
meta/recipes-core/systemd/systemd_199.bb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/systemd/systemd_199.bb b/meta/recipes-core/systemd/systemd_199.bb
index 354e557..bd5881b 100644
--- a/meta/recipes-core/systemd/systemd_199.bb
+++ b/meta/recipes-core/systemd/systemd_199.bb
@@ -251,7 +251,7 @@ python __anonymous() {
# TODO:
# u-a for runlevel and telinit
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff"
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff systemd-def-target"
ALTERNATIVE_TARGET[init] = "${systemd_unitdir}/systemd"
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
@@ -273,6 +273,10 @@ ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+ALTERNATIVE_TARGET[systemd-def-target] = "${systemd_unitdir}/system/multi-user.target"
+ALTERNATIVE_LINK_NAME[systemd-def-target] = "${systemd_unitdir}/system/default.target"
+ALTERNATIVE_PRIORITY[systemd-def-target] ?= "1"
+
pkg_postinst_udev-hwdb () {
if test -n "$D"; then
exit 1
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] systemd: use update-alternatives.bbclass
2013-04-09 14:02 ` [PATCH 1/2] systemd: use update-alternatives.bbclass Radu Moisan
@ 2013-04-09 14:53 ` Burton, Ross
0 siblings, 0 replies; 8+ messages in thread
From: Burton, Ross @ 2013-04-09 14:53 UTC (permalink / raw)
To: Radu Moisan; +Cc: openembedded-core
On 9 April 2013 15:02, Radu Moisan <radu.moisan@intel.com> wrote:
> switch from using plain update-alternatives command to
> update-alternatives.bbclass style
>
> Signed-off-by: Radu Moisan <radu.moisan@intel.com>
Acked-By: Ross Burton <ross.burton@intel.com>
Ross
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] systemd: set default.target to multi-user.target
2013-04-09 14:02 ` [PATCH 2/2] systemd: set default.target to multi-user.target Radu Moisan
@ 2013-04-09 14:58 ` Burton, Ross
2013-04-09 15:03 ` Radu Moisan
0 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2013-04-09 14:58 UTC (permalink / raw)
To: Radu Moisan; +Cc: openembedded-core
On 9 April 2013 15:02, Radu Moisan <radu.moisan@intel.com> wrote:
> This fixes a service dependency issue;
> When graphical.target is the default mode, systemd
> will try to start display-manager.service which is not
> available on some targets.
>
> For xserver-nodm-init we would then have something like:
> inherit update-alternatives
> ALTERNATIVE_${PN} = "systemd-def-target"
> ALTERNATIVE_TARGET[systemd-def-target] =
> "${systemd_unitdir}/system/graphical.target"
> ALTERNATIVE_LINK_NAME[systemd-def-target] =
> "${systemd_unitdir}/system/default.target"
> ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"
If we're going to make this change we also need to fix
xserver-nodm-init at the same time otherwise we break graphical boots
in oe-core.
Ross
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] systemd: set default.target to multi-user.target
2013-04-09 14:58 ` Burton, Ross
@ 2013-04-09 15:03 ` Radu Moisan
2013-04-09 15:11 ` Radu Moisan
0 siblings, 1 reply; 8+ messages in thread
From: Radu Moisan @ 2013-04-09 15:03 UTC (permalink / raw)
To: Burton, Ross; +Cc: openembedded-core
On 04/09/2013 05:58 PM, Burton, Ross wrote:
> On 9 April 2013 15:02, Radu Moisan <radu.moisan@intel.com> wrote:
>> This fixes a service dependency issue;
>> When graphical.target is the default mode, systemd
>> will try to start display-manager.service which is not
>> available on some targets.
>>
>> For xserver-nodm-init we would then have something like:
>> inherit update-alternatives
>> ALTERNATIVE_${PN} = "systemd-def-target"
>> ALTERNATIVE_TARGET[systemd-def-target] =
>> "${systemd_unitdir}/system/graphical.target"
>> ALTERNATIVE_LINK_NAME[systemd-def-target] =
>> "${systemd_unitdir}/system/default.target"
>> ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"
> If we're going to make this change we also need to fix
> xserver-nodm-init at the same time otherwise we break graphical boots
> in oe-core.
I have a patch waiting for this for a while. I'll rebase and send if you
want it.
Radu
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] systemd: set default.target to multi-user.target
2013-04-09 15:03 ` Radu Moisan
@ 2013-04-09 15:11 ` Radu Moisan
0 siblings, 0 replies; 8+ messages in thread
From: Radu Moisan @ 2013-04-09 15:11 UTC (permalink / raw)
To: openembedded-core
On 04/09/2013 06:03 PM, Radu Moisan wrote:
>
> On 04/09/2013 05:58 PM, Burton, Ross wrote:
>> On 9 April 2013 15:02, Radu Moisan <radu.moisan@intel.com> wrote:
>>> This fixes a service dependency issue;
>>> When graphical.target is the default mode, systemd
>>> will try to start display-manager.service which is not
>>> available on some targets.
>>>
>>> For xserver-nodm-init we would then have something like:
>>> inherit update-alternatives
>>> ALTERNATIVE_${PN} = "systemd-def-target"
>>> ALTERNATIVE_TARGET[systemd-def-target] =
>>> "${systemd_unitdir}/system/graphical.target"
>>> ALTERNATIVE_LINK_NAME[systemd-def-target] =
>>> "${systemd_unitdir}/system/default.target"
>>> ALTERNATIVE_PRIORITY[systemd-def-target] ?= "10"
>> If we're going to make this change we also need to fix
>> xserver-nodm-init at the same time otherwise we break graphical boots
>> in oe-core.
>
> I have a patch waiting for this for a while. I'll rebase and send if
> you want it.
>
dropping this for now.
Radu
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-04-09 15:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-09 14:02 [PATCH 0/2] update-alternatives rework with update-alternatives.bbclass Radu Moisan
2013-04-09 14:02 ` [PATCH 1/2] systemd: use update-alternatives.bbclass Radu Moisan
2013-04-09 14:53 ` Burton, Ross
2013-04-09 14:02 ` [PATCH 2/2] systemd: set default.target to multi-user.target Radu Moisan
2013-04-09 14:58 ` Burton, Ross
2013-04-09 15:03 ` Radu Moisan
2013-04-09 15:11 ` Radu Moisan
-- strict thread matches above, loose matches on Subject: below --
2013-04-09 14:09 [PATCH 0/2 v2]systemd: update-alternatives rework with update-alternatives.bbclass Radu Moisan
2013-04-09 14:09 ` [PATCH 2/2] systemd: set default.target to multi-user.target Radu Moisan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox