[packages] monit: Bump to 5.4 and bugfixes
authoracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 12 Jul 2012 08:09:57 +0000 (08:09 +0000)
committeracinonyx <acinonyx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
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>
git-svn-id: svn://svn.openwrt.org/openwrt/packages@32674 3c298f89-4303-0410-b956-a3cf2f4a3e73

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

index ef40bd9..cace2be 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 af31d89..ed68700 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 997e313..e69de29 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 017cf05..e69de29 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 */