Bug#782761: linux-tools: Please include tools/hv daemons in a binary package
Control: tags -1 +patch
Hi,
Here's a rough patch for hyperv daemons package (not tested yet)
I'll try it later, but anyway for the record.
--
Regards,
Hideki Yamane henrich @ debian.or.jp/org
http://wiki.debian.org/HidekiYamane
diff -Nru linux-tools-4.0.2/debian/build/tools/hv/Makefile linux-tools-4.0.2/debian/build/tools/hv/Makefile
--- linux-tools-4.0.2/debian/build/tools/hv/Makefile 1970-01-01 09:00:00.000000000 +0900
+++ linux-tools-4.0.2/debian/build/tools/hv/Makefile 2015-05-28 19:53:33.000000000 +0900
@@ -0,0 +1,13 @@
+srcdir := $(top_srcdir)/tools/hv
+
+# Make sure we don't override top_srcdir in the sub-make. 'unexport
+# top_srcdir' is *not* sufficient; nor is adding 'MAKEFLAGS=' to the
+# sub-make command line.
+unexport MAKEFLAGS
+
+all:
+ cd $(top_srcdir)/tools/hv; $(MAKE) all
+
+
+clean:
+ cd $(top_srcdir)/tools/hv; $(MAKE) clean
diff -Nru linux-tools-4.0.2/debian/changelog linux-tools-4.0.2/debian/changelog
--- linux-tools-4.0.2/debian/changelog 2015-05-11 11:53:13.000000000 +0900
+++ linux-tools-4.0.2/debian/changelog 2015-06-07 20:07:42.000000000 +0900
@@ -1,3 +1,10 @@
+linux-tools (4.0.2-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * create hyperv-daemons package (Closes: #782761)
+
+ -- Hideki Yamane <henrich@debian.org> Thu, 28 May 2015 10:23:52 +0900
+
linux-tools (4.0.2-1) unstable; urgency=medium
* New upstream release
diff -Nru linux-tools-4.0.2/debian/control linux-tools-4.0.2/debian/control
--- linux-tools-4.0.2/debian/control 2015-05-11 12:06:30.000000000 +0900
+++ linux-tools-4.0.2/debian/control 2015-06-07 21:06:18.000000000 +0900
@@ -60,3 +60,10 @@
This package provides the server component 'usbipd' and the client tool
'usbip'.
+Package: hyperv-daemons
+Architecture: amd64
+Section: admin
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Hyper-V daemons
+ Hyper-V daemons: hv-fcopy-daemon, hv-kvp-daemon, hv-vss-daemon
+
diff -Nru linux-tools-4.0.2/debian/control.md5sum linux-tools-4.0.2/debian/control.md5sum
--- linux-tools-4.0.2/debian/control.md5sum 2015-05-11 12:06:30.000000000 +0900
+++ linux-tools-4.0.2/debian/control.md5sum 2015-06-07 21:06:18.000000000 +0900
@@ -1,4 +1,4 @@
ac3acacf0cde6d2cc424f28241bb0857 debian/bin/gencontrol.py
-78da1757427bbfdfaa8e54c64e5d627a debian/changelog
-711fd0ce9d080e6cf27efddb74863670 debian/templates/control.main.in
+42a333dc4e58b0836836374d25b1c963 debian/changelog
+4ff71cfb84261912360a63710a5d830f debian/templates/control.main.in
5205a9db9cb5241ea836fb20502bf045 debian/templates/control.source.in
diff -Nru linux-tools-4.0.2/debian/copyright linux-tools-4.0.2/debian/copyright
--- linux-tools-4.0.2/debian/copyright 2013-09-25 09:18:33.000000000 +0900
+++ linux-tools-4.0.2/debian/copyright 2015-06-07 19:58:56.000000000 +0900
@@ -30,3 +30,8 @@
Files: debian/*
Copyright: 2006-2012 Debian kernel team
License: GPL-2
+
+Files: debian/*.services
+Copyright: 2013-2014 Tomas Hozza <thozza@redhat.com>
+ 2015 Hideki Yamane <henrich@debian.org>
+License: GPL-2
diff -Nru linux-tools-4.0.2/debian/hv_fcopy_daemon.service linux-tools-4.0.2/debian/hv_fcopy_daemon.service
--- linux-tools-4.0.2/debian/hv_fcopy_daemon.service 1970-01-01 09:00:00.000000000 +0900
+++ linux-tools-4.0.2/debian/hv_fcopy_daemon.service 2015-05-28 20:47:49.000000000 +0900
@@ -0,0 +1,10 @@
+[Unit]
+Description=Hyper-V FCOPY daemon
+ConditionVirtualization=microsoft
+ConditionPathExists=/dev/vmbus/hv_fcopy
+
+[Service]
+ExecStart=/usr/sbin/hv_fcopy_daemon -n
+
+[Install]
+WantedBy=multi-user.target
diff -Nru linux-tools-4.0.2/debian/hv_kvp_daemon.service linux-tools-4.0.2/debian/hv_kvp_daemon.service
--- linux-tools-4.0.2/debian/hv_kvp_daemon.service 1970-01-01 09:00:00.000000000 +0900
+++ linux-tools-4.0.2/debian/hv_kvp_daemon.service 2015-05-28 20:46:54.000000000 +0900
@@ -0,0 +1,10 @@
+[Unit]
+Description=Hyper-V KVP daemon
+ConditionVirtualization=microsoft
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/hv_kvp_daemon -n
+
+[Install]
+WantedBy=multi-user.target
diff -Nru linux-tools-4.0.2/debian/hv_vss_demon.service linux-tools-4.0.2/debian/hv_vss_demon.service
--- linux-tools-4.0.2/debian/hv_vss_demon.service 1970-01-01 09:00:00.000000000 +0900
+++ linux-tools-4.0.2/debian/hv_vss_demon.service 2015-05-28 20:46:33.000000000 +0900
@@ -0,0 +1,9 @@
+[Unit]
+Description=Hyper-V VSS daemon
+ConditionVirtualization=microsoft
+
+[Service]
+ExecStart=/usr/sbin/hv_vss_daemon -n
+
+[Install]
+WantedBy=multi-user.target
diff -Nru linux-tools-4.0.2/debian/hyperv-daemons.install linux-tools-4.0.2/debian/hyperv-daemons.install
--- linux-tools-4.0.2/debian/hyperv-daemons.install 1970-01-01 09:00:00.000000000 +0900
+++ linux-tools-4.0.2/debian/hyperv-daemons.install 2015-06-07 21:05:15.000000000 +0900
@@ -0,0 +1,2 @@
+tools/hv/hv*daemon usr/sbin/
+debian/*.service lib/systemd/system/
diff -Nru linux-tools-4.0.2/debian/rules.gen linux-tools-4.0.2/debian/rules.gen
--- linux-tools-4.0.2/debian/rules.gen 2015-05-11 12:06:30.000000000 +0900
+++ linux-tools-4.0.2/debian/rules.gen 2015-06-07 21:06:18.000000000 +0900
@@ -1,5 +1,5 @@
.NOTPARALLEL:
binary-arch::
- $(MAKE) -f debian/rules.real binary-arch UPSTREAMVERSION='4.0' VERSION='4.0' VERSION_DEBIAN='4.0.2-1'
+ $(MAKE) -f debian/rules.real binary-arch UPSTREAMVERSION='4.0' VERSION='4.0' VERSION_DEBIAN='4.0.2-1.1'
build::
- $(MAKE) -f debian/rules.real build UPSTREAMVERSION='4.0' VERSION='4.0' VERSION_DEBIAN='4.0.2-1'
+ $(MAKE) -f debian/rules.real build UPSTREAMVERSION='4.0' VERSION='4.0' VERSION_DEBIAN='4.0.2-1.1'
diff -Nru linux-tools-4.0.2/debian/rules.real linux-tools-4.0.2/debian/rules.real
--- linux-tools-4.0.2/debian/rules.real 2015-02-01 09:53:48.000000000 +0900
+++ linux-tools-4.0.2/debian/rules.real 2015-06-07 21:05:26.000000000 +0900
@@ -8,7 +8,7 @@
# includes any binNMU part.
VERSION_DEBIAN_FULL := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p')
-binary-arch: install-kbuild install-usbip
+binary-arch: install-kbuild install-usbip install-hyperv-daemons
ifneq ($(filter alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32,$(DEB_BUILD_ARCH)),)
binary-arch: install-tools
endif
@@ -82,3 +82,23 @@
dh_gencontrol -- -v$(VERSION)+$(VERSION_DEBIAN_FULL)
dh_md5sums
dh_builddeb
+
+install-hyperv-daemons: PACKAGE_NAME = hyperv-daemons
+install-hyperv-daemons: DH_OPTIONS = -p$(PACKAGE_NAME)
+install-hyperv-daemons: $(STAMPS_DIR)/build
+ dh_testdir
+ dh_testroot
+ dh_clean -d
+ $(MAKE) -C $(CURDIR)/tools/hv/
+ dh_install
+ dh_installchangelogs
+ dh_installdocs
+ dh_lintian
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol -- -v$(VERSION)+$(VERSION_DEBIAN_FULL)
+ dh_md5sums
+ dh_builddeb
diff -Nru linux-tools-4.0.2/debian/templates/control.main.in linux-tools-4.0.2/debian/templates/control.main.in
--- linux-tools-4.0.2/debian/templates/control.main.in 2015-02-01 08:36:41.000000000 +0900
+++ linux-tools-4.0.2/debian/templates/control.main.in 2015-05-28 19:53:33.000000000 +0900
@@ -49,3 +49,10 @@
.
This package provides the server component 'usbipd' and the
client tool 'usbip'.
+
+Package: hyperv-daemons
+Architecture: amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Section: admin
+Description: Hyper-V daemons
+ Hyper-V daemons: hv-fcopy-daemon, hv-kvp-daemon, hv-vss-daemon
Reply to: