* [PATCH 0/9] tools changes to honor --prefix=
@ 2014-04-17 14:13 Olaf Hering
2014-04-17 14:13 ` [PATCH 1/9] tools/python: add APPEND_LDFLAGS to CFLAGS Olaf Hering
` (8 more replies)
0 siblings, 9 replies; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
In my attempt to get a xen.rpm from 'make rpmball' which operates
entirely below the configured --prefix= I came up with these changes.
Up to now there was very little runtime testing. ldd reports no missing
libs anymore when APPEND_LDFLAGS=" -Wl,-rpath,${_libdir}" is used.
More changes are required to reach the goal..
Olaf Hering (9):
tools/python: add APPEND_LDFLAGS to CFLAGS
tools/libfsimage: append APPEND_LDFLAGS to link command
tools/debugger: append APPEND_LDFLAGS to link command
tools/blktap2: append APPEND_LDFLAGS to link command
tools: add APPEND_LDFLAGS to xentop link command
tools/pygrub: add APPEND_LDFLAGS to CFLAGS
tools/libxl: remove XEN_RUN_DIR from install target
tools/libxc: provide variable paths to libxc
tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE
tools/blktap2/control/Makefile | 4 ++--
tools/blktap2/drivers/Makefile | 12 ++++++------
tools/blktap2/vhd/Makefile | 4 ++--
tools/debugger/kdd/Makefile | 2 +-
tools/libfsimage/common/Makefile | 2 +-
tools/libxc/Makefile | 13 ++++++++++++-
tools/libxc/xc_private.h | 1 +
tools/libxc/xc_suspend.c | 2 +-
tools/libxl/Makefile | 1 -
tools/pygrub/Makefile | 4 ++--
tools/python/Makefile | 4 ++--
tools/xenstat/xentop/Makefile | 1 +
12 files changed, 31 insertions(+), 19 deletions(-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/9] tools/python: add APPEND_LDFLAGS to CFLAGS
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
@ 2014-04-17 14:13 ` Olaf Hering
2014-04-17 14:13 ` [PATCH 2/9] tools/libfsimage: append APPEND_LDFLAGS to link command Olaf Hering
` (7 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
Required to pass -Wl,-rpath,$libdir to link command.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/python/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/python/Makefile b/tools/python/Makefile
index 74ed027..c433cbe 100644
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -16,11 +16,11 @@ build: genpath genwrap.py $(XEN_ROOT)/tools/libxl/libxl_types.idl \
$(XEN_ROOT)/tools/libxl/libxl_types.idl \
xen/lowlevel/xl/_pyxl_types.h \
xen/lowlevel/xl/_pyxl_types.c
- CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build
+ CC="$(CC)" CFLAGS="$(CFLAGS) $(APPEND_LDFLAGS)" $(PYTHON) setup.py build
.PHONY: install
install:
- CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
+ CC="$(CC)" CFLAGS="$(CFLAGS) $(APPEND_LDFLAGS)" $(PYTHON) setup.py install \
$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" --force
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/9] tools/libfsimage: append APPEND_LDFLAGS to link command
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
2014-04-17 14:13 ` [PATCH 1/9] tools/python: add APPEND_LDFLAGS to CFLAGS Olaf Hering
@ 2014-04-17 14:13 ` Olaf Hering
2014-04-17 14:13 ` [PATCH 3/9] tools/debugger: " Olaf Hering
` (6 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
Required to pass -Wl,-rpath,$libdir to link command.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/libfsimage/common/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile
index cbd60b4..fb306f4 100644
--- a/tools/libfsimage/common/Makefile
+++ b/tools/libfsimage/common/Makefile
@@ -40,7 +40,7 @@ libfsimage.so.$(MAJOR): libfsimage.so.$(MAJOR).$(MINOR)
ln -sf $< $@
libfsimage.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
- $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libfsimage.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS)
+ $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libfsimage.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
-include $(DEPS)
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 3/9] tools/debugger: append APPEND_LDFLAGS to link command
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
2014-04-17 14:13 ` [PATCH 1/9] tools/python: add APPEND_LDFLAGS to CFLAGS Olaf Hering
2014-04-17 14:13 ` [PATCH 2/9] tools/libfsimage: append APPEND_LDFLAGS to link command Olaf Hering
@ 2014-04-17 14:13 ` Olaf Hering
2014-04-17 14:13 ` [PATCH 4/9] tools/blktap2: " Olaf Hering
` (5 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
Required to pass -Wl,-rpath,$libdir to link command.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/debugger/kdd/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/debugger/kdd/Makefile b/tools/debugger/kdd/Makefile
index b569749..34b781f 100644
--- a/tools/debugger/kdd/Makefile
+++ b/tools/debugger/kdd/Makefile
@@ -10,7 +10,7 @@ OBJS := $(CFILES:.c=.o)
all: kdd
kdd: $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+ $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS)
.PHONY: clean
clean:
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/9] tools/blktap2: append APPEND_LDFLAGS to link command
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
` (2 preceding siblings ...)
2014-04-17 14:13 ` [PATCH 3/9] tools/debugger: " Olaf Hering
@ 2014-04-17 14:13 ` Olaf Hering
2014-04-17 14:13 ` [PATCH 5/9] tools: add APPEND_LDFLAGS to xentop " Olaf Hering
` (4 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
Required to pass -Wl,-rpath,$libdir to link command.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/blktap2/control/Makefile | 4 ++--
tools/blktap2/drivers/Makefile | 12 ++++++------
tools/blktap2/vhd/Makefile | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/tools/blktap2/control/Makefile b/tools/blktap2/control/Makefile
index 86a433c..a88ff4c 100644
--- a/tools/blktap2/control/Makefile
+++ b/tools/blktap2/control/Makefile
@@ -52,13 +52,13 @@ $(LIBSONAME): $(LIB_SHARED)
ln -sf $< $@
tap-ctl: tap-ctl.o $(LIBNAME).so
- $(CC) $(LDFLAGS) -o $@ $^
+ $(CC) $(LDFLAGS) -o $@ $^ $(APPEND_LDFLAGS)
$(LIB_STATIC): $(CTL_OBJS)
$(AR) r $@ $^
$(LIB_SHARED): $(CTL_PICS)
- $(CC) $(LDFLAGS) -fPIC -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) $(SHLIB_LDFLAGS) -rdynamic $^ -o $@
+ $(CC) $(LDFLAGS) -fPIC -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) $(SHLIB_LDFLAGS) -rdynamic $^ -o $@ $(APPEND_LDFLAGS)
install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
$(INSTALL_DIR) -p $(DESTDIR)$(SBINDIR)
diff --git a/tools/blktap2/drivers/Makefile b/tools/blktap2/drivers/Makefile
index 5c6ab6a..1129ca1 100644
--- a/tools/blktap2/drivers/Makefile
+++ b/tools/blktap2/drivers/Makefile
@@ -79,25 +79,25 @@ all: $(IBIN) lock-util qcow-util
tapdisk2: $(TAP-OBJS-y) $(BLK-OBJS-y) $(MISC-OBJS-y) tapdisk2.o
- $(CC) -o $@ $^ $(LDFLAGS) -lrt -lz $(VHDLIBS) $(AIOLIBS) $(MEMSHRLIBS) -lm
+ $(CC) -o $@ $^ $(LDFLAGS) -lrt -lz $(VHDLIBS) $(AIOLIBS) $(MEMSHRLIBS) -lm $(APPEND_LDFLAGS)
tapdisk-client: tapdisk-client.o
- $(CC) -o $@ $^ $(LDFLAGS) -lrt
+ $(CC) -o $@ $^ $(LDFLAGS) -lrt $(APPEND_LDFLAGS)
tapdisk-stream tapdisk-diff: %: %.o $(TAP-OBJS-y) $(BLK-OBJS-y)
- $(CC) -o $@ $^ $(LDFLAGS) -lrt -lz $(VHDLIBS) $(AIOLIBS) $(MEMSHRLIBS) -lm
+ $(CC) -o $@ $^ $(LDFLAGS) -lrt -lz $(VHDLIBS) $(AIOLIBS) $(MEMSHRLIBS) -lm $(APPEND_LDFLAGS)
td-util: td.o tapdisk-utils.o tapdisk-log.o $(PORTABLE-OBJS-y)
- $(CC) -o $@ $^ $(LDFLAGS) $(VHDLIBS)
+ $(CC) -o $@ $^ $(LDFLAGS) $(VHDLIBS) $(APPEND_LDFLAGS)
lock-util: lock.c
- $(CC) $(CFLAGS) -DUTIL -o lock-util lock.c $(LDFLAGS)
+ $(CC) $(CFLAGS) -DUTIL -o lock-util lock.c $(LDFLAGS) $(APPEND_LDFLAGS)
.PHONY: qcow-util
qcow-util: img2qcow qcow2raw qcow-create
img2qcow qcow2raw qcow-create: %: %.o $(TAP-OBJS-y) $(BLK-OBJS-y)
- $(CC) -o $@ $^ $(LDFLAGS) -lrt -lz $(VHDLIBS) $(AIOLIBS) $(MEMSHRLIBS) -lm
+ $(CC) -o $@ $^ $(LDFLAGS) -lrt -lz $(VHDLIBS) $(AIOLIBS) $(MEMSHRLIBS) -lm $(APPEND_LDFLAGS)
install: all
$(INSTALL_DIR) -p $(DESTDIR)$(INST_DIR)
diff --git a/tools/blktap2/vhd/Makefile b/tools/blktap2/vhd/Makefile
index c5019de..fef0d36 100644
--- a/tools/blktap2/vhd/Makefile
+++ b/tools/blktap2/vhd/Makefile
@@ -31,10 +31,10 @@ LIBS_DEPENDS := lib/libvhd.so lib/vhd.a
$(LIBS_DEPENDS):subdirs-all
vhd-util: vhd-util.o $(LIBS_DEPENDS)
- $(CC) $(LDFLAGS) -o vhd-util vhd-util.o $(LIBS)
+ $(CC) $(LDFLAGS) -o vhd-util vhd-util.o $(LIBS) $(APPEND_LDFLAGS)
vhd-update: vhd-update.o $(LIBS_DEPENDS)
- $(CC) $(LDFLAGS) -o vhd-update vhd-update.o $(LIBS)
+ $(CC) $(LDFLAGS) -o vhd-update vhd-update.o $(LIBS) $(APPEND_LDFLAGS)
install: all
$(MAKE) subdirs-install
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 5/9] tools: add APPEND_LDFLAGS to xentop link command
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
` (3 preceding siblings ...)
2014-04-17 14:13 ` [PATCH 4/9] tools/blktap2: " Olaf Hering
@ 2014-04-17 14:13 ` Olaf Hering
2014-04-17 14:13 ` [PATCH 6/9] tools/pygrub: add APPEND_LDFLAGS to CFLAGS Olaf Hering
` (3 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
Required to pass -Wl,-rpath,$libdir to link command.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/xenstat/xentop/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile
index afed0d1..e78166e 100644
--- a/tools/xenstat/xentop/Makefile
+++ b/tools/xenstat/xentop/Makefile
@@ -24,6 +24,7 @@ CFLAGS += -DHOST_$(XEN_OS)
# Include configure output (config.h) to headers search path
CFLAGS += -I$(XEN_ROOT)/tools
+LDFLAGS += $(APPEND_LDFLAGS)
.PHONY: all
all: xentop
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 6/9] tools/pygrub: add APPEND_LDFLAGS to CFLAGS
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
` (4 preceding siblings ...)
2014-04-17 14:13 ` [PATCH 5/9] tools: add APPEND_LDFLAGS to xentop " Olaf Hering
@ 2014-04-17 14:13 ` Olaf Hering
2014-04-23 11:07 ` Ian Campbell
2014-04-17 14:13 ` [PATCH 7/9] tools/libxl: remove XEN_RUN_DIR from install target Olaf Hering
` (2 subsequent siblings)
8 siblings, 1 reply; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
Required to pass -Wl,-rpath,$libdir to link command.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/pygrub/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index 4890927..a37a8b1 100644
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -6,11 +6,11 @@ include $(XEN_ROOT)/tools/Rules.mk
all: build
.PHONY: build
build:
- CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build
+ CC="$(CC)" CFLAGS="$(CFLAGS) $(APPEND_LDFLAGS)" $(PYTHON) setup.py build
.PHONY: install
install: all
- CC="$(CC)" CFLAGS="$(CFLAGS)" $(PYTHON) setup.py install \
+ CC="$(CC)" CFLAGS="$(CFLAGS) $(APPEND_LDFLAGS)" $(PYTHON) setup.py install \
$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
--install-scripts=$(PRIVATE_BINDIR) --force
set -e; if [ $(BINDIR) != $(PRIVATE_BINDIR) -a \
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 7/9] tools/libxl: remove XEN_RUN_DIR from install target
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
` (5 preceding siblings ...)
2014-04-17 14:13 ` [PATCH 6/9] tools/pygrub: add APPEND_LDFLAGS to CFLAGS Olaf Hering
@ 2014-04-17 14:13 ` Olaf Hering
2014-04-23 11:15 ` Ian Campbell
2014-04-17 14:13 ` [PATCH 8/9] tools/libxc: provide variable paths to libxc Olaf Hering
2014-04-17 14:13 ` [PATCH 9/9] tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE Olaf Hering
8 siblings, 1 reply; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
xencommons creates the _hardcoded_ /var/run/xen already, there is no
need to create and package this directory during make install|rpmball.
Without this change installing the resulting xen.rpm will fail on
systems where /var/run is a symlink. rpm complains that '/var/run' (the
symlink) is already owned by some other system rpm package.
Using XEN_RUN_DIR instead of /var/run/xen tree-wide may be done in a
followup patch.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/libxl/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 755b666..4cfa275 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -230,7 +230,6 @@ install: all
$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
- $(INSTALL_DIR) $(DESTDIR)$(XEN_RUN_DIR)
$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
$(INSTALL_PROG) xl $(DESTDIR)$(SBINDIR)
$(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(PRIVATE_BINDIR)
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 8/9] tools/libxc: provide variable paths to libxc
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
` (6 preceding siblings ...)
2014-04-17 14:13 ` [PATCH 7/9] tools/libxl: remove XEN_RUN_DIR from install target Olaf Hering
@ 2014-04-17 14:13 ` Olaf Hering
2014-04-23 11:15 ` Ian Campbell
2014-04-17 14:13 ` [PATCH 9/9] tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE Olaf Hering
8 siblings, 1 reply; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
In preparation to removal of hardcoded /var/run/xen paths, provide
XEN_RUN_DIR and related directories to xc_private.h. Similar code exists
already for libxl, stubdom and other parts.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/libxc/Makefile | 13 ++++++++++++-
tools/libxc/xc_private.h | 1 +
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index a74b19e..1bb6825 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -118,11 +118,21 @@ ifneq ($(stubdom),y)
LIB += xenctrl_osdep_ENOSYS.so
endif
+genpath-target = $(call buildmakevars2file,_paths.h.tmp)
+$(eval $(genpath-target))
+
+_paths.h: genpath
+ sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" $@.tmp >$@.2.tmp
+ rm -f $@.tmp
+ $(call move-if-changed,$@.2.tmp,$@)
+
+xc_private.h: _paths.h
+
.PHONY: all
all: build
.PHONY: build
-build:
+build: xc_private.h
$(MAKE) libs
.PHONY: libs
@@ -150,6 +160,7 @@ TAGS:
.PHONY: clean
clean:
rm -rf *.rpm $(LIB) *~ $(DEPS) \
+ _paths.h \
$(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \
$(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS) \
$(OSDEP_LIB_OBJS) $(OSDEP_PIC_OBJS)
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index 670a82d..786dc61 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <sys/ioctl.h>
+#include "_paths.h"
#include "xenctrl.h"
#include "xenctrlosdep.h"
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 9/9] tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
` (7 preceding siblings ...)
2014-04-17 14:13 ` [PATCH 8/9] tools/libxc: provide variable paths to libxc Olaf Hering
@ 2014-04-17 14:13 ` Olaf Hering
2014-04-23 11:15 ` Ian Campbell
8 siblings, 1 reply; 17+ messages in thread
From: Olaf Hering @ 2014-04-17 14:13 UTC (permalink / raw)
To: xen-devel; +Cc: Olaf Hering, Ian.Jackson, Ian.Campbell
Remove hardcoded /var/run/xen directory path, use XEN_RUN_DIR instead.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/libxc/xc_suspend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/libxc/xc_suspend.c b/tools/libxc/xc_suspend.c
index 200d381..e22f4ac 100644
--- a/tools/libxc/xc_suspend.c
+++ b/tools/libxc/xc_suspend.c
@@ -20,7 +20,7 @@
#include "xc_private.h"
#include "xenguest.h"
-#define SUSPEND_LOCK_FILE "/var/run/xen/suspend-evtchn-%d.lock"
+#define SUSPEND_LOCK_FILE XEN_RUN_DIR "/suspend-evtchn-%d.lock"
/*
* locking
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 6/9] tools/pygrub: add APPEND_LDFLAGS to CFLAGS
2014-04-17 14:13 ` [PATCH 6/9] tools/pygrub: add APPEND_LDFLAGS to CFLAGS Olaf Hering
@ 2014-04-23 11:07 ` Ian Campbell
0 siblings, 0 replies; 17+ messages in thread
From: Ian Campbell @ 2014-04-23 11:07 UTC (permalink / raw)
To: Olaf Hering; +Cc: Ian.Jackson, xen-devel
On Thu, 2014-04-17 at 16:13 +0200, Olaf Hering wrote:
> Required to pass -Wl,-rpath,$libdir to link command.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Patches #1..#6: Acked-by: Ian Campbell <ian.campbell@citrix.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 8/9] tools/libxc: provide variable paths to libxc
2014-04-17 14:13 ` [PATCH 8/9] tools/libxc: provide variable paths to libxc Olaf Hering
@ 2014-04-23 11:15 ` Ian Campbell
2014-04-23 14:27 ` Olaf Hering
0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2014-04-23 11:15 UTC (permalink / raw)
To: Olaf Hering; +Cc: Ian.Jackson, xen-devel
On Thu, 2014-04-17 at 16:13 +0200, Olaf Hering wrote:
> In preparation to removal of hardcoded /var/run/xen paths, provide
> XEN_RUN_DIR and related directories to xc_private.h. Similar code exists
> already for libxl, stubdom and other parts.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> ---
> tools/libxc/Makefile | 13 ++++++++++++-
> tools/libxc/xc_private.h | 1 +
> 2 files changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
> index a74b19e..1bb6825 100644
> --- a/tools/libxc/Makefile
> +++ b/tools/libxc/Makefile
> @@ -118,11 +118,21 @@ ifneq ($(stubdom),y)
> LIB += xenctrl_osdep_ENOSYS.so
> endif
>
> +genpath-target = $(call buildmakevars2file,_paths.h.tmp)
> +$(eval $(genpath-target))
> +
> +_paths.h: genpath
> + sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" $@.tmp >$@.2.tmp
> + rm -f $@.tmp
> + $(call move-if-changed,$@.2.tmp,$@)
libxl has the exact same thing. Can we make it a common
genpath-include-target or something please.
I'm not sure why this isn't handled vi autoconf and tools/config.h.in.
> +
> +xc_private.h: _paths.h
> +
> .PHONY: all
> all: build
>
> .PHONY: build
> -build:
> +build: xc_private.h
This might be better as:
$(CTRL_LIB_OBJS) $(XXX_OTHER_OBJS): xc_private.h
> $(MAKE) libs
>
> .PHONY: libs
> @@ -150,6 +160,7 @@ TAGS:
> .PHONY: clean
> clean:
> rm -rf *.rpm $(LIB) *~ $(DEPS) \
> + _paths.h \
Whitespace oddity.
Ian.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 9/9] tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE
2014-04-17 14:13 ` [PATCH 9/9] tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE Olaf Hering
@ 2014-04-23 11:15 ` Ian Campbell
0 siblings, 0 replies; 17+ messages in thread
From: Ian Campbell @ 2014-04-23 11:15 UTC (permalink / raw)
To: Olaf Hering; +Cc: Ian.Jackson, xen-devel
On Thu, 2014-04-17 at 16:13 +0200, Olaf Hering wrote:
> Remove hardcoded /var/run/xen directory path, use XEN_RUN_DIR instead.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 7/9] tools/libxl: remove XEN_RUN_DIR from install target
2014-04-17 14:13 ` [PATCH 7/9] tools/libxl: remove XEN_RUN_DIR from install target Olaf Hering
@ 2014-04-23 11:15 ` Ian Campbell
0 siblings, 0 replies; 17+ messages in thread
From: Ian Campbell @ 2014-04-23 11:15 UTC (permalink / raw)
To: Olaf Hering; +Cc: Ian.Jackson, xen-devel
On Thu, 2014-04-17 at 16:13 +0200, Olaf Hering wrote:
> xencommons creates the _hardcoded_ /var/run/xen already, there is no
> need to create and package this directory during make install|rpmball.
>
> Without this change installing the resulting xen.rpm will fail on
> systems where /var/run is a symlink. rpm complains that '/var/run' (the
> symlink) is already owned by some other system rpm package.
>
> Using XEN_RUN_DIR instead of /var/run/xen tree-wide may be done in a
> followup patch.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 8/9] tools/libxc: provide variable paths to libxc
2014-04-23 11:15 ` Ian Campbell
@ 2014-04-23 14:27 ` Olaf Hering
2014-04-28 15:04 ` Ian Campbell
0 siblings, 1 reply; 17+ messages in thread
From: Olaf Hering @ 2014-04-23 14:27 UTC (permalink / raw)
To: Ian Campbell; +Cc: Ian.Jackson, xen-devel
On Wed, Apr 23, Ian Campbell wrote:
> libxl has the exact same thing. Can we make it a common
> genpath-include-target or something please.
I came up with the untested change below.
> I'm not sure why this isn't handled vi autoconf and tools/config.h.in.
Should these variables (in BUILD_MAKE_VARS) be set via configure?
Olaf
Config.mk | 19 +++++++++++++++----
tools/libxc/Makefile | 8 ++++++++
tools/libxc/xc_private.h | 1 +
tools/libxl/Makefile | 7 +------
4 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/Config.mk b/Config.mk
index 6a93533..0e07fd6 100644
--- a/Config.mk
+++ b/Config.mk
@@ -166,19 +166,30 @@ define move-if-changed
if ! cmp -s $(1) $(2); then mv -f $(1) $(2); else rm -f $(1); fi
endef
+BUILD_MAKE_VARS := SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR \
+ XENFIRMWAREDIR XEN_CONFIG_DIR XEN_SCRIPT_DIR XEN_LOCK_DIR \
+ XEN_RUN_DIR XEN_PAGING_DIR
+
buildmakevars2file = $(eval $(call buildmakevars2file-closure,$(1)))
define buildmakevars2file-closure
.PHONY: genpath
genpath:
rm -f $(1).tmp; \
- $(foreach var, \
- SBINDIR BINDIR LIBEXEC LIBDIR SHAREDIR PRIVATE_BINDIR \
- XENFIRMWAREDIR XEN_CONFIG_DIR XEN_SCRIPT_DIR XEN_LOCK_DIR \
- XEN_RUN_DIR XEN_PAGING_DIR, \
+ $(foreach var, $(BUILD_MAKE_VARS) \
echo "$(var)=\"$($(var))\"" >>$(1).tmp;) \
$(call move-if-changed,$(1).tmp,$(1))
endef
+buildmakevars2header = $(eval $(call buildmakevars2header-closure,$(1)))
+define buildmakevars2header-closure
+ .PHONY: genpath
+ genpath:
+ rm -f $(1).tmp; \
+ $(foreach var, $(BUILD_MAKE_VARS) \
+ echo "#define $(var) \"$($(var))\"" >>$(1).tmp;)\
+ $(call move-if-changed,$(1).tmp,$(1))
+endef
+
ifeq ($(debug_symbols),y)
CFLAGS += -g
endif
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index a74b19e..cbba502 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -118,6 +118,13 @@ ifneq ($(stubdom),y)
LIB += xenctrl_osdep_ENOSYS.so
endif
+genpath-target = $(call buildmakevars2header,_paths.h)
+$(eval $(genpath-target))
+
+xc_private.h: _paths.h
+
+$(CTRL_LIB_OBJS) $(GUEST_LIB_OBJS) $(OSDEP_LIB_OBJS): xc_private.h
+
.PHONY: all
all: build
@@ -150,6 +157,7 @@ TAGS:
.PHONY: clean
clean:
rm -rf *.rpm $(LIB) *~ $(DEPS) \
+ _paths.h \
$(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \
$(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS) \
$(OSDEP_LIB_OBJS) $(OSDEP_PIC_OBJS)
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index 670a82d..786dc61 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <sys/ioctl.h>
+#include "_paths.h"
#include "xenctrl.h"
#include "xenctrlosdep.h"
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 4cfa275..6c8a14b 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -141,7 +141,7 @@ $(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS) $(SAVE_HELPER_OBJS) \
@rm -f $*.[ch]
$(FLEX) --header-file=$*.h --outfile=$*.c $<
-genpath-target = $(call buildmakevars2file,_paths.h.tmp)
+genpath-target = $(call buildmakevars2header,_paths.h)
$(eval $(genpath-target))
libxl.api-ok: check-libxl-api-rules _libxl.api-for-check
@@ -154,11 +154,6 @@ _%.api-for-check: %.h $(AUTOINCS)
>$@.new
mv -f $@.new $@
-_paths.h: genpath
- sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" $@.tmp >$@.2.tmp
- rm -f $@.tmp
- $(call move-if-changed,$@.2.tmp,$@)
-
_libxl_list.h: $(XEN_INCLUDE)/xen-external/bsd-sys-queue-h-seddery $(XEN_INCLUDE)/xen-external/bsd-sys-queue.h
$(PERL) $^ --prefix=libxl >$@.new
$(call move-if-changed,$@.new,$@)
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 8/9] tools/libxc: provide variable paths to libxc
2014-04-23 14:27 ` Olaf Hering
@ 2014-04-28 15:04 ` Ian Campbell
2014-04-28 15:14 ` Olaf Hering
0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2014-04-28 15:04 UTC (permalink / raw)
To: Olaf Hering; +Cc: Roger Pau Monne, Ian.Jackson, xen-devel
On Wed, 2014-04-23 at 16:27 +0200, Olaf Hering wrote:
> On Wed, Apr 23, Ian Campbell wrote:
>
> > libxl has the exact same thing. Can we make it a common
> > genpath-include-target or something please.
>
> I came up with the untested change below.
>
> > I'm not sure why this isn't handled vi autoconf and tools/config.h.in.
>
> Should these variables (in BUILD_MAKE_VARS) be set via configure?
Probably? It does seem odd not to obey ./configure --sbindir.
The one to watch out for is --localstatedir (==var) which we explicitly
don't want to move to $PREFIX/var by default.
Ian.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 8/9] tools/libxc: provide variable paths to libxc
2014-04-28 15:04 ` Ian Campbell
@ 2014-04-28 15:14 ` Olaf Hering
0 siblings, 0 replies; 17+ messages in thread
From: Olaf Hering @ 2014-04-28 15:14 UTC (permalink / raw)
To: Ian Campbell; +Cc: Roger Pau Monne, Ian.Jackson, xen-devel
On Mon, Apr 28, Ian Campbell wrote:
> On Wed, 2014-04-23 at 16:27 +0200, Olaf Hering wrote:
> > On Wed, Apr 23, Ian Campbell wrote:
> >
> > > libxl has the exact same thing. Can we make it a common
> > > genpath-include-target or something please.
> >
> > I came up with the untested change below.
> >
> > > I'm not sure why this isn't handled vi autoconf and tools/config.h.in.
> >
> > Should these variables (in BUILD_MAKE_VARS) be set via configure?
>
> Probably? It does seem odd not to obey ./configure --sbindir.
Ok. I have to check the actual code, but this is yet another change as
--sbindir may not have an effect today.
Olaf
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2014-04-28 15:14 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-17 14:13 [PATCH 0/9] tools changes to honor --prefix= Olaf Hering
2014-04-17 14:13 ` [PATCH 1/9] tools/python: add APPEND_LDFLAGS to CFLAGS Olaf Hering
2014-04-17 14:13 ` [PATCH 2/9] tools/libfsimage: append APPEND_LDFLAGS to link command Olaf Hering
2014-04-17 14:13 ` [PATCH 3/9] tools/debugger: " Olaf Hering
2014-04-17 14:13 ` [PATCH 4/9] tools/blktap2: " Olaf Hering
2014-04-17 14:13 ` [PATCH 5/9] tools: add APPEND_LDFLAGS to xentop " Olaf Hering
2014-04-17 14:13 ` [PATCH 6/9] tools/pygrub: add APPEND_LDFLAGS to CFLAGS Olaf Hering
2014-04-23 11:07 ` Ian Campbell
2014-04-17 14:13 ` [PATCH 7/9] tools/libxl: remove XEN_RUN_DIR from install target Olaf Hering
2014-04-23 11:15 ` Ian Campbell
2014-04-17 14:13 ` [PATCH 8/9] tools/libxc: provide variable paths to libxc Olaf Hering
2014-04-23 11:15 ` Ian Campbell
2014-04-23 14:27 ` Olaf Hering
2014-04-28 15:04 ` Ian Campbell
2014-04-28 15:14 ` Olaf Hering
2014-04-17 14:13 ` [PATCH 9/9] tools/libxc: use XEN_RUN_DIR for SUSPEND_LOCK_FILE Olaf Hering
2014-04-23 11:15 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.