diff options
| -rw-r--r-- | recipes-security/selinux/policycoreutils.inc | 80 | ||||
| -rw-r--r-- | recipes-security/selinux/policycoreutils_2.7.bb | 3 | ||||
| -rw-r--r-- | recipes-security/selinux/policycoreutils_git.bb | 3 | ||||
| -rw-r--r-- | recipes-security/selinux/selinux-python.inc | 106 | ||||
| -rw-r--r-- | recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch (renamed from recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch) | 0 | ||||
| -rw-r--r-- | recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch (renamed from recipes-security/selinux/policycoreutils/policycoreutils-fix-sepolicy-install-path.patch) | 0 | ||||
| -rw-r--r-- | recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch (renamed from recipes-security/selinux/policycoreutils/policycoreutils-process-ValueError-for-sepolicy-seobject.patch) | 0 | ||||
| -rw-r--r-- | recipes-security/selinux/selinux-python_2.7.bb | 7 |
8 files changed, 115 insertions, 84 deletions
diff --git a/recipes-security/selinux/policycoreutils.inc b/recipes-security/selinux/policycoreutils.inc index 9e45e0c..05fd43d 100644 --- a/recipes-security/selinux/policycoreutils.inc +++ b/recipes-security/selinux/policycoreutils.inc | |||
| @@ -23,19 +23,6 @@ inherit selinux pythonnative | |||
| 23 | 23 | ||
| 24 | DEPENDS += "${@target_selinux(d, 'libpam audit')}" | 24 | DEPENDS += "${@target_selinux(d, 'libpam audit')}" |
| 25 | 25 | ||
| 26 | RDEPENDS_${BPN}-audit2allow = "\ | ||
| 27 | python-textutils \ | ||
| 28 | libselinux-python \ | ||
| 29 | sepolgen \ | ||
| 30 | " | ||
| 31 | RDEPENDS_${BPN}-chcat = "\ | ||
| 32 | python-codecs \ | ||
| 33 | python-shell \ | ||
| 34 | python-stringold \ | ||
| 35 | python-unixadmin \ | ||
| 36 | ${BPN}-python \ | ||
| 37 | libselinux-python \ | ||
| 38 | " | ||
| 39 | RDEPENDS_${BPN}-fixfiles += "\ | 26 | RDEPENDS_${BPN}-fixfiles += "\ |
| 40 | ${BPN}-setfiles \ | 27 | ${BPN}-setfiles \ |
| 41 | " | 28 | " |
| @@ -51,27 +38,8 @@ RDEPENDS_${BPN}-newrole += "\ | |||
| 51 | libcap-ng \ | 38 | libcap-ng \ |
| 52 | libselinux \ | 39 | libselinux \ |
| 53 | " | 40 | " |
| 54 | RDEPENDS_${BPN}-python += "\ | ||
| 55 | python-codecs \ | ||
| 56 | python-io \ | ||
| 57 | python-ipy \ | ||
| 58 | python-re \ | ||
| 59 | python-stringold \ | ||
| 60 | python-syslog \ | ||
| 61 | python-unixadmin \ | ||
| 62 | libselinux-python \ | ||
| 63 | libsemanage-python \ | ||
| 64 | " | ||
| 65 | RDEPENDS_${BPN}-runinit += "libselinux" | 41 | RDEPENDS_${BPN}-runinit += "libselinux" |
| 66 | RDEPENDS_${BPN}-secon += "libselinux" | 42 | RDEPENDS_${BPN}-secon += "libselinux" |
| 67 | RDEPENDS_${BPN}-semanage = "\ | ||
| 68 | python-core \ | ||
| 69 | python-ipy \ | ||
| 70 | python-compression \ | ||
| 71 | python-xml \ | ||
| 72 | ${BPN}-python \ | ||
| 73 | libselinux-python \ | ||
| 74 | " | ||
| 75 | RDEPENDS_${BPN}-semodule += "\ | 43 | RDEPENDS_${BPN}-semodule += "\ |
| 76 | libsepol \ | 44 | libsepol \ |
| 77 | libselinux \ | 45 | libselinux \ |
| @@ -82,16 +50,6 @@ DEPENDS_${BPN}-semodule-deps += "libsepol" | |||
| 82 | RDEPENDS_${BPN}-semodule-expand += "libsepol libselinux" | 50 | RDEPENDS_${BPN}-semodule-expand += "libsepol libselinux" |
| 83 | RDEPENDS_${BPN}-semodule-link += "libsepol libselinux" | 51 | RDEPENDS_${BPN}-semodule-link += "libsepol libselinux" |
| 84 | RDEPENDS_${BPN}-semodule-package += "libsepol libselinux" | 52 | RDEPENDS_${BPN}-semodule-package += "libsepol libselinux" |
| 85 | RDEPENDS_${BPN}-sepolicy += "\ | ||
| 86 | python-argparse \ | ||
| 87 | python-codecs \ | ||
| 88 | python-core \ | ||
| 89 | python-syslog \ | ||
| 90 | ${BPN}-python \ | ||
| 91 | " | ||
| 92 | # static link to libsepol | ||
| 93 | DEPENDS_${BPN}-sepolgen-ifgen += "libsepol" | ||
| 94 | RDEPENDS_${BPN}-sepolgen-ifgen += "python libselinux-python" | ||
| 95 | RDEPENDS_${BPN}-sestatus += "libselinux" | 53 | RDEPENDS_${BPN}-sestatus += "libselinux" |
| 96 | RDEPENDS_${BPN}-setfiles += "\ | 54 | RDEPENDS_${BPN}-setfiles += "\ |
| 97 | libselinux \ | 55 | libselinux \ |
| @@ -102,43 +60,30 @@ RDEPENDS_${BPN}-setsebool += "\ | |||
| 102 | libselinux \ | 60 | libselinux \ |
| 103 | libsemanage \ | 61 | libsemanage \ |
| 104 | " | 62 | " |
| 105 | RDEPENDS_${BPN} += "setools setools-libs ${BPN}-python" | 63 | RDEPENDS_${BPN} += "setools setools-libs selinux-python" |
| 106 | 64 | ||
| 107 | WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}" | 65 | WARN_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${WARN_QA}', d)}" |
| 108 | ERROR_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${ERROR_QA}', d)}" | 66 | ERROR_QA := "${@oe_filter_out('unsafe-references-in-scripts', '${ERROR_QA}', d)}" |
| 109 | 67 | ||
| 110 | 68 | ||
| 111 | PACKAGES =+ "\ | 69 | PACKAGES =+ "\ |
| 112 | ${PN}-audit2allow \ | ||
| 113 | ${PN}-chcat \ | ||
| 114 | ${PN}-fixfiles \ | 70 | ${PN}-fixfiles \ |
| 115 | ${PN}-genhomedircon \ | 71 | ${PN}-genhomedircon \ |
| 116 | ${PN}-hll \ | 72 | ${PN}-hll \ |
| 117 | ${PN}-loadpolicy \ | 73 | ${PN}-loadpolicy \ |
| 118 | ${PN}-newrole \ | 74 | ${PN}-newrole \ |
| 119 | ${PN}-python \ | ||
| 120 | ${PN}-runinit \ | 75 | ${PN}-runinit \ |
| 121 | ${PN}-secon \ | 76 | ${PN}-secon \ |
| 122 | ${PN}-semanage \ | ||
| 123 | ${PN}-semodule \ | 77 | ${PN}-semodule \ |
| 124 | ${PN}-semodule-deps \ | 78 | ${PN}-semodule-deps \ |
| 125 | ${PN}-semodule-expand \ | 79 | ${PN}-semodule-expand \ |
| 126 | ${PN}-semodule-link \ | 80 | ${PN}-semodule-link \ |
| 127 | ${PN}-semodule-package \ | 81 | ${PN}-semodule-package \ |
| 128 | ${PN}-sepolgen-ifgen \ | ||
| 129 | ${PN}-sepolicy \ | ||
| 130 | ${PN}-sestatus \ | 82 | ${PN}-sestatus \ |
| 131 | ${PN}-setfiles \ | 83 | ${PN}-setfiles \ |
| 132 | ${PN}-setsebool \ | 84 | ${PN}-setsebool \ |
| 133 | system-config-selinux \ | 85 | system-config-selinux \ |
| 134 | " | 86 | " |
| 135 | FILES_${PN}-audit2allow = "\ | ||
| 136 | ${bindir}/audit2allow \ | ||
| 137 | ${bindir}/audit2why \ | ||
| 138 | " | ||
| 139 | FILES_${PN}-chcat = "\ | ||
| 140 | ${bindir}/chcat \ | ||
| 141 | " | ||
| 142 | FILES_${PN}-fixfiles += "${base_sbindir}/fixfiles" | 87 | FILES_${PN}-fixfiles += "${base_sbindir}/fixfiles" |
| 143 | FILES_${PN}-genhomedircon += "${sbindir}/genhomedircon" | 88 | FILES_${PN}-genhomedircon += "${sbindir}/genhomedircon" |
| 144 | FILES_${PN}-loadpolicy += "\ | 89 | FILES_${PN}-loadpolicy += "\ |
| @@ -149,22 +94,13 @@ FILES_${PN}-newrole += "\ | |||
| 149 | ${bindir}/newrole \ | 94 | ${bindir}/newrole \ |
| 150 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/newrole', '', d)} \ | 95 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/newrole', '', d)} \ |
| 151 | " | 96 | " |
| 152 | FILES_${PN}-python = "\ | ||
| 153 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/seobject.py* \ | ||
| 154 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy*.egg-info \ | ||
| 155 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/* \ | ||
| 156 | " | ||
| 157 | FILES_${PN}-runinit += "\ | 97 | FILES_${PN}-runinit += "\ |
| 158 | ${sbindir}/run_init \ | 98 | ${sbindir}/run_init \ |
| 159 | ${sbindir}/open_init_pty \ | 99 | ${sbindir}/open_init_pty \ |
| 160 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/run_init', '', d)} \ | 100 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${sysconfdir}/pam.d/run_init', '', d)} \ |
| 161 | " | 101 | " |
| 162 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/.debug/* ${prefix}/libexec/selinux/hll/.debug" | 102 | FILES_${PN}-dbg += "${prefix}/libexec/selinux/hll/.debug" |
| 163 | FILES_${PN}-secon += "${bindir}/secon" | 103 | FILES_${PN}-secon += "${bindir}/secon" |
| 164 | FILES_${PN}-semanage = "\ | ||
| 165 | ${sbindir}/semanage \ | ||
| 166 | ${datadir}/bash-completion/completions/semanage \ | ||
| 167 | " | ||
| 168 | FILES_${PN}-semodule += "${sbindir}/semodule" | 104 | FILES_${PN}-semodule += "${sbindir}/semodule" |
| 169 | FILES_${PN}-semodule-deps += "${bindir}/semodule_deps" | 105 | FILES_${PN}-semodule-deps += "${bindir}/semodule_deps" |
| 170 | FILES_${PN}-semodule-expand += "${bindir}/semodule_expand" | 106 | FILES_${PN}-semodule-expand += "${bindir}/semodule_expand" |
| @@ -174,17 +110,6 @@ FILES_${PN}-semodule-package += "\ | |||
| 174 | ${bindir}/semodule_unpackage \ | 110 | ${bindir}/semodule_unpackage \ |
| 175 | " | 111 | " |
| 176 | FILES_${PN}-hll += "${prefix}/libexec/selinux/hll/*" | 112 | FILES_${PN}-hll += "${prefix}/libexec/selinux/hll/*" |
| 177 | |||
| 178 | FILES_${PN}-sepolicy += "\ | ||
| 179 | ${bindir}/sepolicy \ | ||
| 180 | ${datadir}/bash-completion/completions/sepolicy \ | ||
| 181 | ${datadir}/dbus-1/system-services/org.selinux.service \ | ||
| 182 | ${datadir}/polkit-1/actions/org.selinux.policy \ | ||
| 183 | " | ||
| 184 | FILES_${PN}-sepolgen-ifgen += "\ | ||
| 185 | ${bindir}/sepolgen-ifgen \ | ||
| 186 | ${bindir}/sepolgen-ifgen-attr-helper \ | ||
| 187 | " | ||
| 188 | FILES_${PN}-sestatus += "\ | 113 | FILES_${PN}-sestatus += "\ |
| 189 | ${sbindir}/sestatus \ | 114 | ${sbindir}/sestatus \ |
| 190 | ${sysconfdir}/sestatus.conf \ | 115 | ${sysconfdir}/sestatus.conf \ |
| @@ -199,7 +124,6 @@ FILES_${PN}-setsebool += "\ | |||
| 199 | " | 124 | " |
| 200 | 125 | ||
| 201 | FILES_system-config-selinux = " \ | 126 | FILES_system-config-selinux = " \ |
| 202 | ${bindir}/sepolgen \ | ||
| 203 | ${datadir}/system-config-selinux/* \ | 127 | ${datadir}/system-config-selinux/* \ |
| 204 | ${datadir}/icons/hicolor/ \ | 128 | ${datadir}/icons/hicolor/ \ |
| 205 | ${datadir}/polkit-1/actions/org.selinux.config.policy \ | 129 | ${datadir}/polkit-1/actions/org.selinux.config.policy \ |
diff --git a/recipes-security/selinux/policycoreutils_2.7.bb b/recipes-security/selinux/policycoreutils_2.7.bb index 54ec69a..aa4870d 100644 --- a/recipes-security/selinux/policycoreutils_2.7.bb +++ b/recipes-security/selinux/policycoreutils_2.7.bb | |||
| @@ -7,8 +7,5 @@ SRC_URI[md5sum] = "65311b66ae01f7b7ad7c2ea7401b68ed" | |||
| 7 | SRC_URI[sha256sum] = "0a1b8a4a323b854981c6755ff025fe98a0f1cff307f109abb260f0490f13e4f4" | 7 | SRC_URI[sha256sum] = "0a1b8a4a323b854981c6755ff025fe98a0f1cff307f109abb260f0490f13e4f4" |
| 8 | 8 | ||
| 9 | SRC_URI += "\ | 9 | SRC_URI += "\ |
| 10 | file://policycoreutils-fix-sepolicy-install-path.patch \ | ||
| 11 | file://policycoreutils-loadpolicy-symlink.patch \ | 10 | file://policycoreutils-loadpolicy-symlink.patch \ |
| 12 | file://policycoreutils-process-ValueError-for-sepolicy-seobject.patch \ | ||
| 13 | file://policycoreutils-fix-TypeError-for-seobject.py.patch \ | ||
| 14 | " | 11 | " |
diff --git a/recipes-security/selinux/policycoreutils_git.bb b/recipes-security/selinux/policycoreutils_git.bb index 2057408..98a3fa7 100644 --- a/recipes-security/selinux/policycoreutils_git.bb +++ b/recipes-security/selinux/policycoreutils_git.bb | |||
| @@ -6,8 +6,5 @@ include ${BPN}.inc | |||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" |
| 7 | 7 | ||
| 8 | SRC_URI += "\ | 8 | SRC_URI += "\ |
| 9 | file://policycoreutils-fix-sepolicy-install-path.patch \ | ||
| 10 | file://policycoreutils-loadpolicy-symlink.patch \ | 9 | file://policycoreutils-loadpolicy-symlink.patch \ |
| 11 | file://policycoreutils-process-ValueError-for-sepolicy-seobject.patch \ | ||
| 12 | file://policycoreutils-fix-TypeError-for-seobject.py.patch \ | ||
| 13 | " | 10 | " |
diff --git a/recipes-security/selinux/selinux-python.inc b/recipes-security/selinux/selinux-python.inc new file mode 100644 index 0000000..cc907ae --- /dev/null +++ b/recipes-security/selinux/selinux-python.inc | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | SUMMARY = "Python modules and various SELinux utilities." | ||
| 2 | DESCRIPTION = "\ | ||
| 3 | This package contains Python modules sepolgen, sepolicy; And the \ | ||
| 4 | SELinux utilities audit2allow, chcat, semanage ..." | ||
| 5 | |||
| 6 | SECTION = "base" | ||
| 7 | LICENSE = "GPLv2+" | ||
| 8 | |||
| 9 | SRC_URI += "file://fix-sepolicy-install-path.patch \ | ||
| 10 | file://fix-TypeError-for-seobject.py.patch \ | ||
| 11 | file://process-ValueError-for-sepolicy-seobject.patch \ | ||
| 12 | " | ||
| 13 | |||
| 14 | inherit python-dir | ||
| 15 | |||
| 16 | DEPENDS += "python-native libsepol" | ||
| 17 | RDEPENDS_${BPN}-audit2allow += "\ | ||
| 18 | python-textutils \ | ||
| 19 | libselinux-python \ | ||
| 20 | ${BPN}-sepolgen \ | ||
| 21 | " | ||
| 22 | RDEPENDS_${BPN}-chcat += "\ | ||
| 23 | python-codecs \ | ||
| 24 | python-shell \ | ||
| 25 | python-stringold \ | ||
| 26 | python-unixadmin \ | ||
| 27 | libselinux-python \ | ||
| 28 | ${BPN} \ | ||
| 29 | " | ||
| 30 | RDEPENDS_${BPN} += "\ | ||
| 31 | python-codecs \ | ||
| 32 | python-io \ | ||
| 33 | python-ipy \ | ||
| 34 | python-re \ | ||
| 35 | python-stringold \ | ||
| 36 | python-syslog \ | ||
| 37 | python-unixadmin \ | ||
| 38 | libselinux-python \ | ||
| 39 | libsemanage-python \ | ||
| 40 | " | ||
| 41 | RDEPENDS_${BPN}-semanage += "\ | ||
| 42 | python-core \ | ||
| 43 | python-ipy \ | ||
| 44 | python-compression \ | ||
| 45 | python-xml \ | ||
| 46 | libselinux-python \ | ||
| 47 | ${BPN} \ | ||
| 48 | " | ||
| 49 | RDEPENDS_${BPN}-sepolicy += "\ | ||
| 50 | python-argparse \ | ||
| 51 | python-codecs \ | ||
| 52 | python-core \ | ||
| 53 | python-syslog \ | ||
| 54 | ${BPN} \ | ||
| 55 | " | ||
| 56 | RDEPENDS_${BPN}-sepolgen-ifgen += "\ | ||
| 57 | python \ | ||
| 58 | libselinux-python \ | ||
| 59 | " | ||
| 60 | |||
| 61 | PACKAGES =+ "\ | ||
| 62 | ${PN}-audit2allow \ | ||
| 63 | ${PN}-sepolgen-ifgen \ | ||
| 64 | ${PN}-chcat \ | ||
| 65 | ${PN}-semanage \ | ||
| 66 | ${PN}-sepolgen \ | ||
| 67 | ${PN}-sepolicy \ | ||
| 68 | " | ||
| 69 | FILES_${PN}-audit2allow = "\ | ||
| 70 | ${bindir}/audit2allow \ | ||
| 71 | ${bindir}/audit2why \ | ||
| 72 | " | ||
| 73 | FILES_${PN}-chcat = "\ | ||
| 74 | ${bindir}/chcat \ | ||
| 75 | " | ||
| 76 | FILES_${PN}-semanage = "\ | ||
| 77 | ${sbindir}/semanage \ | ||
| 78 | ${datadir}/bash-completion/completions/semanage \ | ||
| 79 | " | ||
| 80 | # The ${bindir}/sepolgen is a symlink to ${bindir}/sepolicy | ||
| 81 | FILES_${PN}-sepolicy += "\ | ||
| 82 | ${bindir}/sepolgen \ | ||
| 83 | ${bindir}/sepolicy \ | ||
| 84 | ${datadir}/bash-completion/completions/sepolicy \ | ||
| 85 | " | ||
| 86 | FILES_${PN}-sepolgen-ifgen += "\ | ||
| 87 | ${bindir}/sepolgen-ifgen \ | ||
| 88 | ${bindir}/sepolgen-ifgen-attr-helper \ | ||
| 89 | " | ||
| 90 | FILES_${PN}-sepolgen += "\ | ||
| 91 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolgen* \ | ||
| 92 | ${localstatedir}/lib/sepolgen/perm_map \ | ||
| 93 | " | ||
| 94 | # Map to policycoreutils-python in 2.6 | ||
| 95 | FILES_${PN} += "\ | ||
| 96 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/seobject.py* \ | ||
| 97 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy*.egg-info \ | ||
| 98 | ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/* \ | ||
| 99 | " | ||
| 100 | |||
| 101 | EXTRA_OEMAKE += "LIBSEPOLA=${STAGING_LIBDIR}/libsepol.a" | ||
| 102 | do_install() { | ||
| 103 | oe_runmake DESTDIR=${D} \ | ||
| 104 | PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \ | ||
| 105 | install | ||
| 106 | } | ||
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch b/recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch index 993ff7e..993ff7e 100644 --- a/recipes-security/selinux/policycoreutils/policycoreutils-fix-TypeError-for-seobject.py.patch +++ b/recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch | |||
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-fix-sepolicy-install-path.patch b/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch index 617908a..617908a 100644 --- a/recipes-security/selinux/policycoreutils/policycoreutils-fix-sepolicy-install-path.patch +++ b/recipes-security/selinux/selinux-python/fix-sepolicy-install-path.patch | |||
diff --git a/recipes-security/selinux/policycoreutils/policycoreutils-process-ValueError-for-sepolicy-seobject.patch b/recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch index 1929aa5..1929aa5 100644 --- a/recipes-security/selinux/policycoreutils/policycoreutils-process-ValueError-for-sepolicy-seobject.patch +++ b/recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch | |||
diff --git a/recipes-security/selinux/selinux-python_2.7.bb b/recipes-security/selinux/selinux-python_2.7.bb new file mode 100644 index 0000000..f98be5f --- /dev/null +++ b/recipes-security/selinux/selinux-python_2.7.bb | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | include selinux_20170804.inc | ||
| 2 | include ${BPN}.inc | ||
| 3 | |||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" | ||
| 5 | |||
| 6 | SRC_URI[md5sum] = "b118229d34a6aec34471c3c2c9cac172" | ||
| 7 | SRC_URI[sha256sum] = "4217cb965ecda96c91e15ffcc2e7ddd13ecc2bf5631100f3cd072a7616f140ed" | ||
