ports/87089: [maintainer-update] www/openacs: [clean pkg-install.in and file system]

A. Nooitgedagt aldert at nooitgedagt.net
Fri Oct 7 19:40:30 UTC 2005


>Number:         87089
>Category:       ports
>Synopsis:       [maintainer-update] www/openacs: [clean pkg-install.in and file system]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 07 19:40:22 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     A. Nooitgedagt
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
>Environment:
System: FreeBSD therapie.sportmedisch.net 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May  8 10:21:06 UTC
>Description:

- removed home directory of openacs pseudo user (the user remains after deinstall, but no files remain this way)
- moved lines from pkg-install.in to post-config.in (POLA, since post-config is optional)
- textual changes


Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- openacs-5.1.5_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/www/openacs/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	2 Oct 2005 20:36:38 -0000	1.3
+++ Makefile	7 Oct 2005 19:23:48 -0000
@@ -129,12 +129,12 @@
 		| ${SED} -ne 's,^${WRKSRC}, at dirrm ${DATADIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST}
 	@${ECHO_CMD} "@dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,}" >> ${TMPPLIST}
 
-	if [ ${DT} ] ; then \
-	@${MKDIR} ${DTSERVICEBASE} ; \
-	@${TEST} -L ${DTSERVICEBASE}/${OPENACS_USER} || ${LN} -s ${OPENACSBASE}/${OPENACS_USER}/etc/daemontools ${DTSERVICEBASE}/${OPENACS_USER} ; \
-	@${ECHO_CMD} "@cd ${DTSERVICEBASE}" >> ${TMPPLIST} ; \
-	@${ECHO_CMD} "${OPENACS_USER}" >> ${TMPPLIST} ; \
-	@${ECHO_CMD} "@unexec rmdir ${DTSERVICEBASE} 2>&1 > /dev/null || true" >> ${TMPPLIST} ; \
+	@if [ ${DT} ] ; then \
+		${MKDIR} ${DTSERVICEBASE} ; \
+		${TEST} -L ${DTSERVICEBASE}/${OPENACS_USER} || ${LN} -s ${OPENACSBASE}/${OPENACS_USER}/etc/daemontools ${DTSERVICEBASE}/${OPENACS_USER} ; \
+		${ECHO_CMD} "@cd ${DTSERVICEBASE}" >> ${TMPPLIST} ; \
+		${ECHO_CMD} "${OPENACS_USER}" >> ${TMPPLIST} ; \
+		${ECHO_CMD} "@unexec rmdir ${DTSERVICEBASE} 2>&1 > /dev/null || true" >> ${TMPPLIST} ; \
 	fi
 
 	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
Index: files/pkg-install.in
===================================================================
RCS file: /home/ncvs/ports/www/openacs/files/pkg-install.in,v
retrieving revision 1.3
diff -u -r1.3 pkg-install.in
--- files/pkg-install.in	2 Oct 2005 20:36:38 -0000	1.3
+++ files/pkg-install.in	7 Oct 2005 19:23:48 -0000
@@ -59,40 +59,6 @@
 	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
-	echo "You already have OPENACS-entries in .profile (skeleton)"
-else
-	echo "${DIRS}.profile: adding entries" && \
-	echo "# OPENACS-entries in .profile:" >> ${DIRS}.profile && \
-	echo "export PATH=\$$PATH:${PGBASE}/bin" >> ${DIRS}.profile && \
-	echo "export PGDATA=${PGDATA}" >> ${DIRS}.profile && \
-	echo "export LD_LIBRARY_PATH=\$$LD_LIBRARY_PATH:${PGBASE}/lib" >> ${DIRS}.profile && \
-	echo "export PS1=\"<\u-\W>\"" >> ${DIRS}.profile && \
-	echo "export PS2=\"continu>\"" >> ${DIRS}.profile && \
-	echo "export CVSROOT=/cvsroot" >> ${DIRS}.profile && \
-	echo "export EDITOR=emacs" >> ${DIRS}.profile && \
-	echo "# end of OPENACS-entries." >> ${DIRS}.profile
-fi 
-done
-
-if egrep 'OPENACS-entries in rc.conf' ${RCCONF} >/dev/null 2>&1; then
-	echo "You already have OPENACS-entries in ${RCCONF}"
-else
-	echo "${RCCONF}: adding entries" && \
-	echo "# OPENACS-entries in rc.conf:" >> ${RCCONF} && \
-	echo "ldconfig_paths=\"/usr/lib/compat /usr/X11R6/lib ${LOCALBASE}/lib ${PGBASE}/lib ${AOLSERVERBASE}/lib\" " >> ${RCCONF} && \
-	echo "postgresql_enable=\"YES\"" >> ${RCCONF} && \
-	echo "postgresql_data=\"${PGDATA}\"" >> ${RCCONF} && \
-	echo "postgresql_flags=\" -l ${PGDATA}/server.log\"" >> ${RCCONF} && \
-	echo "aolserver_enable=\"YES\"" >> ${RCCONF} && \
-	echo "aolserver_conf=\"${OPENACSBASE}/${OPENACS_USER}/etc/config.tcl\"" >> ${RCCONF} && \
-	echo "aolserver_flags=\"-u ${OPENACS_USER} -g ${OPENACS_GROUP} -b 0.0.0.0:8000\"" >> ${RCCONF} && \
-	echo "aolserver_prog=\"${EXAMPLESDIR}/nsd-postgres\"" >> ${RCCONF} && \
-	echo "# end of OPENACS-entries." >> ${RCCONF}
-fi
-
 if pw group show ${OPENACS_GROUP} >/dev/null 2>&1; then
 	echo "You already have a group \"${OPENACS_GROUP}\", so I will use it."
 else
@@ -103,12 +69,9 @@
 	echo "You already have a user \"${OPENACS_USER}\", so I will use it."
 else
 	pw useradd -n ${OPENACS_USER} -G ${OPENACS_GROUP} -c "OpenACS instance pseudo-user" \
-	-m -s ${LOCALBASE}/bin/bash -h - 
+	-h - 
 fi
 
-	pw usermod nobody -G ${OPENACS_GROUP}
-	pw usermod pgsql -G ${OPENACS_GROUP}
-	pw usermod root -G ${OPENACS_GROUP}
 }
 
 post-install() {
Index: files/post-config.in
===================================================================
RCS file: /home/ncvs/ports/www/openacs/files/post-config.in,v
retrieving revision 1.1
diff -u -r1.1 post-config.in
--- files/post-config.in	1 Aug 2005 13:16:47 -0000	1.1
+++ files/post-config.in	7 Oct 2005 19:23:48 -0000
@@ -16,6 +16,46 @@
 VIRTUALBASE=%%VIRTUALBASE%%
 
 post-install() {
+	echo "Starting post-config changes on your request"
+
+for DIRS in /usr/share/skel/dot
+do
+if egrep 'OPENACS-entries in .profile' ${DIRS}.profile >/dev/null 2>&1; then
+	echo "Notice: there are OPENACS-entries in .profile (skeleton)"
+else
+	echo "Notice: adding OPENACS-entries to ${DIRS}.profile" && \
+	echo "# OPENACS-entries in .profile:" >> ${DIRS}.profile && \
+	echo "export PATH=\$$PATH:${PGBASE}/bin" >> ${DIRS}.profile && \
+	echo "export PGDATA=${PGDATA}" >> ${DIRS}.profile && \
+	echo "export LD_LIBRARY_PATH=\$$LD_LIBRARY_PATH:${PGBASE}/lib" >> ${DIRS}.profile && \
+	echo "export PS1=\"<\u-\W>\"" >> ${DIRS}.profile && \
+	echo "export PS2=\"continu>\"" >> ${DIRS}.profile && \
+	echo "export CVSROOT=/cvsroot" >> ${DIRS}.profile && \
+	echo "export EDITOR=emacs" >> ${DIRS}.profile && \
+	echo "# end of OPENACS-entries." >> ${DIRS}.profile
+fi
+done
+
+if egrep 'OPENACS-entries in rc.conf' ${RCCONF} >/dev/null 2>&1; then
+	echo "Notice: there are OPENACS-entries in ${RCCONF}"
+else
+	echo "Notice: adding OPENACS-entries to ${RCCONF}" && \
+	echo "# OPENACS-entries in rc.conf:" >> ${RCCONF} && \
+	echo "ldconfig_paths=\"/usr/lib/compat /usr/X11R6/lib ${LOCALBASE}/lib ${PGBASE}/lib ${AOLSERVERBASE}/lib\" " >> ${RCCONF} && \
+	echo "postgresql_enable=\"YES\"" >> ${RCCONF} && \
+	echo "postgresql_data=\"${PGDATA}\"" >> ${RCCONF} && \
+	echo "postgresql_flags=\" -l ${PGDATA}/server.log\"" >> ${RCCONF} && \
+	echo "aolserver_enable=\"YES\"" >> ${RCCONF} && \
+	echo "aolserver_conf=\"${OPENACSBASE}/${OPENACS_USER}/etc/config.tcl\"" >> ${RCCONF} && \
+	echo "aolserver_flags=\"-u ${OPENACS_USER} -g ${OPENACS_GROUP} -b 0.0.0.0:8000\"" >> ${RCCONF} && \
+	echo "aolserver_prog=\"${EXAMPLESDIR}/nsd-postgres\"" >> ${RCCONF} && \
+	echo "# end of OPENACS-entries." >> ${RCCONF}
+fi
+
+	echo "adding root and ${PG_USER} to group ${OPENACS_GROUP}"
+	pw usermod ${PG_USER} -G ${OPENACS_GROUP}
+	pw usermod root -G ${OPENACS_GROUP}
+
 	echo "Set permissions of files (post-config)"
 	chown -R :${OPENACS_GROUP} ${AOLSERVERBASE}
 
--- openacs-5.1.5_1.patch ends here ---

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



More information about the freebsd-ports-bugs mailing list