代码拉取完成,页面将自动刷新
Name: ovirt-scheduler-proxy
Version: 0.1.9
Release: 1
Summary: Scheduling Proxy for Open Virtualization
Group: Virtualization/Management
License: ASL 2.0
URL: http://www.ovirt.org
Source: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: systemd
BuildRequires: python3-devel
BuildRequires: python3-nose
BuildRequires: java-11-openjdk-devel >= 11.0.4
Requires: python3
%description
The scheduler proxy runs user defined scripts to filter and fine-tune
load-balancing of their oVirt system.
%prep
%setup -q
# remove integration (java) tests
rm -rf tests/java
%build
%{__python3} setup.py \
build
%install
# Install the python files:
%{__python3} setup.py \
install \
-O1 \
--skip-build \
--root %{buildroot}
# Install the systemd service file:
install \
-dm 755 \
%{buildroot}%{_unitdir}
install \
-m 644 \
packaging/ovirt-scheduler-proxy.systemd \
%{buildroot}%{_unitdir}/ovirt-scheduler-proxy.service
# Install the data directory:
install \
-dm 755 \
%{buildroot}%{_datadir}/%{name}
# Install the directory for plugins:
install \
-dm 755 \
%{buildroot}%{_datadir}/%{name}/plugins
# Install the directory for logs:
install \
-dm 755 \
%{buildroot}%{_localstatedir}/log/%{name}
%check
make pythontest
%pre
# Create the group if it doesn't exist:
getent group ovirt &>/dev/null || \
groupadd \
-g 108 \
ovirt
# Create the user if it doesn't exist.
# Home directory is not created, becasue SELinux does not allow it.
getent passwd ovirt &>/dev/null || \
useradd \
-u 108 \
-g ovirt \
-c "oVirt Manager" \
-s /sbin/nologin \
-M \
-d %{_datadir}/%{name} \
ovirt
%post
# Make sure that systemd reloads its configuration once the package is
# installed, otherwise it won't recognize the new service name:
%systemd_post ovirt-scheduler-proxy.service
%postun
# Make sure that the service is stoped and removed from the systemd
# configuration:
%systemd_postun ovirt-scheduler-proxy.service
%preun
# Make sure that the service is stoped
%systemd_preun ovirt-scheduler-proxy.service
%files
# Python files (included the generated egg):
%{python3_sitelib}/ovirtscheduler
%{python3_sitelib}/ovirt_scheduler_proxy-*.egg-info
%{_unitdir}/ovirt-scheduler-proxy.service
# Data directory:
%{_datadir}/ovirt-scheduler-proxy
# Logs directory needs to be owned by the user that runs the service because it
# needs to create files inside:
%attr(-, ovirt, ovirt) %{_localstatedir}/log/ovirt-scheduler-proxy
# Documentation and example files
%doc LICENSE README doc/*
%changelog
* Mon Jul 5 2021 kymayl<mayilin@kylinos.cn> - 0.1.9-1
- Package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。