ports/165587: Fix deskutils/egroupware dependency and configuration problems
Harald Schmalzbauer
freebsd at omnilan.de
Thu Mar 1 16:40:09 UTC 2012
>Number: 165587
>Category: ports
>Synopsis: Fix deskutils/egroupware dependency and configuration problems
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 01 16:40:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Harald Schmalzbauer
>Release: FreeBSD 9.0-STABLE amd64
>Organization:
OmniLAN
>Environment:
System: FreeBSD jadam9s64.cale.wdn.omnilan.net 9.0-STABLE FreeBSD 9.0-STABLE #0: Thu Feb 23 17:02:32 CET 2012 admin at jadam9s64.cale.wdn.omnilan.net:/usr/obj/usr/src/sys/ILZ-S30 amd64
>Description:
Installing the port as it is doesn't allow you to store calendar
entries e.g. (missing php5-zlib). Another show-stopper for SyncML is that
important PHP variables are not set properly with the provided configuration
instruction.
In addition to a corrected apache configuration example, a example
lighttpd configuration is included.
Also some new dependencies for 1.8.002 are added (mcrypt, xmlreader and
optionally TNEF and OpenSSL support (for IMAPs connections e.g.)
>How-To-Repeat:
Go to your ports tree in deskutils/egroupware run a 'make install'
and try to store calendar entries -> doesn't work
Try to connect synchronice vi syncml -> doesn't work (check /eg/rpc.php
with browser to see the problem)
Check eg/setup/, login as config-admin and run check_install.php
There are mcrypt and xmlreader dependencies unsatisfied, also TNEF can be usefull
for the integrated mail client (feliamaial)
Another thing to mention: GD doesn't implicit require x11-libraries, you can define
WITHOUT_X11 in make.conf to keep GD lean. Maybe you want to include that hint /
rework the GD options description.
>Fix:
--- deskutils/egroupware/Makefile 2011-11-29 07:27:46.000000000 +0100
+++ deskutils/egroupware/Makefile 2012-03-01 11:26:57.370740433 +0100
@@ -24,7 +24,7 @@
PEARDIR= ${LOCALBASE}/share/pear
USE_BZIP2= yes
-USE_PHP= session ctype
+USE_PHP= session ctype zlib bz2 mcrypt xmlreader
NO_BUILD= yes
PLIST= ${WRKDIR}/plist
SUB_FILES= pkg-message
@@ -34,6 +34,9 @@
OPTIONS= MYSQL "Use MySQL database" on \
POSTGRE "Use PostgreSQL Database" off \
IMAP "Enable Mail support in eGroupware" on \
+ OSSL "Enable SSL connection support (for IMAP eg.)" on \
+ TNEF "Supports decoding winmail.dat attachments in felamimail" on \
+ ZIP "Enable contact data insertion for O/MS/Libre Office documents." on \
GD "Enable graphic support (needs xorg-libraries)" off \
LDAP "Contacts can be stored using OpenLDAP" off \
MBSTRING "Support for complete UTF-8 charsets" off
@@ -54,6 +57,15 @@
.if defined(WITH_IMAP)
USE_PHP+= imap
.endif
+.if defined(WITH_OSSL)
+USE_PHP+= openssl
+.endif
+.if defined(WITH_TNEF)
+RUN_DEPENDS+= tnef:${PORTSDIR}/converters/tnef
+.endif
+.if defined(WITH_ZIP)
+USE_PHP+= zip
+.endif
.if defined(WITH_GD)
USE_PHP+= gd
.endif
@@ -67,8 +79,17 @@
EG_DATA= www/egdata
EG_DATADIR= ${PREFIX}/www/egdata
+.if defined(NOPORTEXAMPLES)
+PLIST_SUB+= PORTEXAMPLES="@comment "
+.else
+PLIST_SUB+= PORTEXAMPLES="lighttpd_conf.d_fastcgi.conf"
+.endif
+
+
pre-install:
@${FIND} -s -d ${WRKSRC} -type f | ${SED} "s#${WRKSRC}#${EG_DIR}#g" >${PLIST}
+ @${ECHO_CMD} ${EG_DIR}/php.ini >> ${PLIST}
+ @${ECHO_CMD} ${EG_DIR}/php.ini-syncml >> ${PLIST}
@${FIND} -s -d ${WRKSRC} -type d | ${SED} "s#${WRKSRC}#@dirrm ${EG_DIR}#g" >> ${PLIST}
@${ECHO} @dirrm ${EG_DATA}/files >> ${PLIST}
@${ECHO} @dirrm ${EG_DATA}/backup >> ${PLIST}
@@ -77,11 +98,12 @@
do-install:
${MKDIR} ${EG_WWWDIR}
@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${EG_WWWDIR}
- @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${EG_WWWDIR}
- @${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${EG_WWWDIR}' \
- >> ${TMPPLIST}
- ${CHMOD} -R 755 ${EG_WWWDIR}
- @${ECHO_CMD} '@exec ${CHMOD} -R 755 ${EG_WWWDIR}' >> ${TMPPLIST}
+ ${INSTALL_DATA} ${FILESDIR}/php.ini ${EG_WWWDIR}
+ ${INSTALL_DATA} ${FILESDIR}/php.ini-syncml ${EG_WWWDIR}
+ ${CHMOD} -R 644 ${EG_WWWDIR}
+ ${CHMOD} -R +X ${EG_WWWDIR}
+ @${ECHO_CMD} '@exec ${CHMOD} -R 644 ${EG_WWWDIR}' >> ${TMPPLIST}
+ @${ECHO_CMD} '@exec ${CHMOD} -R +X ${EG_WWWDIR}' >> ${TMPPLIST}
${MKDIR} ${EG_DATADIR}
${MKDIR} ${EG_DATADIR}/files
@@ -89,8 +111,14 @@
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${EG_DATADIR}
@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${EG_DATADIR}' \
>> ${TMPPLIST}
- ${CHMOD} -R 755 ${EG_DATADIR}
- @${ECHO_CMD} '@exec ${CHMOD} -R 755 ${EG_DATADIR}' >> ${TMPPLIST}
+ ${CHMOD} -R 751 ${EG_DATADIR}
+ @${ECHO_CMD} '@exec ${CHMOD} -R 751 ${EG_DATADIR}' >> ${TMPPLIST}
+.if !defined(NOPORTEXAMPLES)
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${FILESDIR}/lighttpd_conf.d_fastcgi.conf ${EXAMPLESDIR}/
+# @${ECHO_CMD} ${EXAMPLESDIR}/egroupware/lighttpd_conf.d_fastcgi.conf >> ${TMPPLIST}
+.endif
+
post-install:
${CAT} ${PKGMESSAGE}
--- deskutils/egroupware/files/pkg-message.in 2008-11-29 21:25:51.000000000 +0100
+++ deskutils/egroupware/files/pkg-message.in 2012-03-01 11:20:10.941964823 +0100
@@ -3,29 +3,26 @@
Make sure in your php.ini session.save_path='/tmp' is writable
-upload_max_filesize >= 8M
+(or use suggestions as in %%EXAMPLESDIR%%, where path
+is set to %%EG_DATA%%/tmp)
1) Create a user and a database for eGroupware to store all
its tables in (or choose an existing database).
It doesn't matter what the database or user names are,
as this will be configured in a later step.
-2) Add the following to your Apache configuration, and
- restart the server:
-
- ### Add the AcceptPathInfo directive only for Apache 2.0.30 or later.
- Alias /eg %%PREFIX%%/%%EG_DIR%%/
- AcceptPathInfo On
- <Directory %%PREFIX%%/%%EG_DIR%%>
- AllowOverride None
- Order Allow,Deny
- Allow from all
- </Directory>
- <Directory %%PREFIX%%/%%EG_DATA%%>
- AllowOverride None
- Order Allow,Deny
- Deny from all
- </Directory>
+2) Check %%EXAMPLESDIR%% for apache and lighttpd configuration examples.
+ For apache, the Fast-CGI interface with mod_fcgid is supported, along
+ with the legacy mod_php module (you have to define the .php handler
+ with mod_php yourself as usual)
+ It's reccomended not to use .htaccess, instead PHP_VALUE are adjusted
+ by php.ini inside %%EG_WWWDIR%%
+
+ For lighttpd, there's only Fast-CGI with spawn-fcgi and no .htaccess
+
+ For both webservers, a specail PHP-environment hack is included,
+ to make SyncML working. If you don't use SyncML, you can remove the
+ extra "FcgidWrapper"/"bin-path".
3) Visit your eGroupware site with a browser (i.e.,
http://your.server.com/eg/), and you should
@@ -40,6 +37,6 @@
For more information, see the INSTALL DOCUMENTATION:
-http://www.egroupware.org/index.php?page_name=wiki&lang=&wikipage=ManualSetup
+http://community.egroupware.org/index.php?page_name=wiki&lang=&wikipage=ManualSetup
======================================================
--- /dev/null 2012-03-01 17:22:00.000000000 +0100
+++ deskutils/egroupware/files/apache22_Includes_eg.conf 2012-03-01 11:07:06.625947299 +0100
@@ -0,0 +1,39 @@
+Alias /eg /usr/local/www/eg/
+AcceptPathInfo On
+
+<IfModule fcgid_module>
+ AddHandler fcgid-script .php
+ FcgidInitialEnv PHPRC "/usr/local/www/egroupware"
+ FcgidWrapper "/usr/local/bin/php-cgi" .php
+</IfModule>
+
+<Directory "/usr/local/www/eg">
+ DirectoryIndex index.php
+ <IfModule php5_module>
+ AllowOverride Options FileInfo
+ php_admin_value session.save_path /usr/local/www/egdata/tmp/sessions
+ </IfModule>
+ <IfModule fcgid_module>
+ AllowOverride None
+ Options +ExecCGI
+ </IfModule>
+ Order Allow,Deny
+ Allow from all
+</Directory>
+
+<Directory /usr/local/www/egdata>
+ AllowOverride None
+ Order Allow,Deny
+ Deny from all
+</Directory>
+
+<Location "/rpc.php">
+ <IfModule php5_module>
+ php_admin_value mbstring.func_overload 0
+ </IfModule>
+ <IfModule fcgid_module>
+ FcgidWrapper "/usr/local/bin/php-cgi -c /usr/local/www/eg/php.ini-syncml" .php
+ </IfModule>
+ Order allow,deny
+ Allow from all
+</Location>
--- /dev/null 2012-03-01 17:22:00.000000000 +0100
+++ deskutils/egroupware/files/lighttpd_conf.d_fastcgi.conf 2012-03-01 10:58:14.828855991 +0100
@@ -0,0 +1,27 @@
+fastcgi.server = ( ".php" =>
+ ( "php-local" =>
+ (
+ "socket" => socket_dir + "/php-fastcgi-1.socket",
+ "bin-path" => "/usr/local/bin/php-cgi",
+ "bin-environment" => (
+ "PHP_FCGI_CHILDREN" => "1",
+ "PHP_FCGI_MAX_REQUESTS" => "10000",
+ "PHPRC" => "/usr/local/www/eg"
+ ),
+ "max-procs" => 1,
+ "broken-scriptfilename" => "enable",
+ )
+ ),
+ )
+$HTTP["url"] =~ "^/rpc.php" {
+ fastcgi.server = ( ".php" =>
+ ( "php-syncml" =>
+ (
+ "socket" => socket_dir + "/php-fastcgi-syncml.socket",
+ "bin-path" => "/usr/local/bin/php-cgi -c /usr/local/www/eg/php.ini-syncml",
+ "max-procs" => 1,
+ "broken-scriptfilename" => "enable",
+ )
+ ),
+ )
+}
--- /dev/null 2012-03-01 17:22:00.000000000 +0100
+++ deskutils/egroupware/files/php.ini 2012-02-29 18:53:07.192654350 +0100
@@ -0,0 +1,26 @@
+[php]
+date.timezone = Europe/Berlin
+session.save_path = /usr/local/www/egdata/tmp/sessions
+
+file_uploads = on
+log_errors = on
+magic_quotes_gpc = off
+magic_quotes_runtime = off
+register_globals = off
+short_open_tag = on
+track_vars = on
+display_errors = on
+# E_ALL & ~E_NOTICE & ~E_STRICT = 8191 - 8 - 2048 = 6135
+error_reporting = 6135
+max_execution_time = 90
+memory_limit = 256M
+session.gc_maxlifetime = 14400
+upload_max_filesize = 64M
+post_max_size = 65M
+# session handling: now the check for expired sessions is done on every 10th session creation
+session.use_trans_sid = Off
+session.gc_probability = 1
+session.gc_divisor = 10
+# multibyte extension: needed for utf-8
+mbstring.func_overload = 7
+
--- /dev/null 2012-03-01 17:22:00.000000000 +0100
+++ deskutils/egroupware/files/php.ini-syncml 2012-02-29 19:47:27.904655207 +0100
@@ -0,0 +1,4 @@
+[php]
+incluce php.ini
+mbstring.func_overload = 0
+
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list