Browse Source

Clifford Wolf:

new unchroot output plugin adaptions and a html output plugin (#21)


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@1142 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Clifford Wolf 21 years ago
parent
commit
5d669fa11b
6 changed files with 151 additions and 7 deletions
  1. +4
    -0
      Documentation/Developers/CHANGELOG-CLIFFORD
  2. +10
    -0
      misc/output/html/config.in
  3. +94
    -0
      misc/output/html/functions.sh
  4. +1
    -1
      misc/output/noexpertconfig.in
  5. +39
    -3
      misc/output/parse-config
  6. +3
    -3
      scripts/Build-Pkg

+ 4
- 0
Documentation/Developers/CHANGELOG-CLIFFORD

@ -1,4 +1,8 @@
*) 2003-08-20 (2.0.0-camp - 2.0.0-rc1)
- new unchroot output plugin adaptions and a html output plugin
*) 2003-07-28 (2.0.0-beta7 - 2.0.0-rc1)
- Fixed gawk-3.1.3 for dietlibc (e.g. needed in install disks and router)

+ 10
- 0
misc/output/html/config.in

@ -0,0 +1,10 @@
bool 'Activate HTML output module' ROCKCFG_OUTPUT_HTML 0
if [ "$ROCKCFG_OUTPUT_HTML" = 1 ]; then
block_begin
text 'Directory which should contain the html files' \
ROCKCFG_OUTPUT_HTML_DIR '/var/www/htdocs/rockoutput'
block_end
fi

+ 94
- 0
misc/output/html/functions.sh

@ -0,0 +1,94 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/misc/output/html
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
mkdir -p $ROCKCFG_OUTPUT_HTML_DIR
html_color_normal=000000
html_color_error=ff5552
html_color_status=52ff52
html_color_header=ff55ff
echo_html_raw() {
echo -n "$*" >> $ROCKCFG_OUTPUT_HTML_DIR/index.html
}
echo_html_text() {
echo -n "<tt><font color=$1>$2</font></tt>" >> $ROCKCFG_OUTPUT_HTML_DIR/index.html
}
echo_html_newline() {
echo "&nbsp;<br>" >> $ROCKCFG_OUTPUT_HTML_DIR/index.html
}
echo_header_html() {
echo_html_newline
echo_html_text ${html_color_header} "$*"
echo_html_newline
}
echo_status_html() {
echo_html_text ${html_color_status} "-> "
echo_html_text ${html_color_normal} "$*"
echo_html_newline
}
echo_error_html() {
echo_html_text ${html_color_error} "!> $*"
echo_html_newline
}
echo_pkg_deny_html() {
echo_html_newline
echo_html_text ${html_color_error} "$( date "+== %D %T =[$1]=> Package $2 $3." )"
echo_html_newline
}
echo_pkg_start_html() {
echo_html_newline
echo_html_text ${html_color_header} "$( date "+== %T =[$1]=> Building $2/$3 [$4 $5]." )"
echo_html_newline
}
echo_pkg_finish_html() {
echo_html_text ${html_color_header} "$( date "+== %D %T =[$1]=> Finished building package $3." )"
# local tm=$( date '+%s' )
# cp $root/var/adm/logs/$1-$3.log $ROCKCFG_OUTPUT_HTML_DIR/$1-$3-$tm.txt
# echo_html_raw " &nbsp; <b>[<a href=\"$1-$3-$tm.txt\">logfile</a>]</b>"
echo_html_newline
}
echo_pkg_abort_html() {
echo_html_text ${html_color_error} "$( date "+== %D %T =[$1]=> Aborted building package $3." )"
# local tm=$( date '+%s' )
# cp $root/var/adm/logs/$1-$3.err $ROCKCFG_OUTPUT_HTML_DIR/$1-$3-$tm.txt
# echo_html_raw " &nbsp; <b>[<a href=\"$1-$3-$tm.txt\">logfile</a>]</b>"
echo_html_newline
}
echo_errorquote_html() {
echo "$*" | grep . | while read line; do
echo_html_text ${html_color_error} "!> "
echo_html_text ${html_color_normal} "$line"
echo_html_newline
done
}

+ 1
- 1
misc/output/noexpertconfig.in

@ -20,7 +20,6 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
comment ' '
comment '- Build Output (terminal and others) Configuration'
block_begin 3
@ -28,5 +27,6 @@ block_begin 3
ROCKCFG_OUTPUT_TERM_COLOR 1
bool 'Print Build-Output to terminal when building' \
ROCKCFG_VERBOSE 0
%include misc/output/*/config.in
block_end

+ 39
- 3
misc/output/parse-config

@ -20,12 +20,48 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
. misc/output/terminal
output_proc() {
plugins=""
for x in $( ls misc/output ); do
if [ -f misc/output/$x/functions.sh ]; then
eval "y=\$ROCKCFG_OUTPUT_$( echo $x | tr a-z A-Z )"
if [ "$y" = 1 ]; then
. misc/output/$x/functions.sh
plugins="$plugins $x"
fi
fi
done
while read type data; do
for plugin in $plugins; do
eval "echo_${type}_${plugin} $data"
done
done
exit 0
}
if [ -z "$ROCK_OUPUT_PLUGIN_PROC_ACTIVE" ]; then
export ROCK_OUPUT_PLUGIN_PROC_ACTIVE=1
exec 199> >( output_proc )
fi
echo_sched() {
ecmd="echo_$1" ; shift
${ecmd}_terminal "$@"
local request="$1" tag
local nl=$'\n' tc="'"
shift
echo_${request}_terminal "$@"
for tag; do
tag=${tag//\\\\/\\\\}
tag=${tag//$tc/\\$tc}
tag=${tag//$nl/\\n}
request="$request \$'$tag'"
done
echo "$request" >&199
}
echo_header() { echo_sched header "$@" ; }

+ 3
- 3
scripts/Build-Pkg

@ -583,7 +583,7 @@ abort() {
}
{
trap 'echo "Got SIGIN (Crtl-C). Aborting build." ; exit 1' INT
trap 'echo "Got SIGINT (Crtl-C). Aborting build." ; exit 1' INT
exec < /dev/null
# Makes debugging build problems easier
@ -602,7 +602,7 @@ abort() {
#
{ echo "#!/bin/bash"
echo "export PROMPT_COMMAND='. debug.buildenv ; cd . ;" \
"unset PROMPT_COMMAND'" ; echo "exec bash 3> build.pid"
"unset PROMPT_COMMAND'" ; echo "exec bash 200>> build.pid"
} > $builddir/debug.sh
chmod +x $builddir/debug.sh
@ -617,7 +617,7 @@ abort() {
# of this build process.
#
sh -c 'echo $PPID' > $builddir/build.pid
exec 3>> $builddir/build.pid
exec 200>> $builddir/build.pid
echo "Command Wrapper Debug: running '${CC} --version' .."
type ${CC}; CMD_WRAPPER_DEBUG=1 ${CC} --version

Loading…
Cancel
Save