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] Xen build - Debian vs Redhat layout patch options

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Xen build - Debian vs Redhat layout patch options
From: user virtual <virtualusr@xxxxxxxxx>
Date: Wed, 5 Jan 2011 02:39:15 +0530
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Bruce Edge <bruce.edge@xxxxxxxxx>
Delivery-date: Tue, 11 Jan 2011 02:51:24 -0800
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; bh=Bq3Nzt+uvTo+nVYAf6ttj//Ry6ma36nb6XH1tNHxCfQ=; b=uqMf3hs8LaFz+kACxeek6Br9OUnoEwqcQBOP9rns1OzOLvUO2fIrT+aRaf3t251om4 1hDYyXKPe0MDO6DQH4+sYTNAj6hDCrfod7zjCMb9usCrjBcuo98gnKMasVvbeociEwjV prpcKGSvcE4FbwHCUS6Qfy9OkqpbvvzJCItlQ=
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; b=GrOlovUE6OJhY49XnWBFQQnAZ9qNSVBF98tqktj26LAnr0tUBHzrk5Sm8eelsoLpD6 yQ4/S1DRKOvq7QMIjX7UcGZfO/eAtEh5nr8UeWb6siWo8YgvR5QeDRM/QLxYUC+L2itK RifuSUFPeLdVHeNHrFYQcImsX/9Z+hVVxLR1E=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTim48T7Y3Pq0_nS1zZ5jWH_kXrS8JceWLf-yUOM6@xxxxxxxxxxxxxx>
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> <AANLkTim48T7Y3Pq0_nS1zZ5jWH_kXrS8JceWLf-yUOM6@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Stefano

I was encouraged by Bruce to forward my patches upstream to make Xen sources buildable from debian makefile debian/rules and for debian based target systems.

I tried to make my 3 of 4 (5) patches to xen40-testing.hg as non intrusive as possible

- backport-StdGNU.mk.diff  (from xen-devel, already here)
- debian-sysconfig-default.diff  (conditional Makefile expansion)
- tools-blktap2-libs.patch   (from debian Xen-4.0 sources)
- debian-python-2.6.diff  (conditional Makefile expansion)
- debian-stubdom.Makefile.diff  (conditional Makefile expansion)

Config.mk gets patched with the line:

DEBIANBASE ?= \
$(shell test ! -d /etc/sysconfig && test -d /etc/default && echo y || echo n)

... and three other patches depend on it.

tools-blktap2-libs.patch is non conditional but it seems quite reasonable (only moves FLAGS definitions closer to the sources requiring them) and comes from a respected source.

If these are applied Xen sources build without errors from superior debian build makefile
"debian/rules", bringing updating Xen through debian package management.

See for example of debian packager:
http://virtualusr.wordpress.com/2011/01/03/xen-4-0-packager-for-ubuntu/

Original 4.0.1 source builds on Ubuntu Lenny 10.04 with
  make dist
and produces similar result as pached 4.0.1 source builds with
  make dist DEBIANBASE=n

Patched source runs with
  make dist DEBIANBASE=y 
same as with simple 
  make dist
and builds debian-based version without errors.

I hope you will find this useful and apply it upstream.

Best regards


PS: I find the last xend.patch useful here if init.d/xend is run before xenfs kernel module is loaded. Mount attempt autoloads the module. Otherwise mount is never attempted. Is it ok to load xenfs module so late in the boot process? If so, the last patch might also be interesting for upload, right?


On Mon, Jul 12, 2010 at 4:08 AM, Bruce Edge <bruce.edge@xxxxxxxxx> wrote:
FYI - 

You could submit a patch to the Xen Gods directly and it would be accepted.

I already got the debug options accepted in xen-unstable, so they do listen to people who have never contributed before.
(21752 (29e545151078) tools/debugger/gdbsx: build enabled by default)

-Bruce


---------- Forwarded message ----------
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, Jul 7, 2010 at 4:19 AM
Subject: Re: [Xen-devel] Xen build - Debian vs Redhat layout patch options
To: Bruce Edge <bruce.edge@xxxxxxxxx>
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>


On Wed, 7 Jul 2010, Bruce Edge wrote:
> What's the right way to address these sort RedHat vs. Debian things in the Xen build?
>
> - rm -f  $(D)$(CONFIG_DIR)/sysconfig/xendomains
> + rm -f  $(D)$(CONFIG_DIR)/default/xendomains
>
> - mkdir -p /var/lock/subsys
> - touch /var/lock/subsys/xend
> + mkdir -p /var/lock
> + touch /var/lock/xend
>
> Can I submit a patch that uses a config var to switch on which path use ?
>
> Or, where should such a build time switch go? Env, or?
> ...assuming that it's even an option.
>
> There's a couple of different downstream patches that others are maintaining to handle this kind of stuff, but that lag
> behind the xen-unstable tree and it seems like an upstream patch to handle this distro variation in the Xen build itself
> would be a better long term solution.
>

A way to switch between the two would be nice, I would accept a patch
that accomplish that using a config var (something in Config.mk ?.
The default value of this config variable might be detected looking at
the existence of /etc/sysconfig or /etc/default.

Keep in mind that besides sysconfig vs. default there are other subtle
differences, like the chkconfig line in the init scripts
(tools/hotplug/Linux/init.d/xencommons for example).


Attachment: backport-StdGNU.mk.diff
Description: Text Data

Attachment: debian-sysconfig-default.diff
Description: Text Data

Attachment: tools-blktap2-libs.patch
Description: Text Data

Attachment: debian-python-2.6.diff
Description: Text Data

Attachment: debian-stubdom.Makefile.diff
Description: Text Data

Attachment: xend.patch
Description: Text Data

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