[meta-selinux][PATCH 12/17] restorecond: upgrade to 3.1 (20200710)


Yi Zhao
 

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
recipes-security/selinux/restorecond.inc | 14 +++++++++++++-
recipes-security/selinux/restorecond_3.0.bb | 7 -------
recipes-security/selinux/restorecond_3.1.bb | 7 +++++++
3 files changed, 20 insertions(+), 8 deletions(-)
delete mode 100644 recipes-security/selinux/restorecond_3.0.bb
create mode 100644 recipes-security/selinux/restorecond_3.1.bb

diff --git a/recipes-security/selinux/restorecond.inc b/recipes-security/selinux/restorecond.inc
index d168303..a5b1635 100644
--- a/recipes-security/selinux/restorecond.inc
+++ b/recipes-security/selinux/restorecond.inc
@@ -15,10 +15,22 @@ inherit systemd update-rc.d

DEPENDS += "libsepol libselinux libpcre dbus-glib glib-2.0 pkgconfig-native"

+EXTRA_OEMAKE += "SYSTEMDSYSTEMUNITDIR=${systemd_system_unitdir} \
+ SYSTEMDUSERUNITDIR=${systemd_user_unitdir} \
+ "
+
FILES_${PN} += "${datadir}/dbus-1/services/org.selinux.Restorecond.service \
-"
+ ${systemd_user_unitdir}/* \
+ "

SYSTEMD_SERVICE_restorecond = "restorecond.service"
INITSCRIPT_PACKAGES = "restorecond"
INITSCRIPT_NAME_restorecond = "restorecond"
INITSCRIPT_PARAMS_restorecond = "defaults"
+
+do_install_append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then
+ # remove /usr/lib/systemd/user
+ rm -rf ${D}${nonarch_libdir}
+ fi
+}
diff --git a/recipes-security/selinux/restorecond_3.0.bb b/recipes-security/selinux/restorecond_3.0.bb
deleted file mode 100644
index 8c840c9..0000000
--- a/recipes-security/selinux/restorecond_3.0.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require selinux_20191204.inc
-require ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI[md5sum] = "f32edbd8a1f724ef1e4fa70bf9e22685"
-SRC_URI[sha256sum] = "32a92c9f4bf48c613f9f467ced58d8c369eec8892239cd44d5d0e139b41926dc"
diff --git a/recipes-security/selinux/restorecond_3.1.bb b/recipes-security/selinux/restorecond_3.1.bb
new file mode 100644
index 0000000..d4e0d06
--- /dev/null
+++ b/recipes-security/selinux/restorecond_3.1.bb
@@ -0,0 +1,7 @@
+require selinux_20200710.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI[md5sum] = "8daf761739a150a7a29bb491726a6cd9"
+SRC_URI[sha256sum] = "82ca45099685a45d718f11f8859963c1ba83d98e510312cbf0b7dc5664c60ad0"
--
2.25.1