This repository has been archived by the owner on Oct 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openstack-quantum-neuca.spec
125 lines (94 loc) · 3.56 KB
/
openstack-quantum-neuca.spec
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
Name: openstack-quantum-neuca
Version: 0.2
Release: exogeni5%{?dist}
Summary: Quantum NEuca plugin
Group: Applications/System
License: EPL 1.0
Source0: neuca-agent-%{version}.tgz
BuildArch: noarch
BuildRequires: python2-devel
Requires(post): chkconfig
Requires(postun): initscripts
Requires(preun): chkconfig
Requires(preun): initscripts
Requires: openstack-quantum >= 2012.1-6
Requires: vconfig
Requires: net-tools
Requires: bridge-utils
Requires: sudo
%description
Quantum provides an API to dynamically request and configure virtual
networks.
This package contains the quantum plugin that implements virtual
networks via NEuca and Open vSwitch.
%prep
%setup -q -n neuca-agent
find neuca -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \;
%build
%{__python} -mcompileall neuca
%{__python} -O -mcompileall neuca
%install
umask 0022
mkdir -p %{buildroot}%{python_sitelib}/quantum/plugins/
cp -R neuca %{buildroot}%{python_sitelib}/quantum/plugins/
# Install execs (using hand-coded rather than generated versions)
install -p -D -m 755 neuca-agent %{buildroot}%{_bindir}/neuca-agent
install -p -D -m 755 neuca-rootwrap %{buildroot}%{_bindir}/neuca-rootwrap
# Install config
install -p -D -m 640 neuca_quantum_plugin.ini %{buildroot}%{_sysconfdir}/quantum/plugins/neuca/neuca_quantum_plugin.ini
# Install sudoers
install -p -D -m 440 neuca-sudoers %{buildroot}%{_sysconfdir}/sudoers.d/neuca
# Install policykit
install -p -D -m 644 neuca-polkit.pkla %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d/50-neuca.pkla
# Install sysv init scripts
install -p -D -m 755 neuca-agent.init %{buildroot}%{_initrddir}/neuca-agent
# Configure agent to use neuca-rootwrap
sed -i 's/root_helper = sudo/root_helper = sudo neuca-rootwrap/g' %{buildroot}%{_sysconfdir}/quantum/plugins/neuca/neuca_quantum_plugin.ini
# Setup directories
install -d -m 755 %{buildroot}%{_localstatedir}/log/neuca
install -d -m 755 %{buildroot}%{_localstatedir}/run/neuca
%post
if [ $1 -eq 1 ] ; then
# Initial installation
/sbin/chkconfig --add neuca-agent
fi
%preun
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/sbin/service neuca-agent stop >/dev/null 2>&1
/sbin/chkconfig --del neuca-agent
fi
%postun
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/sbin/service neuca-agent condrestart >/dev/null 2>&1 || :
fi
%files
%doc LICENSE.Eclipse
%{_bindir}/neuca-agent
%{_bindir}/neuca-rootwrap
%config(noreplace) %{_sysconfdir}/sudoers.d/neuca
%{_sysconfdir}/polkit-1/localauthority/50-local.d/50-neuca.pkla
%{_initrddir}/neuca-agent
%{python_sitelib}/quantum/plugins/neuca
%dir %{_sysconfdir}/quantum/plugins/neuca
%config(noreplace) %attr(-, root, quantum) %{_sysconfdir}/quantum/plugins/neuca/*.ini
%dir %attr(0755, quantum, quantum) %{_localstatedir}/log/neuca
%dir %attr(0755, quantum, quantum) %{_localstatedir}/run/neuca
%changelog
* Thu Jul 7 2016 Victor J. Orlikowski <vjo@duke.edu> - 0.2-exogeni3
- Yet more cleanups
* Thu Jul 7 2016 Victor J. Orlikowski <vjo@duke.edu> - 0.2-exogeni2
- More cleanups
* Tue Jul 5 2016 Victor J. Orlikowski <vjo@duke.edu> - 0.2-exogeni1
- Massive cleanups
* Tue Apr 15 2014 Victor J. Orlikowski <vjo@cs.duke.edu> - 0.1-exogeni6
- QEMU virtio UDP optimization
* Fri Jul 5 2013 Victor J. Orlikowski <vjo@cs.duke.edu> - 0.1-exogeni5
- Bug fix for leaking tap devices
* Fri May 17 2013 Victor J. Orlikowski <vjo@cs.duke.edu> - 0.1-exogeni4
- More bug fixes...
* Mon Nov 26 2012 Victor J. Orlikowski <vjo@cs.duke.edu> - 0.1-exogeni2
- Bug fixing
* Tue Sep 18 2012 Victor J. Orlikowski <vjo@cs.duke.edu> - 0.1-exogeni1
- Initial packaging for Essex