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: Tue, 14 Sep 2010 11:56:13 -0700
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 14 Sep 2010 11:56:57 -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=TQxn6on2K5ttMUchRydf+ewgb+Hy+fFgPsTa3tkbnQY=; b=ISSU5vBh7piyoShD88QecfBWT/V4A9BYa78oWFW9urIpJI0NiuzPLSCTNGXc/At/Yf cmPT4tF9pYxocBjlq2uq/cf/3wyvLawHiyoBoZMf2NfFMGjJoXmJ2NnFjX6CQqgCoVU7 XW7CmUxx9frCS5A4QNA8Z53aGlTkqvetxEePw=
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=jtiIKRwV4jjk/V72slzNjMHNWk/2vueiKLQWKFwcbzZMztjCsIVR0FpRQkNfD2rFB2 TPpUdiL5baRVe9CgYgJUKcuAFI1mDxRk4kGUR381JPislqoHE4USCcWIEkz9RyzS37h6 Hk3MYGImPImboZcV02USEaPRFjItlizpm80M4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19599.43888.826450.690087@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Sep 14, 2010 at 10:05 AM, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> wrote:
> Bruce Edge writes ("Re: [Xen-devel] [patch] Xen build - Debian vs Redhat 
> layout patch options"):
>> There are 2 locations that are not optimal for Debian based distributions.
>> These are /etc/sysconfig, and /var/subsys.
>> Debian uses /etc/default and /var for these respectively.
>
> Thanks for this contribution.  I have some comments:

Thanks for the hints Ian. I have some questions on your comments.

>
>> This patch provides a new make config variable, XEN_CONFIG_ARCH, which
>> changes the location of these 2 elements if set.
>
> I'm not sure that "XEN_CONFIG_ARCH" is the right answer.  What's wrong
> with simply setting SYSCONFIG_DIR ?  Perhaps SYSCONFIG_DIR needs to be
> defined with "?=" rather than "=" ?

In order to honor the $PREFIX setting, $SYSCONFIG_DIR has to depend on $PREFIX:

ifeq ($(PREFIX),/usr)
CONFIG_DIR = /etc
else
CONFIG_DIR = $(PREFIX)/etc
endif

SYSCONFIG_DIR = $(CONFIG_DIR)/$(XEN_CONFIG_ARCH)

So using ?= for the above would require that one manually add the
$PREFIX to whatever SYSCONFIG_DIR they wanted to use.

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

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

>
>> For the runtime scripts it checks whether the Red Hat sysconfig files
>> exist first, then looks in the Debian location.
>> This lets the config files reside in the desired location and does not
>> require any additional runtime config file
>> to point to their location.
>
> This is good.
>
>>  Creating network initscripts
>>  ----------------------------
>>
>> -In the /etc/sysconfig/network-scripts directory it is necccessary to create
>> +In the <SYSCONFIG>/network-scripts directory it is necccessary to create
>>  2 config files. The first (ifcfg-eth0) defines your physical network 
>> interface,
>>  and says that it will be part of a bridge:
>
> 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....

>
> It's only the files which are invented by the Xen distribution which
> might be found in /etc/sysconfig _or_ /etc/default.
>
>>  if [ -f /etc/sysconfig/xenballoon.conf ]; then
>>         . /etc/sysconfig/xenballoon.conf
>> +else
>> +       if [ -f /etc/default/xenballoon.conf ]; then
>
> Use elif ?

:-)

>
>> +if [ -d /etc/sysconfig ]; then
>> +       LOCKFILE=/var/lock/subsys/xendomains
>> +       XENDOM_CONFIG=/etc/sysconfig/xendomains
>> +else
>> +       LOCKFILE=/var/lock/xendomains
>> +       XENDOM_CONFIG=/etc/default/xendomains
>> +fi
>
> I don't think this is correct.  You should test for /etc/sysconfig and
> /var/lock/subsys separately, in case someone makes a mutant distro
> that has one but not the other.

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.

-Bruce

>
> Would you care to revise your patch and resubmit it ?
>
> Thanks,
> Ian.
>

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

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