Split the functions script into a separate package in initscripts
v2 cover Split the functions script into a separate package in initscripts
Changes since V1:
1. Add initscripts-functions to the REPENDS of the packages that need it instead of always intalling it.
//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 Add missing RDEPENDS of initscripts-functions
meta/recipes-bsp/alsa-state/alsa-state.bb | 2 +- meta/recipes-bsp/apmd/apmd_3.2.2-14.bb | 1 + .../irda-utils/irda-utils_0.9.18.bb | 2 ++ .../nfs-utils/nfs-utils_1.2.9.bb | 4 ++-- meta/recipes-connectivity/openssh/openssh_6.4p1.bb | 2 +- meta/recipes-connectivity/ppp/ppp_2.4.5.bb | 1 + meta/recipes-core/dbus/dbus.inc | 2 +- meta/recipes-core/initscripts/initscripts_1.0.bb | 8 ++++++-- meta/recipes-core/systemd/systemd_208.bb | 2 +- meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 2 +- meta/recipes-devtools/distcc/distcc_3.1.bb | 1 + meta/recipes-devtools/tcf-agent/tcf-agent_git.bb | 2 +- meta/recipes-extended/at/at_3.1.14.bb | 3 +-- meta/recipes-extended/cronie/cronie_1.4.11.bb | 2 ++ meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb | 2 ++ meta/recipes-extended/sysklogd/sysklogd.inc | 2 ++ meta/recipes-extended/xinetd/xinetd_2.3.15.bb | 1 + .../oprofile/oprofileui-server_git.bb | 2 +- 18 files changed, 28 insertions(+), 13 deletions(-)
Signature · 1 line
1.7.9.5
PATCH v2 1/2 initscripts: split the functions script into a separate package
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.
--- meta/recipes-core/initscripts/initscripts_1.0.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +6 -2
@@ -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"
Signature · 1 line
1.7.9.5
Re: [PATCH V2 1/2] initscripts: split the functions script into a separate package
Quoted 10 lines · Chen Qi
Many SysV init scripts need the
/etc/init.d/functionsscript. 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.
Quoted 4 lines
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.
There seems to be a problem with the multi-lib build, please check this logfile for errors.
Thanks
Sau!
Quoted 25 lines
Signed-off-by Chen Qi <[email protected]>--- meta/recipes-core/initscripts/initscripts_1.0.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)meta/recipes-core/initscripts/initscripts_1.0.bb +6
-2@@ -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"
Re: [PATCH V2 1/2] initscripts: split the functions script into a separate package
Quoted 16 lines · Saul Wold
Quoted 10 lines · Chen Qi
Many SysV init scripts need the
/etc/init.d/functionsscript. 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.Quoted 4 lines
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.
Quoted 9 lines
There seems to be a problem with the multi-lib build, please check this logfile for errors.
Thanks
Sau!
Thanks for pointing it out.
I've fixed it and sent out V3.
I also modified the patch a little so that it could apply to the latest master cleanly.
Best Regards,
Chen Qi
Quoted 27 lines
Quoted 25 lines
Signed-off-by Chen Qi <[email protected]>--- meta/recipes-core/initscripts/initscripts_1.0.bb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)meta/recipes-core/initscripts/initscripts_1.0.bb +6
-2@@ -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"
PATCH v2 2/2 Add missing RDEPENDS of initscripts-functions
In reply to Chen QiNow that the initscripts-functions has been packaged separately, packages which may use the functions script should have a runtime dependency on it.
--- meta/recipes-bsp/alsa-state/alsa-state.bb | 2 +- meta/recipes-bsp/apmd/apmd_3.2.2-14.bb | 1 + .../irda-utils/irda-utils_0.9.18.bb | 2 ++ .../nfs-utils/nfs-utils_1.2.9.bb | 4 ++-- meta/recipes-connectivity/openssh/openssh_6.4p1.bb | 2 +- meta/recipes-connectivity/ppp/ppp_2.4.5.bb | 1 + meta/recipes-core/dbus/dbus.inc | 2 +- meta/recipes-core/systemd/systemd_208.bb | 2 +- meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 2 +- meta/recipes-devtools/distcc/distcc_3.1.bb | 1 + meta/recipes-devtools/tcf-agent/tcf-agent_git.bb | 2 +- meta/recipes-extended/at/at_3.1.14.bb | 3 +-- meta/recipes-extended/cronie/cronie_1.4.11.bb | 2 ++ meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb | 2 ++ meta/recipes-extended/sysklogd/sysklogd.inc | 2 ++ meta/recipes-extended/xinetd/xinetd_2.3.15.bb | 1 + .../oprofile/oprofileui-server_git.bb | 2 +- 17 files changed, 22 insertions(+), 11 deletions(-)
meta/recipes-bsp/alsa-state/alsa-state.bb +1 -1
@@ -37,7 +37,7 @@ PACKAGES += "alsa-states" RRECOMMENDS_alsa-state = "alsa-states" -RDEPENDS_${PN} = "alsa-utils-alsactl" +RDEPENDS_${PN} = "alsa-utils-alsactl initscripts-functions" FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf" CONFFILES_${PN} = "${sysconfdir}/asound.conf"
meta/recipes-bsp/apmd/apmd_3.2.2-14.bb +1 -0
@@ -8,6 +8,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ file://apm.h;beginline=6;endline=18;md5=7d4acc1250910a89f84ce3cc6557c4c2" DEPENDS = "libtool-cross" +RDEPENDS_${PN} = "initscripts-functions" PR = "r2" SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \
meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb +2 -0
@@ -24,6 +24,8 @@ inherit autotools update-rc.d INITSCRIPT_NAME = "irattach" INITSCRIPT_PARAMS = "defaults 20" +RDEPENDS_${PN} += "initscripts-functions" + do_compile () { oe_runmake -e -C irattach oe_runmake -e -C irdaping
meta/recipes-connectivity/nfs-utils/nfs-utils_1.2.9.bb +2 -2
@@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" # util-linux for libblkid DEPENDS = "libcap libnfsidmap libevent util-linux sqlite3" -RDEPENDS_${PN}-client = "rpcbind bash" -RDEPENDS_${PN} = "${PN}-client bash" +RDEPENDS_${PN}-client = "rpcbind bash initscripts-functions" +RDEPENDS_${PN} = "${PN}-client bash initscripts-functions" RRECOMMENDS_${PN} = "kernel-module-nfsd" inherit useradd
meta/recipes-connectivity/openssh/openssh_6.4p1.bb +1 -1
@@ -122,7 +122,7 @@ FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" FILES_${PN}-keygen = "${bindir}/ssh-keygen" RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" -RDEPENDS_${PN}-sshd += "${PN}-keygen" +RDEPENDS_${PN}-sshd += "${PN}-keygen initscripts-functions" CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config" CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
meta/recipes-connectivity/ppp/ppp_2.4.5.bb +1 -0
@@ -5,6 +5,7 @@ SECTION = "console/network" HOMEPAGE = "http://samba.org/ppp/" BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs" DEPENDS = "libpcap" +RDEPENDS_${PN} = "initscripts-functions" LICENSE = "BSD & GPLv2+ & LGPLv2+ & PD" LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \ file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \
meta/recipes-core/dbus/dbus.inc +1 -1
@@ -9,7 +9,7 @@ X11DEPENDS = "virtual/libx11 libsm" DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}" DEPENDS_class-native = "expat-native virtual/libintl-native" DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl" -RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest-ptest', '', d)}" +RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest-ptest', '', d)} initscripts-functions" RDEPENDS_dbus_class-native = "" RDEPENDS_dbus_class-nativesdk = ""
meta/recipes-core/systemd/systemd_208.bb +1 -1
@@ -229,7 +229,7 @@ PACKAGES =+ "udev-dbg udev udev-utils udev-hwdb" FILES_udev-dbg += "/lib/udev/.debug" -RDEPENDS_udev += "udev-utils" +RDEPENDS_udev += "udev-utils initscripts-functions" RPROVIDES_udev = "hotplug" RRECOMMENDS_udev += "udev-hwdb"
meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +1 -1
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4" PR = "r11" -RDEPENDS_${PN} = "${PN}-inittab" +RDEPENDS_${PN} = "${PN}-inittab initscripts-functions" SRC_URI = "http://download.savannah.gnu.org/releases-noredirect/sysvinit/sysvinit-${PV}.tar.bz2 \ file://install.patch \
meta/recipes-devtools/distcc/distcc_3.1.bb +1 -0
@@ -6,6 +6,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "avahi" +RDEPENDS_${PN} = "initscripts-functions" GTKCONFIG = "gtk" GTKCONFIG_libc-uclibc = ""
meta/recipes-devtools/tcf-agent/tcf-agent_git.bb +1 -1
@@ -15,7 +15,7 @@ SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git \ " DEPENDS = "util-linux openssl" -RDEPENDS_${PN} = "bash" +RDEPENDS_${PN} = "bash initscripts-functions" S = "${WORKDIR}/git"
meta/recipes-extended/at/at_3.1.14.bb +1 -2
@@ -7,9 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4" DEPENDS = "flex flex-native \ ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" -VIRTUAL-RUNTIME_initscripts ?= "initscripts" RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \ - ${VIRTUAL-RUNTIME_initscripts} \ + initscripts-functions \ " PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
meta/recipes-extended/cronie/cronie_1.4.11.bb +2 -0
@@ -39,6 +39,8 @@ PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,${PAM_DEPS}" INITSCRIPT_NAME = "crond" INITSCRIPT_PARAMS = "start 90 2 3 4 5 . stop 60 0 1 6 ." +RDEPENDS_${PN} = "initscripts-functions" + USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "--system crontab"
meta/recipes-extended/rpcbind/rpcbind_0.2.1.bb +2 -0
@@ -33,6 +33,8 @@ PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" INITSCRIPT_NAME = "rpcbind" INITSCRIPT_PARAMS = "start 12 2 3 4 5 . stop 60 0 1 6 ." +RDEPENDS_${PN} = "initscripts-functions" + SYSTEMD_SERVICE_${PN} = "rpcbind.service" SYSTEMD_AUTO_ENABLE = "disable"
meta/recipes-extended/sysklogd/sysklogd.inc +2 -0
@@ -24,6 +24,8 @@ SRC_URI_append_e500v2 = " file://no-vectorization.patch" INITSCRIPT_NAME = "syslog" CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}" +RDEPENDS_${PN} = "initscripts-functions" + CFLAGS_append = " -DSYSV" do_install () {
meta/recipes-extended/xinetd/xinetd_2.3.15.bb +1 -0
@@ -7,6 +7,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8" DEPENDS = "" +RDEPENDS_${PN} = "initscripts-functions" PR = "r2" SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \
meta/recipes-kernel/oprofile/oprofileui-server_git.bb +1 -1
@@ -11,7 +11,7 @@ SRC_URI = "git://git.yoctoproject.org/oprofileui \ EXTRA_OECONF += "--disable-client --enable-server" -RDEPENDS_${PN} = "oprofile" +RDEPENDS_${PN} = "oprofile initscripts-functions" do_install_append() { install -d ${D}${sysconfdir}/init.d
Signature · 1 line
1.7.9.5