Skip to contentSkip to conversation

Avoid relative XEN_ROOT specification

PATCH In review Juergen Gross 4 participants 5 messages Oct 7, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid relative XEN_ROOT specification

XEN_ROOT must be set to an absolute path to avoid out of the tree references

Signed-off-by [email protected]
1 file changed, 1 insertion(+), 1 deletion(-)

tools/libfsimage/xfs/Makefile | 2 +-

# HG changeset patch
# User Juergen Gross <[email protected]> # Date 1317962555 -7200
# Node ID 67f2c8de11ecb6d05e2239340ebbf83208c44863 # Parent 159be83e5fe9111bb30d8b1f83127f5724d44424 Avoid relative XEN_ROOT specification

XEN_ROOT must be set to an absolute path to avoid out of the tree references

Signed-off-by [email protected]
tools/libfsimage/xfs/Makefile +1 -1
diff -r 159be83e5fe9 -r 67f2c8de11ec tools/libfsimage/xfs/Makefile
@@ -1,4 +1,4 @@ XEN_ROOT = ../../..
-XEN_ROOT = ../../..
+XEN_ROOT = $(CURDIR)/../../..
 
 LIB_SRCS-y = fsys_xfs.c
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 1 line · Juergen Gross

XEN_ROOT must be set to an absolute path to avoid out of the tree references

How about:

# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1317973741 -3600
# Node ID d0327c39dff8abdc224e3c19f31e11f0fbeb5c16 # Parent f17f0df2a2ede01a8c35dc4768a532a4438b1c02
tools: error out on non-absolute $(XEN_ROOT)

tools/Rules.mk +4 -0
diff -r f17f0df2a2ed -r d0327c39dff8 tools/Rules.mk
@@ -3,6 +3,10 @@
 # `all' is the default target
 all:
 
+ifeq ($(filter /%,$(XEN_ROOT)),)
+$(error XEN_ROOT must be absolute)
+endif
+
 include $(XEN_ROOT)/Config.mk
 
 export _INSTALL := $(INSTALL)
author Acked-by
#2 lore raw
Quoted 4 lines · Ian Campbell
Quoted 1 line · Juergen Gross

XEN_ROOT must be set to an absolute path to avoid out of the tree references

How about:

Quoted 8 lines

# HG changeset patch
# User Ian Campbell<[email protected]> # Date 1317973741 -3600
# Node ID d0327c39dff8abdc224e3c19f31e11f0fbeb5c16 # Parent f17f0df2a2ede01a8c35dc4768a532a4438b1c02
tools: error out on non-absolute $(XEN_ROOT)

Quoted 23 lines

diff -r f17f0df2a2ed -r d0327c39dff8 tools/Rules.mk

tools/Rules.mk +4 -0
@@ -3,6 +3,10 @@
  # `all' is the default target
  all:
 
+ifeq ($(filter /%,$(XEN_ROOT)),)
+$(error XEN_ROOT must be absolute)
+endif
+
  include $(XEN_ROOT)/Config.mk
 
  export _INSTALL := $(INSTALL)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
PDG ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: [email protected]
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html
#3 lore raw
In reply to Ian Campbell
Quoted 5 lines · Ian Campbell
Quoted 1 line · Juergen Gross

XEN_ROOT must be set to an absolute path to avoid out of the tree references

How about:

Quoted 8 lines

# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1317973741 -3600
# Node ID d0327c39dff8abdc224e3c19f31e11f0fbeb5c16 # Parent f17f0df2a2ede01a8c35dc4768a532a4438b1c02
tools: error out on non-absolute $(XEN_ROOT)

Why not put this in root Config.mk? The restriction applies outside tools/ as well.

-- Keir

Quoted 21 lines

diff -r f17f0df2a2ed -r d0327c39dff8 tools/Rules.mk

tools/Rules.mk Fri Oct 07 08:49:01 2011 +0100 renamed from tools/Rules.mk Wed Oct 05 10:43:41 2011 +0100 +4 -0
@@ -3,6 +3,10 @@
 # `all' is the default target
 all:
 
+ifeq ($(filter /%,$(XEN_ROOT)),)
+$(error XEN_ROOT must be absolute)
+endif
+
 include $(XEN_ROOT)/Config.mk
 
 export _INSTALL := $(INSTALL)

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw
Quoted 14 lines · Keir Fraser
Quoted 12 lines · Ian Campbell
Quoted 1 line · Juergen Gross

XEN_ROOT must be set to an absolute path to avoid out of the tree references

How about:

# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1317973741 -3600
# Node ID d0327c39dff8abdc224e3c19f31e11f0fbeb5c16 # Parent f17f0df2a2ede01a8c35dc4768a532a4438b1c02
tools: error out on non-absolute $(XEN_ROOT)

Quoted 3 lines
Quoted 1 line

Why not put this in root Config.mk?

Didn't think of it...

Quoted 1 line

The restriction applies outside tools/ as well.

Seems to work.

# HG changeset patch
# User Ian Campbell <[email protected]> # Date 1317974632 -3600
# Node ID 02be23c18197d1bdea51031efb8c69ce32bcd7b3 # Parent f17f0df2a2ede01a8c35dc4768a532a4438b1c02
tools: error out on non-absolute $(XEN_ROOT)

Config.mk +4 -0
diff -r f17f0df2a2ed -r 02be23c18197 Config.mk
@@ -1,5 +1,9 @@
 # -*- mode: Makefile; -*-
 
+ifeq ($(filter /%,$(XEN_ROOT)),)
+$(error XEN_ROOT must be absolute)
+endif
+
 -include $(XEN_ROOT)/.config