[yocto] [meta-selinux][PATCH 07/16] policycoreutils: uprev to 2.8 (20180524)
Yi Zhao
yi.zhao at windriver.com
Tue Sep 4 17:18:18 PDT 2018
Remove unused patch:
policycoreutils-loadpolicy-symlink.patch
Add the following patches to change commands path for backward
compatibility:
policycoreutils-fix-fixfiles-install-path.patch
policycoreutils-fix-fixfiles-install-path.patch
Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
---
recipes-security/selinux/policycoreutils.inc | 8 +++---
...policycoreutils-fix-fixfiles-install-path.patch | 29 ++++++++++++++++++++++
...icycoreutils-fix-load_policy-install-path.patch | 29 ++++++++++++++++++++++
.../policycoreutils-loadpolicy-symlink.patch | 19 --------------
recipes-security/selinux/policycoreutils_2.7.bb | 8 ------
recipes-security/selinux/policycoreutils_2.8.bb | 8 ++++++
6 files changed, 70 insertions(+), 31 deletions(-)
create mode 100644 recipes-security/selinux/policycoreutils/policycoreutils-fix-fixfiles-install-path.patch
create mode 100644 recipes-security/selinux/policycoreutils/policycoreutils-fix-load_policy-install-path.patch
delete mode 100644 recipes-security/selinux/policycoreutils/policycoreutils-loadpolicy-symlink.patch
delete mode 100644 recipes-security/selinux/policycoreutils_2.7.bb
create mode 100644 recipes-security/selinux/policycoreutils_2.8.bb
diff --git a/recipes-security/selinux/policycoreutils.inc b/recipes-security/selinux/policycoreutils.inc
index b7cb510..854cf4d 100644
--- a/recipes-security/selinux/policycoreutils.inc
+++ b/recipes-security/selinux/policycoreutils.inc
@@ -9,6 +9,8 @@ LICENSE = "GPLv2+"
SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
file://policycoreutils-fixfiles-de-bashify.patch \
+ file://policycoreutils-fix-fixfiles-install-path.patch \
+ file://policycoreutils-fix-load_policy-install-path.patch \
"
PAM_SRC_URI = "file://pam.d/newrole \
@@ -46,7 +48,6 @@ RDEPENDS_${BPN}-semodule += "\
libsemanage \
"
# static link to libsepol
-DEPENDS_${BPN}-semodule-deps += "libsepol"
RDEPENDS_${BPN}-semodule-expand += "libsepol libselinux"
RDEPENDS_${BPN}-semodule-link += "libsepol libselinux"
RDEPENDS_${BPN}-semodule-package += "libsepol libselinux"
@@ -157,15 +158,14 @@ do_compile_prepend() {
do_install_prepend() {
export PYTHON=python
- export SEMODULE_PATH=${sbindir} SYSTEMDDIR=${D}/${systemd_unitdir}
}
do_install_class-native() {
for PCU_CMD in ${PCU_NATIVE_CMDS} ; do
oe_runmake -C $PCU_CMD install \
DESTDIR="${D}" \
- PREFIX="${D}/${prefix}" \
- SBINDIR="${D}/${base_sbindir}"
+ PREFIX="${prefix}" \
+ SBINDIR="${base_sbindir}"
done
}
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-fix-fixfiles-install-path.patch b/recipes-security/selinux/policycoreutils/policycoreutils-fix-fixfiles-install-path.patch
new file mode 100644
index 0000000..96d2075
--- /dev/null
+++ b/recipes-security/selinux/policycoreutils/policycoreutils-fix-fixfiles-install-path.patch
@@ -0,0 +1,29 @@
+From 0546ad883d98799972034f8e0fdc6ca2a7319b07 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao at windriver.com>
+Date: Tue, 4 Sep 2018 14:14:45 +0800
+Subject: [PATCH] policycoreutils: fix fixfiles install path
+
+Change path from /usr/sbin to /sbin for backward compatibility
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
+---
+ scripts/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/Makefile b/scripts/Makefile
+index afe5dc4..f7a9e34 100644
+--- a/scripts/Makefile
++++ b/scripts/Makefile
+@@ -1,6 +1,6 @@
+ # Installation directories.
+ PREFIX ?= /usr
+-SBINDIR ?= $(PREFIX)/sbin
++SBINDIR ?= /sbin
+ MANDIR ?= $(PREFIX)/share/man
+
+ .PHONY: all
+--
+2.7.4
+
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-fix-load_policy-install-path.patch b/recipes-security/selinux/policycoreutils/policycoreutils-fix-load_policy-install-path.patch
new file mode 100644
index 0000000..2136781
--- /dev/null
+++ b/recipes-security/selinux/policycoreutils/policycoreutils-fix-load_policy-install-path.patch
@@ -0,0 +1,29 @@
+From 46077df498b8bb54964506f03fd95390aaaaa392 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao at windriver.com>
+Date: Tue, 4 Sep 2018 14:41:13 +0800
+Subject: [PATCH] policycoreutils: fix load_policy install path
+
+Change path from /usr/sbin to /sbin for backward compatibility
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
+---
+ load_policy/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/load_policy/Makefile b/load_policy/Makefile
+index 568d5d4..7fbd077 100644
+--- a/load_policy/Makefile
++++ b/load_policy/Makefile
+@@ -1,6 +1,6 @@
+ # Installation directories.
+ PREFIX ?= /usr
+-SBINDIR ?= $(PREFIX)/sbin
++SBINDIR ?= /sbin
+ MANDIR ?= $(PREFIX)/share/man
+ LOCALEDIR ?= $(DESTDIR)$(PREFIX)/share/locale
+
+--
+2.7.4
+
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-loadpolicy-symlink.patch b/recipes-security/selinux/policycoreutils/policycoreutils-loadpolicy-symlink.patch
deleted file mode 100644
index ef9936a..0000000
--- a/recipes-security/selinux/policycoreutils/policycoreutils-loadpolicy-symlink.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-policycoreutils: Patch Makefile to get load_policy symlink right
-
-Setting DESTDIR in the policycoreutils do_install creates a bad
-symlink for load_policy. This patch fixes up the Makefile to
-create the symlink relative to DESTDIR.
-
-Signed-off-by: Philip Tricca <flihp at twobit.us>
-
---- a/load_policy/Makefile
-+++ b/load_policy/Makefile
-@@ -19,7 +19,7 @@ install: all
- test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8
- install -m 644 load_policy.8 $(MANDIR)/man8/
- -mkdir -p $(USRSBINDIR)
-- -ln -sf $(SBINDIR)/load_policy $(USRSBINDIR)/load_policy
-+ -ln -sf $(subst $(DESTDIR),,$(SBINDIR))/load_policy $(USRSBINDIR)/load_policy
-
- clean:
- -rm -f $(TARGETS) *.o
diff --git a/recipes-security/selinux/policycoreutils_2.7.bb b/recipes-security/selinux/policycoreutils_2.7.bb
deleted file mode 100644
index 78bf031..0000000
--- a/recipes-security/selinux/policycoreutils_2.7.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-include selinux_20170804.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI[md5sum] = "65311b66ae01f7b7ad7c2ea7401b68ed"
-SRC_URI[sha256sum] = "0a1b8a4a323b854981c6755ff025fe98a0f1cff307f109abb260f0490f13e4f4"
-
diff --git a/recipes-security/selinux/policycoreutils_2.8.bb b/recipes-security/selinux/policycoreutils_2.8.bb
new file mode 100644
index 0000000..85f6ff0
--- /dev/null
+++ b/recipes-security/selinux/policycoreutils_2.8.bb
@@ -0,0 +1,8 @@
+include selinux_20180524.inc
+include ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI[md5sum] = "da5ceb9c7e1e6f8c573731031b91cffe"
+SRC_URI[sha256sum] = "986553a235f27bee7ad7c2b7c35ea51eb2ee68e2cf03b661b1585de101bc1099"
+
--
2.7.4
More information about the yocto
mailing list