From nobody@FreeBSD.org  Thu Sep 23 12:44:54 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 99617106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 23 Sep 2010 12:44:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 6E4E98FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 23 Sep 2010 12:44:54 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o8NCirvM061776
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 23 Sep 2010 12:44:53 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o8NCirTM061775;
	Thu, 23 Sep 2010 12:44:53 GMT
	(envelope-from nobody)
Message-Id: <201009231244.o8NCirTM061775@www.freebsd.org>
Date: Thu, 23 Sep 2010 12:44:53 GMT
From: Alexander Moisseev <moiseev@mezonplus.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] sysutils/backuppc: remove %%RC_SUBR%%, etc.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         150881
>Category:       ports
>Synopsis:       [patch] sysutils/backuppc: remove %%RC_SUBR%%, etc.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 23 12:50:00 UTC 2010
>Closed-Date:    Sat Nov 06 18:56:26 UTC 2010
>Last-Modified:  Sat Nov  6 19:00:17 UTC 2010
>Originator:     Alexander Moisseev
>Release:        
>Organization:
>Environment:
>Description:
files/backuppc.in:
- %%RC_SUBR%% macro replaced with "/etc/rc.subr" because of desupport for the RC_SUBR in bsd.port.mk.

pkg-plist:
- %%ETCDIR%%/hosts and %%ETCDIR%%/config.pl shouldn't be removed automatically during deinstallation because they are actual config files, not examples. This files dynamically created by complicated configuration process at installation time and may be automatically modified during upgrade.

Makefile:
- Removed unnecessary intermediate directory in BPC_DATADIR path.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN backuppc.orig/Makefile backuppc/Makefile
--- backuppc.orig/Makefile	2010-09-23 07:44:32.000000000 +0400
+++ backuppc/Makefile	2010-09-23 15:37:20.000000000 +0400
@@ -25,7 +25,7 @@
 GROUPS=		backuppc
 
 BPC_CGIDIR?=	${PREFIX}/www/cgi-bin
-BPC_DATADIR?=	/var/db/data/BackupPC
+BPC_DATADIR?=	/var/db/BackupPC
 
 PORTDOCS=	ChangeLog LICENSE README BackupPC.html BackupPC.pod
 
diff -ruN backuppc.orig/files/backuppc.in backuppc/files/backuppc.in
--- backuppc.orig/files/backuppc.in	2010-09-23 07:44:32.000000000 +0400
+++ backuppc/files/backuppc.in	2010-09-23 15:35:17.000000000 +0400
@@ -7,7 +7,7 @@
 # Add the following line to /etc/rc.conf to enable BackupPC:
 # backuppc_enable="YES"
 
-. %%RC_SUBR%%
+. /etc/rc.subr
 
 name="backuppc"
 rcvar=`set_rcvar`
diff -ruN backuppc.orig/pkg-plist backuppc/pkg-plist
--- backuppc.orig/pkg-plist	2010-09-23 07:44:32.000000000 +0400
+++ backuppc/pkg-plist	2010-09-23 15:38:25.000000000 +0400
@@ -115,9 +115,6 @@
 %%WWWDIR%%/logo.gif
 %%WWWDIR%%/sorttable.js
 www/cgi-bin/BackupPC_Admin
-%%ETCDIR%%/hosts
-%%ETCDIR%%/config.pl
-@dirrm %%ETCDIR%%
 @dirrmtry www/cgi-bin
 @dirrmtry %%WWWDIR%%
 @dirrmtry share/doc/backuppc
@@ -135,6 +132,6 @@
 @unexec echo
 @unexec echo "	1) the backuppc user/group:	pw userdel backuppc"
 @unexec echo "	2) BackupPC configuration:	rm -rf %%PREFIX%%/%%ETCDIR%%"
-@unexec echo "	3) BackupPC data directory:	rm -rf /data/BackupPC"
+@unexec echo "	3) BackupPC data directory:	rm -rf /var/db/BackupPC"
 @unexec echo "	4) BackupPC logs directory:	rm -rf /var/log/BackupPC"
 @unexec echo


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pgollucci 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Thu Sep 23 17:55:59 UTC 2010 
Responsible-Changed-Why:  
I will take it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150881 
Responsible-Changed-From-To: pgollucci->freebsd-ports-bugs 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Fri Sep 24 06:25:29 UTC 2010 
Responsible-Changed-Why:  
going to have enotime for the next 2 weeks, sorry 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150881 
State-Changed-From-To: open->feedback 
State-Changed-By: pav 
State-Changed-When: Fri Oct 29 12:17:14 UTC 2010 
State-Changed-Why:  
Hi, 

I have committed the changes expect for the pkg-plist change. I cannot agree to 
that change (it would leave files behind on deinstall). Also the configure.pl 
script is not invoked at all when adding from package. 

Maybe you could rework the port to not invoke configure.pl script at all and 
leave it to the administrator as a manual post-install step? 


Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Fri Oct 29 12:17:14 UTC 2010 
Responsible-Changed-Why:  
Track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150881 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/150881: commit references a PR
Date: Fri, 29 Oct 2010 12:28:47 +0000 (UTC)

 pav         2010-10-29 12:28:42 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/backuppc    Makefile 
     sysutils/backuppc/files backuppc.in 
   Log:
   - Fix rc script
   - Change /var/db/ path
   
   PR:             ports/150881
   Submitted by:   Alexander Moisseev <moiseev@mezonplus.ru> (maintainer)
   
   Revision  Changes    Path
   1.2       +2 -1      ports/sysutils/backuppc/Makefile
   1.2       +1 -1      ports/sysutils/backuppc/files/backuppc.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: Alexander Moisseev <moiseev@mezonplus.ru>
To: bug-followup@FreeBSD.org, moiseev@mezonplus.ru
Cc:  
Subject: Re: ports/150881: [patch] sysutils/backuppc: remove %%RC_SUBR%%,
 etc.
Date: Sat, 06 Nov 2010 16:22:11 +0300

 This is a multi-part message in MIME format.
 --------------030502070301040001030701
 Content-Type: text/plain; charset=KOI8-R; format=flowed
 Content-Transfer-Encoding: 7bit
 
 With enclosed patch the port would leave on deinstall only manually copied by administrator config files and configuration backups created during upgrade. Is it OK?
 Actually the configure.pl is complex all-in-one installation, configuration and upgrade script. For this reason packaging not possible without major change of source code.
 Does packaging make sense since the port does not build anything?
 
 --------------030502070301040001030701
 Content-Type: text/plain;
  name="patch.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="patch.diff"
 
 diff -ruN backuppc.orig/Makefile backuppc/Makefile
 --- backuppc.orig/Makefile	2010-10-29 16:28:42.000000000 +0400
 +++ backuppc/Makefile	2010-11-06 14:04:42.000000000 +0300
 @@ -7,7 +7,7 @@
  
  PORTNAME=	backuppc
  PORTVERSION=	3.2.0
 -PORTREVISION=	1
 +PORTREVISION=	2
  CATEGORIES=	sysutils
  MASTER_SITES=	SF
  MASTER_SITE_SUBDIR=	${PORTNAME}/${PORTNAME}/${PORTVERSION}
 @@ -63,6 +63,7 @@
  post-patch:
  	@${REINPLACE_CMD} \
  		-e 's,/etc/BackupPC/config.pl,${ETCDIR}/config.pl,' \
 +		-e 's|Conf{ConfDir}/hosts", 0644)|Conf{ConfDir}/hosts.sample", 0644)|' \
  		${WRKSRC}/configure.pl
  	@${REINPLACE_CMD} \
  		-e 's,"/doc/BackupPC.html","/${DOCSDIR_REL}/BackupPC.html",' \
 @@ -102,8 +103,18 @@
  	@cd ${WRKSRC} && ${INSTALL_MAN} ${PORTDOCS} ${DOCSDIR}
  .endif
  
 +	@${MV} ${ETCDIR}/config.pl ${ETCDIR}/config.pl.sample
 +
  	@${ECHO_MSG}
  	@${ECHO_MSG} ">>> ----------------------------------------------------------"
 +	@${ECHO_MSG} ">>> You need to copy and customize"
 +	@${ECHO_MSG} ">>> # cp -p ${ETCDIR}/config.pl.sample ${ETCDIR}/config.pl"
 +
 +	@if [ ! -f ${ETCDIR}/hosts ]; then \
 +		${ECHO_MSG} ">>> # cp -p ${ETCDIR}/hosts.sample ${ETCDIR}/hosts"; \
 +	fi
 +
 +	@${ECHO_MSG} ">>>"
  	@${ECHO_MSG} ">>> Add the following line to /etc/rc.conf to enable BackupPC:"
  	@${ECHO_MSG} ">>> backuppc_enable=\"YES\""
  	@${ECHO_MSG} ">>>"
 diff -ruN backuppc.orig/distinfo backuppc/distinfo
 --- backuppc.orig/distinfo	2010-09-23 07:44:32.000000000 +0400
 +++ backuppc/distinfo	2010-11-06 13:45:48.000000000 +0300
 @@ -1,3 +1,2 @@
 -MD5 (BackupPC-3.2.0.tar.gz) = 4b77610d8d1130daf0892fc7134be985
  SHA256 (BackupPC-3.2.0.tar.gz) = cbd8e7ac4e0ce5e9c3784c491fcad3cdaf15b3868a3ab4c871748ec402dc9562
  SIZE (BackupPC-3.2.0.tar.gz) = 511394
 diff -ruN backuppc.orig/pkg-plist backuppc/pkg-plist
 --- backuppc.orig/pkg-plist	2010-09-23 07:44:32.000000000 +0400
 +++ backuppc/pkg-plist	2010-11-06 12:18:15.000000000 +0300
 @@ -115,9 +115,9 @@
  %%WWWDIR%%/logo.gif
  %%WWWDIR%%/sorttable.js
  www/cgi-bin/BackupPC_Admin
 -%%ETCDIR%%/hosts
 -%%ETCDIR%%/config.pl
 -@dirrm %%ETCDIR%%
 +@rmtry %%ETCDIR%%/hosts.sample
 +%%ETCDIR%%/config.pl.sample
 +@dirrmtry %%ETCDIR%%
  @dirrmtry www/cgi-bin
  @dirrmtry %%WWWDIR%%
  @dirrmtry share/doc/backuppc
 @@ -135,6 +135,6 @@
  @unexec echo
  @unexec echo "	1) the backuppc user/group:	pw userdel backuppc"
  @unexec echo "	2) BackupPC configuration:	rm -rf %%PREFIX%%/%%ETCDIR%%"
 -@unexec echo "	3) BackupPC data directory:	rm -rf /data/BackupPC"
 +@unexec echo "	3) BackupPC data directory:	rm -rf /var/db/BackupPC"
  @unexec echo "	4) BackupPC logs directory:	rm -rf /var/log/BackupPC"
  @unexec echo
 
 --------------030502070301040001030701--
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Sat Nov 6 18:54:35 UTC 2010 
State-Changed-Why:  
Committed, thanks, this was acceptable.  As for your last question, it's up to 
you, having port if nothing else it gives an user a warning when new version is 
available. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=150881 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/150881: commit references a PR
Date: Sat,  6 Nov 2010 18:55:42 +0000 (UTC)

 pav         2010-11-06 18:55:37 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/backuppc    Makefile distinfo pkg-plist 
   Log:
   - Make this port play nice with leftover config files
   
   PR:             ports/150881
   Submitted by:   Alexander Moisseev <moiseev@mezonplus.ru> (maintainer)
   
   Revision  Changes    Path
   1.3       +12 -2     ports/sysutils/backuppc/Makefile
   1.2       +0 -1      ports/sysutils/backuppc/distinfo
   1.2       +4 -4      ports/sysutils/backuppc/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
