All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Edge <bruce.edge@gmail.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [patch] Xen build - Debian vs Redhat layout patch options
Date: Wed, 15 Sep 2010 09:06:52 -0700	[thread overview]
Message-ID: <AANLkTim8TGttxjWiVCnXrh9wyzpfaC6sd=MirvYUw__y@mail.gmail.com> (raw)
In-Reply-To: <19600.39408.486631.15438@mariner.uk.xensource.com>

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

  reply	other threads:[~2010-09-15 16:06 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07  0:07 Xen build - Debian vs Redhat layout patch options Bruce Edge
2010-07-07 11:19 ` Stefano Stabellini
2010-09-13 23:53   ` [patch] " Bruce Edge
2010-09-14  0:23     ` Mike Viau
2010-09-14  6:45     ` Sander Eikelenboom
2010-09-14 14:18       ` Bruce Edge
2010-09-14 14:31     ` Olaf Hering
2010-09-14 17:05     ` Ian Jackson
2010-09-14 17:13       ` Bruce Edge
2010-09-14 18:56       ` Bruce Edge
2010-09-15 10:03         ` Ian Jackson
2010-09-15 16:06           ` Bruce Edge [this message]
2010-09-15 16:16             ` Olaf Hering
2010-09-16 16:29             ` Ian Jackson
2010-09-16 18:52               ` Bruce Edge
2010-09-16 20:45                 ` Olaf Hering
2010-09-16 20:56                   ` Bruce Edge
2010-09-16 20:59                     ` Olaf Hering
2010-09-16 21:02                       ` Bruce Edge
2010-09-17 16:11                         ` Ian Jackson
2010-09-17 17:05                           ` Bruce Edge
2010-09-17 17:52                             ` Ian Jackson
2010-09-17 18:13                               ` Bruce Edge
2010-09-16 20:24               ` Dan Magenheimer
2010-09-16 20:34                 ` Dan Magenheimer
2010-09-17 15:01               ` [patch] Xen build - Debian vs Redhat layout patch options [and 1 more messages] Ian Jackson
     [not found]   ` <AANLkTim48T7Y3Pq0_nS1zZ5jWH_kXrS8JceWLf-yUOM6@mail.gmail.com>
2011-01-04 21:09     ` Xen build - Debian vs Redhat layout patch options user virtual
2011-01-06 15:02       ` Stefano Stabellini
2011-01-11 17:37       ` Ian Jackson
2011-01-20 13:45         ` user virtual
     [not found]           ` <AANLkTimCA_T1QsfCVfABtW8776Mkg3toBtmHYHgea56=@mail.gmail.com>
2011-01-19 22:34             ` xen-unstable: ImportError: No module named xen.xm chris
2011-01-20  8:38               ` Ian Campbell
2011-01-20 16:49                 ` [Xen-devel] " chris
2011-01-20 16:54                   ` Ian Campbell
2011-01-20 17:23                     ` chris
2011-01-20 17:38                       ` Ian Campbell
2011-01-21 18:20                         ` [Xen-users] " Mike Viau
2011-01-21 19:16                           ` Ian Jackson
2011-01-26 14:51                           ` Re: [Xen-devel] " Ian Jackson
2011-01-26 17:32                             ` Mike Viau
     [not found]                 ` <m2n.s.1PfxnK-153952@chiark.greenend.org.uk>
2011-01-20 18:19                   ` Ian Jackson
2011-01-20 18:35                     ` chris
2011-01-21 18:59                       ` [Xen-devel] Re: xen-unstable: ImportError: No module named xen.xm [and 1 more messages] Ian Jackson
2011-01-21 15:30           ` Xen build - Debian vs Redhat layout patch options user virtual
2011-01-21 17:28             ` Bruce Edge
2011-01-21 18:42               ` Ian Jackson
2011-07-13 13:41                 ` User Virtual
2011-01-21 17:29             ` Stefano Stabellini
2011-01-21 18:40               ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTim8TGttxjWiVCnXrh9wyzpfaC6sd=MirvYUw__y@mail.gmail.com' \
    --to=bruce.edge@gmail.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.