diff options
-rw-r--r-- | GIDs | 1 | ||||
-rw-r--r-- | UIDs | 1 | ||||
-rw-r--r-- | sysutils/munin-common/Makefile | 7 | ||||
-rw-r--r-- | sysutils/munin-common/files/pkg-message.in | 8 | ||||
-rw-r--r-- | sysutils/munin-master/Makefile | 16 | ||||
-rw-r--r-- | sysutils/munin-master/files/pkg-message.in | 2 | ||||
-rw-r--r-- | sysutils/munin-master/pkg-deinstall | 35 | ||||
-rw-r--r-- | sysutils/munin-master/pkg-install | 40 | ||||
-rw-r--r-- | sysutils/munin-master/pkg-plist | 7 | ||||
-rw-r--r-- | sysutils/munin-node/Makefile | 28 | ||||
-rw-r--r-- | sysutils/munin-node/files/patch-node-node.d.freebsd-if_.in.diff | 16 | ||||
-rw-r--r-- | sysutils/munin-node/files/patch-node-node.d.freebsd-if_errcoll_.in.diff | 17 | ||||
-rw-r--r-- | sysutils/munin-node/files/pkg-message.in | 4 | ||||
-rw-r--r-- | sysutils/munin-node/pkg-deinstall | 11 | ||||
-rw-r--r-- | sysutils/munin-node/pkg-install | 24 | ||||
-rw-r--r-- | sysutils/munin-node/pkg-plist | 23 |
16 files changed, 94 insertions, 146 deletions
@@ -139,6 +139,7 @@ puppet:*:814: openacs:*:820: dotlrn:*:821: netdisco:*:840: +munin:*:842: fossy:*:901:www bacula:*:910: iserv:*:911: @@ -149,6 +149,7 @@ puppet:*:814:814::0:0:Puppet Daemon:/nonexistent:/usr/sbin/nologin openacs:*:820:820::0:0:OpenACS Daemon User:/nonexistent:/usr/sbin/nologin dotlrn:*:821:821::0:0:.LRN Daemon User:/nonexistent:/usr/sbin/nologin netdisco:*:840:840::0:0:netdisco daemon:/nonexistent:/usr/sbin/nologin +munin:*:842:842::0:0:Munin:/var/munin:/usr/sbin/nologin fossy:*:901:901::0:0:FOSSology user:/usr/local/share/fossology:/usr/local/bin/bash bacula:*:910:910::0:0:Bacula Daemon:/var/db/bacula:/usr/sbin/nologin iserv:*:911:911::0:0:Iserv Daemon:/nonexistent:/usr/sbin/nologin diff --git a/sysutils/munin-common/Makefile b/sysutils/munin-common/Makefile index f4d352923f00..0b1f0fa695cd 100644 --- a/sysutils/munin-common/Makefile +++ b/sysutils/munin-common/Makefile @@ -7,6 +7,7 @@ PORTNAME= munin PORTVERSION= 1.4.3 +PORTREVISION= 1 CATEGORIES= sysutils perl5 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20stable/${PORTVERSION} PKGNAMESUFFIX= -common @@ -22,9 +23,9 @@ USE_PERL5= yes USE_GMAKE= yes PATCH_STRIP= -p1 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/} -PKGMESSAGE= ${WRKDIR}/pkg-message -MAKE_ARGS= LIBDIR=${DATADIR} CONFDIR=${ETCDIR} \ +DBDIR= /var/${PORTNAME} +MAKE_ARGS= LIBDIR=${DATADIR} CONFDIR=${ETCDIR} DBDIR=${DBDIR} \ PERL=${PERL} SITE_PERL_REL=${SITE_PERL_REL} ALL_TARGET= build-common-prime INSTALL_TARGET= install-common @@ -36,8 +37,6 @@ MAN3= Munin::Common::Config.3 \ Munin::Common::TLSServer.3 \ Munin::Common::Timeout.3 -SUB_FILES= pkg-message - post-install: @(cd ${WRKSRC}/common/blib/libdoc && for man in ${MAN3} ; do \ ${INSTALL_MAN} -C $$man ${PREFIX}/man/man3; \ diff --git a/sysutils/munin-common/files/pkg-message.in b/sysutils/munin-common/files/pkg-message.in deleted file mode 100644 index df049437efa1..000000000000 --- a/sysutils/munin-common/files/pkg-message.in +++ /dev/null @@ -1,8 +0,0 @@ -******************************************************************** -Unless this file already existed, a sample configuration file -has been placed in %%PREFIX%%/etc/munin/munin.conf. - -Please edit it according to your needs. - -The Munin server will be run from cron under the user 'munin'. -******************************************************************** diff --git a/sysutils/munin-master/Makefile b/sysutils/munin-master/Makefile index 28167e6cacc9..fa9457ff37c4 100644 --- a/sysutils/munin-master/Makefile +++ b/sysutils/munin-master/Makefile @@ -7,6 +7,7 @@ PORTNAME= munin PORTVERSION= 1.4.3 +PORTREVISION= 1 CATEGORIES= sysutils perl5 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20stable/${PORTVERSION} PKGNAMESUFFIX= -master @@ -42,7 +43,11 @@ PATCH_STRIP= -p1 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/} PKGMESSAGE= ${WRKDIR}/pkg-message -MAKE_ARGS= LIBDIR=${DATADIR} CONFDIR=${ETCDIR} \ +USERS= munin +GROUPS= munin + +DBDIR= /var/${PORTNAME} +MAKE_ARGS= LIBDIR=${DATADIR} CONFDIR=${ETCDIR} DBDIR=${DBDIR} \ WWWDIR=${WWWDIR} CGIDIR=${WWWDIR}/cgi-bin \ PERL=${PERL} SITE_PERL_REL=${SITE_PERL_REL} ALL_TARGET= build-master build-man @@ -67,10 +72,12 @@ MAN8= munin-cron.8 \ munin-limits.8 \ munin-update.8 +PLIST_SUB= DBDIR=${DBDIR} SUB_FILES= pkg-message pre-install: - @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL + @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL post-install: @${INSTALL_DATA} ${WRKSRC}/build/master/munin.conf ${PREFIX}/etc/munin/munin.conf.sample @@ -83,9 +90,10 @@ post-install: @(cd ${WRKSRC}/build/doc && for man in ${MAN8}; do \ ${INSTALL_MAN} -C $$man ${PREFIX}/man/man8; \ done) - @DATADIR=${DATADIR} PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL + @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL @${CHOWN} munin /var/log/munin-master - @${CHGRP} munin /var/run/munin /var/log/munin-master ${WWWDIR} ${PREFIX}/var/munin + @${CHGRP} munin /var/run/munin /var/log/munin-master ${WWWDIR} ${DBDIR} @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/sysutils/munin-master/files/pkg-message.in b/sysutils/munin-master/files/pkg-message.in index 3a9a5ff0c819..d32f17e6286d 100644 --- a/sysutils/munin-master/files/pkg-message.in +++ b/sysutils/munin-master/files/pkg-message.in @@ -1,6 +1,6 @@ ******************************************************************** Unless this file already existed, a sample configuration file -has been placed in %%ETCDIR%%/munin/munin.conf. +has been placed in %%ETCDIR%%/munin.conf. Please edit it according to your needs. diff --git a/sysutils/munin-master/pkg-deinstall b/sysutils/munin-master/pkg-deinstall index 68a56ca6be80..d55087497a7f 100644 --- a/sysutils/munin-master/pkg-deinstall +++ b/sysutils/munin-master/pkg-deinstall @@ -29,40 +29,6 @@ yesno() { done } -delete_account() { - local u g home - - u=$1 - g=$2 - if pw group show ${g} > /dev/null 2>&1; then - if yesno "Do you want me to remove group \"${g}\"" y; then - pw group del -n ${g} - echo "Done." - else - GID=`pw group show ${g} | awk -F: '{ print $3 }'` - fi - fi - if pw user show ${u} > /dev/null 2>&1; then - if yesno "Do you want me to remove user \"${u}\"" y; then - eval home=~${u} - pw user del -n ${u} -r - echo "Done." - if [ -d "${home}" ]; then - echo "Please remember to remove the home directory \"${home}\"" - fi - - # pw user del may have removed the group, too. - # Put it back if the admin asked us to retain it. - if [ -n "$GID" ]; then - pw group show ${g} > /dev/null 2>&1 - if [ $? -ne 0 ]; then - pw group add ${g} - fi - fi - fi - fi -} - delete_crontab_entries() { local b e b=$1 @@ -113,6 +79,5 @@ case $2 in fi ;; POST-DEINSTALL) - delete_account munin munin ;; esac diff --git a/sysutils/munin-master/pkg-install b/sysutils/munin-master/pkg-install index 17d54351737c..ff0fb2f16b7c 100644 --- a/sysutils/munin-master/pkg-install +++ b/sysutils/munin-master/pkg-install @@ -29,45 +29,6 @@ yesno() { done } -make_account() { - local u g gcos - - u=$1 - g=$2 - gcos=$3 - - if pw group show "${g}" >/dev/null 2>&1; then - echo "You already have a group \"${g}\", so I will use it." - else - echo "You need a group \"${g}\"." - if which -s pw && yesno "Would you like me to create it" y; then - pw groupadd ${g} || exit - echo "Done." - else - echo "Please create it, and try again." - if ! /usr/sbin/pw user show ${u} >/dev/null 2>/dev/null; then - echo "While you're at it, please create a user \"${u}\" too," - echo "with a default group of \"${g}\"." - fi - exit 1 - fi - fi - - if pw user show "${u}" >/dev/null 2>&1; then - echo "You already have a user \"${u}\", so I will use it." - else - echo "You need a user \"${u}\"." - if which -s pw && yesno "Would you like me to create it" y; then - pw useradd ${u} -g ${g} -h - \ - -s /bin/sh -c "${gcos}" || exit - echo "Done." - else - echo "Please create it, and try again." - exit 1 - fi - fi -} - create_crontab_entries() { local b e b=$1 @@ -109,7 +70,6 @@ move_www_dir() { case $2 in PRE-INSTALL) - make_account munin munin "Munin owner" move_www_dir # at some point in the installation, the www dir is created ;; POST-INSTALL) diff --git a/sysutils/munin-master/pkg-plist b/sysutils/munin-master/pkg-plist index 605e70380e4b..2ec21a94100d 100644 --- a/sysutils/munin-master/pkg-plist +++ b/sysutils/munin-master/pkg-plist @@ -1,6 +1,8 @@ bin/munin-check bin/munin-cron +@unexec if cmp -s %D/%%ETCDIR%%/munin.conf.sample %D/%%ETCDIR%%/munin.conf ; then rm -f %D/%%ETCDIR%%/munin.conf ; fi %%ETCDIR%%/munin.conf.sample +@exec if [ ! -f %D/%%ETCDIR%%/munin.conf ] ; then cp -p %D/%%ETCDIR%%/munin.conf.sample %D/%%ETCDIR%%/munin.conf ; fi %%ETCDIR%%/templates/definitions.html %%ETCDIR%%/templates/favicon.ico %%ETCDIR%%/templates/logo-h.png @@ -48,8 +50,11 @@ bin/munin-cron @dirrmtry %%WWWDIR%%/cgi-bin @dirrmtry %%WWWDIR%% @dirrmtry %%DATADIR%% -@dirrmtry var/munin +@dirrmtry %%DBDIR%% @dirrm %%SITE_PERL%%/Munin/Master @dirrmtry %%SITE_PERL%%/Munin +@dirrmtry %%ETCDIR%%/templates/partial @dirrmtry %%ETCDIR%%/templates +@exec mkdir -p %D/%%ETCDIR%%/munin-conf.d +@dirrmtry %%ETCDIR%%/munin-conf.d @dirrmtry %%ETCDIR%% diff --git a/sysutils/munin-node/Makefile b/sysutils/munin-node/Makefile index 9a8a9e2ae31b..8edd1a020a5d 100644 --- a/sysutils/munin-node/Makefile +++ b/sysutils/munin-node/Makefile @@ -7,6 +7,7 @@ PORTNAME= munin PORTVERSION= 1.4.3 +PORTREVISION= 1 CATEGORIES= sysutils perl5 MASTER_SITES= SF/${PORTNAME}/${PORTNAME}%20stable/${PORTVERSION} PKGNAMESUFFIX= -node @@ -32,7 +33,11 @@ PATCH_STRIP= -p0 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.r/rc/} PKGMESSAGE= ${WRKDIR}/pkg-message -MAKE_ARGS= LIBDIR=${DATADIR} CONFDIR=${ETCDIR} \ +USERS= munin +GROUPS= munin + +DBDIR= /var/${PORTNAME} +MAKE_ARGS= LIBDIR=${DATADIR} CONFDIR=${ETCDIR} DBDIR=${DBDIR} \ PERL=${PERL} SITE_PERL_REL=${SITE_PERL_REL} ALL_TARGET= build-node build-plugins INSTALL_TARGET= install-node-prime install-plugins-prime @@ -61,23 +66,29 @@ MAN3= ${MAN3_NODE} ${MAN3_PLUGIN} MAN5= munin-node.conf.5 MAN8= munin.8 +PLIST_SUB= DBDIR=${DBDIR} SUB_FILES= pkg-message munin-node-revive.sh USE_RC_SUBR= munin-node.sh RC_SUBR_SUFFIX= .sh pre-su-install: - @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: ${INSTALL_SCRIPT} ${WRKDIR}/munin-node.sh \ ${PREFIX}/etc/rc.d/munin-node.sh ${INSTALL_DATA} ${WRKSRC}/build/node/munin-node.conf \ - ${PREFIX}/etc/munin/munin-node.conf.sample + ${ETCDIR}/munin-node.conf.sample + @if [ ! -f ${ETCDIR}/munin-node.conf ]; then \ + ${INSTALL_DATA} ${ETCDIR}/munin-node.conf.sample \ + ${ETCDIR}/munin-node.conf; \ + fi ${INSTALL_DATA} ${FILESDIR}/plugins.conf \ - ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample - @if [ ! -f ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf ]; then \ - ${INSTALL_DATA} ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf.sample \ - ${PREFIX}/etc/munin/plugin-conf.d/plugins.conf; \ + ${ETCDIR}/plugin-conf.d/plugins.conf.sample + @if [ ! -f ${ETCDIR}/plugin-conf.d/plugins.conf ]; then \ + ${INSTALL_DATA} ${ETCDIR}/plugin-conf.d/plugins.conf.sample \ + ${ETCDIR}/plugin-conf.d/plugins.conf; \ fi @(cd ${WRKSRC}/node/blib/bindoc && for man in ${MAN1}; do \ ${INSTALL_MAN} -C $$man ${PREFIX}/man/man1; \ @@ -95,7 +106,8 @@ post-install: ${INSTALL_MAN} -C $$man ${PREFIX}/man/man8; \ done) @${ECHO} ${PORTVERSION} > ${PREFIX}/etc/munin/VERSION.node - PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX=${PREFIX} \ + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/sysutils/munin-node/files/patch-node-node.d.freebsd-if_.in.diff b/sysutils/munin-node/files/patch-node-node.d.freebsd-if_.in.diff new file mode 100644 index 000000000000..ff4aa9183927 --- /dev/null +++ b/sysutils/munin-node/files/patch-node-node.d.freebsd-if_.in.diff @@ -0,0 +1,16 @@ +--- plugins/node.d.freebsd/if_.in.orig 2009-12-30 13:55:55.000000000 +0100 ++++ plugins/node.d.freebsd/if_.in 2010-02-24 18:59:15.670282185 +0100 +@@ -81,9 +81,12 @@ + if (NF == 10) { + print "rbytes.value", $6; + print "obytes.value", $9; +- } else { ++ } else if (NF == 11) { + print "rbytes.value", $7; + print "obytes.value", $10; ++ } else { ++ print "rbytes.value", $8; ++ print "obytes.value", $11; + } + }' + fi diff --git a/sysutils/munin-node/files/patch-node-node.d.freebsd-if_errcoll_.in.diff b/sysutils/munin-node/files/patch-node-node.d.freebsd-if_errcoll_.in.diff new file mode 100644 index 000000000000..83b671655aaf --- /dev/null +++ b/sysutils/munin-node/files/patch-node-node.d.freebsd-if_errcoll_.in.diff @@ -0,0 +1,17 @@ +--- plugins/node.d.freebsd/if_errcoll_.in.orig 2009-12-30 13:55:55.000000000 +0100 ++++ plugins/node.d.freebsd/if_errcoll_.in 2010-02-24 19:00:26.026407278 +0100 +@@ -59,9 +59,13 @@ + print "ierrors.value", $5; + print "oerrors.value", $8; + print "collisions.value", $10; +- } else { ++ } else if (NF == 11) { + print "ierrors.value", $6; + print "oerrors.value", $9; + print "collisions.value", $11; ++ } else { ++ print "ierrors.value", $6; ++ print "oerrors.value", $10; ++ print "collisions.value", $12; + } + }' diff --git a/sysutils/munin-node/files/pkg-message.in b/sysutils/munin-node/files/pkg-message.in index 2bb30e8e5e4c..d28dc2b0ef02 100644 --- a/sysutils/munin-node/files/pkg-message.in +++ b/sysutils/munin-node/files/pkg-message.in @@ -1,6 +1,6 @@ ******************************************************************** Unless this file already existed, a sample configuration file -has been placed in %%ETCDIR%%/munin/munin-node.conf. +has been placed in %%ETCDIR%%/munin-node.conf. Please edit it according to your needs. @@ -15,5 +15,5 @@ Then, it will be started on the next boot. If this line is already present, the client will be started now. Otherwise, edit /etc/rc.conf and execute this command: - %%ETCDIR%%/rc.d/munin-node.sh start + %%PREFIX%%/etc/rc.d/munin-node.sh start ******************************************************************** diff --git a/sysutils/munin-node/pkg-deinstall b/sysutils/munin-node/pkg-deinstall index 4a3410cd306f..37776c3061b8 100644 --- a/sysutils/munin-node/pkg-deinstall +++ b/sysutils/munin-node/pkg-deinstall @@ -37,16 +37,6 @@ stop_process() { fi } -delete_group() { - local g - - g=$1 - if yesno "Do you want me to remove group \"${g}\"" y; then - pw groupdel -n ${g} - echo "Done." - fi -} - delete_crontab_entries() { local prog prog=$1 @@ -90,6 +80,5 @@ case $2 in fi ;; POST-DEINSTALL) - delete_group munin ;; esac diff --git a/sysutils/munin-node/pkg-install b/sysutils/munin-node/pkg-install index 06c2187aa44e..5b5e5b5fec5f 100644 --- a/sysutils/munin-node/pkg-install +++ b/sysutils/munin-node/pkg-install @@ -29,29 +29,6 @@ yesno() { done } -make_group() { - local g - - g=$1 - - if pw group show "${g}" >/dev/null 2>&1; then - echo "You already have a group \"${g}\", so I will use it." - else - echo "You need a group \"${g}\"." - if which -s pw && yesno "Would you like me to create it" y; then - pw groupadd ${g} || exit - echo "Done." - else - echo "Please create it, and try again." - if ! /usr/sbin/pw user show ${u} >/dev/null 2>/dev/null; then - echo "While you're at it, please create a user \"${u}\" too," - echo "with a default group of \"${g}\"." - fi - exit 1 - fi - fi -} - init_plugins() { if [ -f ${PKG_PREFIX}/etc/munin/VERSION.node ]; then prevver=$(cat ${PKG_PREFIX}/etc/munin/VERSION.node) @@ -109,7 +86,6 @@ EOT case $2 in PRE-INSTALL) - make_group munin ;; POST-INSTALL) if [ -z "${PACKAGE_BUILDING}" ]; then diff --git a/sysutils/munin-node/pkg-plist b/sysutils/munin-node/pkg-plist index 5042f619b5b9..55d8ddea54b6 100644 --- a/sysutils/munin-node/pkg-plist +++ b/sysutils/munin-node/pkg-plist @@ -1,7 +1,12 @@ +@stopdaemon munin-node bin/munindoc -etc/munin/VERSION.node -etc/munin/munin-node.conf.sample -etc/munin/plugin-conf.d/plugins.conf.sample +%%ETCDIR%%/VERSION.node +@unexec if cmp -s %D/%%ETCDIR%%/munin-node.conf.sample %D/%%ETCDIR%%/munin-node.conf ; then rm -f %D/%%ETCDIR%%/munin-node.conf ; fi +%%ETCDIR%%/munin-node.conf.sample +@exec if [ ! -f %D/%%ETCDIR%%/munin-node.conf ] ; then cp -p %D/%%ETCDIR%%/munin-node.conf.sample %D/%%ETCDIR%%/munin-node.conf ; fi +@unexec if cmp -s %D/%%ETCDIR%%/plugin-conf.d/plugins.conf.sample %D/%%ETCDIR%%/plugin-conf.d/plugins.conf ; then rm -f %D/%%ETCDIR%%/plugin-conf.d/plugins.conf ; fi +%%ETCDIR%%/plugin-conf.d/plugins.conf.sample +@exec if [ ! -f %D/%%ETCDIR%%/plugin-conf.d/plugins.conf ] ; then cp -p %D/%%ETCDIR%%/plugin-conf.d/plugins.conf.sample %D/%%ETCDIR%%/plugin-conf.d/plugins.conf ; fi %%SITE_PERL%%/Munin/Node/Config.pm %%SITE_PERL%%/Munin/Node/Configure/Debug.pm %%SITE_PERL%%/Munin/Node/Configure/History.pm @@ -212,14 +217,16 @@ sbin/munin-run %%DATADIR%%/plugins/vmstat %%DATADIR%%/plugins/warning_tester %%DATADIR%%/plugins/zimbra_ -@dirrmtry var/munin/plugin-state -@dirrmtry var/munin +@dirrmtry %%DBDIR%%/plugin-state +@dirrmtry %%DBDIR%% @dirrm %%DATADIR%%/plugins @dirrmtry %%DATADIR%% @dirrm %%SITE_PERL%%/Munin/Plugin @dirrm %%SITE_PERL%%/Munin/Node/Configure @dirrm %%SITE_PERL%%/Munin/Node @dirrmtry %%SITE_PERL%%/Munin -@dirrmtry etc/munin/plugins -@dirrmtry etc/munin/plugin-conf.d -@dirrmtry etc/munin +@exec mkdir -p %D/%%ETCDIR%%/plugins +@dirrmtry %%ETCDIR%%/plugins +@exec mkdir -p %D/%%ETCDIR%%/plugin-conf.d +@dirrmtry %%ETCDIR%%/plugin-conf.d +@dirrmtry %%ETCDIR%% |