postfix-mailgraph/rc.postfix-mailgraph

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 171
b72f2be1f619
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@171 1 #!@l_prefix@/bin/openpkg rc
michael@171 2 ##
michael@171 3 ## rc.postfix-mailgraph -- Run-Commands
michael@171 4 ##
michael@171 5
michael@171 6 %config
michael@171 7 postfix_mailgraph_enable="$openpkg_rc_def"
michael@193 8 postfix_mailgraph_flags=""
michael@171 9
michael@171 10 %common
michael@171 11 postfix_mailgraph_pidfile="@l_prefix@/var/postfix-mailgraph/run/mailgraph.pid"
michael@171 12 postfix_mailgraph_signal () {
michael@171 13 [ -f $postfix_mailgraph_pidfile ] \
michael@171 14 && kill -$1 `cat $postfix_mailgraph_pidfile`
michael@171 15 }
michael@171 16
michael@171 17 %status -u @l_susr@ -o
michael@171 18 postfix_mailgraph_usable="unknown"
michael@171 19 postfix_mailgraph_active="no"
michael@171 20 rcService postfix-mailgraph enable yes && \
michael@171 21 postfix_mailgraph_signal 0 && postfix_mailgraph_active="yes"
michael@171 22 echo "postfix_mailgraph_enable=\"$postfix_mailgraph_enable\""
michael@171 23 echo "postfix_mailgraph_usable=\"$postfix_mailgraph_usable\""
michael@171 24 echo "postfix_mailgraph_active=\"$postfix_mailgraph_active\""
michael@171 25
michael@171 26 %start -u @l_susr@
michael@171 27 rcService postfix-mailgraph enable yes || exit 0
michael@171 28 rcService postfix-mailgraph active yes && exit 0
michael@193 29 @l_prefix@/sbin/mailgraph --daemon ${postfix_mailgraph_flags}
michael@171 30
michael@171 31 %stop -u @l_susr@
michael@171 32 rcService postfix-mailgraph enable yes || exit 0
michael@171 33 rcService postfix-mailgraph active no && exit 0
michael@171 34 postfix_mailgraph_signal TERM
michael@171 35
michael@171 36 %restart -u @l_susr@
michael@171 37 rcService postfix-mailgraph enable yes || exit 0
michael@171 38 rcService postfix-mailgraph active no && exit 0
michael@193 39 rc postfix-mailgraph stop
michael@171 40 sleep 2
michael@193 41 rc postfix-mailgraph start
michael@171 42

mercurial