diff --git a/admin/monit/Makefile b/admin/monit/Makefile index ef40bd916..cace2bea4 100644 --- a/admin/monit/Makefile +++ b/admin/monit/Makefile @@ -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 \ diff --git a/admin/monit/files/monit.init b/admin/monit/files/monit.init index af31d898f..ed68700d2 100644 --- a/admin/monit/files/monit.init +++ b/admin/monit/files/monit.init @@ -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() { diff --git a/admin/monit/patches/001-no_sslv2.patch b/admin/monit/patches/001-no_sslv2.patch index 997e313bc..e69de29bb 100644 --- a/admin/monit/patches/001-no_sslv2.patch +++ b/admin/monit/patches/001-no_sslv2.patch @@ -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 diff --git a/admin/monit/patches/002-uclibc_loadavg.patch b/admin/monit/patches/002-uclibc_loadavg.patch index 017cf055e..e69de29bb 100644 --- a/admin/monit/patches/002-uclibc_loadavg.patch +++ b/admin/monit/patches/002-uclibc_loadavg.patch @@ -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 */