From 81ea1ed2b3cc81c0236e473e1cb52f1ce19a794e Mon Sep 17 00:00:00 2001 From: Bastian Blank Date: Sat, 5 Jul 2014 11:47:01 +0200 Subject: [PATCH] tools-pygrub-prefix.diff Patch-Name: tools-pygrub-prefix.diff Gbp-Pq: Name tools-pygrub-prefix.diff --- tools/pygrub/Makefile | 5 ----- tools/pygrub/setup.py | 2 ++ tools/pygrub/src/pygrub | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile index a31849078c..7db4edc36d 100644 --- a/tools/pygrub/Makefile +++ b/tools/pygrub/Makefile @@ -16,11 +16,6 @@ install: all CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \ setup.py install $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ --install-scripts=$(LIBEXEC_BIN) --force - set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ - "`readlink -f $(DESTDIR)/$(bindir)`" != \ - "`readlink -f $(LIBEXEC_BIN)`" ]; then \ - ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \ - fi .PHONY: clean clean: diff --git a/tools/pygrub/setup.py b/tools/pygrub/setup.py index 52dcf57373..8a1be9af1c 100644 --- a/tools/pygrub/setup.py +++ b/tools/pygrub/setup.py @@ -4,11 +4,13 @@ import os import sys extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] +extra_link_args = [ "-Wl,-rpath,${ORIGIN}/.." ] XEN_ROOT = "../.." fsimage = Extension("fsimage", extra_compile_args = extra_compile_args, + extra_link_args = extra_link_args, include_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ], library_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ], libraries = ["fsimage"], diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index dd0c8f77df..bfcfb4fe79 100755 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -21,6 +21,8 @@ import xen.lowlevel.xc import curses, _curses, curses.wrapper, curses.textpad, curses.ascii import getopt +sys.path.insert(1, sys.path[0] + '/../lib/python') + import fsimage import grub.GrubConf import grub.LiloConf -- 2.30.2