vdsm: Fix spec file after build failure analysis

This commit is contained in:
Jeff Mahoney 2024-05-17 17:31:42 -04:00
parent e61ec74c05
commit 129c88ac33
3 changed files with 152 additions and 100 deletions

8
vdsm-logrotate.service Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=Log rotation for VDSM
Documentation=man:vdsmd(8)
After=vdsmd.service
[Service]
Type=simple
ExecStart=/usr/libexec/vdsm/vdsm-logrotate

9
vdsm-logrotate.timer Normal file
View File

@ -0,0 +1,9 @@
[Unit]
Description=Log rotation for VDSM
Documentation=man:vdsmd(8)
[Timer]
OnCalendar=hourly
[Install]
WantedBy=timers.target

235
vdsm.spec
View File

@ -21,18 +21,17 @@
%{!?with_hooks: %global with_hooks 1}
%{!?with_vhostmd: %global with_vhostmd 1}
%{!?vdsm_repo: %global vdsm_repo /rhev/data-center}
%{!?vdsm_repo: %global vdsm_repo /var/lib/vdsm/repo}
%global gluster_version 6.0
# Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am.
%{!?enable_autotools:%global enable_autotools 0}
%{!?enable_autotools:%global enable_autotools 1}
# Required paths
%if 0%{?fedora}
%if 0%{?fedora}%{?suse_version}
%global _polkitdir %{_datadir}/polkit-1/rules.d
%else
%global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d
@ -42,43 +41,26 @@
# Disable debuginfo package, since vdsm is a meta-package
%global debug_package %{nil}
# RPM packaging guidelines require all files outside of '/usr/lib[64]/pythonX.X'
# to be compiled manually [1]. Some distros try to find '*.py' files outside of the aforementioned
# dirs and compile them for us, but using hard-coded '__python' macro, which points to Python 2.
# We opt-out of this behavior and do the compilation ourselves in 'install' stage.
#
# [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#manual-bytecompilation
%global _python_bytecompile_extra 0
Name: %{vdsm_name}
Version: 4.50.5.1
Release: %{vdsm_release}%{?dist}%{?extra_release}
Version: 4.50.5.1~git0.c3596b5a
Release: 0
Summary: Virtual Desktop Server Manager
Group: Applications/System
License: GPL-2.0-or-later
Url: http://www.ovirt.org/develop/developer-guide/vdsm/vdsm/
Source0: https://github.com/oVirt/vdsm/releases/download/v%{version}/%{vdsm_name}-%{version}.tar.gz
# Temporary
Patch100: configure-ver.patch
Patch101: cpuid-num-cpus.patch
Source1: vdsm-logrotate.service
Source2: vdsm-logrotate.timer
%{!?_licensedir:%global license %%doc}
%if 0%{?rhel} >= 9
# qemu-kvm is not available for ppc64le on RHEL 9
ExcludeArch: ppc64le
%endif
BuildRequires: openssl
BuildRequires: python3
BuildRequires: python3-six >= 1.9.0
BuildRequires: python3-dateutil
BuildRequires: python3-devel
BuildRequires: rpm-build
BuildRequires: fdupes
%if 0%{?fedora}
BuildRequires: systemd-units
%endif
@ -130,8 +112,6 @@ Requires: safelease >= 1.0-7
Requires: mom >= 0.5.14
Requires: util-linux
Obsoletes: %{name}-infra < 4.19
Requires: nfs-utils
# For kvm2ovirt
@ -150,13 +130,8 @@ Requires: libvirt-client
Requires: libvirt-daemon-config-nwfilter
Requires: libvirt-lock-sanlock
# Zero-copy migrations, https://bugzilla.redhat.com/2089434
Requires: libvirt-daemon-kvm >= 8.0.0-5.4.module+el8.6.0+16370+bb85faee
%if 0%{?centos} == 8
Requires: python3-libvirt
%else
# VIR_MIGRATE_ZEROCOPY flag, https://bugzilla.redhat.com/2089434
Requires: python3-libvirt >= 8.0.0-1.1.module+el8.6.0+16381+3abc475c
%endif
Requires: libvirt-daemon
Requires: python3-libvirt-python >= 9.0.0
# iscsi-intiator versions
Requires: iscsi-initiator-utils >= 6.2.0.873-21
@ -282,18 +257,18 @@ Requires(pre): user(%imageio_user)
Requires(pre): group(%imageio_group)
Requires(pre): user(%snlk_user)
Requires(pre): group(%snlk_group)
Requires(pre): polkit
Requires(pre): libvirt-daemon
Requires(pre): libvirt-daemon-driver-qemu
Requires(pre): libvirt-libs
Requires(pre): pam
Requires(pre): p11-kit
Requires(pre): ovirt-imageio-daemon
Conflicts: ovirt-hosted-engine-ha < 2.3.6
Conflicts: vdsm-hook-sriov
Obsoletes: vdsm-hook-vfio-mdev < %{version}-%{release}
Provides: vdsm-hook-vfio-mdev
Obsoletes: %{name}-hook-floppy < %{version}-%{release}
Obsoletes: %{name}-hook-numa < %{version}-%{release}
Obsoletes: %{name}-hook-pincpu < %{version}-%{release}
Obsoletes: %{name}-hook-vmdisk < %{version}-%{release}
Obsoletes: %{name}-hook-hostdev-scsi < %{version}-%{release}
Obsoletes: %{name}-hook-vmfex-dev < 4.40.70
%description
@ -307,7 +282,6 @@ Summary: VDSM http API
BuildArch: noarch
Provides: %{name}-xmlrpc = %{version}-%{release}
Requires: %{name}-python = %{version}-%{release}
Obsoletes: %{name}-xmlrpc < %{version}-%{release}
%description http
A http interface for interacting with vdsmd when using OVF store image
@ -321,7 +295,6 @@ Provides: %{name}-cli = %{version}-%{release}
Requires: %{name}-api = %{version}-%{release}
Requires: %{name}-yajsonrpc = %{version}-%{release}
Requires: %{name}-python = %{version}-%{release}
Obsoletes: %{name}-cli < %{version}-%{release}
%description client
Access vdsm API from the command line.
@ -330,7 +303,6 @@ Access vdsm API from the command line.
Summary: VDSM API
BuildArch: noarch
BuildRequires: python3-PyYAML
%endif
%description api
Contains api schema files
@ -341,7 +313,6 @@ BuildArch: noarch
Requires: %{name}-python = %{version}-%{release}
Requires: %{name}-api = %{version}-%{release}
Requires: %{name}-yajsonrpc = %{version}-%{release}
Obsoletes: %{name}-api < 4.16
%description jsonrpc
A Json-based RPC interface that serves as the protocol for libvdsm.
@ -355,7 +326,7 @@ Requires: python3 >= 3.6
A JSON RPC server and client implementation.
%package common
Summary: common VDSM python libraries, required by all subsystems
Summary: Common VDSM python libraries, required by all subsystems
BuildArch: noarch
Requires: systemd
Requires: glibc
@ -423,7 +394,7 @@ Requires: %{name}
VDSM hook used to allocate networks for vms in a random fashion
%package hook-boot_hostdev
Summary: allows setting boot order for hostdev
Summary: Allows setting boot order for hostdev
BuildArch: noarch
Requires: %{name}
@ -470,7 +441,7 @@ VDSM hook used for applying custom network properties that define ethtool
options for vdsm network nics
%package hook-extra-ipv4-addrs
Summary: Set extra ipv4 addresses for vdsm networks.
Summary: Set extra ipv4 addresses for vdsm networks
%description hook-extra-ipv4-addrs
This hook allows the user to set extra ipv4
@ -582,6 +553,7 @@ this hook will expose it to the guests.
%package hook-openstacknet
Summary: OpenStack Network vNICs support for VDSM
BuildArch: noarch
Requires(pre): sudo
%description hook-openstacknet
Hook for OpenStack Network vNICs.
@ -687,6 +659,8 @@ Gluster plugin enables VDSM to serve Gluster functionalities.
%prep
%autosetup
echo v%{version} > VERSION
%build
%if 0%{?enable_autotools}
autoreconf -if
@ -712,40 +686,54 @@ autoreconf -if
%else
%define enable_vhostmd no
%endif
%configure --with-qemu-user=%{qemu_user} --with-qemu-group=%{qemu_group} --enable-ovirt-vmconsole=%{enable_ovirt_vmconsole} --enable-gluster-mgmt=%{enable_gluster_mgmt} --enable-hooks=%{enable_hooks} --enable-vhostmd=%{enable_vhostmd} --with-data-center=%{vdsm_repo}
%configure --with-qemu-user=%{qemu_user} --with-qemu-group=%{qemu_group} --enable-ovirt-vmconsole=%{enable_ovirt_vmconsole} --enable-gluster-mgmt=%{enable_gluster_mgmt} --enable-hooks=%{enable_hooks} --enable-vhostmd=%{enable_vhostmd} --with-data-center=%{vdsm_repo} --with-polkitdir=%{_polkitdir}
make
%sysusers_generate_pre %{SOURCE1} vdsm-user
%install
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}/%{vdsm_repo}
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/sitecustomize.py
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_utils.py
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/openstacknet_utils.py
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/checkips_utils.py
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_utils.py
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/openstacknet_utils.py
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py
%py_byte_compile python3 %{buildroot}/%{_libexecdir}/%{vdsm_name}/vm_libvirt_hook.py
mv %{buildroot}/%{_sysconfdir}/cron.hourly/vdsm-logrotate %{buildroot}/%{_libexecdir}/%{vdsm_name}/vdsm-logrotate
mkdir -p %{buildroot}/%{%_unitdir}
install -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}
install -m 0644 %{SOURCE2} %{buildroot}/%{_unitdir}
mkdir -p %{buildroot}%{_prefix}%{_sysconfdir}/security/limits.d
mv %{buildroot}%{_sysconfdir}/security/limits.d/99-vdsm.conf %{buildroot}%{_prefix}%{_sysconfdir}/security/limits.d/
rmdir %{buildroot}%{_sysconfdir}/security/limits.d/99-vdsm.conf 2>/dev/null ||:
mkdir -p %{buildroot}%{_prefix}%{_sysconfdir}/sudoers.d
for file in 50_vdsm 50_vdsm_hook_openstacknet 50_vdsm_hook_vhostmd 50_vdsm_hook_localdisk; do
mv "%{buildroot}%{_sysconfdir}/sudoers.d/$file" %{buildroot}%{_prefix}%{_sysconfdir}/sudoers.d/
done
rmdir %{buildroot}%{_sysconfdir}/sudoers.d 2>/dev/null ||:
mkdir -p %{buildroot}%{_unitdir}/libvirtd.service.d
mv %{buildroot}%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf \
%{buildroot}%{_unitdir}/libvirtd.service.d/
rmdir %{buildroot}%{_sysconfdir}/systemd/system/libvirtd.service.d 2>/dev/null ||:
mkdir -p %{buildroot}%{_modulesloaddir}
mv %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf %{buildroot}%{_modulesloaddir}/
rmdir %{buildroot}%{_sysconfdir}/modules-load.d 2>/dev/null ||:
mkdir -p %{buildroot}%{_modprobedir}
for file in vdsm-bonding-modprobe.conf vdsm-nestedvt.conf; do
mv %{buildroot}/%{_sysconfdir}/modprobe.d/$file %{buildroot}%{_modprobedir}
done
rmdir %{buildroot}/%{_sysconfdir}/modprobe.d 2>/dev/null ||:
%py3_compile %{buildroot}/%{_libexecdir}/%{vdsm_name}
%py3_compile %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks
%fdupes %buildroot%{python3_sitearch}
%fdupes %buildroot%{python3_sitelib}
%fdupes %{buildroot}/%{_libexecdir}/%{vdsm_name}/hooks
%pre
# Force standard locale behavior (English)
export LC_ALL=C.UTF8
#/usr/bin/getent passwd %{vdsm_user} >/dev/null || \
# /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \
# -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user}
#/usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user}
#/usr/sbin/usermod -a -G %{cdrom_group} %{qemu_user}
## imageio has to be part of kvm group to be able to read/write nbd
## socket and part of qemu group to be able to access images.
#/usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{imageio_user}
## vdsm has to be part of imageio group to be able to read/write imageio
## control socket.
#/usr/sbin/usermod -a -G %{imageio_group} %{vdsm_user}
# We keep the previous rpm version number in a file for managing upgrade flow
if [ "$1" -gt 1 ]; then
rpm -q %{vdsm_name} > "%{_localstatedir}/lib/%{vdsm_name}/upgraded_version"
@ -757,9 +745,16 @@ if [ "$1" -gt 1 ]; then
if /bin/systemctl status supervdsmd >/dev/null 2>&1; then
/usr/bin/touch "%{_localstatedir}/lib/%{vdsm_name}/supervdsmd_start_required"
fi
fi
%systemd_pre vdsmd.service
%systemd_pre dev-hugepages1G.mount
%systemd_pre vdsm-network.service
%systemd_pre supervdsmd.service
%systemd_pre mom-vdsm.service
%systemd_pre vdsm-logrotate.timer
%systemd_pre vdsm-logrotate.service
%post
# After vdsm install we should create the logs files.
# In the install session we create it but since we use
@ -769,21 +764,19 @@ chmod 0644 %{_vdsm_log_dir}/{mom.log,supervdsm.log,vdsm.log}
chown %{vdsm_user}:%{vdsm_group} %{_vdsm_log_dir}/{mom.log,vdsm.log}
chown root:root %{_vdsm_log_dir}/supervdsm.log
systemd-tmpfiles --create %{vdsm_name}.conf
# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf.
# So Remove them if it is played with /etc/sysctl.conf.
if grep -q "# VDSM section begin" /etc/sysctl.conf; then
/bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \
/etc/sysctl.conf
fi
%tmpfiles_create %{vdsm_name}.conf
# VDSM installs vdsm-modules-load.d.conf file - the following command will
# refresh vdsm kernel modules requirements to start on boot
/bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || :
# VDSM installs unit files - daemon-reload will refresh systemd
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%systemd_post vdsmd.service
%systemd_post dev-hugepages1G.mount
%systemd_post vdsm-network.service
%systemd_post supervdsmd.service
%systemd_post mom-vdsm.service
%systemd_post vdsm-logrotate.timer
%systemd_post vdsm-logrotate.service
exit 0
%preun
@ -795,7 +788,18 @@ fi
%systemd_preun vdsm-network.service
%systemd_preun supervdsmd.service
%systemd_preun mom-vdsm.service
%systemd_preun ksmtuned.service
%systemd_preun vdsm-logrotate.timer
%systemd_preun vdsm-logrotate.service
exit 0
%postun
%systemd_postun dev-hugepages1G.mount
%systemd_postun vdsmd.service
%systemd_postun vdsm-network.service
%systemd_postun supervdsmd.service
%systemd_postun mom-vdsm.service
%systemd_postun vdsm-logrotate.timer
%systemd_postun vdsm-logrotate.service
exit 0
%posttrans
@ -842,7 +846,8 @@ exit 0
%{_unitdir}/vdsm-network.service
%{_unitdir}/supervdsmd.service
%{_unitdir}/mom-vdsm.service
%{_sysconfdir}/systemd/system/libvirtd.service.d/unlimited-core.conf
%dir %{_unitdir}/libvirtd.service.d
%{_unitdir}/libvirtd.service.d/unlimited-core.conf
%dir %attr(-, %{vdsm_user}, %{vdsm_group}) %{vdsm_repo}
%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) %{_vdsm_log_dir}/mom.log
@ -850,14 +855,21 @@ exit 0
%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) %{_vdsm_log_dir}/vdsm.log
%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) %{vdsm_repo}/hsm-tasks
%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) %{vdsm_repo}/mnt
%ghost %dir %{_rundir}/%{vdsm_name}
%ghost %dir %{_rundir}/%{vdsm_name}/v2v
%ghost %dir %{_rundir}/%{vdsm_name}/payload
%dir %{_libexecdir}/%{vdsm_name}
%dir %{_libexecdir}/%{vdsm_name}/__pycache__
%dir %{_sysconfdir}/%{vdsm_name}/vdsm.conf.d
%dir %{_sysconfdir}/modprobe.d/
%dir %{_modprobedir}
%dir %{_sysconfdir}/NetworkManager
%dir %{_sysconfdir}/NetworkManager/conf.d
%dir %{_sysconfdir}/%{vdsm_name}
%dir %{_sysconfdir}/%{vdsm_name}/mom.d
%dir %{_datadir}/%{vdsm_name}
%dir %{_sysconfdir}/%{vdsm_name}/logrotate
# Technically owned by udev but the package is built with udev-mini
%dir %{_modulesloaddir}
%{_libexecdir}/%{vdsm_name}/daemonAdapter
%{_libexecdir}/%{vdsm_name}/sitecustomize.py
%{_libexecdir}/%{vdsm_name}/__pycache__/*
@ -871,14 +883,16 @@ exit 0
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logrotate/vdsm
%config(noreplace) %{_sysconfdir}/sysctl.d/vdsm.conf
%config(noreplace) %{_sysconfdir}/modules-load.d/vdsm.conf
%{_modulesloaddir}/vdsm.conf
%{_sysconfdir}/ovirt-imageio/conf.d/60-vdsm.conf
%{_tmpfilesdir}/%{vdsm_name}.conf
%{_sysconfdir}/modprobe.d/vdsm-bonding-modprobe.conf
%{_modprobedir}/vdsm-bonding-modprobe.conf
%{_sysconfdir}/NetworkManager/conf.d/vdsm.conf
%attr(440, root, root) %{_sysconfdir}/sudoers.d/50_vdsm
%{_sysconfdir}/cron.hourly/vdsm-logrotate
%attr(440, root, root) %{_prefix}%{_sysconfdir}/sudoers.d/50_vdsm
%{_sysconfdir}/libvirt/hooks/qemu
%{_unitdir}/vdsm-logrotate.timer
%{_unitdir}/vdsm-logrotate.service
%{_libexecdir}/%{vdsm_name}/vdsm-logrotate
%{_libexecdir}/%{vdsm_name}/curl-img-wrap
%{_libexecdir}/%{vdsm_name}/fc-scan
%{_libexecdir}/%{vdsm_name}/managedvolume-helper
@ -889,15 +903,16 @@ exit 0
%{_libexecdir}/%{vdsm_name}/fallocate
%{_libexecdir}/%{vdsm_name}/spmprotect.sh
%{_libexecdir}/%{vdsm_name}/spmstop.sh
%{_libexecdir}/%{vdsm_name}/__pycache__/*
%dir %{_libexecdir}/%{vdsm_name}/hooks
%dir %{_libexecdir}/%{vdsm_name}/hooks/*
%dir %{python3_sitelib}/dnf-plugins
%dir %{python3_sitelib}/dnf-plugins/__pycache__
%{python3_sitelib}/dnf-plugins/*.py
%{python3_sitelib}/dnf-plugins/__pycache__/*
%{_libexecdir}/%{vdsm_name}/get-conf-item
%{_udevrulesdir}/12-vdsm-lvm.rules
/etc/security/limits.d/99-vdsm.conf
%{_prefix}%{_sysconfdir}/security/limits.d/99-vdsm.conf
%{_mandir}/man8/vdsmd.8*
%{_polkitdir}/10-vdsm-libvirt-access.rules
@ -937,6 +952,10 @@ exit 0
%files python
%{_mandir}/man1/vdsm-tool.1*
%{_bindir}/vdsm-tool
%dir %{python3_sitelib}/%{vdsm_name}
%dir %{python3_sitelib}/%{vdsm_name}/__pycache__/
%dir %{python3_sitelib}/%{vdsm_name}/gluster
%dir %{python3_sitelib}/%{vdsm_name}/gluster/__pycache__
%{python3_sitelib}/%{vdsm_name}/API.py
%{python3_sitelib}/%{vdsm_name}/__pycache__/API.*.pyc
%{python3_sitelib}/%{vdsm_name}/__pycache__/alignmentScan.*.pyc
@ -1021,39 +1040,46 @@ exit 0
%{python3_sitelib}/%{vdsm_name}/virtsysprep.py
%files hook-openstacknet
%attr(440, root, root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet
%attr(440, root, root) %{_prefix}%{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet
%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet
%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_create/__pycache__
%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/__pycache__/*
%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py
%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/50_openstacknet
%dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/__pycache__
%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/__pycache__/*
%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_utils.py
%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/50_openstacknet
%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/__pycache__
%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/__pycache__/*
%{_libexecdir}/%{vdsm_name}/hooks/after_get_caps/openstacknet_utils.py
%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/50_openstacknet
%dir %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/__pycache__
%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/__pycache__/*
%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_utils.py
%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_openstacknet
%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/__pycache__
%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/__pycache__/*
%{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/openstacknet_utils.py
%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet
%dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/__pycache__
%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/__pycache__/*
%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py
%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet
%dir %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/__pycache__
%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/__pycache__/*
%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py
%if %{with_vhostmd}
%files hook-vhostmd
%license COPYING
%attr(440, root, root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd
%attr(440, root, root) %{_prefix}%{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd
%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd
%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd
%{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd
%{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd
%else
%exclude %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd
%exclude %{_prefix}%{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd
%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd
%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd
%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd
@ -1072,7 +1098,7 @@ exit 0
%{_libexecdir}/%{vdsm_name}/hooks/before_network_setup/50_fcoe
%files hook-localdisk
%attr(440, root, root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_localdisk
%attr(440, root, root) %{_prefix}%{_sysconfdir}/sudoers.d/50_vdsm_hook_localdisk
%{_libexecdir}/%{vdsm_name}/hooks/after_disk_prepare/localdisk
%{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/localdisk
%{_libexecdir}/%{vdsm_name}/localdisk-helper
@ -1103,9 +1129,11 @@ exit 0
%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/60_checkimages
%files hook-checkips
%dir %{_libexecdir}/%{vdsm_name}/hooks/after_get_stats
%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/10_checkips
%{_libexecdir}/%{vdsm_name}/hooks/checkipsd
%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/checkips_utils.py
%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/__pycache__
%{_libexecdir}/%{vdsm_name}/hooks/after_get_stats/__pycache__/checkips_utils.*.pyc
%{_unitdir}/vdsm-checkips.service
@ -1132,7 +1160,7 @@ exit 0
%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_extnet
%files hook-nestedvt
%{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf
%{_modprobedir}/vdsm-nestedvt.conf
%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_nestedvt
%files hook-scratchpad
@ -1154,14 +1182,17 @@ exit 0
%files client
%{_bindir}/vdsm-client
%dir %{python3_sitelib}/vdsmclient
%dir %{python3_sitelib}/vdsmclient/__pycache__
%{python3_sitelib}/vdsmclient/__init__.py
%{python3_sitelib}/vdsmclient/__pycache__/*
%{python3_sitelib}/vdsmclient/client.py
%{python3_sitelib}/yajsonrpc/__init__.py
%{python3_sitelib}/yajsonrpc/__pycache__/__init__.*.pyc
%{_mandir}/man1/vdsm-client.1*
%files jsonrpc
%dir %{python3_sitelib}/yajsonrpc
%dir %{python3_sitelib}/yajsonrpc/__pycache__
%dir %{python3_sitelib}/%{vdsm_name}/rpc
%dir %{python3_sitelib}/%{vdsm_name}/rpc/__pycache__
%{python3_sitelib}/%{vdsm_name}/rpc/Bridge.py
%{python3_sitelib}/%{vdsm_name}/rpc/__init__.py
%{python3_sitelib}/%{vdsm_name}/rpc/__pycache__/Bridge.*.pyc
@ -1177,6 +1208,7 @@ exit 0
%doc lib/vdsm/api/vdsm-api.html
%dir %{python3_sitelib}/%{vdsm_name}
%dir %{python3_sitelib}/%{vdsm_name}/api
%dir %{python3_sitelib}/%{vdsm_name}/api/__pycache__
%dir %{python3_sitelib}/%{vdsm_name}/rpc
%{python3_sitelib}/%{vdsm_name}/api/*.py
%{python3_sitelib}/%{vdsm_name}/rpc/vdsm-api.pickle
@ -1187,6 +1219,8 @@ exit 0
%endif
%files yajsonrpc
%dir %{python3_sitelib}/yajsonrpc
%dir %{python3_sitelib}/yajsonrpc/__pycache__
%{python3_sitelib}/yajsonrpc/__pycache__/betterAsyncore.*.pyc
%{python3_sitelib}/yajsonrpc/__pycache__/exception.*.pyc
%{python3_sitelib}/yajsonrpc/__pycache__/stomp.*.pyc
@ -1228,6 +1262,7 @@ exit 0
%{python3_sitelib}/%{vdsm_name}/gluster/storagedev.py
%{python3_sitelib}/%{vdsm_name}/gluster/tasks.py
%{python3_sitelib}/%{vdsm_name}/gluster/thinstorage.py
%dir %{python3_sitelib}/%{vdsm_name}/rpc
%{python3_sitelib}/%{vdsm_name}/rpc/vdsm-api-gluster.pickle
%endif