* [PATCH 0/2] Split the functions script into a separate package in initscripts
@ 2013-12-25 8:36 Qi.Chen
2013-12-25 8:36 ` [PATCH 1/2] initscripts: split the functions script into a separate package Qi.Chen
2013-12-25 8:36 ` [PATCH 2/2] packagegroup-core-boot: make initscripts-functions a basic element of RDEPENDS Qi.Chen
0 siblings, 2 replies; 4+ messages in thread
From: Qi.Chen @ 2013-12-25 8:36 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
This is part of the systemd integration work.
Now we have two init systems in our project -- SysV and systemd.
If we are only using the SysV based systems, everything's happy because the initscripts
package will and should be always installed. As a part of the package, the /etc/init.d/functions
script is always available. And other init scripts which source this script don't have any problem.
Things are different when we are using systemd based systems. Basically the initscripts
package is useless in systemd based images and should not be installed. We can do this
by setting VIRTUAL-RUNTIME_initscripts to "". This leads to the problem that some services
failing to start because of lack of the /etc/init.d/functions script. An example is the distcc.
The above situation leads to a natural solution of splitting the functions script into a
separate package, say, initscripts-functions. As the /etc/init.d/functions script is useful
for both SysV and systemd systems, this patch also adds it to the RDEPENDS of packagegroup-core-boot.
//Chen Qi
The following changes since commit 005af45191ded6185c618c708181b31281e43092:
bitbake: fetch2: avoid printing "no checksum" error message twice (2013-12-22 14:29:13 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/initscripts-functions
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/initscripts-functions
Chen Qi (2):
initscripts: split the functions script into a separate package
packagegroup-core-boot: make initscripts-functions a basic element of
RDEPENDS
meta/recipes-core/initscripts/initscripts_1.0.bb | 8 ++++++--
.../packagegroups/packagegroup-core-boot.bb | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] initscripts: split the functions script into a separate package
2013-12-25 8:36 [PATCH 0/2] Split the functions script into a separate package in initscripts Qi.Chen
@ 2013-12-25 8:36 ` Qi.Chen
2013-12-25 8:36 ` [PATCH 2/2] packagegroup-core-boot: make initscripts-functions a basic element of RDEPENDS Qi.Chen
1 sibling, 0 replies; 4+ messages in thread
From: Qi.Chen @ 2013-12-25 8:36 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
Many SysV init scripts need the /etc/init.d/functions script. But
this script is part of the initscripts package. As a result, the
initscripts package should always be installed into the system to
avoid errors when starting daemons. However, it makes no sense to
install the initscripts package into a systemd based image, because
what the init scripts provide has already been provided by the systemd.
On the other hand, the functions script might be still needed in a
systemd based image because other init scripts such as distcc might need
it.
The above situation leads to a natural separation of the functions script
from the initscripts package. And this patch does so. It separates the
functions script into initscripts-functions packages.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-core/initscripts/initscripts_1.0.bb | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 5951e0c..ea28672 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -42,8 +42,12 @@ KERNEL_VERSION = ""
inherit update-alternatives
DEPENDS_append = " update-rc.d-native"
-ALTERNATIVE_PRIORITY = "90"
-ALTERNATIVE_${PN} = "functions"
+PACKAGES =+ "${PN}-functions"
+RDEPENDS_${PN} = "${PN}-functions"
+FILES_${PN}-functions = "${sysconfdir}/init.d/functions.${PN}"
+
+ALTERNATIVE_PRIORITY_${PN}-functions = "90"
+ALTERNATIVE_${PN}-functions = "functions"
ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
HALTARGS ?= "-d -f"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] packagegroup-core-boot: make initscripts-functions a basic element of RDEPENDS
2013-12-25 8:36 [PATCH 0/2] Split the functions script into a separate package in initscripts Qi.Chen
2013-12-25 8:36 ` [PATCH 1/2] initscripts: split the functions script into a separate package Qi.Chen
@ 2013-12-25 8:36 ` Qi.Chen
2013-12-26 17:23 ` Saul Wold
1 sibling, 1 reply; 4+ messages in thread
From: Qi.Chen @ 2013-12-25 8:36 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
Unlike the initscripts package which is useful in SysV systems but
not so useful in systemd systems, the initscripts-functions package
is useful for both.
For the reason stated above, this patch adds initscripts-funtions to
the RDEPENDS of packagegroup-core-boot.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
.../packagegroups/packagegroup-core-boot.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 5455899..2f60c97 100644
--- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -41,6 +41,7 @@ RDEPENDS_${PN} = "\
${@base_contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
${@base_contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
netbase \
+ initscripts-functions \
${VIRTUAL-RUNTIME_login_manager} \
${VIRTUAL-RUNTIME_init_manager} \
${VIRTUAL-RUNTIME_initscripts} \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 2/2] packagegroup-core-boot: make initscripts-functions a basic element of RDEPENDS
2013-12-25 8:36 ` [PATCH 2/2] packagegroup-core-boot: make initscripts-functions a basic element of RDEPENDS Qi.Chen
@ 2013-12-26 17:23 ` Saul Wold
0 siblings, 0 replies; 4+ messages in thread
From: Saul Wold @ 2013-12-26 17:23 UTC (permalink / raw)
To: Qi.Chen, openembedded-core
On 12/25/2013 12:36 AM, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> Unlike the initscripts package which is useful in SysV systems but
> not so useful in systemd systems, the initscripts-functions package
> is useful for both.
>
> For the reason stated above, this patch adds initscripts-funtions to
> the RDEPENDS of packagegroup-core-boot.
>
Why not add the RDEPENDS on the initscript-functions to the appropriate
recipes, such as distcc or others that require the contents of functions?
I understand the general value of having it installed, but if
"functions" is only required for some recipes, then let's not add it in
again if unneeded.
Sau!
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> .../packagegroups/packagegroup-core-boot.bb | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> index 5455899..2f60c97 100644
> --- a/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> +++ b/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> @@ -41,6 +41,7 @@ RDEPENDS_${PN} = "\
> ${@base_contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
> ${@base_contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
> netbase \
> + initscripts-functions \
> ${VIRTUAL-RUNTIME_login_manager} \
> ${VIRTUAL-RUNTIME_init_manager} \
> ${VIRTUAL-RUNTIME_initscripts} \
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-26 17:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-25 8:36 [PATCH 0/2] Split the functions script into a separate package in initscripts Qi.Chen
2013-12-25 8:36 ` [PATCH 1/2] initscripts: split the functions script into a separate package Qi.Chen
2013-12-25 8:36 ` [PATCH 2/2] packagegroup-core-boot: make initscripts-functions a basic element of RDEPENDS Qi.Chen
2013-12-26 17:23 ` Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox