-
Notifications
You must be signed in to change notification settings - Fork 39
/
lago.spec.in
133 lines (111 loc) · 3.8 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
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: python3-%{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} %{py3_build}
%install
LAGO_VERSION=%{version} %{py3_install}
install -d -m 755 %{buildroot}/%{_sysconfdir}/lago
PYTHONPATH="$PYTHONPATH:%{buildroot}/%{python3_sitelib}"\
%{buildroot}/usr/bin/lago --ignore-warnings generate-config > "%{buildroot}/%{_sysconfdir}/lago/lago.conf"
sed -i 's/^\([^#]\)\(.*\)/#\0/' "%{buildroot}/%{_sysconfdir}/lago/lago.conf"
chmod 0644 "%{buildroot}/%{_sysconfdir}/lago/lago.conf"
install -d %{buildroot}/var/lib/lago/subnets
install -d %{buildroot}/var/lib/lago/store
install -d %{buildroot}/var/lib/lago/repos
install -d -m 755 %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d
install -d -m 755 %{buildroot}%{_sysconfdir}/sudoers.d
install -p -D -m 644 etc/polkit/*.pkla %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d/
install -p -D -m 644 etc/sudo/* %{buildroot}%{_sysconfdir}/sudoers.d/
%files
###################### python-lago package
%package -n python3-%{name}
Summary: Library to perform lago operations
BuildArch: noarch
BuildRequires: git
BuildRequires: python3-dulwich
BuildRequires: python3-jinja2
BuildRequires: python3-libvirt
BuildRequires: python3-lxml
BuildRequires: python3-netaddr
BuildRequires: python3-paramiko
BuildRequires: python3-pbr
BuildRequires: python3-pyxdg
BuildRequires: python3-rpm-macros
BuildRequires: python3-setuptools
BuildRequires: python3-stevedore
BuildRequires: python3-wrapt
BuildRequires: python3-xmltodict
BuildRequires: python3-yaml
BuildRequires: python36-devel
BuildRequires: python36-rpm-macros
Requires: python3
Requires: libguestfs-tools >= 1.30
Requires: libguestfs-devel >= 1.30
Requires: libvirt >= 1.2.8
Requires: python3-libguestfs
Requires: python3-libvirt
Requires: python3-lxml
Requires: python3-pbr
Requires: python3-xmltodict
Requires: python3-scp
Requires: python3-setuptools
Requires: python3-stevedore
Requires: python3-yaml
Requires: python3-pyxdg
Requires: python3-wrapt
Requires: python3-netaddr
Requires: python3-jinja2
Requires: python3-paramiko
Requires: qemu-img
Requires: qemu-kvm
Requires: git
Requires: sudo
Requires: tar
%{?python_provide:%python_provide python3-lago}
%description -n python3-%{name}
%files -n python3-%{name}
%doc AUTHORS COPYING README.rst
%{python3_sitelib}/%{name}/*.py
%{python3_sitelib}/%{name}/__pycache__
%{python3_sitelib}/%{name}/plugins/*.py
%{python3_sitelib}/%{name}/plugins/__pycache__
%{python3_sitelib}/%{name}/templates/*.j2
%{python3_sitelib}/%{name}/providers/*.py
%{python3_sitelib}/%{name}/providers/__pycache__
%{python3_sitelib}/%{name}/providers/libvirt/*.py
%{python3_sitelib}/%{name}/providers/libvirt/__pycache__
%{python3_sitelib}/%{name}/providers/libvirt/templates/*.xml
%{python3_sitelib}/%{name}/providers/libvirt/templates/*.j2
%{python3_sitelib}/%{name}-%{version}-py*.egg-info
%{_bindir}/lagocli
%{_bindir}/lago
%config(noreplace) %{_sysconfdir}/lago/lago.conf
%config(noreplace) %{_sysconfdir}/polkit-1/localauthority/50-local.d/*
%config(noreplace) %{_sysconfdir}/sudoers.d/*
%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 python3-%{name}
if [[ "$1" -eq 1 ]]; then
groupadd -f lago
fi
%postun -n python3-%{name}
if [[ "$1" -eq 0 ]]; then
groupdel lago
fi
%changelog