summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2021-08-19 12:47:03 +0800
committerJoe MacDonald <joe@deserted.net>2021-08-29 21:34:22 -0400
commit31325005e4409e08b7f68eed44a9c4086453e4dd (patch)
treed8b3ac61ecc2730dab6f395d6dbcaf52f4e58a6c
parenta101ac3dcedf5e8957061576dd6dadd738711717 (diff)
downloadmeta-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>
-rw-r--r--classes/enable-selinux.bbclass3
-rw-r--r--classes/meson-enable-selinux.bbclass4
-rw-r--r--classes/meson-selinux.bbclass4
-rw-r--r--classes/with-audit.bbclass5
-rw-r--r--classes/with-selinux.bbclass4
-rw-r--r--recipes-connectivity/iproute2/iproute2_%.bbappend3
-rw-r--r--recipes-connectivity/openssh/openssh_selinux.inc9
-rw-r--r--recipes-core/coreutils/coreutils_%.bbappend4
-rw-r--r--recipes-core/dbus/dbus_%.bbappend2
-rw-r--r--recipes-core/eudev/eudev_selinux.inc1
-rw-r--r--recipes-core/glib-2.0/glib-2.0_%.bbappend2
-rw-r--r--recipes-core/systemd/systemd_selinux.inc2
-rw-r--r--recipes-core/util-linux/util-linux_%.bbappend3
-rw-r--r--recipes-devtools/rpm/rpm_selinux.inc4
-rw-r--r--recipes-extended/at/at_%.bbappend2
-rw-r--r--recipes-extended/cronie/cronie_%.bbappend4
-rw-r--r--recipes-extended/findutils/findutils_%.bbappend3
-rw-r--r--recipes-extended/pam/libpam_selinux.inc1
-rw-r--r--recipes-extended/psmisc/psmisc_%.bbappend1
-rw-r--r--recipes-extended/sed/sed_4.%.bbappend2
-rw-r--r--recipes-extended/shadow/shadow_selinux.inc5
-rw-r--r--recipes-extended/sudo/sudo_%.bbappend5
-rw-r--r--recipes-extended/tar/tar_selinux.inc4
-rw-r--r--recipes-graphics/mesa/mesa_%.bbappend4
-rw-r--r--recipes-graphics/xcb/libxcb_selinux.inc6
-rw-r--r--recipes-graphics/xorg-lib/libxcb_%.bbappend (renamed from recipes-graphics/xcb/libxcb_%.bbappend)0
-rw-r--r--recipes-graphics/xorg-lib/libxcb_selinux.inc5
-rw-r--r--recipes-kernel/perf/perf_selinux.inc2
-rw-r--r--recipes-support/attr/attr_selinux.inc2
-rw-r--r--recipes-support/gnupg/gnupg_selinux.inc3
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 @@
1inherit selinux 1inherit selinux
2 2
3PACKAGECONFIG:append = " ${@target_selinux(d)}" 3PACKAGECONFIG:append = " ${@target_selinux(d, 'selinux')}"
4PACKAGECONFIG[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 @@
1inherit selinux
2
3PACKAGECONFIG:append = " ${@target_selinux(d)}"
4PACKAGECONFIG[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 @@
1inherit selinux
2
3PACKAGECONFIG:append = " ${@target_selinux(d)}"
4PACKAGECONFIG[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.
2inherit selinux
3
4PACKAGECONFIG:append = " ${@target_selinux(d, 'audit')}"
5PACKAGECONFIG[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 @@
1inherit selinux
2
3PACKAGECONFIG:append = " ${@target_selinux(d)}"
4PACKAGECONFIG[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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} 1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)}
2PACKAGECONFIG[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 @@
1inherit with-selinux 1inherit enable-selinux enable-audit
2 2
3FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 3FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
4 4
5# There is no distro feature just for audit. 5PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
6PACKAGECONFIG:append = " audit" 6PACKAGECONFIG[audit] = "--with-audit=linux,--without-audit,audit"
7
8PACKAGECONFIG[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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} 1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)}
2 2PACKAGECONFIG[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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} 1inherit ${@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 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 1FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
2 2
3inherit enable-selinux 3inherit enable-selinux
4PACKAGECONFIG[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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-audit', '', d)} 1inherit enable-selinux enable-audit
2 2
3do_install:append() { 3do_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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} 1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)}
2PACKAGECONFIG[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 @@
1inherit with-selinux 1inherit enable-selinux
2PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libsemanage," 2PACKAGECONFIG[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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-audit', '', d)} 1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux enable-audit', '', d)}
2inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} 2PACKAGECONFIG[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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} 1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)}
2PACKAGECONFIG[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 @@
1inherit enable-selinux 1inherit enable-selinux
2 2
3PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
3RDEPENDS:${PN}-runtime += "${@target_selinux(d, 'pam-plugin-selinux')}" 4RDEPENDS:${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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)} 1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)}
2PACKAGECONFIG[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 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 1FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
2 2
3inherit with-selinux with-audit 3inherit enable-selinux enable-audit
4
5PACKAGECONFIG[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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'with-selinux', '', d)} 1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux enable-audit', '', d)}
2
3PACKAGECONFIG[audit] = "--with-linux-audit,--without-linux-audit,audit"
4PACKAGECONFIG[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 @@
1inherit with-selinux 1inherit enable-selinux
2 2
3PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'acl', ' acl', '', d)}" 3PACKAGECONFIG[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 @@
1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'meson-selinux', '', d)} 1inherit ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'enable-selinux', '', d)}
2 2PACKAGECONFIG[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 @@
1inherit enable-selinux
2# libxcb-xselinux will not build with libselinux, so remove the depend
3PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,,"
4
5PACKAGES += "${PN}-xselinux"
6FILES:${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 @@
1inherit enable-selinux
2PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
3
4PACKAGES += "${PN}-xselinux"
5FILES:${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 @@
1inherit selinux
2
3FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 1FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
4 2
5SRC_URI += "file://fix-ptest-failures-when-selinux-enabled.patch" 3SRC_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 @@
1inherit enable-selinux 1inherit enable-selinux
2# gnupg will not build with libselinux, so remove the depend 2PACKAGECONFIG[selinux] = "--enable-selinux-support,--disable-selinux-support,libselinux"
3PACKAGECONFIG[selinux] = "--enable-selinux-support,--disable-selinux-support,,"