1 |
# $Id: e-smith-nutUPS.spec,v 1.8 2015/02/03 21:15:48 stephdl Exp $ |
2 |
|
3 |
Summary: SME server - nut UPS interaction module |
4 |
%define name e-smith-nutUPS |
5 |
Name: %{name} |
6 |
%define version 2.4.0 |
7 |
%define release 8 |
8 |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
10 |
License: GPL |
11 |
Group: Networking/Daemons |
12 |
Source: %{name}-%{version}.tar.xz |
13 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
14 |
Requires: nut nut-client daemontools |
15 |
Obsoletes: neon <= 0.25.5 |
16 |
Requires: e-smith-lib >= 1.15.1-16 |
17 |
BuildArchitectures: noarch |
18 |
BuildRequires: e-smith-devtools |
19 |
Patch0 : e-smith-nutUPS-2.4.0.Listen_Local_Network.patch |
20 |
Patch1 : e-smith-nutUPS-2.4.0.UPS_administrative_privileges.patch |
21 |
AutoReqProv: no |
22 |
|
23 |
%description |
24 |
A module which configures the Network UPS Tools suite for operation with |
25 |
the SME server software. |
26 |
|
27 |
%changelog |
28 |
* Sat Feb 07 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 2.4.0-8.sme |
29 |
- Allow the admin upsd in /etc/hosts.allow [SME: 8826] |
30 |
|
31 |
* Tue Feb 03 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 2.4.0-7.sme |
32 |
- Creation Admin Privilege for use of upscmd & upsrw [SME: 8826] |
33 |
- Remove obsolete directives {allowfrom} [SME: 8793] |
34 |
|
35 |
* Sun Jan 25 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 2.4.0-5.sme |
36 |
- Access property created (default value is 'localhost') [SME: 8793] |
37 |
|
38 |
* Thu Jan 22 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 2.4.0-3.sme |
39 |
- Remove obsolete directives {ACL,ACCEPT,REJECT} and switch to LISTEN |
40 |
- in /etc/ups/upsd.conf |
41 |
- Allow NUT in /etc/hosts.allow and in /etc/services [SME: 8793] |
42 |
- Code change from Daniel B.<daniel@firewall-services.com> |
43 |
|
44 |
* Thu Jan 31 2013 Shad L. Lords <slords@mail.com> 2.4.0-2.sme |
45 |
- Obsolete el5 packages that used to be required [SME: 7273] |
46 |
|
47 |
* Thu Jan 31 2013 Shad L. Lords <slords@mail.com> 2.4.0-1.sme |
48 |
- Roll new stream for sme9 |
49 |
|
50 |
* Sun May 17 2009 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-2.sme |
51 |
- Fix another instance of ups model for new version of nut [SME: 4750] |
52 |
|
53 |
* Tue Oct 7 2008 Shad L. Lords <slords@mail.com> 2.2.0-1.sme |
54 |
- Roll new stream to separate sme7/sme8 trees [SME: 4633] |
55 |
|
56 |
* Tue Jan 08 2008 Stephen Noble <support@dungog.net> 1.2.0-17 |
57 |
- Start rc7.d/S38nut up from S15 [SME: 3592] |
58 |
|
59 |
* Fri Nov 30 2007 Gavin Weight <gweight@gmail.com> 1.2.0-16 |
60 |
- Fix use of uninitialized value in nutModel migrate. [SME: 3597] |
61 |
|
62 |
* Sun Oct 7 2007 Shad L. Lords <slords@mail.com> 1.2.0-15 |
63 |
- Fix ups model for new version of nut [SME: 3457] |
64 |
|
65 |
* Sun Jun 3 2007 Stephen Noble <support@dungog.net> 1.2.0-14 |
66 |
- Fix mfr & mdl options in ups.conf [SME: 2791] |
67 |
|
68 |
* Fri Jun 1 2007 Stephen Noble <support@dungog.net> 1.2.0-13 |
69 |
- Add mfr & mdl options to ups.conf [SME: 2791] |
70 |
|
71 |
* Fri Jun 1 2007 Stephen Noble <support@dungog.net> 1.2.0-12 |
72 |
- Only use Type if model=genericups & type is defined [SME: 2748] |
73 |
|
74 |
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com> |
75 |
- Clean up spec so package can be built by koji/plague |
76 |
|
77 |
* Tue Apr 10 2007 Stephen Noble <support@dungog.net> 1.2.0-10 |
78 |
- Only use Type if model=genericups [SME: 2748] |
79 |
|
80 |
* Fri Apr 06 2007 Shad L. Lords <slords@mail.com> 1.2.0-9 |
81 |
- Fix perms on config files [SME: 2712] |
82 |
|
83 |
* Fri Jan 19 2007 Shad L. Lords <slords@mail.com> 1.2.0-8 |
84 |
- Don't expand upsd.conf in post-{install,upgrade} |
85 |
|
86 |
* Thu Jan 18 2007 Shad L. Lords <slords@mail.com> 1.2.0-7 |
87 |
- Fix password generation and simplify [SME: 2323] |
88 |
|
89 |
* Sat Jan 13 2007 Shad L. Lords <slords@mail.com> 1.2.0-6 |
90 |
- Add upstype option to ups.conf [SME: 2286] |
91 |
|
92 |
* Thu Jan 04 2007 Shad L. Lords <slords@mail.com> 1.2.0-5 |
93 |
- Actually call the notify script on ups events. [SME: 1722] |
94 |
- Allow nut to be a client to another master server. [SME: 2231] |
95 |
|
96 |
* Thu Dec 21 2006 Shad L. Lords <slords@mail.com> 1.2.0-4 |
97 |
- Make password secure for ups users |
98 |
- Allow local network to monitor ups as slaves |
99 |
- Make localhost master for ups |
100 |
- Make startup/shutdown scripts use upsdrvctl so poweroff works |
101 |
|
102 |
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com> |
103 |
- Update to new release naming. No functional changes. |
104 |
- Make Packager generic |
105 |
|
106 |
* Sun May 28 2006 Charlie Brady <charlie_brady@mitel.com> 1.2.0-02 |
107 |
- Fix perms on upsd.conf [SME: 1473] |
108 |
|
109 |
* Wed Mar 15 2006 Charlie Brady <charlie_brady@mitel.com> 1.2.0-01 |
110 |
- Roll stable stream version. [SME: 1016] |
111 |
|
112 |
* Thu Feb 2 2006 Gordon Rowell <gordonr@gormand.com.au> 1.1.0-10 |
113 |
- Added db default to match last change [SME: 26] |
114 |
|
115 |
* Thu Feb 2 2006 Charlie Brady <charlie_brady@mitel.com> 1.1.0-09 |
116 |
- Change default model from hidups to newhidups. [SME: 26] |
117 |
|
118 |
* Wed Feb 01 2006 Charlie Brady <charlie_brady@mitel.com> 1.1.0-08 |
119 |
- Ensure that device node has correct ownership. [SME: 619] |
120 |
|
121 |
* Wed Nov 30 2005 Gordon Rowell <gordonr@gormand.com.au> 1.1.0-07 |
122 |
- Bump release number only |
123 |
|
124 |
* Tue Aug 16 2005 Charlie Brady <charlieb@e-smith.com> |
125 |
- [1.1.0-06] |
126 |
- Match permissions on /etc/sysconfig/ups to those of the nut RPM. |
127 |
|
128 |
* Mon Jul 25 2005 Charlie Brady <charlieb@e-smith.com> |
129 |
- [1.1.0-05] |
130 |
- Remove unused /etc/usb/usb.usermap template fragment. |
131 |
- Add nut db entries to default configuration (Shad). |
132 |
- Add missing templates.metadata files for all templated |
133 |
files. [MN00064130] |
134 |
|
135 |
* Tue Jul 12 2005 Charlie Brady <charlieb@e-smith.com> |
136 |
- [1.1.0-04] |
137 |
- Use generic_template_expand action in place of nutUPS-conf. |
138 |
[MN00064130] |
139 |
|
140 |
* Tue Jul 12 2005 Charlie Brady <charlieb@e-smith.com> |
141 |
- [1.1.0-03] |
142 |
- Port to version 2.0 of nut (contributed by Shad Lords). |
143 |
- Change nutups user to nut to confirm with new package |
144 |
- Upgrade templates to support new 2.0 format [SF: 1226389] |
145 |
|
146 |
* Thu Aug 21 2003 Charlie Brady <charlieb@e-smith.com> |
147 |
- [1.1.0-02] |
148 |
- Replace nutUPS-conf-startup action with default db fragments. |
149 |
[charlieb 9553] |
150 |
|
151 |
* Thu Aug 21 2003 Charlie Brady <charlieb@e-smith.com> |
152 |
- [1.1.0-01] |
153 |
- Changing version to development stream number - 1.1.0 |
154 |
|
155 |
* Thu Jun 26 2003 Charlie Brady <charlieb@e-smith.com> |
156 |
- [1.0.0-01] |
157 |
- Creating stable version stream - 1.0.0 |
158 |
|
159 |
* Wed Jun 4 2003 Charlie Brady <charlieb@e-smith.com> |
160 |
- [0.0.3-06] |
161 |
- Create 'nutups' user via create-system-user. [charlieb 6033] |
162 |
|
163 |
* Fri May 9 2003 Gordon Rowell <gordonr@e-smith.com> |
164 |
- [0.0.3-05] |
165 |
- Removed depedency on e-smith-email [gordonr 8405] |
166 |
|
167 |
* Fri Apr 25 2003 Charlie Brady <charlieb@e-smith.com> |
168 |
- [0.0.3-04] |
169 |
- Change group and permissions of various configuration files, so that |
170 |
files can be reloaded by programs running non-root. This is a merge |
171 |
of Shad Lord's contributed code and my changes to use group read |
172 |
permission. [charlieb 8405] |
173 |
|
174 |
* Fri Apr 25 2003 Tony Clayton <apc@e-smith.com> |
175 |
- [0.0.3-03] |
176 |
- Don't expand rc.modules template from nutUPS-conf [tonyc 2753] |
177 |
|
178 |
* Fri Apr 25 2003 Charlie Brady <charlieb@e-smith.com> |
179 |
- [0.0.3-02] |
180 |
- Change group of nutUPS.notify script to nutups. [charlieb 8530] |
181 |
|
182 |
* Wed Apr 16 2003 Tony Clayton <apc@e-smith.com> |
183 |
- [0.0.3-01] |
184 |
- Remove /etc/rc.modules altogether [tonyc 6556] |
185 |
|
186 |
* Tue Mar 18 2003 Lijie Deng <lijied@e-smith.com> |
187 |
- [0.0.2-12] |
188 |
- Delete ./etc/rc.modules/template-begin, |
189 |
and modified %build [lijied 3295] |
190 |
|
191 |
* Thu Jan 16 2003 Tony Clayton <apc@e-smith.com> |
192 |
- [0.0.2-11] |
193 |
- fix rc.modules usb drivers again [tonyc 2753] |
194 |
|
195 |
* Mon Jan 13 2003 Tony Clayton <apc@e-smith.com> |
196 |
- [0.0.2-10] |
197 |
- fix rc.modules usb drivers to load conditionally [tonyc 2753] |
198 |
|
199 |
* Mon Jan 13 2003 Tony Clayton <apc@e-smith.com> |
200 |
- [0.0.2-09] |
201 |
- send stdout/stderr to /dev/null when loading usb modules [tonyc 2753] |
202 |
|
203 |
* Mon Jan 13 2003 Tony Clayton <apc@e-smith.com> |
204 |
- [0.0.2-08] |
205 |
- really adding usb* modules in rc.modules [tonyc 2753] |
206 |
|
207 |
* Mon Jan 13 2003 Tony Clayton <apc@e-smith.com> |
208 |
- [0.0.2-07] |
209 |
- load usb* modules in rc.modules for hidups support |
210 |
- add header to template-begin [tonyc 2753] |
211 |
|
212 |
* Fri Jan 10 2003 Tony Clayton <apc@e-smith.com> |
213 |
- [0.0.2-06] |
214 |
- fix NOTIFYFLAG entries in upsmon.conf [tonyc 2753] |
215 |
- turn off nut service by default [tonyc 2753] |
216 |
|
217 |
* Thu Dec 5 2002 Charlie Brady <charlieb@e-smith.com> |
218 |
- [0.0.2-05] |
219 |
- Move mknod of device node to %post script. It can't run in %pre, because |
220 |
the enclosing directory has not yet been pulled out of the RPM archive. |
221 |
|
222 |
* Thu Dec 5 2002 Charlie Brady <charlieb@e-smith.com> |
223 |
- [0.0.2-04] |
224 |
- Fix syntax errors in one of the upsmon.conf template fragments. |
225 |
- Add ups runtime state directory. Create hiddev device node with |
226 |
appropriate permissions inside that directory. |
227 |
|
228 |
* Wed Nov 27 2002 Charlie Brady <charlieb@e-smith.com> |
229 |
- [0.0.2-03] |
230 |
- Change configuration so that most UPS events are logged only to |
231 |
syslog, but SHUTDOWN is done using "signal-event". Response |
232 |
to UPS events can be tuned via config DB entries. |
233 |
|
234 |
* Tue Nov 19 2002 Charlie Brady <charlieb@e-smith.com> |
235 |
- [0.0.2-02] |
236 |
- Add /etc/rc.d/init.d/nut symlink so that service starts up. |
237 |
- Fix up a few broken templates. |
238 |
|
239 |
* Mon Nov 18 2002 Charlie Brady <charlieb@e-smith.com> |
240 |
- [0.0.2-01] |
241 |
- Initial |
242 |
|
243 |
%prep |
244 |
%setup |
245 |
%patch0 -p1 |
246 |
%patch1 -p1 |
247 |
|
248 |
%build |
249 |
perl createlinks |
250 |
|
251 |
%install |
252 |
rm -rf $RPM_BUILD_ROOT |
253 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
254 |
rm -f %{name}-%{version}-%{release}-filelist |
255 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
256 |
| sed -e '/nutUPS.notify/s/root,root/root,nut/' \ |
257 |
> %{name}-%{version}-%{release}-filelist |
258 |
echo '%dir %attr(750,nut,nut) /var/lib/ups' \ |
259 |
>> %{name}-%{version}-%{release}-filelist |
260 |
echo '%ghost %attr(640,nut,nut) /var/lib/ups/hiddev0' \ |
261 |
>> %{name}-%{version}-%{release}-filelist |
262 |
mkdir -p $RPM_BUILD_ROOT/var/lib/ups/ |
263 |
touch $RPM_BUILD_ROOT/var/lib/ups/hiddev0 |
264 |
|
265 |
%pre |
266 |
/sbin/e-smith/create-system-user nut 57 'NUT UPS user' /var/lib/ups /bin/false |
267 |
|
268 |
%post |
269 |
if [ \! -e /var/lib/ups/hiddev0 ] |
270 |
then |
271 |
mknod /var/lib/ups/hiddev0 c 180 96 |
272 |
fi |
273 |
chown nut.nut /var/lib/ups/hiddev0 |
274 |
|
275 |
%clean |
276 |
rm -rf $RPM_BUILD_ROOT |
277 |
|
278 |
%files -f %{name}-%{version}-%{release}-filelist |
279 |
%defattr(-,root,root) |