From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: Xen build - Debian vs Redhat layout patch options Date: Thu, 6 Jan 2011 15:02:25 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1411676113-1294323623=:2390" Return-path: In-Reply-To: Content-ID: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: user virtual Cc: "xen-devel@lists.xensource.com" , Ian Jackson , Bruce Edge , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org --8323329-1411676113-1294323623=:2390 Content-Type: text/plain; charset="UTF-8" Content-ID: Content-Transfer-Encoding: quoted-printable On Tue, 4 Jan 2011, user virtual wrote: > Hi Stefano >=20 > I was encouraged by Bruce to forward my patches upstream to make Xen so= urces buildable from debian makefile debian/rules > and for debian based target systems. >=20 We always welcome good patches, thanks! Could you please port your patches to xen-unstable? We usually don't apply new patches to the stable trees directly. Unfortunately we made many changes to the init scripts in xen-unstable so porting the patches might not be straightforward. I'll post some comments inline. > I tried to make my 3 of 4 (5) patches to xen40-testing.hg as non intrus= ive as possible >=20 > - backport-StdGNU.mk.diff=C2=A0 (from xen-devel, already here) > - debian-sysconfig-default.diff=C2=A0 (conditional Makefile expansion) > Description: Adapt init.d and sysconfig files to Debian based systems > An attempt to assess that the build is to be made for Debian > based systems. Based on the assessment adapt init.d and sysconfig > files > * Config.mk: DEBIANBASE - guess if the target system is debian based > * tools/hotplug/Linux/Makefile: target install-initd: if DEBIANBASE=3D= y > - use /etc/default instead for /etc/sysconfig as destination folde= r > - replace references of /etc/sysconfig for /etc/default in init.d-= files > Author: User Virtual > Origin: http://virtualusr.wordpress.com > Index: xen-4.0-4.0.1/Config.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- xen-4.0-4.0.1.orig/Config.mk 2010-08-25 10:22:42.000000000 +0200 > +++ xen-4.0-4.0.1/Config.mk 2011-01-04 19:08:17.816312723 +0100 > @@ -185,5 +185,6 @@ > PYTHON_TOOLS ?=3D y > CONFIG_MINITERM ?=3D n > CONFIG_LOMOUNT ?=3D n > +DEBIANBASE ?=3D $(shell test ! -d /etc/sysconfig && test -d /e= tc/default && echo y || echo n) > =20 > -include $(XEN_ROOT)/.config > Index: xen-4.0-4.0.1/tools/hotplug/Linux/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- xen-4.0-4.0.1.orig/tools/hotplug/Linux/Makefile 2010-08-25 10:22:42= .000000000 +0200 > +++ xen-4.0-4.0.1/tools/hotplug/Linux/Makefile 2011-01-04 19:08:17.8163= 12723 +0100 > @@ -59,14 +59,22 @@ > .PHONY: install > install: all install-initd install-scripts $(HOTPLUGS) > =20 > +SYSCONF_DIR =3D $(if $(filter y,$(DEBIANBASE)),default,sysconfig) > .PHONY: install-initd > install-initd: > [ -d $(DESTDIR)$(CONFIG_DIR)/init.d ] || $(INSTALL_DIR) $(DESTDIR)$(C= ONFIG_DIR)/init.d > - [ -d $(DESTDIR)$(CONFIG_DIR)/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)= $(CONFIG_DIR)/sysconfig > + [ -d $(DESTDIR)$(CONFIG_DIR)/$(SYSCONF_DIR) ] || $(INSTALL_DIR) $(DES= TDIR)$(CONFIG_DIR)/$(SYSCONF_DIR) > $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)$(CONFIG_DIR)/init.d > - $(INSTALL_PROG) $(XEND_SYSCONFIG) $(DESTDIR)$(CONFIG_DIR)/sysconfig/x= end > + $(INSTALL_PROG) $(XEND_SYSCONFIG) $(DESTDIR)$(CONFIG_DIR)/$(SYSCONF_D= IR)/xend > $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)$(CONFIG_DIR)/init.d > - $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)$(CONFIG_DIR)/sysco= nfig/xendomains > + $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)$(CONFIG_DIR)/$(SYS= CONF_DIR)/xendomains > +ifeq ($(DEBIANBASE),y) > + set -e; for i in $(DESTDIR)$(CONFIG_DIR)/$(XEND_INITD) $(DESTDIR)$(CO= NFIG_DIR)/$(XENDOMAINS_INITD) ; do \ > + cp -a $$i $$i.tmp ; cp /dev/null $$i ; \ > + sed -e 's|/etc/sysconfig\b|/etc/default|g' $$i.tmp >> $$i ; \ > + rm -f $$i.tmp ; \ > + done > +endif > =20 Using sed on the init scripts is not the right way of doing it. On xen-unstable we have a new init script called xencommons (tools/hotplug/Linux/init.d/xencommons), if you open it you'll see that we already check for the presence of /etc/sysconfig or /etc/default and act accordingly. Something equivalent has been introduced to the xendomains script too. Thus I hope that on xen-unstable running sed on the init scripts is not required anymore. > .PHONY: install-scripts > install-scripts: >=20 > - tools-blktap2-libs.patch=C2=A0=C2=A0 (from debian Xen-4.0 sources) > - debian-python-2.6.diff=C2=A0 (conditional Makefile expansion) > - debian-stubdom.Makefile.diff=C2=A0 (conditional Makefile expansion) Could you please explain why is this needed? =20 > 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 l= oad xenfs module so late in the boot process? If > so, the last patch might also be interesting for upload, right? I believe we fixed this issue on xen-unstable moving the xenfs mount request in the xencommons script and removing the check for xenfs in /proc/filesystems. --8323329-1411676113-1294323623=:2390 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --8323329-1411676113-1294323623=:2390--