Update to new vendor version and integrate latest package vendor config.

Thu, 01 Dec 2011 13:24:24 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 01 Dec 2011 13:24:24 +0100
changeset 396
610cba0674b9
parent 395
41738a0e98d1
child 397
c98ae03f4266

Update to new vendor version and integrate latest package vendor config.

davical/davical-apache.conf file | annotate | diff | comparison | revisions
davical/davical-setup.sh file | annotate | diff | comparison | revisions
davical/davical.patch file | annotate | diff | comparison | revisions
davical/davical.spec file | annotate | diff | comparison | revisions
     1.1 --- a/davical/davical-apache.conf	Tue Nov 29 18:44:37 2011 +0100
     1.2 +++ b/davical/davical-apache.conf	Thu Dec 01 13:24:24 2011 +0100
     1.3 @@ -79,8 +79,8 @@
     1.4  php_admin_flag    register_argc_argv      off
     1.5  
     1.6  #   configure DAViCal
     1.7 -php_value         include_path            @l_prefix@/lib/davical/davical/inc:@l_prefix@/lib/davical/awl/inc
     1.8 -php_value         error_reporting         "E_ALL & ~E_NOTICE"
     1.9 +php_value         include_path            @l_prefix@/lib/davical/davical/inc:@l_prefix@/lib/davical/davical/htdocs:@l_prefix@/lib/davical/awl/inc
    1.10 +php_value         error_reporting         "E_ALL&~E_NOTICE"
    1.11  php_value         default_charset         "utf-8"
    1.12  RewriteEngine     on
    1.13  RewriteRule       ^/caldav/(.*)$          /caldav.php/$1 [PT]
     2.1 --- a/davical/davical-setup.sh	Tue Nov 29 18:44:37 2011 +0100
     2.2 +++ b/davical/davical-setup.sh	Thu Dec 01 13:24:24 2011 +0100
     2.3 @@ -40,8 +40,10 @@
     2.4          #   create database
     2.5          ( echo "CREATE ROLE $db_user LOGIN ENCRYPTED PASSWORD '$db_pass' NOCREATEDB NOCREATEUSER;"
     2.6            echo "CREATE TABLESPACE $db_name OWNER $db_user LOCATION '$db_dir';"
     2.7 -          echo "CREATE DATABASE $db_name OWNER $db_user TABLESPACE $db_name ENCODING 'SQL_ASCII';"
     2.8 +          echo "CREATE DATABASE $db_name OWNER $db_user TABLESPACE $db_name TEMPLATE template0 ENCODING 'UTF8';"
     2.9          ) | PGPASSWORD="$db_spass" @l_prefix@/bin/psql -q -U "$db_suser" -d "$db_sname" -f-
    2.10 +
    2.11 +        #   ensure PL/PgSQL language is available
    2.12          PGPASSWORD="$db_pass" @l_prefix@/bin/psql -q -U "$db_user" -d "$db_name" \
    2.13              -c "CREATE LANGUAGE plpgsql;"
    2.14  
    2.15 @@ -55,7 +57,11 @@
    2.16          PGPASSWORD="$db_pass" @l_prefix@/bin/psql -q -U "$db_user" -d "$db_name" -A -t \
    2.17              -f "@l_prefix@/lib/davical/davical/dba/base-data.sql" 2>&1 | grep -v NOTICE
    2.18  
    2.19 -        #   create schema 2/2 (from original "update-davical-database" script)
    2.20 +        #   create schema 2/3 (from nowhere, but required by appuser_permissions.txt below)
    2.21 +        PGPASSWORD="$db_pass" @l_prefix@/bin/psql -q -U "$db_user" -d "$db_name" -A -t \
    2.22 +            -f "@l_prefix@/lib/davical/davical/dba/views/dav_principal.sql" 2>&1 | grep -v NOTICE
    2.23 +
    2.24 +        #   create schema 3/3 (from original "update-davical-database" script)
    2.25          PGPASSWORD="$db_pass" @l_prefix@/bin/psql -q -U "$db_user" -d "$db_name" -A -t \
    2.26              -f "@l_prefix@/lib/davical/davical/dba/supported_locales.sql" 2>&1 | grep -v NOTICE
    2.27          PGPASSWORD="$db_pass" @l_prefix@/bin/psql -q -U "$db_user" -d "$db_name" -A -t \
    2.28 @@ -63,8 +69,6 @@
    2.29          PGPASSWORD="$db_pass" @l_prefix@/bin/psql -q -U "$db_user" -d "$db_name" -A -t \
    2.30              -f "@l_prefix@/lib/davical/davical/dba/rrule_functions.sql" 2>&1 | egrep -v '(NOTICE|ERROR)'
    2.31          PGPASSWORD="$db_spass" @l_prefix@/bin/psql -q -U "$db_suser" -d "$db_name" -A -t \
    2.32 -            -f "/opmi/lib/davical/davical/dba/views/dav_principal.sql"
    2.33 -        PGPASSWORD="$db_spass" @l_prefix@/bin/psql -q -U "$db_suser" -d "$db_name" -A -t \
    2.34              -f "@l_prefix@/lib/davical/davical/dba/appuser_permissions.txt" 2>&1 | grep -v NOTICE
    2.35  
    2.36          #   set admin password
    2.37 @@ -73,8 +77,11 @@
    2.38          ;;
    2.39  
    2.40      uninstall )
    2.41 +        #   destroy PL/PgSQL language
    2.42          PGPASSWORD="$db_pass" @l_prefix@/bin/psql -q -U "$db_user" -d "$db_name" \
    2.43              -c "DROP LANGUAGE plpgsql CASCADE;" 2>&1 | grep -v NOTICE
    2.44 +
    2.45 +        #   destroy database
    2.46          ( echo "DROP DATABASE $db_name;"
    2.47            echo "DROP TABLESPACE $db_name;"
    2.48            echo "DROP ROLE $db_user;"
    2.49 @@ -82,6 +89,7 @@
    2.50          ;;
    2.51  
    2.52      edit )
    2.53 +        #   edit database
    2.54          PGPASSWORD="$db_spass" @l_prefix@/bin/psql -U "$db_suser" -d "$db_name"
    2.55          ;;
    2.56  esac
     3.1 --- a/davical/davical.patch	Tue Nov 29 18:44:37 2011 +0100
     3.2 +++ b/davical/davical.patch	Thu Dec 01 13:24:24 2011 +0100
     3.3 @@ -1,7 +1,7 @@
     3.4 -Index: davical-0.9.9.5/dba/appuser_permissions.txt
     3.5 ---- davical-0.9.9.5/dba/appuser_permissions.txt.orig	2010-04-19 02:32:58.000000000 +0200
     3.6 -+++ davical-0.9.9.5/dba/appuser_permissions.txt	2010-09-21 17:32:46.000000000 +0200
     3.7 -@@ -1,65 +1,69 @@
     3.8 +Index: davical-0.9.9.7/dba/appuser_permissions.txt
     3.9 +--- davical-0.9.9.7/dba/appuser_permissions.txt.orig	2011-10-06 11:14:54.000000000 +0200
    3.10 ++++ davical-0.9.9.7/dba/appuser_permissions.txt	2011-10-25 09:45:26.000000000 +0200
    3.11 +@@ -1,66 +1,69 @@
    3.12  -#
    3.13  -# This file is used by update-rscds-database to set the correct
    3.14  -# permissions for the application user.  In newer installations
    3.15 @@ -66,6 +66,9 @@
    3.16  -  ON addressbook_address_adr
    3.17  -  ON addressbook_address_tel
    3.18  -  ON addressbook_address_email
    3.19 +-  ON timezones
    3.20 +-  ON tz_aliases
    3.21 +-  ON tz_localnames
    3.22  +  ON collection,
    3.23  +     caldav_data,
    3.24  +     calendar_item,
    3.25 @@ -93,28 +96,28 @@
    3.26  +     addressbook_resource,
    3.27  +     addressbook_address_adr,
    3.28  +     addressbook_address_tel,
    3.29 -+     addressbook_address_email
    3.30 ++     addressbook_address_email,
    3.31 ++     timezones,
    3.32 ++     tz_aliases,
    3.33 ++     tz_localnames
    3.34  +  TO davical;
    3.35   
    3.36   GRANT SELECT,UPDATE
    3.37 --  ON relationship_type_rt_id_seq
    3.38 +   ON relationship_type_rt_id_seq
    3.39  -  ON dav_id_seq
    3.40  -  ON usr_user_no_seq
    3.41  -  ON roles_role_no_seq
    3.42  -  ON session_session_id_seq
    3.43  -  ON principal_type_principal_type_id_seq
    3.44  -  ON sync_tokens_sync_token_seq
    3.45 -+  ON relationship_type_rt_id_seq,
    3.46 +-  ON timezones_our_tzno_seq
    3.47  +     dav_id_seq,
    3.48  +     usr_user_no_seq,
    3.49  +     roles_role_no_seq,
    3.50  +     session_session_id_seq,
    3.51  +     principal_type_principal_type_id_seq,
    3.52 -+     sync_tokens_sync_token_seq
    3.53 -+  TO davical;
    3.54 - 
    3.55 - GRANT SELECT,INSERT
    3.56 -   ON time_zone
    3.57 ++     sync_tokens_sync_token_seq,
    3.58 ++     timezones_our_tzno_seq
    3.59  +  TO davical;
    3.60   
    3.61   GRANT SELECT
    3.62 @@ -126,10 +129,29 @@
    3.63  +     principal_type
    3.64  +  TO davical;
    3.65   
    3.66 -Index: davical-0.9.9.5/inc/always.php.in
    3.67 ---- davical-0.9.9.5/inc/always.php.in.orig	2010-09-21 03:40:44.000000000 +0200
    3.68 -+++ davical-0.9.9.5/inc/always.php.in	2010-09-21 18:20:41.000000000 +0200
    3.69 -@@ -123,20 +123,8 @@
    3.70 +Index: davical-0.9.9.7/dba/views/dav_principal.sql
    3.71 +--- davical-0.9.9.7/dba/views/dav_principal.sql.orig	2010-02-23 11:29:07.000000000 +0100
    3.72 ++++ davical-0.9.9.7/dba/views/dav_principal.sql	2011-10-25 09:38:48.000000000 +0200
    3.73 +@@ -2,7 +2,6 @@
    3.74 + -- record 1:1 with the principal table
    3.75 + 
    3.76 + 
    3.77 +-DROP VIEW dav_principal CASCADE;
    3.78 + CREATE OR REPLACE VIEW dav_principal AS
    3.79 +   SELECT user_no, usr.active AS user_active, joined AS created, updated AS modified,
    3.80 +          username, password, fullname, email,
    3.81 +Index: davical-0.9.9.7/inc/always.php.in
    3.82 +--- davical-0.9.9.7/inc/always.php.in.orig	2011-09-25 11:04:29.000000000 +0200
    3.83 ++++ davical-0.9.9.7/inc/always.php.in	2011-10-25 09:38:48.000000000 +0200
    3.84 +@@ -58,6 +58,7 @@
    3.85 + $c->images      = $c->base_url . '/images';
    3.86 + 
    3.87 + // Add a default for newly created users
    3.88 ++date_default_timezone_set("UTC");
    3.89 + $c->template_usr = array( 'active' => true,
    3.90 +                           'locale' => 'en_GB',
    3.91 +                           'date_format_type' => 'E',
    3.92 +@@ -125,20 +126,8 @@
    3.93   * too early.
    3.94   */
    3.95   ob_start( );
    3.96 @@ -152,15 +174,3 @@
    3.97   }
    3.98   else if ( @file_exists('config/config.php') ) {
    3.99     include('config/config.php');
   3.100 -Index: davical-0.9.9.5/dba/views/dav_principal.sql
   3.101 ---- davical-0.9.9.5/dba/views/dav_principal.sql.orig	2010-02-23 11:29:07.000000000 +0100
   3.102 -+++ davical-0.9.9.5/dba/views/dav_principal.sql	2010-11-22 14:33:59.832463699 +0100
   3.103 -@@ -2,7 +2,7 @@
   3.104 - -- record 1:1 with the principal table
   3.105 - 
   3.106 - 
   3.107 --DROP VIEW dav_principal CASCADE;
   3.108 -+DROP VIEW IF EXISTS dav_principal CASCADE;
   3.109 - CREATE OR REPLACE VIEW dav_principal AS
   3.110 -   SELECT user_no, usr.active AS user_active, joined AS created, updated AS modified,
   3.111 -          username, password, fullname, email,
     4.1 --- a/davical/davical.spec	Tue Nov 29 18:44:37 2011 +0100
     4.2 +++ b/davical/davical.spec	Thu Dec 01 13:24:24 2011 +0100
     4.3 @@ -22,9 +22,9 @@
     4.4  ##
     4.5  
     4.6  #   package version
     4.7 -%define       V_opkg    0.9.9.5
     4.8 -%define       V_davical 0.9.9.5
     4.9 -%define       V_awl     0.47
    4.10 +%define       V_opkg    0.9.9.7
    4.11 +%define       V_davical 0.9.9.7
    4.12 +%define       V_awl     0.49
    4.13  
    4.14  #   package information
    4.15  Name:         davical
    4.16 @@ -37,7 +37,7 @@
    4.17  Group:        Network
    4.18  License:      GPL
    4.19  Version:      %{V_opkg}
    4.20 -Release:      20110915
    4.21 +Release:      20111130
    4.22  
    4.23  #   package options
    4.24  %define       with_ssl  no
    4.25 @@ -86,7 +86,7 @@
    4.26      prog davical:awl = {
    4.27          version   = %{V_awl}
    4.28          url       = http://debian.mcmillan.net.nz/packages/awl/
    4.29 -        regex     = awl_(__VER__)\.tar\.gz
    4.30 +        regex     = awl-(__VER__)\.tar\.gz
    4.31      }
    4.32  
    4.33  %prep
    4.34 @@ -98,7 +98,11 @@
    4.35          davical-%{V_davical}/scripts/build-always.sh
    4.36  
    4.37  %build
    4.38 -    cd davical-%{V_davical} && %{l_make} %{l_mflags} htdocs/always.php
    4.39 +    ln -s awl-%{V_awl} awl
    4.40 +    ( cd davical-%{V_davical}
    4.41 +      %{l_shtool} subst %{l_value -s -a} inc/always.php.in
    4.42 +      %{l_make} %{l_mflags} htdocs/always.php
    4.43 +    ) || exit $?
    4.44  
    4.45  %install
    4.46      #   remove build cruft
    4.47 @@ -135,7 +139,11 @@
    4.48          $RPM_BUILD_ROOT%{l_prefix}/etc/davical/
    4.49  
    4.50      #   install DAViCal Apache configuration file
    4.51 +    l_hostname=`%{l_shtool} echo -e %h`
    4.52 +    l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
    4.53      %{l_shtool} install -c -m 644 %{l_value -s -a} \
    4.54 +        -e "s;@l_hostname@;$l_hostname;g" \
    4.55 +        -e "s;@l_domainname@;$l_domainname;g" \
    4.56          %{SOURCE davical-apache.conf} \
    4.57          $RPM_BUILD_ROOT%{l_prefix}/etc/davical/
    4.58  
    4.59 @@ -162,7 +170,12 @@
    4.60      #   determine installation files
    4.61      %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
    4.62          %{l_files_std} \
    4.63 -        '%config %{l_prefix}/etc/davical/*' \
    4.64 +        '%config %attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/etc/davical/*' \
    4.65 +        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*' \
    4.66 +        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*/*' \
    4.67 +        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*/*/*' \
    4.68 +        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*/*/*/*' \
    4.69 +        '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/davical/*/*/*/*/*' \
    4.70          '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/davical' \
    4.71          '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/davical/*'
    4.72  
    4.73 @@ -179,9 +192,15 @@
    4.74            echo "     \$ $RPM_INSTALL_PREFIX/bin/openpkg rc postgresql start"
    4.75            echo "     \$ $RPM_INSTALL_PREFIX/sbin/davical-setup install"
    4.76            echo ""
    4.77 +%if "%{with_ssl}" == "yes"
    4.78            echo "2. By default, DAViCal runs its own SSL/TLS based Apache server"
    4.79            echo "   under 127.0.0.1, TCP port 8443. Please change this by editing"
    4.80            echo "   the \"Listen 127.0.0.1:8443\" directive in:"
    4.81 +%else
    4.82 +          echo "2. By default, DAViCal runs its own Apache server"
    4.83 +          echo "   under 127.0.0.1, TCP port 8080. Please change this by editing"
    4.84 +          echo "   the \"Listen 127.0.0.1:8080\" directive in:"
    4.85 +%endif
    4.86            echo "     $RPM_INSTALL_PREFIX/etc/davical/davical-apache.conf"
    4.87            echo ""
    4.88            echo "3. Now start DAViCal by running the command"

mercurial