rpms/bltk/devel bltk-1.0.9-bltk_paths.patch, NONE, 1.1 bltk-1.0.9-cond_install.patch, NONE, 1.1 bltk-1.0.9-conf.patch, NONE, 1.1 bltk-1.0.9-hdparm.patch, NONE, 1.1 bltk-1.0.9-home_dir.patch, NONE, 1.1 bltk-1.0.9-installed.patch, NONE, 1.1 bltk-1.0.9-man.patch, NONE, 1.1 bltk-1.0.9-office_scen.patch, NONE, 1.1 bltk-1.0.9-opt_developer.patch, NONE, 1.1 bltk-1.0.9-opt_game.patch, NONE, 1.1 bltk-1.0.9-opt_office.patch, NONE, 1.1 bltk-1.0.9-opt_player.patch, NONE, 1.1 bltk-1.0.9-opt_reader.patch, NONE, 1.1 bltk-1.0.9-sudo.patch, NONE, 1.1 bltk-1.0.9-xse.patch, NONE, 1.1 bltk.spec, 1.4, 1.5 sources, 1.3, 1.4 bltk-1.0.9-all.patch, 1.1, NONE
Jiri Skala
jskala at fedoraproject.org
Wed Jul 29 13:48:31 UTC 2009
Author: jskala
Update of /cvs/extras/rpms/bltk/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1274
Modified Files:
bltk.spec sources
Added Files:
bltk-1.0.9-bltk_paths.patch bltk-1.0.9-cond_install.patch
bltk-1.0.9-conf.patch bltk-1.0.9-hdparm.patch
bltk-1.0.9-home_dir.patch bltk-1.0.9-installed.patch
bltk-1.0.9-man.patch bltk-1.0.9-office_scen.patch
bltk-1.0.9-opt_developer.patch bltk-1.0.9-opt_game.patch
bltk-1.0.9-opt_office.patch bltk-1.0.9-opt_player.patch
bltk-1.0.9-opt_reader.patch bltk-1.0.9-sudo.patch
bltk-1.0.9-xse.patch
Removed Files:
bltk-1.0.9-all.patch
Log Message:
* Tue Jul 28 2009 Jiri Skala <jskala at redhat.com> 1.0.9-4
- added man mages
- splitted patch to more files
- filled up scen file of office workload
- updated to latest upstream sources
bltk-1.0.9-bltk_paths.patch:
Makefile | 2 -
bltk_func.sh | 77 ++++++++++++++++++++++++++++++++++++++++++++++
bltk_plot.sh | 48 +++++++++++++++++++---------
bltk_report.sh | 60 ++++++++++++++++++++++++-----------
bltk_report_check.sh | 50 ++++++++++++++++++++---------
bltk_report_compress.sh | 51 ++++++++++++++++++++----------
bltk_report_table.sh | 50 ++++++++++++++++++++---------
bltk_report_uncompress.sh | 51 ++++++++++++++++++++----------
8 files changed, 288 insertions(+), 101 deletions(-)
--- NEW FILE bltk-1.0.9-bltk_paths.patch ---
--- orig-1.0.9/tools/analyzer/bltk_plot.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/analyzer/bltk_plot.sh 2009-07-17 11:03:54.822883564 +0200
@@ -41,23 +41,41 @@
unalias -a
-set_bltk_root()
+set_bltk_paths()
{
- PROG=`basename $0`
+ WHICH_BLTK=`which bltk`
+ RETCODE=$?
- BLTK_ROOT=`dirname $0`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- BLTK_ROOT=`dirname $BLTK_ROOT`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- echo "Cannot determine bltk root, bltk tree corrupted."
- exit 2
- fi
- fi
- export BLTK_ROOT
- export BLTK_BIN=$BLTK_ROOT/bin
- export BLTK_TMP=$BLTK_ROOT/tmp
+ if [[ $RETCODE = 0 ]]
+ then
+ file -b $WHICH_BLTK | grep symbolic > /dev/null
+ TMPCODE=$?
+ if [[ $TMPCODE = 0 ]]
+ then
+ BLTK_MAIN=`readlink -f $WHICH_BLTK`
+ else
+ BLTK_MAIN=$WHICH_BLTK
+ fi
+ BLTK_ROOT=`echo $BLTK_MAIN | sed 's|/bin/.*$||'`
+
+ root_len=`echo $BLTK_ROOT | wc -c`
+ main_len=`echo $BLTK_MAIN | wc -c`
+
+ if [[ $root_len = $main_len ]]
+ then
+ RETCODE=2
+ else
+ [ -f /etc/bltk.conf ] && . /etc/bltk.conf
+
+ [ -z $BLTK_HOME ] && BLTK_HOME=~/.bltk
+
+ export BLTK_ROOT
+ export BLTK_BIN=$BLTK_ROOT/bin
+ export BLTK_TMP=$BLTK_HOME/tmp
+ fi
+ fi
+
+ return $RETCODE
}
set_bltk_root
--- orig-1.0.9/tools/analyzer/bltk_report_check.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/analyzer/bltk_report_check.sh 2009-07-17 11:03:54.824880651 +0200
@@ -41,26 +41,44 @@
unalias -a
-set_bltk_root()
+set_bltk_paths()
{
- PROG=`basename $0`
+ WHICH_BLTK=`which bltk`
+ RETCODE=$?
- BLTK_ROOT=`dirname $0`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- BLTK_ROOT=`dirname $BLTK_ROOT`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- echo "Cannot determine bltk root, bltk tree corrupted."
- exit 2
- fi
- fi
- export BLTK_ROOT
- export BLTK_BIN=$BLTK_ROOT/bin
- export BLTK_TMP=$BLTK_ROOT/tmp
+ if [[ $RETCODE = 0 ]]
+ then
+ file -b $WHICH_BLTK | grep symbolic > /dev/null
+ TMPCODE=$?
+ if [[ $TMPCODE = 0 ]]
+ then
+ BLTK_MAIN=`readlink -f $WHICH_BLTK`
+ else
+ BLTK_MAIN=$WHICH_BLTK
+ fi
+ BLTK_ROOT=`echo $BLTK_MAIN | sed 's|/bin/.*$||'`
+
+ root_len=`echo $BLTK_ROOT | wc -c`
+ main_len=`echo $BLTK_MAIN | wc -c`
+
+ if [[ $root_len = $main_len ]]
+ then
+ RETCODE=2
+ else
+ [ -f /etc/bltk.conf ] && . /etc/bltk.conf
+
+ [ -z $BLTK_HOME ] && BLTK_HOME=~/.bltk
+
+ export BLTK_ROOT
+ export BLTK_BIN=$BLTK_ROOT/bin
+ export BLTK_TMP=$BLTK_HOME/tmp
+ fi
+ fi
+
+ return $RETCODE
}
-set_bltk_root
+set_bltk_paths
Failed="Failed !!!"
--- orig-1.0.9/tools/analyzer/bltk_report_compress.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/analyzer/bltk_report_compress.sh 2009-07-17 11:03:54.818881008 +0200
@@ -41,27 +41,44 @@
unalias -a
-set_bltk_root()
+set_bltk_paths()
{
- PROG=`basename $0`
+ WHICH_BLTK=`which bltk`
+ RETCODE=$?
- BLTK_ROOT=`dirname $0`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- BLTK_ROOT=`dirname $BLTK_ROOT`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- echo "Cannot determine bltk root, bltk tree corrupted."
- exit 2
- fi
- fi
- export BLTK_ROOT
- export BLTK_BIN=$BLTK_ROOT/bin
- export BLTK_TMP=$BLTK_ROOT/tmp
- export BLTK_GET_REALPATH=$BLTK_BIN/bltk_get_realpath
+ if [[ $RETCODE = 0 ]]
+ then
+ file -b $WHICH_BLTK | grep symbolic > /dev/null
+ TMPCODE=$?
+ if [[ $TMPCODE = 0 ]]
+ then
+ BLTK_MAIN=`readlink -f $WHICH_BLTK`
+ else
+ BLTK_MAIN=$WHICH_BLTK
+ fi
+ BLTK_ROOT=`echo $BLTK_MAIN | sed 's|/bin/.*$||'`
+
+ root_len=`echo $BLTK_ROOT | wc -c`
+ main_len=`echo $BLTK_MAIN | wc -c`
+
+ if [[ $root_len = $main_len ]]
+ then
+ RETCODE=2
+ else
+ [ -f /etc/bltk.conf ] && . /etc/bltk.conf
+
+ [ -z $BLTK_HOME ] && BLTK_HOME=~/.bltk
+
+ export BLTK_ROOT
+ export BLTK_BIN=$BLTK_ROOT/bin
+ export BLTK_TMP=$BLTK_HOME/tmp
+ fi
+ fi
+
+ return $RETCODE
}
-set_bltk_root
+set_bltk_paths
CWD=$PWD
--- orig-1.0.9/tools/analyzer/bltk_report.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/analyzer/bltk_report.sh 2009-07-17 11:03:54.820880959 +0200
@@ -38,29 +38,51 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
-
unalias -a
-set_bltk_root()
+set_bltk_paths()
{
- PROG=`basename $0`
-
- BLTK_ROOT=`dirname $0`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- BLTK_ROOT=`dirname $BLTK_ROOT`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- echo "Cannot determine bltk root, bltk tree corrupted."
- exit 2
- fi
- fi
- export BLTK_ROOT
- export BLTK_BIN=$BLTK_ROOT/bin
- export BLTK_TMP=$BLTK_ROOT/tmp
-}
+ WHICH_BLTK=`which bltk`
+ RETCODE=$?
-set_bltk_root
+ if [[ $RETCODE = 0 ]]
+ then
+ file -b $WHICH_BLTK | grep symbolic > /dev/null
+ TMPCODE=$?
+ if [[ $TMPCODE = 0 ]]
+ then
+ BLTK_MAIN=`readlink -f $WHICH_BLTK`
+ else
+ BLTK_MAIN=$WHICH_BLTK
+ fi
+ BLTK_ROOT=`echo $BLTK_MAIN | sed 's|/bin/.*$||'`
+
+ root_len=`echo $BLTK_ROOT | wc -c`
+ main_len=`echo $BLTK_MAIN | wc -c`
+
+ if [[ $root_len = $main_len ]]
+ then
+ RETCODE=2
+ else
+ [ -f /etc/bltk.conf ] && . /etc/bltk.conf
+
+ [ -z $BLTK_HOME ] && BLTK_HOME=~/.bltk
+
+ export BLTK_ROOT
+ export BLTK_BIN=$BLTK_ROOT/bin
+ export BLTK_TMP=$BLTK_HOME/tmp
+ fi
+ fi
+
+ return $RETCODE
+}
+
+set_bltk_paths
+
+if [ ! $? = 0 ]; then
+ echo "ERROR in setting environmental paths" >&2
+ exit 1
+fi
BLTK_GET_STAT_CMD="$BLTK_BIN/bltk_get_stat $stat_ign_lines_arg"
BLTK_CALC_CMD=$BLTK_BIN/bltk_calc
--- orig-1.0.9/tools/analyzer/bltk_report_table.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/analyzer/bltk_report_table.sh 2009-07-17 11:03:54.823880990 +0200
@@ -41,26 +41,44 @@
unalias -a
-set_bltk_root()
+set_bltk_paths()
{
- PROG=`basename $0`
+ WHICH_BLTK=`which bltk`
+ RETCODE=$?
- BLTK_ROOT=`dirname $0`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- BLTK_ROOT=`dirname $BLTK_ROOT`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- echo "Cannot determine bltk root, bltk tree corrupted."
- exit 2
- fi
- fi
- export BLTK_ROOT
- export BLTK_BIN=$BLTK_ROOT/bin
- export BLTK_TMP=$BLTK_ROOT/tmp
+ if [[ $RETCODE = 0 ]]
+ then
+ file -b $WHICH_BLTK | grep symbolic > /dev/null
+ TMPCODE=$?
+ if [[ $TMPCODE = 0 ]]
+ then
+ BLTK_MAIN=`readlink -f $WHICH_BLTK`
+ else
+ BLTK_MAIN=$WHICH_BLTK
+ fi
+ BLTK_ROOT=`echo $BLTK_MAIN | sed 's|/bin/.*$||'`
+
+ root_len=`echo $BLTK_ROOT | wc -c`
+ main_len=`echo $BLTK_MAIN | wc -c`
+
+ if [[ $root_len = $main_len ]]
+ then
+ RETCODE=2
+ else
+ [ -f /etc/bltk.conf ] && . /etc/bltk.conf
+
+ [ -z $BLTK_HOME ] && BLTK_HOME=~/.bltk
+
+ export BLTK_ROOT
+ export BLTK_BIN=$BLTK_ROOT/bin
+ export BLTK_TMP=$BLTK_HOME/tmp
+ fi
+ fi
+
+ return $RETCODE
}
-set_bltk_root
+set_bltk_paths
BLTK_REPORT=$BLTK_BIN/bltk_report
--- orig-1.0.9/tools/analyzer/bltk_report_uncompress.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/analyzer/bltk_report_uncompress.sh 2009-07-17 11:03:54.837880784 +0200
@@ -41,27 +41,44 @@
unalias -a
-set_bltk_root()
+set_bltk_paths()
{
- PROG=`basename $0`
+ WHICH_BLTK=`which bltk`
+ RETCODE=$?
- BLTK_ROOT=`dirname $0`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- BLTK_ROOT=`dirname $BLTK_ROOT`
- if [[ ! -a $BLTK_ROOT/.bltk ]]
- then
- echo "Cannot determine bltk root, bltk tree corrupted."
- exit 2
- fi
- fi
- export BLTK_ROOT
- export BLTK_BIN=$BLTK_ROOT/bin
- export BLTK_TMP=$BLTK_ROOT/tmp
- export BLTK_GET_REALPATH=$BLTK_BIN/bltk_get_realpath
+ if [[ $RETCODE = 0 ]]
+ then
+ file -b $WHICH_BLTK | grep symbolic > /dev/null
+ TMPCODE=$?
+ if [[ $TMPCODE = 0 ]]
+ then
+ BLTK_MAIN=`readlink -f $WHICH_BLTK`
+ else
+ BLTK_MAIN=$WHICH_BLTK
+ fi
+ BLTK_ROOT=`echo $BLTK_MAIN | sed 's|/bin/.*$||'`
+
+ root_len=`echo $BLTK_ROOT | wc -c`
+ main_len=`echo $BLTK_MAIN | wc -c`
+
+ if [[ $root_len = $main_len ]]
+ then
+ RETCODE=2
+ else
+ [ -f /etc/bltk.conf ] && . /etc/bltk.conf
+
+ [ -z $BLTK_HOME ] && BLTK_HOME=~/.bltk
+
+ export BLTK_ROOT
+ export BLTK_BIN=$BLTK_ROOT/bin
+ export BLTK_TMP=$BLTK_HOME/tmp
+ fi
+ fi
+
+ return $RETCODE
}
-set_bltk_root
+set_bltk_paths
CWD=$PWD
--- orig-1.0.9/tools/analyzer/bltk_func.sh 1970-01-01 01:00:00.000000000 +0100
+++ curr-1.0.9-1/tools/analyzer/bltk_func.sh 2009-07-17 11:03:54.824880651 +0200
@@ -0,0 +1,77 @@
+#!/bin/bash
+#
+# Copyright (c) 2009 Red Hat Inc.
+# Copyright (c) 2009 Jiri Skala <jskala at redhat.com>
+# All rights reserved.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# Neither the name of Intel Corporation nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+#
+# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+
+set_bltk_paths()
+{
+ WHICH_BLTK=`which bltk`
+ RETCODE=$?
+
+ if [[ $RETCODE = 0 ]]
+ then
+ file -b $WHICH_BLTK | grep symbolic > /dev/null
+ TMPCODE=$?
+ if [[ $TMPCODE = 0 ]]
+ then
+ BLTK_MAIN=`readlink -f $WHICH_BLTK`
+ else
+ BLTK_MAIN=$WHICH_BLTK
+ fi
+ BLTK_ROOT=`echo $BLTK_MAIN | sed 's|/bin/.*$||'`
+
+ root_len=`echo $BLTK_ROOT | wc -c`
+ main_len=`echo $BLTK_MAIN | wc -c`
+
+ if [[ $root_len = $main_len ]]
+ then
+ RETCODE=2
+ else
+ [ -f /etc/bltk.conf ] && . /etc/bltk.conf
+
+ [ -z $BLTK_HOME ] && BLTK_HOME=~/.bltk
+
+ export BLTK_ROOT
+ export BLTK_BIN=$BLTK_ROOT/bin
+ export BLTK_TMP=$BLTK_HOME/tmp
+ fi
+ fi
+
+ return $RETCODE
+}
+
--- orig-1.0.9/tools/analyzer/Makefile 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/analyzer/Makefile 2009-07-17 11:03:54.826913428 +0200
@@ -15,7 +15,7 @@
SHFILES = bltk_get_stat bltk_report bltk_report_table bltk_report_check \
bltk_plot bltk_get_hd_rpm \
- bltk_report_compress bltk_report_uncompress
+ bltk_report_compress bltk_report_uncompress bltk_func
SHFILES_SH = ${SHFILES:=.sh}
SHTARGETS = $(SHFILES:%=$(BIN)/%)
bltk-1.0.9-cond_install.patch:
wl_developer/bltk_wl_developer_install.sh | 17 ++++++++++-----
wl_office/bltk_wl_office_install.sh | 33 +++++++++++++++++-------------
wl_player/bltk_wl_player_install.sh | 22 ++++++++++++--------
3 files changed, 45 insertions(+), 27 deletions(-)
--- NEW FILE bltk-1.0.9-cond_install.patch ---
diff -up bltk-1.0.9/wl_developer/bltk_wl_developer_install.sh.cond_install bltk-1.0.9/wl_developer/bltk_wl_developer_install.sh
--- bltk-1.0.9/wl_developer/bltk_wl_developer_install.sh.cond_install 2009-07-29 11:38:48.000000000 +0200
+++ bltk-1.0.9/wl_developer/bltk_wl_developer_install.sh 2009-07-29 14:54:40.878602487 +0200
@@ -38,6 +38,8 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
+. /etc/bltk.conf
+
source `dirname $0`/../../bin/bltk_wl_common
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
@@ -139,9 +141,14 @@ else
exit 1
fi
-{
-startup
-$work
-cleanup 0
-} 2>&1 | tee -i $work.log
+if [[ "$WL_DEVELOPER_ENABLED" = "YES" && "$WL_DEVELOPER_EXTERN" = "YES" ]]
+then
+ {
+ startup
+ $work
+ cleanup 0
+ } 2>&1 | tee -i $work.log
+else
+ exit 0
+fi
diff -up bltk-1.0.9/wl_office/bltk_wl_office_install.sh.cond_install bltk-1.0.9/wl_office/bltk_wl_office_install.sh
--- bltk-1.0.9/wl_office/bltk_wl_office_install.sh.cond_install 2009-07-29 11:38:48.000000000 +0200
+++ bltk-1.0.9/wl_office/bltk_wl_office_install.sh 2009-07-29 15:00:59.406496688 +0200
@@ -38,6 +38,7 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
+. /etc/bltk.conf
source `dirname $0`/../../bin/bltk_wl_common
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
@@ -80,7 +81,6 @@ cleanup()
install_ooo()
{
-
wl_remove_file ${HOME}/.sversionrc
wl_check_error $?
@@ -162,20 +162,25 @@ uninstall()
}
-if [[ $# = 0 || $1 = i || $1 = install ]]
-then
- work=install
-elif [[ $1 = u || $1 = uninstall ]]
+if [[ "$WL_OFFICE_ENABLED" = "YES" && "$WL_OFFICE_EXTERN" = "YES" ]]
then
- work=uninstall
+ if [[ $# = 0 || $1 = i || $1 = install ]]
+ then
+ work=install
+ elif [[ $1 = u || $1 = uninstall ]]
+ then
+ work=uninstall
+ else
+ echo "Invalid parameter"
+ exit 1
+ fi
+
+ {
+ startup
+ $work
+ cleanup 0
+ } 2>&1 | tee -i $work.log
else
- echo "Invalid parameter"
- exit 1
+ exit 0
fi
-{
-startup
-$work
-cleanup 0
-} 2>&1 | tee -i $work.log
-
diff -up bltk-1.0.9/wl_player/bltk_wl_player_install.sh.cond_install bltk-1.0.9/wl_player/bltk_wl_player_install.sh
--- bltk-1.0.9/wl_player/bltk_wl_player_install.sh.cond_install 2009-07-29 11:38:48.000000000 +0200
+++ bltk-1.0.9/wl_player/bltk_wl_player_install.sh 2009-07-29 15:06:43.249585854 +0200
@@ -41,6 +41,8 @@
PLAYER_INSTALL_FLAGS=" --disable-ivtv"
+. /etc/bltk.conf
+
source `dirname $0`/../../bin/bltk_wl_common
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
@@ -286,17 +288,21 @@ else
exit 1
fi
+if [[ "$WL_PLAYER_ENABLED" = "YES" && "$WL_PLAYER_EXTERN" = "YES" ]]
+then
{
-
#If there is a ENV variable named CFLAGS, the CFLAGS value in wl_player/Makefile
#will be set to this ENV variable. Since the MPlayer will inherit the ENV CFLAGS
#value, the compiling will failed for "-pedantic -std=c99" in CFLAGS. So we need
#to unset the variable here.
-CFLAGS=
-LDFLAGS=
-startup
-$work
-cleanup 0
-} 2>&1 | tee -i $work.log
-
+ CFLAGS=
+ LDFLAGS=
+ startup
+ $work
+ cleanup 0
+ } 2>&1 | tee -i $work.log
+}
+else
+ exit 0
+fi
bltk-1.0.9-conf.patch:
include/parseconf.h | 61 +++++++++
tools/bltk/Makefile | 5
tools/bltk/main.c | 49 ++++++--
tools/bltk/parseconf.c | 299 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 404 insertions(+), 10 deletions(-)
--- NEW FILE bltk-1.0.9-conf.patch ---
diff -up /dev/null bltk/include/parseconf.h
--- /dev/null 2009-07-29 07:53:51.640007938 +0200
+++ bltk/include/parseconf.h 2009-07-29 11:14:00.913495946 +0200
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2009 Red Hat Inc.
+ * Copyright (c) 2009 Jiri Skala <jskala at redhat.com>
+ * All rights reserved.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+#ifndef __PARSECONF_H__
+#define __PARSECONF_H__
+
+extern char *bltk_home;
+extern char *soffice_prog;
+extern char *wl_office_working_dir;
+extern char *bltk_player_prog;
+extern char *bltk_player_file;
+extern char *bltk_reader_prog;
+
+extern int wl_developer_enabled;
+extern int wl_developer_extern;
+extern int wl_game_enabled;
+extern int wl_game_extern;
+extern int wl_office_enabled;
+extern int wl_office_extern;
+extern int wl_player_enabled;
+extern int wl_player_extern;
+extern int wl_reader_enabled;
+extern int wl_reader_extern;
+
+#endif
+
diff -up bltk/tools/bltk/main.c.conf bltk/tools/bltk/main.c
--- bltk/tools/bltk/main.c.conf 2009-04-10 09:14:20.000000000 +0200
+++ bltk/tools/bltk/main.c 2009-07-29 11:15:27.694746739 +0200
@@ -57,6 +57,7 @@
#include <ctype.h>
#include "bltk.h"
+#include "parseconf.h"
#define OUTPUT_CONSOLE 10
#define OUTPUT_FILE 20
@@ -960,12 +961,13 @@ static int environment_init(int argc, ch
char str[STR_LEN];
int ret, i;
- (void)unlink(LAST_RESULTS);
- ret = symlink(results, LAST_RESULTS);
+ sprintf(str, "%s/%s", bltk_home, LAST_RESULTS);
+ (void)unlink(str);
+ ret = symlink(results, str);
if (ret != 0) {
(void)sprintf(prt_str, "symlink(%s, %s) failed, "
"errno %d (%s)\n",
- results, LAST_RESULTS, errno, strerror(errno));
+ results, str, errno, strerror(errno));
write_to_err_log(prt_str);
prog_exit(1);
}
@@ -987,6 +989,7 @@ static int environment_init(int argc, ch
(void)sprintf(fail_fname, "%s/fail", results);
(void)sprintf(pass_fname, "%s/pass", results);
prog_putenv("BLTK_FAIL_FNAME", fail_fname);
+ prog_putenv("BLTK_STOP_FNAME", stop_fname);
prog_putenv("BLTK_PASS_FNAME", pass_fname);
(void)sprintf(err_log_fname, "%s/err.log", results);
@@ -1041,10 +1044,12 @@ static int environment_init(int argc, ch
}
(void)strcat(cmdline, "'");
- (void)sprintf(cmd, "%s >>history", cmdline);
+ sprintf(str, "%s/%s", bltk_home, HISTORY);
+ (void)sprintf(cmd, "%s >>%s", cmdline, str);
(void)prog_system(cmd);
- (void)sprintf(cmd, "%s >last_cmd", cmdline);
+ sprintf(str, "%s/%s", bltk_home, LAST_CMD);
+ (void)sprintf(cmd, "%s >%s", cmdline, str);
(void)prog_system(cmd);
(void)sprintf(cmd, "%s >%s/cmd", cmdline, results);
@@ -1078,7 +1083,7 @@ static int environment_init(int argc, ch
set_signal(SIGUSR2);
set_signal(SIGHUP);
- (void)sprintf(cmd, "mkdir -p -m 0777 %s/tmp", bltk_root);
+ (void)sprintf(cmd, "mkdir -p -m 0777 %s/tmp", bltk_home);
ret = prog_system(cmd);
if (ret != 0) {
(void)sprintf(prt_str, "%s failed\n", cmd);
@@ -1608,6 +1613,28 @@ static char *get_bltk_root_by_argv0(char
return (wp1);
}
+static char *get_bltk_root_by_proc()
+{
+ char str[256], *path, *ret=NULL;
+
+ snprintf(str, sizeof str, "/proc/%d/exe", getpid());
+ if (readlink(str, str, sizeof str) > -1)
+ {
+ if ((path = dirname(str)))
+ {
+ // take one folder higher
+ ret = strrchr(path, '/');
+ if (ret != NULL)
+ {
+ *ret = 0;
+ ret = path;
+ }
+ }
+ }
+
+ return ret ? strdup(ret) : ret;
+}
+
static char *get_bltk_root_by_path(char *argv0)
{
char *path, *dpath, *res;
@@ -1648,7 +1675,7 @@ static void set_bltk_root(char *argv0)
int ret;
char cwd[STR_LEN];
- wp1 = check_bltk_root(".");
+ wp1 = get_bltk_root_by_proc();
if (wp1 == NULL) {
wp1 = get_bltk_root_by_argv0(argv0);
}
@@ -1792,6 +1819,12 @@ int main(int argc, char **argv)
(void)umask(0);
(void)set_path(0);
+ param_init();
+
+ prog_putenv("BLTK_HOME", bltk_home);
+ prog_putenv("WL_OFFICE_WORKING_DIR", wl_office_working_dir);
+ prog_putenv("WL_READER_WORKING_DIR", wl_office_working_dir);
+
time_start = time_prev = prog_time();
(void)prog_system("xset dpms 0 0 0 >/dev/null 2>&1");
@@ -2125,7 +2158,7 @@ int main(int argc, char **argv)
("getcwd() failed, cannot continue the test\n");
prog_exit(1);
}
- (void)sprintf(results_str, "%s/%s", results_parent, results);
+ (void)sprintf(results_str, "%s/%s", bltk_home, results);
results = results_str;
}
diff -up bltk/tools/bltk/Makefile.conf bltk/tools/bltk/Makefile
--- bltk/tools/bltk/Makefile.conf 2009-04-10 09:14:20.000000000 +0200
+++ bltk/tools/bltk/Makefile 2009-07-29 11:14:00.917495009 +0200
@@ -4,12 +4,12 @@ CFLAGS = -Wall -pedantic -std=c99 -g -O
BIN = ../../bin
-FILES = main init file stat
+FILES = main init file stat parseconf
OFILES = ${FILES:=.o}
CFILES = ${FILES:=.c}
-HIDERS = ../../include/bltk.h
+HIDERS = ../../include/bltk.h ../../include/parseconf.h
TARGETS = $(BIN)/bltk
@@ -38,6 +38,7 @@ main.o : $(HIDERS) main.c
init.o : $(HIDERS) init.c
file.o : $(HIDERS) file.c
stat.o : $(HIDERS) stat.c
+parseconf.o : $(HIDERS) parseconf.c
$(SHTARGETS) : $(SHFILES_SH)
cp $(@:$(BIN)/%=%.sh) $@
diff -up /dev/null bltk/tools/bltk/parseconf.c
--- /dev/null 2009-07-29 07:53:51.640007938 +0200
+++ bltk/tools/bltk/parseconf.c 2009-07-29 11:14:00.921494700 +0200
@@ -0,0 +1,299 @@
+/*
+ * Copyright (c) 2009 Red Hat Inc.
+ * Copyright (c) 2009 Jiri Skala <jskala at redhat.com>
+ * All rights reserved.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+ * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include "bltk.h"
+
+#define BLTK_CONF "/etc/bltk.conf"
+
+typedef struct para_item_str_t
+{
+ const char *name;
+ char **val;
+ size_t len;
+} para_item_str;
+
+typedef struct para_item_int_t
+{
+ const char *name;
+ int *val;
+} para_item_int;
+
+typedef struct para_item_bool_t
+{
+ const char *name;
+ int *val;
+} para_item_bool;
+
+char *bltk_home;
+char *soffice_prog;
+char *wl_office_working_dir;
+char *bltk_player_prog;
+char *bltk_player_file;
+char *bltk_reader_prog;
+char *bltk_reader_file;
+
+int wl_developer_enabled;
+int wl_developer_extern;
+int wl_game_enabled;
+int wl_game_extern;
+int wl_office_enabled;
+int wl_office_extern;
+int wl_player_enabled;
+int wl_player_extern;
+int wl_reader_enabled;
+int wl_reader_extern;
+
+static para_item_str params_str[] =
+{
+ { "BLTK_HOME", &bltk_home, 0 },
+ { "SOFFICE_PROG", &soffice_prog, 0 },
+ { "WL_OFFICE_WORKING_DIR", &wl_office_working_dir, 0 },
+ { "BLTK_PLAYER_PROG", &bltk_player_prog, 0 },
+ { "BLTK_PLAYER_FILE", &bltk_player_file, 0 },
+ { "BLTK_READER_PROG", &bltk_reader_prog, 0 },
+ { "BLTK_READER_FILE", &bltk_reader_file, 0 },
+ { NULL, NULL, 0 }
+};
+
+static para_item_int params_int[] =
+{
+ { NULL, 0 }
+};
+
+static para_item_bool params_bool[] =
+{
+ { "WL_DEVELOPER_ENABLED", &wl_developer_enabled },
+ { "WL_DEVELOPER_EXTERN", &wl_developer_extern },
+ { "WL_GAME_ENABLED", &wl_game_enabled },
+ { "WL_GAME_EXTERN", &wl_game_extern },
+ { "WL_OFFICE_ENABLED", &wl_office_enabled },
+ { "WL_OFFICE_EXTERN", &wl_office_extern },
+ { "WL_PLAYER_ENABLED", &wl_player_enabled },
+ { "WL_PLAYER_EXTERN", &wl_player_extern },
+ { "WL_READER_ENABLED", &wl_reader_enabled },
+ { "WL_READER_EXTERN", &wl_reader_extern },
+ { NULL, 0 }
+};
+
+
+char *
+strupper(char *str)
+{
+ int i;
+ for (i=0; i < strlen(str); i++)
+ str[i] = (char)toupper(str[i]);
+ return str;
+}
+
+int
+param_find_str(const char *name)
+{
+ int i;
+ for (i=0;
+ params_str[i].name != NULL && strcmp(name, params_str[i].name) != 0;
+ i++) ;
+ return params_str[i].name == NULL ? -1 : i;
+}
+
+int
+param_find_int(const char *name)
+{
+ int i;
+ for (i=0;
+ params_int[i].name != NULL && strcmp(name, params_int[i].name) != 0;
+ i++) ;
+ return params_int[i].name == NULL ? -1 : i;
+}
+
+int
+param_find_bool(const char *name)
+{
+ int i;
+ for (i=0;
+ params_bool[i].name != NULL && strcmp(name, params_bool[i].name) != 0;
+ i++) ;
+ return params_bool[i].name == NULL ? -1 : i;
+}
+
+int
+line_empty_or_spaces(const char *line)
+{
+ int i;
+ for (i=0; line[i] > 0 && line[i] <= ' ' && i < strlen(line); i++) ;
+ return line[i] == 0;
+}
+
+int
+line_commented(const char *line)
+{
+ int i;
+ for (i=0; line[i] > 0 && line[i] <= ' ' && i < strlen(line); i++) ;
+ return line[i] == '#';
+}
+
+int
+param_parse_line(const char *line, char *name, char *val)
+{
+ char *str, *str1;
+ int ret=-1;
+
+ str = strdup(line);
+ if ((str1 = strchr(str, '=')) != NULL)
+ {
+ *str1 = 0;
+ str1++;
+ strcpy(val, str1);
+ strcpy(name, str);
+ ret = 0;
+ }
+ else
+ {
+ fprintf(stderr, "Incorrect line in the %s\n", BLTK_CONF);
+ }
+ free (str);
+ return ret;
+}
+
+void
+param_export_value(const char *name)
+{
+ char expval[STR_LEN];
+ int index;
+
+ if ((index = param_find_str(name)) > -1)
+ snprintf(expval, STR_LEN, "%s=%s", name, *(params_str[index].val));
+ else if ((index = param_find_int(name)) > -1)
+ snprintf(expval, STR_LEN, "%s=%d", name, *(params_int[index].val));
+ else if ((index = param_find_bool(name)) > -1)
+ snprintf(expval, STR_LEN, "%s=%s", name, *(params_bool[index].val) ? "YES": "NO");
+
+ if (index > -1)
+ putenv(strdup(expval));
+ else
+ fprintf(stderr, "Undefined parameter (%s)\n", name);
+}
+
+void
+param_load_conf()
+{
+ char str[STR_LEN];
+ char name[STR_LEN], val[STR_LEN];
+ int index, len;
+ FILE *f;
+
+ if ((f = fopen(BLTK_CONF, "rt")) != NULL)
+ {
+ while (fgets(str, STR_LEN, f) != NULL)
+ {
+ if ((len = strlen(str)) > 0 && str[len-1] == '\n')
+ str[len-1] = 0;
+ if (line_empty_or_spaces(str) || line_commented(str))
+ continue;
+
+ param_parse_line(str, name, val);
+
+ if ((index = param_find_str(name)) > -1)
+ *(params_str[index].val) = strdup(val);
+ else if ((index = param_find_int(name)) > -1)
+ *(params_int[index].val) = atoi(val);
+ else if ((index = param_find_bool(name)) > -1)
+ {
+ if (!strcmp(strupper(val), "YES") ||
+ !strcmp(strupper(val), "TRUE") ||
+ val[0] == '1')
+ *(params_bool[index].val) = 1;
+ else if (!strcmp(strupper(val), "NO") ||
+ !strcmp(strupper(val), "FALSE") ||
+ val[0] == '0')
+ *(params_bool[index].val) = 0;
+ }
+ }
+
+ fclose(f);
+ }
+}
+
+void
+param_load_defaults()
+{
+ char str[STR_LEN];
+
+ if (bltk_home == NULL)
+ {
+ sprintf(str, "%s/.bltk", getenv("HOME"));
+ bltk_home = strdup(str);
+ } else if (bltk_home[0] == '~') {
+ sprintf(str, "%s%s", getenv("HOME"), bltk_home+1);
+ free(bltk_home);
+ bltk_home = strdup(str);
+ }
+
+ if (access(bltk_home, 0) != 0)
+ mkdir(bltk_home, 0700);
+
+ if (wl_office_working_dir == NULL)
+ wl_office_working_dir = strdup(bltk_home);
+
+ if (access(wl_office_working_dir, 0) != 0)
+ {
+ if (wl_office_working_dir[0] == '~')
+ {
+ sprintf(str, "%s%s", getenv("HOME"), wl_office_working_dir+1);
+ free(wl_office_working_dir);
+ wl_office_working_dir = strdup(str);
+ }
+ mkdir(wl_office_working_dir, 0700);
+ }
+}
+
+void
+param_init()
+{
+ param_load_conf();
+ param_load_defaults();
+}
+
bltk-1.0.9-hdparm.patch:
bltk_get_hdparm.sh | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--- NEW FILE bltk-1.0.9-hdparm.patch ---
--- orig-1.0.9/tools/bltk/bltk_get_hdparm.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9/tools/bltk/bltk_get_hdparm.sh 2009-07-13 10:04:45.469891458 +0200
@@ -56,13 +56,10 @@
PARTITIONS=$1
-TMP_FILE=$BLTK_ROOT/tmp/hdparm
-
-#str=`df -lk / | grep -v ^Filesystem`
-str=`df -lk / | grep ^/dev/`
-DF_DEV_NAME=${str%% *}
-DF_NAME=${DF_DEV_NAME#/dev/}
+TMP_FILE=$BLTK_HOME/tmp/hdparm
+str=`ls -d /sys/block/sd* | sed 's/^.*sd/sd/'`
+DF_NAME=${str%% *}
HD_NAME=${DF_NAME%%[0-9]*}
grep -w "$HD_NAME" "$PARTITIONS" >/dev/null 2>&1
bltk-1.0.9-home_dir.patch:
bltk_get_dmidecode.sh | 2 +-
bltk_get_lspci.sh | 2 +-
bltk_get_user_field.sh | 2 +-
bltk_get_xdpyinfo.sh | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
--- NEW FILE bltk-1.0.9-home_dir.patch ---
--- orig-1.0.9/tools/bltk/bltk_get_dmidecode.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/bltk/bltk_get_dmidecode.sh 2009-07-17 11:03:54.741146665 +0200
@@ -76,7 +76,7 @@
shift $((OPTIND-1))
DMIDECODE=$*
- TMP_FILE=$BLTK_ROOT/tmp/dmidecode
+ TMP_FILE=$BLTK_HOME/tmp/dmidecode
if [[ -z $DMIDECODE ]]
then
--- orig-1.0.9/tools/bltk/bltk_get_lspci.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/bltk/bltk_get_lspci.sh 2009-07-17 11:03:54.739159007 +0200
@@ -56,7 +56,7 @@
echo "$PROG: Warning: $*" >&2
}
-TMP_FILE=$BLTK_ROOT/tmp/lspci
+TMP_FILE=$BLTK_HOME/tmp/lspci
if [[ -z $LSPCI ]]
then
--- orig-1.0.9/tools/bltk/bltk_get_user_field.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/bltk/bltk_get_user_field.sh 2009-07-17 11:03:54.789920943 +0200
@@ -57,7 +57,7 @@
FIELD_NO=$1
DELIM=$1
-TMP_FILE=$BLTK_ROOT/tmp/hdparm
+TMP_FILE=$BLTK_HOME/tmp/hdparm
#str=`df -lk / | grep -v ^Filesystem`
str=`df -lk / | grep ^/dev/`
--- orig-1.0.9/tools/bltk/bltk_get_xdpyinfo.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/bltk/bltk_get_xdpyinfo.sh 2009-07-17 11:03:54.764879831 +0200
@@ -42,7 +42,7 @@
unalias -a
XDPYINFO=$1
-TMP_FILE=$BLTK_ROOT/tmp/xdpyinfo
+TMP_FILE=$BLTK_HOME/tmp/xdpyinfo
if [[ -z $XDPYINFO ]]
then
bltk-1.0.9-installed.patch:
bltk_check.sh | 3 ++-
bltk_wl_common.sh | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
--- NEW FILE bltk-1.0.9-installed.patch ---
--- orig-1.0.9/tools/bltk/bltk_check.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/bltk/bltk_check.sh 2009-07-17 11:03:54.764879831 +0200
@@ -38,6 +38,7 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
+. /etc/bltk.conf
source `dirname $0`/bltk_wl_common
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
@@ -120,7 +121,7 @@
wl=${WLA[wl_cnt]}
WL_RES=$RES/$wl.results
echo "=== Workload '$wl'"
- if [[ ! -f $BLTK_ROOT/wl_$wl/.installed && $wl != idle && $wl != reader ]]
+ if [[ $CHK_INSTALLED = "YES" && ! -f $BLTK_ROOT/wl_$wl/.installed && $wl != idle && $wl != reader ]]
then
echo "not installed";
WLR[wl_cnt]="not installed"
--- orig-1.0.9/tools/bltk/bltk_wl_common.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/bltk/bltk_wl_common.sh 2009-07-17 11:03:54.742158129 +0200
@@ -374,7 +375,7 @@
{
typeset wl=$1
- if [[ ! -a $BLTK_WL_INSTALL_FILE ]]
+ if [[ $CHK_INSTALLED = "YES" && ! -a $BLTK_WL_INSTALL_FILE ]]
then
wl_error_msg "Installation is not completed, perform 'make install-$wl'"
return 1
bltk-1.0.9-man.patch:
bltk.1 | 313 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
bltk.conf.5 | 73 +++++++++++++
bltk_report.1 | 167 ++++++++++++++++++++++++++++++
3 files changed, 553 insertions(+)
--- NEW FILE bltk-1.0.9-man.patch ---
--- curr-1.0.9/doc/bltk.1 1970-01-01 01:00:00.000000000 +0100
+++ curr-1.0.9-1/doc/bltk.1 2009-07-21 14:17:29.191118317 +0200
@@ -0,0 +1,313 @@
+.TH BLTK 1 "15 July 2008" "BLTK" "Battery life tool kit"
+.SH NAME
+bltk \- tool kit is used to measure battery life and performance under
+different workloads on Linux.
+.SH SYNOPSIS
+.B bltk
+[\-hVvaNAcCBXswiIRDPGOYZyQzxul] [\-t sec] [\-r results_dir]
+[\-m {0,1}] [\-U path] [\-g setup] [\-J pid] [\-T time]
+[\-F file] [\-W app] [\-L title] [\-K comment] [\-e app]
+[\-E app] [\-p percent] [\-d percent] [\-o {0,1,2}] [\-q file]
+[\-b percent] [\-f command] [\-k num]
+.SH DESCRIPTION
+\fBThe BLTK\fR can be used with various workloads to simulate different types of laptop usage. The following workloads are currently implemented:
+.RS
+.TP
+\fBIdle workload\fR
+collect statistics only (mostly used to measure battery life)
+.TP
+\fBDeveloper workload\fR
+simulates code development in Linux environment
+.TP
+\fBReader workload\fR
+simulates text reading on laptop (mostly used to measure battery life)
+.TP
+\fBPlayback workload\fR
+simulates laptop entertaining usage (produces constant average load on the system)
+.TP
+\fB3d game workload\fR
+simulates 3D-gaming on laptop (Unreal Tournament demo is used to create this workload)
+.TP
+\fBOffice Activity workload\fR
+simulates laptop usage for different office activities (based on OpenOffice.org office suit)
+.RE
+.PP
+When started, test collects platform/OS initial info and if it's OK prompts
+user to unplug AC adapter. After cable unplugged, workload started. During the
+workload execution test harness collects various system information (e.g.
+CPU load, battery drain, display state, CPU frequency, etc...). After battery
+completely discharged user should plug the AC cable back and boot the system.
+When it is done the results are available.
+.PP
+There are several tools for result evaluation. They allow creating report file
+for test run, to gather results into a table for system comparison, and
+to draw graphs for different purposes.
+.PP
+\fBResults\fR \- after the battery dies and the system booted back, the results are
+available. They are stored in 'bltk/<wokload_name>.results' directory (or in the directory, specified in \-r option). If target directory already exist the tool
+will add numeric extension to its name (.001, .002 e.t.c.) The results consist of the
+following files (see below for detailed description):
+.TP
+.B cmd
+In this file 'bltk' command with arguments are stored
+.TP
+.B infoi<N>.log (info1.log, info2.log, ...)
+Here initial system info is stored. Another two files (info1.log,
+info2.log) contains system info after AC adapter was unplugged, and on 5%
+battery capacity remained. They are used to check whether any changes occurred
+during test execution.
+.TP
+.B stat.log
+Statistics generated by bltk harness are stored here. One statistic line generated per 1 minute (or per number of seconds, specified in -t option).
+.TP
+.B system<N>
+When -k 1 is used, the system information is stored under this directory. The numbers at the end of directory name have the following meanings:
+.RS
+.TP
+.B 0
+initial system info
+.TP
+.B 1
+system info after AC adapter was unplugged
+.TP
+.B 2
+system info on 5% battery capacity remained
+.RE
+.TP
+.B version
+this file contains version information
+.TP
+.B workload
+the file contains info about workload
+.TP
+.B work_out.log
+.TP
+.B err.log
+There are stored any error messages
+.TP
+.B warning.log
+Contains warnings
+.TP
+.B work.log
+Strings generated by USR1, USR2 signals from workload. String format is the same as in the 'stat.log' file.
+.TP
+.B fail
+when test fails
+.TP
+.B score
+.TP
+.B Report
+.TP
+.B Report.table
+.SH OPTIONS
+.TP
+.BR "\-h" , " \--help"
+Help; display a help message and then exits.
+.TP
+.BR "\-V", " \--version"
+Version; display version number and then exits.
+.TP
+.BR "\-v", " \--verbose"
+Verbose
+.TP
+.BR "\-a", " \--ac-ignore"
+ignore ac adapter state check (on/off)
+.TP
+.BR "\-N", " \--time-stat-ignore"
+disable time statistics
+.TP
+.BR "\-A", " \--ac-stat-ignore"
+disable ac adapter statistics
+.TP
+.BR "\-c", " \--cpu-stat-ignore"
+disable cpu load statistics
+.TP
+.BR "\-C", " \--cpu-add-stat-ignore"
+disable cpu additional statistics
+.TP
+.BR "\-B", " \--bat-stat-ignore"
+disable battery statistics
+.TP
+.BR "\-X", " \--disp-stat-ignore"
+Disable display state statistics
+.TP
+.BR "\-H", " \--hd-stat-ignore"
+disable hard drive state statistics
+.TP
+.BR "\-t " seconds, " \--report-time " seconds
+frequency of report line generation in seconds
+.TP
+.BR "\-r " results_dir, " \--results " results_dir
+name of results directory
+.TP
+.BR "\-s", " \--stat-ignore"
+disable all statistics
+.TP
+.BR "\-w", " \--work-stat-ignore"
+disable workload statistics
+.TP
+.BR "\-m " {0,1}, " \--stat-memory " {0,1}
+dump statistics directly on disk or keep in memory, if statistics are kept in memory, it will be dumped on disk at low battery capacity, or at the test end
+.RS
+.TP
+.B 0
+disk
+.TP
+.B 1
+memory (by default)
+.RE
+.TP
+.BR "\-i", " \--idle-test"
+idle test
+.TP
+.BR "\-I", " \--idle"
+idle workload
+.TP
+.BR "\-R", " \--reader"
+reader workload
+.TP
+.BR "\-D", " \--developer"
+developer workload
+.TP
+.BR "\-P", ' \--player"
+playback workload
+.TP
+.BR "\-G", " \--game"
+3D-gaming workload
+.TP
+.BR "\-O", " \--office"
+office productivity workload
+.TP
+.BR "\-U " path, " \--user " path
+user-specified workload (path to executable)
+.TP
+.BR "\-g " routine, " \--user-init " routine"
+setup routines for user-specified workload
+.TP
+.BR "\-Y", " \--discharging"
+battery discharge mode
+.TP
+.BR "\-Z", " \--charging"
+battery charge mode
+.TP
+.BR "\-J " pid, " \--jobs " pid
+make jobs number
+.TP
+.BR "\-T " seconds, " \--time " seconds
+workload time
+.TP
+.BR "\-F", " \--file"
+workload file
+.TP
+.BR "\-W", " \--prog"
+workload program
+ name of player (player workload, default 'mplayer')
+ name of web-browser (reader workload, default 'firefox')
+.TP
+.BR "\-L", " \--title"
+title of web-browser document
+.TP
+.BR "\-M", " \--manufacturer"
+enable time and cpu load statistics only
+.TP
+.BR "\-S", " \--show"
+demo/debug mode, one iteration only
+.TP
+.BR "\-n", " \--show-num"
+demo/debug mode, 'show-num' iteration
+.TP
+.BR "\-j", " \--show-cnt"
+demo/debug mode, 'show-cnt' sub iteration
+.TP
+.BR "\-T " seconds, " \--show-time " seconds
+demo/debug mode, debug time
+.TP
+.BR "\-K " comment, " \--comment " comment
+user comment for report
+.TP
+.BR "\-e " application, " \--init-prog " application
+run program before test starting
+.TP
+.BR "\-E " application, " \--init-prog-su " application
+run program as root before test starting
+.TP
+.BR "\-y", " \--yes"
+auto 'yes' answer to all questions
+.TP
+.BR "\-Q", " \--debug"
+debug workload (see cpu-load and disp-load below)
+.TP
+.BR "\-p " percent, " \--cpu-load " percent
+debug workload, the time cpu loaded in percent
+.TP
+.BR "\-d " percent, " \--disp-load " percent
+Debug workload, the time display on in percent
+.TP
+.BR "\-o " {0,1,2}, " \--output " {0,1,2}
+direct workload output:
+.RS
+.TP
+.B 0
+file
+.TP
+.B 1
+file and console
+.TP
+.B 2
+/dev/null, other - console
+.RE
+.TP
+.BR "\-z", " \--debug-vars"
+debug option
+.TP
+.BR "\-q " file, " \--debug-vars-file " file
+debug option - debug variables file
+.TP
+.BR "\-x", " \--dpms"
+debug option - try to use display power management
+.TP
+.BR "\-u", " \--spy"
+debug option - try to find out unexpected system activity
+.TP
+.BR "\-l", " \--simul-laptop"
+debug option, laptop simulation
+.TP
+.BR "\-b " percent, " \--bat-sync " percent
+debug option, battery critical capacity, default 5%
+.TP
+.BR "\-f " command, " \--user-field " command
+the output of user-specified command being added to statistics
+Example:
+ -f "cat /proc/acpi/thermal_zone/TZ01/temperature | awk '{print \$2}'"
+.TP
+.BR "\-k " num, " \--stat-system " num
+debug option, save system files, default 0
+.SH EXAMPLES
+.TP
+bltk -I or --idle
+idle workload running
+.TP
+bltk -R or --reader
+reader workload running
+.TP
+bltk -D or --developer
+developer workload running
+.TP
+bltk -O or --office
+office workload running
+.TP
+bltk -P or --player
+player workload running
+.TP
+bltk -G or --game
+game workload running
+.TP
+bltk -i or --idle-test -T 60 -t 1
+idle test running for 60 seconds, stats interval 1 second
+.SH SEE ALSO
+\fBbltk.conf\fR(5), \fBbltk_report\fR(1)
+.SH AUTHOR
+.nf
+Konstantin Karasyov <konstantin.a.karasyov at intel.com>
+Vladimir Lebedev <vladimir.p.lebedev at intel.com>
+.fi
--- curr-1.0.9/doc/bltk_report.1 1970-01-01 01:00:00.000000000 +0100
+++ curr-1.0.9-1/doc/bltk_report.1 2009-07-21 15:31:40.943332988 +0200
@@ -0,0 +1,167 @@
+.TH BLTK_REPORT 1 "15 July 2008" "BLTK_REPORT"
+.SH NAME
+bltk_report \- automated report creation
+bltk_report_table \- summary table creation from several results folders
+bltk_plot \- graph drawing
+.SH SYNOPSIS
+.B bltk_report
+[\-hdofI013EiS] [\-r ] [\-s ] [\-b ] [\-c ]
+[\-U ] [\-B ] [\-D ] [\-C ] [\-P ] [\-K ] [\-R ]
+[\-2 ] [\-4 ] directory...
+.PP
+.B
+bltk_report_table
+[\-hdstfuEe13SR] [\-2 ] [\-4 ] [\-F ] directory ...
+.PP
+.B bltk_plot
+[\-hDswy1vnr] [\-d ] [\-f ] [\-x ] [\-X ] [\-Y ]
+[\-t ] [\-o ] [\-2 ] [\-p ] results_dir ...
+.SH DESCRIPTION
+The following tools are implemented for results analysis:
+.TP
+.B bltk_report
+automated report creation
+.TP
+.B bltk_report_table
+summary table creation from several results folders
+.TP
+.B bltk_plot
+graph drawing
+.SH GENERAL OPTIONS
+.TP
+.B \-h
+theis help
+.TP
+.B \-1
+first statistic item of score file is ignored
+.TP
+.BR "\-2 " item:num
+statistic from item 'item', 'num' number of score file
+.TP
+.B -f
+statistics file name
+.SH SPECIFIC OPTIONS
+.B bltk_report
+.RS
+.TP
+.B \-o
+print report to output
+.TP
+.BR "\-K " string
+comment string
+.TP
+.BR "\-R " filename
+argument will be used as report file name
+.TP
+.B \-3
+first statistic item of stat.log file is ignored
+.TP
+.BR "\-4 " item:num
+statistic from item 'item', 'num' number of stat.log file
+.TP
+.B \-E
+errors being ignored (allows to create report file anyway)
+.TP
+.B \-i
+idle mode
+.RE
+.PP
+.B bltk_report_table
+.RS
+.TP
+.B \-d
+debugging mode
+.TP
+.B \-s
+sort result lines
+.TP
+.B \-t
+Excel-compatible file format
+.TP
+.B \-3
+first statistic item of stat.log file is ignored
+.TP
+.BR "\-4 " item:num
+statistic from item 'item', 'num' number of stat.log file
+.TP
+.B \-u
+only columns which contain different values will be included into table
+.TP
+.B \-E
+errors being ignored (allows to create result table anyway)
+.TP
+.B \-e
+skip error results
+.TP
+.BR "\-F " filter
+only fields from filter file will be included into table (see doc/filter as an example)
+.TP
+.B \-S
+split mode - split multiple values to columns
+.TP
+.B \-R
+analyze all results dirs under passed directories
+.RE
+.PP
+.B bltk_plot
+.RS
+.TP
+.B \-D
+debugging mode
+.TP
+.BR "\-d " results_dir
+results directory name. This option could be passed several times default is current directory.
+.TP
+.B \-s
+use stat.log file
+.TP
+.B \-w
+use work.log file
+.TP
+.BR "\-x " name
+argument is used to be an X parameter default is 'time' field
+.TP
+.BR "\-y " name ...
+argument is used to be an Y parameter this option could be passed several times default is 'cap' field
+.TP
+.BR "\-X " x1:x2
+x range from x1 to x2
+.TP
+.BR "\-Y " y1:y2
+y range from y1 to y2
+.TP
+.B \-t title
+graph title
+.TP
+.BR "\-o " options
+options passed to 'plot' command
+.TP
+.B \-v
+print current variables
+.TP
+.BR "\-p " file
+save graph to specified file
+.TP
+.B \-n
+print available field's names
+.TP
+.B \-R
+analyze all results dirs under passed directories
+.RE
+.SH EXAMPLE
+.TP
+bltk_report_table <results1> ... <resultsn> >sum
+Common results table will be generated in 'sum' file for <results1> ... <resultsn> directories.
+.TP
+bltk_report result
+\'Report\' file will be generated in results directory
+.TP
+bltk_plot -y bat -x N <results_dir1> ... <results_dir>
+Common graph will be generated for <results_dir1> ... <results_dirn>
+.SH SEE ALSO
+\fBbltk\fR(1), \fBbltk.conf\fR(5)
+.SH AUTHOR
+.nf
+Konstantin Karasyov <konstantin.a.karasyov at intel.com>
+Vladimir Lebedev <vladimir.p.lebedev at intel.com>
+.fi
--- curr-1.0.9/doc/bltk.conf.5 1970-01-01 01:00:00.000000000 +0100
+++ curr-1.0.9-1/doc/bltk.conf.5 2009-07-17 11:03:54.891127310 +0200
@@ -0,0 +1,73 @@
+.TH BLTK.CONF 5 "15 July 2009" "BLTK.CONF" "Battery life tool kit configuration"
+.SH NAME
+bltk.conf - config file for bltk
+.SH DESCRIPTION
+bltk.conf may be used to control particular features of bltk. By default, bltk looks for the file in /etc direcotry.
+.SH FORMAT
+The format of bltk.conf is very simple. Each line is either a comment or a directive. Comment lines start with a # and are ignored. A directive line has the format:
+.PP
+option=value
+.PP
+It is important to note that it is an error to put any space between the option, = and value.
+.PP
+Each setting has a compiled in default which may be modified in the configuration file.
+.SH .BOOLEAN OPTIONS
+Below is a list of boolean options. The value for a boolean option may be set to YES or NO.
+.TP
+.B CHK_INSTALLED
+If set to YES, existance of .installed files is checked for.
+.TP
+.B WL_DEVELOPER_ENABLED
+Controls whether developer workload is enabled.
+.TP
+.B WL_DEVELOPER_EXTERN
+Controls whether external sources are used to build workload application.
+.TP
+.B WL_GAME_ENABLED
+Controls whether game workload is enabled.
+.TP
+.B WL_GAME_EXTERN
+Controls whether external sources are used to build workload application.
+.TP
+.B WL_OFFICE_ENABLED
+Controls whether office workload is enabled.
+.TP
+.B WL_OFFICE_EXTERN
+Controls whether external sources are used to build workload application.
+.TP
+.B WL_PLAYER_ENABLED
+Controls whether player workload is enabled
+.TP
+.B WL_PLAYER_EXTERN
+Controls whether external sources are used to build workload application.
+.TP
+.B WL_READER_ENABLED
+Controls whether reader workload is enabled.
+.TP
+.B WL_READER_EXTERN
+Controls whether external sources are used to build workload application.
+.SH .STRING OPTIONS
+.B BLTK_HOME
+This option specifies the location of BLTK's home directory. This directory is used as starting directory for saving results and temporary files.
+.TP
+.B SOFFICE_PROG
+This option specifies an application to be started when office workload is used.
+.TP
+.B WL_OFFICE_WORKING_DIR
+The option specifies working directory for office workload.
+.TP
+.B BLTK_PLAYER_PROG
+The option replaces default aplication to be used for playing audio/video
+.TP
+.B BLTK_PLAYER_FILE
+The option replaces default source to be played.
+.TP
+.B BLTK_READER_PROG
+The option replaces default aplication to be used for reading a document.
+.TP
+.B BLTK_READER_FILE
+The option replaces default document to be read.
+.SH SEE ALSO
+\fBbltk\fR(1)
+.SH AUTHOR
+jskala at redhat.com
bltk-1.0.9-office_scen.patch:
scen | 26 +++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)
--- NEW FILE bltk-1.0.9-office_scen.patch ---
--- orig-1.0.9/wl_office/scen 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/wl_office/scen 2009-07-28 15:57:52.376603496 +0200
@@ -20,8 +20,6 @@
PRESSKEY 0 2 3000 Return
DELAY 0 0 3000 0
-#PRESSKEY A 0 1000 e
-#PRESSKEY 0 11 150 Down
PRESSKEY C 0 1000 f
DELAY 0 0 2000 0
PRESSKEY 0 0 2000 Return
@@ -35,7 +33,7 @@
DELAY 0 0 2000 0
PRESSKEY A 0 3000 l
-SETWINDOW 0 0 0 \"OpenOffice.org 3.0 \":
+SETWINDOW 0 0 0 \"OpenOffice.org .* \":
FOCUSIN 0 0 150 0
DELAY 0 0 3000 0
@@ -43,7 +41,7 @@
RELEASEKEY 0 0 1000 Return
DELAY 0 0 2000 0
-ENDWINDOW 0 0 0 \"OpenOffice.org 3.0 \":
+ENDWINDOW 0 0 0 \"OpenOffice.org .* \":
SETWINDOW 0 0 0 Find & Replace
@@ -63,14 +61,10 @@
PRESSKEY 0 2 3000 Return
DELAY 0 0 3000 0
-#PRESSKEY A 0 1000 f
-#PRESSKEY 0 4 150 Down
PRESSKEY C 0 1000 s
DELAY 0 0 2000 0
-PRESSKEY A 0 1000 f
-PRESSKEY 0 18 150 Down
+PRESSKEY C 0 1000 Q
DELAY 0 0 3000 0
-PRESSKEY 0 0 6000 Return
ENDWINDOW 0 0 0 OOWRITER_FILE.odt
@@ -156,14 +150,10 @@
TYPETEXT 0 0 150 Total Pays
DELAY 0 0 3000 0
-#PRESSKEY A 0 1000 f
-#PRESSKEY 0 4 150 Down
PRESSKEY C 0 1000 s
DELAY 0 0 2000 0
-PRESSKEY A 0 1000 f
-PRESSKEY 0 18 150 Down
+PRESSKEY C 0 150 Q
DELAY 0 0 3000 0
-PRESSKEY 0 0 5000 Return
ENDWINDOW 0 0 0 OOCALC_FILE.ods
@@ -187,7 +177,7 @@
PRESSKEY 0 0 1000 Tab
PRESSKEY A 0 1000 e
-PRESSKEY 0 5 150 Down
+PRESSKEY 0 0 150 e
DELAY 0 0 1000 0
PRESSKEY 0 0 500 Return
@@ -331,12 +322,10 @@
DELAY 0 0 3000 0
PRESSKEY 0 3 3000 Esc
-PRESSKEY A 0 1000 f
-PRESSKEY 0 0 150 s
+PRESSKEY C 0 1000 s
DELAY 0 0 3000 0
-PRESSKEY A 0 1000 f
-PRESSKEY 0 0 150 x
+PRESSKEY C 0 1000 Q
DELAY 0 0 3000 0
ENDWINDOW 0 0 0 OODRAW_FILE.odg
bltk-1.0.9-opt_developer.patch:
bltk_wl_developer.sh | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
--- NEW FILE bltk-1.0.9-opt_developer.patch ---
--- orig-1.0.9/wl_developer/bltk_wl_developer.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/wl_developer/bltk_wl_developer.sh 2009-07-17 11:03:54.857887762 +0200
@@ -38,9 +38,13 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
+. /etc/bltk.conf
+
source `dirname $0`/../../bin/bltk_wl_common
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
+export USER_DELAY_TMP=$BLTK_HOME/user_delay.tmp
+
startup()
{
trap 'cleanup 1; exit 1' 1 2 3 15
@@ -174,18 +176,18 @@
{
ST_TIME=`$BLTK_TIME_CMD`
- rm -f ./user_delay.tmp
+ rm -f $USER_DELAY_TMP
if [[ $BLTK_WL_FILE != DEBUG && $BLTK_WL_FILE != DEBUG1 ]]
then
run_cscope_vi
wl_check_error $?
else
sleep 1
- echo 1.11 >./user_delay.tmp
- wl_check_error $? "echo 0.11 >./user_delay.tmp failed"
+ echo 1.11 > $USER_DELAY_TMP
+ wl_check_error $? "echo 0.11 > $USER_DELAY_TMP failed"
fi
- CMD="cat ./user_delay.tmp"
+ CMD="cat $USER_DELAY_TMP"
DELAY_TIME=`$CMD`
wl_check_error $? "$CMD failed"
@@ -281,7 +283,15 @@
exit $1
}
-startup
-run
-cleanup 0
+if [ $WL_DEVELOPER_ENABLED = "YES" ]
+then
+ startup
+ run
+ cleanup 0
+else
+ TTY=`tty`
+ echo "WARNING!!!" > $TTY 2>&1
+ echo "The developer workload is disabled. See manual and use external package." > $TTY 2>&1
+ exit 0
+fi
bltk-1.0.9-opt_game.patch:
bltk_wl_game.sh | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
--- NEW FILE bltk-1.0.9-opt_game.patch ---
--- orig-1.0.9/wl_game/bltk_wl_game.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/wl_game/bltk_wl_game.sh 2009-07-17 11:03:54.891881334 +0200
@@ -22,16 +22,16 @@
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBGMORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BGM NOT
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBGMORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BGM NOT LIMITED
-# TO, PROCUREMENT OF SUBSTITGME GOODS OR SERVICES;
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OGM OF
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
@@ -40,8 +40,11 @@
set -x
+. /etc/bltk.conf
+
source `dirname $0`/../../bin/bltk_wl_common
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
+
startup()
{
trap 'cleanup 1; exit 1' 1 2 3 15
@@ -186,7 +189,15 @@
exit $1
}
-startup
-run
-cleanup 0
+if [ $WL_GAME_ENABLED = "YES" ]
+then
+ startup
+ run
+ cleanup 0
+else
+ TTY=`tty`
+ echo "WARNING!!!" > $TTY 2>&1
+ echo "The game workload is disabled. Read manual and use external package." > $TTY 2>&1
+ exit 0
+fi
bltk-1.0.9-opt_office.patch:
tools/bltk/bltk_wl_common.sh | 24 +++++++++++--
wl_office/bltk_wl_office.sh | 64 ++++++++++++++++++++++++++++--------
wl_office/bltk_wl_office_run_app.sh | 4 +-
3 files changed, 74 insertions(+), 18 deletions(-)
--- NEW FILE bltk-1.0.9-opt_office.patch ---
--- orig-1.0.9/wl_office/bltk_wl_office_run_app.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/wl_office/bltk_wl_office_run_app.sh 2009-07-17 11:03:54.896922872 +0200
@@ -38,12 +38,14 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
+. /etc/bltk.conf
unalias -a
SOFFICE_FLG="-minimized -invisible -norestore -quickstart -nologo -nolockcheck -nodefault"
+WL_OFFICE_WORKING_DIR=${WL_OFFICE_WORKING_DIR:-"~/.bltk"}
-$SOFFICE_PROG $SOFFICE_FLG $1 &
+$SOFFICE_PROG $SOFFICE_FLG $WL_OFFICE_WORKING_DIR/$1 &
exit $?
--- orig-1.0.9/wl_office/bltk_wl_office.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/wl_office/bltk_wl_office.sh 2009-07-17 11:03:55.016999320 +0200
@@ -38,11 +38,21 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
+. /etc/bltk.conf
+
source `dirname $0`/../../bin/bltk_wl_common
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
XSE_PROG="bltk_wl_office_xse"
+WL_OFFICE_WORKING_DIR=${WL_OFFICE_WORKING_DIR:-"~/.bltk"}
+cd $WL_OFFICE_WORKING_DIR
+WL_OFFICE_WORKING_DIR=`pwd`
+cd $OLDPWD
+
+export USER_DELAY_TMP=$BLTK_HOME/user_delay.tmp
+
+
startup()
{
trap 'cleanup 1; exit 1' 1 2 3 15
@@ -55,7 +65,14 @@
wl_check_install office
wl_check_error $?
- export SOFFICE_PROG=$HOME/soffice
+ wl_install_file 0644 text1 $WL_OFFICE_WORKING_DIR/text1
+ wl_check_error $?
+ wl_install_file 0644 text2 $WL_OFFICE_WORKING_DIR/text2
+ wl_check_error $?
+ wl_install_file 0644 text3 $WL_OFFICE_WORKING_DIR/text3
+ wl_check_error $?
+
+ export SOFFICE_PROG=${SOFFICE_PROG:-"$HOME/soffice"}
BLTK_WL_OFFICE_SCEN=$BLTK_WL_FILE
@@ -82,39 +99,44 @@
{
ST_TIME=`$BLTK_TIME_CMD`
- wl_remove_file OOWRITER_FILE.odt
+ wl_remove_file $WL_OFFICE_WORKING_DIR/OOWRITER_FILE.odt
wl_check_error $?
- wl_copy_file OOWRITER_FILE_SAMPLE.odt OOWRITER_FILE.odt
+ wl_install_file 0644 OOWRITER_FILE_SAMPLE.odt $WL_OFFICE_WORKING_DIR/OOWRITER_FILE.odt
wl_check_error $?
- wl_remove_file OOCALC_FILE.ods
+ wl_remove_file O$WL_OFFICE_WORKING_DIR/OCALC_FILE.ods
wl_check_error $?
- wl_copy_file OOCALC_FILE_SAMPLE.ods OOCALC_FILE.ods
+ wl_install_file 0644 OOCALC_FILE_SAMPLE.ods $WL_OFFICE_WORKING_DIR/OOCALC_FILE.ods
wl_check_error $?
- wl_remove_file OODRAW_FILE.odg
+ wl_remove_file $WL_OFFICE_WORKING_DIR/OODRAW_FILE.odg
wl_check_error $?
- wl_copy_file OODRAW_FILE_SAMPLE.odg OODRAW_FILE.odg
+ wl_install_file 0644 OODRAW_FILE_SAMPLE.odg $WL_OFFICE_WORKING_DIR/OODRAW_FILE.odg
wl_check_error $?
- wl_remove_file ./user_delay.tmp
+ wl_remove_file $USER_DELAY_TMP
wl_check_error $?
if [[ $BLTK_WL_OFFICE_SCEN = DEBUG ]]
then
sleep 1
- echo 0.11 > ./user_delay.tmp
- wl_check_error $? "echo 1.11 >./user_delay.tmp failed"
+ echo 0.11 > $USER_DELAY_TMP
+ wl_check_error $? "echo 1.11 > $USER_DELAY_TMP failed"
elif [[ -f "$BLTK_WL_OFFICE_SCEN" ]]
then
CMD="$BLTK_WL_BIN/$XSE_PROG $BLTK_WL_OFFICE_SCEN"
##### \time -p $CMD >./XSE.times 2>&1
$CMD
+ if [ -f $BLTK_STOP_FILE ]
+ then
+ ps -eopid,cmd | grep $WL_OFFICE_WORKING_DIR | sed 's/^ *//' | sed 's/ .*$//' | xargs kill -s SIGKILL
+ exit 0
+ fi
else
wl_check_error 1 "Cannot access $BLTK_WL_OFFICE_SCEN"
fi
- CMD="cat ./user_delay.tmp"
+ CMD="cat $USER_DELAY_TMP"
DELAY_TIME=`$CMD`
wl_check_error $? "$CMD failed"
@@ -159,6 +181,14 @@
echo "$CNT: Score $score" >$TTY 2>&1
}
+killchildproc()
+{
+ officeproc = ps -eopid,cmd | grep $WL_OFFICE_WORKING_DIR | sed 's/ .*$//'
+ for i in $officeproc; do
+ sudo kill -s SIFKILL $i
+ done
+}
+
run()
{
CNT=1
@@ -167,6 +197,7 @@
run1
if [[ $BLTK_SHOW_DEMO = TRUE && $CNT = $BLTK_SHOW_DEMO_NUM ]]
then
+ killchildproc
break
fi
(( CNT++ ))
@@ -179,7 +210,12 @@
exit $1
}
-startup
-run
-cleanup 0
+if [ "$WL_OFFICE_ENABLED" = "YES" ]
+then
+ startup
+ run
+ cleanup 0
+else
+ exit 0
+fi
--- orig-1.0.9/tools/bltk/bltk_wl_common.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/bltk/bltk_wl_common.sh 2009-07-17 11:03:54.742158129 +0200
@@ -38,6 +38,7 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
+. /etc/bltk.conf
unalias -a
@@ -130,7 +131,7 @@
export BLTK_BIN=$BLTK_ROOT/bin
export BLTK_LIB=$BLTK_ROOT/lib
- export BLTK_TMP=$BLTK_ROOT/tmp
+ export BLTK_TMP=$HOME/.bltk/tmp
[[ -z $BLTK_SUDO_CMD ]] && export BLTK_SUDO_CMD=$BLTK_BIN/bltk_sudo
[[ -z $BLTK_CALC_CMD ]] && export BLTK_CALC_CMD=$BLTK_BIN/bltk_calc
@@ -180,7 +181,7 @@
export BLTK_BIN=$BLTK_ROOT/bin
export BLTK_LIB=$BLTK_ROOT/lib
- export BLTK_TMP=$BLTK_ROOT/tmp
+ export BLTK_TMP=$HOME/.bltk/tmp
export BLTK_EXTERN_SRC=$BLTK_ROOT/extern
# export BLTK_EXTERN_TGT=$BLTK_ROOT/extern
@@ -228,7 +229,7 @@
wl_error_msg "cd $BLTK_WL_ROOT failed"
return 1
fi
- rm -f fail
+ rm -f $BLTK_FAIL_NAME
RES_SCORE=$BLTK_RESULTS/score
[[ -a $RES_SCORE ]] && rm $RES_SCORE
@@ -626,3 +627,20 @@
return 0
}
+wl_install_file()
+{
+ typeset access=$1
+ typeset file1=$2
+ typeset file2=$3
+
+ CMD="install -m $access $file1 $file2"
+ $CMD
+ if [[ $? != 0 ]]
+ then
+ wl_error_msg "$CMD failed"
+ wl_error_msg "Cannot copy $file1 to $file2"
+ return 1
+ fi
+ return 0
+}
+
bltk-1.0.9-opt_player.patch:
bltk_wl_player.sh | 49 ++++++++++++++++++++++--------------------
bltk_wl_player_make_binary.sh | 16 ++++++++-----
2 files changed, 36 insertions(+), 29 deletions(-)
--- NEW FILE bltk-1.0.9-opt_player.patch ---
--- orig-1.0.9/wl_player/bltk_wl_player_make_binary.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/wl_player/bltk_wl_player_make_binary.sh 2009-07-17 11:03:55.178141070 +0200
@@ -108,9 +108,13 @@
return 0
}
-{
-startup
-make_mplayer_bin
-cleanup 0
-}
-
+if [[ "$WL_PLAYER_ENABLED" = "YES" && "$WL_PLAYER_EXTERN" = "YES" ]]
+then
+ {
+ startup
+ make_mplayer_bin
+ cleanup 0
+ }
+else
+ exit 0
+fi
--- orig-1.0.9/wl_player/bltk_wl_player.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/wl_player/bltk_wl_player.sh 2009-07-17 11:03:55.189691473 +0200
@@ -38,6 +38,9 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
+BLTK_PLAYER_PROG_FLG=
+
+. /etc/bltk.conf
source `dirname $0`/../../bin/bltk_wl_common
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
@@ -54,27 +57,22 @@
wl_check_install player
wl_check_error $?
- if [[ $BLTK_WL_FILE = DEBUG ]]
+ if [[ $BLTK_PLAYER_FILE = DEBUG ]]
then
- BLTK_WL_FILE=
+ BLTK_PLAYER_FILE=
fi
- if [ $PLAY_MD != "dvd://" -a $PLAY_MD != "vcd://" ]
+ if [[ -z $BLTK_PLAYER_FILE ]]
then
- BLTK_WL_FILE=$BLTK_EXTERN_SRC_WL_PLAYER/$PLAY_MD
- else
- set_dvd_config
- BLTK_WL_FILE=$PLAY_MD
+ BLTK_PLAYER_FILE="dvd://"
fi
-echo ALEX DEBUG BLTK_WL_FILE is $BLTK_WL_FILE
-
- if [[ -z $BLTK_WL_PROG ]]
- then
- BLTK_WL_PROG=$BLTK_EXTERN_TGT_WL_PLAYER/mplayer/bin/mplayer
- fi
- if [[ -z $BLTK_WL_PROG_FLG ]]
+ if [[ -z $BLTK_PLAYER_PROG ]]
then
- BLTK_WL_PROG_FLG="-fs -quiet"
+ BLTK_PLAYER_PROG=$BLTK_EXTERN_TGT_WL_PLAYER/mplayer/bin/mplayer
+ if [[ -z $BLTK_PLAYER_PROG_FLG ]]
+ then
+ BLTK_PLAYER_PROG_FLG="-fs -quiet"
+ fi
fi
if [[ -z $BLTK_SHOW_DEMO_NUM ]]
@@ -86,13 +84,13 @@
export BLTK_SHOW_DEMO_TIME=60
fi
- wl_check_prog $BLTK_WL_PROG
+ wl_check_prog $BLTK_PLAYER_PROG
wl_check_error $?
- wl_check_run_prog $BLTK_WL_PROG
+ wl_check_run_prog $BLTK_PLAYER_PROG
wl_check_error $?
- wl_check_all_run_prog $BLTK_WL_PROG
+ wl_check_all_run_prog $BLTK_PLAYER_PROG
wl_check_error $?
### env | sort >env.log
}
@@ -122,14 +120,14 @@
{
ST_TIME=`$BLTK_TIME_CMD`
- CMD="$BLTK_WL_PROG $BLTK_WL_PROG_FLG $BLTK_WL_FILE"
+ CMD="$BLTK_PLAYER_PROG $BLTK_WL_PROG_FLG $BLTK_PLAYER_FILE"
if [[ $BLTK_SHOW_DEMO = TRUE && $BLTK_SHOW_DEMO_TIME != 0 ]]
then
$CMD &
wl_check_error $? "CMD failed"
pid=$!
sleep $BLTK_SHOW_DEMO_TIME
- prog=`basename $BLTK_WL_PROG`
+ prog=`basename $BLTK_PLAYER_PROG`
pgrep $prog
wl_check_error $? "$prog is not running"
/bin/kill -QUIT $pid >/dev/null 2>&1
@@ -180,7 +178,12 @@
exit $1
}
-startup
-run
-cleanup 0
+if [ "$WL_PLAYER_ENABLED" = "YES" ]
+then
+ startup
+ run
+ cleanup 0
+else
+ exit 0
+fi
bltk-1.0.9-opt_reader.patch:
bltk_wl_reader.sh | 57 ++++++++++++++++++++++++++++++++++-----------------
bltk_wl_reader_xse.c | 2 -
2 files changed, 39 insertions(+), 20 deletions(-)
--- NEW FILE bltk-1.0.9-opt_reader.patch ---
--- orig-1.0.9/wl_reader/bltk_wl_reader.sh 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/wl_reader/bltk_wl_reader.sh 2009-07-17 11:03:55.065881503 +0200
@@ -38,6 +38,7 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
+. /etc/bltk.conf
source `dirname $0`/../../bin/bltk_wl_common
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
@@ -48,6 +49,13 @@
XSE_PROG="bltk_wl_reader_xse"
+WL_READER_WORKING_DIR=${WL_READER_WORKING_DIR:-"~/.bltk"}
+cd $WL_READER_WORKING_DIR
+WL_READER_WORKING_DIR=`pwd`
+cd $OLDPWD
+
+export USER_DELAY_TMP=$BLTK_HOME/user_delay.tmp
+
startup()
{
trap 'cleanup 1; exit 1' 1 2 3 15
@@ -58,35 +66,35 @@
### wl_check_install reader
### wl_check_error $?
- if [[ -z $BLTK_WL_PROG ]]
+ if [[ -z $BLTK_READER_PROG ]]
then
- export BLTK_WL_PROG=$DEF_BROWSER
- export BLTK_WL_PROG_FLG=
+ export BLTK_READER_PROG=$DEF_BROWSER
+ export BLTK_READER_PROG_FLG=
fi
- wl_check_prog $BLTK_WL_PROG
+ wl_check_prog $BLTK_READER_PROG
wl_check_error $?
- wl_check_run_prog $BLTK_WL_PROG
+ wl_check_run_prog $BLTK_READER_PROG
wl_check_error $?
- echo "Browser $BLTK_WL_PROG"
+ echo "Browser $BLTK_READER_PROG"
- wl_check_all_run_prog $BLTK_WL_PROG
+ wl_check_all_run_prog $BLTK_READER_PROG
wl_check_error $?
tmp_reader_file=/tmp/$DEF_FILE
- if [[ $BLTK_WL_FILE = DEBUG ]]
+ if [[ $BLTK_READER_FILE = DEBUG ]]
then
- BLTK_WL_FILE=
+ BLTK_READER_FILE=
fi
- if [[ ! -z $BLTK_WL_FILE ]]
+ if [[ ! -z $BLTK_READER_FILE ]]
then
- reader_file=$BLTK_WL_FILE
+ reader_file=$BLTK_READER_FILE
title="$BLTK_WL_TITLE"
- flags="$BLTK_WL_PROG_FLG"
+ flags="$BLTK_READER_PROG_FLG"
else
default_flg=TRUE
reader_file=$DEF_FILE
@@ -139,13 +147,13 @@
{
ST_TIME=`$BLTK_TIME_CMD`
- rm -f ./user_delay.tmp
+ rm -f $USER_DELAY_TMP
- CMD="$BLTK_WL_PROG $BLTK_WL_PROG_FLG $reader_file"
+ CMD="$BLTK_READER_PROG $BLTK_WL_PROG_FLG $reader_file"
$CMD &
wl_check_error $? "$CMD failed"
- BLTK_WL_ALL_PROC_NAME="$BLTK_WL_ALL_PROC_NAME $BLTK_WL_PROG"
+ BLTK_WL_ALL_PROC_NAME="$BLTK_WL_ALL_PROC_NAME $BLTK_READER_PROG"
windowid=`bltk_winid -S "$title"`
wl_check_error $? "Cannot get windowid of $BLTK_WL_PRO"
@@ -157,11 +165,17 @@
CMD="$BLTK_WL_BIN/$XSE_PROG"
$CMD
+ if [ -f $BLTK_STOP_FILE ]
+ then
+ ps -eopid,cmd | grep $BLTK_READER_PROG | sed 's/^ *//' | sed 's/ .*$//' | xargs kill -s SIGKILL
+ exit 0
+ fi
+
wl_check_error $? "$CMD failed"
BLTK_WL_PROC_NAME="$BLTK_WL_PROC_NAME $XSE_PROG"
- CMD="cat ./user_delay.tmp"
+ CMD="cat $USER_DELAY_TMP"
DELAY_TIME=`$CMD`
wl_check_error $? "$CMD failed"
@@ -200,7 +214,12 @@
exit $1
}
-startup
-run
-cleanup 0
+if [ "$WL_READER_ENABLED" = "YES" ]
+then
+ startup
+ run
+ cleanup 0
+else
+ exit 0
+fi
--- orig-1.0.9/wl_reader/bltk_wl_reader_xse.c 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/wl_reader/bltk_wl_reader_xse.c 2009-07-17 11:03:55.065881503 +0200
@@ -108,7 +108,7 @@
}
}
- env = getenv("BLTK_WL_PROG");
+ env = getenv("BLTK_READER_PROG");
if (env && strcmp(env, "konqueror") == 0) {
scen[LINE_QUIT].string = "Q";
}
bltk-1.0.9-sudo.patch:
Makefile | 2 ++
1 file changed, 2 insertions(+)
--- NEW FILE bltk-1.0.9-sudo.patch ---
--- orig-1.0.9/tools/sudo/Makefile 2009-04-10 09:14:20.000000000 +0200
+++ curr-1.0.9-1/tools/sudo/Makefile 2009-07-17 11:03:54.716132089 +0200
@@ -34,8 +34,10 @@
install : FORCE
+ifndef PACKAGE_BUILD
@echo Root password is required
@su root -c "chown root:root $(TARGETS); chmod +s $(TARGETS)"
+endif
clean :
@$(RM) $(TARGETS) *.o $(SHTARGETS) *~
bltk-1.0.9-xse.patch:
include/xse.h | 3 ++-
tools/bltk/main.c | 3 ++-
tools/xse/Makefile | 4 ++--
tools/xse/xse.c | 43 +++++++++++++++++++++++++++++++++++++------
wl_developer/Makefile | 4 ++--
wl_game/Makefile | 4 ++--
wl_office/Makefile | 6 +++---
wl_reader/Makefile | 4 ++--
8 files changed, 52 insertions(+), 19 deletions(-)
--- NEW FILE bltk-1.0.9-xse.patch ---
diff -up bltk/include/xse.h.xse bltk/include/xse.h
--- bltk/include/xse.h.xse 2009-04-10 09:14:20.000000000 +0200
+++ bltk/include/xse.h 2009-07-29 11:14:00.971521183 +0200
@@ -87,7 +87,8 @@
#define DELAY_1_MIN (1 * 60 * 1000)
#define DELAY_2_MIN (2 * 60 * 1000)
#define WINDOWID "WINDOWID"
-#define DELAY_FILE "./user_delay.tmp"
+#define DELAY_FILE "user_delay.tmp"
+#define WINID_FILE "winid.tmp"
#define VI_CMD "vi"
#define CSCOPE_CMD "cscope"
#define F4 "F4"
diff -up bltk/tools/bltk/main.c.xse bltk/tools/bltk/main.c
--- bltk/tools/bltk/main.c.xse 2009-07-29 11:14:00.915494499 +0200
+++ bltk/tools/bltk/main.c 2009-07-29 11:14:00.989494544 +0200
@@ -329,6 +329,7 @@ static void create_version_file(char *wl
static void get_info(int no);
static int sig_abort_flg = 0;
+static int sig_hup_flg = 0;
static int help_cnt = 0;
static int version_flg = 0;
@@ -540,7 +541,7 @@ void handler(int sig)
turn_off_stat_memory();
if (sig == SIGHUP) {
- set_signal(SIGHUP);
+ create_stop_file();
return;
}
diff -up bltk/tools/xse/Makefile.xse bltk/tools/xse/Makefile
--- bltk/tools/xse/Makefile.xse 2009-04-10 09:14:20.000000000 +0200
+++ bltk/tools/xse/Makefile 2009-07-29 11:14:00.972554857 +0200
@@ -1,10 +1,10 @@
CFLAGS = -Wall -pedantic -std=c99 -g -O2 -I ../../include -fPIC
-LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -Wl,-soname -Wl,libxse.so.0
LIB = ../../lib
-LIBNAME = libxse.so
+LIBNAME = libxse.so.0
TARGET = $(LIB)/$(LIBNAME)
FILES = xse
OFILES = ${FILES:=.o}
diff -up bltk/tools/xse/xse.c.xse bltk/tools/xse/xse.c
--- bltk/tools/xse/xse.c.xse 2009-04-10 09:14:20.000000000 +0200
+++ bltk/tools/xse/xse.c 2009-07-29 11:14:00.970496029 +0200
@@ -52,16 +52,20 @@
#include <time.h>
#include <sys/wait.h>
#include <signal.h>
+#include <sys/prctl.h>
#include <xse.h>
char *progname = "xse";
char *xchg_buf = NULL;
char *scen_file = NULL;
+char *stop_name = "NULL";
int default_release_flg = 0;
int check_delay_time_flg = 0;
int correct_delay_time_flg = 0;
+char winid_tmp[STR_LEN];
+
long double user_delay = 0;
static Display *display = NULL;
@@ -412,8 +416,10 @@ void write_delay(char *fname)
char string[STR_LEN];
if (fname == 0) {
- fname = DELAY_FILE;
+ snprintf(string, STR_LEN, "%s/%s", getenv("BLTK_HOME"), DELAY_FILE);
+ fname = strdup(string);
}
+ fprintf(stderr, "user delay file: %s\n", fname);
fd = open(fname, O_RDWR | O_TRUNC | O_CREAT, 0666);
if (fd < 0) {
@@ -504,8 +510,8 @@ static int x_get_winid_action(char *titl
int ret = 0;
char cmd[STR_LEN];
- (void)sprintf(cmd, "bltk_winid -S -t %d -s %d \"%s\" >./winid.tmp",
- wait_time, sleep_time, title);
+ (void)sprintf(cmd, "bltk_winid -S -t %d -s %d \"%s\" > %s",
+ wait_time, sleep_time, title, winid_tmp);
ret = system(cmd);
if (ret != 0) {
(void)fprintf(stderr, "%s failed\n", cmd);
@@ -519,7 +525,7 @@ static int get_winid_action(char *title)
int ret = 0;
char cmd[STR_LEN];
- (void)sprintf(cmd, "bltk_winid -S \"%s\" >./winid.tmp", title);
+ (void)sprintf(cmd, "%s/bin/bltk_winid -S \"%s\" > %s", getenv("BLTK_ROOT"), title, winid_tmp);
ret = system(cmd);
if (ret != 0) {
(void)fprintf(stderr, "%s failed\n", cmd);
@@ -549,7 +555,7 @@ static int end_winid_action(char *title)
int ret = 0;
char cmd[STR_LEN];
- (void)sprintf(cmd, "bltk_winid -F \"%s\"", title);
+ (void)sprintf(cmd, "%s/bin/bltk_winid -F \"%s\"", getenv("BLTK_ROOT"), title);
ret = system(cmd);
if (ret != 0) {
(void)fprintf(stderr, "%s failed\n", cmd);
@@ -562,6 +568,18 @@ static int end_winid_action(char *title)
static pid_t pid_array[1024];
static int pid_cnt = 0;
+void chk_stop_file()
+{
+ int i;
+
+ if (access(stop_name, F_OK) == 0) {
+ for (i = 0; i < pid_cnt; i++) {
+ (void)kill(pid_array[i], SIGTERM);
+ }
+ xse_exit(0);
+ }
+}
+
static int runcmd_action(char *name, int wait_time, int state)
{
int ret = 0;
@@ -1096,7 +1114,7 @@ static void run_scen1(xse_scen_t * scen1
} else {
get_winid_action(string);
}
- readf_action("./winid.tmp", count, delay_time);
+ readf_action(winid_tmp, count, delay_time);
setwinid_action(string, xchg_buf, delay_time);
delay_time = 0;
break;
@@ -1189,11 +1207,24 @@ static void run_scen1(xse_scen_t * scen1
if (break_flg) {
break;
}
+ chk_stop_file();
}
}
void init_xse()
{
+ if (prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0) != 0)
+ {
+ xse_exit(2);
+ }
+ if (prctl(PR_SET_PDEATHSIG, SIGTERM, 0, 0, 0) != 0)
+ {
+ xse_exit(2);
+ }
+
+ stop_name = getenv("BLTK_STOP_FNAME");
+
+ snprintf(winid_tmp, sizeof winid_tmp, "%s/%s", getenv("BLTK_HOME"), WINID_FILE);
display = XOpenDisplay(NULL);
if (display == NULL) {
(void)fprintf(stderr, "%s: Cannot open Display\n", progname);
diff -up bltk/wl_developer/Makefile.xse bltk/wl_developer/Makefile
--- bltk/wl_developer/Makefile.xse 2009-04-10 09:14:20.000000000 +0200
+++ bltk/wl_developer/Makefile 2009-07-29 11:14:00.975524925 +0200
@@ -1,6 +1,6 @@
CFLAGS = -Wall -pedantic -std=c99 -g -O2 -I../include
-LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -lxse -L../lib
+LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 ../lib/libxse.so.0 -Wl,-rpath,/usr/lib/bltk
BIN = bin
@@ -15,7 +15,7 @@ SHFILES = bltk_wl_developer_install blt
SHFILES_SH = ${SHFILES:=.sh}
SHTARGETS = $(SHFILES:%=$(BIN)/%)
-EXTERN_DEPS = $(HIDERS) ../lib/libxse.so
+EXTERN_DEPS = $(HIDERS) ../lib/libxse.so.0
all : $(BIN) $(SUBDIRS) $(TARGET) $(SHTARGETS) FORCE
diff -up bltk/wl_game/Makefile.xse bltk/wl_game/Makefile
--- bltk/wl_game/Makefile.xse 2009-04-10 09:14:20.000000000 +0200
+++ bltk/wl_game/Makefile 2009-07-29 11:14:00.978525164 +0200
@@ -1,6 +1,6 @@
CFLAGS = -Wall -pedantic -std=c99 -g -O2 -I../include
-LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -lxse -L../lib
+LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 ../lib/libxse.so.0 -Wl,-rpath,/usr/lib/bltk
BIN = bin
@@ -18,7 +18,7 @@ SHTARGETS = $(SHFILES:%=$(BIN)/%)
DATAFILES =
DATATARGETS = $(DATAFILES:%=$(BIN)/%)
-EXTERN_DEPS = $(HIDERS) ../lib/libxse.so
+EXTERN_DEPS = $(HIDERS) ../lib/libxse.so.0
all : $(BIN) $(SUBDIRS) $(TARGET) $(TARGET1) $(TARGET2) $(SHTARGETS) $(DATATARGETS)
diff -up bltk/wl_office/Makefile.xse bltk/wl_office/Makefile
--- bltk/wl_office/Makefile.xse 2009-04-10 09:14:20.000000000 +0200
+++ bltk/wl_office/Makefile 2009-07-29 11:14:00.982494753 +0200
@@ -1,6 +1,6 @@
CFLAGS = -Wall -pedantic -std=c99 -g -O2 -I../include
-LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -lxse -L../lib
+LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 ../lib/libxse.so.0 -Wl,-rpath,/usr/lib/bltk
BIN = bin
@@ -15,10 +15,10 @@ SHFILES = bltk_wl_office_install bltk_w
SHFILES_SH = ${SHFILES:=.sh}
SHTARGETS = $(SHFILES:%=$(BIN)/%)
-DATAFILES = scen_install
+DATAFILES = scen_install
DATATARGETS = $(DATAFILES:%=$(BIN)/%)
-EXTERN_DEPS = $(HIDERS) ../lib/libxse.so
+EXTERN_DEPS = $(HIDERS) ../lib/libxse.so.0
all : $(BIN) $(SUBDIRS) $(TARGET) $(TARGET1) $(TARGET2) $(SHTARGETS) $(DATATARGETS)
diff -up bltk/wl_reader/Makefile.xse bltk/wl_reader/Makefile
--- bltk/wl_reader/Makefile.xse 2009-04-10 09:14:20.000000000 +0200
+++ bltk/wl_reader/Makefile 2009-07-29 11:14:00.985519159 +0200
@@ -1,6 +1,6 @@
CFLAGS = -Wall -pedantic -std=c99 -g -O2 -I../include
-LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 -lxse -L ../lib
+LDFLAGS = -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11 ../lib/libxse.so.0 -Wl,-rpath,/usr/lib/bltk
BIN = bin
@@ -17,7 +17,7 @@ SHFILES = bltk_wl_reader_install bltk_w
SHFILES_SH = ${SHFILES:=.sh}
SHTARGETS = $(SHFILES:%=$(BIN)/%)
-EXTERN_DEPS = $(HIDERS) ../lib/libxse.so
+EXTERN_DEPS = $(HIDERS) ../lib/libxse.so.0
all : $(BIN) $(SUBDIRS) $(TARGETS) $(SHTARGETS) FORCE
Index: bltk.spec
===================================================================
RCS file: /cvs/extras/rpms/bltk/devel/bltk.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- bltk.spec 24 Jul 2009 18:12:38 -0000 1.4
+++ bltk.spec 29 Jul 2009 13:48:31 -0000 1.5
@@ -1,6 +1,6 @@
Name: bltk
Version: 1.0.9
-Release: 2%{?dist}
+Release: 4%{?dist}
Summary: The BLTK measures notebook battery life under any workload
Group: Applications/System
@@ -12,7 +12,22 @@ Source2: OOCALC_FILE_SAMPLE.ods
Source3: OODRAW_FILE_SAMPLE.odg
Source4: OOWRITER_FILE_SAMPLE.odt
-Patch0: bltk-1.0.9-all.patch
+#Patch0: bltk-1.0.9-all.patch
+Patch1: bltk-1.0.9-man.patch
+Patch2: bltk-1.0.9-office_scen.patch
+Patch3: bltk-1.0.9-bltk_paths.patch
+Patch4: bltk-1.0.9-opt_developer.patch
+Patch5: bltk-1.0.9-cond_install.patch
+Patch6: bltk-1.0.9-opt_game.patch
+Patch7: bltk-1.0.9-conf.patch
+Patch8: bltk-1.0.9-opt_office.patch
+Patch9: bltk-1.0.9-hdparm.patch
+Patch10: bltk-1.0.9-opt_player.patch
+Patch11: bltk-1.0.9-home_dir.patch
+Patch12: bltk-1.0.9-opt_reader.patch
+Patch13: bltk-1.0.9-installed.patch
+Patch14: bltk-1.0.9-sudo.patch
+Patch15: bltk-1.0.9-xse.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -34,9 +49,24 @@ The following workloads are currently im
office activities (based on OpenOffice.org office suit)
%prep
-%setup -q -n %{name}
+%setup -q
-%patch0 -p1 -b .all
+# %patch0 -p1 -b .all
+%patch1 -p1 -b .man
+%patch2 -p1 -b .office_scen
+%patch3 -p1 -b .bltk_paths
+%patch4 -p1 -b .opt_developer
+%patch5 -p1 -b .cond_install
+%patch6 -p1 -b .opt_game
+%patch7 -p1 -b .conf
+%patch8 -p1 -b .opt_office
+%patch9 -p1 -b .hdparm
+%patch10 -p1 -b .opt_player
+%patch11 -p1 -b .home_dir
+%patch12 -p1 -b .opt_reader
+%patch13 -p1 -b .installed
+%patch14 -p1 -b .sudo
+%patch15 -p1 -b .xse
%build
export CFLAGS="$RPM_OPT_FLAGS"
@@ -58,8 +88,12 @@ mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/blt
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_player/bin
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bltk/wl_reader/bin
mkdir -p ${RPM_BUILD_ROOT}/etc
+mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,5}
install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/etc
+install -m 644 doc/bltk.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1
+install -m 644 doc/bltk_report.1 ${RPM_BUILD_ROOT}/%{_mandir}/man1
+install -m 644 doc/bltk.conf.5 ${RPM_BUILD_ROOT}/%{_mandir}/man5
install -m 755 bin/bat_drain ${RPM_BUILD_ROOT}%{_libdir}/bltk/bin/bat_drain
install -m 755 bin/bat_drain_table ${RPM_BUILD_ROOT}%{_libdir}/bltk/bin/bat_drain_table
@@ -122,6 +156,9 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/bltk_report_table
%{_bindir}/bltk_report_uncompress
+%{_mandir}/man1/bltk*
+%{_mandir}/man5/bltk.conf.*
+
%{_libdir}/bltk/lib/libxse.so.0
%{_libdir}/bltk/bin/bat_drain
@@ -194,6 +231,12 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/bltk/wl_reader/war_and_peace.html
%changelog
+* Tue Jul 28 2009 Jiri Skala <jskala at redhat.com> 1.0.9-4
+- added man mages
+- splitted patch to more files
+- filled up scen file of office workload
+- updated to latest upstream sources
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/bltk/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- sources 14 Jul 2009 10:27:38 -0000 1.3
+++ sources 29 Jul 2009 13:48:31 -0000 1.4
@@ -1 +1 @@
-d4b3d79cd6ff11fa1fcd8a4abcdb6882 bltk-1.0.9.tar.gz
+d3234b3eefc22b4e6a6aa538a5b6e20d bltk-1.0.9.tar.gz
--- bltk-1.0.9-all.patch DELETED ---
More information about the fedora-extras-commits
mailing list