refpolicy: update file context for chfn/chsh
PATCH 1/3 refpolicy: update file context for chfn/chsh
The util-linux has provided chfn and chsh since oe-core commit 804c6b5bd3d398d5ea2a45d6bcc23c76e328ea3f. Update the file context for them.
Signed-off-by Yi Zhao <[email protected]>
--- ...ge-update-file-context-for-chfn-chsh.patch | 34 +++++++++++++++++++ .../refpolicy/refpolicy_common.inc | 1 + 2 files changed, 35 insertions(+) create mode 100644 recipes-security/refpolicy/refpolicy/0091-fc-usermanage-update-file-context-for-chfn-chsh.patch
recipes-security/refpolicy/refpolicy/0091-fc-usermanage-update-file-context-for-chfn-chsh.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 311d4759340f2af1e1e157d571802e4367e0a46b Mon Sep 17 00:00:00 2001 +From: Yi Zhao <[email protected]> +Date: Mon, 2 Aug 2021 09:38:39 +0800 +Subject: [PATCH] fc/usermanage: update file context for chfn/chsh + +The util-linux has provided chfn and chsh since oe-core commit +804c6b5bd3d398d5ea2a45d6bcc23c76e328ea3f. Update the file context for +them. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <[email protected]> +--- + policy/modules/admin/usermanage.fc | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/policy/modules/admin/usermanage.fc b/policy/modules/admin/usermanage.fc +index 6a051f8a5..bf1ff09ab 100644 +--- a/policy/modules/admin/usermanage.fc ++++ b/policy/modules/admin/usermanage.fc +@@ -5,8 +5,10 @@ ifdef(`distro_debian',` + /usr/bin/chage -- gen_context(system_u:object_r:passwd_exec_t,s0) + /usr/bin/chfn -- gen_context(system_u:object_r:chfn_exec_t,s0) + /usr/bin/chfn\.shadow -- gen_context(system_u:object_r:chfn_exec_t,s0) ++/usr/bin/chfn\.util-linux -- gen_context(system_u:object_r:chfn_exec_t,s0) + /usr/bin/chsh -- gen_context(system_u:object_r:chfn_exec_t,s0) + /usr/bin/chsh\.shadow -- gen_context(system_u:object_r:chfn_exec_t,s0) ++/usr/bin/chsh\.util-linux -- gen_context(system_u:object_r:chfn_exec_t,s0) + /usr/bin/crack_[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0) + /usr/bin/cracklib-[a-z]* -- gen_context(system_u:object_r:crack_exec_t,s0) + /usr/bin/gpasswd -- gen_context(system_u:object_r:groupadd_exec_t,s0) +-- +2.17.1 +
recipes-security/refpolicy/refpolicy_common.inc +1 -0
@@ -108,6 +108,7 @@ SRC_URI += " \ file://0088-policy-modules-services-bind-make-named_t-domain-MLS.patch \ file://0089-policy-modules-services-rpc-make-rpcd_t-MLS-trusted-.patch \ file://0090-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch \ + file://0091-fc-usermanage-update-file-context-for-chfn-chsh.patch \ " S = "${WORKDIR}/refpolicy"
Signature · 1 line
2.25.1
PATCH 2/3 layer.conf: set default refpolicy provider
Currently there is no default refpolicy provider and the user must specify it in local.conf. Set the default refpolicy provider to refpolicy-targeted in case the user doesn't set it.
Signed-off-by Yi Zhao <[email protected]>
--- conf/layer.conf | 2 ++ 1 file changed, 2 insertions(+)
conf/layer.conf +2 -0
@@ -29,3 +29,5 @@ LAYERDEPENDS_selinux = " \ core \ meta-python \ " + +PREFERRED_PROVIDER_virtual/refpolicy ??= "refpolicy-targeted"
Signature · 1 line
2.25.1
PATCH 3/3 meta-selinux: convert to new override syntax
In reply to Yi ZhaoThis is the result of automated script conversion:poky/scripts/contrib/convert-overrides.py meta-selinux
Converting the metadata to use ":" as the override character instead of "_".
Signed-off-by Yi Zhao <[email protected]>
--- README | 6 +- SELinux-FAQ | 4 +- classes/enable-audit.bbclass | 2 +- classes/enable-selinux.bbclass | 2 +- classes/meson-enable-selinux.bbclass | 2 +- classes/meson-selinux.bbclass | 2 +- classes/selinux-image.bbclass | 2 +- classes/with-audit.bbclass | 2 +- classes/with-selinux.bbclass | 2 +- .../iscsi-initiator-utils_selinux.inc | 2 +- .../python/python_selinux.inc | 2 +- recipes-connectivity/bind/bind_selinux.inc | 4 +- .../openssh/openssh_selinux.inc | 4 +- recipes-core/busybox/busybox_selinux.inc | 10 ++-- recipes-core/eudev/eudev_selinux.inc | 2 +- .../initscripts/initscripts-1.0_selinux.inc | 4 +- recipes-core/libcgroup/libcgroup_selinux.inc | 4 +- recipes-core/systemd/systemd_selinux.inc | 2 +- recipes-core/sysvinit/sysvinit_selinux.inc | 2 +- recipes-extended/lsof/lsof_selinux.inc | 2 +- recipes-extended/pam/libpam_selinux.inc | 2 +- recipes-extended/shadow/shadow_selinux.inc | 2 +- .../sysklogd/sysklogd_selinux.inc | 2 +- recipes-extended/tar/tar_selinux.inc | 2 +- recipes-graphics/xcb/libxcb_selinux.inc | 2 +- recipes-kernel/linux/linux-yocto_selinux.inc | 2 +- .../packagegroup-core-selinux.bb | 4 +- .../packagegroup-selinux-minimal.bb | 4 +- .../packagegroup-selinux-policycoreutils.bb | 4 +- .../refpolicy/refpolicy_common.inc | 14 ++--- recipes-security/refpolicy/refpolicy_git.inc | 2 +- recipes-security/selinux/checkpolicy_3.2.bb | 2 +- .../selinux/libselinux-python_3.2.bb | 10 ++-- recipes-security/selinux/libselinux_3.2.bb | 4 +- recipes-security/selinux/libsemanage_3.2.bb | 16 ++--- recipes-security/selinux/mcstrans_3.2.bb | 10 ++-- .../selinux/policycoreutils_3.2.bb | 60 +++++++++---------- recipes-security/selinux/restorecond_3.2.bb | 10 ++-- .../selinux/selinux-autorelabel_0.1.bb | 4 +- recipes-security/selinux/selinux-dbus_3.2.bb | 4 +- recipes-security/selinux/selinux-gui_3.2.bb | 4 +- recipes-security/selinux/selinux-init_0.1.bb | 2 +- recipes-security/selinux/selinux-initsh.inc | 8 +-- .../selinux/selinux-labeldev_0.1.bb | 2 +- .../selinux/selinux-python_3.2.bb | 26 ++++---- .../selinux/selinux-sandbox_3.2.bb | 4 +- .../selinux/semodule-utils_3.2.bb | 8 +-- recipes-security/setools/setools_4.4.0.bb | 10 ++-- recipes-support/attr/attr_selinux.inc | 2 +- recipes-support/libpcre/libpcre_selinux.inc | 4 +- 50 files changed, 146 insertions(+), 146 deletions(-)
README +3 -3
@@ -38,7 +38,7 @@ layer should not change the system behavior. In order to use the components in this layer you must add the 'selinux' to the DISTRO_FEATURES. In addition to selinux, you should be sure that acl, xattr and pam are also present. -e.g. DISTRO_FEATURES_append = " acl xattr pam selinux" +e.g. DISTRO_FEATURES:append = " acl xattr pam selinux" You must also specify a preferred provider for the virtual/refpolicy. The included policies with this layer are simply reference policies and will need
@@ -69,8 +69,8 @@ By default selinux enabled images coming up with "sysvinit" as init manager, we can use "systemd" as an init manager using below changes to local.conf * enable systemd as init manager changes to local.conf -DISTRO_FEATURES_remove = " sysvinit" -DISTRO_FEATURES_append = " systemd" +DISTRO_FEATURES:remove = " sysvinit" +DISTRO_FEATURES:append = " systemd" VIRTUAL-RUNTIME_init_manager = "systemd" DISTRO_FEATURES_BACKFILL_CONSIDERED = ""
SELinux-FAQ +2 -2
@@ -67,7 +67,7 @@ After init Poky build environment, please follow these steps: 1. Add meta-selinux path to BUILDDIR/conf/bblayers.conf file. - 2. Set DISTRO="poky-selinux" or add DISTRO_FEATURES_append=" pam selinux" + 2. Set DISTRO="poky-selinux" or add DISTRO_FEATURES:append=" pam selinux" in BUILDDIR/conf/local.conf file. 3. Build the default selinux image.
@@ -81,7 +81,7 @@ the following steps: 1. Add meta-selinux path to BUILDDIR/conf/bblayers.conf file - 2. Add DISTRO_FEATURES_append=" pam selinux" in BUILDDIR/conf/local.conf + 2. Add DISTRO_FEATURES:append=" pam selinux" in BUILDDIR/conf/local.conf file. 3. Add packagegroup-core-selinux to your custom image.
classes/enable-audit.bbclass +1 -1
@@ -1,4 +1,4 @@ # There is still no audit DISTRO_FEATURE, so enable audit when selinux feature enabled. inherit selinux -PACKAGECONFIG_append = " ${@target_selinux(d, 'audit')}" +PACKAGECONFIG:append = " ${@target_selinux(d, 'audit')}"
classes/enable-selinux.bbclass +1 -1
@@ -1,4 +1,4 @@ inherit selinux -PACKAGECONFIG_append = " ${@target_selinux(d)}" +PACKAGECONFIG:append = " ${@target_selinux(d)}" PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,"
classes/meson-enable-selinux.bbclass +1 -1
@@ -1,4 +1,4 @@ inherit selinux -PACKAGECONFIG_append = " ${@target_selinux(d)}" +PACKAGECONFIG:append = " ${@target_selinux(d)}" PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux,"
classes/meson-selinux.bbclass +1 -1
@@ -1,4 +1,4 @@ inherit selinux -PACKAGECONFIG_append = " ${@target_selinux(d)}" +PACKAGECONFIG:append = " ${@target_selinux(d)}" PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,"
classes/selinux-image.bbclass +1 -1
@@ -10,6 +10,6 @@ selinux_set_labels () { DEPENDS += "policycoreutils-native" -IMAGE_PREPROCESS_COMMAND_append = " selinux_set_labels ;" +IMAGE_PREPROCESS_COMMAND:append = " selinux_set_labels ;" inherit core-image
classes/with-audit.bbclass +1 -1
@@ -1,5 +1,5 @@ # There is still no audit DISTRO_FEATURE, so enable audit when selinux feature enabled. inherit selinux -PACKAGECONFIG_append = " ${@target_selinux(d, 'audit')}" +PACKAGECONFIG:append = " ${@target_selinux(d, 'audit')}" PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
classes/with-selinux.bbclass +1 -1
@@ -1,4 +1,4 @@ inherit selinux -PACKAGECONFIG_append = " ${@target_selinux(d)}" +PACKAGECONFIG:append = " ${@target_selinux(d)}" PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux,"
dynamic-layers/networking-layer/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_selinux.inc +1 -1
@@ -1 +1 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
dynamic-layers/python2-layer/recipes-devtools/python/python_selinux.inc +1 -1
@@ -1,5 +1,5 @@ # If selinux enabled, disable handlers to rw command history file -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" inherit selinux
recipes-connectivity/bind/bind_selinux.inc +2 -2
@@ -1,8 +1,8 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "file://volatiles.04_bind" -do_install_append() { +do_install:append() { install -d ${D}${sysconfdir}/default/volatiles install -m 0644 ${WORKDIR}/volatiles.04_bind ${D}${sysconfdir}/default/volatiles/04_bind
recipes-connectivity/openssh/openssh_selinux.inc +2 -2
@@ -1,9 +1,9 @@ inherit with-selinux -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" # There is no distro feature just for audit. -PACKAGECONFIG_append = " audit" +PACKAGECONFIG:append = " audit" PACKAGECONFIG[audit] = "--with-audit=linux,--without-audit,audit,"
recipes-core/busybox/busybox_selinux.inc +5 -5
@@ -1,6 +1,6 @@ PTEST_BINDIR = "0" -FILES_${PN} += "${libdir}/${PN}" +FILES:${PN} += "${libdir}/${PN}" # We should use sh wrappers instead of links so the commands could get correct # security labels
@@ -39,7 +39,7 @@ python create_sh_wrapper_reset_alternative_vars () { # Match coreutils if alt_name == '[': alt_name = 'lbracket' - d.appendVar('ALTERNATIVE_%s' % (pn), ' ' + alt_name) + d.appendVar('ALTERNATIVE:%s' % (pn), ' ' + alt_name) d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, alt_link_name) if os.path.exists(alt_wppath_dest): d.setVarFlag('ALTERNATIVE_TARGET', alt_name, alt_wppath)
@@ -56,11 +56,11 @@ python create_sh_wrapper_reset_alternative_vars () { } # Add to PACKAGEBUILDPKGD so it could override the alternatives, which are set in -# do_package_prepend() section of busybox_*.bb. -PACKAGEBUILDPKGD_prepend = "create_sh_wrapper_reset_alternative_vars " +# do_package:prepend() section of busybox_*.bb. +PACKAGEBUILDPKGD:prepend = "create_sh_wrapper_reset_alternative_vars " # Use sh wrappers instead of links -pkg_postinst_${PN} () { +pkg_postinst:${PN} () { # This part of code is dedicated to the on target upgrade problem. # It's known that if we don't make appropriate symlinks before update-alternatives calls, # there will be errors indicating missing commands such as 'sed'.
recipes-core/eudev/eudev_selinux.inc +1 -1
@@ -1,3 +1,3 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" inherit enable-selinux
recipes-core/initscripts/initscripts-1.0_selinux.inc +2 -2
@@ -1,6 +1,6 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" -do_install_append () { +do_install:append () { cat <<-EOF >> ${D}${sysconfdir}/init.d/populate-volatile.sh touch /var/log/lastlog test ! -x /sbin/restorecon || /sbin/restorecon -iRF /var/volatile/ /var/lib /run \
recipes-core/libcgroup/libcgroup_selinux.inc +2 -2
@@ -1,6 +1,6 @@ -EXTRA_OECONF_append_class-native = " --enable-pam=no" +EXTRA_OECONF:append:class-native = " --enable-pam=no" -do_install_append() { +do_install:append() { test ! -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 || { mv -f ${D}${base_libdir}/security/pam_cgroup.so.0.0.0 ${D}${base_libdir}/security/pam_cgroup.so rm -f ${D}${base_libdir}/security/pam_cgroup.so.*
recipes-core/systemd/systemd_selinux.inc +1 -1
@@ -1,6 +1,6 @@ inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-audit', '', d)} -do_install_append() { +do_install:append() { if ${@bb.utils.contains('PACKAGECONFIG', 'backlight', 'true', 'false', d)}; then install -d ${D}${localstatedir}/lib/systemd/backlight fi
recipes-core/sysvinit/sysvinit_selinux.inc +1 -1
@@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" B = "${S}"
recipes-extended/lsof/lsof_selinux.inc +1 -1
@@ -2,7 +2,7 @@ inherit selinux DEPENDS += "${LIBSELINUX}" -do_configure_prepend () { +do_configure:prepend () { export LINUX_HASSELINUX="${@target_selinux(d, 'Y', 'N')}" export LSOF_CFGF="${CFLAGS}" export LSOF_CFGL="${LDFLAGS}"
recipes-extended/pam/libpam_selinux.inc +1 -1
@@ -1,3 +1,3 @@ inherit enable-selinux -RDEPENDS_${PN}-runtime += "${@target_selinux(d, 'pam-plugin-selinux')}" +RDEPENDS:${PN}-runtime += "${@target_selinux(d, 'pam-plugin-selinux')}"
recipes-extended/shadow/shadow_selinux.inc +1 -1
@@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" inherit with-selinux with-audit
recipes-extended/sysklogd/sysklogd_selinux.inc +1 -1
@@ -1 +1 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
recipes-extended/tar/tar_selinux.inc +1 -1
@@ -1,3 +1,3 @@ inherit with-selinux -PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'acl', ' acl', '', d)}" +PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'acl', ' acl', '', d)}"
recipes-graphics/xcb/libxcb_selinux.inc +1 -1
@@ -3,4 +3,4 @@ inherit enable-selinux PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,," PACKAGES += "${PN}-xselinux" -FILES_${PN}-xselinux += "${libdir}/libxcb-xselinux.so.*" +FILES:${PN}-xselinux += "${libdir}/libxcb-xselinux.so.*"
recipes-kernel/linux/linux-yocto_selinux.inc +1 -1
@@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" # Enable selinux support in the kernel if the feature is enabled SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'file://selinux.cfg', '', d)}"
recipes-security/packagegroups/packagegroup-core-selinux.bb +2 -2
@@ -6,9 +6,9 @@ PACKAGES = "\ ${PN} \ " -ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY:${PN} = "1" -RDEPENDS_${PN} = " \ +RDEPENDS:${PN} = " \ libsepol \ libsepol-bin \ libselinux \
recipes-security/packagegroups/packagegroup-selinux-minimal.bb +2 -2
@@ -6,9 +6,9 @@ PACKAGES = "\ ${PN} \ " -ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY:${PN} = "1" -RDEPENDS_${PN} = "\ +RDEPENDS:${PN} = "\ coreutils \ libsepol \ libselinux \
recipes-security/packagegroups/packagegroup-selinux-policycoreutils.bb +2 -2
@@ -6,9 +6,9 @@ PACKAGES = "\ ${PN} \ " -ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY:${PN} = "1" -RDEPENDS_${PN} = "\ +RDEPENDS:${PN} = "\ policycoreutils-fixfiles \ policycoreutils-genhomedircon \ policycoreutils-loadpolicy \
recipes-security/refpolicy/refpolicy_common.inc +7 -7
@@ -6,7 +6,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=393a5ca445f6965873eca0259a17f833" PROVIDES = "virtual/refpolicy" -RPROVIDES_${PN} = "refpolicy" +RPROVIDES:${PN} = "refpolicy" # Specific config files for Poky SRC_URI += "file://customizable_types \
@@ -113,13 +113,13 @@ SRC_URI += " \ S = "${WORKDIR}/refpolicy" -CONFFILES_${PN} += "${sysconfdir}/selinux/config" -FILES_${PN} += " \ +CONFFILES:${PN} += "${sysconfdir}/selinux/config" +FILES:${PN} += " \ ${sysconfdir}/selinux/${POLICY_NAME}/ \ ${datadir}/selinux/${POLICY_NAME}/*.pp \ ${localstatedir}/lib/selinux/${POLICY_NAME}/ \ " -FILES_${PN}-dev =+ " \ +FILES:${PN}-dev =+ " \ ${datadir}/selinux/${POLICY_NAME}/include/ \ ${sysconfdir}/selinux/sepolgen.conf \ "
@@ -128,7 +128,7 @@ EXTRANATIVEPATH += "bzip2-native" DEPENDS += "bzip2-replacement-native checkpolicy-native policycoreutils-native semodule-utils-native m4-native" -RDEPENDS_${PN}-dev =+ " \ +RDEPENDS:${PN}-dev =+ " \ python3-core \ "
@@ -289,11 +289,11 @@ do_install () { install_config } -do_install_append(){ +do_install:append(){ # While building policies on target, Makefile will be searched from SELINUX_DEVEL_PATH echo "SELINUX_DEVEL_PATH=${datadir}/selinux/${POLICY_NAME}/include" > ${D}${sysconfdir}/selinux/sepolgen.conf } -sysroot_stage_all_append () { +sysroot_stage_all:append () { sysroot_stage_dir ${D}${sysconfdir} ${SYSROOT_DESTDIR}${sysconfdir} }
recipes-security/refpolicy/refpolicy_git.inc +1 -1
@@ -6,6 +6,6 @@ SRCREV_refpolicy ?= "1167739da1882f9c89281095d2595da5ea2d9d6b" UPSTREAM_CHECK_GITTAGREGEX = "RELEASE_(?P<pver>\d+_\d+)" -FILESEXTRAPATHS_prepend := "${THISDIR}/refpolicy:" +FILESEXTRAPATHS:prepend := "${THISDIR}/refpolicy:" include refpolicy_common.inc
recipes-security/selinux/checkpolicy_3.2.bb +1 -1
@@ -18,7 +18,7 @@ EXTRA_OEMAKE += "LIBSEPOLA=${STAGING_LIBDIR}/libsepol.a" S = "${WORKDIR}/git/checkpolicy" -do_install_append() { +do_install:append() { install test/dismod ${D}/${bindir}/sedismod install test/dispol ${D}/${bindir}/sedispol }
recipes-security/selinux/libselinux-python_3.2.bb +5 -5
@@ -10,7 +10,7 @@ require selinux_common.inc inherit python3native python3targetconfig -FILESEXTRAPATHS_prepend := "${THISDIR}/libselinux:" +FILESEXTRAPATHS:prepend := "${THISDIR}/libselinux:" SRC_URI += "\ file://0001-Makefile-fix-python-modules-install-path-for-multili.patch \ file://0001-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch \
@@ -19,7 +19,7 @@ SRC_URI += "\ S = "${WORKDIR}/git/libselinux" DEPENDS += "python3 swig-native libpcre libsepol" -RDEPENDS_${PN} += "libselinux python3-core python3-shell" +RDEPENDS:${PN} += "libselinux python3-core python3-shell" def get_policyconfigarch(d): import re
@@ -30,10 +30,10 @@ def get_policyconfigarch(d): EXTRA_OEMAKE += "${@get_policyconfigarch(d)}" EXTRA_OEMAKE += "LDFLAGS='${LDFLAGS} -lpcre' LIBSEPOLA='${STAGING_LIBDIR}/libsepol.a'" -EXTRA_OEMAKE_append_libc-musl = " FTS_LDLIBS=-lfts" +EXTRA_OEMAKE:append:libc-musl = " FTS_LDLIBS=-lfts" -FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" -INSANE_SKIP_${PN} = "dev-so" +FILES:${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*" +INSANE_SKIP:${PN} = "dev-so" do_compile() { oe_runmake pywrap -j1 \
recipes-security/selinux/libselinux_3.2.bb +2 -2
@@ -11,7 +11,7 @@ require selinux_common.inc inherit lib_package python3native DEPENDS += "libsepol libpcre" -DEPENDS_append_libc-musl = " fts" +DEPENDS:append:libc-musl = " fts" S = "${WORKDIR}/git/libselinux"
@@ -24,6 +24,6 @@ def get_policyconfigarch(d): EXTRA_OEMAKE += "${@get_policyconfigarch(d)}" EXTRA_OEMAKE += "LDFLAGS='${LDFLAGS} -lpcre' LIBSEPOLA='${STAGING_LIBDIR}/libsepol.a'" -EXTRA_OEMAKE_append_libc-musl = " FTS_LDLIBS=-lfts" +EXTRA_OEMAKE:append:libc-musl = " FTS_LDLIBS=-lfts" BBCLASSEXTEND = "native"
recipes-security/selinux/libsemanage_3.2.bb +8 -8
@@ -17,30 +17,30 @@ SRC_URI += "file://libsemanage-Fix-execve-segfaults-on-Ubuntu.patch \ " DEPENDS += "libsepol libselinux bzip2 python3 bison-native flex-native swig-native" -DEPENDS_append_class-target = " audit" +DEPENDS:append:class-target = " audit" S = "${WORKDIR}/git/libsemanage" PACKAGES =+ "${PN}-python" # For /usr/libexec/selinux/semanage_migrate_store -RDEPENDS_${PN}-python += "python3-core" +RDEPENDS:${PN}-python += "python3-core" -FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ +FILES:${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \ ${libexecdir}/selinux/semanage_migrate_store" -FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" -FILES_${PN} += "${libexecdir}" +FILES:${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*" +FILES:${PN} += "${libexecdir}" -EXTRA_OEMAKE_class-native += "DISABLE_AUDIT=y" +EXTRA_OEMAKE:class-native += "DISABLE_AUDIT=y" -do_compile_append() { +do_compile:append() { oe_runmake pywrap \ PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \ PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}' } -do_install_append() { +do_install:append() { oe_runmake install-pywrap \ PYCEXT='.so' \ PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
recipes-security/selinux/mcstrans_3.2.bb +5 -5
@@ -24,7 +24,7 @@ EXTRA_OEMAKE += "SBINDIR=${base_sbindir} \ S = "${WORKDIR}/git/mcstrans" -do_install_append() { +do_install:append() { install -d ${D}${sbindir} install -m 755 utils/untranscon ${D}${sbindir}/ install -m 755 utils/transcon ${D}${sbindir}/
@@ -42,12 +42,12 @@ do_install_append() { cp -r share/* ${D}${datadir}/mcstrans/. } -SYSTEMD_SERVICE_mcstrans = "mcstrans.service" +SYSTEMD_SERVICE:mcstrans = "mcstrans.service" INITSCRIPT_PACKAGES = "mcstrans" -INITSCRIPT_NAME_mcstrans = "mcstrans" -INITSCRIPT_PARAMS_mcstrans = "defaults" +INITSCRIPT_NAME:mcstrans = "mcstrans" +INITSCRIPT_PARAMS:mcstrans = "defaults" -pkg_postinst_mcstrans () { +pkg_postinst:mcstrans () { if [ -z "$D" ]; then if command -v systemd-tmpfiles >/dev/null; then systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/setrans.conf
recipes-security/selinux/policycoreutils_3.2.bb +30 -30
148 lines not on this page · raw message
recipes-security/selinux/restorecond_3.2.bb +5 -5
@@ -20,16 +20,16 @@ EXTRA_OEMAKE += "SYSTEMDSYSTEMUNITDIR=${systemd_system_unitdir} \ S = "${WORKDIR}/git/restorecond" -FILES_${PN} += "${datadir}/dbus-1/services/org.selinux.Restorecond.service \ +FILES:${PN} += "${datadir}/dbus-1/services/org.selinux.Restorecond.service \ ${systemd_user_unitdir}/* \ " -SYSTEMD_SERVICE_restorecond = "restorecond.service" +SYSTEMD_SERVICE:restorecond = "restorecond.service" INITSCRIPT_PACKAGES = "restorecond" -INITSCRIPT_NAME_restorecond = "restorecond" -INITSCRIPT_PARAMS_restorecond = "defaults" +INITSCRIPT_NAME:restorecond = "restorecond" +INITSCRIPT_PARAMS:restorecond = "defaults" -do_install_append() { +do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then # remove /usr/lib/systemd/user rm -rf ${D}${nonarch_libdir}
recipes-security/selinux/selinux-autorelabel_0.1.bb +2 -2
@@ -7,7 +7,7 @@ file is present.\ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -RDEPENDS_${PN} = " \ +RDEPENDS:${PN} = " \ policycoreutils-setfiles \ "
@@ -19,7 +19,7 @@ INITSCRIPT_PARAMS = "start 01 S ." require selinux-initsh.inc -do_install_append() { +do_install:append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then echo "# first boot relabelling" > ${D}/.autorelabel fi
recipes-security/selinux/selinux-dbus_3.2.bb +2 -2
@@ -9,9 +9,9 @@ require selinux_common.inc S = "${WORKDIR}/git/dbus" -RDEPENDS_${PN} += "python3-core selinux-python-sepolicy" +RDEPENDS:${PN} += "python3-core selinux-python-sepolicy" -FILES_${PN} += "\ +FILES:${PN} += "\ ${datadir}/system-config-selinux/selinux_server.py \ ${datadir}/polkit-1/actions/org.selinux.policy \ ${datadir}/dbus-1/system-services/org.selinux.service \
recipes-security/selinux/selinux-gui_3.2.bb +2 -2
@@ -10,9 +10,9 @@ require selinux_common.inc S = "${WORKDIR}/git/gui" -RDEPENDS_${PN} += "python3-core" +RDEPENDS:${PN} += "python3-core" -FILES_${PN} += " \ +FILES:${PN} += " \ ${datadir}/system-config-selinux/* \ ${datadir}/icons/hicolor/* \ ${datadir}/polkit-1/actions/org.selinux.config.policy \
recipes-security/selinux/selinux-init_0.1.bb +1 -1
@@ -7,7 +7,7 @@ boot time. \ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -RDEPENDS_${PN} = " \ +RDEPENDS:${PN} = " \ coreutils \ libselinux-bin \ policycoreutils-secon \
recipes-security/selinux/selinux-initsh.inc +4 -4
@@ -9,15 +9,15 @@ SELINUX_SCRIPT_DST ?= "${SELINUX_SCRIPT_SRC}" INITSCRIPT_NAME ?= "${SELINUX_SCRIPT_DST}" INITSCRIPT_PARAMS ?= "start 00 S ." -CONFFILES_${PN} += "${sysconfdir}/init.d/${SELINUX_SCRIPT_DST}" +CONFFILES:${PN} += "${sysconfdir}/init.d/${SELINUX_SCRIPT_DST}" PACKAGE_ARCH ?= "${MACHINE_ARCH}" inherit update-rc.d systemd -SYSTEMD_SERVICE_${PN} = "${SELINUX_SCRIPT_SRC}.service" +SYSTEMD_SERVICE:${PN} = "${SELINUX_SCRIPT_SRC}.service" -FILES_${PN} += "/.autorelabel" +FILES:${PN} += "/.autorelabel" do_install () { install -d ${D}${sysconfdir}/init.d/
@@ -36,6 +36,6 @@ do_install () { fi } -sysroot_stage_all_append () { +sysroot_stage_all:append () { sysroot_stage_dir ${D}${sysconfdir} ${SYSROOT_DESTDIR}${sysconfdir} }
recipes-security/selinux/selinux-labeldev_0.1.bb +1 -1
@@ -4,7 +4,7 @@ DESCRIPTION = "Set SELinux labels for /dev." LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" -RDEPENDS_${PN} = " \ +RDEPENDS:${PN} = " \ coreutils \ libselinux-bin \ policycoreutils-setfiles \
recipes-security/selinux/selinux-python_3.2.bb +13 -13
@@ -17,12 +17,12 @@ S = "${WORKDIR}/git/python" EXTRA_OEMAKE += "LIBSEPOLA=${STAGING_LIBDIR}/libsepol.a" DEPENDS += "python3 libsepol libselinux" -RDEPENDS_${BPN}-audit2allow += "\ +RDEPENDS:${BPN}-audit2allow += "\ python3-core \ libselinux-python \ ${BPN}-sepolgen \ " -RDEPENDS_${BPN}-chcat += "\ +RDEPENDS:${BPN}-chcat += "\ python3-core \ python3-codecs \ python3-shell \
@@ -31,7 +31,7 @@ RDEPENDS_${BPN}-chcat += "\ libselinux-python \ ${BPN} \ " -RDEPENDS_${BPN} += "\ +RDEPENDS:${BPN} += "\ python3-core \ python3-codecs \ python3-io \
@@ -43,7 +43,7 @@ RDEPENDS_${BPN} += "\ libsemanage-python \ setools \ " -RDEPENDS_${BPN}-semanage += "\ +RDEPENDS:${BPN}-semanage += "\ python3-core \ python3-ipy \ python3-compression \
@@ -52,13 +52,13 @@ RDEPENDS_${BPN}-semanage += "\ libselinux-python \ ${BPN} \ " -RDEPENDS_${BPN}-sepolicy += "\ +RDEPENDS:${BPN}-sepolicy += "\ python3-core \ python3-codecs \ python3-syslog \ ${BPN} \ " -RDEPENDS_${BPN}-sepolgen-ifgen += "\ +RDEPENDS:${BPN}-sepolgen-ifgen += "\ python3-core \ libselinux-python \ "
@@ -71,33 +71,33 @@ PACKAGES =+ "\ ${PN}-sepolgen \ ${PN}-sepolicy \ " -FILES_${PN}-audit2allow = "\ +FILES:${PN}-audit2allow = "\ ${bindir}/audit2allow \ ${bindir}/audit2why \ " -FILES_${PN}-chcat = "\ +FILES:${PN}-chcat = "\ ${bindir}/chcat \ " -FILES_${PN}-semanage = "\ +FILES:${PN}-semanage = "\ ${sbindir}/semanage \ ${datadir}/bash-completion/completions/semanage \ " # The ${bindir}/sepolgen is a symlink to ${bindir}/sepolicy -FILES_${PN}-sepolicy += "\ +FILES:${PN}-sepolicy += "\ ${bindir}/sepolgen \ ${bindir}/sepolicy \ ${datadir}/bash-completion/completions/sepolicy \ " -FILES_${PN}-sepolgen-ifgen += "\ +FILES:${PN}-sepolgen-ifgen += "\ ${bindir}/sepolgen-ifgen \ ${bindir}/sepolgen-ifgen-attr-helper \ " -FILES_${PN}-sepolgen += "\ +FILES:${PN}-sepolgen += "\ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolgen* \ ${localstatedir}/lib/sepolgen/perm_map \ " -FILES_${PN} += "\ +FILES:${PN} += "\ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/seobject.py* \ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy*.egg-info \ ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy/* \
recipes-security/selinux/selinux-sandbox_3.2.bb +2 -2
@@ -15,7 +15,7 @@ S = "${WORKDIR}/git/sandbox" DEPENDS += "libcap-ng libselinux" -RDEPENDS_${PN} += "\ +RDEPENDS:${PN} += "\ python3-core \ python3-math \ python3-shell \
@@ -24,7 +24,7 @@ RDEPENDS_${PN} += "\ selinux-python \ " -FILES_${PN} += "\ +FILES:${PN} += "\ ${datadir}/sandbox/sandboxX.sh \ ${datadir}/sandbox/start \ "
recipes-security/selinux/semodule-utils_3.2.bb +4 -4
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=393a5ca445f6965873eca0259a17f833" require selinux_common.inc DEPENDS += "libsepol" -RDEPENDS_${PN}-dev = "" +RDEPENDS:${PN}-dev = "" EXTRA_OEMAKE += "LIBSEPOLA=${STAGING_LIBDIR}/libsepol.a"
@@ -21,9 +21,9 @@ PACKAGES =+ "\ ${PN}-semodule-package \ " -FILES_${PN}-semodule-expand += "${bindir}/semodule_expand" -FILES_${PN}-semodule-link += "${bindir}/semodule_link" -FILES_${PN}-semodule-package += "\ +FILES:${PN}-semodule-expand += "${bindir}/semodule_expand" +FILES:${PN}-semodule-link += "${bindir}/semodule_link" +FILES:${PN}-semodule-package += "\ ${bindir}/semodule_package \ ${bindir}/semodule_unpackage \ "
recipes-security/setools/setools_4.4.0.bb +5 -5
@@ -23,18 +23,18 @@ LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=83a5eb6974c11f30785e90d0eeccf40c \ DEPENDS += "bison-native flex-native swig-native python3 python3-cython-native libsepol libselinux" -DEPENDS_class-native += "libselinux python3-setuptools python3-cython python3-networkx" +DEPENDS:class-native += "libselinux python3-setuptools python3-cython python3-networkx" -RDEPENDS_${PN} += "python3-networkx python3-decorator python3-setuptools \ +RDEPENDS:${PN} += "python3-networkx python3-decorator python3-setuptools \ python3-logging python3-json libselinux-python" -RDEPENDS_${PN}_class-native = "" +RDEPENDS:${PN}:class-native = "" -RPROVIDES_${PN} += "${PN}-console" +RPROVIDES:${PN} += "${PN}-console" inherit setuptools3 -do_install_append() { +do_install:append() { # Need PyQt5 support, disable gui tools rm -f ${D}${bindir}/apol rm -rf ${D}${libdir}/${PYTHON_DIR}/site-packages/setoolsgui
recipes-support/attr/attr_selinux.inc +1 -1
@@ -1,5 +1,5 @@ inherit selinux -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += "file://fix-ptest-failures-when-selinux-enabled.patch"
recipes-support/libpcre/libpcre_selinux.inc +2 -2
@@ -1,4 +1,4 @@ -do_install_append () { +do_install:append () { # This code creates libpcre for both the dev machine (SDK native) # and for cross-compiling (machine arch). For Linux (SDK Linux native # + all machine arch), symlinks to the .so files have to be created,
@@ -15,4 +15,4 @@ do_install_append () { fi } -FILES_${PN} += "${base_libdir}/libpcre.so.*" +FILES:${PN} += "${base_libdir}/libpcre.so.*"
Signature · 1 line
2.25.1