[yocto] [meta-cgl][PATCH] monit: update to 5.20.0
jackie.huang at windriver.com
jackie.huang at windriver.com
Wed Jul 26 18:01:42 PDT 2017
From: Jackie Huang <jackie.huang at windriver.com>
Changes:
- Fix the license to AGPLv3
- Add summary, description and homepage
- Add systemd support
- Don't change the files in ${S}, change them
after installing.
- Add PACKAGECONFIG for pam and enable it when
it's in DISTRO_FEATURES
Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
---
.../monit/{monit_5.8.bb => monit_5.20.0.bb} | 40 +++++++++++++++++-----
1 file changed, 32 insertions(+), 8 deletions(-)
rename meta-cgl-common/recipes-cgl/monit/{monit_5.8.bb => monit_5.20.0.bb} (35%)
diff --git a/meta-cgl-common/recipes-cgl/monit/monit_5.8.bb b/meta-cgl-common/recipes-cgl/monit/monit_5.20.0.bb
similarity index 35%
rename from meta-cgl-common/recipes-cgl/monit/monit_5.8.bb
rename to meta-cgl-common/recipes-cgl/monit/monit_5.20.0.bb
index 43e02a7..955a28c 100644
--- a/meta-cgl-common/recipes-cgl/monit/monit_5.8.bb
+++ b/meta-cgl-common/recipes-cgl/monit/monit_5.20.0.bb
@@ -1,20 +1,36 @@
-LICENSE = "GPLv3"
+SUMMARY = "Monit is a tool used for system monitoring and error recovery"
+DESCRIPTION = "Monit is a free open source utility for managing and monitoring, \
+ processes, programs, files, directories and filesystems on a UNIX system. \
+ Monit conducts automatic maintenance and repair and can execute meaningful \
+ causal actions in error situations. \
+ "
+HOMEPAGE = "http://mmonit.com/monit/"
+
+LICENSE = "AGPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea116a7defaf0e93b3bb73b2a34a3f51"
-DEPENDS = "openssl libpam"
+
+DEPENDS = "openssl"
SRC_URI = "\
- http://mmonit.com/monit/dist/monit-${PV}.tar.gz \
+ http://mmonit.com/monit/dist/${BP}.tar.gz \
file://enable-etc-monit.d-include.patch \
file://init \
"
-SRC_URI[md5sum] = "c6873b0828f872676f9e7fe1476a8dc2"
-SRC_URI[sha256sum] = "0c00573ebc0156c534a5952f392c2a7bedde194f8261c05497322055938847f5"
+SRC_URI[md5sum] = "769a44ee13b4e1f90156b58dc2f7ea7c"
+SRC_URI[sha256sum] = "ebac395ec50c1ae64d568db1260bc049d0e0e624c00e79d7b1b9a59c2679b98d"
INITSCRIPT_NAME = "monit"
INITSCRIPT_PARAMS = "defaults 99"
-inherit autotools-brokensep update-rc.d
+inherit autotools-brokensep update-rc.d systemd
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "monit.service"
+SYSTEMD_AUTO_ENABLE = "enable"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
EXTRA_OECONF = "\
libmonit_cv_setjmp_available=no \
@@ -23,13 +39,21 @@ EXTRA_OECONF = "\
--with-ssl-incl-dir=${STAGING_INCDIR} \
"
+do_configure_prepend() {
+ rm -rf ${S}/m4
+}
+
do_install_append() {
install -d ${D}${sysconfdir}/init.d/
install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/monit
- sed -i 's:# set daemon 120:set daemon 120:' ${S}/monitrc
- sed -i 's:include /etc/monit.d/:include /${sysconfdir}/monit.d/:' ${S}/monitrc
+
install -m 600 ${S}/monitrc ${D}${sysconfdir}/monitrc
install -m 700 -d ${D}${sysconfdir}/monit.d/
+ sed -i -e 's:# set daemon 120:set daemon 120:' \
+ -e 's:include /etc/monit.d/:include /${sysconfdir}/monit.d/:' \
+ ${D}${sysconfdir}/monitrc
+
+ install -D -m 0644 ${S}/system/startup/monit.service ${D}${systemd_system_unitdir}/monit.service
}
CONFFILES_${PN} += "${sysconfdir}/monitrc"
--
2.11.0
More information about the yocto
mailing list