WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] Xen build - Debian vs Redhat layout patch option

Bruce Edge writes ("Re: [Xen-devel] [patch] Xen build - Debian vs Redhat layout 
patch options"):
> So using ?= for the above would require that one manually add the
> $PREFIX to whatever SYSCONFIG_DIR they wanted to use.

Yes, you're right.  That's a good reason for using a variable just for
the directory leafname.

> > If we do need a special variable for the leaf dir it should be called
> > something else.  ARCH is for CPU architectures.
> 
> What's a good word to differentiate bewteen debian/red hat distros?
> 
> DISTRO_TYPE=<debian | redhat>

No, that's not the correct answer.  We should have one variable for
each thing that is controlled.  So for the /etc dir for Xen settings
files in sh syntax, SYSCONFIG_DIR_LEAF set to "default" or
"sysconfig", perhaps.

> That would allow the addition of other distro types as neeeded.

It is better to provide hooks to allow distros we don't know about to
do what they want.

> > This, and all the stuff that implicitly refers to files in
> > /etc/default for host network configuration, is entirely wrong.
> > Debian-derived distros have a different way of setting up networking
> > and the files have a different syntax and semantics, as well as a
> > different location.
> 
> I'll need to research this further. If anyone has any heuristics to
> suggest....

Since this is a document, rather than a script, you can simply refer
people to the Debian version.

Debian derivatives use /etc/network/interfaces.  Documentation can be
found in the manpages interfaces(5) and bridge-utils-interfaces(5).
A typical /etc/network/interfaces for Xen looks something like this:

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto xenbr0
    iface xenbr0 inet static
        address 192.0.2.145
        netmask 255.255.255.0
        gateway 192.0.2.254
        bridge_ports eth0
        bridge_fd 0
        bridge_stp off

> Again, if I go with DISTRO_TYPE I could define a set of default
> Locations for each DISTRO_TYPE. That would allow std distros to work
> with a master toggle and others to be customized as needed.

A "master toggle" as you call it is generally a bad idea.  Portability
features should be switched individually.

Ian.

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

<Prev in Thread] Current Thread [Next in Thread>