* [PATCH] Build target to wrap dist/install in a .deb archive
@ 2011-05-11 15:32 Tim Deegan
2011-05-11 15:46 ` Tim Deegan
2011-05-11 16:56 ` Keir Fraser
0 siblings, 2 replies; 7+ messages in thread
From: Tim Deegan @ 2011-05-11 15:32 UTC (permalink / raw)
To: xen-devel
# HG changeset patch
# User Tim Deegan <Tim.Deegan@citrix.com>
# 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.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
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; \
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Build target to wrap dist/install in a .deb archive
2011-05-11 15:32 [PATCH] Build target to wrap dist/install in a .deb archive Tim Deegan
@ 2011-05-11 15:46 ` Tim Deegan
2011-05-11 16:56 ` Keir Fraser
1 sibling, 0 replies; 7+ messages in thread
From: Tim Deegan @ 2011-05-11 15:46 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
Oops, this version has an ugly typo in it. Better version on its way in
a minute...
Tim.
At 16:32 +0100 on 11 May (1305131544), Tim Deegan wrote:
> # HG changeset patch
> # User Tim Deegan <Tim.Deegan@citrix.com>
> # 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.
>
> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
>
> 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@lists.xensource.com
> http://lists.xensource.com/xen-devel
--
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Build target to wrap dist/install in a .deb archive
2011-05-11 15:32 [PATCH] Build target to wrap dist/install in a .deb archive Tim Deegan
2011-05-11 15:46 ` Tim Deegan
@ 2011-05-11 16:56 ` Keir Fraser
2011-05-11 21:23 ` Tim Deegan
1 sibling, 1 reply; 7+ messages in thread
From: Keir Fraser @ 2011-05-11 16:56 UTC (permalink / raw)
To: Tim Deegan, xen-devel
On 11/05/2011 16:32, "Tim Deegan" <Tim.Deegan@citrix.com> wrote:
> # HG changeset patch
> # User Tim Deegan <Tim.Deegan@citrix.com>
> # 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@citrix.com>
>
> 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@lists.xensource.com
> http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Build target to wrap dist/install in a .deb archive
2011-05-11 16:56 ` Keir Fraser
@ 2011-05-11 21:23 ` Tim Deegan
2011-05-12 8:15 ` Ian Campbell
2011-05-16 10:50 ` Tim Deegan
0 siblings, 2 replies; 7+ messages in thread
From: Tim Deegan @ 2011-05-11 21:23 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel@lists.xensource.com
At 17:56 +0100 on 11 May (1305136560), Keir Fraser wrote:
> On 11/05/2011 16:32, "Tim Deegan" <Tim.Deegan@citrix.com> wrote:
> > 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.
I was suggesting checking it in, actually; just pointing out that it's
basically just using .deb format as an easy way do do uninstalls.
This is something I've been asked for by people who are trying to code
and test against tip of Xen without regrooving test boxes all the time.
Linux has something similar in its tree, as a shell script rather than a
Makefile target. If you prefer, I could rework this patch as a script too.
That way if you strongly object to putting it in the Xen tree I can
publish it separately.
Cheers,
Tim.
--
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Build target to wrap dist/install in a .deb archive
2011-05-11 21:23 ` Tim Deegan
@ 2011-05-12 8:15 ` Ian Campbell
2011-05-16 10:50 ` Tim Deegan
1 sibling, 0 replies; 7+ messages in thread
From: Ian Campbell @ 2011-05-12 8:15 UTC (permalink / raw)
To: Tim Deegan; +Cc: Keir Fraser, xen-devel@lists.xensource.com
On Wed, 2011-05-11 at 22:23 +0100, Tim Deegan wrote:
> At 17:56 +0100 on 11 May (1305136560), Keir Fraser wrote:
> > On 11/05/2011 16:32, "Tim Deegan" <Tim.Deegan@citrix.com> wrote:
> > > 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.
>
> I was suggesting checking it in, actually; just pointing out that it's
> basically just using .deb format as an easy way do do uninstalls.
> This is something I've been asked for by people who are trying to code
> and test against tip of Xen without regrooving test boxes all the time.
>
> Linux has something similar in its tree, as a shell script rather than a
> Makefile target.
In my experience the Linux version of this has proven very useful,
especially in cases like doing a bisect where you have a bunch of
different versions floating around...
(Hmm, something like CONFIG_LOCALVERSION_AUTO would also be really handy
in that respect...)
> If you prefer, I could rework this patch as a script too.
> That way if you strongly object to putting it in the Xen tree I can
> publish it separately.
>
> Cheers,
>
> Tim.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Build target to wrap dist/install in a .deb archive
2011-05-11 21:23 ` Tim Deegan
2011-05-12 8:15 ` Ian Campbell
@ 2011-05-16 10:50 ` Tim Deegan
1 sibling, 0 replies; 7+ messages in thread
From: Tim Deegan @ 2011-05-16 10:50 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel@lists.xensource.com
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
At 22:23 +0100 on 11 May (1305152611), Tim Deegan wrote:
> At 17:56 +0100 on 11 May (1305136560), Keir Fraser wrote:
> > 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.
>
> I was suggesting checking it in, actually; just pointing out that it's
> basically just using .deb format as an easy way do do uninstalls.
> This is something I've been asked for by people who are trying to code
> and test against tip of Xen without regrooving test boxes all the time.
>
> Linux has something similar in its tree, as a shell script rather than a
> Makefile target. If you prefer, I could rework this patch as a script too.
Scriptified version attached.
Cheers,
Tim.
--
Tim Deegan <Tim.Deegan@citrix.com>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
[-- Attachment #2: deb --]
[-- Type: text/plain, Size: 3005 bytes --]
# HG changeset patch
# User Tim Deegan <Tim.Deegan@citrix.com>
# Date 1305542927 -3600
# Node ID 32a1bb05287323b2094274be0823fe2ea17aa702
# Parent f9bb0bbea7c27e256275cfe58c16c0077542984e
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.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
diff -r f9bb0bbea7c2 -r 32a1bb052873 Makefile
--- a/Makefile Thu May 12 16:42:54 2011 +0100
+++ b/Makefile Mon May 16 11:48:47 2011 +0100
@@ -118,6 +118,11 @@ world:
$(MAKE) kdelete
$(MAKE) dist
+# Package a build in a .deb file
+.PHONY: deb
+deb: dist
+ fakeroot sh ./tools/misc/mkdeb $(XEN_ROOT) $$($(MAKE) -C xen xenversion | grep -v :)
+
# clean doesn't do a kclean
.PHONY: clean
clean::
diff -r f9bb0bbea7c2 -r 32a1bb052873 tools/misc/mkdeb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/misc/mkdeb Mon May 16 11:48:47 2011 +0100
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# mkdeb: package the dist/install output of a Xen build in a .deb
+#
+# Takes 2 arguments, the path to the dist directory and the version
+
+set -e
+
+if test -z "$1" -o -z "$2" ; then
+ echo "usage: $0 path-to-XEN_ROOT xen-version"
+ exit 1
+fi
+
+cd $1
+version=$2
+if test "$XEN_TARGET_ARCH" = "x86_32"; then
+ arch=i386
+else
+ arch=amd64
+fi
+
+# Prepare the directory to package
+cd dist
+rm -rf deb
+cp -a install deb
+
+# Debian doesn't use /usr/lib64 for 64-bit libraries
+if test -d deb/usr/lib64 ; then
+ cp -a deb/usr/lib64/* deb/usr/lib/
+ rm -rf deb/usr/lib64
+fi
+
+# Fill in the debian boilerplate
+mkdir -p deb/DEBIAN
+cat >deb/DEBIAN/control <<EOF
+Package: xen-upstream-$version
+Source: xen-upstream
+Version: $version
+Architecture: $arch
+Maintainer: Unmaintained snapshot
+Section: admin
+Priority: optional
+Installed-Size: $(du -ks deb | cut -f1)
+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.
+EOF
+
+# Package it up
+chown -R root:root deb
+dpkg --build deb $xen-upstream-$version.deb
+
+# Tidy up after ourselves
+rm -rf deb
diff -r f9bb0bbea7c2 -r 32a1bb052873 xen/Makefile
--- a/xen/Makefile Thu May 12 16:42:54 2011 +0100
+++ b/xen/Makefile Mon May 16 11:48:47 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; \
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] Build target to wrap dist/install in a .deb archive
@ 2011-05-11 15:51 Tim Deegan
0 siblings, 0 replies; 7+ messages in thread
From: Tim Deegan @ 2011-05-11 15:51 UTC (permalink / raw)
To: xen-devel
# HG changeset patch
# User Tim Deegan <Tim.Deegan@citrix.com>
# Date 1305126869 -3600
# Node ID dfa8cb07239d49bcf3fa0e5e892f32e3f646cc3f
# 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.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
diff -r 19452acd2304 -r dfa8cb07239d 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 dfa8cb07239d 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 dfa8cb07239d 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 dfa8cb07239d 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 dfa8cb07239d 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; \
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-05-16 10:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 15:32 [PATCH] Build target to wrap dist/install in a .deb archive Tim Deegan
2011-05-11 15:46 ` Tim Deegan
2011-05-11 16:56 ` Keir Fraser
2011-05-11 21:23 ` Tim Deegan
2011-05-12 8:15 ` Ian Campbell
2011-05-16 10:50 ` Tim Deegan
-- strict thread matches above, loose matches on Subject: below --
2011-05-11 15:51 Tim Deegan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).