davical/rc.davical

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@290 1 #!@l_prefix@/bin/openpkg rc
michael@290 2 ##
michael@290 3 ## rc.davical -- Run-Commands
michael@290 4 ##
michael@290 5
michael@290 6 %config
michael@290 7 davical_enable="$openpkg_rc_def"
michael@290 8
michael@290 9 %status -u @l_susr@ -o
michael@290 10 davical_usable="no"
michael@290 11 davical_active="no"
michael@290 12 @l_prefix@/sbin/apache -t \
michael@290 13 -f @l_prefix@/etc/davical/davical-apache.conf 2>/dev/null && \
michael@290 14 davical_usable="yes"
michael@290 15 [ -f @l_prefix@/var/davical/run/apache.pid ] && \
michael@290 16 kill -0 `cat @l_prefix@/var/davical/run/apache.pid` && \
michael@290 17 davical_active="yes"
michael@290 18 echo "davical_enable=\"$davical_enable\""
michael@290 19 echo "davical_usable=\"$davical_usable\""
michael@290 20 echo "davical_active=\"$davical_active\""
michael@290 21
michael@290 22 %start -u @l_susr@
michael@290 23 rcService davical enable yes || exit 0
michael@290 24 rcService davical active yes && exit 0
michael@290 25 @l_prefix@/sbin/apache @with_ssl@ \
michael@290 26 -f @l_prefix@/etc/davical/davical-apache.conf
michael@290 27
michael@290 28 %stop -u @l_susr@
michael@290 29 rcService davical enable yes || exit 0
michael@290 30 rcService davical active no && exit 0
michael@290 31 [ -f @l_prefix@/var/davical/run/apache.pid ] && \
michael@290 32 kill -TERM `cat @l_prefix@/var/davical/run/apache.pid`
michael@290 33 sleep 2
michael@290 34
michael@290 35 %restart -u @l_susr@
michael@290 36 rcService davical enable yes || exit 0
michael@290 37 rcService davical active no && exit 0
michael@290 38 rc davical stop start
michael@290 39

mercurial