5 Star 0 Fork 2

src-openEuler/ovirt-scheduler-proxy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ovirt-scheduler-proxy.spec 2.64 KB
一键复制 编辑 原始数据 按行查看 历史
kymayl 提交于 2021-07-05 14:51 . package init
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/ovirt-scheduler-proxy.git
git@gitee.com:src-openeuler/ovirt-scheduler-proxy.git
src-openeuler
ovirt-scheduler-proxy
ovirt-scheduler-proxy
master

搜索帮助