All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Tidy up installation paths
@ 2005-09-06 21:04 Anthony Liguori
  2005-09-08 20:43 ` Josh Triplett
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony Liguori @ 2005-09-06 21:04 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Pratt, Christian Limpach

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

The following patch changes the installation locations of most of the 
xen executables to fit Ian's Tidy up request.  This means that anything 
that isn't directly used by a user gets installed into /usr/lib/xen/

I've done some regression testing and nothing appears to have broken.  
Be warned though that anyone who has scripts that depend on the location 
of things in tools (especially tools/misc) will have to update those 
scripts.

Regards,

Anthony Liguori

[-- Attachment #2: 6645_paths.diff --]
[-- Type: text/x-patch, Size: 7839 bytes --]

# HG changeset patch
# User anthony@localhost.localdomain
# Node ID d381f3270b5d4bb3aced269056ae980258de0537
# Parent  28a10ec0fd6b6043f019beded0c99401315bfe93
Change installation paths for tools.

Move almost everything into /usr/lib/xen/bin and get rid of a couple programs
that shouldn't really be installed.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

diff -r 28a10ec0fd6b -r d381f3270b5d tools/console/Makefile
--- a/tools/console/Makefile	Tue Sep  6 18:27:01 2005
+++ b/tools/console/Makefile	Tue Sep  6 20:57:45 2005
@@ -2,8 +2,8 @@
 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-DAEMON_INSTALL_DIR = /usr/sbin
-CLIENT_INSTALL_DIR = /usr/libexec/xen
+DAEMON_INSTALL_DIR = /usr/lib/xen/bin
+CLIENT_INSTALL_DIR = /usr/lib/xen/bin
 
 INSTALL         = install
 INSTALL_PROG    = $(INSTALL) -m0755
diff -r 28a10ec0fd6b -r d381f3270b5d tools/libxc/Makefile
--- a/tools/libxc/Makefile	Tue Sep  6 18:27:01 2005
+++ b/tools/libxc/Makefile	Tue Sep  6 20:57:45 2005
@@ -98,6 +98,7 @@
 	$(INSTALL_DATA) libxenguest.a $(DESTDIR)/usr/$(LIBDIR)
 	ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so.$(MAJOR)
 	ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so
+	$(INSTALL_DATA) xenguest.h $(DESTDIR)/usr/include
 
 .PHONY: TAGS clean rpm install all
 
diff -r 28a10ec0fd6b -r d381f3270b5d tools/misc/Makefile
--- a/tools/misc/Makefile	Tue Sep  6 18:27:01 2005
+++ b/tools/misc/Makefile	Tue Sep  6 20:57:45 2005
@@ -13,10 +13,10 @@
 
 HDRS     = $(wildcard *.h)
 
-TARGETS  = xenperf xc_shadow
+TARGETS  = xc_shadow
 
-INSTALL_BIN  = $(TARGETS) xencons
-INSTALL_SBIN = netfix xm xend xenperf
+INSTALL_BIN  = xencons
+INSTALL_SBIN = xm xend
 
 all: build
 build: $(TARGETS)
@@ -28,9 +28,9 @@
 	$(MAKE) -C lomount
 
 install: build
-	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
-	[ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
-	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
+	$(INSTALL_DIR) $(DESTDIR)/usr/lib/xen/bin
+	$(INSTALL_DIR) $(DESTDIR)/usr/sbin
+	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/lib/xen/bin
 	$(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
 	$(MAKE) -C cpuperf install
 	$(MAKE) -C lomount install
diff -r 28a10ec0fd6b -r d381f3270b5d tools/misc/cpuperf/Makefile
--- a/tools/misc/cpuperf/Makefile	Tue Sep  6 18:27:01 2005
+++ b/tools/misc/cpuperf/Makefile	Tue Sep  6 20:57:45 2005
@@ -23,7 +23,7 @@
 SRCS         = $(wildcard *.c)
 OBJS         = $(patsubst %.c,%.o,$(SRCS))
 
-TARGETS      = cpuperf-xen cpuperf-perfcntr
+TARGETS      = cpuperf-xen
 
 INSTALL_BIN  = $(TARGETS)
 
@@ -43,7 +43,7 @@
 	$(CC) $(CFLAGS) -DPERFCNTR -o $@ $<
 
 install: all
-	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
+	$(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/lib/xen/bin
 
 
 # End of $RCSfile: Makefile,v $
diff -r 28a10ec0fd6b -r d381f3270b5d tools/misc/xend
--- a/tools/misc/xend	Tue Sep  6 18:27:01 2005
+++ b/tools/misc/xend	Tue Sep  6 20:57:45 2005
@@ -118,14 +118,14 @@
 
 def start_xenstored():
     XENSTORED_TRACE = os.getenv("XENSTORED_TRACE")
-    cmd = "/usr/sbin/xenstored --pid-file=/var/run/xenstore.pid"
+    cmd = "/usr/lib/xen/bin/xenstored --pid-file=/var/run/xenstore.pid"
     if XENSTORED_TRACE:
         cmd += " -T /var/log/xenstored-trace.log"
     s,o = commands.getstatusoutput(cmd)
 
 def start_consoled():
     if os.fork() == 0:
-        os.execvp('/usr/sbin/xenconsoled', ['/usr/sbin/xenconsoled'])
+        os.execvp('/usr/lib/xen/bin/xenconsoled', ['/usr/lib/xen/bin/xenconsoled'])
             
 def main():
     try:
diff -r 28a10ec0fd6b -r d381f3270b5d tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py	Tue Sep  6 18:27:01 2005
+++ b/tools/python/xen/xend/XendCheckpoint.py	Tue Sep  6 20:57:45 2005
@@ -18,8 +18,8 @@
 from XendLogging import log
 
 SIGNATURE = "LinuxGuestRecord"
-PATH_XC_SAVE = "/usr/libexec/xen/xc_save"
-PATH_XC_RESTORE = "/usr/libexec/xen/xc_restore"
+PATH_XC_SAVE = "/usr/lib/xen/bin/xc_save"
+PATH_XC_RESTORE = "/usr/lib/xen/bin/xc_restore"
 
 sizeof_int = calcsize("i")
 sizeof_unsigned_long = calcsize("L")
diff -r 28a10ec0fd6b -r d381f3270b5d tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py	Tue Sep  6 18:27:01 2005
+++ b/tools/python/xen/xm/create.py	Tue Sep  6 20:57:45 2005
@@ -835,8 +835,8 @@
 
         dom = make_domain(opts, config)
         if opts.vals.console_autoconnect:
-            cmd = "/usr/libexec/xen/xenconsole %d" % dom
-            os.execvp('/usr/libexec/xen/xenconsole', cmd.split())
+            cmd = "/usr/lib/xen/bin/xenconsole %d" % dom
+            os.execvp('/usr/lib/xen/bin/xenconsole', cmd.split())
         
 if __name__ == '__main__':
     main(sys.argv)
diff -r 28a10ec0fd6b -r d381f3270b5d tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py	Tue Sep  6 18:27:01 2005
+++ b/tools/python/xen/xm/main.py	Tue Sep  6 20:57:45 2005
@@ -460,12 +460,12 @@
     from xen.xend.XendClient import server
     info = server.xend_domain(dom)
     domid = int(sxp.child_value(info, 'id', '-1'))
-    cmd = "/usr/libexec/xen/xenconsole %d" % domid
-    os.execvp('/usr/libexec/xen/xenconsole', cmd.split())
+    cmd = "/usr/lib/xen/bin/xenconsole %d" % domid
+    os.execvp('/usr/lib/xen/bin/xenconsole', cmd.split())
     console = sxp.child(info, "console")
 
 def xm_top(args):
-    os.execv('/usr/sbin/xentop', ['/usr/sbin/xentop'])
+    os.execv('/usr/lib/xen/bin/xentop', ['/usr/lib/xen/bin/xentop'])
 
 def xm_dmesg(args):
     
diff -r 28a10ec0fd6b -r d381f3270b5d tools/xcutils/Makefile
--- a/tools/xcutils/Makefile	Tue Sep  6 18:27:01 2005
+++ b/tools/xcutils/Makefile	Tue Sep  6 20:57:45 2005
@@ -15,7 +15,7 @@
 XEN_ROOT	= ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-PROGRAMS_INSTALL_DIR	= /usr/libexec/xen
+PROGRAMS_INSTALL_DIR	= /usr/lib/xen/bin
 
 INCLUDES += -I $(XEN_LIBXC)
 
diff -r 28a10ec0fd6b -r d381f3270b5d tools/xenstat/xentop/Makefile
--- a/tools/xenstat/xentop/Makefile	Tue Sep  6 18:27:01 2005
+++ b/tools/xenstat/xentop/Makefile	Tue Sep  6 20:57:45 2005
@@ -24,7 +24,7 @@
 prefix=/usr
 mandir=$(prefix)/share/man
 man1dir=$(mandir)/man1
-sbindir=$(prefix)/sbin
+sbindir=$(prefix)/lib/xen/bin
 
 CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
 LDFLAGS += -L$(XEN_LIBXENSTAT)
diff -r 28a10ec0fd6b -r d381f3270b5d tools/xenstore/Makefile
--- a/tools/xenstore/Makefile	Tue Sep  6 18:27:01 2005
+++ b/tools/xenstore/Makefile	Tue Sep  6 20:57:45 2005
@@ -124,9 +124,9 @@
 	$(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored
 	$(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored
 	$(INSTALL_DIR) -p $(DESTDIR)/usr/bin
-	$(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
+	$(INSTALL_DIR) -p $(DESTDIR)/usr/lib/xen/bin
 	$(INSTALL_DIR) -p $(DESTDIR)/usr/include
-	$(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin
+	$(INSTALL_PROG) xenstored $(DESTDIR)/usr/lib/xen/bin
 	$(INSTALL_PROG) $(CLIENTS) $(DESTDIR)/usr/bin
 	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
 	$(INSTALL_DATA) libxenstore.so $(DESTDIR)/usr/$(LIBDIR)
diff -r 28a10ec0fd6b -r d381f3270b5d tools/xentrace/Makefile
--- a/tools/xentrace/Makefile	Tue Sep  6 18:27:01 2005
+++ b/tools/xentrace/Makefile	Tue Sep  6 20:57:45 2005
@@ -23,12 +23,10 @@
 build: $(BIN)
 
 install: build
-	[ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
-	[ -d $(DESTDIR)/usr/share/man/man1 ] || \
-		$(INSTALL_DIR) $(DESTDIR)/usr/share/man/man1
-	[ -d $(DESTDIR)/usr/share/man/man8 ] || \
-		$(INSTALL_DIR) $(DESTDIR)/usr/share/man/man8
-	$(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
+	$(INSTALL_DIR) $(DESTDIR)/usr/lib/xen/bin
+	$(INSTALL_DIR) $(DESTDIR)/usr/share/man/man1
+	$(INSTALL_DIR) $(DESTDIR)/usr/share/man/man8
+	$(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/lib/xen/bin
 	$(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/share/man/man1
 	$(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/share/man/man8
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: [PATCH] Tidy up installation paths
@ 2005-09-08 20:48 Ian Pratt
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Pratt @ 2005-09-08 20:48 UTC (permalink / raw)
  To: Josh Triplett, Anthony Liguori; +Cc: xen-devel, Christian Limpach

 
> Why does this patch move xentop?  Unlike several of the 
> binaries being moved by this patch (helper binaries and 
> daemons), xentop is intended to be directly executed by a 
> user, and should be in a directory expected to be in $PATH.  
> The relevant sections of the patch are:

I'm with Anthony, in that I think its best for users to interact with
xen using just a single command, 'xm', and hence its OK to put xentop in
a helper directory.

Best,
Ian

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: [PATCH] Tidy up installation paths
@ 2005-09-08 23:10 Ian Pratt
  2005-09-09 22:46 ` Josh Triplett
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Pratt @ 2005-09-08 23:10 UTC (permalink / raw)
  To: Anthony Liguori, Josh Triplett; +Cc: xen-devel, Christian Limpach

 
> The purpose of the cleanup is to avoid cluttering $PATH with 
> things that are executable in another way.  Since xentop is 
> executable via xm top, this redundancy seemed unnecessary.
> 
> It's up to Ian or Christian.  I can go either way.

I'd prefer 'xm top', but we do need to implement Josh's suggested
fixups.

Thanks,
Ian

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-09-09 22:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06 21:04 [PATCH] Tidy up installation paths Anthony Liguori
2005-09-08 20:43 ` Josh Triplett
2005-09-08 22:59   ` Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2005-09-08 20:48 Ian Pratt
2005-09-08 23:10 Ian Pratt
2005-09-09 22:46 ` Josh Triplett
2005-09-09 22:58   ` Christian Limpach

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.