diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2021-08-19 12:47:03 +0800 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2021-08-29 21:34:22 -0400 |
commit | 31325005e4409e08b7f68eed44a9c4086453e4dd (patch) | |
tree | d8b3ac61ecc2730dab6f395d6dbcaf52f4e58a6c | |
parent | a101ac3dcedf5e8957061576dd6dadd738711717 (diff) | |
download | meta-selinux-31325005e4409e08b7f68eed44a9c4086453e4dd.tar.gz |
classes: drop redundant classes
There are some redundant classes: enable-selinux.bbclass,
with-selinux.bbclass, meson-enable-selinux.bbclass,
meson-selinux.bbclass, enable-audit.bbclass, with-audit.bbclass.
These classes only add PACKAGEOCNFIG[selinux]/[audit] to recipes. But
currently most recipes have added PACKAGECONFIG[selinux]/[audit] in
their bb files. We don't need these anymore. Only keep
enable-selinux.class and enable-audit.class to append
PACKAGECONFIG[selinux]/[audit] for recipes.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
30 files changed, 40 insertions, 59 deletions
diff --git a/classes/enable-selinux.bbclass b/classes/enable-selinux.bbclass index c8af97e..3dc61d6 100644 --- a/classes/enable-selinux.bbclass +++ b/classes/enable-selinux.bbclass | |||
@@ -1,4 +1,3 @@ | |||
1 | inherit selinux | 1 | inherit selinux |
2 | 2 | ||
3 | PACKAGECONFIG:append = " ${@target_selinux(d)}" | 3 | PACKAGECONFIG:append = " ${@target_selinux(d, 'selinux')}" |
4 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux," | ||
diff --git a/classes/meson-enable-selinux.bbclass b/classes/meson-enable-selinux.bbclass deleted file mode 100644 index b5b8cb7..0000000 --- a/classes/meson-enable-selinux.bbclass +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | inherit selinux | ||
2 | |||
3 | PACKAGECONFIG:append = " ${@target_selinux(d)}" | ||
4 | PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux," | ||
diff --git a/classes/meson-selinux.bbclass b/classes/meson-selinux.bbclass deleted file mode 100644 index 337ffca..0000000 --- a/classes/meson-selinux.bbclass +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | inherit selinux | ||
2 | |||
3 | PACKAGECONFIG:append = " ${@target_selinux(d)}" | ||
4 | PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux," | ||
diff --git a/classes/with-audit.bbclass b/classes/with-audit.bbclass deleted file mode 100644 index a99bf71..0000000 --- a/classes/with-audit.bbclass +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # There is still no audit DISTRO_FEATURE, so enable audit when selinux feature enabled. | ||
2 | inherit selinux | ||
3 | |||
4 | PACKAGECONFIG:append = " ${@target_selinux(d, 'audit')}" | ||
5 | PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," | ||
diff --git a/classes/with-selinux.bbclass b/classes/with-selinux.bbclass deleted file mode 100644 index 37b9e13..0000000 --- a/classes/with-selinux.bbclass +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | inherit selinux | ||
2 | |||
3 | PACKAGECONFIG:append = " ${@target_selinux(d)}" | ||
4 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux," | ||
diff --git a/recipes-connectivity/iproute2/iproute2_%.bbappend b/recipes-connectivity/iproute2/iproute2_%.bbappend index b01ad25..8cb2a5b 100644 --- a/recipes-connectivity/iproute2/iproute2_%.bbappend +++ b/recipes-connectivity/iproute2/iproute2_%.bbappend | |||
@@ -1 +1,2 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} | 1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} |
2 | PACKAGECONFIG[selinux] = ",,libselinux" | ||
diff --git a/recipes-connectivity/openssh/openssh_selinux.inc b/recipes-connectivity/openssh/openssh_selinux.inc index 20937c2..07c25c5 100644 --- a/recipes-connectivity/openssh/openssh_selinux.inc +++ b/recipes-connectivity/openssh/openssh_selinux.inc | |||
@@ -1,9 +1,6 @@ | |||
1 | inherit with-selinux | 1 | inherit enable-selinux enable-audit |
2 | 2 | ||
3 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | 3 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
4 | 4 | ||
5 | # There is no distro feature just for audit. | 5 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" |
6 | PACKAGECONFIG:append = " audit" | 6 | PACKAGECONFIG[audit] = "--with-audit=linux,--without-audit,audit" |
7 | |||
8 | PACKAGECONFIG[audit] = "--with-audit=linux,--without-audit,audit," | ||
9 | |||
diff --git a/recipes-core/coreutils/coreutils_%.bbappend b/recipes-core/coreutils/coreutils_%.bbappend index 7b9a2dc..138c23a 100644 --- a/recipes-core/coreutils/coreutils_%.bbappend +++ b/recipes-core/coreutils/coreutils_%.bbappend | |||
@@ -1,2 +1,2 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} | 1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} |
2 | 2 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" | |
diff --git a/recipes-core/dbus/dbus_%.bbappend b/recipes-core/dbus/dbus_%.bbappend index ee221e2..fe51e54 100644 --- a/recipes-core/dbus/dbus_%.bbappend +++ b/recipes-core/dbus/dbus_%.bbappend | |||
@@ -1,2 +1,2 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} | 1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux enable-audit', '', d)} |
2 | 2 | ||
diff --git a/recipes-core/eudev/eudev_selinux.inc b/recipes-core/eudev/eudev_selinux.inc index 94950f5..976cb23 100644 --- a/recipes-core/eudev/eudev_selinux.inc +++ b/recipes-core/eudev/eudev_selinux.inc | |||
@@ -1,3 +1,4 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
2 | 2 | ||
3 | inherit enable-selinux | 3 | inherit enable-selinux |
4 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" | ||
diff --git a/recipes-core/glib-2.0/glib-2.0_%.bbappend b/recipes-core/glib-2.0/glib-2.0_%.bbappend index 39a0a3a..74e22b3 100644 --- a/recipes-core/glib-2.0/glib-2.0_%.bbappend +++ b/recipes-core/glib-2.0/glib-2.0_%.bbappend | |||
@@ -1 +1 @@ | |||
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'meson-enable-selinux', '', d)} | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} | ||
diff --git a/recipes-core/systemd/systemd_selinux.inc b/recipes-core/systemd/systemd_selinux.inc index 8136ea8..7d466ee 100644 --- a/recipes-core/systemd/systemd_selinux.inc +++ b/recipes-core/systemd/systemd_selinux.inc | |||
@@ -1,4 +1,4 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-audit', '', d)} | 1 | inherit enable-selinux enable-audit |
2 | 2 | ||
3 | do_install:append() { | 3 | do_install:append() { |
4 | if ${@bb.utils.contains('PACKAGECONFIG', 'backlight', 'true', 'false', d)}; then | 4 | if ${@bb.utils.contains('PACKAGECONFIG', 'backlight', 'true', 'false', d)}; then |
diff --git a/recipes-core/util-linux/util-linux_%.bbappend b/recipes-core/util-linux/util-linux_%.bbappend index b01ad25..138c23a 100644 --- a/recipes-core/util-linux/util-linux_%.bbappend +++ b/recipes-core/util-linux/util-linux_%.bbappend | |||
@@ -1 +1,2 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} | 1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} |
2 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" | ||
diff --git a/recipes-devtools/rpm/rpm_selinux.inc b/recipes-devtools/rpm/rpm_selinux.inc index 983dda7..b6e0e7c 100644 --- a/recipes-devtools/rpm/rpm_selinux.inc +++ b/recipes-devtools/rpm/rpm_selinux.inc | |||
@@ -1,2 +1,2 @@ | |||
1 | inherit with-selinux | 1 | inherit enable-selinux |
2 | PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libsemanage," | 2 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" |
diff --git a/recipes-extended/at/at_%.bbappend b/recipes-extended/at/at_%.bbappend index b01ad25..74e22b3 100644 --- a/recipes-extended/at/at_%.bbappend +++ b/recipes-extended/at/at_%.bbappend | |||
@@ -1 +1 @@ | |||
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} | ||
diff --git a/recipes-extended/cronie/cronie_%.bbappend b/recipes-extended/cronie/cronie_%.bbappend index cfa56ca..2da759e 100644 --- a/recipes-extended/cronie/cronie_%.bbappend +++ b/recipes-extended/cronie/cronie_%.bbappend | |||
@@ -1,2 +1,2 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-audit', '', d)} | 1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux enable-audit', '', d)} |
2 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} | 2 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" |
diff --git a/recipes-extended/findutils/findutils_%.bbappend b/recipes-extended/findutils/findutils_%.bbappend index b01ad25..138c23a 100644 --- a/recipes-extended/findutils/findutils_%.bbappend +++ b/recipes-extended/findutils/findutils_%.bbappend | |||
@@ -1 +1,2 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} | 1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} |
2 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" | ||
diff --git a/recipes-extended/pam/libpam_selinux.inc b/recipes-extended/pam/libpam_selinux.inc index bee1f3e..2f8b945 100644 --- a/recipes-extended/pam/libpam_selinux.inc +++ b/recipes-extended/pam/libpam_selinux.inc | |||
@@ -1,3 +1,4 @@ | |||
1 | inherit enable-selinux | 1 | inherit enable-selinux |
2 | 2 | ||
3 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" | ||
3 | RDEPENDS:${PN}-runtime += "${@target_selinux(d, 'pam-plugin-selinux')}" | 4 | RDEPENDS:${PN}-runtime += "${@target_selinux(d, 'pam-plugin-selinux')}" |
diff --git a/recipes-extended/psmisc/psmisc_%.bbappend b/recipes-extended/psmisc/psmisc_%.bbappend index 74e22b3..d02ee09 100644 --- a/recipes-extended/psmisc/psmisc_%.bbappend +++ b/recipes-extended/psmisc/psmisc_%.bbappend | |||
@@ -1 +1,2 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} | 1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} |
2 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" | ||
diff --git a/recipes-extended/sed/sed_4.%.bbappend b/recipes-extended/sed/sed_4.%.bbappend index b01ad25..74e22b3 100644 --- a/recipes-extended/sed/sed_4.%.bbappend +++ b/recipes-extended/sed/sed_4.%.bbappend | |||
@@ -1 +1 @@ | |||
inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} | ||
diff --git a/recipes-extended/shadow/shadow_selinux.inc b/recipes-extended/shadow/shadow_selinux.inc index 3c8daea..e719ebc 100644 --- a/recipes-extended/shadow/shadow_selinux.inc +++ b/recipes-extended/shadow/shadow_selinux.inc | |||
@@ -1,6 +1,3 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
2 | 2 | ||
3 | inherit with-selinux with-audit | 3 | inherit enable-selinux enable-audit |
4 | |||
5 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux libsemanage," | ||
6 | |||
diff --git a/recipes-extended/sudo/sudo_%.bbappend b/recipes-extended/sudo/sudo_%.bbappend index b01ad25..2e35ec5 100644 --- a/recipes-extended/sudo/sudo_%.bbappend +++ b/recipes-extended/sudo/sudo_%.bbappend | |||
@@ -1 +1,4 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} | 1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux enable-audit', '', d)} |
2 | |||
3 | PACKAGECONFIG[audit] = "--with-linux-audit,--without-linux-audit,audit" | ||
4 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" | ||
diff --git a/recipes-extended/tar/tar_selinux.inc b/recipes-extended/tar/tar_selinux.inc index b1fa7bf..0f64298 100644 --- a/recipes-extended/tar/tar_selinux.inc +++ b/recipes-extended/tar/tar_selinux.inc | |||
@@ -1,3 +1,3 @@ | |||
1 | inherit with-selinux | 1 | inherit enable-selinux |
2 | 2 | ||
3 | PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'acl', ' acl', '', d)}" | 3 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" |
diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend index 02c4918..ef81ec4 100644 --- a/recipes-graphics/mesa/mesa_%.bbappend +++ b/recipes-graphics/mesa/mesa_%.bbappend | |||
@@ -1,2 +1,2 @@ | |||
1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'meson-selinux', '', d)} | 1 | inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} |
2 | 2 | PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux" | |
diff --git a/recipes-graphics/xcb/libxcb_selinux.inc b/recipes-graphics/xcb/libxcb_selinux.inc deleted file mode 100644 index 6924315..0000000 --- a/recipes-graphics/xcb/libxcb_selinux.inc +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | inherit enable-selinux | ||
2 | # libxcb-xselinux will not build with libselinux, so remove the depend | ||
3 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,," | ||
4 | |||
5 | PACKAGES += "${PN}-xselinux" | ||
6 | FILES:${PN}-xselinux += "${libdir}/libxcb-xselinux.so.*" | ||
diff --git a/recipes-graphics/xcb/libxcb_%.bbappend b/recipes-graphics/xorg-lib/libxcb_%.bbappend index 7719d3b..7719d3b 100644 --- a/recipes-graphics/xcb/libxcb_%.bbappend +++ b/recipes-graphics/xorg-lib/libxcb_%.bbappend | |||
diff --git a/recipes-graphics/xorg-lib/libxcb_selinux.inc b/recipes-graphics/xorg-lib/libxcb_selinux.inc new file mode 100644 index 0000000..04c66c1 --- /dev/null +++ b/recipes-graphics/xorg-lib/libxcb_selinux.inc | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit enable-selinux | ||
2 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux" | ||
3 | |||
4 | PACKAGES += "${PN}-xselinux" | ||
5 | FILES:${PN}-xselinux += "${libdir}/libxcb-xselinux.so.*" | ||
diff --git a/recipes-kernel/perf/perf_selinux.inc b/recipes-kernel/perf/perf_selinux.inc index bed3cc2..f1bdaf8 100644 --- a/recipes-kernel/perf/perf_selinux.inc +++ b/recipes-kernel/perf/perf_selinux.inc | |||
@@ -1 +1 @@ | |||
DEPENDS .= "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', ' audit', '', d)}" | inherit enable-audit | ||
diff --git a/recipes-support/attr/attr_selinux.inc b/recipes-support/attr/attr_selinux.inc index 7b45842..efc18b2 100644 --- a/recipes-support/attr/attr_selinux.inc +++ b/recipes-support/attr/attr_selinux.inc | |||
@@ -1,5 +1,3 @@ | |||
1 | inherit selinux | ||
2 | |||
3 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
4 | 2 | ||
5 | SRC_URI += "file://fix-ptest-failures-when-selinux-enabled.patch" | 3 | SRC_URI += "file://fix-ptest-failures-when-selinux-enabled.patch" |
diff --git a/recipes-support/gnupg/gnupg_selinux.inc b/recipes-support/gnupg/gnupg_selinux.inc index 12571b4..eee1731 100644 --- a/recipes-support/gnupg/gnupg_selinux.inc +++ b/recipes-support/gnupg/gnupg_selinux.inc | |||
@@ -1,3 +1,2 @@ | |||
1 | inherit enable-selinux | 1 | inherit enable-selinux |
2 | # gnupg will not build with libselinux, so remove the depend | 2 | PACKAGECONFIG[selinux] = "--enable-selinux-support,--disable-selinux-support,libselinux" |
3 | PACKAGECONFIG[selinux] = "--enable-selinux-support,--disable-selinux-support,," | ||