Skip to contentSkip to conversation

initscripts/init-system-helpers: fix mountnfs.sh dependency

PATCH Superseded Jens Rehsack 2 participants 5 messages Mar 30, 2020 – Apr 3, 2020

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 initscripts/init-system-helpers: fix mountnfs.sh dependency

With commit c9fc9110be33fe0f24bc3a7c242b584a4ca33e04
Author: Yue Tao <[email protected]>
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.

---
 .../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
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +52 -0
new file mode 100644
index 0000000000..2b09983483
@@ -0,0 +1,52 @@
+# Copyright (C) 2020 Jens Rehsack <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+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"
+
+DEPENDS = "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} = ""
+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"
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -0
index 1a59b82fbf..4080c4a495 100644
@@ -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"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 31 lines · Jens Rehsack

With commit c9fc9110be33fe0f24bc3a7c242b584a4ca33e04
Author: Yue Tao <[email protected]>
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.

---
 .../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
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +0 -0
new file mode 100644
index 0000000000..2b09983483

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 2

Quoted 2 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +2 -0
@@ -0,0 +1,52 @@
+# Copyright (C) 2020 Jens Rehsack <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)

Is this really necessary?

Quoted 9 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +9 -0
+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. \

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 22

Quoted 10 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +10 -0
+\
+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}).

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 24

Quoted 1 line
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +1 -0
+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?

Quoted 11 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +11 -0
+SRCREV = "760c625ec0e1ffebec2e391d891d389da0f65726"
+SRC_URI = "git://salsa.debian.org/debian/init-system-helpers.git"
+
+S = "${WORKDIR}/git"
+
+do_configure() {
+       :
+}
+
+do_compile() {
+       :

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 46

Quoted 10 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +10 -0
+}
+
+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"
Quoted 22 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +6 -0
+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"
meta/recipes-core/initscripts/initscripts_1.0.bb +1 -1
index 1a59b82fbf..4080c4a495 100644
@@ -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

#2 lore raw
Quoted 30 lines

Am 30.03.2020 um 19:19 schrieb Andre McCurdy <[email protected]>:

Quoted 25 lines · Jens Rehsack

With commit c9fc9110be33fe0f24bc3a7c242b584a4ca33e04
Author: Yue Tao <[email protected]>
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.

---
.../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

Quoted 10 lines

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 2

Quoted 8 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +2 -0
new file mode 100644
index 0000000000..2b09983483
@@ -0,0 +1,52 @@
+# Copyright (C) 2020 Jens Rehsack <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)

Is this really necessary?

Nope. It's a default preambel, vim adds :)

Quoted 14 lines
Quoted 14 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +14 -0
+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"
Quoted 8 lines

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 22

Quoted 5 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +5 -0
+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}).

*shrug*
I see that neither initscripts nor busybox following this guide - so I don't know.

Quoted 4 lines

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 24

Quoted 1 line
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +1 -0
+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?

As debian/control says so.

And maybe little time later someone wants to do something with update-rc.d or one of the systemd helpers as debian does. Or one likes to add man-pages (pod2man)?

It's not that wrong.

Quoted 24 lines
Quoted 11 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +11 -0
+SRCREV = "760c625ec0e1ffebec2e391d891d389da0f65726"
+SRC_URI = "git://salsa.debian.org/debian/init-system-helpers.git"
+
+S = "${WORKDIR}/git"
+
+do_configure() {
+       :
+}
+
+do_compile() {
+       :

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 46

Quoted 10 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +10 -0
+}
+
+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:

Quoted 1 line

ALLOW_EMPTY_${PN} = "1"

Yeah - wanted to add that but fall through ...

Quoted 14 lines
Quoted 14 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +6 -0
+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"
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
index 1a59b82fbf..4080c4a495 100644
@@ -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)} \
Quoted 8 lines
Quoted 8 lines
+                  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

--
Jens Rehsack - [email protected]

#3 lore raw
Quoted 63 lines · Jens Rehsack
Quoted 27 lines

Am 30.03.2020 um 19:19 schrieb Andre McCurdy <[email protected]>:

Quoted 25 lines · Jens Rehsack

With commit c9fc9110be33fe0f24bc3a7c242b584a4ca33e04
Author: Yue Tao <[email protected]>
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.

---
.../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

Quoted 10 lines

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 2

Quoted 8 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +2 -0
new file mode 100644
index 0000000000..2b09983483
@@ -0,0 +1,52 @@
+# Copyright (C) 2020 Jens Rehsack <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)

Is this really necessary?

Nope. It's a default preambel, vim adds :)

Quoted 14 lines
Quoted 14 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +14 -0
+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"
Quoted 8 lines

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 22

Quoted 5 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +5 -0
+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}).

Quoted 2 lines

*shrug*
I see that neither initscripts nor busybox following this guide - so I don't know.

Yeah, most people don't care about variable ordering and maintainers don't do anything to enforce it so this comment was mainly FYI.

Quoted 5 lines
Quoted 4 lines

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 24

Quoted 1 line
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +1 -0
+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?

Quoted 7 lines

As debian/control says so.

And maybe little time later someone wants to do something with update-rc.d or one of the systemd helpers as debian does. Or one likes to add man-pages (pod2man)?

It's not that wrong.

Unnecessary build time dependencies can cause increased build times (either due to building dependencies which otherwise would not have been needed or limiting the scope the build scheduler has for parallelization). Maybe not in this case since there's a run time dependency on perl too, but in general adding unnecessary dependencies just looks bad - as if you don't really understand the concept. Adding a dependency now because it might be needed in the future isn't a good justification either.

Quoted 54 lines
Quoted 24 lines
Quoted 11 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +11 -0
+SRCREV = "760c625ec0e1ffebec2e391d891d389da0f65726"
+SRC_URI = "git://salsa.debian.org/debian/init-system-helpers.git"
+
+S = "${WORKDIR}/git"
+
+do_configure() {
+       :
+}
+
+do_compile() {
+       :

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 46

Quoted 10 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +10 -0
+}
+
+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:

Quoted 1 line

ALLOW_EMPTY_${PN} = "1"

Yeah - wanted to add that but fall through ...

Quoted 14 lines
Quoted 14 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +6 -0
+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"
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
index 1a59b82fbf..4080c4a495 100644
@@ -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)} \
Quoted 8 lines
Quoted 8 lines
+                  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

--
Jens Rehsack - [email protected]

#4 lore raw
Quoted 68 lines

Am 03.04.2020 um 19:11 schrieb Andre McCurdy <[email protected]>:

Quoted 63 lines · Jens Rehsack
Quoted 27 lines

Am 30.03.2020 um 19:19 schrieb Andre McCurdy <[email protected]>:

Quoted 25 lines · Jens Rehsack

With commit c9fc9110be33fe0f24bc3a7c242b584a4ca33e04
Author: Yue Tao <[email protected]>
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.

---
.../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

Quoted 10 lines

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 2

Quoted 8 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +2 -0
new file mode 100644
index 0000000000..2b09983483
@@ -0,0 +1,52 @@
+# Copyright (C) 2020 Jens Rehsack <[email protected]>
+# Released under the MIT license (see COPYING.MIT for the terms)

Is this really necessary?

Nope. It's a default preambel, vim adds :)

Quoted 22 lines
Quoted 9 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +9 -0
+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. \

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 22

Quoted 10 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +10 -0
+\
+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}).

Quoted 5 lines
Quoted 2 lines

*shrug*
I see that neither initscripts nor busybox following this guide - so I don't know.

Yeah, most people don't care about variable ordering and maintainers don't do anything to enforce it so this comment was mainly FYI.

I checked http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
but there is nothing prominent regarding style.

Quoted 13 lines
Quoted 5 lines
Quoted 4 lines

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 24

Quoted 1 line
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +1 -0
+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?

Quoted 7 lines

As debian/control says so.

And maybe little time later someone wants to do something with update-rc.d or one of the systemd helpers as debian does. Or one likes to add man-pages (pod2man)?

It's not that wrong.

Quoted 8 lines

Unnecessary build time dependencies can cause increased build times (either due to building dependencies which otherwise would not have been needed or limiting the scope the build scheduler has for parallelization). Maybe not in this case since there's a run time dependency on perl too, but in general adding unnecessary dependencies just looks bad - as if you don't really understand the concept. Adding a dependency now because it might be needed in the future isn't a good justification either.

You can bet that I care for seriously unnecessary dependencies :)

Quoted 46 lines
Quoted 46 lines
Quoted 24 lines
Quoted 11 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +11 -0
+SRCREV = "760c625ec0e1ffebec2e391d891d389da0f65726"
+SRC_URI = "git://salsa.debian.org/debian/init-system-helpers.git"
+
+S = "${WORKDIR}/git"
+
+do_configure() {
+       :
+}
+
+do_compile() {
+       :

meta/recipes-core/initscripts/init-system-helpers_1.57.bb line 46

Quoted 10 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +10 -0
+}
+
+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:

Quoted 1 line

ALLOW_EMPTY_${PN} = "1"

Yeah - wanted to add that but fall through ...

Quoted 18 lines
Quoted 18 lines
meta/recipes-core/initscripts/init-system-helpers_1.57.bb new file +6 -0
+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"
meta/recipes-core/initscripts/initscripts_1.0.bb +0 -0
index 1a59b82fbf..4080c4a495 100644
@@ -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"

Quoted 9 lines
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

--
2.17.1

--
Jens Rehsack - [email protected]

--
Jens Rehsack - [email protected]