Blame SPECS/hyperv-daemons.spec

3feead
# Hyper-V KVP daemon binary name
3feead
%global hv_kvp_daemon hypervkvpd
3feead
# Hyper-V VSS daemon binary name
3feead
%global hv_vss_daemon hypervvssd
3feead
# Hyper-V FCOPY daemon binary name
3feead
%global hv_fcopy_daemon hypervfcopyd
3feead
# snapshot version
3feead
%global snapver .20190303git
3feead
# use hardened build
3feead
%global _hardened_build 1
3feead
# udev rules prefix
3feead
%global udev_prefix 70
3feead
3feead
Name:     hyperv-daemons
3feead
Version:  0
f9ffd5
Release:  0.39%{?snapver}%{?dist}
3feead
Summary:  Hyper-V daemons suite
3feead
3feead
License:  GPLv2
3feead
URL:      http://www.kernel.org
3feead
3feead
# Source files obtained from kernel upstream 4.17-rc1 (60cc43fc888428bb2f18f08997432d426a243338)
3feead
# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
3feead
Source0:  COPYING
3feead
3feead
# HYPERV KVP DAEMON
3feead
Source1:  hv_kvp_daemon.c
3feead
Source2:  hv_get_dhcp_info.sh
3feead
Source3:  hv_get_dns_info.sh
3feead
Source4:  hv_set_ifconfig.sh
3feead
Source5:  hypervkvpd.service
3feead
Source6:  hypervkvp.rules
3feead
3feead
# HYPERV VSS DAEMON
3feead
Source100:  hv_vss_daemon.c
3feead
Source101:  hypervvssd.service
3feead
Source102:  hypervvss.rules
3feead
3feead
# HYPERV FCOPY DAEMON
3feead
Source200:  hv_fcopy_daemon.c
3feead
Source201:  hypervfcopyd.service
3feead
Source202:  hypervfcopy.rules
3feead
3feead
# HYPERV TOOLS
3feead
Source301:  lsvmbus
3feead
3feead
Patch0002: 0002-Do-not-set-NM_CONTROLLED-no.patch
3feead
Patch0004: 0004-Update-C-files-and-scripts-to-kernel-version-5.7-rc1.patch
3feead
Patch0005: 0005-Add-vmbus_testing-tool-build-files.patch
3feead
Patch0006: 0006-tools-hv-change-http-to-https-in-hv_kvp_daemon.c.patch
f9ffd5
# For bz#2026371 - [RHEL9][Hyper-V]The /usr/libexec/hypervkvpd/hv_set_ifconfig need update for RHEL9 since the ifdown/ifup was not supported on RHEL9
f9ffd5
Patch7: hpvd-hv_set_ifconfig.sh-Use-nmcli-commands.patch
f9ffd5
# For bz#2026371 - [RHEL9][Hyper-V]The /usr/libexec/hypervkvpd/hv_set_ifconfig need update for RHEL9 since the ifdown/ifup was not supported on RHEL9
f9ffd5
Patch8: hpvd-Use-filename-for-connection-profile.patch
e4c6c4
# Source-git patches
e4c6c4
e4c6c4
# Hyper-V is available only on x86 and aarch64 architectures
3feead
# The base empty (a.k.a. virtual) package can not be noarch
3feead
# due to http://www.rpm.org/ticket/78
e4c6c4
ExclusiveArch:  i686 x86_64 aarch64
3feead
3feead
Requires:       hypervkvpd = %{version}-%{release}
3feead
Requires:       hypervvssd = %{version}-%{release}
3feead
Requires:       hypervfcopyd = %{version}-%{release}
3feead
BuildRequires:  gcc
3feead
3feead
3feead
%description
3feead
Suite of daemons that are needed when Linux guest
3feead
is running on Windows Host with Hyper-V.
3feead
3feead
3feead
%package -n hypervkvpd
3feead
Summary: Hyper-V key value pair (KVP) daemon
3feead
Requires: %{name}-license = %{version}-%{release}
3feead
BuildRequires: systemd, kernel-headers
3feead
Requires(post):   systemd
3feead
Requires(preun):  systemd
3feead
Requires(postun): systemd
3feead
3feead
%description -n hypervkvpd
3feead
Hypervkvpd is an implementation of Hyper-V key value pair (KVP)
3feead
functionality for Linux. The daemon first registers with the
3feead
kernel driver. After this is done it collects information
3feead
requested by Windows Host about the Linux Guest. It also supports
3feead
IP injection functionality on the Guest.
3feead
3feead
3feead
%package -n hypervvssd
3feead
Summary: Hyper-V VSS daemon
3feead
Requires: %{name}-license = %{version}-%{release}
3feead
BuildRequires: systemd, kernel-headers
3feead
Requires(post):   systemd
3feead
Requires(preun):  systemd
3feead
Requires(postun): systemd
3feead
3feead
%description -n hypervvssd
3feead
Hypervvssd is an implementation of Hyper-V VSS functionality
3feead
for Linux. The daemon is used for host initiated guest snapshot
3feead
on Hyper-V hypervisor. The daemon first registers with the
3feead
kernel driver. After this is done it waits for instructions
3feead
from Windows Host if to "freeze" or "thaw" the filesystem
3feead
on the Linux Guest.
3feead
3feead
3feead
%package -n hypervfcopyd
3feead
Summary: Hyper-V FCOPY daemon
3feead
Requires: %{name}-license = %{version}-%{release}
3feead
BuildRequires: systemd, kernel-headers
3feead
Requires(post):   systemd
3feead
Requires(preun):  systemd
3feead
Requires(postun): systemd
3feead
3feead
%description -n hypervfcopyd
3feead
Hypervfcopyd is an implementation of file copy service functionality
3feead
for Linux Guest running on Hyper-V. The daemon enables host to copy
3feead
a file (over VMBUS) into the Linux Guest. The daemon first registers
3feead
with the kernel driver. After this is done it waits for instructions
3feead
from Windows Host.
3feead
3feead
3feead
%package license
3feead
Summary:    License of the Hyper-V daemons suite
3feead
BuildArch:  noarch
3feead
3feead
%description license
3feead
Contains license of the Hyper-V daemons suite.
3feead
3feead
%package -n hyperv-tools
3feead
Summary:    Tools for Hyper-V guests
3feead
BuildArch:  noarch
3feead
3feead
%description -n hyperv-tools
3feead
Contains tools and scripts useful for Hyper-V guests.
3feead
3feead
%prep
3feead
%setup -Tc
3feead
cp -pvL %{SOURCE0} COPYING
3feead
3feead
cp -pvL %{SOURCE1} hv_kvp_daemon.c
3feead
cp -pvL %{SOURCE2} hv_get_dhcp_info.sh
3feead
cp -pvL %{SOURCE3} hv_get_dns_info.sh
3feead
cp -pvL %{SOURCE4} hv_set_ifconfig.sh
3feead
cp -pvL %{SOURCE5} hypervkvpd.service
3feead
cp -pvL %{SOURCE6} hypervkvp.rules
3feead
cp -pvL %{SOURCE100} hv_vss_daemon.c
3feead
cp -pvL %{SOURCE101} hypervvssd.service
3feead
cp -pvL %{SOURCE102} hypervvss.rules
3feead
cp -pvL %{SOURCE200} hv_fcopy_daemon.c
3feead
cp -pvL %{SOURCE201} hypervfcopyd.service
3feead
cp -pvL %{SOURCE202} hypervfcopy.rules
3feead
3feead
cp -pvL %{SOURCE301} lsvmbus
3feead
3feead
%patch0002 -p1
3feead
%patch0004 -p1
3feead
%patch0005 -p1
3feead
%patch0006 -p1
f9ffd5
%patch7 -p1
f9ffd5
%patch8 -p1
3feead
3feead
%build
3feead
# HYPERV KVP DAEMON
3feead
%{__cc} $RPM_OPT_FLAGS -c hv_kvp_daemon.c
3feead
%{__cc} $RPM_LD_FLAGS  hv_kvp_daemon.o -o %{hv_kvp_daemon}
3feead
3feead
# HYPERV VSS DAEMON
3feead
%{__cc} $RPM_OPT_FLAGS -c hv_vss_daemon.c
3feead
%{__cc} $RPM_LD_FLAGS hv_vss_daemon.o -o %{hv_vss_daemon}
3feead
3feead
# HYPERV FCOPY DAEMON
3feead
%{__cc} $RPM_OPT_FLAGS -c hv_fcopy_daemon.c
3feead
%{__cc} $RPM_LD_FLAGS hv_fcopy_daemon.o -o %{hv_fcopy_daemon}
3feead
3feead
%install
3feead
rm -rf %{buildroot}
3feead
3feead
mkdir -p %{buildroot}%{_sbindir}
3feead
install -p -m 0755 %{hv_kvp_daemon} %{buildroot}%{_sbindir}
3feead
install -p -m 0755 %{hv_vss_daemon} %{buildroot}%{_sbindir}
3feead
install -p -m 0755 %{hv_fcopy_daemon} %{buildroot}%{_sbindir}
3feead
# Systemd unit file
3feead
mkdir -p %{buildroot}%{_unitdir}
3feead
install -p -m 0644 hypervkvpd.service %{buildroot}%{_unitdir}
3feead
install -p -m 0644 hypervvssd.service %{buildroot}%{_unitdir}
3feead
install -p -m 0644 hypervfcopyd.service %{buildroot}%{_unitdir}
3feead
# Udev rules
3feead
mkdir -p %{buildroot}%{_udevrulesdir}
3feead
install -p -m 0644 hypervkvp.rules %{buildroot}%{_udevrulesdir}/%{udev_prefix}-hypervkvp.rules
3feead
install -p -m 0644 hypervvss.rules %{buildroot}%{_udevrulesdir}/%{udev_prefix}-hypervvss.rules
3feead
install -p -m 0644 hypervfcopy.rules %{buildroot}%{_udevrulesdir}/%{udev_prefix}-hypervfcopy.rules
3feead
# Shell scripts for the KVP daemon
3feead
mkdir -p %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}
3feead
install -p -m 0755 hv_get_dhcp_info.sh %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_get_dhcp_info
3feead
install -p -m 0755 hv_get_dns_info.sh %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_get_dns_info
3feead
install -p -m 0755 hv_set_ifconfig.sh %{buildroot}%{_libexecdir}/%{hv_kvp_daemon}/hv_set_ifconfig
3feead
# Directory for pool files
3feead
mkdir -p %{buildroot}%{_sharedstatedir}/hyperv
3feead
3feead
# Tools
3feead
install -p -m 0755 lsvmbus %{buildroot}%{_sbindir}/
3feead
sed -i 's,#!/usr/bin/env python,#!%{__python3},' %{buildroot}%{_sbindir}/lsvmbus
3feead
install -p -m 0755 vmbus_testing %{buildroot}%{_sbindir}/
3feead
3feead
%post -n hypervkvpd
3feead
if [ $1 -gt 1 ] ; then
3feead
	# Upgrade
3feead
	systemctl --no-reload disable hypervkvpd.service >/dev/null 2>&1 || :
3feead
fi
3feead
3feead
%preun -n hypervkvpd
3feead
%systemd_preun hypervkvpd.service
3feead
3feead
%postun -n hypervkvpd
3feead
# hypervkvpd daemon does NOT support restarting (driver, neither)
3feead
%systemd_postun hypervkvpd.service
3feead
# If removing the package, delete %%{_sharedstatedir}/hyperv directory
3feead
if [ "$1" -eq "0" ] ; then
3feead
    rm -rf %{_sharedstatedir}/hyperv || :
3feead
fi
3feead
3feead
3feead
%post -n hypervvssd
3feead
if [ $1 -gt 1 ] ; then
3feead
	# Upgrade
3feead
	systemctl --no-reload disable hypervvssd.service >/dev/null 2>&1 || :
3feead
fi
3feead
3feead
%postun -n hypervvssd
3feead
%systemd_postun hypervvssd.service
3feead
3feead
%preun -n hypervvssd
3feead
%systemd_preun hypervvssd.service
3feead
3feead
3feead
%post -n hypervfcopyd
3feead
if [ $1 -gt 1 ] ; then
3feead
	# Upgrade
3feead
	systemctl --no-reload disable hypervfcopyd.service >/dev/null 2>&1 || :
3feead
fi
3feead
3feead
%postun -n hypervfcopyd
3feead
%systemd_postun hypervfcopyd.service
3feead
3feead
%preun -n hypervfcopyd
3feead
%systemd_preun hypervfcopyd.service
3feead
3feead
3feead
%files
3feead
# the base package does not contain any files.
3feead
3feead
%files -n hypervkvpd
3feead
%{_sbindir}/%{hv_kvp_daemon}
3feead
%{_unitdir}/hypervkvpd.service
3feead
%{_udevrulesdir}/%{udev_prefix}-hypervkvp.rules
3feead
%dir %{_libexecdir}/%{hv_kvp_daemon}
3feead
%{_libexecdir}/%{hv_kvp_daemon}/*
3feead
%dir %{_sharedstatedir}/hyperv
3feead
3feead
%files -n hypervvssd
3feead
%{_sbindir}/%{hv_vss_daemon}
3feead
%{_unitdir}/hypervvssd.service
3feead
%{_udevrulesdir}/%{udev_prefix}-hypervvss.rules
3feead
3feead
%files -n hypervfcopyd
3feead
%{_sbindir}/%{hv_fcopy_daemon}
3feead
%{_unitdir}/hypervfcopyd.service
3feead
%{_udevrulesdir}/%{udev_prefix}-hypervfcopy.rules
3feead
3feead
%files license
3feead
%doc COPYING
3feead
3feead
%files -n hyperv-tools
3feead
%{_sbindir}/lsvmbus
3feead
%{_sbindir}/vmbus_testing
3feead
3feead
%changelog
f9ffd5
* Wed Dec 15 2021 Miroslav Rezanina <mrezanin@redhat.com> - 0-0.39.20190303git
f9ffd5
- hpvd-hv_set_ifconfig.sh-Use-nmcli-commands.patch [bz#2026371]
f9ffd5
- hpvd-Use-filename-for-connection-profile.patch [bz#2026371]
f9ffd5
- Resolves: bz#2026371
f9ffd5
  ([RHEL9][Hyper-V]The /usr/libexec/hypervkvpd/hv_set_ifconfig need update for RHEL9 since the ifdown/ifup was not supported on RHEL9)
f9ffd5
e4c6c4
* Mon Nov 08 2021 Miroslav Rezanina <mrezanin@redhat.com> - 0-0.38.20190303git
e4c6c4
- hpvd-Enable-build-on-aarch64.patch [bz#2020148]
e4c6c4
- Resolves: bz#2020148
e4c6c4
  ([Hyper-V][RHEL9.0][ARM] No hyperv-daemons package built for aarch64 platform)
e4c6c4
3feead
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0-0.37.20190303git
3feead
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
3feead
  Related: rhbz#1991688
3feead
3feead
* Mon May 10 2021 Miroslav Rezanina <mrezanin@redhat.com> - 0-0.36.20190303git
3feead
- Synchronize RHEL 8 changes [rhbz#1957651]
3feead
- Resolves: rhbz#1957651
3feead
  ([Hyper-V][RHEL-9] Update build to rhel format and syncup RHEL 8 content for hyperv-daemons.)
3feead
3feead
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0-0.35.20190303git
3feead
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
3feead
3feead
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.34.20190303git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
3feead
3feead
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.33.20190303git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3feead
3feead
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.32.20190303git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
3feead
3feead
* Wed Jan 15 2020 Tom Stellard <tstellar@redhat.com> - 0-0.31.20190303git
3feead
- Use __cc macro instead of hard-coding gcc
3feead
3feead
* Fri Nov 08 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.30.20190303git
3feead
- Rebase to 5.4-rc6
3feead
- Add IgnoreOnIsolate to systemd units
3feead
3feead
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.29.20190303git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3feead
3feead
* Fri Mar 15 2019 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.28.20190303git
3feead
- Rebase to 5.0
3feead
3feead
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.27.20180415git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3feead
3feead
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.26.20180415git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
3feead
3feead
* Mon Jun 11 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.25.20180415git
3feead
- Switch lsvmbus to Python3
3feead
3feead
* Thu Apr 26 2018 Tomas Hozza <thozza@redhat.com> - 0-0.24.20180415git
3feead
- Added gcc as an explicit BuildRequires
3feead
3feead
* Thu Apr 19 2018 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.23.20180415git
3feead
- Rebase to 4.17-rc1
3feead
3feead
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.22.20170105git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3feead
3feead
* Mon Dec 11 2017 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.21.20170105git
3feead
- Rebase to 4.15-rc2, drop fedora patches as changes are upstream
3feead
- Start kvpd after network.target
3feead
3feead
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.20.20170105git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
3feead
3feead
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.19.20170105git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3feead
3feead
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.18.20170105git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
3feead
3feead
* Wed Jan 11 2017 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.17.20160728git
3feead
- Use '-gt' instead of '>' to do the right comparison (#1412033)
3feead
3feead
* Thu Jan 05 2017 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.16.20160728git
3feead
- Rebase to 4.9
3feead
- hyperv-tools subpackage added
3feead
3feead
* Thu Jul 28 2016 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.15.20160728git
3feead
- Rebase to 4.8-rc0 (20160728 git snapshot)
3feead
- Disable services and remove ConditionVirtualization, multi-user.target
3feead
  dependencies switching to udev-only activation (#1331577)
3feead
3feead
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.14.20150702git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
3feead
3feead
* Wed Nov 18 2015 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.13.20150702git
3feead
- Add udev rules to properly restart services (#1195029)
3feead
- Spec cleanup
3feead
3feead
* Thu Jul 02 2015 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.12.20150702git
3feead
- Rebase to 4.2-rc0 (20150702 git snapshot)
3feead
- Switch to new chardev-based communication layer (#1195029)
3feead
3feead
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.11.20150108git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
3feead
3feead
* Thu Jan 08 2015 Vitaly Kuznetsov <vkuznets@redhat.com> - 0-0.10.20150108git
3feead
- Rebase to 3.19-rc3 (20150108 git snapshot)
3feead
- Drop 'nodaemon' patches, use newly introduced '-n' option
3feead
3feead
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.9.20140714git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
3feead
3feead
* Mon Jul 14 2014 Tomas Hozza <thozza@redhat.com> - 0-0.8.20140714git
3feead
- Update the File copy daemon to the latest git snapshot
3feead
- Fix hyperfcopyd.service to check for /dev/vmbus/hv_fcopy
3feead
3feead
* Wed Jun 11 2014 Tomas Hozza <thozza@redhat.com> - 0-0.7.20140611git
3feead
- Fix FTBFS (#1106781)
3feead
- Use kernel-headers instead of kernel-devel for building
3feead
- package new Hyper-V fcopy daemon as hypervfcopyd sub-package
3feead
3feead
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.6.20140219git
3feead
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3feead
3feead
* Wed Feb 19 2014 Tomas Hozza <thozza@redhat.com> - 0-0.5.20140219git
3feead
- rebase to the latest git snapshot next-20140219
3feead
  - KVP, VSS: removed inclusion of linux/types.h
3feead
  - VSS: Ignore VFAT mounts during freeze operation
3feead
3feead
* Fri Jan 10 2014 Tomas Hozza <thozza@redhat.com> - 0-0.4.20131022git
3feead
- provide 'hyperv-daemons' package for convenient installation of all daemons
3feead
3feead
* Tue Oct 22 2013 Tomas Hozza <thozza@redhat.com> - 0-0.3.20131022git
3feead
- rebase to the latest git snapshot next-20130927 (obtained 2013-10-22)
3feead
  - KVP, VSS: daemon use single buffer for send/recv
3feead
  - KVP: FQDN is obtained on start and cached
3feead
3feead
* Fri Sep 20 2013 Tomas Hozza <thozza@redhat.com> - 0-0.2.20130826git
3feead
- Use 'hypervkvpd' directory in libexec for KVP daemon scripts (#1010268)
3feead
- daemons are now WantedBy multi-user.target instead of basic.target (#1010260)
3feead
3feead
* Mon Aug 26 2013 Tomas Hozza <thozza@redhat.com> - 0-0.1.20130826git
3feead
- Initial package