forked from lago-project/lago
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlago.spec.in
150 lines (129 loc) · 3.85 KB
/
lago.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Version: @@VERSION@@
Release: 1%{?dist}
Name: lago
Summary: System testing framework
BuildArch: noarch
Group: System Environment/Libraries
License: GPLv2+
URL: https://github.com/lago-project/lago
Source0: https://resources.ovirt.org/repos/%{name}/0.0/src/%{name}/%{name}-%{version}.tar.gz
###################### lago package
Requires: python-%{name} = %{version}
%description
LAGO System testing framework.
Deploy and tear down environments of several virtual machines
%prep
%setup -q -n %{name}-%{version}
%build
LAGO_VERSION=%{version} %{__python} setup.py build
%install
LAGO_VERSION=%{version} %{__python} setup.py install --root $RPM_BUILD_ROOT
cd "$RPM_BUILD_DIR"
install -d "$RPM_BUILD_ROOT"/var/lib/lago/subnets
install -d "$RPM_BUILD_ROOT"/var/lib/lago/store
install -d "$RPM_BUILD_ROOT"/var/lib/lago/repos
# this is for python-lago-ovirt
install -d "$RPM_BUILD_ROOT"/var/lib/lago/reposync
%files
###################### python-lago package
%package -n python-%{name}
Summary: Library to perform lago operations
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-pbr
%if 0%{?fedora} >= 23
BuildRequires: python2-dulwich
%else
BuildRequires: python-dulwich
%endif
BuildRequires: python-flake8
BuildRequires: python-nose
BuildRequires: git
Requires: python
Requires: libguestfs-tools
Requires: libvirt >= 1.2.8
Requires: libvirt-python
Requires: python-libguestfs
Requires: python-lxml
Requires: python-lockfile
Requires: python-magic
Requires: python-paramiko
Requires: python-pbr
Requires: python-xmltodict
Requires: python-scp
Requires: python-setuptools
Requires: python-stevedore
Requires: python-yaml
Requires: python-enum
Requires: qemu-img >= 2.1.2
Requires: qemu-kvm >= 2.1.2
Requires: git
Requires: sudo
%{?python_provide:%python_provide python2-lago}
%description -n python-%{name}
%files -n python-%{name}
%doc AUTHORS COPYING README.rst
%{python2_sitelib}/%{name}/*.py*
%{python2_sitelib}/%{name}/plugins/*.py*
%{python2_sitelib}/%{name}_template_repo/*.py*
%{python2_sitelib}/%{name}/*.xml
%{python2_sitelib}/%{name}-%{version}-py*.egg-info
%{_sysconfdir}/polkit-1/localauthority/50-local.d/
%{_bindir}/lagocli
%{_bindir}/lago
%attr(0775, root, root) %{_sysconfdir}/sudoers.d/*
%config(noreplace) %{_sysconfdir}/lago.d/lago.conf
%dir %attr(2775, root, lago) /var/lib/lago/
%dir %attr(2775, root, lago) /var/lib/lago/subnets/
%dir %attr(2775, root, lago) /var/lib/lago/store/
%dir %attr(2775, root, lago) /var/lib/lago/repos/
%pre -n python-%{name}
if [[ "$1" -eq 1 ]]; then
groupadd lago
fi
%postun -n python-%{name}
if [[ "$1" -eq 0 ]]; then
groupdel lago
fi
###################### lago-ovirt package
%package -n %{name}-ovirt
Summary: oVirt extension for lagocli
BuildArch: noarch
BuildRequires: python2-devel
Requires: %{name} = %{version}
Requires: python-%{name}-ovirt = %{version}
%files -n %{name}-ovirt
%description -n %{name}-ovirt
###################### python-lago-ovirt package
%package -n python-%{name}-ovirt
Summary: Library for ovirt specific facitilies
BuildArch: noarch
BuildRequires: python2-devel
Requires: python
Requires: python-%{name} = %{version}
Requires: python-magic
Requires: python-nose
Requires: ovirt-engine-sdk-python
Requires: createrepo
Requires: repoman >= 2.0.12
Requires: yum-utils
Requires: rpm-build
Requires: xz
%{?python_provide:%python_provide python2-lago-ovirt}
%description -n python-%{name}-ovirt
%files -n python-%{name}-ovirt
%{python2_sitelib}/ovirt%{name}/*.py*
%{_sysconfdir}/firewalld/services/*
%dir %attr(2775, root, lago) /var/lib/lago/reposync/
%post -n python-%{name}-ovirt
if which firewall-cmd &>/dev/null; then
firewall-cmd --reload
firewall-cmd --permanent --zone=public --add-service=ovirtlago
firewall-cmd --reload
fi
%preun -n python-%{name}-ovirt
if which firewall-cmd &>/dev/null; then
firewall-cmd --permanent --zone=public --remove-service=ovirtlago
firewall-cmd --reload
fi
%changelog