cgl_common_security_flags.inc: add to fix building with security flags
PATCH 1/10 cgl_common_security_flags.inc: add to fix building with security flags
Package openhpi is currently broken if distro uses security_flags.inc. Flx that by adding layer-wide include file for such exceptions.
--- meta-cgl-common/conf/distro/include/cgl_common_security_flags.inc | 1 + meta-cgl-common/conf/layer.conf | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 meta-cgl-common/conf/distro/include/cgl_common_security_flags.inc
meta-cgl-common/conf/distro/include/cgl_common_security_flags.inc new file +1 -0
@@ -0,0 +1 @@ +SECURITY_CFLAGS_pn-openhpi = "${SECURITY_NO_PIE_CFLAGS}"
meta-cgl-common/conf/layer.conf +2 -0
@@ -10,3 +10,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "cgl-common" BBFILE_PATTERN_cgl-common = "^${LAYERDIR}/" BBFILE_PRIORITY_cgl-common = "7" + +require conf/distro/include/cgl_common_security_flags.inc
Signature · 1 line
2.1.4
PATCH 2/10 pacemaker: use useradd class to add required user and group
--- meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb +5 -4
@@ -32,7 +32,7 @@ SRC_URI = " \ SRC_URI_append_libc-uclibc = " file://kill-stack-protector.patch" SRC_URI[md5sum] = "103fb2e804be3f8ace17021c5d9ad15d" SRC_URI[sha256sum] = "aabfc9ee1c66804151d973d0ed0323798ffebe49e1c2219fa804dc6898a69a1e" -inherit autotools-brokensep python-dir pkgconfig +inherit autotools-brokensep python-dir pkgconfig useradd S = "${WORKDIR}/pacemaker-1.0-Pacemaker-${PV}"
@@ -40,6 +40,10 @@ EXTRA_OECONF = "--with-ais --without-heartbeat --disable-fatal-warnings --disabl CFLAGS += "-I${STAGING_INCDIR}/heartbeat -lncurses" +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--home-dir=${localstatedir}/lib/heartbeat -g haclient -r hacluster" +GROUPADD_PARAM_${PN} = "-r haclient" + do_install_append() { install -d ${D}${sysconfdir}/default/volatiles install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/06_pacemaker
@@ -49,9 +53,6 @@ do_install_append() { } pkg_postinst_${PN} () { - set -e - grep haclient /etc/group || addgroup haclient - grep hacluster /etc/passwd || adduser --disabled-password --home=${localstatedir}/lib/heartbeat --ingroup haclient -g "HA cluster" hacluster /etc/init.d/populate-volatile.sh update } FILES_${PN}-doc += "${datadir}/pacemaker/crm_cli.txt ${datadir}/pacemaker/templates/"
Signature · 1 line
2.1.4
PATCH 3/10 pacemaker: provide tmpfiles configuration
In reply to Dmitry Eremin-Solenikovprovide systemd-tmpfiles configuration for distributions using systemd.
--- meta-cgl-common/recipes-cgl/pacemaker/files/tmpfiles | 5 +++++ meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 meta-cgl-common/recipes-cgl/pacemaker/files/tmpfiles
meta-cgl-common/recipes-cgl/pacemaker/files/tmpfiles new file +5 -0
@@ -0,0 +1,5 @@ +d /var/lib/heartbeat/crm 0750 hacluster haclient - +d /var/lib/pengine 0755 hacluster haclient - +d /var/run/heartbeat 0755 hacluster haclient - +d /var/run/heartbeat/rsctmp 0755 hacluster haclient - +d /var/run/crm 0755 hacluster haclient -
meta-cgl-common/recipes-cgl/pacemaker/pacemaker_1.0.9.1.bb +10 -1
@@ -28,6 +28,7 @@ SRC_URI = " \ file://pacemaker-fix-xml-config.patch \ file://pacemaker-no-bash.patch \ file://volatiles \ + file://tmpfiles \ " SRC_URI_append_libc-uclibc = " file://kill-stack-protector.patch" SRC_URI[md5sum] = "103fb2e804be3f8ace17021c5d9ad15d"
@@ -47,13 +48,21 @@ GROUPADD_PARAM_${PN} = "-r haclient" do_install_append() { install -d ${D}${sysconfdir}/default/volatiles install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/06_pacemaker + install -d ${D}${sysconfdir}/tmpfiles.d + install -m 0644 ${WORKDIR}/tmpfiles ${D}${sysconfdir}/tmpfiles.d/${PN}.conf find ${D} -name "*.pyo" -exec rm {} \; find ${D} -name "*.pyc" -exec rm {} \; find ${D} -name "*.py" | xargs sed -i -e "s:${STAGING_BINDIR_NATIVE}:${bindir}:g" } pkg_postinst_${PN} () { - /etc/init.d/populate-volatile.sh update + if [ -z "$D" ]; then + if type systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create + elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi + fi } FILES_${PN}-doc += "${datadir}/pacemaker/crm_cli.txt ${datadir}/pacemaker/templates/" FILES_${PN} += " \
Signature · 1 line
2.1.4
PATCH 4/10 cluster-glue: use useradd class to add required user and group
In reply to Dmitry Eremin-Solenikov--- meta-cgl-common/recipes-cgl/cluster-glue/cluster-glue_1.0.5.bb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
meta-cgl-common/recipes-cgl/cluster-glue/cluster-glue_1.0.5.bb +5 -4
@@ -20,7 +20,7 @@ SRC_URI[sha256sum] = "0e1922373aba1c3811f6ef61559a9c407c0bec71d2ebc451a4db5b940d LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe" -inherit autotools +inherit autotools useradd S = "${WORKDIR}/Reusable-Cluster-Components-glue--glue-${PV}"
@@ -28,6 +28,10 @@ EXTRA_OECONF = "--with-daemon-user=hacluster --with-daemon-group=haclient --disa CACHED_CONFIGUREVARS="ac_cv_path_XML2CONFIG=0" +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--home-dir=${localstatedir}/lib/heartbeat -g haclient -r hacluster" +GROUPADD_PARAM_${PN} = "-r haclient" + do_configure_prepend() { ln -sf ${PKG_CONFIG_SYSROOT_DIR}/usr/include/libxml2/libxml ${PKG_CONFIG_SYSROOT_DIR}/usr/include/libxml }
@@ -38,9 +42,6 @@ do_install_append() { } pkg_postinst_${PN} () { - set -e - grep haclient /etc/group || addgroup haclient - grep hacluster /etc/passwd || adduser --disabled-password --home=${localstatedir}/lib/heartbeat --ingroup haclient -g "HA cluster" hacluster /etc/init.d/populate-volatile.sh update }
Signature · 1 line
2.1.4
PATCH 5/10 cluster-glue: provide tmpfiles configuration
In reply to Dmitry Eremin-Solenikovprovide systemd-tmpfiles configuration for distributions using systemd.
--- .../recipes-cgl/cluster-glue/cluster-glue/tmpfiles | 7 +++++++ .../recipes-cgl/cluster-glue/cluster-glue_1.0.5.bb | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 meta-cgl-common/recipes-cgl/cluster-glue/cluster-glue/tmpfiles
meta-cgl-common/recipes-cgl/cluster-glue/cluster-glue/tmpfiles new file +7 -0
@@ -0,0 +1,7 @@ +d /var/lib/heartbeat 0755 root root - +d /var/lib/heartbeat/pengine 0750 hacluster haclient - +d /var/lib/heartbeat/cores 0755 hacluster haclient - +d /var/lib/heartbeat/cores/hacluster 0700 hacluster haclient - +d /var/lib/heartbeat/cores/root 0700 root root - +d /var/lib/heartbeat/cores/nobody 0700 nobody nogroup - +
meta-cgl-common/recipes-cgl/cluster-glue/cluster-glue_1.0.5.bb +10 -1
@@ -13,6 +13,7 @@ SRC_URI = " \ file://glue-remove-getpid-check.patch \ file://fix-const-cast.patch \ file://volatiles \ + file://tmpfiles \ " SRC_URI_append_libc-uclibc = " file://kill-stack-protector.patch" SRC_URI[md5sum] = "d2b6f798e58ef2497526e404b8ad640a"
@@ -39,10 +40,18 @@ do_configure_prepend() { do_install_append() { install -d ${D}${sysconfdir}/default/volatiles install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/04_cluster-glue + install -d ${D}${sysconfdir}/tmpfiles.d + install -m 0644 ${WORKDIR}/tmpfiles ${D}${sysconfdir}/tmpfiles.d/${PN}.conf } pkg_postinst_${PN} () { - /etc/init.d/populate-volatile.sh update + if [ -z "$D" ]; then + if type systemd-tmpfiles >/dev/null; then + systemd-tmpfiles --create + elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi + fi } PACKAGES += "\
Signature · 1 line
2.1.4
PATCH 6/10 cluster-glue: add another directory to volatiles and tmpfiles config
In reply to Dmitry Eremin-SolenikovAdd /var/run/heartbeat directory to volatiles and tmpfiles configuration.
--- meta-cgl-common/recipes-cgl/cluster-glue/cluster-glue/tmpfiles | 1 + meta-cgl-common/recipes-cgl/cluster-glue/cluster-glue/volatiles | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
meta-cgl-common/recipes-cgl/cluster-glue/cluster-glue/tmpfiles +1 -0
@@ -4,4 +4,5 @@ d /var/lib/heartbeat/cores 0755 hacluster haclient - d /var/lib/heartbeat/cores/hacluster 0700 hacluster haclient - d /var/lib/heartbeat/cores/root 0700 root root - d /var/lib/heartbeat/cores/nobody 0700 nobody nogroup - +d /var/run/heartbeat 0755 root root -
meta-cgl-common/recipes-cgl/cluster-glue/cluster-glue/volatiles +2 -1
@@ -3,4 +3,5 @@ d hacluster haclient 0750 /var/lib/heartbeat/pengine none d hacluster haclient 0755 /var/lib/heartbeat/cores none d hacluster haclient 0700 /var/lib/heartbeat/cores/hacluster none d root root 0700 /var/lib/heartbeat/cores/root none -d nobody nogroup 0700 /var/lib/heartbeat/cores/nobody none +d nobody nogroup 0700 /var/lib/heartbeat/cores/nobody none +d root root 0755 /var/run/heartbeat none
Signature · 1 line
2.1.4
PATCH 7/10 ocfs2-tools: properly handle systemd DISTRO_FEATURE
In reply to Dmitry Eremin-SolenikovAlways inherit systemd bbclass (otherwise it is not pulled in even if systemd is enabled). This makes few other settings in the recipe unnecessary, thus they are dropped.
--- meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.4.3.bb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
meta-cgl-common/recipes-cgl/ocfs2-tools/ocfs2-tools_1.4.3.bb +1 -4
@@ -42,11 +42,8 @@ do_compile_prepend() { done } -inherit ${@base_contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} +inherit systemd SYSTEMD_SERVICE_${PN} = "o2cb.service ocfs2.service" -SYSTEMD_AUTO_ENABLE = "enable" - -FILES_${PN} += "${@base_contains('VIRTUAL-RUNTIME_init_manager','systemd','${systemd_unitdir}','', d)}" do_install() { install -d ${D}/etc/init.d
Signature · 1 line
2.1.4
PATCH 8/10 heartbeat: make bootstrap work without checking for libtool command
In reply to Dmitry Eremin-SolenikovThere is no use for just 'libtool' script, other than deriving libtoolize from it. Make bootstrap script look for libtoolize directly and forget about libtool completely.
--- .../heartbeat/heartbeat-bootstrap-libtool.patch | 52 ++++++++++++++++++++++ .../recipes-cgl/heartbeat/heartbeat_3.0.5.bb | 1 + 2 files changed, 53 insertions(+) create mode 100644 meta-cgl-common/recipes-cgl/heartbeat/heartbeat/heartbeat-bootstrap-libtool.patch
meta-cgl-common/recipes-cgl/heartbeat/heartbeat/heartbeat-bootstrap-libtool.patch new file +52 -0
@@ -0,0 +1,52 @@ +Index: Heartbeat-3-0-7e3a82377fa8/bootstrap +=================================================================== +--- Heartbeat-3-0-7e3a82377fa8.orig/bootstrap ++++ Heartbeat-3-0-7e3a82377fa8/bootstrap +@@ -173,23 +173,22 @@ ln -s `which $automake` ./automake + + # Check for Libtool + pkg="libtool" +-for command in libtool libtool14 libtool15 glibtool ++for command in libtoolize libtoolize14 libtoolize15 glibtoolize + do + URL=$gnu/$pkg/ + if + testProgram $command + then + : OK $pkg is installed +- libtool=$command +- libtoolize=`echo "$libtool" | sed -e 's/libtool/libtoolize/'` ++ libtoolize=$command + fi + done + + # Check to see if we got a valid command. + if +- $libtool --version </dev/null >/dev/null 2>&1 ++ $libtoolize --version </dev/null >/dev/null 2>&1 + then +- echo "Libtool package $libtool found." ++ echo "Libtool package $libtoolize found." + else + RC=$? + cat <<-EOF >&2 +@@ -200,10 +199,6 @@ else + EOF + fi + +-# Create local copy so that the incremental updates will work. +-rm -f ./libtool +-ln -s `which $libtool` ./libtool +- + case $RC in + 0) ;; + *) exit $RC;; +@@ -217,7 +212,7 @@ oneline() { + read x; echo "$x" + } + +-LT_version=`$libtool --version | oneline | sed -e 's%^[^0-9]*%%' -e s'% .*%%'` ++LT_version=`$libtoolize --version | oneline | sed -e 's%^[^0-9]*%%' -e s'% .*%%'` + LT_majvers=`echo "$LT_version" | sed -e 's%\..*%%'` + LT_minvers=`echo "$LT_version" | sed -e 's%^[^.]*\.%%' ` + LT_minnum=`echo "$LT_minvers" | sed -e 's%[^0-9].*%%'`
meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb +1 -0
@@ -34,6 +34,7 @@ SRC_URI = " \ file://ucast.c-fix-compile-errors.patch \ file://configure.in-Error-and-warning-fix.patch \ file://heartbeat-init.d-heartbeat.in-modify-parameter.patch \ + file://heartbeat-bootstrap-libtool.patch \ file://heartbeat.service \ " SRC_URI[md5sum] = "396510e3c143a9c2288bc52cfc9caa3c"
Signature · 1 line
2.1.4
PATCH 9/10 heartbeat: add gnutls dependency
In reply to Dmitry Eremin-SolenikovAdd dependency on gnutls as noted by the following QA warnings:
WARNING: QA Issue: heartbeat rdepends on nettle, but it isn't a build dependency? [build-deps]
WARNING: QA Issue: heartbeat rdepends on gnutls, but it isn't a build dependency? [build-deps]
WARNING: QA Issue: heartbeat rdepends on gmp, but it isn't a build dependency? [build-deps]
Both nettle and gmp are used by gnutls, so there is no point adding them to the dependencies list -- those are indirect dependencies anyway.
--- meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb +1 -1
@@ -40,7 +40,7 @@ SRC_URI = " \ SRC_URI[md5sum] = "396510e3c143a9c2288bc52cfc9caa3c" SRC_URI[sha256sum] = "085013154511f3c270b5e9a3281732dbbb9812924ae24d9c3c6db1af4dd260d0" S = "${WORKDIR}/Heartbeat-3-0-7e3a82377fa8/" -DEPENDS = "cluster-glue corosync" +DEPENDS = "cluster-glue corosync gnutls" inherit autotools-brokensep pkgconfig useradd EXTRA_OECONF = " \ STAGING_DIR_TARGET=${STAGING_DIR_TARGET} \
Signature · 1 line
2.1.4
PATCH 10/10 heartbeat: properly handle systemd DISTRO_FEATURE
In reply to Dmitry Eremin-SolenikovAlways inherit systemd bbclass (otherwise it is not pulled in even if systemd is enabled). This makes few other settings in the recipe unnecessary, thus they are dropped.
--- meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
meta-cgl-common/recipes-cgl/heartbeat/heartbeat_3.0.5.bb +1 -3
@@ -100,10 +100,8 @@ do_install() { install -m 0600 ${S}/doc/authkeys ${D}/etc/ha.d/authkeys } -inherit ${@base_contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','',d)} -SYSTEMD_PACKAGES = "${PN}" +inherit systemd SYSTEMD_SERVICE_${PN} = "heartbeat.service" -SYSTEMD_AUTO_ENABLE = "disable" USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "-r haclient"
Signature · 1 line
2.1.4