Commit 60add319 authored by Dmitry Blinov's avatar Dmitry Blinov

pwr: randomize compile-time xorg lockfiles

parent 461764ad
......@@ -296,7 +296,7 @@ version = 63dcc19
location = ${buildout:parts-directory}/${:_buildout_section_name_}
aroot=${:location}/local/adm
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
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}*
......@@ -376,12 +376,21 @@ pre-build =
echo "my own process is $$"
echo "my command name is `ps -ly $$`"
if [ ! -z "$PID" ]; then kill -TERM $PID; fi
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 &
echo 'I GOT THROUGH IF'
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 =
PID=`pgrep -u "$(whoami)" -f -x '${xserver:location}/bin/Xorg.*'` || true #pgrep returns 1 on notfound
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-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