This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
load-balancer-servo.spec
145 lines (116 loc) · 4.43 KB
/
load-balancer-servo.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: load-balancer-servo
Version: 1.5.0
Release: 0%{?build_id:.%build_id}%{?dist}
Summary: Configuration tool for the Eucalyptus LB
Group: Applications/System
License: GPLv3
URL: http://www.eucalyptus.com
Source0: %{tarball_basedir}.tar.xz
Source1: %{name}.tmpfiles
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python%{?__python_ver}-devel
BuildRequires: python%{?__python_ver}-setuptools
BuildRequires: systemd
Requires: python%{?__python_ver}
Requires: python%{?__python_ver}-boto
Requires: python%{?__python_ver}-httplib2
Requires: haproxy >= 1.5
Requires: sudo
Requires: crontabs
Requires: ntp
Requires: ntpdate
Requires: m2crypto
Requires: redis
Requires: python-redis
Requires: java-1.8.0-openjdk
Requires: eucalyptus-common-java-libs
Requires: python-netaddr
Requires(pre): %{_sbindir}/useradd
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
%description
Configuration tool for the Eucalyptus LB
%prep
%setup -q -n %{tarball_basedir}
%build
# Build CLI tools
%{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
# Install CLI tools
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
#
# There is no extension on the installed sudoers file for a reason
# It will only be read by sudo if there is *no* extension
#
install -p -m 0440 -D scripts/servo-sudoers.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sudoers.d/servo
install -p -m 755 -D scripts/load-balancer-servo-init $RPM_BUILD_ROOT/%{_initddir}/load-balancer-servo
install -p -m 755 -D scripts/servo-prep $RPM_BUILD_ROOT%{_libexecdir}/%{name}/servo-prep
install -m 6700 -d $RPM_BUILD_ROOT/%{_var}/{run,lib,log}/load-balancer-servo
mkdir -p $RPM_BUILD_ROOT/%{_tmpfilesdir}
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_tmpfilesdir}/%{name}.conf
install -p -m 755 -D scripts/log4j.xml $RPM_BUILD_ROOT/%{_var}/lib/%{name}/log4j.xml
%clean
rm -rf $RPM_BUILD_ROOT
%pre
getent passwd servo >/dev/null || \
useradd -d %{_var}/lib/load-balancer-servo \
-M -s /sbin/nologin servo
# Stop running services for upgrade
if [ "$1" = "2" ]; then
/sbin/service %{name} stop 2>/dev/null || :
fi
%post
/sbin/chkconfig --add %{name}
%preun
if [ $1 -eq 0 ] ; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%files
%defattr(-,root,root,-)
%doc README.md LICENSE
%{python_sitelib}/*
%{_bindir}/load-balancer-servo
%{_sysconfdir}/sudoers.d/servo
%{_initddir}/load-balancer-servo
%{_libexecdir}/%{name}
%defattr(-,servo,servo,-)
%dir %{_sysconfdir}/load-balancer-servo
%dir %{_var}/run/load-balancer-servo
%dir %{_var}/log/load-balancer-servo
%dir %{_var}/lib/load-balancer-servo
%{_var}/lib/%{name}/log4j.xml
%config(noreplace) %{_sysconfdir}/load-balancer-servo/haproxy_template.conf
%config(noreplace) %{_sysconfdir}/load-balancer-servo/boto.cfg
%config(noreplace) %{_sysconfdir}/load-balancer-servo/503.http
%{_tmpfilesdir}/%{name}.conf
%changelog
* Mon May 8 2017 Garrett Holmstrom <[email protected]> - 1.4.1
- Version bump (1.4.1)
* Mon Mar 06 2017 Matt Bacchi <[email protected]> - 1.5.0
* Version bump (1.5.0)
* Fri Dec 09 2016 Matt Bacchi <[email protected]> - 1.4.0
* Version bump (1.4.0)
* Tue Sep 27 2016 Sang-Min Park <[email protected]> - 1.3.0
- Rename ntp-update script file to servo-prep
* Mon Aug 08 2016 Sang-Min Park <[email protected]> - 1.3.0
- Add Jar dependicies into library directory
* Fri Jul 22 2016 Garrett Holmstrom <[email protected]> - 1.3.0
- Version bump (1.3.0)
* Tue Dec 16 2014 Eucalyptus Release Engineering <[email protected]> - 1.0.2-0
- Added chkconfig changes
* Mon Jan 20 2014 Eucalyptus Release Engineering <[email protected]> - 1.0.2-0
- Add m2crypto as a dependency
* Tue Dec 10 2013 Eucalyptus Release Engineering <[email protected]> - 1.0.2-0
- Fix port for communication with CLC
* Tue Sep 24 2013 Eucalyptus Release Engineering <[email protected]> - 1.0.1-0
- Add requires for ntp and ntpdate
* Mon Sep 09 2013 Eucalyptus Release Engineering <[email protected]> - 1.0.1-0
- Add ntp update script and cron job
- Spec file cleanup
* Thu Mar 07 2013 Eucalyptus Release Engineering <[email protected]> - 1.0.0-0
- Initial build