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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, 2005-09-08 at 13:43 -0700, Josh Triplett wrote:> 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: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.> 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).We''re not following the standard GNUisms. One thing that is really needed is more commonality between the tools build files. I''m sure a patch to cleanup all of the tools Makefiles would be appreciated.> 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.The first round of the patch is strictly changing install paths. Smaller patches are easier to review. Feel free to submit additional patches to enhance the xm top interface though. Regards, Anthony Liguori> - Josh Triplett_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Pratt wrote:>>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.One other issue as well, by the way: with xentop as a separate command, it can be documented through the use of a manpage (currently installed into /usr/share/man/man1/xentop.1). However, with xentop only executable via xm, it is not possible to "man xm top". - Josh Triplett _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Christian Limpach
2005-Sep-09 22:58 UTC
Re: [Xen-devel] [PATCH] Tidy up installation paths
On Fri, Sep 09, 2005 at 03:46:41PM -0700, Josh Triplett wrote:> Ian Pratt wrote: > >>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. > > One other issue as well, by the way: with xentop as a separate command, > it can be documented through the use of a manpage (currently installed > into /usr/share/man/man1/xentop.1). However, with xentop only > executable via xm, it is not possible to "man xm top".I''d rather keep it in the user''s path. Actually, I think having it runnable from xm is nice but doesn''t really fit into the overall xm/xend concept where xm doesn''t necessarily run in the same domain as xend. christian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel