diff --git a/debian/README.Debian.hyperv-daemons b/debian/README.Debian.hyperv-daemons new file mode 100644 index 000000000..8fff2afd3 --- /dev/null +++ b/debian/README.Debian.hyperv-daemons @@ -0,0 +1,14 @@ +hyperv-daemon for Debian +------------------------ + + If you want to change screen resolution on Linux guest, + plese update kernel parameter. + + 1. edit /etc/default/grub file + - add 'video=hyperv_fb:"horizontal"x"vertical"' to + 'GRUB_CMDLINE_LINUX_DEFAULT=' or 'GRUB_CMDLINE_LINUX=' line + (e.g. GRUB_CMDLINE_LINUX=video=hyperv_fb:1280x1024) + 2. then, exec update-grub + 3. reboot Linux guest + + -- Hideki Yamane Thu, 28 May 2015 10:23:52 +0900 diff --git a/debian/build/tools/Makefile b/debian/build/tools/Makefile index bb530cbbe..06bc26609 100644 --- a/debian/build/tools/Makefile +++ b/debian/build/tools/Makefile @@ -1,4 +1,5 @@ SUBDIRS = \ + hv \ perf \ usb/usbip diff --git a/debian/build/tools/hv/Makefile b/debian/build/tools/hv/Makefile new file mode 100644 index 000000000..a1fddeb49 --- /dev/null +++ b/debian/build/tools/hv/Makefile @@ -0,0 +1,15 @@ +PROGS = \ + hv_fcopy_daemon \ + hv_kvp_daemon \ + hv_vss_daemon + +OUTDIR = tools/hv +prefix = /usr/sbin + +include ../../Makefile.inc + +install-local-progs: $(PROGS) + @for p in $^; do \ + echo " install -m755 '$$p' '$(DESTDIR)/$(prefix)'"; \ + install -D -m755 "$$p" "$(DESTDIR)/$(prefix)/$$(basename $$p)"; \ + done diff --git a/debian/changelog b/debian/changelog index 67021142c..cd63d49d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux-tools (4.0.2-2) UNRELEASED; urgency=medium + + * Add hyperv-daemons package. (closes: #782761) + + -- Bastian Blank Sun, 28 Jun 2015 20:23:11 +0200 + linux-tools (4.0.2-1) unstable; urgency=medium * New upstream release diff --git a/debian/hyperv-daemons.hv-fcopy-daemon.service b/debian/hyperv-daemons.hv-fcopy-daemon.service new file mode 100644 index 000000000..6aec2b388 --- /dev/null +++ b/debian/hyperv-daemons.hv-fcopy-daemon.service @@ -0,0 +1,10 @@ +[Unit] +Description=Hyper-V file copy service (FCOPY) daemon +ConditionVirtualization=microsoft +ConditionPathExists=/dev/vmbus/hv_fcopy + +[Service] +ExecStart=/usr/sbin/hv_fcopy_daemon -n + +[Install] +WantedBy=multi-user.target diff --git a/debian/hyperv-daemons.hv-kvp-daemon.service b/debian/hyperv-daemons.hv-kvp-daemon.service new file mode 100644 index 000000000..f6f6f0d29 --- /dev/null +++ b/debian/hyperv-daemons.hv-kvp-daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Hyper-V key-value pair (KVP) daemon +ConditionVirtualization=microsoft + +[Service] +ExecStart=/usr/sbin/hv_kvp_daemon -n + +[Install] +WantedBy=multi-user.target diff --git a/debian/hyperv-daemons.hv-vss-daemon.service b/debian/hyperv-daemons.hv-vss-daemon.service new file mode 100644 index 000000000..3e6534d55 --- /dev/null +++ b/debian/hyperv-daemons.hv-vss-daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Hyper-V volume shadow copy service (VSS) daemon +ConditionVirtualization=microsoft + +[Service] +ExecStart=/usr/sbin/hv_vss_daemon -n + +[Install] +WantedBy=multi-user.target diff --git a/debian/hyperv-daemons.install b/debian/hyperv-daemons.install new file mode 100644 index 000000000..2c00a4a79 --- /dev/null +++ b/debian/hyperv-daemons.install @@ -0,0 +1 @@ +debian/hyperv-daemons.*.service lib/systemd/system/ diff --git a/debian/rules.real b/debian/rules.real index 6761f7e20..7e829b6f5 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -8,7 +8,7 @@ DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) # 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,26 @@ install-usbip: $(STAMPS_DIR)/build 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: DIR = $(CURDIR)/debian/$(PACKAGE_NAME) +install-hyperv-daemons: $(STAMPS_DIR)/build + dh_testdir + dh_testroot + dh_clean -k -d + $(MAKE) -C $(BUILD_DIR)/tools/hv install top_srcdir=$(CURDIR) DESTDIR=$(DIR) + dh_install + dh_installchangelogs + dh_installdocs + dh_systemd_enable + dh_systemd_start + dh_lintian + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index 06f712199..a7b823355 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -49,3 +49,21 @@ Description: USB device sharing system over IP network . This package provides the server component 'usbipd' and the client tool 'usbip'. + +Package: hyperv-daemons +Architecture: i386 amd64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Section: admin +Description: Support daemons for Linux running on Hyper-V + Suite of daemons that are needed when Linux guest is running on Hyper-V. + It includes: hv-fcopy-daemon, hv-kvp-daemon, hv-vss-daemon + . + hv-fcopy-daemon is an implementation of file copy service functionality for + Linux Guest running on Hyper-V, it enables host to copy a file + into the Linux Guest. + . + hv-kvp-daemon is an implementation of Hyper-V key-value pair (KVP) functionality + for Linux, it also supports IP injection functionality on the Guest. + . + hv-vss-daemon is an implementation of Hyper-V VSS functionality for Linux, + it is used for host initiated guest snapshot on Hyper-V hypervisor. diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in index 20a2f6239..c996f1a96 100644 --- a/debian/templates/control.source.in +++ b/debian/templates/control.source.in @@ -7,6 +7,7 @@ Standards-Version: 3.9.4 Build-Depends: debhelper (>> 7), python, asciidoc, bison, flex, gcc-multilib [amd64 ppc64 s390x sparc64], libaudit-dev, libdw-dev, libelf-dev, libiberty-dev | binutils-dev (<< 2.23.91.20131123-1), libnewt-dev, libnuma-dev [amd64 arm64 hppa i386 mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el sparc x32], libperl-dev, libunwind8-dev [amd64 armel armhf arm64 i386], python-dev, xmlto, - autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev + autoconf, automake, libtool, libglib2.0-dev, libudev-dev, libwrap0-dev, + dh-systemd Vcs-Svn: svn://svn.debian.org/svn/kernel/dists/trunk/linux-tools/ Vcs-Browser: http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux-tools/