From joris@ladybug2.rmdir.fr  Sun Jun  5 14:31:41 2011
Return-Path: <joris@ladybug2.rmdir.fr>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F1B64106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  5 Jun 2011 14:31:36 +0000 (UTC)
	(envelope-from joris@ladybug2.rmdir.fr)
Received: from ladybug2.rmdir.fr (ladybug2.rmdir.fr [80.247.233.40])
	by mx1.freebsd.org (Postfix) with ESMTP id 92C928FC1C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  5 Jun 2011 14:31:36 +0000 (UTC)
Received: from ladybug2.rmdir.fr (localhost [127.0.0.1])
	by ladybug2.rmdir.fr (8.14.4/8.14.4) with ESMTP id p55DxhYl081644;
	Sun, 5 Jun 2011 15:59:43 +0200 (CEST)
	(envelope-from joris@ladybug2.rmdir.fr)
Received: (from joris@localhost)
	by ladybug2.rmdir.fr (8.14.4/8.14.4/Submit) id p55DxhKt081643;
	Sun, 5 Jun 2011 15:59:43 +0200 (CEST)
	(envelope-from joris)
Message-Id: <201106051359.p55DxhKt081643@ladybug2.rmdir.fr>
Date: Sun, 5 Jun 2011 15:59:43 +0200 (CEST)
From: Joris Dedieu <joris.dedieu@gmail.com>
Reply-To: Joris Dedieu <joris.dedieu@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: joris.dedieu@gmail.com
Subject: [patch] www/red5 remove user data while reinstalling updating
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         157628
>Category:       ports
>Synopsis:       [patch] www/red5 remove user data while reinstalling updating
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    crees
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 05 14:40:06 UTC 2011
>Closed-Date:    Mon Aug 15 06:53:13 UTC 2011
>Last-Modified:  Mon Aug 15 07:00:21 UTC 2011
>Originator:     Joris Dedieu
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD ladybug2.rmdir.fr 8.2-STABLE FreeBSD 8.2-STABLE #9: Sun May 1 19:08:55 CEST 2011 root@ladybug2.rmdir.fr:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
	Reinstalling or updating port www/red5 will remove files in /usr/local/red5/conf and /usr/local/red5/webapps
	witch can contains specific settings or date.
>How-To-Repeat:
	make -C /usr/ports/red5 install clean
	echo "something=important" >> /usr/local/red5/conf/red5.properties
	make -C /usr/ports/red5 deinstall reinstall
	You loose your settings
>Fix:
	New version of the port that install conf and webapps in %%EXAMPLESDIR%%
	and in ${RED5_HOME} only if it's a new installation.
	Files in ${RED5_HOME}/conf and ${RED5_HOME}/webapps are not removed anymore
	by deinstall

--- red5.diff begins here ---
diff -Nru red5.orig/Makefile red5/Makefile
--- red5.orig/Makefile	2011-01-09 23:09:11.000000000 +0100
+++ red5/Makefile	2011-06-05 15:38:37.000000000 +0200
@@ -29,18 +29,29 @@
 	@${REINPLACE_CMD} -e 's/0.0.0.0/127.0.0.1/' ${WRKSRC}/conf/red5.properties
 
 do-install:
-	${MKDIR} ${RED5_HOME}/conf ${RED5_HOME}/lib ${RED5_HOME}/webapps ${RED5_HOME}/log
-	${INSTALL} ${WRKSRC}/boot.jar ${RED5_HOME}
-	${INSTALL} ${WRKSRC}/red5.jar ${RED5_HOME}
-	(cd ${WRKSRC}/conf && ${COPYTREE_SHARE} \* ${RED5_HOME}/conf)
-	(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} \* ${RED5_HOME}/lib)
-	(cd ${WRKSRC}/webapps && ${COPYTREE_SHARE} \* ${RED5_HOME}/webapps)
+	@${MKDIR} ${RED5_HOME}/lib ${RED5_HOME}/log
+	@${MKDIR} ${EXAMPLESDIR}/conf ${EXAMPLESDIR}/webapps
+	@${INSTALL} ${WRKSRC}/boot.jar ${RED5_HOME}
+	@${INSTALL} ${WRKSRC}/red5.jar ${RED5_HOME}
+	@(cd ${WRKSRC}/lib && ${COPYTREE_SHARE} \* ${RED5_HOME}/lib)
+	@(cd ${WRKSRC}/conf && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/conf)
+	@(cd ${WRKSRC}/webapps && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/webapps)
+	@if [ ! -d ${RED5_HOME}/conf ] ; then \
+		${MKDIR} ${RED5_HOME}/conf && \
+		cd ${WRKSRC}/conf && ${COPYTREE_SHARE} \* ${RED5_HOME}/conf ;\
+		else ${ECHO_MSG}  "New config files are intalled in ${EXAMPLESDIR}/conf" ;\
+	fi
+	@if [ ! -d ${RED5_HOME}/webapps ] ; then \
+		${MKDIR} ${RED5_HOME}/webapps && \
+		cd ${WRKSRC}/webapps && ${COPYTREE_SHARE} \* ${RED5_HOME}/webapps ;\
+		else ${ECHO_MSG}  "Sample webapps are installed in ${EXAMPLESDIR}/conf" ;\
+	fi
 	${CHOWN} -R  ${RED5_USER}:${RED5_GRP} ${RED5_HOME}
 
 post-install:
 .if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-	(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DOCSDIR})
+	@${MKDIR} ${DOCSDIR}
+	@(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DOCSDIR})
 .endif
 	@${ECHO_CMD} '@exec ${CHOWN} -R ${RED5_USER}:${RED5_GRP} ${RED5_HOME}' \
 		>> ${TMPPLIST}
diff -Nru red5.orig/pkg-plist red5/pkg-plist
--- red5.orig/pkg-plist	2010-11-18 14:50:50.000000000 +0100
+++ red5/pkg-plist	2011-06-05 15:37:03.000000000 +0200
@@ -1,45 +1,5 @@
 @stopdaemon red5
 red5/boot.jar
-red5/conf/Red5_SMF.xml
-red5/conf/access.properties
-red5/conf/build_standalone.properties
-red5/conf/catalina.policy
-red5/conf/context.xml
-red5/conf/ehcache.xml
-red5/conf/keystore
-red5/conf/keystore.jmx
-red5/conf/log4j.properties
-red5/conf/logback.xml
-red5/conf/password.properties
-red5/conf/quartz.properties
-red5/conf/realm.properties
-red5/conf/red5-common.xml
-red5/conf/red5-core.xml
-red5/conf/red5-edge-core.xml
-red5/conf/red5-edge.xml
-red5/conf/red5-origin-core.xml
-red5/conf/red5-origin.xml
-red5/conf/red5.globals
-red5/conf/red5.policy
-red5/conf/red5.properties
-red5/conf/red5.properties.bak
-red5/conf/red5.xml
-red5/conf/tomcat-users.xml
-red5/conf/truststore.jmx
-red5/conf/war/README.txt
-red5/conf/war/beanRefContext.xml
-red5/conf/war/build_war.properties
-red5/conf/war/context.xml
-red5/conf/war/defaultContext.xml
-red5/conf/war/logback.xml
-red5/conf/war/red5-common.xml
-red5/conf/war/red5-core.xml
-red5/conf/war/red5-web.properties
-red5/conf/war/red5.properties
-red5/conf/war/root-context.xml
-red5/conf/war/root-web.xml
-red5/conf/war/web.xml
-red5/conf/web.xml
 red5/lib/antlr-3.1.3.jar
 red5/lib/asm-3.1.jar
 red5/lib/asm-commons-3.1.jar
@@ -84,65 +44,120 @@
 red5/lib/xercesImpl-2.9.1.jar
 red5/lib/xmlrpc-2.0.1.jar
 red5/red5.jar
-red5/webapps/installer/AC_OETags.js
-red5/webapps/installer/WEB-INF/red5-web.properties
-red5/webapps/installer/WEB-INF/red5-web.xml
-red5/webapps/installer/WEB-INF/web.xml
-red5/webapps/installer/history/history.css
-red5/webapps/installer/history/history.js
-red5/webapps/installer/history/historyFrame.html
-red5/webapps/installer/index.html
-red5/webapps/installer/installer.swf
-red5/webapps/installer/playerProductInstall.swf
-red5/webapps/red5-default.xml
-red5/webapps/root/WEB-INF/red5-web.properties
-red5/webapps/root/WEB-INF/red5-web.xml
-red5/webapps/root/WEB-INF/web.xml
-red5/webapps/root/biglogo.png
-red5/webapps/root/crossdomain.xml
-red5/webapps/root/demos/BallControl.html
-red5/webapps/root/demos/BallControl.swf
-red5/webapps/root/demos/DevNotes_NetConnection.swf
-red5/webapps/root/demos/FITCPresentation.swf
-red5/webapps/root/demos/FITCSpeakerBroadcaster.swf
-red5/webapps/root/demos/MessageRecorder.swf
-red5/webapps/root/demos/RemotingTest.swf
-red5/webapps/root/demos/SimpleChat.html
-red5/webapps/root/demos/SimpleChat.swf
-red5/webapps/root/demos/adminPanel.air
-red5/webapps/root/demos/adminPanel.html
-red5/webapps/root/demos/adminPanel.swf
-red5/webapps/root/demos/assets/expressInstall.swf
-red5/webapps/root/demos/assets/swfobject.js
-red5/webapps/root/demos/bwcheck.html
-red5/webapps/root/demos/bwcheck.swf
-red5/webapps/root/demos/echo_test.html
-red5/webapps/root/demos/echo_test.swf
-red5/webapps/root/demos/index.html
-red5/webapps/root/demos/ofla_demo.html
-red5/webapps/root/demos/ofla_demo.swf
-red5/webapps/root/demos/othello.swf
-red5/webapps/root/demos/port_tester.html
-red5/webapps/root/demos/port_tester.swf
-red5/webapps/root/demos/publisher.html
-red5/webapps/root/demos/publisher.swf
-red5/webapps/root/demos/simpleBroadcaster.html
-red5/webapps/root/demos/simpleBroadcaster.swf
-red5/webapps/root/demos/simpleRecorder.html
-red5/webapps/root/demos/simpleRecorder.swf
-red5/webapps/root/demos/simpleSubscriber.html
-red5/webapps/root/demos/simpleSubscriber.swf
-red5/webapps/root/demos/videoConference.html
-red5/webapps/root/demos/videoConference.swf
-red5/webapps/root/demos/videoConference_Flash7.swf
-red5/webapps/root/demos/xray.swf
-red5/webapps/root/demos/xrayConnector_1.6.1.swf
-red5/webapps/root/demos/xrayconnector.swf
-red5/webapps/root/favicon.ico
-red5/webapps/root/favicon.png
-red5/webapps/root/flvdemo.html
-red5/webapps/root/index.html
-red5/webapps/root/logo.png
+@dirrmtry red5/conf
+@dirrmtry red5/log
+@dirrm red5/lib
+@dirrmtry red5/webapps
+@dirrmtry red5
+%%EXAMPLESDIR%%/conf/Red5_SMF.xml
+%%EXAMPLESDIR%%/conf/access.properties
+%%EXAMPLESDIR%%/conf/build_standalone.properties
+%%EXAMPLESDIR%%/conf/catalina.policy
+%%EXAMPLESDIR%%/conf/context.xml
+%%EXAMPLESDIR%%/conf/ehcache.xml
+%%EXAMPLESDIR%%/conf/keystore
+%%EXAMPLESDIR%%/conf/keystore.jmx
+%%EXAMPLESDIR%%/conf/log4j.properties
+%%EXAMPLESDIR%%/conf/logback.xml
+%%EXAMPLESDIR%%/conf/password.properties
+%%EXAMPLESDIR%%/conf/quartz.properties
+%%EXAMPLESDIR%%/conf/realm.properties
+%%EXAMPLESDIR%%/conf/red5-common.xml
+%%EXAMPLESDIR%%/conf/red5-core.xml
+%%EXAMPLESDIR%%/conf/red5-edge-core.xml
+%%EXAMPLESDIR%%/conf/red5-edge.xml
+%%EXAMPLESDIR%%/conf/red5-origin-core.xml
+%%EXAMPLESDIR%%/conf/red5-origin.xml
+%%EXAMPLESDIR%%/conf/red5.globals
+%%EXAMPLESDIR%%/conf/red5.policy
+%%EXAMPLESDIR%%/conf/red5.properties
+%%EXAMPLESDIR%%/conf/red5.properties.bak
+%%EXAMPLESDIR%%/conf/red5.xml
+%%EXAMPLESDIR%%/conf/tomcat-users.xml
+%%EXAMPLESDIR%%/conf/truststore.jmx
+%%EXAMPLESDIR%%/conf/war/README.txt
+%%EXAMPLESDIR%%/conf/war/beanRefContext.xml
+%%EXAMPLESDIR%%/conf/war/build_war.properties
+%%EXAMPLESDIR%%/conf/war/context.xml
+%%EXAMPLESDIR%%/conf/war/defaultContext.xml
+%%EXAMPLESDIR%%/conf/war/logback.xml
+%%EXAMPLESDIR%%/conf/war/red5-common.xml
+%%EXAMPLESDIR%%/conf/war/red5-core.xml
+%%EXAMPLESDIR%%/conf/war/red5-web.properties
+%%EXAMPLESDIR%%/conf/war/red5.properties
+%%EXAMPLESDIR%%/conf/war/root-context.xml
+%%EXAMPLESDIR%%/conf/war/root-web.xml
+%%EXAMPLESDIR%%/conf/war/web.xml
+%%EXAMPLESDIR%%/conf/web.xml
+%%EXAMPLESDIR%%/webapps/installer/AC_OETags.js
+%%EXAMPLESDIR%%/webapps/installer/WEB-INF/red5-web.properties
+%%EXAMPLESDIR%%/webapps/installer/WEB-INF/red5-web.xml
+%%EXAMPLESDIR%%/webapps/installer/WEB-INF/web.xml
+%%EXAMPLESDIR%%/webapps/installer/history/history.css
+%%EXAMPLESDIR%%/webapps/installer/history/history.js
+%%EXAMPLESDIR%%/webapps/installer/history/historyFrame.html
+%%EXAMPLESDIR%%/webapps/installer/index.html
+%%EXAMPLESDIR%%/webapps/installer/installer.swf
+%%EXAMPLESDIR%%/webapps/installer/playerProductInstall.swf
+%%EXAMPLESDIR%%/webapps/red5-default.xml
+%%EXAMPLESDIR%%/webapps/root/WEB-INF/red5-web.properties
+%%EXAMPLESDIR%%/webapps/root/WEB-INF/red5-web.xml
+%%EXAMPLESDIR%%/webapps/root/WEB-INF/web.xml
+%%EXAMPLESDIR%%/webapps/root/biglogo.png
+%%EXAMPLESDIR%%/webapps/root/crossdomain.xml
+%%EXAMPLESDIR%%/webapps/root/demos/BallControl.html
+%%EXAMPLESDIR%%/webapps/root/demos/BallControl.swf
+%%EXAMPLESDIR%%/webapps/root/demos/DevNotes_NetConnection.swf
+%%EXAMPLESDIR%%/webapps/root/demos/FITCPresentation.swf
+%%EXAMPLESDIR%%/webapps/root/demos/FITCSpeakerBroadcaster.swf
+%%EXAMPLESDIR%%/webapps/root/demos/MessageRecorder.swf
+%%EXAMPLESDIR%%/webapps/root/demos/RemotingTest.swf
+%%EXAMPLESDIR%%/webapps/root/demos/SimpleChat.html
+%%EXAMPLESDIR%%/webapps/root/demos/SimpleChat.swf
+%%EXAMPLESDIR%%/webapps/root/demos/adminPanel.air
+%%EXAMPLESDIR%%/webapps/root/demos/adminPanel.html
+%%EXAMPLESDIR%%/webapps/root/demos/adminPanel.swf
+%%EXAMPLESDIR%%/webapps/root/demos/assets/expressInstall.swf
+%%EXAMPLESDIR%%/webapps/root/demos/assets/swfobject.js
+%%EXAMPLESDIR%%/webapps/root/demos/bwcheck.html
+%%EXAMPLESDIR%%/webapps/root/demos/bwcheck.swf
+%%EXAMPLESDIR%%/webapps/root/demos/echo_test.html
+%%EXAMPLESDIR%%/webapps/root/demos/echo_test.swf
+%%EXAMPLESDIR%%/webapps/root/demos/index.html
+%%EXAMPLESDIR%%/webapps/root/demos/ofla_demo.html
+%%EXAMPLESDIR%%/webapps/root/demos/ofla_demo.swf
+%%EXAMPLESDIR%%/webapps/root/demos/othello.swf
+%%EXAMPLESDIR%%/webapps/root/demos/port_tester.html
+%%EXAMPLESDIR%%/webapps/root/demos/port_tester.swf
+%%EXAMPLESDIR%%/webapps/root/demos/publisher.html
+%%EXAMPLESDIR%%/webapps/root/demos/publisher.swf
+%%EXAMPLESDIR%%/webapps/root/demos/simpleBroadcaster.html
+%%EXAMPLESDIR%%/webapps/root/demos/simpleBroadcaster.swf
+%%EXAMPLESDIR%%/webapps/root/demos/simpleRecorder.html
+%%EXAMPLESDIR%%/webapps/root/demos/simpleRecorder.swf
+%%EXAMPLESDIR%%/webapps/root/demos/simpleSubscriber.html
+%%EXAMPLESDIR%%/webapps/root/demos/simpleSubscriber.swf
+%%EXAMPLESDIR%%/webapps/root/demos/videoConference.html
+%%EXAMPLESDIR%%/webapps/root/demos/videoConference.swf
+%%EXAMPLESDIR%%/webapps/root/demos/videoConference_Flash7.swf
+%%EXAMPLESDIR%%/webapps/root/demos/xray.swf
+%%EXAMPLESDIR%%/webapps/root/demos/xrayConnector_1.6.1.swf
+%%EXAMPLESDIR%%/webapps/root/demos/xrayconnector.swf
+%%EXAMPLESDIR%%/webapps/root/favicon.ico
+%%EXAMPLESDIR%%/webapps/root/favicon.png
+%%EXAMPLESDIR%%/webapps/root/flvdemo.html
+%%EXAMPLESDIR%%/webapps/root/index.html
+%%EXAMPLESDIR%%/webapps/root/logo.png
+@dirrm %%EXAMPLESDIR%%/webapps/root/demos/assets
+@dirrm %%EXAMPLESDIR%%/webapps/root/demos
+@dirrm %%EXAMPLESDIR%%/webapps/root/WEB-INF
+@dirrm %%EXAMPLESDIR%%/webapps/root
+@dirrm %%EXAMPLESDIR%%/webapps/installer/history
+@dirrm %%EXAMPLESDIR%%/webapps/installer/WEB-INF
+@dirrm %%EXAMPLESDIR%%/webapps/installer
+@dirrm %%EXAMPLESDIR%%/webapps
+@dirrm %%EXAMPLESDIR%%/conf/war
+@dirrm %%EXAMPLESDIR%%/conf
 %%PORTDOCS%%%%DOCSDIR%%/api/constant-values.html
 %%PORTDOCS%%%%DOCSDIR%%/api/org/red5/annotations/Anonymous.html
 %%PORTDOCS%%%%DOCSDIR%%/api/org/red5/annotations/DeclarePrivate.html
@@ -1048,16 +1063,4 @@
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/api/org
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/api
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm red5/webapps/root/demos/assets
-@dirrm red5/webapps/root/demos
-@dirrm red5/webapps/root/WEB-INF
-@dirrm red5/webapps/root
-@dirrm red5/webapps/installer/history
-@dirrm red5/webapps/installer/WEB-INF
-@dirrm red5/webapps/installer
-@dirrmtry red5/webapps
-@dirrmtry red5/log
-@dirrm red5/lib
-@dirrm red5/conf/war
-@dirrm red5/conf
-@dirrmtry red5
+
--- red5.diff ends here ---


>Release-Note:
>Audit-Trail:
Class-Changed-From-To: sw-bug->maintainer-update 
Class-Changed-By: edwin 
Class-Changed-When: Sun Jun 5 14:40:21 UTC 2011 
Class-Changed-Why:  
Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool) 

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

From: Olli Hauer <ohauer@FreeBSD.org>
To: bug-followup@FreeBSD.org, joris.dedieu@gmail.com
Cc:  
Subject: Re: ports/157628: [patch] www/red5 remove user data while reinstalling
 updating
Date: Sun, 10 Jul 2011 19:43:15 +0200

 This can be fixed in pkg-plist and in the ports Makefile
 with other methodes.
 
 In ports Makefile:
 
 post-extract:
 	${MV} ${WRKSRC}/config-file ${WRKSRC}/config-file.sample
 
 
 In pkg-plist:
 --- pkg-plist.orig      2011-07-10 19:20:36.000000000 +0200
 +++ pkg-plist   2011-07-10 19:25:45.000000000 +0200
 @@ -21,8 +21,9 @@
  red5/conf/red5-origin.xml
  red5/conf/red5.globals
  red5/conf/red5.policy
 -red5/conf/red5.properties
 -red5/conf/red5.properties.bak
 +@unexec if cmp -s %D/red5/conf/red5.properties.sample
 %D/red5/conf/red5.properties; then rm -f %D/red5/conf/red5.properties; fi
 +red5/conf/red5.properties.sample
 +@exec [ -f %D/red5/conf/red5.properties ] || cp
 %D/red5/conf/red5.properties.sample %D/red5/conf/red5.properties
  red5/conf/red5.xml
  red5/conf/tomcat-users.xml
  red5/conf/truststore.jmx
 @@ -1059,5 +1060,5 @@
  @dirrmtry red5/log
  @dirrm red5/lib
  @dirrm red5/conf/war
 -@dirrm red5/conf
 +@dirrmtry red5/conf
  @dirrmtry red5
 
 
 
 Additional the pkg-plist file of the port should be sorted.
 
 Please install ports-mgmt/genplist and generate a starting
 pkg-plist with this tool!
 
 Example usage:
 $> cd ports/www/red5
 $> make clean
 $> genplist create /tmp
 $> mv pkg-plist pkg-plist.old && mv pkg-plist.new pkg-plist
 
 Now adjust missing settings like @dirrm -> @dirrmtry ..., then
 $> genplist clean
 $> genplist create /tmp
 
 echo foo >> /tmp/red5/conf/red5.properties
 pkg_delete red5...
 
 You will notice your config file is preserved
 
 If you have issues, I'm happy to help and then
 pick up the PR with a good pkg-plist file ;)
 
 --
 Regards,
 olli
State-Changed-From-To: open->feedback 
State-Changed-By: crees 
State-Changed-When: Fri Aug 12 12:23:00 UTC 2011 
State-Changed-Why:  
Hi Joris, Are you OK to work the fixes in that Olli suggested? If you're 
stuck, one of us will help you, just email. 

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

From: Chris Rees <crees@freebsd.org>
To: joris dedieu <joris.dedieu@gmail.com>
Cc: freebsd-ports-bugs@freebsd.org, bug-followup@freebsd.org
Subject: Re: ports/157628: [patch] www/red5 remove user data while
 reinstalling updating
Date: Fri, 12 Aug 2011 17:01:01 +0100

 On 12 August 2011 16:49, joris dedieu <joris.dedieu@gmail.com> wrote:
 > 2011/8/12 =A0<crees@freebsd.org>:
 >> Synopsis: [patch] www/red5 remove user data while reinstalling updating
 >>
 >> State-Changed-From-To: open->feedback
 >> State-Changed-By: crees
 >> State-Changed-When: Fri Aug 12 12:23:00 UTC 2011
 >> State-Changed-Why:
 >> Hi Joris, Are you OK to work the fixes in that Olli suggested? If you're
 >> stuck, one of us will help you, just email.
 >>
 >> http://www.freebsd.org/cgi/query-pr.cgi?pr=3D157628
 >>
 >
 > Hi crees,
 > As there are many files in conf/ and webapps/root, maybe the best way
 > is to install them in %%EXEMPLEDIR%%, make a copy =A0if %D/red5/conf and
 > %D/red5/webapps/root don't exist and remove then only if no
 > modification occurred.
 >
 > Something like :
 >
 > @unexec =A0diff -rq =A0%D/%%EXAMPLESDIR%%/conf %D/red5/conf >/dev/null
 > 2>&1 && rm -fr %D/red5/conf
 > @exec ! =A0[ -d %D/red5/conf =A0-o -L %D/red5/conf =A0] && cp -RP
 > %D/%%EXAMPLESDIR%%/conf %D/red5/conf
 >
 > What do you think about it ?
 >
 > Joris
 
 Hm, something like [1] would probably be easier, or we're going to be
 looking at a monster plist.
 
 I'm happy to adapt that script for your port if you'd like, or you can
 have a play. Let me know!
 
 Chris
 
 [1] http://www.freebsd.org/cgi/cvsweb.cgi/ports/mail/mailscanner/files/pkg-=
 install.in?rev=3D1.1;content-type=3Dtext%2Fx-cvsweb-markup
Responsible-Changed-From-To: freebsd-ports-bugs->crees 
Responsible-Changed-By: crees 
Responsible-Changed-When: Sat Aug 13 08:41:52 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

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

From: Mark Linimon <linimon@lonesome.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157628: [patch] www/red5 remove user data while
 reinstalling updating
Date: Sat, 13 Aug 2011 04:39:47 -0500

 ----- Forwarded message from joris dedieu <joris.dedieu@gmail.com> -----
 
 Date: Fri, 12 Aug 2011 17:49:23 +0200
 From: joris dedieu <joris.dedieu@gmail.com>
 To: crees@freebsd.org
 Cc: freebsd-ports-bugs@freebsd.org
 Subject: Re: ports/157628: [patch] www/red5 remove user data while
 	reinstalling updating
 
 Hi crees,
 As there are many files in conf/ and webapps/root, maybe the best way
 is to install them in %%EXEMPLEDIR%%, make a copy  if %D/red5/conf and
 %D/red5/webapps/root don't exist and remove then only if no
 modification occurred.
 
 Something like :
 
 @unexec  diff -rq  %D/%%EXAMPLESDIR%%/conf %D/red5/conf >/dev/null
 2>&1 && rm -fr %D/red5/conf
 @exec !  [ -d %D/red5/conf  -o -L %D/red5/conf  ] && cp -RP
 %D/%%EXAMPLESDIR%%/conf %D/red5/conf
 
 What do you think about it ?
 
 Joris
 
 ----- End forwarded message -----

From: Chris Rees <chris@bayofrum.net>
To: bug-followup@FreeBSD.org, joris.dedieu@gmail.com
Cc:  
Subject: Re: ports/157628: [patch] www/red5 remove user data while reinstalling
 updating
Date: Sat, 13 Aug 2011 17:02:17 +0100

 The canonical way to do it is to install each config file as a sample in 
 the same dir and copy it over -- copying from EXAMPLESDIR is almost 
 without precedent and not what people generally expect. Note that I'm 
 not saying it's a bad idea :)
 
 I'll have a play with for loops in pkg-plist and let you know.
 
 Chris
 
 -- 
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.
 

From: Chris Rees <chris@bayofrum.net>
To: bug-followup@FreeBSD.org, joris.dedieu@gmail.com
Cc:  
Subject: Re: ports/157628: [patch] www/red5 remove user data while reinstalling
 updating
Date: Sat, 13 Aug 2011 17:33:46 +0100

 Yeah, I thought stuff clever scripts, I wrote code a while ago to make 
 this kind of contortions obsolete, so for now I generated a plist the 
 old-fashioned way (with @unexec cmp stuff) using perl.
 
 I'm putting it through the Tinderbox now, the plist is at [1].
 
 Chris
 
 http://www.bayofrum.net/~crees/patches/red5-plist-big.txt
 
 -- 
 This message has been scanned for viruses and
 dangerous content by MailScanner, and is
 believed to be clean.
 
State-Changed-From-To: feedback->analyzed 
State-Changed-By: crees 
State-Changed-When: Sat Aug 13 19:43:02 UTC 2011 
State-Changed-Why:  
Take for Tinderbox run: 

http://www.bayofrum.net/tb/index.php?action=describe_port&id=1212 

New patch at: 

http://www.bayofrum.net/~crees/patches/www-red5-userdata.diff 

Please let me know if it's OK, and I can commit it if Tinderbox doesn't 
complain :) 

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

From: joris dedieu <joris.dedieu@gmail.com>
To: crees@freebsd.org, bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157628: [patch] www/red5 remove user data while
 reinstalling updating
Date: Sun, 14 Aug 2011 01:31:01 +0200

 2011/8/13  <crees@freebsd.org>:
 > Synopsis: [patch] www/red5 remove user data while reinstalling updating
 >
 > State-Changed-From-To: feedback->analyzed
 > State-Changed-By: crees
 > State-Changed-When: Sat Aug 13 19:43:02 UTC 2011
 > State-Changed-Why:
 > Take for Tinderbox run:
 >
 > http://www.bayofrum.net/tb/index.php?action=describe_port&id=1212
 >
 > New patch at:
 >
 > http://www.bayofrum.net/~crees/patches/www-red5-userdata.diff
 >
 > Please let me know if it's OK, and I can commit it if Tinderbox doesn't
 > complain :)
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=157628
 >
 
 Sounds good to me. As far as I test it doesn't remove user data anymore.
 Joris

From: Chris Rees <crees@freebsd.org>
To: joris dedieu <joris.dedieu@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: ports/157628: [patch] www/red5 remove user data while
 reinstalling updating
Date: Sun, 14 Aug 2011 08:51:09 +0100

 --000e0cd3592ee4b42b04aa72688c
 Content-Type: text/plain; charset=ISO-8859-1
 
 I'll stick a note in UPDATING to back up configurations, because although
 we'll have fixed it, installed packages will still remove the files.
 
 Chris
 
 --000e0cd3592ee4b42b04aa72688c
 Content-Type: text/html; charset=ISO-8859-1
 
 <p>I&#39;ll stick a note in UPDATING to back up configurations, because although we&#39;ll have fixed it, installed packages will still remove the files.</p>
 <p>Chris</p>
 
 --000e0cd3592ee4b42b04aa72688c--
State-Changed-From-To: analyzed->closed 
State-Changed-By: crees 
State-Changed-When: Mon Aug 15 06:53:12 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/157628: commit references a PR
Date: Mon, 15 Aug 2011 06:53:12 +0000 (UTC)

 crees       2011-08-15 06:53:03 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/red5             Makefile pkg-plist 
   Log:
   - Stop clobbering config files on deinstall.
   - Use post-patch for sed rather than pre-install.
   
   PR:             ports/157628
   Submitted by:   Joris Dedieu <joris.dedieu@gmail.com> (maintainer)
   
   Revision  Changes    Path
   1.8       +17 -1     ports/www/red5/Makefile
   1.2       +144 -52   ports/www/red5/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:
