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

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] Xen build - Debian vs Redhat layout patch options
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=DxenIqUvzftOOmaVZSugHcQdL1tdlRky/tsYzPdTiEw=; b=g5UcgDPJ+N8WNxMxWMPgn3KVkO1Ml6yfBzZ9QlBK0R2lssvQ4CbLGiriCOHk4WDMvR 9DhcZTV2Qy67VBNB23uQNg59FGlLIyY+wwTCGeGDXkJYoETmsQSh1GgsAN78RoLVNAuV ZtJifuPyk9FGCxiqqvclywz6hj3W2sqCAbsBg=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19600.39408.486631.15438@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTimi2-DzvysGnzJmEZtL4TXSsX6YDS0TPtoU-FiE@xxxxxxxxxxxxxx> <alpine.DEB.2.00.1007071207480.17029@kaball-desktop> <AANLkTi=2TveuUANkar9d89k_Ck22RWFDEB-bKnCanOuz@xxxxxxxxxxxxxx> <19599.43888.826450.690087@xxxxxxxxxxxxxxxxxxxxxxxx> <AANLkTik8b2evzTg8biVPVySvJTzVYmTSmSSt-WhbYrnD@xxxxxxxxxxxxxx> <19600.39408.486631.15438@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

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