Tue, 29 Mar 2011 20:04:34 +0200
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 ##
2 ## davical-apache.conf -- DAViCal Apache Custom Configuration
3 ##
5 ServerRoot @l_prefix@
6 ServerAdmin root@@l_hostname@.@l_domainname@
7 ServerName @l_hostname@.@l_domainname@
8 ServerTokens Prod
9 User @l_rusr@
10 Group @l_rgrp@
11 <IfDefine !SSL>
12 Listen 127.0.0.1:8080
13 </IfDefine>
14 <IfDefine SSL>
15 Listen 127.0.0.1:8443
16 </IfDefine>
18 # runtime files
19 PidFile @l_prefix@/var/davical/run/apache.pid
20 ScoreBoardFile @l_prefix@/var/davical/run/apache.sb
21 LockFile @l_prefix@/var/davical/run/apache.lck
23 # include apache-php
24 Include @l_prefix@/etc/apache/apache.d/apache-php.conf
26 # server behaviour
27 Timeout 300
28 KeepAlive on
29 MaxKeepAliveRequests 100
30 KeepAliveTimeout 15
31 MinSpareServers 5
32 MaxSpareServers 10
33 StartServers 5
34 MaxClients 15
35 MaxRequestsPerChild 500
36 HostnameLookups off
37 UseCanonicalName on
39 # access logging
40 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
41 LogFormat "%h %l %u %t \"%r\" %>s %b" common
42 LogFormat "%{Referer}i -> %U" referer
43 LogFormat "%{User-agent}i" agent
44 CustomLog @l_prefix@/var/davical/log/apache.access.log common
46 # error logging
47 LogLevel warn
48 ErrorLog @l_prefix@/var/davical/log/apache.error.log
49 ServerSignature on
51 # SSL/TLS support
52 <IfDefine SSL>
53 SSLEngine on
54 SSLRandomSeed startup builtin
55 SSLRandomSeed connect builtin
56 SSLMutex sem
57 SSLCADNRequestFile @l_prefix@/etc/x509/example-ca.crt.pem
58 SSLCACertificateFile @l_prefix@/etc/x509/example-ca.crt.pem
59 SSLCertificateFile @l_prefix@/etc/x509/example-server.crt.pem
60 SSLCertificateKeyFile @l_prefix@/etc/x509/example-server.key.pem
61 SSLSessionCache shm:@l_prefix@/var/davical/run/apache.ssl_scache(512000)
62 SSLSessionCacheTimeout 300
63 SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
64 SetEnvIf User-Agent ".*MSIE.*" \
65 nokeepalive ssl-unclean-shutdown \
66 downgrade-1.0 force-response-1.0
67 </IfDefine>
69 # secure root directory
70 <Directory />
71 Options FollowSymLinks
72 AllowOverride None
73 </Directory>
75 # configure PHP
76 AddType application/x-httpd-php .php
77 php_admin_flag magic_quotes_gpc on
78 php_admin_flag register_globals on
79 php_admin_flag register_argc_argv off
81 # configure DAViCal
82 php_value include_path @l_prefix@/lib/davical/davical/inc:@l_prefix@/lib/davical/awl/inc
83 php_value error_reporting "E_ALL & ~E_NOTICE"
84 php_value default_charset "utf-8"
85 RewriteEngine on
86 RewriteRule ^/caldav/(.*)$ /caldav.php/$1 [PT]
87 DocumentRoot @l_prefix@/lib/davical/davical/htdocs
88 DirectoryIndex index.php
89 <Directory @l_prefix@/lib/davical/davical/htdocs>
90 <IfDefine SSL>
91 SSLOptions +StdEnvVars
92 </IfDefine>
93 Options None
94 AllowOverride None
95 Order allow,deny
96 Allow from all
97 </Directory>