On Mon, Mar 30, 2020 at 9:51 AM Jens Rehsack <rehs...@gmail.com> wrote:
>
> With commit c9fc9110be33fe0f24bc3a7c242b584a4ca33e04
>     Author: Yue Tao <yue....@windriver.com>
>     Date:   Fri May 25 10:48:08 2018 +0800
>
>         initscripts: Avoid starting rpcbind daemon twice
>
>         Check the status before start it to avoid duplicates.
>
> the use of a script {/usr/sbin/}service is introduced - maybe earlier
> provided by systemd, nowadays mostly by init-system-helpers from
> debian project.
>
> For the very first shot, maybe discussions and improvements based
> on that script collection, use just the init-system-helpers-service
> in initscripts/mountnfs.sh to avoid problems mounting NFS in later
> boot stage.
>
> Signed-off-by: Jens Rehsack <s...@netbsd.org>
> ---
>  .../initscripts/init-system-helpers_1.57.bb   | 52 +++++++++++++++++++
>  .../initscripts/initscripts_1.0.bb            |  1 +
>  2 files changed, 53 insertions(+)
>  create mode 100644 meta/recipes-core/initscripts/init-system-helpers_1.57.bb
>
> diff --git a/meta/recipes-core/initscripts/init-system-helpers_1.57.bb 
> b/meta/recipes-core/initscripts/init-system-helpers_1.57.bb
> new file mode 100644
> index 0000000000..2b09983483
> --- /dev/null
> +++ b/meta/recipes-core/initscripts/init-system-helpers_1.57.bb
> @@ -0,0 +1,52 @@
> +# Copyright (C) 2020 Jens Rehsack <s...@netbsd.org>
> +# Released under the MIT license (see COPYING.MIT for the terms)

Is this really necessary?

> +SUMMARY = "helper tools for all init systems"
> +DESCRIPTION = "This package contains helper tools that are necessary for 
> switching between \
> +the various init systems that Debian contains (e. g. sysvinit or \
> +systemd). An example is deb-systemd-helper, a script that enables systemd 
> unit \
> +files without depending on a running systemd. \
> +\
> +It also includes the \"service\", \"invoke-rc.d\", and \"update-rc.d\" 
> scripts which \
> +provide an abstraction for enabling, disabling, starting, and stopping \
> +services for all supported Debian init systems as specified by the policy. \
> +\
> +While this package is maintained by pkg-systemd-maintainers, it is NOT \
> +specific to systemd at all. Maintainers of other init systems are welcome to 
> \
> +include their helpers in this package."
> +HOMEPAGE = "https://salsa.debian.org/debian/init-system-helpers";
> +SECTION = "base"
> +LICENSE = "BSD-3-clause & GPLv2"
> +LIC_FILES_CHKSUM = 
> "file://debian/copyright;md5=ee2b1830fcfead84d07bc060ec43e072"
> +
> +PACKAGES += "${PN}-invoke-rc.d ${PN}-service ${PN}-update-rc.d"

According to the OE style guide, PACKAGES should go near the end of
the recipe (after do_install, before FILES_${PN}).

> +DEPENDS = "perl"

Since this recipe doesn't do anything in do_configure or do_compile
it's odd that it needs a build time dependency on perl?

> +SRCREV = "760c625ec0e1ffebec2e391d891d389da0f65726"
> +SRC_URI = "git://salsa.debian.org/debian/init-system-helpers.git"
> +
> +S = "${WORKDIR}/git"
> +
> +do_configure() {
> +       :
> +}
> +
> +do_compile() {
> +       :
> +}
> +
> +do_install() {
> +       install -d -m 0755 ${D}${sbindir}
> +       install -m 0755 ${S}/script/invoke-rc.d ${D}${sbindir}
> +       install -m 0755 ${S}/script/service ${D}${sbindir}
> +       install -m 0755 ${S}/script/update-rc.d ${D}${sbindir}
> +}
> +
> +FILES_${PN} = ""

If you want the default package to be empty then you probably need to add:

  ALLOW_EMPTY_${PN} = "1"

> +FILES_${PN}-invoke-rc.d = "${sbindir}/invoke-rc.d"
> +FILES_${PN}-service = "${sbindir}/service"
> +FILES_${PN}-update-rc.d = "${sbindir}/update-rc.d"
> +
> +RDEPENDS_${PN}-update-rc.d = "perl"
> +RRECOMMENDS_${PN} += "${PN}-invoke-rc.d ${PN}-service ${PN}-update-rc.d"
> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb 
> b/meta/recipes-core/initscripts/initscripts_1.0.bb
> index 1a59b82fbf..4080c4a495 100644
> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
> @@ -50,6 +50,7 @@ PACKAGE_WRITE_DEPS_append = " 
> ${@bb.utils.contains('DISTRO_FEATURES','systemd','
>  PACKAGES =+ "${PN}-functions ${PN}-sushell"
>  RDEPENDS_${PN} = "initd-functions \
>                    
> ${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \
> +                  init-system-helpers-service \
>                  "
>  # Recommend pn-functions so that it will be a preferred default provider for 
> initd-functions
>  RRECOMMENDS_${PN} = "${PN}-functions"
> --
> 2.17.1
>
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136865): 
https://lists.openembedded.org/g/openembedded-core/message/136865
Mute This Topic: https://lists.openembedded.org/mt/72657170/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to