diff options
| author | Mark Hatle <mark.hatle@windriver.com> | 2017-09-08 10:44:23 -0500 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@windriver.com> | 2017-09-14 08:29:01 -0500 |
| commit | 4fefe83c3203c11fadbe43637a3058284b60427b (patch) | |
| tree | af4b33f05100c12ed16851f5dd4129f0e176da25 /recipes-connectivity | |
| parent | 694b8d1f1a590083e4445d6941f24b412ec0f206 (diff) | |
| download | meta-selinux-4fefe83c3203c11fadbe43637a3058284b60427b.tar.gz | |
Refactor to conform to YP Compat requirements
Change the references to check for the distribution flag of 'selinux' being
set before taking any action within the bbappends. This prevents the
signature from being modified.
Also remove PR changes, as they are no longer allowed.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'recipes-connectivity')
| -rw-r--r-- | recipes-connectivity/bind/bind_%.bbappend | 14 | ||||
| -rw-r--r-- | recipes-connectivity/bind/bind_selinux.inc | 11 | ||||
| -rw-r--r-- | recipes-connectivity/dhcp/dhcp_%.bbappend | 4 | ||||
| -rw-r--r-- | recipes-connectivity/dhcp/dhcp_selinux.inc | 3 | ||||
| -rw-r--r-- | recipes-connectivity/iproute2/iproute2_%.bbappend | 10 | ||||
| -rw-r--r-- | recipes-connectivity/iproute2/iproute2_selinux.inc | 5 | ||||
| -rw-r--r-- | recipes-connectivity/openssh/openssh_%.bbappend | 14 | ||||
| -rw-r--r-- | recipes-connectivity/openssh/openssh_selinux.inc | 9 |
8 files changed, 32 insertions, 38 deletions
diff --git a/recipes-connectivity/bind/bind_%.bbappend b/recipes-connectivity/bind/bind_%.bbappend index a15e045..7719d3b 100644 --- a/recipes-connectivity/bind/bind_%.bbappend +++ b/recipes-connectivity/bind/bind_%.bbappend | |||
| @@ -1,13 +1 @@ | |||
| 1 | PR .= ".3" | require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)} | |
| 2 | |||
| 3 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
| 4 | |||
| 5 | SRC_URI += "file://volatiles.04_bind" | ||
| 6 | |||
| 7 | do_install_append() { | ||
| 8 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 9 | install -m 0644 ${WORKDIR}/volatiles.04_bind ${D}${sysconfdir}/default/volatiles/volatiles.04_bind | ||
| 10 | |||
| 11 | sed -i '/^\s*\/usr\/sbin\/rndc-confgen/a\ | ||
| 12 | [ -x /sbin/restorecon ] && /sbin/restorecon -F /etc/bind/rndc.key' ${D}${sysconfdir}/init.d/bind | ||
| 13 | } | ||
diff --git a/recipes-connectivity/bind/bind_selinux.inc b/recipes-connectivity/bind/bind_selinux.inc new file mode 100644 index 0000000..1dfef8a --- /dev/null +++ b/recipes-connectivity/bind/bind_selinux.inc | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
| 2 | |||
| 3 | SRC_URI += "file://volatiles.04_bind" | ||
| 4 | |||
| 5 | do_install_append() { | ||
| 6 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 7 | install -m 0644 ${WORKDIR}/volatiles.04_bind ${D}${sysconfdir}/default/volatiles/volatiles.04_bind | ||
| 8 | |||
| 9 | sed -i '/^\s*\/usr\/sbin\/rndc-confgen/a\ | ||
| 10 | [ -x /sbin/restorecon ] && /sbin/restorecon -F /etc/bind/rndc.key' ${D}${sysconfdir}/init.d/bind | ||
| 11 | } | ||
diff --git a/recipes-connectivity/dhcp/dhcp_%.bbappend b/recipes-connectivity/dhcp/dhcp_%.bbappend index 2d2232c..7719d3b 100644 --- a/recipes-connectivity/dhcp/dhcp_%.bbappend +++ b/recipes-connectivity/dhcp/dhcp_%.bbappend | |||
| @@ -1,3 +1 @@ | |||
| 1 | inherit selinux | require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)} | |
| 2 | |||
| 3 | FILESEXTRAPATHS_prepend := "${@target_selinux(d, '${THISDIR}/files:')}" | ||
diff --git a/recipes-connectivity/dhcp/dhcp_selinux.inc b/recipes-connectivity/dhcp/dhcp_selinux.inc new file mode 100644 index 0000000..08389f1 --- /dev/null +++ b/recipes-connectivity/dhcp/dhcp_selinux.inc | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | inherit selinux | ||
| 2 | |||
| 3 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
diff --git a/recipes-connectivity/iproute2/iproute2_%.bbappend b/recipes-connectivity/iproute2/iproute2_%.bbappend index c866b54..7719d3b 100644 --- a/recipes-connectivity/iproute2/iproute2_%.bbappend +++ b/recipes-connectivity/iproute2/iproute2_%.bbappend | |||
| @@ -1,9 +1 @@ | |||
| 1 | inherit with-selinux | require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)} | |
| 2 | |||
| 3 | do_configure_append() { | ||
| 4 | if ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'true', 'false', d)}; then | ||
| 5 | sed -i 's/\(HAVE_SELINUX:=\).*/\1y/' ${B}/Config | ||
| 6 | else | ||
| 7 | sed -i 's/\(HAVE_SELINUX:=\).*/\1n/' ${B}/Config | ||
| 8 | fi | ||
| 9 | } | ||
diff --git a/recipes-connectivity/iproute2/iproute2_selinux.inc b/recipes-connectivity/iproute2/iproute2_selinux.inc new file mode 100644 index 0000000..b0a7ffe --- /dev/null +++ b/recipes-connectivity/iproute2/iproute2_selinux.inc | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | inherit with-selinux | ||
| 2 | |||
| 3 | do_configure_append() { | ||
| 4 | sed -i 's/\(HAVE_SELINUX:=\).*/\1y/' ${B}/Config | ||
| 5 | } | ||
diff --git a/recipes-connectivity/openssh/openssh_%.bbappend b/recipes-connectivity/openssh/openssh_%.bbappend index 223b8cf..7719d3b 100644 --- a/recipes-connectivity/openssh/openssh_%.bbappend +++ b/recipes-connectivity/openssh/openssh_%.bbappend | |||
| @@ -1,13 +1 @@ | |||
| 1 | PR .= ".5" | require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)} | |
| 2 | |||
| 3 | inherit with-selinux | ||
| 4 | |||
| 5 | FILESEXTRAPATHS_prepend := "${@target_selinux(d, '${THISDIR}/files:')}" | ||
| 6 | |||
| 7 | # There is no distro feature just for audit. If we want it, | ||
| 8 | # uncomment the following. | ||
| 9 | # | ||
| 10 | #PACKAGECONFIG += "${@target_selinux(d, 'audit')}" | ||
| 11 | |||
| 12 | PACKAGECONFIG[audit] = "--with-audit=linux,--without-audit,audit," | ||
| 13 | |||
diff --git a/recipes-connectivity/openssh/openssh_selinux.inc b/recipes-connectivity/openssh/openssh_selinux.inc new file mode 100644 index 0000000..ebd2721 --- /dev/null +++ b/recipes-connectivity/openssh/openssh_selinux.inc | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | inherit with-selinux | ||
| 2 | |||
| 3 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
| 4 | |||
| 5 | # There is no distro feature just for audit. | ||
| 6 | PACKAGECONFIG_append = " audit" | ||
| 7 | |||
| 8 | PACKAGECONFIG[audit] = "--with-audit=linux,--without-audit,audit," | ||
| 9 | |||
