|
|
d81766 |
# Build time setting
|
|
|
d81766 |
%global SLOF_gittagdate 20140630
|
|
|
d81766 |
|
|
|
d81766 |
%global have_usbredir 1
|
|
|
d81766 |
%global have_spice 1
|
|
|
d81766 |
%global have_fdt 0
|
|
|
d81766 |
%global have_gluster 1
|
|
|
8be556 |
%global have_numa 1
|
|
|
8be556 |
%global have_librdma 1
|
|
|
8be556 |
%global have_seccomp 1
|
|
|
8be556 |
%global have_tcmalloc 1
|
|
|
d81766 |
|
|
|
8be556 |
%ifnarch %{ix86} x86_64 aarch64
|
|
|
d81766 |
%global have_seccomp 0
|
|
|
d81766 |
%endif
|
|
|
d81766 |
|
|
|
8be556 |
%ifnarch %{ix86} x86_64
|
|
|
8be556 |
%global have_usbredir 0
|
|
|
8be556 |
%endif
|
|
|
8be556 |
|
|
|
8be556 |
%ifarch s390 s390x
|
|
|
8be556 |
%global have_librdma 0
|
|
|
8be556 |
%global have_numa 0
|
|
|
8be556 |
%global have_tcmalloc 0
|
|
|
d81766 |
%endif
|
|
|
d81766 |
|
|
|
d81766 |
%ifarch %{ix86}
|
|
|
d81766 |
%global kvm_target i386
|
|
|
d81766 |
%endif
|
|
|
d81766 |
%ifarch x86_64
|
|
|
d81766 |
%global kvm_target x86_64
|
|
|
d81766 |
%else
|
|
|
d81766 |
%global have_spice 0
|
|
|
d81766 |
%global have_gluster 0
|
|
|
d81766 |
%endif
|
|
|
d81766 |
%ifarch %{power64}
|
|
|
d81766 |
%global kvm_target ppc64
|
|
|
d81766 |
%global have_fdt 1
|
|
|
d81766 |
%endif
|
|
|
d81766 |
%ifarch s390
|
|
|
d81766 |
%global kvm_target s390
|
|
|
d81766 |
%endif
|
|
|
d81766 |
%ifarch s390x
|
|
|
d81766 |
%global kvm_target s390x
|
|
|
d81766 |
%endif
|
|
|
d81766 |
%ifarch ppc
|
|
|
d81766 |
%global kvm_target ppc
|
|
|
d81766 |
%global have_fdt 1
|
|
|
d81766 |
%endif
|
|
|
d81766 |
%ifarch aarch64
|
|
|
d81766 |
%global kvm_target aarch64
|
|
|
d81766 |
%global have_fdt 1
|
|
|
d81766 |
%endif
|
|
|
d81766 |
|
|
|
d81766 |
#Versions of various parts:
|
|
|
d81766 |
|
|
|
d81766 |
%define pkgname qemu-kvm
|
|
|
d81766 |
|
|
|
d81766 |
Summary: QEMU guest agent
|
|
|
d81766 |
Name: qemu-guest-agent
|
|
|
728141 |
Version: 2.8.0
|
|
|
3f2699 |
Release: 2%{?dist}.1
|
|
|
d81766 |
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
|
|
|
d81766 |
Epoch: 10
|
|
|
d81766 |
License: GPLv2+ and LGPLv2+ and BSD
|
|
|
d81766 |
Group: System Environment/Daemons
|
|
|
d81766 |
URL: http://www.qemu.org/
|
|
|
d81766 |
Requires(post): systemd-units
|
|
|
d81766 |
Requires(preun): systemd-units
|
|
|
d81766 |
Requires(postun): systemd-units
|
|
|
d81766 |
|
|
|
d81766 |
# OOM killer breaks builds with parallel make on s390(x)
|
|
|
d81766 |
%ifarch s390 s390x
|
|
|
d81766 |
%define _smp_mflags %{nil}
|
|
|
d81766 |
%endif
|
|
|
d81766 |
|
|
|
728141 |
Source0: http://wiki.qemu.org/download/qemu-2.8.0.tar.bz2
|
|
|
d81766 |
|
|
|
d81766 |
Source1: qemu-guest-agent.service
|
|
|
d81766 |
Source2: 99-qemu-guest-agent.rules
|
|
|
d81766 |
Source3: qemu-ga.sysconfig
|
|
|
8be556 |
Source4: build_configure.sh
|
|
|
d81766 |
|
|
|
3f2699 |
# For bz#1598210 - Backport some features to 2.8 in RHEL 7.5 [rhel-7.5.z]
|
|
|
3f2699 |
Patch1: qemuga-qga-Add-guest-get-host-name-command.patch
|
|
|
3f2699 |
# For bz#1598210 - Backport some features to 2.8 in RHEL 7.5 [rhel-7.5.z]
|
|
|
3f2699 |
Patch2: qemuga-qga-Add-guest-get-users-command.patch
|
|
|
3f2699 |
# For bz#1598210 - Backport some features to 2.8 in RHEL 7.5 [rhel-7.5.z]
|
|
|
3f2699 |
Patch3: qemuga-qga-Add-guest-get-timezone-command.patch
|
|
|
3f2699 |
# For bz#1598210 - Backport some features to 2.8 in RHEL 7.5 [rhel-7.5.z]
|
|
|
3f2699 |
Patch4: qemuga-qemu-ga-check-if-utmpx.h-is-available-on-the-system.patch
|
|
|
3f2699 |
# For bz#1598210 - Backport some features to 2.8 in RHEL 7.5 [rhel-7.5.z]
|
|
|
3f2699 |
Patch5: qemuga-qemu-ga-add-guest-get-osinfo-command.patch
|
|
|
3f2699 |
# For bz#1598210 - Backport some features to 2.8 in RHEL 7.5 [rhel-7.5.z]
|
|
|
3f2699 |
Patch6: qemuga-test-qga-pass-environemnt-to-qemu-ga.patch
|
|
|
3f2699 |
# For bz#1598210 - Backport some features to 2.8 in RHEL 7.5 [rhel-7.5.z]
|
|
|
3f2699 |
Patch7: qemuga-test-qga-add-test-for-guest-get-osinfo.patch
|
|
|
d81766 |
|
|
|
d81766 |
BuildRequires: zlib-devel
|
|
|
728141 |
BuildRequires: glib2-devel
|
|
|
728141 |
BuildRequires: systemd
|
|
|
d81766 |
BuildRequires: python
|
|
|
d81766 |
BuildRequires: systemtap-sdt-devel
|
|
|
d81766 |
BuildRequires: perl-podlators
|
|
|
d81766 |
BuildRequires: texinfo
|
|
|
8be556 |
%if 0%{have_tcmalloc}
|
|
|
8be556 |
BuildRequires: gperftools-devel
|
|
|
8be556 |
%endif
|
|
|
d81766 |
|
|
|
d81766 |
%define qemudocdir %{_docdir}/%{pkgname}
|
|
|
d81766 |
|
|
|
d81766 |
%description
|
|
|
d81766 |
qemu-kvm is an open source virtualizer that provides hardware emulation for
|
|
|
8be556 |
the KVM hypervisor.
|
|
|
d81766 |
|
|
|
d81766 |
This package provides an agent to run inside guests, which communicates
|
|
|
d81766 |
with the host over a virtio-serial channel named "org.qemu.guest_agent.0"
|
|
|
d81766 |
|
|
|
d81766 |
This package does not need to be installed on the host OS.
|
|
|
d81766 |
|
|
|
d81766 |
%post
|
|
|
d81766 |
%systemd_post qemu-guest-agent.service
|
|
|
d81766 |
|
|
|
d81766 |
%preun
|
|
|
d81766 |
%systemd_preun qemu-guest-agent.service
|
|
|
d81766 |
|
|
|
d81766 |
%postun
|
|
|
d81766 |
%systemd_postun_with_restart qemu-guest-agent.service
|
|
|
d81766 |
|
|
|
d81766 |
%prep
|
|
|
d81766 |
%setup -q -n qemu-%{version}
|
|
|
d81766 |
|
|
|
d81766 |
# if patch fuzzy patch applying will be forbidden
|
|
|
d81766 |
%define with_fuzzy_patches 0
|
|
|
d81766 |
%if %{with_fuzzy_patches}
|
|
|
d81766 |
patch_command='patch -p1 -s'
|
|
|
d81766 |
%else
|
|
|
d81766 |
patch_command='patch -p1 -F1 -s'
|
|
|
d81766 |
%endif
|
|
|
d81766 |
|
|
|
d81766 |
ApplyPatch()
|
|
|
d81766 |
{
|
|
|
d81766 |
local patch=$1
|
|
|
d81766 |
shift
|
|
|
d81766 |
if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
|
|
|
d81766 |
exit 1
|
|
|
d81766 |
fi
|
|
|
d81766 |
case "$patch" in
|
|
|
d81766 |
*.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
|
|
|
d81766 |
*.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
|
|
|
d81766 |
*) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;;
|
|
|
d81766 |
esac
|
|
|
d81766 |
}
|
|
|
d81766 |
|
|
|
d81766 |
# don't apply patch if it's empty or does not exist
|
|
|
d81766 |
ApplyOptionalPatch()
|
|
|
d81766 |
{
|
|
|
d81766 |
local patch=$1
|
|
|
d81766 |
shift
|
|
|
d81766 |
if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
|
|
|
d81766 |
return 0
|
|
|
d81766 |
fi
|
|
|
d81766 |
local C=$(wc -l $RPM_SOURCE_DIR/$patch | awk '{print $1}')
|
|
|
d81766 |
if [ "$C" -gt 9 ]; then
|
|
|
d81766 |
ApplyPatch $patch ${1+"$@"}
|
|
|
d81766 |
fi
|
|
|
d81766 |
}
|
|
|
d81766 |
|
|
|
d81766 |
|
|
|
d81766 |
|
|
|
d81766 |
ApplyOptionalPatch qemu-kvm-test.patch
|
|
|
d81766 |
|
|
|
3f2699 |
%patch1 -p1
|
|
|
3f2699 |
%patch2 -p1
|
|
|
3f2699 |
%patch3 -p1
|
|
|
3f2699 |
%patch4 -p1
|
|
|
3f2699 |
%patch5 -p1
|
|
|
3f2699 |
%patch6 -p1
|
|
|
3f2699 |
%patch7 -p1
|
|
|
3f2699 |
|
|
|
d81766 |
%build
|
|
|
d81766 |
buildarch="%{kvm_target}-softmmu"
|
|
|
d81766 |
|
|
|
d81766 |
# --build-id option is used for giving info to the debug packages.
|
|
|
d81766 |
extraldflags="-Wl,--build-id";
|
|
|
d81766 |
buildldflags="VL_LDFLAGS=-Wl,--build-id"
|
|
|
d81766 |
|
|
|
8be556 |
# QEMU already knows how to set _FORTIFY_SOURCE
|
|
|
8be556 |
%global optflags %(echo %{optflags} | sed 's/-Wp,-D_FORTIFY_SOURCE=2//')
|
|
|
8be556 |
|
|
|
d81766 |
%ifarch s390
|
|
|
d81766 |
# drop -g flag to prevent memory exhaustion by linker
|
|
|
d81766 |
%global optflags %(echo %{optflags} | sed 's/-g//')
|
|
|
d81766 |
sed -i.debug 's/"-g $CFLAGS"/"$CFLAGS"/g' configure
|
|
|
d81766 |
%endif
|
|
|
d81766 |
|
|
|
8be556 |
cp %{SOURCE4} build_configure.sh
|
|
|
8be556 |
./build_configure.sh \
|
|
|
8be556 |
"%{_prefix}" \
|
|
|
8be556 |
"%{_libdir}" \
|
|
|
8be556 |
"%{_sysconfdir}" \
|
|
|
8be556 |
"%{_localstatedir}" \
|
|
|
8be556 |
"%{_libexecdir}" \
|
|
|
8be556 |
"qemu-ga" \
|
|
|
8be556 |
"%{kvm_target}" \
|
|
|
8be556 |
"%{name}-%{version}-%{release}" \
|
|
|
8be556 |
"%{optflags}" \
|
|
|
8be556 |
%if 0%{have_fdt}
|
|
|
8be556 |
enable \
|
|
|
d81766 |
%else
|
|
|
8be556 |
disable \
|
|
|
d81766 |
%endif
|
|
|
8be556 |
%if 0%{have_tcmalloc}
|
|
|
8be556 |
enable \
|
|
|
d81766 |
%else
|
|
|
8be556 |
disable \
|
|
|
d81766 |
%endif
|
|
|
8be556 |
--target-list= \
|
|
|
8be556 |
--cpu="%{kvm_target}"
|
|
|
d81766 |
|
|
|
d81766 |
echo "config-host.mak contents:"
|
|
|
d81766 |
echo "==="
|
|
|
d81766 |
cat config-host.mak
|
|
|
d81766 |
echo "==="
|
|
|
d81766 |
|
|
|
d81766 |
make qemu-ga %{?_smp_mflags} $buildldflags
|
|
|
73290e |
make qemu-ga.8
|
|
|
d81766 |
|
|
|
d81766 |
%install
|
|
|
d81766 |
%define _udevdir %(pkg-config --variable=udevdir udev)/rules.d
|
|
|
d81766 |
|
|
|
d81766 |
|
|
|
d81766 |
# For the qemu-guest-agent subpackage, install:
|
|
|
d81766 |
# - the systemd service file and the udev rules:
|
|
|
d81766 |
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|
|
d81766 |
mkdir -p $RPM_BUILD_ROOT%{_udevdir}
|
|
|
d81766 |
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}
|
|
|
d81766 |
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_udevdir}
|
|
|
d81766 |
|
|
|
d81766 |
# - the environment file for the systemd service:
|
|
|
d81766 |
install -D -p -m 0644 %{SOURCE3} \
|
|
|
d81766 |
$RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/qemu-ga
|
|
|
d81766 |
|
|
|
d81766 |
# - the fsfreeze hook script:
|
|
|
d81766 |
install -D --preserve-timestamps \
|
|
|
d81766 |
scripts/qemu-guest-agent/fsfreeze-hook \
|
|
|
d81766 |
$RPM_BUILD_ROOT%{_sysconfdir}/qemu-ga/fsfreeze-hook
|
|
|
d81766 |
|
|
|
d81766 |
# - the directory for user scripts:
|
|
|
d81766 |
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ga/fsfreeze-hook.d
|
|
|
d81766 |
|
|
|
d81766 |
# - and the fsfreeze script samples:
|
|
|
d81766 |
mkdir --parents $RPM_BUILD_ROOT%{_datadir}/%{pkgname}/qemu-ga/fsfreeze-hook.d/
|
|
|
d81766 |
install --preserve-timestamps --mode=0644 \
|
|
|
d81766 |
scripts/qemu-guest-agent/fsfreeze-hook.d/*.sample \
|
|
|
d81766 |
$RPM_BUILD_ROOT%{_datadir}/%{pkgname}/qemu-ga/fsfreeze-hook.d/
|
|
|
d81766 |
|
|
|
d81766 |
# - Install dedicated log directory:
|
|
|
d81766 |
mkdir -p -v $RPM_BUILD_ROOT%{_localstatedir}/log/qemu-ga/
|
|
|
d81766 |
|
|
|
d81766 |
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|
|
d81766 |
install -c -m 0755 qemu-ga ${RPM_BUILD_ROOT}%{_bindir}/qemu-ga
|
|
|
d81766 |
|
|
|
73290e |
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
|
|
|
73290e |
install -m 0644 qemu-ga.8 ${RPM_BUILD_ROOT}%{_mandir}/man8/
|
|
|
73290e |
|
|
|
d81766 |
%files
|
|
|
d81766 |
%defattr(-,root,root,-)
|
|
|
d81766 |
%doc COPYING README
|
|
|
d81766 |
%{_bindir}/qemu-ga
|
|
|
d81766 |
%{_unitdir}/qemu-guest-agent.service
|
|
|
d81766 |
%{_udevdir}/99-qemu-guest-agent.rules
|
|
|
d81766 |
%config(noreplace) %{_sysconfdir}/sysconfig/qemu-ga
|
|
|
d81766 |
%{_sysconfdir}/qemu-ga
|
|
|
d81766 |
%{_datadir}/%{pkgname}/qemu-ga
|
|
|
73290e |
%{_mandir}/man8/qemu-ga.8*
|
|
|
d81766 |
%dir %{_localstatedir}/log/qemu-ga
|
|
|
d81766 |
|
|
|
d81766 |
|
|
|
d81766 |
%changelog
|
|
|
3f2699 |
* Tue Jul 17 2018 Wainer dos Santos Moschetta <wainersm@redhat.com> - 2.8.0-2.el7_5.1
|
|
|
3f2699 |
- Corrected the package version from 2.8.0-3.el7 to 2.8.0-2.el7_5.1
|
|
|
3f2699 |
- Resolves: bz#1598210
|
|
|
3f2699 |
(Backport some features to 2.8 in RHEL 7.5 [rhel-7.5.z])
|
|
|
3f2699 |
|
|
|
3f2699 |
* Fri Jul 13 2018 Wainer dos Santos Moschetta <wainersm@redhat.com> - 2.8.0-3.el7
|
|
|
3f2699 |
- qemuga-qga-Add-guest-get-host-name-command.patch [bz#1598210]
|
|
|
3f2699 |
- qemuga-qga-Add-guest-get-users-command.patch [bz#1598210]
|
|
|
3f2699 |
- qemuga-qga-Add-guest-get-timezone-command.patch [bz#1598210]
|
|
|
3f2699 |
- qemuga-qemu-ga-check-if-utmpx.h-is-available-on-the-system.patch [bz#1598210]
|
|
|
3f2699 |
- qemuga-qemu-ga-add-guest-get-osinfo-command.patch [bz#1598210]
|
|
|
3f2699 |
- qemuga-test-qga-pass-environemnt-to-qemu-ga.patch [bz#1598210]
|
|
|
3f2699 |
- qemuga-test-qga-add-test-for-guest-get-osinfo.patch [bz#1598210]
|
|
|
3f2699 |
- Resolves: bz#1598210
|
|
|
3f2699 |
(Backport some features to 2.8 in RHEL 7.5 [rhel-7.5.z])
|
|
|
3f2699 |
|
|
|
728141 |
* Fri May 19 2017 Miroslav Rezanina <mrezanin@redhat.com> - 2.8.0-2.el7
|
|
|
728141 |
- qemuga-Remove-unnecessary-dependencies.patch [bz#1441999]
|
|
|
728141 |
- Resolves: bz#1441999
|
|
|
728141 |
(Clean qemu-ga dependencies)
|
|
|
728141 |
|
|
|
728141 |
* Tue Feb 07 2017 Miroslav Rezanina <mrezanin@redhat.com> - 2.8.0-1.el7
|
|
|
728141 |
- Rebase to 2.8.0 base [bz#1414676]
|
|
|
728141 |
- Resolves: bz#1414676
|
|
|
728141 |
(Rebase qemu-guest-agent to 2.8.0 base)
|
|
|
728141 |
|
|
|
73290e |
* Thu Sep 01 2016 Miroslav Rezanina <mrezanin@redhat.com> - 2.5.0-3.el7
|
|
|
73290e |
- qemuga-spec-add-qemu-ga-man-page.patch [bz#1101556]
|
|
|
73290e |
- Resolves: bz#1101556
|
|
|
73290e |
([RFE] qemu-ga should have a config file)
|
|
|
73290e |
|
|
|
73290e |
* Wed Jun 15 2016 Miroslav Rezanina <mrezanin@redhat.com> - 2.5.0-2.el7
|
|
|
73290e |
- qemuga-redhat-blacklist-guest-exec-commands.patch [bz#1340346]
|
|
|
73290e |
- Resolves: bz#1340346
|
|
|
73290e |
(blacklist guest-exec in newer version of qemu-guest-agent)
|
|
|
73290e |
|
|
|
73290e |
* Tue Jan 12 2016 Miroslav Rezanina <mrezanin@redhat.com> - 2.5.0-1.el7
|
|
|
73290e |
- Rebase to QEMU 2.5.0 [bz#1297673]
|
|
|
73290e |
- Resolves: bz#1297673
|
|
|
73290e |
(Rebase to QEMU 2.5)
|
|
|
8be556 |
* Tue Aug 25 2015 Miroslav Rezanina <mrezanin@redhat.com> - 2.3.0-3.el7
|
|
|
8be556 |
- qemuga-Do-not-stop-qemu-guest-agent-service-on-target-switc.patch [bz#1160930]
|
|
|
8be556 |
- Resolves: bz#1160930
|
|
|
8be556 |
(The guest agent service in rhel7 guest will be stopped after run the init command)
|
|
|
8be556 |
|
|
|
8be556 |
* Mon Jul 13 2015 Miroslav Rezanina <mrezanin@redhat.com> - 2.3.0-2.el7
|
|
|
8be556 |
- synchronized with qemu-kvm-rhev-2.3.0-9.el7
|
|
|
8be556 |
- qemuga-Change-fsreeze-hook-default-location.patch [bz#1210707]
|
|
|
8be556 |
- qemuga-qga-commands-posix-Fix-bug-in-guest-fstrim.patch [bz#1211973]
|
|
|
8be556 |
- Resolves: bz#1210707
|
|
|
8be556 |
(The default path '/etc/qemu/fsfreeze-hook' for 'fsfreeze-hook' script doesn't exist)
|
|
|
8be556 |
- Resolves: bz#1211973
|
|
|
8be556 |
('guest-fstrim' failed for guest with os on spapr-vscsi disk)
|
|
|
8be556 |
|
|
|
8be556 |
* Tue Apr 28 2015 Miroslav Rezanina <mrezanin@redhat.com> - 2.3.0-1.el7
|
|
|
8be556 |
- Rebase to 2.3.0 [bz#1194152]
|
|
|
8be556 |
- Resolves: bz#1194152
|
|
|
8be556 |
(Rebase to 2.3.0)
|
|
|
8be556 |
|
|
|
d81766 |
* Tue Oct 21 2014 Miroslav Rezanina <mrezanin@redhat.com> - 2.1.0-4.el7
|
|
|
d81766 |
- kvm-Mark-etc-sysconfig-qemu-ga-as-config-noreplace.patch [bz#1150924]
|
|
|
d81766 |
- Resolves: bz#1150924
|
|
|
d81766 |
(/etc/sysconfig/qemu-ga is replaced when updated)
|
|
|
d81766 |
|
|
|
d81766 |
* Thu Aug 28 2014 Miroslav Rezanina <mrezanin@redhat.com> - 2.1.0-3.el7
|
|
|
d81766 |
- Allow building qemu-guest-agent on ppc64le
|
|
|
d81766 |
- Synchronize with qemu-kvm-rhev-2.1.0-3.el7
|
|
|
d81766 |
- Resolves: bz#1132718
|
|
|
d81766 |
(qemu-guest-agent fails to build for ppc64le)
|
|
|
d81766 |
|
|
|
d81766 |
* Sat Aug 02 2014 Miroslav Rezanina <mrezanin@redhat.com> - 2.1.0-2.el7
|
|
|
d81766 |
- Create separate qemu-guest-agent package based on qemu-kvm-rhev-2.1.0-1.el7 [bz#1117096]
|
|
|
d81766 |
- Resolves: #bz1117096
|
|
|
d81766 |
|
|
|
d81766 |
* Sat Aug 02 2014 Miroslav Rezanina <mrezanin@redhat.com> - 2.1.0-1.el7
|
|
|
d81766 |
- Rebase to 2.1.0 [bz#1121609]
|
|
|
d81766 |
- Resolves: bz#1121609
|
|
|
d81766 |
(Rebase qemu-kvm-rhev to qemu 2.1)
|
|
|
d81766 |
|