Package new Hyper-V fcopy daemon as hypervfcopyd sub-package
Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
parent
a18ceab678
commit
29897df2af
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@
|
|||||||
/hv_set_ifconfig.sh
|
/hv_set_ifconfig.sh
|
||||||
/hv_vss_daemon.c
|
/hv_vss_daemon.c
|
||||||
/COPYING
|
/COPYING
|
||||||
|
/hv_fcopy_daemon.c
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
%global hv_kvp_daemon hypervkvpd
|
%global hv_kvp_daemon hypervkvpd
|
||||||
# HyperV VSS daemon binary name
|
# HyperV VSS daemon binary name
|
||||||
%global hv_vss_daemon hypervvssd
|
%global hv_vss_daemon hypervvssd
|
||||||
|
# HyperV FCOPY daemon binary name
|
||||||
|
%global hv_fcopy_daemon hypervfcopyd
|
||||||
# snapshot version
|
# snapshot version
|
||||||
%global snapver .20140219git
|
%global snapver .20140611git
|
||||||
# use hardened build
|
# use hardened build
|
||||||
%global _hardened_build 1
|
%global _hardened_build 1
|
||||||
|
|
||||||
@ -16,7 +18,7 @@ Group: System Environment/Daemons
|
|||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://www.kernel.org
|
URL: http://www.kernel.org
|
||||||
|
|
||||||
# Source files obtained from kernel upstream 2014-02-19.
|
# Source files obtained from kernel upstream 2014-06-11.
|
||||||
# git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
|
# git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
|
||||||
# The daemon and scripts are located in "master branch - /tools/hv"
|
# The daemon and scripts are located in "master branch - /tools/hv"
|
||||||
# COPYING -> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/plain/COPYING?id=refs/tags/next-20130822
|
# COPYING -> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/plain/COPYING?id=refs/tags/next-20130822
|
||||||
@ -38,6 +40,12 @@ Source5: hypervkvpd.service
|
|||||||
Source100: hv_vss_daemon.c
|
Source100: hv_vss_daemon.c
|
||||||
Source101: hypervvssd.service
|
Source101: hypervvssd.service
|
||||||
|
|
||||||
|
# HYPERV FCOPY DAEMON
|
||||||
|
# hv_fcopy_daemon.c -> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/plain/tools/hv/hv_fcopy_daemon.c?id=refs/tags/next-20140611
|
||||||
|
Source200: hv_fcopy_daemon.c
|
||||||
|
Source201: hypervfcopyd.service
|
||||||
|
|
||||||
|
|
||||||
# HYPERV KVP DAEMON
|
# HYPERV KVP DAEMON
|
||||||
# Correct paths to external scripts ("/usr/libexec/hypervkvpd").
|
# Correct paths to external scripts ("/usr/libexec/hypervkvpd").
|
||||||
Patch0: hypervkvpd-0-corrected_paths_to_external_scripts.patch
|
Patch0: hypervkvpd-0-corrected_paths_to_external_scripts.patch
|
||||||
@ -50,6 +58,11 @@ Patch2: hypervkvpd-0-dont_call_deamon.patch
|
|||||||
# Remove daemon() call and let systemd handle it
|
# Remove daemon() call and let systemd handle it
|
||||||
Patch100: hypervvssd-0-dont_call_daemon.patch
|
Patch100: hypervvssd-0-dont_call_daemon.patch
|
||||||
|
|
||||||
|
# HYPERV FCOPY DAEMON
|
||||||
|
# Remove daemon() call and let systemd handle it
|
||||||
|
Patch200: hypervfcopyd-0-dont_call_daemon.patch
|
||||||
|
|
||||||
|
|
||||||
# HyperV is available only on x86 architectures
|
# HyperV is available only on x86 architectures
|
||||||
# The base empty (a.k.a. virtual) package can not be noarch
|
# The base empty (a.k.a. virtual) package can not be noarch
|
||||||
# due to http://www.rpm.org/ticket/78
|
# due to http://www.rpm.org/ticket/78
|
||||||
@ -57,6 +70,7 @@ ExclusiveArch: i686 x86_64
|
|||||||
|
|
||||||
Requires: hypervkvpd = %{version}-%{release}
|
Requires: hypervkvpd = %{version}-%{release}
|
||||||
Requires: hypervvssd = %{version}-%{release}
|
Requires: hypervvssd = %{version}-%{release}
|
||||||
|
Requires: hypervfcopyd = %{version}-%{release}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Suite of daemons that are needed when Linux guest
|
Suite of daemons that are needed when Linux guest
|
||||||
@ -98,6 +112,23 @@ from Windows Host if to "freeze" or "thaw" the filesystem
|
|||||||
on the Linux Guest.
|
on the Linux Guest.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n hypervfcopyd
|
||||||
|
Summary: HyperV FCOPY daemon
|
||||||
|
Group: System Environment/Daemons
|
||||||
|
Requires: %{name}-license = %{version}-%{release}
|
||||||
|
BuildRequires: systemd, kernel-headers
|
||||||
|
Requires(post): systemd
|
||||||
|
Requires(preun): systemd
|
||||||
|
Requires(postun): systemd
|
||||||
|
|
||||||
|
%description -n hypervfcopyd
|
||||||
|
Hypervfcopyd is an implementation of file copy service functionality
|
||||||
|
for Linux Guest running on HyperV. The daemon enables host to copy
|
||||||
|
a file (over VMBUS) into the Linux Guest. The daemon first registers
|
||||||
|
with the kernel driver. After this is done it waits for instructions
|
||||||
|
from Windows Host.
|
||||||
|
|
||||||
|
|
||||||
%package license
|
%package license
|
||||||
Summary: License of the HyperV daemons suite
|
Summary: License of the HyperV daemons suite
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -120,12 +151,16 @@ cp -pvL %{SOURCE5} hypervkvpd.service
|
|||||||
cp -pvL %{SOURCE100} hv_vss_daemon.c
|
cp -pvL %{SOURCE100} hv_vss_daemon.c
|
||||||
cp -pvL %{SOURCE101} hypervvssd.service
|
cp -pvL %{SOURCE101} hypervvssd.service
|
||||||
|
|
||||||
|
cp -pvL %{SOURCE200} hv_fcopy_daemon.c
|
||||||
|
cp -pvL %{SOURCE201} hypervfcopyd.service
|
||||||
|
|
||||||
%patch0 -p1 -b .external_scripts
|
%patch0 -p1 -b .external_scripts
|
||||||
%patch1 -p1 -b .long_names
|
%patch1 -p1 -b .long_names
|
||||||
%patch2 -p1 -b .daemon
|
%patch2 -p1 -b .daemon
|
||||||
|
|
||||||
%patch100 -p1 -b .daemon
|
%patch100 -p1 -b .daemon
|
||||||
|
|
||||||
|
%patch200 -p1 -b .daemon_fcopy
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# HYPERV KVP DAEMON
|
# HYPERV KVP DAEMON
|
||||||
@ -148,6 +183,16 @@ gcc \
|
|||||||
hv_vss_daemon.o \
|
hv_vss_daemon.o \
|
||||||
-o %{hv_vss_daemon}
|
-o %{hv_vss_daemon}
|
||||||
|
|
||||||
|
# HYPERV FCOPY DAEMON
|
||||||
|
gcc \
|
||||||
|
$RPM_OPT_FLAGS \
|
||||||
|
-c hv_fcopy_daemon.c
|
||||||
|
|
||||||
|
gcc \
|
||||||
|
$RPM_LD_FLAGS \
|
||||||
|
hv_fcopy_daemon.o \
|
||||||
|
-o %{hv_fcopy_daemon}
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -155,10 +200,12 @@ rm -rf %{buildroot}
|
|||||||
mkdir -p %{buildroot}%{_sbindir}
|
mkdir -p %{buildroot}%{_sbindir}
|
||||||
install -p -m 0755 %{hv_kvp_daemon} %{buildroot}%{_sbindir}
|
install -p -m 0755 %{hv_kvp_daemon} %{buildroot}%{_sbindir}
|
||||||
install -p -m 0755 %{hv_vss_daemon} %{buildroot}%{_sbindir}
|
install -p -m 0755 %{hv_vss_daemon} %{buildroot}%{_sbindir}
|
||||||
|
install -p -m 0755 %{hv_fcopy_daemon} %{buildroot}%{_sbindir}
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
# Systemd unit file
|
# Systemd unit file
|
||||||
install -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}
|
install -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}
|
||||||
install -p -m 0644 %{SOURCE101} %{buildroot}%{_unitdir}
|
install -p -m 0644 %{SOURCE101} %{buildroot}%{_unitdir}
|
||||||
|
install -p -m 0644 %{SOURCE201} %{buildroot}%{_unitdir}
|
||||||
# Shell scripts for the KVP daemon
|
# Shell scripts for the KVP daemon
|
||||||
mkdir -p %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}
|
mkdir -p %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}
|
||||||
install -p -m 0755 hv_get_dhcp_info.sh %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_get_dhcp_info
|
install -p -m 0755 hv_get_dhcp_info.sh %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_get_dhcp_info
|
||||||
@ -192,6 +239,17 @@ fi
|
|||||||
%preun -n hypervvssd
|
%preun -n hypervvssd
|
||||||
%systemd_preun hypervvssd.service
|
%systemd_preun hypervvssd.service
|
||||||
|
|
||||||
|
|
||||||
|
%post -n hypervfcopyd
|
||||||
|
%systemd_post hypervfcopyd.service
|
||||||
|
|
||||||
|
%postun -n hypervfcopyd
|
||||||
|
%systemd_postun hypervfcopyd.service
|
||||||
|
|
||||||
|
%preun -n hypervfcopyd
|
||||||
|
%systemd_preun hypervfcopyd.service
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
# the base package does not contain any files.
|
# the base package does not contain any files.
|
||||||
|
|
||||||
@ -206,13 +264,18 @@ fi
|
|||||||
%{_sbindir}/%{hv_vss_daemon}
|
%{_sbindir}/%{hv_vss_daemon}
|
||||||
%{_unitdir}/hypervvssd.service
|
%{_unitdir}/hypervvssd.service
|
||||||
|
|
||||||
|
%files -n hypervfcopyd
|
||||||
|
%{_sbindir}/%{hv_fcopy_daemon}
|
||||||
|
%{_unitdir}/hypervfcopyd.service
|
||||||
|
|
||||||
%files license
|
%files license
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jun 11 2014 Tomas Hozza <thozza@redhat.com> - 0-0.7.20140219git
|
* Wed Jun 11 2014 Tomas Hozza <thozza@redhat.com> - 0-0.7.20140611git
|
||||||
- Fix FTBFS (#1106781)
|
- Fix FTBFS (#1106781)
|
||||||
- Use kernel-headers instead of kernel-devel for building
|
- Use kernel-headers instead of kernel-devel for building
|
||||||
|
- package new Hyper-V fcopy daemon as hypervfcopyd sub-package
|
||||||
|
|
||||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.6.20140219git
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.6.20140219git
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
15
hypervfcopyd-0-dont_call_daemon.patch
Normal file
15
hypervfcopyd-0-dont_call_daemon.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff -up ./hv_fcopy_daemon.c.daemon_fcopy ./hv_fcopy_daemon.c
|
||||||
|
--- ./hv_fcopy_daemon.c.daemon_fcopy 2014-02-19 09:55:20.689982023 +0100
|
||||||
|
+++ ./hv_fcopy_daemon.c 2014-02-19 09:55:36.700982923 +0100
|
||||||
|
@@ -131,11 +131,6 @@ int main(void)
|
||||||
|
char *buffer[4096 * 2];
|
||||||
|
struct hv_fcopy_hdr *in_msg;
|
||||||
|
|
||||||
|
- if (daemon(1, 0)) {
|
||||||
|
- syslog(LOG_ERR, "daemon() failed; error: %s", strerror(errno));
|
||||||
|
- exit(EXIT_FAILURE);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
openlog("HV_FCOPY", 0, LOG_USER);
|
||||||
|
syslog(LOG_INFO, "HV_FCOPY starting; pid is:%d", getpid());
|
||||||
|
|
9
hypervfcopyd.service
Normal file
9
hypervfcopyd.service
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Hyper-V FCOPY daemon
|
||||||
|
ConditionVirtualization=microsoft
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/sbin/hypervfcopyd
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
1
sources
1
sources
@ -3,4 +3,5 @@ dbb5cc7ec83ccc7b1c39458a7521c9b4 hv_get_dns_info.sh
|
|||||||
28b370a30d044ebe78fdbcd6d6051f5d hv_kvp_daemon.c
|
28b370a30d044ebe78fdbcd6d6051f5d hv_kvp_daemon.c
|
||||||
da7f77aa7507e950851cbb53673ce5d4 hv_set_ifconfig.sh
|
da7f77aa7507e950851cbb53673ce5d4 hv_set_ifconfig.sh
|
||||||
18e75bce02aea146307877ebc4e5b45f hv_vss_daemon.c
|
18e75bce02aea146307877ebc4e5b45f hv_vss_daemon.c
|
||||||
|
7002bbf1a367085be17243d908e7394a hv_fcopy_daemon.c
|
||||||
d7810fab7487fb0aad327b76f1be7cd7 COPYING
|
d7810fab7487fb0aad327b76f1be7cd7 COPYING
|
||||||
|
Loading…
Reference in New Issue
Block a user