ports/157628: [patch] www/red5 remove user data while reinstalling updating

Joris Dedieu joris.dedieu at gmail.com
Sun Jun 5 14:40:06 UTC 2011


>Number:         157628
>Category:       ports
>Synopsis:       [patch] www/red5 remove user data while reinstalling updating
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 05 14:40:06 UTC 2011
>Closed-Date:
>Last-Modified:
>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 at 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
+ at dirrmtry red5/conf
+ at dirrmtry red5/log
+ at dirrm red5/lib
+ at dirrmtry red5/webapps
+ at 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
+ at dirrm %%EXAMPLESDIR%%/webapps/root/demos/assets
+ at dirrm %%EXAMPLESDIR%%/webapps/root/demos
+ at dirrm %%EXAMPLESDIR%%/webapps/root/WEB-INF
+ at dirrm %%EXAMPLESDIR%%/webapps/root
+ at dirrm %%EXAMPLESDIR%%/webapps/installer/history
+ at dirrm %%EXAMPLESDIR%%/webapps/installer/WEB-INF
+ at dirrm %%EXAMPLESDIR%%/webapps/installer
+ at dirrm %%EXAMPLESDIR%%/webapps
+ at dirrm %%EXAMPLESDIR%%/conf/war
+ at 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%%
- at dirrm red5/webapps/root/demos/assets
- at dirrm red5/webapps/root/demos
- at dirrm red5/webapps/root/WEB-INF
- at dirrm red5/webapps/root
- at dirrm red5/webapps/installer/history
- at dirrm red5/webapps/installer/WEB-INF
- at dirrm red5/webapps/installer
- at dirrmtry red5/webapps
- at dirrmtry red5/log
- at dirrm red5/lib
- at dirrm red5/conf/war
- at dirrm red5/conf
- at dirrmtry red5
+
--- red5.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list