[Midnightbsd-cvs] mports: mports/misc: Add mirmon, a utility to monitor the status of
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed May 21 17:24:02 EDT 2008
Log Message:
-----------
Add mirmon, a utility to monitor the status of software mirrors.
Modified Files:
--------------
mports/misc:
Makefile (r1.36 -> r1.37)
Added Files:
-----------
mports/misc/mirmon:
Makefile (r1.1)
distinfo (r1.1)
pkg-descr (r1.1)
mports/misc/mirmon/files:
pkg-message.in (r1.1)
-------------- next part --------------
--- /dev/null
+++ misc/mirmon/pkg-descr
@@ -0,0 +1,7 @@
+Many project are mirrored worldwide. Mirmon helps in monitoring these mirrors.
+In a concise graphic format, mirmon shows each site's history of the last two
+weeks, making it easy to spot stale or dead mirrors. Mirmon quietly probes a
+subset of the sites in a given list, writes the results in the 'state' file,
+and generates a Web page with the results
+
+WWW: http://www.cs.uu.nl/people/henkp/mirmon/
--- /dev/null
+++ misc/mirmon/Makefile
@@ -0,0 +1,49 @@
+# ex:ts=8
+# Ports collection makefile for: mirmon
+# Date created: May 21 2008
+# Whom: Lucas Holt <luke at MidnightBSD.org>
+#
+# $MidnightBSD: mports/misc/mirmon/Makefile,v 1.1 2008/05/21 21:23:59 laffer1 Exp $
+#
+
+PORTNAME= mirmon
+PORTVERSION= 1.38
+CATEGORIES= misc
+MASTER_SITES= http://jadawin.tuxaco.net/freebsd/ \
+ http://www.cs.uu.nl/people/henkp/mirmon/src/
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT= Monitor the status of mirrors
+
+NO_BUILD= yes
+USE_PERL5_RUN= yes
+
+SUB_FILES= pkg-message
+SUB_LIST= PREFIX=${PREFIX}
+
+PLIST_FILES= bin/mirmon
+
+.if !defined(NOPORTDOCS)
+PORTDOCS= *
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e "s,/etc,${LOCALBASE}/etc," \
+ -e "s,/sw/bin/perl,/usr/bin/env perl," \
+ -e "s,/sw,${LOCALBASE}," \
+ ${WRKSRC}/mirmon ${WRKSRC}/mirmon.html
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/mirmon ${PREFIX}/bin
+ @${MKDIR} ${DATADIR}
+ ${CP} -R ${WRKSRC}/countries.list ${WRKSRC}/icons ${DATADIR}
+ @${FIND} ${DATADIR} ! -type d | \
+ ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
+ @${FIND} ${DATADIR} -type d | ${SORT} -r | \
+ ${SED} 's,^${PREFIX}/, at dirrm ,' >> ${TMPPLIST}
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ ${CP} ${WRKSRC}/mirmon.html ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
--- /dev/null
+++ misc/mirmon/distinfo
@@ -0,0 +1,3 @@
+MD5 (mirmon-1.38.tar.gz) = 71ca84082700d251fc7b15d1544a1ab1
+SHA256 (mirmon-1.38.tar.gz) = 5defb2c0890d3461a2b8dd8cc3efc4c63c0814c043cb227a69b4a457a38b0ce3
+SIZE (mirmon-1.38.tar.gz) = 33021
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/misc/Makefile,v
retrieving revision 1.36
retrieving revision 1.37
diff -L misc/Makefile -L misc/Makefile -u -r1.36 -r1.37
--- misc/Makefile
+++ misc/Makefile
@@ -72,6 +72,7 @@
SUBDIR += ldconfig_compat
SUBDIR += localedata
SUBDIR += mime-support
+ SUBDIR += mirmon
SUBDIR += newer
SUBDIR += nut
SUBDIR += p5-Geography-Countries
--- /dev/null
+++ misc/mirmon/files/pkg-message.in
@@ -0,0 +1,22 @@
+ The program is intended to be run by cron every hour.
+
+ 42 * * * * perl %%PREFIX%%/bin/mirmon -q -get update
+
+ It quietly probes a subset of the sites in a given list,
+ writes the results in the 'state' file and generates a web page
+ with the results. The subset contains the sites that are new, bad
+ and/or not probed for a specified time.
+
+ When no 'get' option is specified, the program just generates a
+ new web page from the last known state.
+
+ The program checks the mirrors by running a (user specified)
+ program on a pipe. A (user specified) number of probes is
+ run in parallel using nonblocking IO. When something can be
+ read from the pipe, it switches the pipe to blocking IO and
+ reads one line from the pipe. Then it flushes and closes the
+ pipe. No attempt is made to kill the probe.
+
+ The probe should return something that looks like "1043625600\n",
+ that is, a timestamp followed by a newline. The exit status of
+ the probe is ignored.
More information about the Midnightbsd-cvs
mailing list