1 | #! /bin/sh /usr/share/dpatch/dpatch-run |
---|
2 | ## pygrub-fix by Peter Siering <ps@ctmagazin.de> |
---|
3 | ## fixes pygrub's path to python modules as suggested by Joey Hess in #404533 |
---|
4 | ## changes python prefixes while building pygrub |
---|
5 | ## |
---|
6 | ## All lines beginning with `## DP:' are a description of the patch. |
---|
7 | ## DP: No description. |
---|
8 | |
---|
9 | @DPATCH@ |
---|
10 | diff -urNad xen-3.1.0-src~/tools/pygrub/Makefile xen-3.1.0-src/tools/pygrub/Makefile |
---|
11 | --- xen-3.1.0-src~/tools/pygrub/Makefile 2007-06-19 21:53:37.804168521 +0200 |
---|
12 | +++ xen-3.1.0-src/tools/pygrub/Makefile 2007-06-19 21:56:07.597507884 +0200 |
---|
13 | @@ -6,7 +6,7 @@ |
---|
14 | all: build |
---|
15 | .PHONY: build |
---|
16 | build: |
---|
17 | - CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build |
---|
18 | + CC="$(CC)" CFLAGS="$(CFLAGS)" LIBDIR="$(LIBDIR)" python setup.py build |
---|
19 | |
---|
20 | .PHONY: install |
---|
21 | ifndef XEN_PYTHON_NATIVE_INSTALL |
---|
22 | @@ -16,7 +16,7 @@ |
---|
23 | $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot |
---|
24 | else |
---|
25 | install: all |
---|
26 | - CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" |
---|
27 | + CC="$(CC)" CFLAGS="$(CFLAGS)" LIBDIR="$(LIBDIR)" python setup.py install --root="$(DESTDIR)" |
---|
28 | $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot |
---|
29 | endif |
---|
30 | |
---|
31 | diff -urNad xen-3.1.0-src~/tools/pygrub/setup.py xen-3.1.0-src/tools/pygrub/setup.py |
---|
32 | --- xen-3.1.0-src~/tools/pygrub/setup.py 2007-05-18 16:45:21.000000000 +0200 |
---|
33 | +++ xen-3.1.0-src/tools/pygrub/setup.py 2007-06-19 21:53:38.344216876 +0200 |
---|
34 | @@ -4,11 +4,13 @@ |
---|
35 | import sys |
---|
36 | |
---|
37 | extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] |
---|
38 | +extra_link_args = [ "-Wl,-rpath,/usr/%s" % os.environ['LIBDIR'] ] |
---|
39 | |
---|
40 | XEN_ROOT = "../.." |
---|
41 | |
---|
42 | fsimage = Extension("fsimage", |
---|
43 | extra_compile_args = extra_compile_args, |
---|
44 | + extra_link_args = extra_link_args, |
---|
45 | include_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ], |
---|
46 | library_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ], |
---|
47 | libraries = ["fsimage"], |
---|
48 | diff -urNad xen-3.1.0-src~/tools/pygrub/src/pygrub xen-3.1.0-src/tools/pygrub/src/pygrub |
---|
49 | --- xen-3.1.0-src~/tools/pygrub/src/pygrub 2007-05-18 16:45:21.000000000 +0200 |
---|
50 | +++ xen-3.1.0-src/tools/pygrub/src/pygrub 2007-06-19 21:53:38.344216876 +0200 |
---|
51 | @@ -21,7 +21,7 @@ |
---|
52 | import curses, _curses, curses.wrapper, curses.textpad, curses.ascii |
---|
53 | import getopt |
---|
54 | |
---|
55 | -sys.path = [ '/usr/lib/python' ] + sys.path |
---|
56 | +sys.path.append('%s/../lib/python' % sys.path[0]) |
---|
57 | |
---|
58 | import fsimage |
---|
59 | import grub.GrubConf |
---|