Olaf Hering
2011-Oct-04 14:21 UTC
[Xen-devel] [PATCH 0 of 7] 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(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-Oct-04 14:21 UTC
[Xen-devel] [PATCH 1 of 7] tools/check: remove check_logging
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # 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. Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 0b66e6450ffe -r c2daf20cf860 tools/check/check_logging --- a/tools/check/check_logging +++ /dev/null @@ -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() _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-Oct-04 14:21 UTC
[Xen-devel] [PATCH 2 of 7] tools/check: call all check_* scripts with shell
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # 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. Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r c2daf20cf860 -r bcd7b8ee7e99 install.sh --- a/install.sh +++ b/install.sh @@ -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 diff -r c2daf20cf860 -r bcd7b8ee7e99 tools/check/Makefile --- a/tools/check/Makefile +++ b/tools/check/Makefile @@ -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 diff -r c2daf20cf860 -r bcd7b8ee7e99 tools/check/README --- a/tools/check/README +++ b/tools/check/README @@ -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. \ No newline at end of file +and .chkinstall for install. diff -r c2daf20cf860 -r bcd7b8ee7e99 tools/check/chk --- a/tools/check/chk +++ b/tools/check/chk @@ -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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-Oct-04 14:21 UTC
[Xen-devel] [PATCH 3 of 7] tools/check: update python version check
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # 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. Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r bcd7b8ee7e99 -r 738452bd9f33 tools/check/check_python --- a/tools/check/check_python +++ b/tools/check/check_python @@ -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" _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-Oct-04 14:21 UTC
[Xen-devel] [PATCH 4 of 7] tools: call xen-setup with shell
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1317738018 -7200 # Node ID 6fa23fea467024cf546b0c7d330c43136775825c # Parent 738452bd9f33343e46a8e05a3f999935ca5e4c2e tools: call xen-setup with shell Removes the need for executable permissions in SCM. Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 738452bd9f33 -r 6fa23fea4670 stubdom/Makefile --- a/stubdom/Makefile +++ b/stubdom/Makefile @@ -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 ###### diff -r 738452bd9f33 -r 6fa23fea4670 tools/Makefile --- a/tools/Makefile +++ b/tools/Makefile @@ -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: _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-Oct-04 14:21 UTC
[Xen-devel] [PATCH 5 of 7] tools: call cross-install with shell
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1317738019 -7200 # Node ID bac6675e4d42e1f9074dc01267e859d15c2b84cd # Parent 6fa23fea467024cf546b0c7d330c43136775825c tools: call cross-install with shell Removes the need for executable permissions in SCM. Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r 6fa23fea4670 -r bac6675e4d42 tools/Rules.mk --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-Oct-04 14:21 UTC
[Xen-devel] [PATCH 6 of 7] tools: call install-wrap with shell
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1317738020 -7200 # Node ID c06758bea2f40cc5f9ef20d55e2e7e95d7ad3d63 # Parent bac6675e4d42e1f9074dc01267e859d15c2b84cd tools: call install-wrap with shell Removes the need for executable permissions in SCM. Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r bac6675e4d42 -r c06758bea2f4 tools/Rules.mk --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -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 $@ $< _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Olaf Hering
2011-Oct-04 14:21 UTC
[Xen-devel] [PATCH 7 of 7] tools: call etherboot/mkhex with shell
# HG changeset patch # User Olaf Hering <olaf@aepfle.de> # Date 1317738021 -7200 # Node ID 4c8e7b9ba0d519435e9bdee031c6538d84294b74 # Parent c06758bea2f40cc5f9ef20d55e2e7e95d7ad3d63 tools: call etherboot/mkhex with shell Removes the need for executable permissions in SCM. Signed-off-by: Olaf Hering <olaf@aepfle.de> diff -r c06758bea2f4 -r 4c8e7b9ba0d5 tools/firmware/etherboot/Makefile --- a/tools/firmware/etherboot/Makefile +++ b/tools/firmware/etherboot/Makefile @@ -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 $@.new _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Oct-07 13:34 UTC
Re: [Xen-devel] [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"):> tools/check: update python version checkOlaf Hering writes ("[Xen-devel] [PATCH 1 of 7] tools/check: remove check_logging"):> tools/check: remove check_loggingI have acked and applied these two (in the opposite order to that suggested). Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Jackson
2011-Oct-07 13:48 UTC
Re: [Xen-devel] [PATCH 0 of 7] tools/check fixes for xen-unstable
Olaf Hering writes ("[Xen-devel] [PATCH 0 of 7] tools/check fixes for xen-unstable"):> > 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. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel