Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Aug 2005 22:06:38 GMT
From:      Aldert Nooitgedagt <aldert@nooitgedagt.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/84595: [patch] www/openacs: difference in port-package behaviour
Message-ID:  <200508052206.j75M6cso045375@www.freebsd.org>
Resent-Message-ID: <200508052210.j75MAFWH023182@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         84595
>Category:       ports
>Synopsis:       [patch] www/openacs: difference in port-package behaviour
>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:   Fri Aug 05 22:10:15 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Aldert Nooitgedagt
>Release:        5.4
>Organization:
>Environment:
FreeBSD freebsd54.localdomain 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May  8 10:21:06 UTC 2005     root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
-removed copying of files outside the port. Added backup check in pkg-install
-moved execution of post-config.sh to pkg-install, so package too will work as expected.
-changed some wording     
>How-To-Repeat:
      
>Fix:
 diff -Nru cvsweb/openacs/Makefile openacs/Makefile
--- cvsweb/openacs/Makefile	Mon Aug  1 15:16:47 2005
+++ openacs/Makefile	Fri Aug  5 20:36:23 2005
@@ -32,11 +32,12 @@
 PKGMESSAGE=	${WRKDIR}/pkg-message
 PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
 .if defined(WITH_POSTCONFIG)
-POSTCONFIG=	${WRKDIR}/post-config
+POSTCONFIG=	true
+PKGNAMESUFFIX= -withconfig
 .endif
 
 SUB_FILES=	pkg-install pkg-message pkg-deinstall post-config
-SUB_LIST+=	RCCONF=${RCCONF} \
+SUB_LIST+=	RCCONF=${RCCONF} POSTCONFIG=${POSTCONFIG} \
 		OPENACSBASE=${OPENACSBASE} OPENACS_GROUP=${OPENACS_GROUP} \
 		OPENACS_USER=${OPENACS_USER} DB=${DB} PGDATA=${PGDATA} \
 		PG_USER=${PG_USER} PGBASE=${PGBASE} \
@@ -82,14 +83,10 @@
 	@${MKDIR} ${EXAMPLESDIR}
 	@${MKDIR} ${OPENACSBASE}
 	@${MKDIR} ${VIRTUALBASE}
-	@ ${MKDIR} ${DTSERVICEBASE}
+	@${MKDIR} ${DTSERVICEBASE}
 
 	@${ECHO_CMD} "Installing files"
-	@if [ ! -d ${OPENACSBASE}/${OPENACS_USER} ] ; then \
-	   ${CP} -R ${WRKSRC} ${OPENACSBASE}/${OPENACS_USER}; else \
-	   ${RM} -Rf ${OPENACSBASE}/${OPENACS_USER}.old && \
-	   ${MV} ${OPENACSBASE}/${OPENACS_USER} ${OPENACSBASE}/${OPENACS_USER}.old && \
-	   ${CP} -R ${WRKSRC} ${OPENACSBASE}/${OPENACS_USER}; fi
+	@${CP} -R ${WRKSRC} ${OPENACSBASE}/${OPENACS_USER}
 
 	@${TEST} -e ${VIRTUALBASE}/aolserver || ${LN} -s ${OPENACSBASE} ${VIRTUALBASE}/aolserver
 	@${TEST} -L ${VIRTUALBASE}/aolserver || ${ECHO_MSG} "${VIRTUALBASE}/aolserver is no symbolic link"
@@ -132,9 +129,6 @@
 	@${ECHO_CMD} "@unexec rmdir ${DTSERVICEBASE} 2>&1 > /dev/null || true" >> ${TMPPLIST}
 
 	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.if defined(WITH_POSTCONFIG)
-	@${SH} ${POSTCONFIG} ${PKGNAME} POST-INSTALL
-.endif
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>
diff -Nru cvsweb/openacs/distinfo openacs/distinfo
--- cvsweb/openacs/distinfo	Mon Aug  1 15:16:47 2005
+++ openacs/distinfo	Fri Aug  5 20:32:15 2005
@@ -1,4 +1,2 @@
 MD5 (openacs-5.1.5.tar.gz) = a86843cb5aaf62d7e1c54b0e69238079
 SIZE (openacs-5.1.5.tar.gz) = 5740656
-MD5 (dotlrn-2.1.1.tar.gz) = f80c93d95c3695d4d89ff0394d7ea6dc
-SIZE (dotlrn-2.1.1.tar.gz) = 7935564
diff -Nru cvsweb/openacs/files/pkg-deinstall.in openacs/files/pkg-deinstall.in
--- cvsweb/openacs/files/pkg-deinstall.in	Mon Aug  1 15:16:47 2005
+++ openacs/files/pkg-deinstall.in	Fri Aug  5 18:51:39 2005
@@ -17,7 +17,7 @@
 		kill $pid
 	fi
 	echo " If no other openACS/.LRN instance needs it, you may want to "
-	echo " delete %%AOLSERVERBASE%% and %%VIRTUALBASE%% manually, "
+	echo " delete %%VIRTUALBASE%%/aolserver and %%VIRTUALBASE%% manually, "
 	echo " and possibly the %%OPENACS_USER%% users and database. "
 	;;
 esac
diff -Nru cvsweb/openacs/files/pkg-install.in openacs/files/pkg-install.in
--- cvsweb/openacs/files/pkg-install.in	Mon Aug  1 15:16:47 2005
+++ openacs/files/pkg-install.in	Fri Aug  5 23:41:26 2005
@@ -14,6 +14,7 @@
 DTSERVICEBASE=%%DTSERVICEBASE%%
 AOLSERVERBASE=%%AOLSERVERBASE%%
 VIRTUALBASE=%%VIRTUALBASE%%
+POSTCONFIG=%%POSTCONFIG%%
 
 pre-install() { echo "
 
@@ -33,13 +34,14 @@
   http://openacs.org/doc/current/upgrade.html
   ===========================================
 
+  To allow post-install configurations, use:
      make install WITH_POSTCONFIG=yes
   
-  to allow post-install configurations 
-  Or run afterwards: 
-  sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL 
+  Or after installation has completed, do: 
+     sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL 
 
-  Advice: stop Aolserver and Postgresql
+  Advice: 
+  stop a running Aolserver and/or Postgresql
   before post-install configuration starts.
 
   Press ctrl-C *NOW* if you need to. 
@@ -48,6 +50,14 @@
 
 sleep 10
 
+if [ -d ${OPENACSBASE}/${OPENACS_USER} ] ; then 
+	echo "WARNING: ${OPENACSBASE}/${OPENACS_USER} already exists !"
+	echo "It may be a valid tree or the result of an aborted previous install"
+	echo "TO CONTINUE: Move it, Delete it or do:"
+	echo "   make install OPENACS_USER=ChooseName < WITH_POSTCONFIG=yes >"
+	echo " "
+	exit 1 ; fi
+
 for DIRS in /usr/share/skel/dot
 do
 if egrep 'OPENACS-entries in .profile' ${DIRS}.profile >/dev/null 2>&1; then
@@ -102,6 +112,14 @@
  
 	chown -R ${OPENACS_USER}:${OPENACS_GROUP} ${OPENACSBASE}/${OPENACS_USER}
 	chown root:${OPENACS_GROUP} ${EXAMPLESDIR}/nsd-postgres ${EXAMPLESDIR}/nsd-oracle
+
+if test "${POSTCONFIG}" = "true" ; then
+	echo "Performing post-config changes"
+	sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL
+else
+	echo "No post-config changes performed"
+	echo "Run sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL later"
+fi
 
 }
 
diff -Nru cvsweb/openacs/files/pkg-message.in openacs/files/pkg-message.in
--- cvsweb/openacs/files/pkg-message.in	Mon Aug  1 15:16:47 2005
+++ openacs/files/pkg-message.in	Fri Aug  5 23:45:30 2005
@@ -2,10 +2,11 @@
 
 Congratulations! You have just installed OpenACS/.LRN
 
-If you didn't  make install WITH_POSTCONFIG=yes
-to allow post-install configurations or run now:
-sh ${EXAMPLESDIR}/post-config.sh XX POST-INSTALL
-Make sure you stop Aolserver and Postgresql 
+If you didn't do make install WITH_POSTCONFIG=yes,
+inspect post-config.sh now and/or run:
+sh %%EXAMPLESDIR%%/post-config.sh XX POST-INSTALL
+If you can, stop Aolserver and Postgresql first
+(killall -9 nsd ; %%PREFIX%%/etc/rc.d/010.pgsql.sh stop) 
 before post-install configuration starts.
 
 Then use your browser to view the welcome page (http://<your-ip>:8000)
@@ -43,17 +44,17 @@
 
 If you want to remove openacs, type "make deinstall" or use pkg_delete
 (pkg_info).
-However, users and database are not removed. At (re)install an existing
-datadirectory with the same name is moved to <name>.old
+However, users and database are not removed.
 
 We use bash as shell in openACS. We didn't change the shells of
 current users like root and pgsql, yet. If you want, do:
 chsh -s %%LOCALBASE%%/bin/bash USERNAME 
 and change its profile by copying the openACS entries from
 /usr/share/skel/dot.profile to  ~/.profile. 
-Than login/out or type ". .profile".
+Then login/out or type ". .profile".
 
-Remember: THIS MESSAGE is in PORTSDIR/www/openacs/pkg-message.
+Remember: THIS MESSAGE is in PORTSDIR/www/openacs/
+files/pkg-message.in or work/pkg-message
 
 -Aldert
 aldert@nooitgedagt.net
     
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508052206.j75M6cso045375>