From: cajus Date: Thu, 27 May 2010 13:01:09 +0000 (+0000) Subject: Updated debian stuff, Closes #958 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=60607f1bf90528d8f90ff47584c0cc380f91d6b6;p=gosa.git Updated debian stuff, Closes #958 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18775 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/debian/control b/gosa-core/debian/control index 157c1c800..704bc92ca 100644 --- a/gosa-core/debian/control +++ b/gosa-core/debian/control @@ -5,14 +5,15 @@ Maintainer: GOsa packages maintainers group Uploaders: Cajus Pollmeier , Benoit Mortier Build-Depends: debhelper (>= 5), dpatch Build-Depends-Indep: po-debconf -Standards-Version: 3.8.3 +Standards-Version: 3.8.4 Homepage: https://oss.gonicus.de/labs/gosa/ Vcs-Browser: https://oss.gonicus.de/repositories/gosa/trunk Vcs-Svn: https://oss.gonicus.de/repositories/gosa/trunk +DM-Upload-Allowed: yes Package: gosa Architecture: all -Depends: php5, php5-cli, apache2-mpm-prefork, exim4 | mail-transport-agent, php5-gd, php5-imap, php5-ldap, php5-mhash, php5-mcrypt, php5-mysql, php5-imagick | imagemagick (>= 5.4.4.5-1) | graphicsmagick-im-compat, libcrypt-smbhash-perl, smarty, php5-recode, smarty-gettext, smarty-acl-render, gettext, libapache2-mod-php5, ${misc:Depends} +Depends: php5, php5-cli, apache2-mpm-prefork | lighttpd , exim4 | mail-transport-agent, php5-gd, php5-imap, php5-ldap, php5-mcrypt, php5-mysql, php5-imagick | imagemagick (>= 5.4.4.5-1) | graphicsmagick-im-compat, libcrypt-smbhash-perl, smarty, php5-recode, smarty-gettext, smarty-acl-render, gettext, ${misc:Depends}, libapache2-mod-php5 | php5-cgi Suggests: gosa-si-server, cyrus21-imapd (>= 2.1.11), postfix-ldap, slapd, gosa-schema, php5-suhosin, php-apc, php-fpdf Description: Web Based LDAP Administration Program Provided is access to posix, shadow, samba, proxy, fax, pureftp and diff --git a/gosa-core/debian/gosa-lighttpd.conf b/gosa-core/debian/gosa-lighttpd.conf new file mode 100644 index 000000000..858c65bc2 --- /dev/null +++ b/gosa-core/debian/gosa-lighttpd.conf @@ -0,0 +1,29 @@ +# lighttpd configuration for GOsa + +# Set alias to http:///gosa/ +alias.url += ( + "/gosa/" => "/usr/share/gosa/html/" +) + +# Enable FastCGI and set it to handle .php URLs +# php-cgi is run with the GOsa-required options +server.modules += ( "mod_fastcgi" ) + +$HTTP["url"] =~ "^/gosa/" { + fastcgi.server = ( ".php" => + (( + "bin-path" => "/usr/bin/php-cgi -d expose_php=Off -d magic_quotes_gpc=On", + "socket" => "/tmp/php.socket", + "max-procs" => 2, + "idle-timeout" => 20, + "bin-environment" => ( + "PHP_FCGI_CHILDREN" => "4", + "PHP_FCGI_MAX_REQUESTS" => "10000" + ), + "bin-copy-environment" => ( + "PATH", "SHELL", "USER" + ), + "broken-scriptfilename" => "enable" + )) + ) +} diff --git a/gosa-core/debian/gosa.install b/gosa-core/debian/gosa.install index 1a3408eac..f3bc55e2c 100644 --- a/gosa-core/debian/gosa.install +++ b/gosa-core/debian/gosa.install @@ -7,6 +7,7 @@ locale /usr/share/gosa plugins /usr/share/gosa setup /usr/share/gosa debian/gosa-apache.conf /etc/gosa +debian/gosa-lighttpd.conf /etc/gosa contrib/shells /etc/gosa contrib/encodings /etc/gosa contrib/openldap/slapd.conf /usr/share/doc/gosa/slapd.conf-example diff --git a/gosa-core/debian/gosa.postinst b/gosa-core/debian/gosa.postinst index ae1081d93..6286d073a 100644 --- a/gosa-core/debian/gosa.postinst +++ b/gosa-core/debian/gosa.postinst @@ -30,20 +30,60 @@ if [ ! -f /etc/gosa/gosa.secrets ]; then chmod 600 /etc/gosa/gosa.secrets fi -# Copy GOsa configuration to conf.d directories -if [ ! -L /etc/apache2/conf.d/gosa.conf ]; then - - # Remove old instances of this file - if [ -f /etc/apache2/conf.d/gosa.conf ]; then - echo "Found old gosa apache configuration in /etc/apache2/conf.d - moving it to gosa.conf.orig..." - echo "Please check for changes in /etc/gosa/gosa-apache.conf if you modified this file!" - mv /etc/apache2/conf.d/gosa.conf /etc/apache2/conf.d/gosa.conf.orig +if [ -d /etc/apache2/conf.d ]; then + + # Copy GOsa configuration to conf.d directories + if [ ! -L /etc/apache2/conf.d/gosa.conf ]; then + + # Remove old instances of this file + if [ -f /etc/apache2/conf.d/gosa.conf ]; then + echo "Found old gosa apache configuration in /etc/apache2/conf.d - moving it to gosa.conf.orig..." + echo "Please check for changes in /etc/gosa/gosa-apache.conf if you modified this file!" + mv /etc/apache2/conf.d/gosa.conf /etc/apache2/conf.d/gosa.conf.orig + fi + + echo "Making /gosa available in /etc/apache2/conf.d" + + # Add GOsa include file + ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf.d/gosa.conf + fi + + # Add support for RequestHeader + a2enmod headers + + # Finally restart servers + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d apache2 reload + else + /etc/init.d/apache2 reload + fi +fi + +if [ -d /etc/lighttpd/conf-available ]; then + + # Copy GOsa configuration to conf-available directories /etc/lighttpd/conf-available + if [ ! -L /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ]; then + + # Remove old instances of this file + if [ -f /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ]; then + echo "Found old gosa apache configuration in /etc/lighttpd/conf-enabled - moving it to orig.gosa-lighttpd.conf ..." + echo "Please check for changes in /etc/lighttpd/conf-available/orig.99gosa-lighttpd.conf if you modified this file!" + mv /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf /etc/lighttpd/conf-available/orig.gosa-lighttpd.conf + fi + + echo "Making /gosa available in /etc/lighttpd/conf-enabled/" + + # Add GOsa include file + ln -s /etc/gosa/gosa-lighttpd.conf /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf fi - echo "Making /gosa available in /etc/apache2/conf.d" + # Finally restart servers + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d lighttpd reload + else + /etc/init.d/lighttpd reload + fi - # Add GOsa include file - ln -s /etc/gosa/gosa-apache.conf /etc/apache2/conf.d/gosa.conf fi # Add links for safe mode @@ -61,17 +101,7 @@ chmod 770 -R /var/spool/gosa chown root.$WEBGROUP -R /var/cache/gosa chmod 770 -R /var/cache/gosa -# Add support for RequestHeader -a2enmod headers - update-gosa -# Finally restart servers -if [ -x /usr/sbin/invoke-rc.d ]; then - invoke-rc.d apache2 reload -else - /etc/init.d/apache2 reload -fi - exit 0 diff --git a/gosa-core/debian/gosa.postrm b/gosa-core/debian/gosa.postrm index 12252fa91..6a4a072aa 100644 --- a/gosa-core/debian/gosa.postrm +++ b/gosa-core/debian/gosa.postrm @@ -15,17 +15,30 @@ case "$1" in fi fi - # Remove GOsa include - [ -L /etc/apache2/conf.d/gosa.conf ] && rm -f /etc/apache2/conf.d/gosa.conf + if [ -d /etc/apache2/conf.d ]; then + # Remove GOsa include + [ -L /etc/apache2/conf.d/gosa.conf ] && rm -f /etc/apache2/conf.d/gosa.conf - - # Restart servers - if [ -x /usr/sbin/invoke-rc.d ]; then + # Restart servers + if [ -x /usr/sbin/invoke-rc.d ]; then invoke-rc.d apache2 restart - else + else /etc/init.d/apache2 restart + fi fi + if [ -d /etc/lighttpd/conf-available ]; then + # Remove GOsa include + [ -L /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf ] && rm -f /etc/lighttpd/conf-enabled/99gosa-lighttpd.conf + + # Restart servers + if [ -x /usr/sbin/invoke-rc.d ]; then + invoke-rc.d lighttpd restart + else + /etc/init.d/lighttpd restart + fi + fi + ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)