[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Tidy up installation paths



Anthony Liguori wrote:
> 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.

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:

> 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
[...]
>      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/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)

If it would help, I would be glad to provide a modified version of the
patch which omits these sections.

Also, if xentop *were* to be moved, then there are two issues that would
need to be resolved first:

1) Please don't just change the value of the "sbindir" variable in the
makefile; those variables are intended to mirror the naming structure of
autotools' destination directory variables, so the variable should be
renamed to libexecdir. Despite the name, libexecdir is typically set to
a package-specific directory under /usr/lib/ , on systems which don't
use libexec directories (meaning pretty much anything other than GNU/Hurd).

2) The "xm top" interface needs to be changed to pass through command
line arguments, while somehow avoiding the fact that "xm top --help"
would refer to itself as "xentop".  (I planned to do this anyway, but if
you're going to move xentop, then this needs to be done first to avoid
losing functionality.)

- Josh Triplett

Attachment: signature.asc
Description: OpenPGP digital signature

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.