From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 10 07:40:01 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 798F11065673 for ; Thu, 10 May 2012 07:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 49F728FC19 for ; Thu, 10 May 2012 07:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q4A7e1W0013477 for ; Thu, 10 May 2012 07:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q4A7e16P013476; Thu, 10 May 2012 07:40:01 GMT (envelope-from gnats) Resent-Date: Thu, 10 May 2012 07:40:01 GMT Resent-Message-Id: <201205100740.q4A7e16P013476@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, KIKUCHI Koichiro Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C83C1065670 for ; Thu, 10 May 2012 07:39:14 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id F091F8FC0A for ; Thu, 10 May 2012 07:39:13 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q4A7dD56083156 for ; Thu, 10 May 2012 07:39:13 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q4A7dDIS083155; Thu, 10 May 2012 07:39:13 GMT (envelope-from nobody) Message-Id: <201205100739.q4A7dDIS083155@red.freebsd.org> Date: Thu, 10 May 2012 07:39:13 GMT From: KIKUCHI Koichiro To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/167766: [MAINTAINER-UPDATE][PATCH] net-mgmt/pandorafms_*: Fix pkg-plist errors X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2012 07:40:01 -0000 >Number: 167766 >Category: ports >Synopsis: [MAINTAINER-UPDATE][PATCH] net-mgmt/pandorafms_*: Fix pkg-plist errors >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu May 10 07:40:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: KIKUCHI Koichiro >Release: 9.0-RELEASE >Organization: Rworks, Inc. >Environment: FreeBSD XXX 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: All of Pandora FMS ports don't remove home directory of the pandora user (/usr/local/etc/pandora/home) when ports are uninstalled. It's cause pkg-plist errors. >How-To-Repeat: install and uninstall one of Pandora FMS ports (net-mgmt/pandorafms_agent, net-mgmt/pandorafms_console or net-mgmt/pandorafms_server) >Fix: Please apply attache patch Patch attached with submission follows: Index: pandorafms_agent/Makefile =================================================================== RCS file: /home/ncvs/ports/net-mgmt/pandorafms_agent/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- pandorafms_agent/Makefile 21 Apr 2012 12:27:39 -0000 1.1 +++ pandorafms_agent/Makefile 10 May 2012 07:20:43 -0000 @@ -7,6 +7,7 @@ PORTNAME= pandora_agent PORTVERSION= ${PANDORA_VERSION} +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= koichiro@rworks.jp Index: pandorafms_agent/pkg-plist =================================================================== RCS file: /home/ncvs/ports/net-mgmt/pandorafms_agent/pkg-plist,v retrieving revision 1.1 diff -u -r1.1 pkg-plist --- pandorafms_agent/pkg-plist 21 Apr 2012 12:27:39 -0000 1.1 +++ pandorafms_agent/pkg-plist 10 May 2012 07:20:43 -0000 @@ -25,4 +25,3 @@ @dirrmtry %%DATADIR%% @dirrmtry %%ETCDIR%%/collections @dirrmtry %%ETCDIR%%/plugins -@dirrmtry %%ETCDIR%% Index: pandorafms_console/Makefile =================================================================== RCS file: /home/ncvs/ports/net-mgmt/pandorafms_console/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- pandorafms_console/Makefile 21 Apr 2012 12:27:40 -0000 1.1 +++ pandorafms_console/Makefile 10 May 2012 07:20:43 -0000 @@ -7,6 +7,7 @@ PORTNAME= pandora_console PORTVERSION= ${PANDORA_VERSION} +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= koichiro@rworks.jp Index: pandorafms_server/Makefile =================================================================== RCS file: /home/ncvs/ports/net-mgmt/pandorafms_server/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- pandorafms_server/Makefile 21 Apr 2012 12:27:40 -0000 1.1 +++ pandorafms_server/Makefile 10 May 2012 07:20:43 -0000 @@ -7,6 +7,7 @@ PORTNAME= pandora_server PORTVERSION= ${PANDORA_VERSION} +PORTREVISION= 1 CATEGORIES= net-mgmt MAINTAINER= koichiro@rworks.jp Index: pandorafms_server/bsd.pandora.mk =================================================================== RCS file: /home/ncvs/ports/net-mgmt/pandorafms_server/bsd.pandora.mk,v retrieving revision 1.1 diff -u -r1.1 bsd.pandora.mk --- pandorafms_server/bsd.pandora.mk 21 Apr 2012 12:27:40 -0000 1.1 +++ pandorafms_server/bsd.pandora.mk 10 May 2012 07:20:43 -0000 @@ -25,6 +25,8 @@ ETCDIR?= ${PANDORA_ETCDIR} SPOOLDIR?= ${PANDORA_SPOOLDIR} LOGDIR?= ${PANDORA_LOGDIR} +HOMEDIR?= ${PANDORA_HOMEDIR} +HOMEDIR_REL= ${HOMEDIR:S,^${PREFIX}/,,} PLIST_SUB+= SPOOLDIR="${PANDORA_SPOOLDIR}" LOGDIR="${PANDORA_LOGDIR}" \ USE_SPOOL_IN=${USE_SPOOL_IN} USE_SPOOL_OUT=${USE_SPOOL_OUT} \ @@ -58,3 +60,7 @@ pre-install: @${CAT} ${PKGDIR}/../pandorafms_server/pkg-plist.spool > ${PLIST} @${CAT} ${PKGDIR}/pkg-plist >> ${PLIST} + @${ECHO_MSG} '@exec [ -e "%D/${ETCDIR_REL}" ] || ${MKDIR} "%D/${ETCDIR_REL}"' >> ${PLIST} + @${ECHO_MSG} '@exec if [ -e "%D/${HOMEDIR_REL}" ];then ${TRUE}; else ${MKDIR} "%D/${HOMEDIR_REL}"; ${CHOWN} ${USER}:${GROUP} "%D/${HOMEDIR_REL}";fi' >> ${PLIST} + @${ECHO_MSG} '@unexec ${RMDIR} "%D/${HOMEDIR_REL}" 2>/dev/null || ${TRUE}' >> ${PLIST} + @${ECHO_MSG} '@unexec ${RMDIR} "%D/${ETCDIR_REL}" 2>/dev/null || ${TRUE}' >> ${PLIST} Index: pandorafms_server/pkg-plist =================================================================== RCS file: /home/ncvs/ports/net-mgmt/pandorafms_server/pkg-plist,v retrieving revision 1.1 diff -u -r1.1 pkg-plist --- pandorafms_server/pkg-plist 21 Apr 2012 12:27:40 -0000 1.1 +++ pandorafms_server/pkg-plist 10 May 2012 07:20:43 -0000 @@ -84,8 +84,9 @@ %%DATADIR%%/util/udp_client.pl %%DATADIR%%/util/windows.README etc/periodic/daily/199.clean-pandoradb +@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/PandoraFMS @dirrm %%SITE_PERL%%/PandoraFMS/Traceroute -@dirrm %%SITE_PERL%%/PandoraFMS +@dirrmtry %%SITE_PERL%%/PandoraFMS @dirrm %%DATADIR%%/util/plugin/babel_plugin @dirrm %%DATADIR%%/util/plugin/integria_plugin @dirrm %%DATADIR%%/util/pandora2ast @@ -95,4 +96,3 @@ @dirrmtry %%DATADIR%% @dirrmtry %%PREFIX%%/etc/periodic/daily @dirrmtry %%PREFIX%%/etc/periodic -@dirrmtry %%ETCDIR%% >Release-Note: >Audit-Trail: >Unformatted: