Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] Add /sbin/sushell when SELinux is enabled
@ 2015-07-06  8:47 Kai Kang
  2015-07-06  8:47 ` [PATCH 1/1] initscripts: add /sbin/sushell for systemd service debug-shell Kai Kang
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Kang @ 2015-07-06  8:47 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 8ad9a434c9fd0300cf5c38c368b181b78421e95a:

  bitbake: tests/data: Add new data tests (2015-07-01 15:40:21 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib kangkai/initscripts
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=kangkai/initscripts

Kai Kang (1):
  initscripts: add /sbin/sushell for systemd service debug-shell

 meta/recipes-core/initscripts/initscripts-1.0/sushell |  5 +++++
 meta/recipes-core/initscripts/initscripts_1.0.bb      | 10 +++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/initscripts/initscripts-1.0/sushell

-- 
1.9.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] initscripts: add /sbin/sushell for systemd service debug-shell
  2015-07-06  8:47 [PATCH 0/1] Add /sbin/sushell when SELinux is enabled Kai Kang
@ 2015-07-06  8:47 ` Kai Kang
  2015-07-07  9:49   ` Kang Kai
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Kang @ 2015-07-06  8:47 UTC (permalink / raw)
  To: openembedded-core

Add file /sbin/sushell for systemd service debug-shell which starts with
/bin/sushell when SELinux is enabled. Copy and add sushell file from
Fedora 22.

Add runtime dependency bash as well when systemd is enabled to eliminate
QA warning:

WARNING: QA Issue: /sbin/sushell_initscripts contained in package initscripts
requires /bin/bash, but no providers found in its RDEPENDS [file-rdeps]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/sushell |  5 +++++
 meta/recipes-core/initscripts/initscripts_1.0.bb      | 10 +++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/initscripts/initscripts-1.0/sushell

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/sushell b/meta/recipes-core/initscripts/initscripts-1.0/sushell
new file mode 100644
index 0000000..7d96941
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/sushell
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+[ -z "$SUSHELL" ] && SUSHELL=/bin/bash
+
+exec $SUSHELL
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index a086591..c2e815f 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -33,6 +33,7 @@ SRC_URI = "file://functions \
            file://GPLv2.patch \
            file://dmesg.sh \
            file://logrotate-dmesg.conf \
+           ${@bb.utils.contains('DISTRO_FEATURES','systemd','file://sushell','',d)} \
 "
 
 S = "${WORKDIR}"
@@ -46,7 +47,9 @@ DEPENDS_append = " update-rc.d-native"
 DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
 
 PACKAGES =+ "${PN}-functions"
-RDEPENDS_${PN} = "${PN}-functions"
+RDEPENDS_${PN} = "${PN}-functions \
+                  ${@bb.utils.contains('DISTRO_FEATURES','systemd','bash','',d)} \
+		 "
 FILES_${PN}-functions = "${sysconfdir}/init.d/functions*"
 
 ALTERNATIVE_PRIORITY_${PN}-functions = "90"
@@ -104,6 +107,11 @@ do_install () {
 	if [ "${TARGET_ARCH}" = "arm" ]; then
 		install -m 0755 ${WORKDIR}/alignment.sh	${D}${sysconfdir}/init.d
 	fi
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}/${base_sbindir}
+		install -m 0755 ${WORKDIR}/sushell ${D}/${base_sbindir}
+	fi
 #
 # Install device dependent scripts
 #
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] initscripts: add /sbin/sushell for systemd service debug-shell
  2015-07-06  8:47 ` [PATCH 1/1] initscripts: add /sbin/sushell for systemd service debug-shell Kai Kang
@ 2015-07-07  9:49   ` Kang Kai
  0 siblings, 0 replies; 3+ messages in thread
From: Kang Kai @ 2015-07-07  9:49 UTC (permalink / raw)
  To: openembedded-core

On 2015年07月06日 16:47, Kai Kang wrote:
> Add file /sbin/sushell for systemd service debug-shell which starts with
> /bin/sushell when SELinux is enabled. Copy and add sushell file from
> Fedora 22.
>
> Add runtime dependency bash as well when systemd is enabled to eliminate
> QA warning:
>
> WARNING: QA Issue: /sbin/sushell_initscripts contained in package initscripts
> requires /bin/bash, but no providers found in its RDEPENDS [file-rdeps]
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>   meta/recipes-core/initscripts/initscripts-1.0/sushell |  5 +++++
>   meta/recipes-core/initscripts/initscripts_1.0.bb      | 10 +++++++++-
>   2 files changed, 14 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-core/initscripts/initscripts-1.0/sushell
>
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/sushell b/meta/recipes-core/initscripts/initscripts-1.0/sushell
> new file mode 100644
> index 0000000..7d96941
> --- /dev/null
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/sushell
> @@ -0,0 +1,5 @@
> +#!/bin/bash
> +
> +[ -z "$SUSHELL" ] && SUSHELL=/bin/bash
> +
> +exec $SUSHELL
> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
> index a086591..c2e815f 100644
> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
> @@ -33,6 +33,7 @@ SRC_URI = "file://functions \
>              file://GPLv2.patch \
>              file://dmesg.sh \
>              file://logrotate-dmesg.conf \
> +           ${@bb.utils.contains('DISTRO_FEATURES','systemd','file://sushell','',d)} \

It should check distro feature selinux rather than systemd that only 
when selinux is enabled, debug-shell.service from systemd starts with 
sushell.

I'll send V2.

Thanks,
Kai


>   "
>   
>   S = "${WORKDIR}"
> @@ -46,7 +47,9 @@ DEPENDS_append = " update-rc.d-native"
>   DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
>   
>   PACKAGES =+ "${PN}-functions"
> -RDEPENDS_${PN} = "${PN}-functions"
> +RDEPENDS_${PN} = "${PN}-functions \
> +                  ${@bb.utils.contains('DISTRO_FEATURES','systemd','bash','',d)} \
> +		 "
>   FILES_${PN}-functions = "${sysconfdir}/init.d/functions*"
>   
>   ALTERNATIVE_PRIORITY_${PN}-functions = "90"
> @@ -104,6 +107,11 @@ do_install () {
>   	if [ "${TARGET_ARCH}" = "arm" ]; then
>   		install -m 0755 ${WORKDIR}/alignment.sh	${D}${sysconfdir}/init.d
>   	fi
> +
> +	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
> +		install -d ${D}/${base_sbindir}
> +		install -m 0755 ${WORKDIR}/sushell ${D}/${base_sbindir}
> +	fi
>   #
>   # Install device dependent scripts
>   #


-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-07  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-06  8:47 [PATCH 0/1] Add /sbin/sushell when SELinux is enabled Kai Kang
2015-07-06  8:47 ` [PATCH 1/1] initscripts: add /sbin/sushell for systemd service debug-shell Kai Kang
2015-07-07  9:49   ` Kang Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox