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

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


  • To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
  • From: Bruce Edge <bruce.edge@xxxxxxxxx>
  • Date: Wed, 15 Sep 2010 09:06:52 -0700
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 15 Sep 2010 09:07:23 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=RDvdEA9uid4oTUOtgrIYKCpnb332zsmaWl1C15n0qiD3UG/sqAdVOGeOGt/PBnzFgG S8m2ScOTwaJYmzzbXccZmvbQjIFeQ1cWhxoU1zjedad/5bRImgWPt5MiXhc1B0dsWeP2 vChT0CPFJNL++d/KGjECWGleLgvJYc7ajZrpY=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On Wed, Sep 15, 2010 at 3:03 AM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote:
> 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.

You don't think there's any advantage to grouping all the distro
directory dependencies in one place?

Something like this:

ifeq ($(DISTRO_TYPE),redhat)
SYSCONFIG_DIR = $(CONFIG_DIR)/sysconfig
SUBSYS_DIR = /var/run/subsys
INITD_DIR = /etc/rc.d/init.d
endif

ifeq ($(DISTRO_TYPE),debian)
SYSCONFIG_DIR = $(CONFIG_DIR)/default
SUBSYS_DIR = /var/run
INITD_DIR = /etc/init.d
endif

I thought that would make it easy to see where new distro layouts
should be added.

If not, then I'll just use these variables that can be tuned individually:

SYSCONFIG_DIR_LEAF
SUBSYS_DIR_LEAF
INITD_DIR

and put them all in Config.mk.

-Bruce

>
>> > 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


 


Rackspace

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