tools/check fixes for xen-unstable
PATCH 1/1 tools/check fixes for xen-unstable
Remove the need for executable permissions of some files in the SCM.
With these changes applied I can build the SLES11 xen.rpm package again. I use a modified xen.spec which does this after unpacking the tar files, just for testing my changes:
find -type f -executable -print0 | sort -z | xargs -0 --no-run-if-empty chmod -v a-x find -type f -name configure -print0 | xargs -0 --no-run-if-empty chmod -v 744 find -type f -name texi2pod.pl -print0 | xargs -0 --no-run-if-empty chmod -v 744
Olaf
install.sh | 2 +- stubdom/Makefile | 2 +- tools/Makefile | 2 +- tools/Rules.mk | 4 ++-- tools/check/Makefile | 6 +++--- tools/check/README | 6 +++--- tools/check/check_logging | 31 ------------------------------- tools/check/check_python | 4 ++-- tools/check/chk | 2 +- tools/firmware/etherboot/Makefile | 2 +- 10 files changed, 15 insertions(+), 46 deletions(-)
PATCH 1/1 tools/check: remove check_logging
# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1317738016 -7200
# Node ID c2daf20cf860d942d1105ce2f5fa7e171c536466 # Parent 0b66e6450ffe6823d8b323ef4248b38fe7372d54 tools/check: remove check_logging
Remove tools/check/check_logging.
Python 2.3 is the minimal required python version so the checked function is available anyway.
It is the only python script, its in the way for an subsequent change which will call all check_* scripts with shell.
tools/check/check_logging deleted +0 -31
@@ -1,31 +0,0 @@ -#!/usr/bin/env python -# -*- mode: python; -*- - -import os -import sys - -def hline(): - print >>sys.stderr, "*" * 70 - -def msg(message): - print >>sys.stderr, "*" * 3, message - -def check_logging(): - """Check python logging is installed and raise an error if not. - Logging is standard from Python 2.3 on. - """ - try: - import logging - except ImportError: - hline() - msg("") - msg(" *** Python logging is not installed.") - msg(" *** Use 'make install-logging' at the xen root to install.") - msg(" *** ") - msg(" *** Alternatively download and install from") - msg(" *** http://www.red-dove.com/python_logging.html") - hline() - sys.exit(1) - -if __name__ == '__main__': - check_logging()
Re: [PATCH 1 of 7] tools/check: remove check_logging [and 1 more messages]
Olaf Hering writes ("[Xen-devel] [PATCH 3 of 7] tools/check: update python version check"):
Quoted 1 line
tools/check: update python version check
Olaf Hering writes ("[Xen-devel] [PATCH 1 of 7] tools/check: remove check_logging"):
Quoted 1 line
tools/check: removecheck_logging
I have acked and applied these two (in the opposite order to that suggested).
Ian.
PATCH 1/1 tools/check: call all check_* scripts with shell
In reply to Olaf Hering# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1317738016 -7200
# Node ID bcd7b8ee7e99dc6348c3132a7248db5829bc53f9 # Parent c2daf20cf860d942d1105ce2f5fa7e171c536466 tools/check: call all check_* scripts with shell
Adding new check_* scripts via patch should be possible.
Expect that every script is a shell script and call it with sh. This removes the need for executable permissions of the individual scripts.
install.sh +1 -1
@@ -51,7 +51,7 @@ echo "All done." echo "Checking to see whether prerequisite tools are installed..." cd $src/../check -./chk install +sh chk install echo "All done." exit 0
tools/check/Makefile +3 -3
@@ -7,13 +7,13 @@ all install: check-build # Check this machine is OK for building on. .PHONY: check-build check-build: - PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ./chk build + PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) $(SHELL) chk build # Check this machine is OK for installing on. .PHONY: check-install check-install: - PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ./chk install + PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) $(SHELL) chk install .PHONY: clean clean: - ./chk clean + $(SHELL) chk clean
tools/check/README +3 -3
@@ -1,11 +1,11 @@ Checks for the suitability of a machine for Xen build or install. To check for build suitability use - ./chk build + sh chk build To check for install suitability use - ./chk install + sh chk install The chk script will run checks in this directory and print the ones that failed. It prints nothing if checks succeed.
@@ -17,4 +17,4 @@ are run for the build check, and files c are run for the install check. Detailed output from the check scripts is in .chkbuild for build -and .chkinstall for install. +and .chkinstall for install.
tools/check/chk +1 -1
@@ -53,7 +53,7 @@ for f in check_* ; do continue fi echo -n "Checking $f: " - if ./$f 2>&1 ; then + if sh $f 2>&1 ; then echo OK else failed=1
PATCH 1/1 tools/check: update python version check
In reply to Olaf Hering# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1317738017 -7200
# Node ID 738452bd9f33343e46a8e05a3f999935ca5e4c2e # Parent bcd7b8ee7e99dc6348c3132a7248db5829bc53f9 tools/check: update python version check
Python 2.3 is the minimal version according to the README. Adjust check script.
tools/check/check_python +2 -2
@@ -9,5 +9,5 @@ fi ${PYTHON} -c ' import sys -sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 2) -' || fail "need python version >= 2.2" +sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 3) +' || fail "need python version >= 2.3"
PATCH 1/1 tools: call xen-setup with shell
In reply to Olaf Hering# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1317738018 -7200
# Node ID 6fa23fea467024cf546b0c7d330c43136775825c # Parent 738452bd9f33343e46a8e05a3f999935ca5e4c2e
tools: call xen-setup with shell
Removes the need for executable permissions in SCM.
stubdom/Makefile +1 -1
@@ -296,7 +296,7 @@ ioemu: cross-zlib cross-libpci libxc TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \ TARGET_CFLAGS="$(TARGET_CFLAGS)" \ TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ - $(QEMU_ROOT)/xen-setup-stubdom ) + $(SHELL) $(QEMU_ROOT)/xen-setup-stubdom ) $(CROSS_MAKE) -C ioemu -f $(QEMU_ROOT)/Makefile ######
tools/Makefile +1 -1
@@ -106,7 +106,7 @@ ioemu-dir-find: set -e; \ $(buildmakevars2shellvars); \ cd ioemu-dir; \ - $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS) + $(SHELL) $(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS) .PHONY: ioemu-dir-force-update ioemu-dir-force-update:
PATCH 1/1 tools: call cross-install with shell
In reply to Olaf Hering# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1317738019 -7200
# Node ID bac6675e4d42e1f9074dc01267e859d15c2b84cd # Parent 6fa23fea467024cf546b0c7d330c43136775825c
tools: call cross-install with shell
Removes the need for executable permissions in SCM.
tools/Rules.mk +1 -1
@@ -6,7 +6,7 @@ all: include $(XEN_ROOT)/Config.mk export _INSTALL := $(INSTALL) -INSTALL = $(XEN_ROOT)/tools/cross-install +INSTALL = $(SHELL) $(XEN_ROOT)/tools/cross-install XEN_INCLUDE = $(XEN_ROOT)/tools/include XEN_LIBXC = $(XEN_ROOT)/tools/libxc
PATCH 1/1 tools: call install-wrap with shell
In reply to Olaf Hering# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1317738020 -7200
# Node ID c06758bea2f40cc5f9ef20d55e2e7e95d7ad3d63 # Parent bac6675e4d42e1f9074dc01267e859d15c2b84cd
tools: call install-wrap with shell
Removes the need for executable permissions in SCM.
tools/Rules.mk +1 -1
@@ -78,7 +78,7 @@ check-$(CONFIG_X86) = $(call cc-ver-chec _PYTHON_PATH := $(shell which $(PYTHON)) PYTHON_PATH ?= $(_PYTHON_PATH) INSTALL_PYTHON_PROG = \ - $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG) + $(SHELL) $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" "$(INSTALL_PROG)" %.opic: %.c $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) $(CFLAGS_$*.opic) -fPIC -c -o $@ $<
PATCH 1/1 tools: call etherboot/mkhex with shell
In reply to Olaf Hering# HG changeset patch
# User Olaf Hering <[email protected]>
# Date 1317738021 -7200
# Node ID 4c8e7b9ba0d519435e9bdee031c6538d84294b74 # Parent c06758bea2f40cc5f9ef20d55e2e7e95d7ad3d63
tools: call etherboot/mkhex with shell
Removes the need for executable permissions in SCM.
tools/firmware/etherboot/Makefile +1 -1
@@ -28,7 +28,7 @@ all: eb-roms.h $(MAKE) -C $D/src bin/$(*F).rom eb-roms.h.new: $(ROMS) - cat $^ | ../hvmloader/mkhex etherboot >$@ + cat $^ | $(SHELL) ../hvmloader/mkhex etherboot >$@ eb-roms.h: Config $(MAKE) NO_WERROR=1 [email protected]
Olaf Hering writes ("[Xen-devel] [PATCH 0 of 7] tools/check fixes for xen-unstable"):
Quoted 2 lines
Remove the need for executable permissions of some files in the SCM.
Thanks for this contribution but I'm afraid I don't really agree with the need for this change. It is simpler in our build system (which is quite complicated enough already) just to execute these kind of scripts directly.
If the arrangements you use for producing a source tree don't always put the +x permissions back correctly, then I think that's something that shouldn't be too hard to fix. There should be no problem with setting +x on files that don't need it (and if there is, we can probably fix that) so you don't have to be 100% discriminating in that fixup.
Ian.