hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Fri Apr 6 14:39:30 PDT 2007


 hald/debug-hald.sh    |   20 +++++++++++++-------
 hald/run-hald.sh      |   21 ++++++++++++---------
 hald/valgrind-hald.sh |   17 ++++++++++-------
 3 files changed, 35 insertions(+), 23 deletions(-)

New commits:
diff-tree e2cdd3577964013b46878c86083e4315357cdb6f (from f4682e40a6d647c255e8e0405db4a4ba47a0cb2f)
Author: David Zeuthen <davidz at redhat.com>
Date:   Fri Apr 6 17:39:20 2007 -0400

    for run-hald.sh + friends move fdi+privilege 'make install' to /tmp
    
    Otherwise the unprivileged hald process (running as user haldaemon)
    won't be able to reread PolicyKit file changes.

diff --git a/hald/debug-hald.sh b/hald/debug-hald.sh
index 249b3dd..d974c9a 100755
--- a/hald/debug-hald.sh
+++ b/hald/debug-hald.sh
@@ -10,22 +10,28 @@ esac
 export HALD_RUNNER_PATH=`pwd`/$backend:`pwd`/$backend/probing:`pwd`/$backend/addons:`pwd`/.:`pwd`/../tools:`pwd`/../tools/$backend
 export PATH=`pwd`/../hald-runner:$PATH
 
+HALD_TMPDIR=/tmp/run-hald-$USER
+
 if [ "$1" = "--skip-fdi-install" ] ; then
     shift
 else
-    rm -rf .local-fdi
-    make -C ../fdi install DESTDIR=`pwd`/.local-fdi prefix=/ && \
+    rm -rf $HALD_TMPDIR
+    mkdir -p $HALD_TMPDIR
+    make -C ../privileges install DESTDIR=$HALD_TMPDIR prefix=/
+
+    make -C ../fdi install DESTDIR=$HALD_TMPDIR prefix=/ && \
     if [ ! -d $information_fdidir ] ; then
     	echo "ERROR: You need to checkout hal-info in the same level"
     	echo "directory as hal to get the information fdi files."
     	exit
     fi
-    make -C $information_fdidir install DESTDIR=`pwd`/.local-fdi prefix=/
+    make -C $information_fdidir install DESTDIR=$HALD_TMPDIR prefix=/
 fi
-export HAL_FDI_SOURCE_PREPROBE=.local-fdi/share/hal/fdi/preprobe
-export HAL_FDI_SOURCE_INFORMATION=.local-fdi/share/hal/fdi/information
-export HAL_FDI_SOURCE_POLICY=.local-fdi/share/hal/fdi/policy
-export HAL_FDI_CACHE_NAME=.local-fdi/hald-local-fdi-cache
+export HAL_FDI_SOURCE_PREPROBE=$HALD_TMPDIR/share/hal/fdi/preprobe
+export HAL_FDI_SOURCE_INFORMATION=$HALD_TMPDIR/share/hal/fdi/information
+export HAL_FDI_SOURCE_POLICY=$HALD_TMPDIR/share/hal/fdi/policy
+export HAL_FDI_CACHE_NAME=$HALD_TMPDIR/hald-local-fdi-cache
+export POLKIT_PRIVILEGE_DIR=$HALD_TMPDIR/etc/PolicyKit/privileges
 
 echo ========================================
 echo Just type \'run\' to start debugging hald
diff --git a/hald/run-hald.sh b/hald/run-hald.sh
index d3e4c73..a7e2832 100755
--- a/hald/run-hald.sh
+++ b/hald/run-hald.sh
@@ -10,25 +10,28 @@ esac
 export HALD_RUNNER_PATH=`pwd`/$backend:`pwd`/$backend/probing:`pwd`/$backend/addons:`pwd`/.:`pwd`/../tools:`pwd`/../tools/$backend
 export PATH=`pwd`/../hald-runner:$PATH
 
+HALD_TMPDIR=/tmp/run-hald-$USER
+
 if [ "$1" = "--skip-fdi-install" ] ; then
     shift
 else
-    rm -rf .local-fdi
-    make -C ../privileges install DESTDIR=`pwd`/.local-fdi prefix=/
+    rm -rf $HALD_TMPDIR
+    mkdir -p $HALD_TMPDIR
+    make -C ../privileges install DESTDIR=$HALD_TMPDIR prefix=/
 
-    make -C ../fdi install DESTDIR=`pwd`/.local-fdi prefix=/ && \
+    make -C ../fdi install DESTDIR=$HALD_TMPDIR prefix=/ && \
     if [ ! -d $information_fdidir ] ; then
     	echo "ERROR: You need to checkout hal-info in the same level"
     	echo "directory as hal to get the information fdi files."
     	exit
     fi
-    make -C $information_fdidir install DESTDIR=`pwd`/.local-fdi prefix=/
+    make -C $information_fdidir install DESTDIR=$HALD_TMPDIR prefix=/
 fi
-export HAL_FDI_SOURCE_PREPROBE=.local-fdi/share/hal/fdi/preprobe
-export HAL_FDI_SOURCE_INFORMATION=.local-fdi/share/hal/fdi/information
-export HAL_FDI_SOURCE_POLICY=.local-fdi/share/hal/fdi/policy
-export HAL_FDI_CACHE_NAME=.local-fdi/hald-local-fdi-cache
-export POLKIT_PRIVILEGE_DIR=`pwd`/.local-fdi/etc/PolicyKit/privileges
+export HAL_FDI_SOURCE_PREPROBE=$HALD_TMPDIR/share/hal/fdi/preprobe
+export HAL_FDI_SOURCE_INFORMATION=$HALD_TMPDIR/share/hal/fdi/information
+export HAL_FDI_SOURCE_POLICY=$HALD_TMPDIR/share/hal/fdi/policy
+export HAL_FDI_CACHE_NAME=$HALD_TMPDIR/hald-local-fdi-cache
+export POLKIT_PRIVILEGE_DIR=$HALD_TMPDIR/etc/PolicyKit/privileges
 
 ./hald --daemon=no --verbose=yes $@
 #./hald --daemon=no
diff --git a/hald/valgrind-hald.sh b/hald/valgrind-hald.sh
index 9fe4b7e..ddca37c 100755
--- a/hald/valgrind-hald.sh
+++ b/hald/valgrind-hald.sh
@@ -10,22 +10,25 @@ esac
 export HALD_RUNNER_PATH=`pwd`/$backend:`pwd`/$backend/probing:`pwd`/$backend/addons:`pwd`/.:`pwd`/../tools:`pwd`/../tools/$backend
 export PATH=`pwd`/../hald-runner:$PATH
 
+HALD_TMPDIR=/tmp/run-hald-$USER
+
 if [ "$1" = "--skip-fdi-install" ] ; then
     shift
 else
-    rm -rf .local-fdi
-    make -C ../fdi install DESTDIR=`pwd`/.local-fdi prefix=/ && \
+    rm -rf $HALD_TMPDIR
+    make -C ../fdi install DESTDIR=$HALD_TMPDIR prefix=/ && \
     if [ ! -d $information_fdidir ] ; then
     	echo "ERROR: You need to checkout hal-info in the same level"
     	echo "directory as hal to get the information fdi files."
     	exit
     fi
-    make -C $information_fdidir install DESTDIR=`pwd`/.local-fdi prefix=/
+    make -C $information_fdidir install DESTDIR=$HALD_TMPDIR prefix=/
 fi
-export HAL_FDI_SOURCE_PREPROBE=.local-fdi/share/hal/fdi/preprobe
-export HAL_FDI_SOURCE_INFORMATION=.local-fdi/share/hal/fdi/information
-export HAL_FDI_SOURCE_POLICY=.local-fdi/share/hal/fdi/policy
-export HAL_FDI_CACHE_NAME=.local-fdi/hald-local-fdi-cache
+export HAL_FDI_SOURCE_PREPROBE=$HALD_TMPDIR/share/hal/fdi/preprobe
+export HAL_FDI_SOURCE_INFORMATION=$HALD_TMPDIR/share/hal/fdi/information
+export HAL_FDI_SOURCE_POLICY=$HALD_TMPDIR/share/hal/fdi/policy
+export HAL_FDI_CACHE_NAME=$HALD_TMPDIR/hald-local-fdi-cache
+export POLKIT_PRIVILEGE_DIR=$HALD_TMPDIR/etc/PolicyKit/privileges
 
 #valgrind --num-callers=20 --show-reachable=yes --leak-check=yes --tool=memcheck ./hald --daemon=no --verbose=yes $@
 valgrind --show-reachable=yes --tool=memcheck --leak-check=full ./hald --daemon=no --verbose=yes $@


More information about the hal-commit mailing list