Commit 4661bd65 authored by Dmitry Blinov's avatar Dmitry Blinov Committed by Esteban Blanc

pwr: randomize compile-time xorg lockfiles

parent 93f912e8
...@@ -296,7 +296,7 @@ version = 63dcc19 ...@@ -296,7 +296,7 @@ version = 63dcc19
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
aroot=${:location}/local/adm aroot=${:location}/local/adm
keep-compile-dir = true keep-compile-dir = true
make-binary = bash -c '${:compile-dir}/build.sh' make-binary = bash -c 'export XORG_LOCK_DIR=`cat ./xorg-dirname` && ${:compile-dir}/build.sh'
incdir = -I${libdb:location}/include -I${qt4-qmake:location}/include -I${qt4-qmake:location}/include/QtGui -I${qt4-qmake:location}/include/Qt -I${alsa:location}/include -I${phonon-qt4:location}/include -I${fontconfig:location}/include incdir = -I${libdb:location}/include -I${qt4-qmake:location}/include -I${qt4-qmake:location}/include/QtGui -I${qt4-qmake:location}/include/Qt -I${alsa:location}/include -I${phonon-qt4:location}/include -I${fontconfig:location}/include
libs = -L${libdb:location}/lib -ldb_cxx-5 -L${gettext:location}/lib -L${alsa:location}/lib -L${zlib:location}/lib -L ${qt4-qmake:location}/lib -L${phonon-qt4:location}/lib -L${fontconfig:location}/lib libs = -L${libdb:location}/lib -ldb_cxx-5 -L${gettext:location}/lib -L${alsa:location}/lib -L${zlib:location}/lib -L ${qt4-qmake:location}/lib -L${phonon-qt4:location}/lib -L${fontconfig:location}/lib
compile-dir = ${:location}__compile__/proview-${:version}* compile-dir = ${:location}__compile__/proview-${:version}*
...@@ -377,11 +377,20 @@ pre-build = ...@@ -377,11 +377,20 @@ pre-build =
echo "my command name is `ps -ly $$`" echo "my command name is `ps -ly $$`"
if [ ! -z "$PID" ]; then kill -TERM $PID; fi if [ ! -z "$PID" ]; then kill -TERM $PID; fi
echo 'I GOT THROUGH IF' echo 'I GOT THROUGH IF'
${xserver:location}/bin/Xorg -noreset +extension GLX +extension RANDR +extension RENDER -config ${:compile-dir}/src/tools/dummy_display/xorg.conf :99 & rand=`bash -c 'echo $RANDOM'`
echo "rand is $rand"
dirname="/tmp/xorg-socks-n-locks-$rand"
mkdir $dirname
echo made a xorg dir $dirname
echo $dirname > ./xorg-dirname
export XORG_LOCK_DIR=$dirname
${xserver:location}/bin/Xorg -noreset +extension RANDR +extension RENDER -config ${:compile-dir}/src/tools/dummy_display/xorg.conf :99 &
post-install = post-install =
PID=`pgrep -u "$(whoami)" -f -x '${xserver:location}/bin/Xorg.*'` || true #pgrep returns 1 on notfound PID=`pgrep -u "$(whoami)" -f -x '${xserver:location}/bin/Xorg.*'` || true #pgrep returns 1 on notfound
if [ ! -z "$PID" ]; then kill -TERM $PID; fi if [ ! -z "$PID" ]; then kill -TERM $PID; fi
echo deleting xorg stuff
if [ -x ./xorg-dirname]; then dirname=`cat ./xorg-dirname` && rm -rf $dirname && rm ./xorg-dirname;fi
make-targets = make-targets =
make-options = make-options =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment