[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Build target to wrap dist/install in a .deb archive


  • To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Wed, 11 May 2011 17:56:00 +0100
  • Cc:
  • Delivery-date: Wed, 11 May 2011 09:57:35 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=oQ6wyT3V0IxwYPXT23mkUIkvwo/vPZ9nIu1ZpvHbn3RvBAQdWAVYQYum5eoOeA/bbP A7CjHDBhtIXjqQLee33T6H0RHpupU0z4PO+YbtrOJ0JKSFHj0SCzgX2F9R+fCenj7L66 3C3oqMKlJ/KGFi5YIBVUX7ZuJe4g7IbHLne/4=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcwP/E3mQcnOOCAp60ajD8CGYukKrA==
  • Thread-topic: [Xen-devel] [PATCH] Build target to wrap dist/install in a .deb archive

On 11/05/2011 16:32, "Tim Deegan" <Tim.Deegan@xxxxxxxxxx> wrote:

> # HG changeset patch
> # User Tim Deegan <Tim.Deegan@xxxxxxxxxx>
> # Date 1305126869 -3600
> # Node ID 3e557227ab5055024ca85284d9328686aaa6380e
> # Parent  19452acd23045f40c4e18437f0a60f016757e5bd
> Build target to wrap dist/install in a .deb archive.
> 
> Adds "make deb", which does a "make dist" build and wraps the resulting
> dist/install files in dist/xen-<version>.deb
> 
> This is _not_ a "packaged" version of Xen for Debian users, nor is it
> intended to compete with anyone else's packaging efforts.  In particular
> it doesn't do any of the boot-time or fstab fixups needed to actually
> start the xen tools.  It's just a quick hack for developers to be able
> to quickly install and uninstall a Xen build on a test box.

IOW you are posting this as an aid for other devs, not for applying to the
tree? Personally I wouldn't be in favour of sticking this kind of thing in
tree.

 -- Keir

> Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
> 
> diff -r 19452acd2304 -r 3e557227ab50 Makefile
> --- a/Makefile Fri May 06 11:15:35 2011 +0100
> +++ b/Makefile Wed May 11 16:14:29 2011 +0100
> @@ -49,6 +49,34 @@ dist-%: DESTDIR=$(DISTDIR)/install
>  dist-%: install-%
> @: # do nothing
>  
> +# Package a build as a Debian .deb archive.
> +DEBVER = $(shell $(MAKE) -C xen xenversion | grep -v :)
> +DEBNAME = xen-upstream-$(DEBVER)
> +DEB = dist/debian
> +dist/$(DEBNAME).deb: dist
> + rm -rf $(DEB)
> + mkdir -p $(DEB)
> + cp -a dist/install $(DEB)/tmp
> + # Debian doesn't use /usr/lib64 for 64-bit libraries
> + cp -a $(DEB)/tmp/usr/lib64/* $(DEB)/tmp/usr/lib/*
> + rm -rf $(DEB)/tmp/usr/lib64
> + sed 's/VERSION/$(DEBVER)/' tools/deb/copyright >$(DEB)/copyright
> + sed '/====/q' COPYING >> $(DEB)/copyright
> + sed 's/VERSION/$(DEBVER)/' tools/deb/changelog >$(DEB)/changelog
> + echo " -- $$(id -nu) <$$(id -nu)@$$(hostname -f)>  $$(date -R)"
> >>$(DEB)/changelog
> + sed 's/VERSION/$(DEBVER)/' tools/deb/control >$(DEB)/control
> + mkdir -p $(DEB)/tmp/usr/share/doc/$(DEBNAME)
> + cp $(DEB)/control $(DEB)/copyright $(DEB)/tmp/usr/share/doc/$(DEBNAME)/
> + gzip -c9 $(DEB)/changelog
> >$(DEB)/tmp/usr/share/doc/$(DEBNAME)/changelog.Debian.gz
> + mkdir -p $(DEB)/tmp/DEBIAN
> + chown -R root:root $(DEB)
> + cd dist && dpkg-gencontrol -p$(DEBNAME)
> + dpkg --build $(DEB)/tmp $@
> +
> +.PHONY: deb
> +deb: 
> + fakeroot $(MAKE) dist/$(DEBNAME).deb
> +
>  # Legacy dist targets
>  .PHONY: xen tools stubdom kernels docs
>  xen: dist-xen
> diff -r 19452acd2304 -r 3e557227ab50 tools/deb/changelog
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/tools/deb/changelog Wed May 11 16:14:29 2011 +0100
> @@ -0,0 +1,3 @@
> +xen-upstream (VERSION) unstable; urgency=low
> +
> +  * Custom-built Xen hypervisor and tools.
> diff -r 19452acd2304 -r 3e557227ab50 tools/deb/control
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/tools/deb/control Wed May 11 16:14:29 2011 +0100
> @@ -0,0 +1,12 @@
> +Source: xen-upstream
> +Section: admin
> +Priority: optional
> +Maintainer: Unmaintained snapshot
> +
> +Package: xen-upstream-VERSION
> +Architecture: any
> +Description: Xen hypervisor and tools, version VERSION
> + This package contains the Xen hypervisor and associated tools, built
> + from a source tree.  It is not a fully packaged and supported Xen, just
> + the output of a xen "make dist" wrapped in a .deb to make it easy to
> + uninstall.
> diff -r 19452acd2304 -r 3e557227ab50 tools/deb/copyright
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/tools/deb/copyright Wed May 11 16:14:29 2011 +0100
> @@ -0,0 +1,5 @@
> +Xen hypervisor and tools, packaged from a private build.
> +Sources are available from http://xenbits.xen.org/hg/
> +
> +Copyright (c) 2002-2011 Keir Fraser and others.
> +
> diff -r 19452acd2304 -r 3e557227ab50 xen/Makefile
> --- a/xen/Makefile Fri May 06 11:15:35 2011 +0100
> +++ b/xen/Makefile Wed May 11 16:14:29 2011 +0100
> @@ -129,6 +129,10 @@ define set_exuberant_flags
>    --extra=+f --c-kinds=+px") || true`
>  endef
>  
> +.PHONY: xenversion
> +xenversion:
> + @echo $(XEN_FULLVERSION)
> +
>  .PHONY: _TAGS
>  _TAGS: 
> set -e; rm -f TAGS; \
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.