diff options
author | mm <mm@FreeBSD.org> | 2007-08-02 21:10:49 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2007-08-02 21:10:49 +0800 |
commit | 97abc0302d3b8d47a4749fbd1ebcdb1844af839c (patch) | |
tree | adbedb298c6fe55542fbe213a7cd1f5ec3bca36e /www | |
parent | efcf136a5922b571abd27258a326089ae122e94c (diff) | |
download | freebsd-ports-graphics-97abc0302d3b8d47a4749fbd1ebcdb1844af839c.tar.gz freebsd-ports-graphics-97abc0302d3b8d47a4749fbd1ebcdb1844af839c.tar.zst freebsd-ports-graphics-97abc0302d3b8d47a4749fbd1ebcdb1844af839c.zip |
- Update openacs to 5.3.2
- Depend on devel/tcllib and devel/tcllthread
- Add script for adjusting postgresql.conf
- Improve installation documentation
- Bump dotlrn portrevision
- Other small fixes and improvements
Approved by: garga (mentor, implicit)
Diffstat (limited to 'www')
-rw-r--r-- | www/openacs-dotlrn/Makefile | 3 | ||||
-rw-r--r-- | www/openacs/Makefile | 45 | ||||
-rw-r--r-- | www/openacs/distinfo | 6 | ||||
-rw-r--r-- | www/openacs/files/adjust_pgsql_conf.sh.in | 74 | ||||
-rw-r--r-- | www/openacs/files/create_sampledb.sh.in | 42 | ||||
-rw-r--r-- | www/openacs/files/pkg-deinstall.in | 12 | ||||
-rw-r--r-- | www/openacs/files/pkg-message.in | 32 |
7 files changed, 157 insertions, 57 deletions
diff --git a/www/openacs-dotlrn/Makefile b/www/openacs-dotlrn/Makefile index f92957aa863..0d0de1ec114 100644 --- a/www/openacs-dotlrn/Makefile +++ b/www/openacs-dotlrn/Makefile @@ -6,7 +6,8 @@ # PORTNAME= dotlrn -PORTVERSION= 2.3.0 +DISTVERSION= 2.3.0 +PORTREVISION= 1 MASTER_SITES= http://openacs.org/projects/dotlrn/download/download/ EXTRACT_SUFX= .tgz?revision_id=976988 diff --git a/www/openacs/Makefile b/www/openacs/Makefile index 83552626fb6..dc44c0a1f65 100644 --- a/www/openacs/Makefile +++ b/www/openacs/Makefile @@ -6,20 +6,22 @@ # PORTNAME?= openacs -PORTVERSION?= 5.3.1 +DISTVERSION?= 5-3-2 CATEGORIES= www MASTER_SITES?= http://openacs.org/projects/openacs/download/download/ -EXTRACT_SUFX?= .tgz?revision_id=976463 +EXTRACT_SUFX?= .tgz?revision_id=1098887 MAINTAINER?= mm@FreeBSD.org COMMENT?= A modular web application platform for high traffic communities AOLSERVERBASE?= ${LOCALBASE}/aolserver -RUN_DEPENDS= ${AOLSERVERBASE}/bin/nscache.so:${PORTSDIR}/www/aolserver-nscache \ +TCLLIB_VER?= 1.9 +RUN_DEPENDS+= ${AOLSERVERBASE}/bin/nscache.so:${PORTSDIR}/www/aolserver-nscache \ ${AOLSERVERBASE}/bin/nsopenssl.so:${PORTSDIR}/security/aolserver-nsopenssl \ ${AOLSERVERBASE}/bin/nssha1.so:${PORTSDIR}/security/aolserver-nssha1 \ ${AOLSERVERBASE}/bin/nspostgres.so:${PORTSDIR}/databases/aolserver-nspostgres \ ${AOLSERVERBASE}/modules/tcl/xotcl.tcl:${PORTSDIR}/www/aolserver-xotcl \ + ${LOCALBASE}/lib/tcllib${TCLLIB_VER}/pkgIndex.tcl:${PORTSDIR}/devel/tcllib \ ${LOCALBASE}/lib/tdomConfig.sh:${PORTSDIR}/www/tdom USE_RC_SUBR?= ${PORTNAME} @@ -31,27 +33,39 @@ OPENACS_GROUP?= www PGUSER?= pgsql OPENACSBASE?= ${TARGETDIR}/openacs OPENACSNAME?= OpenACS +SU?= /usr/bin/su +PGREP?= /usr/bin/pgrep +PW?= /usr/sbin/pw BASE_INSTALL?= bin content-repository-content-files log packages tcl www PLIST= ${WRKDIR}/plist.tmp -SUB_LIST+= OPENACS_USER=${OPENACS_USER} OPENACS_GROUP=${OPENACS_GROUP} \ - OPENACSBASE=${OPENACSBASE} OPENACS_DB=${OPENACS_DB} \ - PGUSER=${PGUSER} AOLSERVERBASE=${AOLSERVERBASE} \ - PORTNAME=${PORTNAME} OPENACSNAME=${OPENACSNAME} -SUB_FILES+= pkg-install pkg-deinstall pkg-message openacs dotlrn create_sampledb.sh +SUB_FILES+= pkg-install pkg-deinstall pkg-message ${PORTNAME} \ + create_sampledb.sh adjust_pgsql_conf.sh PKGINSTALL= ${WRKDIR}/pkg-install PKGMESSAGE= ${WRKDIR}/pkg-message PKGDEINSTALL= ${WRKDIR}/pkg-deinstall -.if !defined(NOPORTDOCS) -PORTDOCS= ChangeLog readme.txt license.txt -.endif +PORTDOCS= * + OPTIONS= EXAMPLES "Install various example files" on \ - TCLWEBTEST "Require tclwebteset" on + TCLTHREAD "Depend on tclthread" on \ + TCLWEBTEST "Depend on tclwebteset" on .include <bsd.port.pre.mk> +SUB_LIST+= OPENACS_USER=${OPENACS_USER} OPENACS_GROUP=${OPENACS_GROUP} \ + OPENACSBASE=${OPENACSBASE} OPENACS_DB=${OPENACS_DB} \ + PGUSER=${PGUSER} AOLSERVERBASE=${AOLSERVERBASE} \ + PORTNAME=${PORTNAME} OPENACSNAME=${OPENACSNAME} \ + SU=${SU} PGREP=${PGREP} AWK=${AWK} CP=${CP} GREP=${GREP} \ + PW=${PW} CHOWN=${CHOWN} CHMOD=${CHMOD} + +.if !defined(WITHOUT_TCLTHREAD) +TCLTHREAD_VER?= 2.6.5 +RUN_DEPENDS+= ${LOCALBASE}/lib/thread${TCLTHREAD_VER}/libthread${TCLTHREAD_VER}.so:${PORTSDIR}/devel/tclthread +.endif + .if !defined(WITHOUT_TCLWEBTEST) RUN_DEPENDS+= ${LOCALBASE}/bin/tclwebtest:${PORTSDIR}/www/tclwebtest .endif @@ -75,7 +89,6 @@ pre-install: .if defined(WITH_EXAMPLES) @ ${FIND} ${WRKSRC}/etc ! -type d | \ ${SED} 's|${WRKSRC}/etc|%%EXAMPLESDIR%%|' >> ${PLIST} - @ ${ECHO} %%EXAMPLESDIR%%/create_sampledb.sh >> ${PLIST} @ ${FIND} ${WRKSRC}/etc -type d | \ ${SED} 's|${WRKSRC}/etc|@dirrm %%EXAMPLESDIR%%|' | \ ${SORT} -r >> ${PLIST} @@ -90,16 +103,18 @@ do-install: @ ${ECHO} "Installing examples" @ ${MKDIR} ${EXAMPLESDIR} @ ${TAR} -c -C ${WRKSRC}/etc -f - . | ${TAR} -x -C ${EXAMPLESDIR} -f - - @ ${INSTALL_SCRIPT} ${WRKDIR}/create_sampledb.sh ${EXAMPLESDIR} .endif @ ${ECHO} "Installing sample configuration file" @ ${INSTALL_DATA} ${WRKDIR}/openacs-config.tcl ${OPENACSBASE}/etc/${PORTNAME}-config.tcl .if !defined(NOPORTDOCS) @ ${ECHO} "Installing docs" @ ${MKDIR} ${DOCSDIR} -.for FILE in ${PORTDOCS} +.for FILE in ChangeLog readme.txt license.txt @ ${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} .endfor +.for FILE in create_sampledb.sh adjust_pgsql_conf.sh + @ ${INSTALL_SCRIPT} ${WRKDIR}/${FILE} ${DOCSDIR} +.endfor .endif @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} diff --git a/www/openacs/distinfo b/www/openacs/distinfo index 591ce85a83e..cd98bec1390 100644 --- a/www/openacs/distinfo +++ b/www/openacs/distinfo @@ -1,3 +1,3 @@ -MD5 (openacs-5.3.1.tgz?revision_id=976463) = 59146d2da5a5fbcb5cc9a1728920de52 -SHA256 (openacs-5.3.1.tgz?revision_id=976463) = 7048000a3e7fbb5e622aacfb48caf9466bec3a63548c67dfce6cf90dd1719e03 -SIZE (openacs-5.3.1.tgz?revision_id=976463) = 7499906 +MD5 (openacs-5-3-2.tgz?revision_id=1098887) = 5f83e9c5b2d9e83c84f78675dd690239 +SHA256 (openacs-5-3-2.tgz?revision_id=1098887) = a59e6aafb92596901f1738b64c461e1091f8e08ffa59a304d29676ac2233de29 +SIZE (openacs-5-3-2.tgz?revision_id=1098887) = 7327073 diff --git a/www/openacs/files/adjust_pgsql_conf.sh.in b/www/openacs/files/adjust_pgsql_conf.sh.in new file mode 100644 index 00000000000..8674e5b9a03 --- /dev/null +++ b/www/openacs/files/adjust_pgsql_conf.sh.in @@ -0,0 +1,74 @@ +#!/bin/sh +# $FreeBSD$ +# +# This script modifies the default "postgresql.conf" in PostgreSQL 8.1 and 8.2 +# installations, to suit the needs of OpenACS / .LRN +# +# Manual instructions: +# http://openacs.org/xowiki/How_to_install_in_Postgres_8.x +# +# Usage: adjust_pgsql_conf.sh [path_to_postgresql.conf] +# +PGUSER=%%PGUSER%% +LOCALBASE=%%LOCALBASE%% +# +AWK=%%AWK%% +CP=%%CP%% +GREP=%%GREP%% +PW=%%PW%% +SU=%%SU%% + +# Check if PostgreSQL version is >= 8.1.0 +if ! `${LOCALBASE}/bin/postmaster -V | ${AWK} -F '[ .]' '{if ($3==8 && $4>=1) {exit 0} else {exit 1}}'`; then + echo "You need PostgreSQL server 8.1 or higher installed." + exit 1 +fi + +# Check if user supplied a path or look for default postgresql.conf +if [ "x${1}" = "x" ]; then + PGCONF=`${PW} usershow ${PGUSER} | ${AWK} -F: '{ print $9 }'`/data/postgresql.conf +else + PGCONF=${1} +fi + +if ! [ -f "${PGCONF}" ]; then + echo "ERROR: no such file: ${PGCONF}"; echo "" + echo "Maybe you use a different datadir or your database is not yet initialized" + echo "You can initialize your database with:" + echo "${LOCALBASE}/etc/rc.d/postgresql initdb"; echo "" + echo "Usage: $0 [path_to_postgresql.conf]" + exit 1 +fi + +# Very simple check if the file is a standard PostgreSQL configuration file +if ! `${GREP} -qe '^# PostgreSQL configuration file' ${PGCONF}`; then + echo "ERROR: ${PGCONF} doesn't appear to be a default PostgreSQL database configuration file" + exit 1 +fi + +echo "Found ${PGCONF}" +echo -n "Checking ... " + +MODIFY=no +MISSING_FROM=no +REGEX_FLAVOR=no +WITH_OIDS=no + +# Check if we need to add anything +if ! `${GREP} -qe '^add_missing_from = on' ${PGCONF}`; then MISSING_FROM=yes; MODIFY=yes; fi +if ! `${GREP} -qe '^regex_flavor = extended' ${PGCONF}`; then REGEX_FLAVOR=yes; MODIFY=yes; fi +if ! `${GREP} -qe '^default_with_oids = on' ${PGCONF}`; then WITH_OIDS=yes; MODIFY=yes; fi + +# Backup file and add configuration lines, if necessary +if [ ${MODIFY} = "no" ]; then + echo "no modifications necessary" +else + echo "needs to be modified" + echo "Backing up old configuration file to ${PGCONF}.bak" + ${CP} -p ${PGCONF} ${PGCONF}.bak + if [ ${MISSING_FROM} = "yes" ]; then echo "add_missing_from = on" >> ${PGCONF}; fi + if [ ${REGEX_FLAVOR} = "yes" ]; then echo "regex_flavor = extended" >> ${PGCONF}; fi + if [ ${WITH_OIDS} = "yes" ]; then echo "default_with_oids = on" >> ${PGCONF}; fi + echo "File successfully modified." + echo "Please restart your PostgreSQL server (if running)." +fi diff --git a/www/openacs/files/create_sampledb.sh.in b/www/openacs/files/create_sampledb.sh.in index 67401e26667..c29987e58dc 100644 --- a/www/openacs/files/create_sampledb.sh.in +++ b/www/openacs/files/create_sampledb.sh.in @@ -9,37 +9,41 @@ OPENACS_USER=%%OPENACS_USER%% OPENACS_DB=%%OPENACS_DB%% LOCALBASE=%%LOCALBASE%% # -PGREP=/usr/bin/pgrep -SU=/usr/bin/su -AWK=/usr/bin/awk +PGREP=%%PGREP%% +SU=%%SU%% +AWK=%%AWK%% CREATEUSERFLAGS="-A -d" # Check if PostgreSQL version is >= 8.1.0 -${LOCALBASE}/bin/postmaster -V | ${AWK} -F '[ .]' '{if ($3==8 && $4>=1) {exit 0} else {exit 1}}' && { -POSTGRESQL81=YES -CREATEUSERFLAGS="-S -R -d" -} +if `${LOCALBASE}/bin/postmaster -V | ${AWK} -F '[ .]' '{if ($3==8 && $4>=1) {exit 0} else {exit 1}}'`; then + POSTGRESQL81=YES + CREATEUSERFLAGS="-S -R -d" +fi -${PGREP} -U ${PGUSER} postgres > /dev/null || { +if ! `${PGREP} -U ${PGUSER} postgres > /dev/null`; then echo "You need PostgreSQL server installed and running." echo "After a fresh install, you need to initialize the database with:" - echo "su - ${PGUSER} -c initdb" + echo "${LOCALBASE}/etc/rc.d/postgresql initdb" echo "Exiting ..." exit 1 -} +fi + echo "Creating PostgreSQL user ${OPENACS_USER} ..." ${SU} -l ${PGUSER} -c "${LOCALBASE}/bin/createuser ${CREATEUSERFLAGS} ${OPENACS_USER}" echo "Creating PostgreSQL database ${OPENACS_DB} ..." ${SU} -l ${OPENACS_USER} -c "${LOCALBASE}/bin/createdb -E UNICODE ${OPENACS_DB}" echo "Registering language plpgsql for database ${OPENACS_DB} ..." ${SU} -l ${PGUSER} -c "${LOCALBASE}/bin/createlang plpgsql ${OPENACS_DB}" -[ "x${POSTGRESQL81}" = "xYES" ] && { -echo "" -echo "**************************** NOTICE ****************************" -echo "You have PostgreSQL 8.1 or greater installed." -echo "Your may need to alter your PostgreSQL configuration." -echo "Please read the instructions under the following URL:" -echo "http://openacs.org/xowiki/How_to_install_in_Postgres_8.x" -echo "****************************************************************" -} + +if [ "x${POSTGRESQL81}" = "xYES" ]; then + echo "" + echo "**************************** NOTICE ****************************" + echo "You have PostgreSQL 8.1 or greater installed." + echo "Your may need to alter your PostgreSQL configuration." + echo "You can do this by running the supplied script:" + echo "%%DOCSDIR%%/adjust_pgqsl_conf.sh"; echo "" + echo "Alternatively you can follow the instructions at:" + echo "http://openacs.org/xowiki/How_to_install_in_Postgres_8.x" + echo "****************************************************************" +fi diff --git a/www/openacs/files/pkg-deinstall.in b/www/openacs/files/pkg-deinstall.in index f7fd9c5ca14..45d415d2b88 100644 --- a/www/openacs/files/pkg-deinstall.in +++ b/www/openacs/files/pkg-deinstall.in @@ -8,12 +8,14 @@ fi OPENACS_USER=%%OPENACS_USER%% OPENACS_GROUP=%%OPENACS_GROUP%% OPENACSBASE=%%OPENACSBASE%% - -if pw usershow "${OPENACS_USER}" 2>/dev/null 1>&2; then - echo "To delete ${OPENACS_USER} user permanently, use 'pw userdel \"${OPENACS_USER}\"'" + +PW=%%PW%% + +if ${PW} usershow "${OPENACS_USER}" 2>/dev/null 1>&2; then + echo "To delete ${OPENACS_USER} user permanently, use '${PW} userdel \"${OPENACS_USER}\"'" fi -if pw usershow "${OPENACS_GROUP}" 2>/dev/null 1>&2; then - echo "To delete ${OPENACS_GROUP} group permanently, use 'pw groupdel \"${OPENACS_GROUP}\"'" +if ${PW} usershow "${OPENACS_GROUP}" 2>/dev/null 1>&2; then + echo "To delete ${OPENACS_GROUP} group permanently, use '${PW} groupdel \"${OPENACS_GROUP}\"'" fi if test -d "${OPENACSBASE}"; then echo "You may need to remove ${OPENACSBASE} manually." diff --git a/www/openacs/files/pkg-message.in b/www/openacs/files/pkg-message.in index ca5b5d2c41b..ba6e712f5b9 100644 --- a/www/openacs/files/pkg-message.in +++ b/www/openacs/files/pkg-message.in @@ -1,19 +1,20 @@ Congratulations! You have just installed %%OPENACSNAME%% -To create a sample default database, you first need a PostgreSQL server -installed and configured on your system. If the PostgreSQL server is started -and running, you can run the script: -%%EXAMPLESDIR%%/create_sampledb.sh - -The create_sampledb.sh script works with the following servers with their -default configurations: -databases/postgresql74-server (7.4.x) -databases/postgresql80-server (8.0.x) - -For PostgreSQL 8.1.x and 8.2.x, the database server configuration -needs to be adjusted. Please visit the following webpage for more information: +You need a PostgreSQL server installed and configured on your (or a on remote) +system. We recommend using the PostgreSQL 8.2.x port located in: +databases/postgresql82-server + +You may need to adjust your PostgreSQL database configuration (for servers +v 8.1.x and higher). This can be done with the following script: +%%DOCSDIR%%/adjust_pgsql_conf.sh + +If you want adjust the database configuration manually, please visit: http://openacs.org/xowiki/How_to_install_in_Postgres_8.x +After your local PostgreSQL server is configured and running, you can create +a default database by running the following script: +%%DOCSDIR%%/create_sampledb.sh + You can start %%OPENACSNAME%% with the startup script: %%LOCALBASE%%/etc/rc.d/%%PORTNAME%% @@ -21,8 +22,8 @@ If you are using another AOLserver on the default port 8000, please change the port number in the configuration file. Default config: %%OPENACSBASE%%/etc/%%PORTNAME%%-config.tcl -Then use your browser to view the welcome page (http://<your-ip>:<port>) -- default port is 8000 and follow the instructions. +Then use your web browser to view the welcome page and follow the instructions. +http://<your-ip>:<port> (default port is 8000) Errors, if any, are in: %%OPENACSBASE%%/log/error.log @@ -30,5 +31,8 @@ Errors, if any, are in: If you want to use keepalive via cron, you might want to look here: %%EXAMPLESDIR%%/keepalive/ +Please visit the following webpage for more information: +http://openacs.org/xowiki/openacs-system-install-freebsd-ports + -Martin Matuska mm@FreeBSD.org |