|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] pygrub: Set path in #! line of pygrub, to
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1251208665 -3600
# Node ID 34c489308d45c72442703fec8f9956305c9e72c7
# Parent 4fc6ff1e114126b2c815744bee132c376a20c22f
pygrub: Set path in #! line of pygrub, too
pygrub currently has a hardcoded path of /usr/bin/python which is not
correct if the version of python at install time is not the same as
that at build time. This patch uses the existing install-wrap and
python/get-path machinery.
(It does not address the currently-existing bug that the get-path
machinery works by assuming that `python' is a symlink, rather than
querying the python interpreter for its version.)
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
tools/Rules.mk | 5 +++++
tools/misc/Makefile | 5 -----
tools/pygrub/Makefile | 1 +
tools/pygrub/src/pygrub | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff -r 4fc6ff1e1141 -r 34c489308d45 tools/Rules.mk
--- a/tools/Rules.mk Tue Aug 25 14:56:54 2009 +0100
+++ b/tools/Rules.mk Tue Aug 25 14:57:45 2009 +0100
@@ -49,6 +49,11 @@ check-$(CONFIG_X86) = $(call cc-ver-chec
"Xen requires at least gcc-3.4")
$(eval $(check-y))
+DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
+PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH)
+INSTALL_PYTHON_PROG = \
+ $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG)
+
%.opic: %.c
$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
diff -r 4fc6ff1e1141 -r 34c489308d45 tools/misc/Makefile
--- a/tools/misc/Makefile Tue Aug 25 14:56:54 2009 +0100
+++ b/tools/misc/Makefile Tue Aug 25 14:57:45 2009 +0100
@@ -25,11 +25,6 @@ INSTALL_SBIN-y := xm xen-bugtool xen-pyt
INSTALL_SBIN-y := xm xen-bugtool xen-python-path xend xenperf xsview xenpm
xen-tmem-list-parse gtraceview gtracestat
INSTALL_SBIN-$(CONFIG_X86) += xen-hvmctx
INSTALL_SBIN := $(INSTALL_SBIN-y)
-
-DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
-PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH)
-INSTALL_PYTHON_PROG = $(XEN_ROOT)/tools/python/install-wrap \
-"$(PYTHON_PATH)" $(INSTALL_PROG)
.PHONY: all
all: build
diff -r 4fc6ff1e1141 -r 34c489308d45 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile Tue Aug 25 14:56:54 2009 +0100
+++ b/tools/pygrub/Makefile Tue Aug 25 14:57:45 2009 +0100
@@ -12,6 +12,7 @@ install: all
install: all
CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force
+ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(BINDIR)/pygrub
$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
.PHONY: clean
diff -r 4fc6ff1e1141 -r 34c489308d45 tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub Tue Aug 25 14:56:54 2009 +0100
+++ b/tools/pygrub/src/pygrub Tue Aug 25 14:57:45 2009 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#! /usr/bin/env python
#
# pygrub - simple python-based bootloader for Xen
#
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] pygrub: Set path in #! line of pygrub, too,
Xen patchbot-unstable <=
|
|
|
|
|