[packages] monit: Bump to 5.4 and bugfixes
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>
Thu, 12 Jul 2012 08:09:57 +0000 (08:09 +0000)
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>
Thu, 12 Jul 2012 08:09:57 +0000 (08:09 +0000)
Hi
this patch update monit from 5.2.5 to 5.4, this add cool feature like "check program", to execute a script and send email/do action depending on the return code, and many bugfixes (http://mmonit.com/monit/dist/CHANGES.txt)
I've modified the init script because "-d 60" overide the conf file and the stat command doesn't seem to exist, so either we just chmod each time or we let the people RTFM and the syslog (i prefer the latter)

For now i've tested only the ssl version with backfire (r31676) on x86 and ar71xx (tplink wr1043nd) (it send mail via google, ping, watch load average and cpu ...)
It compile (monit and monit-nossl) for x86 and ar71xx for backfire & trunk (trunk x86 mount the ext4 partition readonly so i haven't tested)

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@free.fr>
Signed-off-by: Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
SVN-Revision: 32674

admin/monit/Makefile
admin/monit/files/monit.init
admin/monit/patches/001-no_sslv2.patch
admin/monit/patches/002-uclibc_loadavg.patch

index ef40bd9163f237167dedbf6624dde6e9db0664c6..cace2bea47f1ca9fbe6b4c9ecd54836171bf22f0 100644 (file)
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=monit
-PKG_VERSION:=5.2.5
-PKG_RELEASE:=2
+PKG_VERSION:=5.4
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://mmonit.com/monit/dist
-PKG_MD5SUM:=862fb7939ad6f73fc0cc82096c2309c7
+PKG_MD5SUM:=f1f391241d44059d0d3e5d26f4ec5ddf
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_INSTALL:=1
@@ -55,6 +55,11 @@ $(call Package/monit/Default/description)
        This package is built without SSL support.
 endef
 
+CONFIGURE_ARGS += \
+       --without-pam \
+       libmonit_cv_setjmp_available=yes \
+       libmonit_cv_vsnprintf_c99_conformant=yes
+
 ifeq ($(BUILD_VARIANT),ssl)
        CONFIGURE_ARGS += \
                --with-ssl \
index af31d898fb9733917a5f5601a6e268dae17f59b4..ed68700d287c46370198dd6724d393725625f05d 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2012 OpenWrt.org
 
 START=60
 
@@ -7,8 +7,8 @@ SERVICE_USE_PID=1
 
 start() {
        [ -f /etc/monitrc ] || return 1
-       [ "$(stat -c "%a" /etc/monitrc)" = "0700" ] || chmod 0700 /etc/monitrc
-       service_start /usr/bin/monit -d 60
+       #chmod 0700 /etc/monitrc
+       service_start /usr/bin/monit
 }
 
 stop() {
index 997e313bcf3e17b84878df7d604c23ddefa1f633..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,18 +0,0 @@
---- a/ssl.c
-+++ b/ssl.c
-@@ -635,6 +635,7 @@ ssl_connection *new_ssl_connection(char
- #endif
-     break;
-+#ifndef OPENSSL_NO_SSLV2
-   case SSL_VERSION_SSLV2:
- #ifdef OPENSSL_FIPS
-     if (FIPS_mode()) {
-@@ -647,6 +648,7 @@ ssl_connection *new_ssl_connection(char
-     }
- #endif
-     break;
-+#endif
-   case SSL_VERSION_SSLV3:
- #ifdef OPENSSL_FIPS
index 017cf055ec0b494f45450da17f2b92b649e3ca15..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,48 +0,0 @@
---- a/process/sysdep_LINUX.c
-+++ b/process/sysdep_LINUX.c
-@@ -144,6 +144,45 @@ static time_t get_starttime() {
-   return time(NULL) - (time_t)up;
- }
-+
-+
-+/* uclibc and dietlibc do not have this junk -ReneR */
-+#if defined (__UCLIBC__) || defined (__dietlibc__)
-+static int getloadavg (double loadavg[], int nelem)
-+{
-+  int fd;
-+
-+  fd = open ("/proc/loadavg", O_RDONLY);
-+  if (fd < 0)
-+    return -1;
-+  else
-+    {
-+      char buf[65], *p;
-+      ssize_t nread;
-+      int i;
-+
-+      nread = read (fd, buf, sizeof buf - 1);
-+      close (fd);
-+      if (nread <= 0)
-+      return -1;
-+      buf[nread - 1] = '\0';
-+
-+      if (nelem > 3)
-+      nelem = 3;
-+      p = buf;
-+      for (i = 0; i < nelem; ++i)
-+      {
-+        char *endp;
-+        loadavg[i] = strtod (p, &endp);
-+        if (endp == p)
-+          return -1;
-+        p = endp;
-+      }
-+
-+      return i;
-+    }
-+}
-+#endif
-   
- /* ------------------------------------------------------------------ Public */