dovecot/dovecot.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 237
76b4896bea63
child 608
09548e292fb1
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.

michael@237 1 Index: configure.in
michael@239 2 diff -Nau configure.in.orig configure.in
michael@237 3 --- configure.in.orig 2009-07-27 07:26:10 +0200
michael@237 4 +++ configure.in 2009-07-27 16:49:17 +0200
michael@239 5 @@ -1964,14 +1964,14 @@
michael@237 6 AC_CHECK_PROG(PG_CONFIG, pg_config, YES, NO)
michael@237 7 if test $PG_CONFIG = NO; then
michael@237 8 # based on code from PHP
michael@237 9 - for i in /usr /usr/local /usr/local/pgsql; do
michael@237 10 - for j in include include/pgsql include/postgres include/postgresql ""; do
michael@237 11 + for i in @l_prefix@; do
michael@237 12 + for j in include/postgresql; do
michael@237 13 if test -r "$i/$j/libpq-fe.h"; then
michael@237 14 PGSQL_INCLUDE=$i/$j
michael@237 15 fi
michael@237 16 done
michael@237 17 - for lib in lib lib64; do
michael@237 18 - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
michael@237 19 + for lib in lib; do
michael@237 20 + for j in $lib; do
michael@237 21 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
michael@237 22 PGSQL_LIBDIR=$i/$j
michael@237 23 fi
michael@204 24 Index: configure
michael@239 25 diff -Nau configure.orig configure
michael@237 26 --- configure.orig 2009-07-27 07:26:28 +0200
michael@237 27 +++ configure 2009-07-27 16:50:02 +0200
michael@239 28 @@ -29410,14 +29410,14 @@
michael@204 29
michael@237 30 if test $PG_CONFIG = NO; then
michael@237 31 # based on code from PHP
michael@237 32 - for i in /usr /usr/local /usr/local/pgsql; do
michael@237 33 - for j in include include/pgsql include/postgres include/postgresql ""; do
michael@237 34 + for i in @l_prefix@; do
michael@237 35 + for j in include/postgresql; do
michael@237 36 if test -r "$i/$j/libpq-fe.h"; then
michael@237 37 PGSQL_INCLUDE=$i/$j
michael@237 38 fi
michael@237 39 done
michael@237 40 - for lib in lib lib64; do
michael@237 41 - for j in $lib $lib/pgsql $lib/postgres $lib/postgresql ""; do
michael@237 42 + for lib in lib; do
michael@237 43 + for j in $lib; do
michael@237 44 if test -f "$i/$j/libpq.so" || test -f "$i/$j/libpq.a"; then
michael@237 45 PGSQL_LIBDIR=$i/$j
michael@237 46 fi
michael@148 47 Index: src/deliver/deliver.c
michael@239 48 diff -Nau src/deliver/deliver.c.orig src/deliver/deliver.c
michael@237 49 --- src/deliver/deliver.c.orig 2009-06-28 01:47:56 +0200
michael@237 50 +++ src/deliver/deliver.c 2009-07-27 16:47:39 +0200
michael@237 51 @@ -46,7 +46,7 @@
michael@148 52 #include <syslog.h>
michael@148 53
michael@148 54 #define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf"
michael@148 55 -#define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail"
michael@148 56 +#define DEFAULT_SENDMAIL_PATH "@l_prefix@/sbin/sendmail"
michael@148 57 #define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON"
michael@148 58
michael@148 59 /* After buffer grows larger than this, create a temporary file to /tmp
michael@239 60 Index: src/master/master-settings.c
michael@239 61 diff -Nau src/master/master-settings.c.orig src/master/master-settings.c
michael@239 62 --- src/master/master-settings.c.orig 2009-05-13 19:32:34.000000000 +0200
michael@239 63 +++ src/master/master-settings.c 2009-05-27 14:29:11.985776641 +0200
michael@239 64 @@ -179,8 +179,8 @@
michael@239 65
michael@239 66 /* general */
michael@239 67 MEMBER(protocols) "imap imaps",
michael@239 68 - MEMBER(listen) "*",
michael@239 69 - MEMBER(ssl_listen) "",
michael@239 70 + MEMBER(listen) "127.0.0.1",
michael@239 71 + MEMBER(ssl_listen) "127.0.0.1",
michael@239 72
michael@239 73 MEMBER(ssl) "yes",
michael@239 74 MEMBER(ssl_ca_file) "",
michael@239 75 @@ -200,7 +200,7 @@
michael@239 76 /* login */
michael@239 77 MEMBER(login_dir) "login",
michael@239 78 MEMBER(login_executable) NULL,
michael@239 79 - MEMBER(login_user) "dovecot",
michael@239 80 + MEMBER(login_user) "@l_musr@",
michael@239 81 MEMBER(login_greeting) PACKAGE_NAME" ready.",
michael@239 82 MEMBER(login_log_format_elements) "user=<%u> method=%m rip=%r lip=%l %c",
michael@239 83 MEMBER(login_log_format) "%$: %s",
michael@239 84 @@ -321,7 +321,7 @@
michael@239 85 MEMBER(anonymous_username) "anonymous",
michael@239 86 MEMBER(krb5_keytab) "",
michael@239 87 MEMBER(gssapi_hostname) "",
michael@239 88 - MEMBER(winbind_helper_path) "/usr/bin/ntlm_auth",
michael@239 89 + MEMBER(winbind_helper_path) "@l_prefix@/bin/ntlm_auth",
michael@239 90 MEMBER(failure_delay) 2,
michael@239 91
michael@239 92 MEMBER(verbose) FALSE,

mercurial