OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: r...@openpkg.org Module: openpkg-src Date: 12-Jul-2009 00:14:24 Branch: HEAD Handle: 2009071123142300 Modified files: openpkg-src/davical davical-apache.conf davical.spec rc.davical Log: add optional SSL support Summary: Revision Changes Path 1.3 +26 -0 openpkg-src/davical/davical-apache.conf 1.6 +31 -6 openpkg-src/davical/davical.spec 1.2 +1 -1 openpkg-src/davical/rc.davical ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/davical/davical-apache.conf ============================================================================ $ cvs diff -u -r1.2 -r1.3 davical-apache.conf --- openpkg-src/davical/davical-apache.conf 11 Jul 2009 20:43:01 -0000 1.2 +++ openpkg-src/davical/davical-apache.conf 11 Jul 2009 22:14:23 -0000 1.3 @@ -8,7 +8,12 @@ ServerTokens Prod User @l_rusr@ Group @l_rgrp@ +<IfDefine !SSL> Listen 127.0.0.1:8080 +</IfDefine> +<IfDefine SSL> +Listen 127.0.0.1:8443 +</IfDefine> # runtime files PidFile @l_prefix@/var/davical/run/apache.pid @@ -43,6 +48,24 @@ ErrorLog @l_prefix@/var/davical/log/apache.error.log ServerSignature on +# SSL/TLS support +<IfDefine SSL> +SSLEngine on +SSLRandomSeed startup builtin +SSLRandomSeed connect builtin +SSLMutex sem +SSLCADNRequestFile @l_prefix@/etc/x509/example-ca.crt.pem +SSLCACertificateFile @l_prefix@/etc/x509/example-ca.crt.pem +SSLCertificateFile @l_prefix@/etc/x509/example-server.crt.pem +SSLCertificateKeyFile @l_prefix@/etc/x509/example-server.key.pem +SSLSessionCache shm:@l_prefix@/var/davical/run/apache.ssl_scache(512000) +SSLSessionCacheTimeout 300 +SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL +SetEnvIf User-Agent ".*MSIE.*" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 +</IfDefine> + # secure root directory <Directory /> Options FollowSymLinks @@ -62,6 +85,9 @@ DocumentRoot @l_prefix@/lib/davical/davical/htdocs DirectoryIndex index.php <Directory @l_prefix@/lib/davical/davical/htdocs> + <IfDefine SSL> + SSLOptions +StdEnvVars + </IfDefine> Options None AllowOverride None Order allow,deny @@ . patch -p0 <<'@@ .' Index: openpkg-src/davical/davical.spec ============================================================================ $ cvs diff -u -r1.5 -r1.6 davical.spec --- openpkg-src/davical/davical.spec 11 Jul 2009 21:12:19 -0000 1.5 +++ openpkg-src/davical/davical.spec 11 Jul 2009 22:14:23 -0000 1.6 @@ -37,7 +37,10 @@ Group: Network License: GPL Version: %{V_opkg} -Release: 20090711 +Release: 20090712 + +# package options +%define with_ssl no # list of sources Source0: http://switch.dl.sourceforge.net/rscds/davical_%{V_davical}.tar.gz @@ -55,6 +58,9 @@ PreReq: OpenPKG, openpkg >= 20060823 PreReq: pcre, pcre::with_utf8 PreReq: apache +%if "%{with_ssl}" == "yes" +PreReq: apache::with_mod_ssl = yes, x509 +%endif PreReq: apache-php PreReq: apache-php::with_pgsql = yes PreReq: apache-php::with_gettext = yes @@ -125,7 +131,13 @@ $RPM_BUILD_ROOT%{l_prefix}/etc/davical/ # install run-command script +%if "%{with_ssl}" == "yes" + with_ssl="-DSSL" +%else + with_ssl="" +%endif %{l_shtool} install -c -m 755 %{l_value -s -a} \ + -e "s;@with_ssl@;$with_ssl;" \ %{SOURCE rc.davical} \ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ @@ -154,15 +166,28 @@ echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc postgresql start" echo " \$ $RPM_INSTALL_PREFIX/sbin/davical-setup install" echo "" - echo "2. By default, DAViCal runs its own Apache server on IPv4 address" - echo " 127.0.0.1, TCP port 8080. Please change this by editing the" - echo " \"Listen 127.0.0.1:8080\" directive in:" + echo "2. By default, DAViCal runs its own SSL/TLS based Apache server" + echo " under 127.0.0.1, TCP port 8443. Please change this by editing" + echo " the \"Listen 127.0.0.1:8443\" directive in:" echo " $RPM_INSTALL_PREFIX/etc/davical/davical-apache.conf" echo "" echo "3. Now start DAViCal by running the command" echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc davical start" - echo " and connect with a CalDAV client to the URL:" - echo " http://127.0.0.1:8080/caldav.php" + echo " and connect with a browser to the URL" +%if "%{with_ssl}" == "yes" + echo " https://127.0.0.1:8443/" +%else + echo " https://127.0.0.1:8080/" +%endif + echo " and create user accounts." + echo "" + echo "4. Now you are able to subscribe to user \"example\"'s \"home\"" + echo " calendar with a CalDAV client through the URL" +%if "%{with_ssl}" == "yes" + echo " https://127.0.0.1:8443/caldav/example/home" +%else + echo " http://127.0.0.1:8080/caldav/example/home" +%endif ) | %{l_rpmtool} msg -b -t notice fi if [ $1 -eq 2 ]; then @@ . patch -p0 <<'@@ .' Index: openpkg-src/davical/rc.davical ============================================================================ $ cvs diff -u -r1.1 -r1.2 rc.davical --- openpkg-src/davical/rc.davical 11 Jul 2009 18:28:41 -0000 1.1 +++ openpkg-src/davical/rc.davical 11 Jul 2009 22:14:23 -0000 1.2 @@ -22,7 +22,7 @@ %start -u @l_susr@ rcService davical enable yes || exit 0 rcService davical active yes && exit 0 - @l_prefix@/sbin/apache \ + @l_prefix@/sbin/apache @with_ssl@ \ -f @l_prefix@/etc/davical/davical-apache.conf %stop -u @l_susr@ @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org