diff options
author | kris <kris@FreeBSD.org> | 2004-12-28 13:43:40 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2004-12-28 13:43:40 +0800 |
commit | c848355586327f46da2b7cd643c9825bbc2ad81a (patch) | |
tree | 46af9a4d0c409feb894c149e33e4475d60ee0dae | |
parent | 7aab54f4d80c0a9a9dc065a273024a9bfa8a83ed (diff) | |
download | freebsd-ports-gnome-c848355586327f46da2b7cd643c9825bbc2ad81a.tar.gz freebsd-ports-gnome-c848355586327f46da2b7cd643c9825bbc2ad81a.tar.zst freebsd-ports-gnome-c848355586327f46da2b7cd643c9825bbc2ad81a.zip |
Fix the Xvfb code to run Xvfb before the build phase if detected
(i.e. if the package lists a dependency on the relevant package in the
PACKAGE_BUILDING case). This allows packages that require an
available DISPLAY to again build (with some forthcoming fixes to
existing ports).
Improve the reporting of detected filesystem anomalies (extra files
left behind after deinstallation, changes to and removal of
pre-existing files)
-rwxr-xr-x | Tools/portbuild/scripts/buildscript | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/Tools/portbuild/scripts/buildscript b/Tools/portbuild/scripts/buildscript index bfe2342c5470..76b14f0a9e84 100755 --- a/Tools/portbuild/scripts/buildscript +++ b/Tools/portbuild/scripts/buildscript @@ -112,16 +112,6 @@ if [ $phase = 1 ]; then else - xvfb=0 - if which -s Xvfb; then - xvfb=1 - pid=$(echo $$ % 32768 | bc) - X11BASE=$(which Xvfb | sed -e 's./bin/Xvfb..') - Xvfb :${pid} -fp ${X11BASE}/lib/X11/fonts/misc & - DISPLAY=:${pid} - export DISPLAY - fi - cd $dir || exit 1 pkgname=$(make package-name) @@ -144,6 +134,17 @@ else echo "================================================================" echo "====================<phase 4: make build>====================" add_pkg ${BD} + + xvfb=0 + if which -s Xvfb; then + xvfb=1 + pid=$(echo $$ % 32768 | bc) + X11BASE=$(which Xvfb | sed -e 's./bin/Xvfb..') + Xvfb :${pid} -fp ${X11BASE}/lib/X11/fonts/misc & + DISPLAY=:${pid} + export DISPLAY + fi + cd $dir /pnohang $TIMEOUT /tmp/make.log4 ${pkgname} make build || cleanup 4 cat /tmp/make.log4 @@ -152,6 +153,7 @@ else echo "====================<phase 5: make package>====================" add_pkg ${RD} cat > /tmp/mtree.exclude <<EOF +./root/* ./var/* ./tmp/* EOF @@ -163,15 +165,17 @@ EOF prefix=$(make -V PREFIX) del_pkg ${pkgname} - mtree -X /tmp/mtree.exclude -x -f /tmp/mtree -p / | egrep -v '^(usr/local/share/nls/POSIX|usr/local/share/nls/en_US.US-ASCII|etc/shells.bak|etc/services|compat |usr/X11R6 |etc/manpath.config|usr/local/info/dir)' > /tmp/list3 + mtree -X /tmp/mtree.exclude -x -f /tmp/mtree -p / | egrep -v '^(usr/local/var|usr/local/www/|usr/X11R6/lib/X11/xserver/SecurityPolicy|usr/local/share/nls/POSIX|usr/local/share/nls/en_US.US-ASCII|etc/shells.bak|etc/services|compat |usr/X11R6 |etc/manpath.config|usr/local/info/dir)' > /tmp/list3 if [ -s /tmp/list3 ]; then cd / - grep ' extra$' /tmp/list3 | awk '{print $1}' | xargs -J % find % -ls > /tmp/list4 - grep ' missing$' /tmp/list3 > /tmp/list5 - grep -vE ' (extra|missing)$' /tmp/list3 > /tmp/list6 + grep ' extra$' /tmp/list3 | awk '{print $1}' | xargs -J % find % -ls > /tmp/list4 + grep ' missing$' /tmp/list3 > /tmp/list5 + grep -vE ' (extra|missing)$' /tmp/list3 > /tmp/list6 if [ "x${PLISTCHECK}" != "x" ]; then - echo "1" > /tmp/status + if grep -qE 'usr/(local|X11R6)/(bin|sbin|share/doc|share/locale/|lib/lib)' /tmp/list4; then + echo "1" > /tmp/status + fi fi echo "================================================================" fi @@ -186,6 +190,9 @@ EOF del_pkg * fi + echo + echo "=== Checking filesystem state" + if [ -s /tmp/list4 ]; then echo "list of extra files and directories in / (not present before this port was installed but present after it was deinstalled)" cat /tmp/list4 @@ -197,6 +204,9 @@ EOF if [ -s /tmp/list6 ]; then echo "list of filesystem changes from before and after port installation and deinstallation" cat /tmp/list6 + if [ "x${PLISTCHECK}" != "x" ]; then + echo "1" > /tmp/status + fi fi else cleanup 5 |