Build target to wrap dist/install in a .deb archive
PATCH 1/1 Build target to wrap dist/install in a .deb archive
# HG changeset patch
# User Tim Deegan <[email protected]>
# 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.
Makefile +28 -0
@@ -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
tools/deb/changelog new file +3 -0
@@ -0,0 +1,3 @@ +xen-upstream (VERSION) unstable; urgency=low + + * Custom-built Xen hypervisor and tools.
tools/deb/control new file +12 -0
@@ -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.
tools/deb/copyright new file +5 -0
@@ -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. +
xen/Makefile +4 -0
@@ -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; \
Oops, this version has an ugly typo in it. Better version on its way in a minute...
Tim.
Quoted 107 lines · Tim Deegan
# HG changeset patch
# User Tim Deegan <[email protected]>
# Date 1305126869 -3600
# Node ID3e557227ab5055024ca85284d9328686aaa6380e# Parent19452acd23045f40c4e18437f0a60f016757e5bdBuild 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 <[email protected]>diff -r
19452acd2304-r3e557227ab50MakefileMakefile +28
-0@@ -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-xendiff -r
19452acd2304-r3e557227ab50tools/deb/changelogtools/deb/changelog new file +3
-0@@ -0,0 +1,3 @@ +xen-upstream (VERSION) unstable; urgency=low + + * Custom-built Xen hypervisor and tools.diff -r
19452acd2304-r3e557227ab50tools/deb/controltools/deb/control new file +12
-0@@ -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-r3e557227ab50tools/deb/copyrighttools/deb/copyright new file +5
-0@@ -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-r3e557227ab50xen/Makefilexen/Makefile +4
-0@@ -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
[email protected]
http://lists.xensource.com/xen-devel
Signature · 3 lines
Tim Deegan <[email protected]> Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
Quoted 7 lines · Tim Deegan
# HG changeset patch
# User Tim Deegan <[email protected]>
# Date 1305126869 -3600
# Node ID3e557227ab5055024ca85284d9328686aaa6380e# Parent19452acd23045f40c4e18437f0a60f016757e5bdBuild target to wrap dist/install in a .deb archive.
Quoted 8 lines
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
Quoted 93 lines
Signed-off-by Tim Deegan <[email protected]>diff -r
19452acd2304-r3e557227ab50MakefileMakefile Wed May 11 16:14:29 2011 +0100 renamed from Makefile Fri May 06 11:15:35 2011 +0100 +0
-0@@ -49,6 +49,34 @@ dist-%: DESTDIR=$(DISTDIR)/install dist-%: install-%@: # do nothing
Makefile Wed May 11 16:14:29 2011 +0100 renamed from Makefile Fri May 06 11:15:35 2011 +0100 +15
-0+# 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)"Quoted 1 line
Quoted 1 line
$(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)/changelogQuoted 1 line
$(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 $@Makefile Wed May 11 16:14:29 2011 +0100 renamed from Makefile Fri May 06 11:15:35 2011 +0100 +5
-0+ +.PHONY: deb +deb: + fakeroot $(MAKE) dist/$(DEBNAME).deb + # Legacy dist targets .PHONY: xen tools stubdom kernels docs xen: dist-xendiff -r
19452acd2304-r3e557227ab50tools/deb/changelogtools/deb/changelog Wed May 11 16:14:29 2011 +0100 renamed from dev/null Thu Jan 01 00:00:00 1970 +0000 +3
-0@@ -0,0 +1,3 @@ +xen-upstream (VERSION) unstable; urgency=low + + * Custom-built Xen hypervisor and tools.diff -r
19452acd2304-r3e557227ab50tools/deb/controltools/deb/control Wed May 11 16:14:29 2011 +0100 renamed from dev/null Thu Jan 01 00:00:00 1970 +0000 +12
-0@@ -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-r3e557227ab50tools/deb/copyrighttools/deb/copyright Wed May 11 16:14:29 2011 +0100 renamed from dev/null Thu Jan 01 00:00:00 1970 +0000 +5
-0@@ -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-r3e557227ab50xen/Makefilexen/Makefile Wed May 11 16:14:29 2011 +0100 renamed from xen/Makefile Fri May 06 11:15:35 2011 +0100 +4
-0@@ -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
[email protected]
http://lists.xensource.com/xen-devel
Quoted 10 lines · Keir Fraser
Quoted 5 lines · Tim Deegan
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.
Signature · 3 lines
Tim Deegan <[email protected]> Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
Quoted 12 lines · Tim Deegan
Quoted 10 lines · Keir Fraser
Quoted 5 lines · Tim Deegan
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.
Quoted 7 lines
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
Makefiletarget.
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...)
Quoted 8 lines
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.
Quoted 5 lines · Tim Deegan
Quoted 3 lines · Keir Fraser
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.
Quoted 7 lines
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
Makefiletarget. If you prefer, I could rework this patch as a script too.
Scriptified version attached.
Cheers,
Tim.
Signature · 3 lines
Tim Deegan <[email protected]> Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
# HG changeset patch
# User Tim Deegan <[email protected]>
# 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.
Makefile +5 -0
@@ -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::
tools/misc/mkdeb new file +56 -0
56 lines not on this page · raw message
xen/Makefile +4 -0
@@ -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
[email protected]
http://lists.xensource.com/xen-devel