diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-01-22 18:02:40 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-01-22 18:02:40 +0000 |
| commit | 1d174d4e851b1dc74c4c4778cf7d0c52d1f38142 (patch) | |
| tree | b02bc6399a9bb5dfabd6dff33da1a1c41a6b3e0a /meta-openstack/recipes-extended | |
| parent | a401a1c3d86eb00bab8bfccba83c12cc67ce06a1 (diff) | |
| download | meta-cloud-services-1d174d4e851b1dc74c4c4778cf7d0c52d1f38142.tar.gz | |
bbappends: make distro feature safe
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-extended')
10 files changed, 51 insertions, 46 deletions
diff --git a/meta-openstack/recipes-extended/iptables/iptables_1.8.%.bbappend b/meta-openstack/recipes-extended/iptables/iptables_1.8.%.bbappend index 2a53557..025ee4e 100644 --- a/meta-openstack/recipes-extended/iptables/iptables_1.8.%.bbappend +++ b/meta-openstack/recipes-extended/iptables/iptables_1.8.%.bbappend | |||
| @@ -1,3 +1 @@ | |||
| 1 | RRECOMMENDS_${PN} += "kernel-module-xt-conntrack \ | require ${@bb.utils.contains('DISTRO_FEATURES', 'openstack', '${BPN}_openstack.inc', '', d)} | |
| 2 | kernel-module-xt-redirect \ | ||
| 3 | " | ||
diff --git a/meta-openstack/recipes-extended/iptables/iptables_openstack.inc b/meta-openstack/recipes-extended/iptables/iptables_openstack.inc new file mode 100644 index 0000000..2a53557 --- /dev/null +++ b/meta-openstack/recipes-extended/iptables/iptables_openstack.inc | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | RRECOMMENDS_${PN} += "kernel-module-xt-conntrack \ | ||
| 2 | kernel-module-xt-redirect \ | ||
| 3 | " | ||
diff --git a/meta-openstack/recipes-extended/libpam/libpam_1.%.bbappend b/meta-openstack/recipes-extended/libpam/libpam_1.%.bbappend index ec858a7..025ee4e 100644 --- a/meta-openstack/recipes-extended/libpam/libpam_1.%.bbappend +++ b/meta-openstack/recipes-extended/libpam/libpam_1.%.bbappend | |||
| @@ -1,21 +1 @@ | |||
| 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | require ${@bb.utils.contains('DISTRO_FEATURES', 'openstack', '${BPN}_openstack.inc', '', d)} | |
| 2 | |||
| 3 | SRC_URI += "file://common-account" | ||
| 4 | SRC_URI += "file://common-auth" | ||
| 5 | SRC_URI += "file://common-password" | ||
| 6 | SRC_URI += "file://common-session" | ||
| 7 | SRC_URI += "file://common-session-noninteractive" | ||
| 8 | |||
| 9 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'OpenLDAP', 'OpenLDAP', '', d)}" | ||
| 10 | PACKAGECONFIG[OpenLDAP] = ",,,pam-plugin-mkhomedir nss-pam-ldapd" | ||
| 11 | |||
| 12 | do_install_append() { | ||
| 13 | if ${@bb.utils.contains('DISTRO_FEATURES', 'OpenLDAP', 'true', 'false', d)}; then | ||
| 14 | install -m 755 -d ${D}/etc/pam.d/ | ||
| 15 | install -m 644 ${WORKDIR}/common-account ${D}/etc/pam.d/ | ||
| 16 | install -m 644 ${WORKDIR}/common-auth ${D}/etc/pam.d/ | ||
| 17 | install -m 644 ${WORKDIR}/common-password ${D}/etc/pam.d/ | ||
| 18 | install -m 644 ${WORKDIR}/common-session ${D}/etc/pam.d/ | ||
| 19 | install -m 644 ${WORKDIR}/common-session-noninteractive ${D}/etc/pam.d/ | ||
| 20 | fi | ||
| 21 | } | ||
diff --git a/meta-openstack/recipes-extended/libpam/libpam_openstack.inc b/meta-openstack/recipes-extended/libpam/libpam_openstack.inc new file mode 100644 index 0000000..ec858a7 --- /dev/null +++ b/meta-openstack/recipes-extended/libpam/libpam_openstack.inc | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
| 2 | |||
| 3 | SRC_URI += "file://common-account" | ||
| 4 | SRC_URI += "file://common-auth" | ||
| 5 | SRC_URI += "file://common-password" | ||
| 6 | SRC_URI += "file://common-session" | ||
| 7 | SRC_URI += "file://common-session-noninteractive" | ||
| 8 | |||
| 9 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'OpenLDAP', 'OpenLDAP', '', d)}" | ||
| 10 | PACKAGECONFIG[OpenLDAP] = ",,,pam-plugin-mkhomedir nss-pam-ldapd" | ||
| 11 | |||
| 12 | do_install_append() { | ||
| 13 | if ${@bb.utils.contains('DISTRO_FEATURES', 'OpenLDAP', 'true', 'false', d)}; then | ||
| 14 | install -m 755 -d ${D}/etc/pam.d/ | ||
| 15 | install -m 644 ${WORKDIR}/common-account ${D}/etc/pam.d/ | ||
| 16 | install -m 644 ${WORKDIR}/common-auth ${D}/etc/pam.d/ | ||
| 17 | install -m 644 ${WORKDIR}/common-password ${D}/etc/pam.d/ | ||
| 18 | install -m 644 ${WORKDIR}/common-session ${D}/etc/pam.d/ | ||
| 19 | install -m 644 ${WORKDIR}/common-session-noninteractive ${D}/etc/pam.d/ | ||
| 20 | fi | ||
| 21 | } | ||
diff --git a/meta-openstack/recipes-extended/libvirt/libvirt_5.%.bbappend b/meta-openstack/recipes-extended/libvirt/libvirt_5.%.bbappend index 0b0f011..025ee4e 100644 --- a/meta-openstack/recipes-extended/libvirt/libvirt_5.%.bbappend +++ b/meta-openstack/recipes-extended/libvirt/libvirt_5.%.bbappend | |||
| @@ -1,13 +1 @@ | |||
| 1 | PACKAGECONFIG ?= "qemu lxc test remote macvtap libvirtd udev yajl \ | require ${@bb.utils.contains('DISTRO_FEATURES', 'openstack', '${BPN}_openstack.inc', '', d)} | |
| 2 | python ebtables \ | ||
| 3 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ | ||
| 4 | " | ||
| 5 | |||
| 6 | inherit useradd | ||
| 7 | USERADD_PACKAGES = "${PN}" | ||
| 8 | GROUPADD_PARAM_${PN}_append = " ;--system libvirt" | ||
| 9 | |||
| 10 | do_install_append() { | ||
| 11 | sed -e "s:^#unix_sock_group =:unix_sock_group =:g" -i ${D}/etc/libvirt/libvirtd.conf | ||
| 12 | sed -e "s:^#unix_sock_rw_perms =:unix_sock_rw_perms =:g" -i ${D}/etc/libvirt/libvirtd.conf | ||
| 13 | } | ||
diff --git a/meta-openstack/recipes-extended/libvirt/libvirt_openstack.inc b/meta-openstack/recipes-extended/libvirt/libvirt_openstack.inc new file mode 100644 index 0000000..0b0f011 --- /dev/null +++ b/meta-openstack/recipes-extended/libvirt/libvirt_openstack.inc | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | PACKAGECONFIG ?= "qemu lxc test remote macvtap libvirtd udev yajl \ | ||
| 2 | python ebtables \ | ||
| 3 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ | ||
| 4 | " | ||
| 5 | |||
| 6 | inherit useradd | ||
| 7 | USERADD_PACKAGES = "${PN}" | ||
| 8 | GROUPADD_PARAM_${PN}_append = " ;--system libvirt" | ||
| 9 | |||
| 10 | do_install_append() { | ||
| 11 | sed -e "s:^#unix_sock_group =:unix_sock_group =:g" -i ${D}/etc/libvirt/libvirtd.conf | ||
| 12 | sed -e "s:^#unix_sock_rw_perms =:unix_sock_rw_perms =:g" -i ${D}/etc/libvirt/libvirtd.conf | ||
| 13 | } | ||
diff --git a/meta-openstack/recipes-extended/lighttpd/lighttpd_1.4.%.bbappend b/meta-openstack/recipes-extended/lighttpd/lighttpd_1.4.%.bbappend index 33b1f61..025ee4e 100644 --- a/meta-openstack/recipes-extended/lighttpd/lighttpd_1.4.%.bbappend +++ b/meta-openstack/recipes-extended/lighttpd/lighttpd_1.4.%.bbappend | |||
| @@ -1,3 +1 @@ | |||
| 1 | do_install_append() { | require ${@bb.utils.contains('DISTRO_FEATURES', 'openstack', '${BPN}_openstack.inc', '', d)} | |
| 2 | sed -i '2i port=`grep "^server.port" /etc/lighttpd.conf`; if [ -z $port ]; then echo "server port not configured, not running lighttpd..."; exit 0; fi' ${D}/etc/init.d/lighttpd | ||
| 3 | } | ||
diff --git a/meta-openstack/recipes-extended/lighttpd/lighttpd_openstack.inc b/meta-openstack/recipes-extended/lighttpd/lighttpd_openstack.inc new file mode 100644 index 0000000..33b1f61 --- /dev/null +++ b/meta-openstack/recipes-extended/lighttpd/lighttpd_openstack.inc | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | do_install_append() { | ||
| 2 | sed -i '2i port=`grep "^server.port" /etc/lighttpd.conf`; if [ -z $port ]; then echo "server port not configured, not running lighttpd..."; exit 0; fi' ${D}/etc/init.d/lighttpd | ||
| 3 | } | ||
diff --git a/meta-openstack/recipes-extended/sysklogd/sysklogd_2.%.bbappend b/meta-openstack/recipes-extended/sysklogd/sysklogd_2.%.bbappend index 8da640f..025ee4e 100644 --- a/meta-openstack/recipes-extended/sysklogd/sysklogd_2.%.bbappend +++ b/meta-openstack/recipes-extended/sysklogd/sysklogd_2.%.bbappend | |||
| @@ -1,6 +1 @@ | |||
| 1 | # | require ${@bb.utils.contains('DISTRO_FEATURES', 'openstack', '${BPN}_openstack.inc', '', d)} | |
| 2 | # Copyright (C) 2014 Wind River Systems, Inc. | ||
| 3 | # | ||
| 4 | |||
| 5 | require recipes-extended/syslog/syslog-user.inc | ||
| 6 | |||
diff --git a/meta-openstack/recipes-extended/sysklogd/sysklogd_openstack.inc b/meta-openstack/recipes-extended/sysklogd/sysklogd_openstack.inc new file mode 100644 index 0000000..8da640f --- /dev/null +++ b/meta-openstack/recipes-extended/sysklogd/sysklogd_openstack.inc | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | # | ||
| 2 | # Copyright (C) 2014 Wind River Systems, Inc. | ||
| 3 | # | ||
| 4 | |||
| 5 | require recipes-extended/syslog/syslog-user.inc | ||
| 6 | |||
