Index: head/sysutils/munin-master/Makefile =================================================================== --- head/sysutils/munin-master/Makefile (revision 429556) +++ head/sysutils/munin-master/Makefile (revision 429557) @@ -1,71 +1,73 @@ # Created by: Lupe Christoph # $FreeBSD$ PORTNAME= munin PORTVERSION= ${MUNIN_VERSION} +PORTREVISION= 1 CATEGORIES= sysutils perl5 MASTER_SITES= ${MUNIN_SITES} PKGNAMESUFFIX= -master MAINTAINER= mat@FreeBSD.org COMMENT= Collector part of Munin BUILD_DEPENDS= p5-Module-Build>=0:devel/p5-Module-Build \ munin-common>=0:sysutils/munin-common \ rrdtool>=0:databases/rrdtool \ p5-Storable>=0:devel/p5-Storable \ p5-CGI>=0:www/p5-CGI \ p5-DateTime-HiRes>=0:devel/p5-DateTime-HiRes \ p5-File-Copy-Recursive>=0:devel/p5-File-Copy-Recursive \ p5-Getopt-Long>=0:devel/p5-Getopt-Long \ p5-HTML-Template>=0:www/p5-HTML-Template \ p5-IO-Socket-INET6>=0:net/p5-IO-Socket-INET6 \ p5-Log-Log4perl>=0:devel/p5-Log-Log4perl \ p5-Net-SSLeay>=0:security/p5-Net-SSLeay \ p5-Params-Validate>=0:devel/p5-Params-Validate \ p5-Text-Balanced>=0:textproc/p5-Text-Balanced RUN_DEPENDS= munin-common>=0:sysutils/munin-common \ rrdtool>=0:databases/rrdtool \ p5-CGI>=0:www/p5-CGI \ p5-Storable>=0:devel/p5-Storable \ p5-DateTime-HiRes>=0:devel/p5-DateTime-HiRes \ p5-File-Copy-Recursive>=0:devel/p5-File-Copy-Recursive \ p5-Getopt-Long>=0:devel/p5-Getopt-Long \ p5-HTML-Template>=0:www/p5-HTML-Template \ p5-IO-Socket-INET6>=0:net/p5-IO-Socket-INET6 \ p5-Log-Log4perl>=0:devel/p5-Log-Log4perl \ p5-Net-SSLeay>=0:security/p5-Net-SSLeay \ p5-Params-Validate>=0:devel/p5-Params-Validate \ p5-Text-Balanced>=0:textproc/p5-Text-Balanced \ p5-URI>=0:net/p5-URI \ p5-Date-Manip>=0:devel/p5-Date-Manip \ p5-FCGI>=0:www/p5-FCGI USES= gmake perl5 cpe PKGMESSAGE= ${WRKDIR}/pkg-message .include "${.CURDIR}/../munin-common/munin.mk" ALL_TARGET= infiles build-master build-man INSTALL_TARGET= install-master-prime NO_ARCH= yes SUB_FILES= pkg-message PLIST_SUB+= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} post-install: (cd ${WRKSRC}/build/doc; \ ${INSTALL_MAN} munin.conf.5 ${STAGEDIR}${MAN5PREFIX}/man/man5; \ ${INSTALL_MAN} munin-cron.8 munin-graph.8 munin-html.8 munin-limits.8 munin-update.8 ${STAGEDIR}${MAN8PREFIX}/man/man8; \ ) (cd ${STAGEDIR}${ETCDIR}; for i in `find . -type f`; do mv $$i $$i.sample; done) ${MV} ${STAGEDIR}${WWWDIR}/.htaccess ${STAGEDIR}${WWWDIR}/.htaccess.sample + ${INSTALL_DATA} ${FILESDIR}/newsyslog ${STAGEDIR}${ETCDIR}/munin-master.newsyslog .include .if ${PERL_LEVEL} >= 502100 RUN_DEPENDS+= p5-CGI-Fast>=0:www/p5-CGI-Fast .endif .include Index: head/sysutils/munin-master/pkg-deinstall =================================================================== --- head/sysutils/munin-master/pkg-deinstall (revision 429556) +++ head/sysutils/munin-master/pkg-deinstall (revision 429557) @@ -1,91 +1,63 @@ #! /bin/sh # ex:sw=4 sts=4 ask() { local question default answer question=$1 default=$2 if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ] then read -p "${question} [${default}]? " answer fi if [ x${answer} = x ] then answer=${default} fi echo ${answer} } yesno() { local dflt question answer question=$1 dflt=$2 while :; do answer=$(ask "${question}" "${dflt}") case "${answer}" in [Yy]*) return 0;; [Nn]*) return 1;; esac echo "Please answer yes or no." done } delete_crontab_entries() { local b e b=$1 e=$2 TMPFILE=`mktemp -t munin` || exit 1 crontab -u munin -l | sed -e "/^$b\$/,/^$e\$/d" -e '/^[ ]*#/d' -e '/^$/d' > $TMPFILE if [ -s $TMPFILE ] then crontab -u munin -l | sed -e "/^$b\$/,/^$e\$/d" | crontab -u munin - echo "The crontab for user munin had manually created entries." echo "Only the automatically created entries have been removed." echo "These are the remaining lines:" crontab -u munin -l else echo y | crontab -u munin -r echo "crontab for user munin removed" fi rm $TMPFILE } -delnewsyslog() { - tmp=`mktemp -t munin` || exit 1 - sed -e '/^\/var\/log\/munin\/\*\.log[ ]/d' /etc/newsyslog.conf >${tmp} - cat ${tmp} > /etc/newsyslog.conf - rm ${tmp} -} - -newsyslog() { - ENTRY=`fgrep '/var/log/munin/*' /etc/newsyslog.conf` - DEFAULT='/var/log/munin/*.log munin:munin 644 7 * @T00 GNWZ' - if [ -z "$ENTRY" ] - then - exit 0 - elif [ "$ENTRY" = "$DEFAULT" ] - then - delnewsyslog - elif yesno "You have changed the default munin-master entry in \"/etc/newsyslog.conf\". -Do you want me to delete it?" y - then - delnewsyslog - echo "Done." - fi -} - - case $2 in DEINSTALL) if [ -z "${PACKAGE_BUILDING}" ] then delete_crontab_entries '#BEGIN_MUNIN_MAIN' '#END_MUNIN_MAIN' - newsyslog fi - ;; - POST-DEINSTALL) ;; esac Index: head/sysutils/munin-master/pkg-install =================================================================== --- head/sysutils/munin-master/pkg-install (revision 429556) +++ head/sysutils/munin-master/pkg-install (revision 429557) @@ -1,92 +1,82 @@ #! /bin/sh # ex:sw=4 sts=4 ask() { local question default answer question=$1 default=$2 if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ] then read -p "${question} [${default}]? " answer fi if [ x${answer} = x ] then answer=${default} fi echo ${answer} } yesno() { local dflt question answer question=$1 dflt=$2 while :; do answer=$(ask "${question}" "${dflt}") case "${answer}" in [Yy]*) return 0;; [Nn]*) return 1;; esac echo "Please answer yes or no." done } create_crontab_entries() { local b e b=$1 e=$2 if crontab -u munin -l > /dev/null 2>&1 then if ! crontab -u munin -l | grep -q MANUAL_MUNIN_CRONTAB then TMPFILE=`mktemp -t munin` || exit 1 cat > $TMPFILE crontab -u munin -l | sed -e "/^$b$/,/^$e$/d" | \ cat - $TMPFILE | crontab -u munin - rm $TMPFILE fi else crontab -u munin - fi } -newsyslog() { - if ! fgrep -q '/var/log/munin/*' /etc/newsyslog.conf - then - cat >> /etc/newsyslog.conf <${tmp} - cat ${tmp} > /etc/newsyslog.conf - rm ${tmp} -} - -newsyslog() { - ENTRY=`grep /var/log/munin/munin-node.log /etc/newsyslog.conf` - DEFAULT='/var/log/munin/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid' - if [ -z "$ENTRY" ]; then - exit 0 - elif [ "$ENTRY" = "$DEFAULT" ]; then - delnewsyslog - else - echo "You have changed the default munin-node entry in \"/etc/newsyslog.conf\"". - echo "If you deinstall munin-node permanently, you have to manually remove it" - fi -} - - -case $2 in - DEINSTALL) - if [ -z "${PACKAGE_BUILDING}" ]; then - newsyslog - fi - ;; - POST-DEINSTALL) - ;; -esac Property changes on: head/sysutils/munin-node/pkg-deinstall ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/munin-node/Makefile =================================================================== --- head/sysutils/munin-node/Makefile (revision 429556) +++ head/sysutils/munin-node/Makefile (revision 429557) @@ -1,88 +1,90 @@ # Created by: Lupe Christoph # $FreeBSD$ PORTNAME= munin PORTVERSION= ${MUNIN_VERSION} +PORTREVISION= 1 CATEGORIES= sysutils perl5 MASTER_SITES= ${MUNIN_SITES} PKGNAMESUFFIX= -node MAINTAINER= mat@FreeBSD.org COMMENT= Node-specific part of Munin BUILD_DEPENDS= p5-Module-Build>=0:devel/p5-Module-Build \ p5-DateTime-HiRes>=0:devel/p5-DateTime-HiRes \ munin-common>=0:sysutils/munin-common \ p5-Net-Server>=0:net/p5-Net-Server \ bash:shells/bash RUN_DEPENDS= p5-Cache-Cache>=0:devel/p5-Cache-Cache \ p5-DateTime-HiRes>=0:devel/p5-DateTime-HiRes \ munin-common>=0:sysutils/munin-common \ p5-Net-Server>=0:net/p5-Net-Server \ p5-Net-CIDR>=0:net-mgmt/p5-Net-CIDR \ p5-libwww>=0:www/p5-libwww \ bash:shells/bash USES= gmake perl5 shebangfix cpe PKGMESSAGE= ${WRKDIR}/pkg-message REINPLACE_ARGS= -i "" SHEBANG_FILES= node/sbin/munin-node node/sbin/munin-sched \ node/sbin/munin-run node/sbin/munin-node-configure .include "${.CURDIR}/../munin-common/munin.mk" ALL_TARGET= build-node build-plugins build/node/_bin/munin-async build/node/_bin/munin-asyncd INSTALL_TARGET= install-node-prime install-async-prime install-plugins-prime NO_ARCH= yes OPTIONS_DEFINE= SNMP PERL JAVA OPTIONS_DEFAULT= SNMP PERL OPTIONS_SUB= yes SNMP_DESC= Include SNMP plugins PERL_DESC= Include all Perl modules (adds dependencies) JAVA_DESC= Include JAVA plugins SNMP_BUILD_DEPENDS= p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP SNMP_RUN_DEPENDS= p5-Net-SNMP>=0:net-mgmt/p5-Net-SNMP PERL_RUN_DEPENDS= p5-DBD-Pg>=0:databases/p5-DBD-Pg \ p5-Net-DNS>=0:dns/p5-Net-DNS \ p5-XML-Parser>=0:textproc/p5-XML-Parser \ p5-XML-LibXML>=0:textproc/p5-XML-LibXML JAVA_USE= java=yes JAVA_INSTALL_TARGET= install-plugins-java JAVA_BUILD= yes JAVA_RUN= yes SUB_FILES= pkg-message plugins.conf USE_RC_SUBR= munin-asyncd munin-node munin-sched post-patch: @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ ${WRKSRC}/node/sbin/munin-node \ ${WRKSRC}/node/sbin/munin-node-configure \ ${WRKSRC}/node/sbin/munin-run @${REINPLACE_CMD} \ -e 's|^\(BASH[[:space:]]*:=\).*|\1 ${bash_CMD}|' \ -e 's|^\(JAVARUN[[:space:]]*:=\).*|\1 ${java_CMD}|' \ -e 's|^\(PERL[[:space:]]*:=\).*|\1 ${perl_CMD}|' \ -e 's|^\(PYTHON[[:space:]]*:=\).*|\1 ${python_CMD}|' \ -e 's|^\(RUBY[[:space:]]*:=\).*|\1 ${ruby_CMD}|' \ ${WRKSRC}/Makefile.config @${FIND} ${WRKSRC}/node/sbin -type f -name "*.orig" -delete post-install: ${MKDIR} ${STAGEDIR}${DBDIR}/plugin-state ${STAGEDIR}${SPOOLDIR}/async ${INSTALL_SCRIPT} ${.CURDIR}/plugins/* ${STAGEDIR}${DATADIR}/plugins/ ${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf \ ${STAGEDIR}${ETCDIR}/munin-node.conf.sample ${INSTALL_DATA} ${WRKDIR}/plugins.conf \ ${STAGEDIR}${ETCDIR}/plugin-conf.d/plugins.conf.sample (cd ${WRKSRC}/node/blib/bindoc; \ ${INSTALL_MAN} munin-node-configure.1 munin-node.1 munin-run.1 munin-sched.1 munindoc.1 ${STAGEDIR}${MAN1PREFIX}/man/man1; \ ) (cd ${WRKSRC}/build/doc; \ ${INSTALL_MAN} munin-node.conf.5 ${STAGEDIR}${MAN5PREFIX}/man/man5; \ ${INSTALL_MAN} munin.8 ${STAGEDIR}${MAN8PREFIX}/man/man8; \ ) + ${INSTALL_DATA} ${FILESDIR}/newsyslog ${STAGEDIR}${ETCDIR}/munin-node.newsyslog .include Index: head/sysutils/munin-node/files/newsyslog =================================================================== --- head/sysutils/munin-node/files/newsyslog (nonexistent) +++ head/sysutils/munin-node/files/newsyslog (revision 429557) @@ -0,0 +1 @@ +/var/log/munin/munin-node.log 644 7 * @T00 Z /var/run/munin/munin-node.pid Property changes on: head/sysutils/munin-node/files/newsyslog ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/munin-node/pkg-install =================================================================== --- head/sysutils/munin-node/pkg-install (revision 429556) +++ head/sysutils/munin-node/pkg-install (revision 429557) @@ -1,37 +1,24 @@ #! /bin/sh init_plugins() { if [ -f /tmp/.munin-node.version ]; then prevver=$(cat /tmp/.munin-node.version) fi if [ -n "$prevver" ]; then echo -n "Initializing new plugins.." ${PKG_PREFIX}/sbin/munin-node-configure --shell --newer "${prevver%-*}" | sh -x fi echo "done." } -newsyslog() { - if grep -q /var/log/munin/munin-node.log /etc/newsyslog.conf; then - : - else - cat >> /etc/newsyslog.conf <