Skip to contentSkip to conversation

systemd: fixes for debug-shell service

PATCH New [email protected] 1 participant 3 messages Aug 22, 2017

lore
Share & tools
lore
#0 lore raw

cover systemd: fixes for debug-shell service

From: Jackie Huang <[email protected]>

This fixes the following error when selinux is enabled:

# systemd-analyze --man=false verify /lib/systemd/system/debug-shell.service
debug-shell.service: Command /sbin/sushell is not executable: No such file or directory

--
The following changes since commit 5c9ef0734d23909b5694ed43cdbb205c2ba9ca95:

devtool/copy_buildsystem: adds meta-skeleton layer in the eSDK installation. (2017-08-19 22:15:25 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib.git jhuang0/d_debug-shell_170822_0
http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/d_debug-shell_170822_0

Jackie Huang (2):
initscripts: split sushell into sub package
systemd: add dependency on initscripts-sushell for selinux

 meta/recipes-core/initscripts/initscripts_1.0.bb | 5 +++--
 meta/recipes-core/systemd/systemd_234.bb         | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/2 initscripts: split sushell into sub package

From: Jackie Huang <[email protected]>

* sushell is required by systemd service debug-shell when selinux is enabled, but it doesn't make sense to make systemd depend on initscripts, so split sushell into sub package initscripts-sushell.

* The bash dependency has been removed by:
'''
4917e36a77bd6821b45db52caa43939d344d92f6
initscripts: Fix regression for requiring /bin/bash '''
so remove bash from RDEPENDS when selinux is enabled.

---
 meta/recipes-core/initscripts/initscripts_1.0.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-core/initscripts/initscripts_1.0.bb +3 -2
index 7ab0d2b..d627d2e 100644
@@ -46,11 +46,12 @@ inherit update-alternatives
 DEPENDS_append = " update-rc.d-native"
 PACKAGE_WRITE_DEPS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
 
-PACKAGES =+ "${PN}-functions"
+PACKAGES =+ "${PN}-functions ${PN}-sushell"
 RDEPENDS_${PN} = "${PN}-functions \
-                  ${@bb.utils.contains('DISTRO_FEATURES','selinux','bash','',d)} \
+                  ${@bb.utils.contains('DISTRO_FEATURES','selinux','${PN}-sushell','',d)} \
 		 "
 FILES_${PN}-functions = "${sysconfdir}/init.d/functions*"
+FILES_${PN}-sushell = "${base_sbindir}/sushell"
 
 ALTERNATIVE_PRIORITY_${PN}-functions = "90"
 ALTERNATIVE_${PN}-functions = "functions"
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 systemd: add dependency on initscripts-sushell for selinux

In reply to [email protected]

From: Jackie Huang <[email protected]>

sushell is required by systemd service debug-shell when selinux is enabled.

---
 meta/recipes-core/systemd/systemd_234.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_234.bb +1 -1
index 4560cf4..2736f38 100644
@@ -106,7 +106,7 @@ PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
 # Update NAT firewall rules
 PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
 PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,,"
-PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,initscripts-sushell"
 PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind"
 PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
 PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
Signature · 1 line
1.9.1