sasl/rc.sasl

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
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@144 1 #!@l_prefix@/bin/openpkg rc
michael@144 2 ##
michael@144 3 ## rc.sasl -- Run-Commands
michael@144 4 ##
michael@144 5
michael@144 6 %config
michael@144 7 sasl_enable="$openpkg_rc_def"
michael@144 8 sasl_flags=""
michael@144 9 sasl_authmech="@l_authmech@"
michael@144 10 sasl_threads="4"
michael@144 11 sasl_log_prolog="true"
michael@144 12 sasl_log_epilog="true"
michael@144 13 sasl_log_numfiles="10"
michael@144 14 sasl_log_minsize="1M"
michael@144 15 sasl_log_complevel="9"
michael@144 16
michael@144 17 %common
michael@144 18 sasl_pidfile="@l_prefix@/var/sasl/run/saslauthd/saslauthd.pid"
michael@144 19 sasl_signal () {
michael@144 20 [ -f $sasl_pidfile ] && kill -$1 `cat $sasl_pidfile`
michael@144 21 }
michael@144 22
michael@144 23 %status -u @l_susr@ -o
michael@144 24 sasl_usable="unknown"
michael@144 25 sasl_active="no"
michael@144 26 rcService sasl enable yes && \
michael@144 27 sasl_signal 0 && sasl_active="yes"
michael@144 28 echo "sasl_enable=\"$sasl_enable\""
michael@144 29 echo "sasl_usable=\"$sasl_usable\""
michael@144 30 echo "sasl_active=\"$sasl_active\""
michael@144 31
michael@144 32 %start -p 400 -u @l_susr@
michael@144 33 rcService sasl enable yes || exit 0
michael@144 34 rcService sasl active yes && exit 0
michael@144 35 @l_prefix@/sbin/saslauthd \
michael@144 36 -a "${sasl_authmech}" \
michael@144 37 -n "${sasl_threads}" \
michael@144 38 ${sasl_flags}
michael@144 39
michael@144 40 %stop -p 600 -u @l_susr@
michael@144 41 rcService sasl enable yes || exit 0
michael@144 42 rcService sasl active no && exit 0
michael@144 43 sasl_signal TERM
michael@144 44
michael@144 45 %restart -u @l_susr@
michael@144 46 rcService sasl enable yes || exit 0
michael@144 47 rcService sasl active no && exit 0
michael@144 48 rc sasl stop
michael@144 49 sleep 2
michael@144 50 rc sasl start
michael@144 51
michael@144 52 %daily -u @l_susr@
michael@144 53 rcService sasl enable yes || exit 0
michael@144 54 shtool rotate -f \
michael@144 55 -n ${sasl_log_numfiles} -s ${sasl_log_minsize} -d \
michael@144 56 -z ${sasl_log_complevel} -o @l_susr@ -g @l_sgrp@ -m 600 \
michael@144 57 -P "${sasl_log_prolog}" \
michael@144 58 -E "${sasl_log_epilog}; rc sasl restart" \
michael@144 59 @l_prefix@/var/sasl/log/saslauthd.log
michael@144 60

mercurial