davical/davical.patch

Tue, 29 Mar 2011 20:04:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 20:04:34 +0200
changeset 334
4a34d7a82eab
parent 294
88d9122d2641
child 361
45eaa38991fd
permissions
-rw-r--r--

Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.

The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.

It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.

     1 Index: davical-0.9.9.3/dba/appuser_permissions.txt
     2 --- davical-0.9.9.3/dba/appuser_permissions.txt.orig	2010-04-19 02:32:58.000000000 +0200
     3 +++ davical-0.9.9.3/dba/appuser_permissions.txt	2010-09-21 17:32:46.000000000 +0200
     4 @@ -1,65 +1,69 @@
     5 -#
     6 -# This file is used by update-rscds-database to set the correct
     7 -# permissions for the application user.  In newer installations
     8 -# the application user will probably be called app_davical (and
     9 -# the administrative user will be called dba_davical) but in
    10 -# older installations the application user was called 'general'
    11 -# and the administrative user was probably 'postgres'.
    12 -#
    13 -# See the wiki topic 'Database/Users' for more discussion.
    14 -#
    15 -# This file includes lines like:
    16 -#   GRANT SELECT,...
    17 -# which define what gets granted to the following lines like:
    18 -#   ON table1, table2, sequence1, function 3, view4, ...
    19 -# no user-serviceable parts inside, all whitespace is ignored,
    20 -# your mileage should not vary :-)
    21 -#
    22 +--
    23 +-- This file is used by update-rscds-database to set the correct
    24 +-- permissions for the application user.  In newer installations
    25 +-- the application user will probably be called app_davical (and
    26 +-- the administrative user will be called dba_davical) but in
    27 +-- older installations the application user was called 'general'
    28 +-- and the administrative user was probably 'postgres'.
    29 +--
    30 +-- See the wiki topic 'Database/Users' for more discussion.
    31 +--
    32 +-- This file includes lines like:
    33 +--   GRANT SELECT,...
    34 +-- which define what gets granted to the following lines like:
    35 +--   ON table1, table2, sequence1, function 3, view4, ...
    36 +-- no user-serviceable parts inside, all whitespace is ignored,
    37 +-- your mileage should not vary :-)
    38 +--
    40  GRANT SELECT,INSERT,UPDATE,DELETE
    41 -  ON collection
    42 -  ON caldav_data
    43 -  ON calendar_item
    44 -  ON relationship
    45 -  ON locks
    46 -  ON property
    47 -  ON freebusy_ticket
    48 -  ON usr
    49 -  ON usr_setting
    50 -  ON roles
    51 -  ON role_member
    52 -  ON session
    53 -  ON tmp_password
    54 -  ON group_member
    55 -  ON principal
    56 -  ON relationship_type
    57 -  ON sync_tokens
    58 -  ON sync_changes
    59 -  ON grants
    60 -  ON dav_principal
    61 -  ON access_ticket
    62 -  ON dav_binding
    63 -  ON calendar_alarm
    64 -  ON calendar_attendee
    65 -  ON addressbook_resource
    66 -  ON addressbook_address_adr
    67 -  ON addressbook_address_tel
    68 -  ON addressbook_address_email
    69 +  ON collection,
    70 +     caldav_data,
    71 +     calendar_item,
    72 +     relationship,
    73 +     locks,
    74 +     property,
    75 +     freebusy_ticket,
    76 +     usr,
    77 +     usr_setting,
    78 +     roles,
    79 +     role_member,
    80 +     session,
    81 +     tmp_password,
    82 +     group_member,
    83 +     principal,
    84 +     relationship_type,
    85 +     sync_tokens,
    86 +     sync_changes,
    87 +     grants,
    88 +     dav_principal,
    89 +     access_ticket,
    90 +     dav_binding,
    91 +     calendar_alarm,
    92 +     calendar_attendee,
    93 +     addressbook_resource,
    94 +     addressbook_address_adr,
    95 +     addressbook_address_tel,
    96 +     addressbook_address_email
    97 +  TO davical;
    99  GRANT SELECT,UPDATE
   100 -  ON relationship_type_rt_id_seq
   101 -  ON dav_id_seq
   102 -  ON usr_user_no_seq
   103 -  ON roles_role_no_seq
   104 -  ON session_session_id_seq
   105 -  ON principal_type_principal_type_id_seq
   106 -  ON sync_tokens_sync_token_seq
   107 +  ON relationship_type_rt_id_seq,
   108 +     dav_id_seq,
   109 +     usr_user_no_seq,
   110 +     roles_role_no_seq,
   111 +     session_session_id_seq,
   112 +     principal_type_principal_type_id_seq,
   113 +     sync_tokens_sync_token_seq
   114 +  TO davical;
   116  GRANT SELECT,INSERT
   117    ON time_zone
   118 +  TO davical;
   120  GRANT SELECT
   121 -  ON supported_locales
   122 -  ON awl_db_revision
   123 -  ON principal_type
   124 +  ON supported_locales,
   125 +     awl_db_revision,
   126 +     principal_type
   127 +  TO davical;
   129 Index: davical-0.9.9.3/inc/always.php.in
   130 --- davical-0.9.9.3/inc/always.php.in.orig	2010-09-21 03:40:44.000000000 +0200
   131 +++ davical-0.9.9.3/inc/always.php.in	2010-09-21 18:20:41.000000000 +0200
   132 @@ -117,20 +117,8 @@
   133  * too early.
   134  */
   135  ob_start( );
   136 -if ( @file_exists('/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php') ) {
   137 -  include('/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php');
   138 -}
   139 -else if ( @file_exists('/etc/davical/config.php') ) {
   140 -  include('/etc/davical/config.php');
   141 -}
   142 -else if ( @file_exists('/usr/local/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php') ) {
   143 -  include('/usr/local/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php');
   144 -}
   145 -else if ( @file_exists('/usr/local/etc/davical/config.php') ) {
   146 -  include('/usr/local/etc/davical/config.php');
   147 -}
   148 -else if ( @file_exists('../config/config.php') ) {
   149 -  include('../config/config.php');
   150 +if ( @file_exists("@l_prefix@/etc/davical/davical-config.php") ) {
   151 +  include_once("@l_prefix@/etc/davical/davical-config.php");
   152  }
   153  else if ( @file_exists('config/config.php') ) {
   154    include('config/config.php');
   155 Index: davical-0.9.9.3/dba/views/dav_principal.sql
   156 --- davical-0.9.9.3/dba/views/dav_principal.sql.orig	2010-02-23 11:29:07.000000000 +0100
   157 +++ davical-0.9.9.3/dba/views/dav_principal.sql	2010-11-22 14:33:59.832463699 +0100
   158 @@ -2,7 +2,7 @@
   159  -- record 1:1 with the principal table
   162 -DROP VIEW dav_principal CASCADE;
   163 +DROP VIEW IF EXISTS dav_principal CASCADE;
   164  CREATE OR REPLACE VIEW dav_principal AS
   165    SELECT user_no, usr.active AS user_active, joined AS created, updated AS modified,
   166           username, password, fullname, email,

mercurial