Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-power/nut/, sys-power/nut/files/
Date: Sat, 27 Oct 2018 22:10:49
Message-Id: 1540678018.b3f86ee8839870abdb3a0973e02ecaf0efac8033.asturm@gentoo
1 commit: b3f86ee8839870abdb3a0973e02ecaf0efac8033
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 27 22:06:58 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 27 22:06:58 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3f86ee8
7
8 sys-power/nut: Drop old
9
10 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 sys-power/nut/Manifest | 3 -
14 sys-power/nut/files/nut-2.4.1-no-libdummy.patch | 18 -
15 sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch | 21 -
16 sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch | 448 ----------------------
17 sys-power/nut/files/nut-2.7.1-fix-scanning.patch | 72 ----
18 sys-power/nut/nut-2.6.5-r1.ebuild | 231 -----------
19 sys-power/nut/nut-2.7.2-r2.ebuild | 274 -------------
20 sys-power/nut/nut-2.7.3.ebuild | 269 -------------
21 sys-power/nut/nut-2.7.4-r1.ebuild | 3 -
22 sys-power/nut/nut-2.7.4.ebuild | 269 -------------
23 10 files changed, 1608 deletions(-)
24
25 diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest
26 index 43fa488aacc..898249c21a8 100644
27 --- a/sys-power/nut/Manifest
28 +++ b/sys-power/nut/Manifest
29 @@ -1,4 +1 @@
30 -DIST nut-2.6.5.tar.gz 2038832 BLAKE2B 8d3c4be46809030bc98bbfd662c61ca71434b89d49455b17f226ba0902f9f240914bc276af1e809a55a0165b40e74a73dbf2df84696219a50dac8e65d35a4a8e SHA512 f1c76e6280057dc558d53451e7de2bdc7f37a0f175b1c52c27e7dcb83deeb78f6885007ad188a7a3a19e411eba87e03eb2246310bd7a5a5bb6fa3ad2bebd49d8
31 -DIST nut-2.7.2.tar.gz 2223307 BLAKE2B be19cefecab3f9324251f8b52dbb3c3ec94a05e2458f037baac07b648d8eee46fd84fb8fd1cba3ff26c0aa702cfc5582135f69a5e8a33e181cce7a08e61416f3 SHA512 7d6b44e8f2d03544d9825274f4f3039911e335eb51620ded3dc08d51aeb096281c2ec848831815c54eecd4f2a25bdb1e6e5f479422e5291f03c3055da7ba52e6
32 -DIST nut-2.7.3.tar.gz 2317478 BLAKE2B 1a795e1c545894e14c5b0d3ac49a82d399af1c3e82cda60d74f855609dcc71f4970c087be5759ee5d25e6c756b6dd2b4a8d80ee28c0f84feb358a1df08648dab SHA512 3dd978712dc0fabe7e194dbf6d7bb442c456aa4d45bfc63ede8a3acae23c66811cbcf2705b55a6739129b5f120e6f5865bcb9d19eb9080507a85e2624d5663d6
33 DIST nut-2.7.4.tar.gz 2509831 BLAKE2B 367c687efd739150898a14c700d5fddbe22bf926522923e1842011ec49b67d6638620500c4eda50291feb474cc6eef39fff63764cb3e0fad5898abee981f8308 SHA512 320c4aff85d8a370c5eff77d33924fdfc3caf6a250620693cdd5bf3336b3a80d8a207488eee841bcf8b72fbad68fda4c074e63b99c56e7886716fc934122d11a
34
35 diff --git a/sys-power/nut/files/nut-2.4.1-no-libdummy.patch b/sys-power/nut/files/nut-2.4.1-no-libdummy.patch
36 deleted file mode 100644
37 index 31a8e73e54f..00000000000
38 --- a/sys-power/nut/files/nut-2.4.1-no-libdummy.patch
39 +++ /dev/null
40 @@ -1,18 +0,0 @@
41 -diff -Nuar nut-2.4.1.orig/drivers/Makefile.am nut-2.4.1/drivers/Makefile.am
42 ---- nut-2.4.1.orig/drivers/Makefile.am 2008-07-04 20:12:38.201211819 -0700
43 -+++ nut-2.4.1/drivers/Makefile.am 2008-07-04 20:12:59.829462787 -0700
44 -@@ -211,10 +211,12 @@
45 - upscode2.h victronups.h powerpanel.h powerp-bin.h powerp-txt.h \
46 - upshandler.h netxml-ups.h mge-xml.h
47 -
48 -+EXTRA_LIBRARIES =
49 -+
50 - # Define a dummy library so that Automake builds rules for the
51 - # corresponding object files. This library is not actually built,
52 --EXTRA_LIBRARIES = libdummy.a
53 --libdummy_a_SOURCES = main.c dstate.c serial.c
54 -+#EXTRA_LIBRARIES += libdummy.a
55 -+#libdummy_a_SOURCES = main.c dstate.c serial.c
56 -
57 - # the nuthalmain library combines the code for main-hal.c and
58 - # dstate-hal.c. It is necessary for Automake-technical reasons,
59
60 diff --git a/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch b/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch
61 deleted file mode 100644
62 index 9debd3b9da3..00000000000
63 --- a/sys-power/nut/files/nut-2.6.3-CVE-2012-2944.patch
64 +++ /dev/null
65 @@ -1,21 +0,0 @@
66 -Origin: http://trac.networkupstools.org/projects/nut/changeset/3633
67 -Description: Fix CVE-2012-2944: upsd can be remotely crashed
68 -
69 -Index: nut-2.6.3/common/parseconf.c
70 -===================================================================
71 ---- nut-2.6.3.orig/common/parseconf.c 2011-10-04 02:06:25.000000000 -0500
72 -+++ nut-2.6.3/common/parseconf.c 2012-05-30 13:29:41.000000000 -0500
73 -@@ -171,6 +171,13 @@
74 -
75 - wbuflen = strlen(ctx->wordbuf);
76 -
77 -+ /* CVE-2012-2944: only allow the subset Ascii charset from Space to ~ */
78 -+ if ((ctx->ch < 0x20) || (ctx->ch > 0x7f)) {
79 -+ fprintf(stderr, "addchar: discarding invalid character (0x%02x)!\n",
80 -+ ctx->ch);
81 -+ return;
82 -+ }
83 -+
84 - if (ctx->wordlen_limit != 0) {
85 - if (wbuflen >= ctx->wordlen_limit) {
86 -
87
88 diff --git a/sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch b/sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch
89 deleted file mode 100644
90 index 96ac91d0a48..00000000000
91 --- a/sys-power/nut/files/nut-2.6.5-freeipmi_fru.patch
92 +++ /dev/null
93 @@ -1,448 +0,0 @@
94 -Update to 1.2.x ipmi_fru declarations.
95 -
96 -Starting with the 1.2.1 release, all of the ipmi_fru_parse* declarations (both
97 -lowercase & uppercase) were renamed to ipmi_fru*. This is a simple search &
98 -replace of all instances. Upstream should probably have a backwards compatible
99 -version that supports both variants of the names.
100 -
101 -Signed-off-by: Robin H. Johnson <robbat2@g.o>
102 -
103 -diff -Nuar nut-2.6.5.orig/drivers/nut-libfreeipmi.c nut-2.6.5/drivers/nut-libfreeipmi.c
104 ---- nut-2.6.5.orig/drivers/nut-libfreeipmi.c 2012-07-31 17:38:59.000000000 +0000
105 -+++ nut-2.6.5/drivers/nut-libfreeipmi.c 2013-08-12 17:55:03.132363518 +0000
106 -@@ -57,7 +57,7 @@
107 -
108 - /* FreeIPMI contexts and configuration*/
109 - ipmi_ctx_t ipmi_ctx = NULL;
110 --ipmi_fru_parse_ctx_t fru_parse_ctx = NULL;
111 -+ipmi_fru_ctx_t fru_parse_ctx = NULL;
112 - ipmi_monitoring_ctx_t mon_ctx = NULL;
113 - struct ipmi_monitoring_ipmi_config ipmi_config;
114 - /* SDR management API has changed with 1.1.X and later */
115 -@@ -78,7 +78,7 @@
116 -
117 - /* Support functions */
118 - static const char* libfreeipmi_getfield (uint8_t language_code,
119 -- ipmi_fru_parse_field_t *field);
120 -+ ipmi_fru_field_t *field);
121 -
122 - static void libfreeipmi_cleanup();
123 -
124 -@@ -97,7 +97,7 @@
125 - int nut_ipmi_open(int ipmi_id, IPMIDevice_t *ipmi_dev)
126 - {
127 - int ret = -1;
128 -- uint8_t areabuf[IPMI_FRU_PARSE_AREA_SIZE_MAX+1];
129 -+ uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX+1];
130 - unsigned int area_type = 0;
131 - unsigned int area_length = 0;
132 -
133 -@@ -134,26 +134,26 @@
134 - upsdebugx(1, "FreeIPMI initialized...");
135 -
136 - /* Parse FRU information */
137 -- if (!(fru_parse_ctx = ipmi_fru_parse_ctx_create (ipmi_ctx)))
138 -+ if (!(fru_parse_ctx = ipmi_fru_ctx_create (ipmi_ctx)))
139 - {
140 - libfreeipmi_cleanup();
141 -- fatal_with_errno(EXIT_FAILURE, "ipmi_fru_parse_ctx_create()");
142 -+ fatal_with_errno(EXIT_FAILURE, "ipmi_fru_ctx_create()");
143 - }
144 -
145 - /* lots of motherboards calculate checksums incorrectly */
146 -- if (ipmi_fru_parse_ctx_set_flags (fru_parse_ctx, IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS) < 0)
147 -+ if (ipmi_fru_ctx_set_flags (fru_parse_ctx, IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS) < 0)
148 - {
149 - libfreeipmi_cleanup();
150 -- fatalx(EXIT_FAILURE, "ipmi_fru_parse_ctx_set_flags: %s\n",
151 -- ipmi_fru_parse_ctx_strerror (ipmi_fru_parse_ctx_errnum (fru_parse_ctx)));
152 -+ fatalx(EXIT_FAILURE, "ipmi_fru_ctx_set_flags: %s\n",
153 -+ ipmi_fru_ctx_strerror (ipmi_fru_ctx_errnum (fru_parse_ctx)));
154 - }
155 -
156 - /* Now open the requested (local) PSU */
157 -- if (ipmi_fru_parse_open_device_id (fru_parse_ctx, ipmi_id) < 0)
158 -+ if (ipmi_fru_open_device_id (fru_parse_ctx, ipmi_id) < 0)
159 - {
160 - libfreeipmi_cleanup();
161 -- fatalx(EXIT_FAILURE, "ipmi_fru_parse_open_device_id: %s\n",
162 -- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
163 -+ fatalx(EXIT_FAILURE, "ipmi_fru_open_device_id: %s\n",
164 -+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
165 - }
166 -
167 - /* Set IPMI identifier */
168 -@@ -164,19 +164,19 @@
169 - /* clear fields */
170 - area_type = 0;
171 - area_length = 0;
172 -- memset (areabuf, '\0', IPMI_FRU_PARSE_AREA_SIZE_MAX + 1);
173 -+ memset (areabuf, '\0', IPMI_FRU_AREA_SIZE_MAX + 1);
174 -
175 - /* parse FRU buffer */
176 -- if (ipmi_fru_parse_read_data_area (fru_parse_ctx,
177 -+ if (ipmi_fru_read_data_area (fru_parse_ctx,
178 - &area_type,
179 - &area_length,
180 - areabuf,
181 -- IPMI_FRU_PARSE_AREA_SIZE_MAX) < 0)
182 -+ IPMI_FRU_AREA_SIZE_MAX) < 0)
183 - {
184 - libfreeipmi_cleanup();
185 - fatal_with_errno(EXIT_FAILURE,
186 -- "ipmi_fru_parse_open_device_id: %s\n",
187 -- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
188 -+ "ipmi_fru_open_device_id: %s\n",
189 -+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
190 - }
191 -
192 - if (area_length)
193 -@@ -184,7 +184,7 @@
194 - switch (area_type)
195 - {
196 - /* get generic board information */
197 -- case IPMI_FRU_PARSE_AREA_TYPE_BOARD_INFO_AREA:
198 -+ case IPMI_FRU_AREA_TYPE_BOARD_INFO_AREA:
199 -
200 - if(libfreeipmi_get_board_info (areabuf, area_length,
201 - ipmi_dev) < 0)
202 -@@ -193,7 +193,7 @@
203 - }
204 - break;
205 - /* get specific PSU information */
206 -- case IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION:
207 -+ case IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION:
208 -
209 - if(libfreeipmi_get_psu_info (areabuf, area_length, ipmi_dev) < 0)
210 - {
211 -@@ -205,13 +205,13 @@
212 - break;
213 - }
214 - }
215 -- } while ((ret = ipmi_fru_parse_next (fru_parse_ctx)) == 1);
216 -+ } while ((ret = ipmi_fru_next (fru_parse_ctx)) == 1);
217 -
218 - /* check for errors */
219 - if (ret < 0) {
220 - libfreeipmi_cleanup();
221 -- fatal_with_errno(EXIT_FAILURE, "ipmi_fru_parse_next: %s",
222 -- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
223 -+ fatal_with_errno(EXIT_FAILURE, "ipmi_fru_next: %s",
224 -+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
225 - }
226 - else {
227 - /* Get all related sensors information */
228 -@@ -232,25 +232,25 @@
229 - }
230 -
231 - static const char* libfreeipmi_getfield (uint8_t language_code,
232 -- ipmi_fru_parse_field_t *field)
233 -+ ipmi_fru_field_t *field)
234 - {
235 -- static char strbuf[IPMI_FRU_PARSE_AREA_STRING_MAX + 1];
236 -- unsigned int strbuflen = IPMI_FRU_PARSE_AREA_STRING_MAX;
237 -+ static char strbuf[IPMI_FRU_AREA_STRING_MAX + 1];
238 -+ unsigned int strbuflen = IPMI_FRU_AREA_STRING_MAX;
239 -
240 - if (!field->type_length_field_length)
241 - return NULL;
242 -
243 -- memset (strbuf, '\0', IPMI_FRU_PARSE_AREA_STRING_MAX + 1);
244 -+ memset (strbuf, '\0', IPMI_FRU_AREA_STRING_MAX + 1);
245 -
246 -- if (ipmi_fru_parse_type_length_field_to_string (fru_parse_ctx,
247 -+ if (ipmi_fru_type_length_field_to_string (fru_parse_ctx,
248 - field->type_length_field,
249 - field->type_length_field_length,
250 - language_code,
251 - strbuf,
252 - &strbuflen) < 0)
253 - {
254 -- upsdebugx (2, "ipmi_fru_parse_type_length_field_to_string: %s",
255 -- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
256 -+ upsdebugx (2, "ipmi_fru_type_length_field_to_string: %s",
257 -+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
258 - return NULL;
259 - }
260 -
261 -@@ -280,8 +280,8 @@
262 - {
263 - /* cleanup */
264 - if (fru_parse_ctx) {
265 -- ipmi_fru_parse_close_device_id (fru_parse_ctx);
266 -- ipmi_fru_parse_ctx_destroy (fru_parse_ctx);
267 -+ ipmi_fru_close_device_id (fru_parse_ctx);
268 -+ ipmi_fru_ctx_destroy (fru_parse_ctx);
269 - }
270 -
271 - #ifdef HAVE_FREEIPMI_11X_12X
272 -@@ -342,7 +342,7 @@
273 -
274 - upsdebugx(1, "entering libfreeipmi_get_psu_info()");
275 -
276 -- if (ipmi_fru_parse_multirecord_power_supply_information (fru_parse_ctx,
277 -+ if (ipmi_fru_multirecord_power_supply_information (fru_parse_ctx,
278 - areabuf,
279 - area_length,
280 - &overall_capacity,
281 -@@ -368,8 +368,8 @@
282 - &total_combined_wattage,
283 - &predictive_fail_tachometer_lower_threshold) < 0)
284 - {
285 -- fatalx(EXIT_FAILURE, "ipmi_fru_parse_multirecord_power_supply_information: %s",
286 -- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
287 -+ fatalx(EXIT_FAILURE, "ipmi_fru_multirecord_power_supply_information: %s",
288 -+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
289 - }
290 -
291 - ipmi_dev->overall_capacity = overall_capacity;
292 -@@ -392,12 +392,12 @@
293 - {
294 - uint8_t language_code;
295 - uint32_t mfg_date_time;
296 -- ipmi_fru_parse_field_t board_manufacturer;
297 -- ipmi_fru_parse_field_t board_product_name;
298 -- ipmi_fru_parse_field_t board_serial_number;
299 -- ipmi_fru_parse_field_t board_part_number;
300 -- ipmi_fru_parse_field_t board_fru_file_id;
301 -- ipmi_fru_parse_field_t board_custom_fields[IPMI_FRU_CUSTOM_FIELDS];
302 -+ ipmi_fru_field_t board_manufacturer;
303 -+ ipmi_fru_field_t board_product_name;
304 -+ ipmi_fru_field_t board_serial_number;
305 -+ ipmi_fru_field_t board_part_number;
306 -+ ipmi_fru_field_t board_fru_file_id;
307 -+ ipmi_fru_field_t board_custom_fields[IPMI_FRU_CUSTOM_FIELDS];
308 - const char *string = NULL;
309 - time_t timetmp;
310 - struct tm mfg_date_time_tm;
311 -@@ -406,15 +406,15 @@
312 - upsdebugx(1, "entering libfreeipmi_get_board_info()");
313 -
314 - /* clear fields */
315 -- memset (&board_manufacturer, '\0', sizeof (ipmi_fru_parse_field_t));
316 -- memset (&board_product_name, '\0', sizeof (ipmi_fru_parse_field_t));
317 -- memset (&board_serial_number, '\0', sizeof (ipmi_fru_parse_field_t));
318 -- memset (&board_fru_file_id, '\0', sizeof (ipmi_fru_parse_field_t));
319 -+ memset (&board_manufacturer, '\0', sizeof (ipmi_fru_field_t));
320 -+ memset (&board_product_name, '\0', sizeof (ipmi_fru_field_t));
321 -+ memset (&board_serial_number, '\0', sizeof (ipmi_fru_field_t));
322 -+ memset (&board_fru_file_id, '\0', sizeof (ipmi_fru_field_t));
323 - memset (&board_custom_fields[0], '\0',
324 -- sizeof (ipmi_fru_parse_field_t) * IPMI_FRU_CUSTOM_FIELDS);
325 -+ sizeof (ipmi_fru_field_t) * IPMI_FRU_CUSTOM_FIELDS);
326 -
327 - /* parse FRU buffer */
328 -- if (ipmi_fru_parse_board_info_area (fru_parse_ctx,
329 -+ if (ipmi_fru_board_info_area (fru_parse_ctx,
330 - areabuf,
331 - area_length,
332 - &language_code,
333 -@@ -428,8 +428,8 @@
334 - IPMI_FRU_CUSTOM_FIELDS) < 0)
335 - {
336 - libfreeipmi_cleanup();
337 -- fatalx(EXIT_FAILURE, "ipmi_fru_parse_board_info_area: %s",
338 -- ipmi_fru_parse_ctx_errormsg (fru_parse_ctx));
339 -+ fatalx(EXIT_FAILURE, "ipmi_fru_board_info_area: %s",
340 -+ ipmi_fru_ctx_errormsg (fru_parse_ctx));
341 - }
342 -
343 -
344 -diff -Nuar nut-2.6.5.orig/m4/nut_check_libfreeipmi.m4 nut-2.6.5/m4/nut_check_libfreeipmi.m4
345 ---- nut-2.6.5.orig/m4/nut_check_libfreeipmi.m4 2012-07-31 17:38:56.000000000 +0000
346 -+++ nut-2.6.5/m4/nut_check_libfreeipmi.m4 2013-08-12 17:55:03.132363518 +0000
347 -@@ -66,7 +66,7 @@
348 - dnl when version cannot be tested (prior to 1.0.5, with no pkg-config)
349 - dnl we have to check for some specific functions
350 - AC_SEARCH_LIBS([ipmi_ctx_find_inband], [freeipmi], [], [nut_have_freeipmi=no])
351 -- AC_SEARCH_LIBS([ipmi_fru_parse_ctx_create], [freeipmi], [], [nut_have_freeipmi=no])
352 -+ AC_SEARCH_LIBS([ipmi_fru_ctx_create], [freeipmi], [], [nut_have_freeipmi=no])
353 -
354 - AC_SEARCH_LIBS([ipmi_monitoring_init], [ipmimonitoring], [nut_have_freeipmi_monitoring=yes], [nut_have_freeipmi_monitoring=no])
355 - AC_SEARCH_LIBS([ipmi_monitoring_sensor_read_record_id], [ipmimonitoring], [], [nut_have_freeipmi_monitoring=no])
356 -diff -Nuar nut-2.6.5.orig/tools/nut-scanner/scan_ipmi.c nut-2.6.5/tools/nut-scanner/scan_ipmi.c
357 ---- nut-2.6.5.orig/tools/nut-scanner/scan_ipmi.c 2012-07-31 17:38:58.000000000 +0000
358 -+++ nut-2.6.5/tools/nut-scanner/scan_ipmi.c 2013-08-12 17:55:03.132363518 +0000
359 -@@ -34,24 +34,24 @@
360 - static lt_dlhandle dl_handle = NULL;
361 - static const char *dl_error = NULL;
362 -
363 --static int (*nut_ipmi_fru_parse_close_device_id) (ipmi_fru_parse_ctx_t ctx);
364 --static void (*nut_ipmi_fru_parse_ctx_destroy) (ipmi_fru_parse_ctx_t ctx);
365 -+static int (*nut_ipmi_fru_close_device_id) (ipmi_fru_ctx_t ctx);
366 -+static void (*nut_ipmi_fru_ctx_destroy) (ipmi_fru_ctx_t ctx);
367 - #ifdef HAVE_FREEIPMI_11X_12X
368 - static void (*nut_ipmi_sdr_ctx_destroy) (ipmi_sdr_ctx_t ctx);
369 - #else /* HAVE_FREEIPMI_11X_12X */
370 - static void (*nut_ipmi_sdr_cache_ctx_destroy) (ipmi_sdr_cache_ctx_t ctx);
371 - static void (*nut_ipmi_sdr_parse_ctx_destroy) (ipmi_sdr_parse_ctx_t ctx);
372 - #endif /* HAVE_FREEIPMI_11X_12X */
373 --static ipmi_fru_parse_ctx_t (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx_t ipmi_ctx);
374 --static int (*nut_ipmi_fru_parse_ctx_set_flags) (ipmi_fru_parse_ctx_t ctx, unsigned int flags);
375 --static int (*nut_ipmi_fru_parse_open_device_id) (ipmi_fru_parse_ctx_t ctx, uint8_t fru_device_id);
376 --static char * (*nut_ipmi_fru_parse_ctx_errormsg) (ipmi_fru_parse_ctx_t ctx);
377 --static int (*nut_ipmi_fru_parse_read_data_area) (ipmi_fru_parse_ctx_t ctx,
378 -+static ipmi_fru_ctx_t (*nut_ipmi_fru_ctx_create) (ipmi_ctx_t ipmi_ctx);
379 -+static int (*nut_ipmi_fru_ctx_set_flags) (ipmi_fru_ctx_t ctx, unsigned int flags);
380 -+static int (*nut_ipmi_fru_open_device_id) (ipmi_fru_ctx_t ctx, uint8_t fru_device_id);
381 -+static char * (*nut_ipmi_fru_ctx_errormsg) (ipmi_fru_ctx_t ctx);
382 -+static int (*nut_ipmi_fru_read_data_area) (ipmi_fru_ctx_t ctx,
383 - unsigned int *area_type,
384 - unsigned int *area_length,
385 - void *areabuf,
386 - unsigned int areabuflen);
387 --static int (*nut_ipmi_fru_parse_next) (ipmi_fru_parse_ctx_t ctx);
388 -+static int (*nut_ipmi_fru_next) (ipmi_fru_ctx_t ctx);
389 - static ipmi_ctx_t (*nut_ipmi_ctx_create) (void);
390 - static int (*nut_ipmi_ctx_find_inband) (ipmi_ctx_t ctx,
391 - ipmi_driver_type_t *driver_type,
392 -@@ -92,12 +92,12 @@
393 - /* Clear any existing error */
394 - lt_dlerror();
395 -
396 -- *(void **) (&nut_ipmi_fru_parse_close_device_id) = lt_dlsym(dl_handle, "ipmi_fru_parse_close_device_id");
397 -+ *(void **) (&nut_ipmi_fru_close_device_id) = lt_dlsym(dl_handle, "ipmi_fru_close_device_id");
398 - if ((dl_error = lt_dlerror()) != NULL) {
399 - goto err;
400 - }
401 -
402 -- *(void **) (&nut_ipmi_fru_parse_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_destroy");
403 -+ *(void **) (&nut_ipmi_fru_ctx_destroy) = lt_dlsym(dl_handle, "ipmi_fru_ctx_destroy");
404 - if ((dl_error = lt_dlerror()) != NULL) {
405 - goto err;
406 - }
407 -@@ -122,32 +122,32 @@
408 - }
409 - #endif /* HAVE_FREEIPMI_11X_12X */
410 -
411 -- *(void **) (&nut_ipmi_fru_parse_ctx_create) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_create");
412 -+ *(void **) (&nut_ipmi_fru_ctx_create) = lt_dlsym(dl_handle, "ipmi_fru_ctx_create");
413 - if ((dl_error = lt_dlerror()) != NULL) {
414 - goto err;
415 - }
416 -
417 -- *(void **) (&nut_ipmi_fru_parse_ctx_set_flags) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_set_flags");
418 -+ *(void **) (&nut_ipmi_fru_ctx_set_flags) = lt_dlsym(dl_handle, "ipmi_fru_ctx_set_flags");
419 - if ((dl_error = lt_dlerror()) != NULL) {
420 - goto err;
421 - }
422 -
423 -- *(void **) (&nut_ipmi_fru_parse_open_device_id) = lt_dlsym(dl_handle, "ipmi_fru_parse_open_device_id");
424 -+ *(void **) (&nut_ipmi_fru_open_device_id) = lt_dlsym(dl_handle, "ipmi_fru_open_device_id");
425 - if ((dl_error = lt_dlerror()) != NULL) {
426 - goto err;
427 - }
428 -
429 -- *(void **) (&nut_ipmi_fru_parse_ctx_errormsg) = lt_dlsym(dl_handle, "ipmi_fru_parse_ctx_errormsg");
430 -+ *(void **) (&nut_ipmi_fru_ctx_errormsg) = lt_dlsym(dl_handle, "ipmi_fru_ctx_errormsg");
431 - if ((dl_error = lt_dlerror()) != NULL) {
432 - goto err;
433 - }
434 -
435 -- *(void **) (&nut_ipmi_fru_parse_read_data_area) = lt_dlsym(dl_handle, "ipmi_fru_parse_read_data_area");
436 -+ *(void **) (&nut_ipmi_fru_read_data_area) = lt_dlsym(dl_handle, "ipmi_fru_read_data_area");
437 - if ((dl_error = lt_dlerror()) != NULL) {
438 - goto err;
439 - }
440 -
441 -- *(void **) (&nut_ipmi_fru_parse_next) = lt_dlsym(dl_handle, "ipmi_fru_parse_next");
442 -+ *(void **) (&nut_ipmi_fru_next) = lt_dlsym(dl_handle, "ipmi_fru_next");
443 - if ((dl_error = lt_dlerror()) != NULL) {
444 - goto err;
445 - }
446 -@@ -188,17 +188,17 @@
447 -
448 - /* Cleanup IPMI contexts */
449 - #ifdef HAVE_FREEIPMI_11X_12X
450 --static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx,
451 -+static void nut_freeipmi_cleanup(ipmi_fru_ctx_t fru_parse_ctx,
452 - ipmi_sdr_ctx_t sdr_ctx)
453 - #else /* HAVE_FREEIPMI_11X_12X */
454 --static void nut_freeipmi_cleanup(ipmi_fru_parse_ctx_t fru_parse_ctx,
455 -+static void nut_freeipmi_cleanup(ipmi_fru_ctx_t fru_parse_ctx,
456 - ipmi_sdr_cache_ctx_t sdr_cache_ctx,
457 - ipmi_sdr_parse_ctx_t sdr_parse_ctx)
458 - #endif /* HAVE_FREEIPMI_11X_12X */
459 - {
460 - if (fru_parse_ctx) {
461 -- (*nut_ipmi_fru_parse_close_device_id) (fru_parse_ctx);
462 -- (*nut_ipmi_fru_parse_ctx_destroy) (fru_parse_ctx);
463 -+ (*nut_ipmi_fru_close_device_id) (fru_parse_ctx);
464 -+ (*nut_ipmi_fru_ctx_destroy) (fru_parse_ctx);
465 - }
466 -
467 - #ifdef HAVE_FREEIPMI_11X_12X
468 -@@ -226,8 +226,8 @@
469 - int ret = -1;
470 - unsigned int area_type = 0;
471 - unsigned int area_length = 0;
472 -- uint8_t areabuf[IPMI_FRU_PARSE_AREA_SIZE_MAX+1];
473 -- ipmi_fru_parse_ctx_t fru_parse_ctx = NULL;
474 -+ uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX+1];
475 -+ ipmi_fru_ctx_t fru_parse_ctx = NULL;
476 - #ifdef HAVE_FREEIPMI_11X_12X
477 - ipmi_sdr_ctx_t sdr_ctx = NULL;
478 - #else /* HAVE_FREEIPMI_11X_12X */
479 -@@ -236,14 +236,14 @@
480 - #endif /* HAVE_FREEIPMI_11X_12X */
481 -
482 - /* Parse FRU information */
483 -- if (!(fru_parse_ctx = (*nut_ipmi_fru_parse_ctx_create) (ipmi_ctx)))
484 -+ if (!(fru_parse_ctx = (*nut_ipmi_fru_ctx_create) (ipmi_ctx)))
485 - {
486 -- fprintf(stderr, "ipmi_fru_parse_ctx_create()\n");
487 -+ fprintf(stderr, "ipmi_fru_ctx_create()\n");
488 - return 0;
489 - }
490 -
491 - /* lots of motherboards calculate checksums incorrectly */
492 -- if ((*nut_ipmi_fru_parse_ctx_set_flags) (fru_parse_ctx, IPMI_FRU_PARSE_FLAGS_SKIP_CHECKSUM_CHECKS) < 0)
493 -+ if ((*nut_ipmi_fru_ctx_set_flags) (fru_parse_ctx, IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS) < 0)
494 - {
495 - #ifdef HAVE_FREEIPMI_11X_12X
496 - nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx);
497 -@@ -253,7 +253,7 @@
498 - return 0;
499 - }
500 -
501 -- if ((*nut_ipmi_fru_parse_open_device_id) (fru_parse_ctx, ipmi_id) < 0)
502 -+ if ((*nut_ipmi_fru_open_device_id) (fru_parse_ctx, ipmi_id) < 0)
503 - {
504 - #ifdef HAVE_FREEIPMI_11X_12X
505 - nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx);
506 -@@ -268,14 +268,14 @@
507 - /* clear fields */
508 - area_type = 0;
509 - area_length = 0;
510 -- memset (areabuf, '\0', IPMI_FRU_PARSE_AREA_SIZE_MAX + 1);
511 -+ memset (areabuf, '\0', IPMI_FRU_AREA_SIZE_MAX + 1);
512 -
513 - /* parse FRU buffer */
514 -- if ((*nut_ipmi_fru_parse_read_data_area) (fru_parse_ctx,
515 -+ if ((*nut_ipmi_fru_read_data_area) (fru_parse_ctx,
516 - &area_type,
517 - &area_length,
518 - areabuf,
519 -- IPMI_FRU_PARSE_AREA_SIZE_MAX) < 0)
520 -+ IPMI_FRU_AREA_SIZE_MAX) < 0)
521 - {
522 - #ifdef HAVE_FREEIPMI_11X_12X
523 - nut_freeipmi_cleanup(fru_parse_ctx, sdr_ctx);
524 -@@ -287,7 +287,7 @@
525 -
526 - if (area_length)
527 - {
528 -- if (area_type == IPMI_FRU_PARSE_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION)
529 -+ if (area_type == IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION)
530 - {
531 - /* Found a POWER_SUPPLY record */
532 - #ifdef HAVE_FREEIPMI_11X_12X
533 -@@ -298,7 +298,7 @@
534 - return 1;
535 - }
536 - }
537 -- } while ((ret = (*nut_ipmi_fru_parse_next) (fru_parse_ctx)) == 1);
538 -+ } while ((ret = (*nut_ipmi_fru_next) (fru_parse_ctx)) == 1);
539 -
540 - /* No need for further errors checking */
541 - #ifdef HAVE_FREEIPMI_11X_12X
542
543 diff --git a/sys-power/nut/files/nut-2.7.1-fix-scanning.patch b/sys-power/nut/files/nut-2.7.1-fix-scanning.patch
544 deleted file mode 100644
545 index 6ef5e681ba9..00000000000
546 --- a/sys-power/nut/files/nut-2.7.1-fix-scanning.patch
547 +++ /dev/null
548 @@ -1,72 +0,0 @@
549 -Search for correct libusb in testing.
550 -
551 -There may be many libusb libraries on a system, and we need to iterate until we
552 -find the correct one.
553 -
554 -Signed-off-by: Robin H. Johnson <robbat2@g.o>
555 -
556 -diff -Nuar --exclude .libs --exclude '*.o' --exclude core nut-2.7.1.orig/tools/nut-scanner/scan_usb.c nut-2.7.1/tools/nut-scanner/scan_usb.c
557 ---- nut-2.7.1.orig/tools/nut-scanner/scan_usb.c 2014-01-04 18:38:22.496816444 -0800
558 -+++ nut-2.7.1/tools/nut-scanner/scan_usb.c 2014-01-04 19:05:04.598647935 -0800
559 -@@ -28,7 +28,7 @@
560 - #include <ltdl.h>
561 -
562 - /* dynamic link library stuff */
563 --static char * libname = "libusb";
564 -+static char * libname = "libusb-0.1";
565 - static lt_dlhandle dl_handle = NULL;
566 - static const char *dl_error = NULL;
567 - static int (*nut_usb_close)(usb_dev_handle *dev);
568 -@@ -41,6 +41,8 @@
569 - static usb_dev_handle * (*nut_usb_open)(struct usb_device *dev);
570 - static int (*nut_usb_find_devices)(void);
571 -
572 -+int nutscan_test_usb_library(const char*,void*);
573 -+
574 - /* return 0 on error */
575 - int nutscan_load_usb_library()
576 - {
577 -@@ -58,6 +60,22 @@
578 - return 0;
579 - }
580 -
581 -+ int ret = lt_dlforeachfile(NULL, nutscan_test_usb_library, libname);
582 -+ if(ret == 0) {
583 -+ dl_handle = (void *)1;
584 -+ lt_dlexit();
585 -+ }
586 -+
587 -+ return ret;
588 -+}
589 -+
590 -+int nutscan_test_usb_library(const char *filename, void* data) {
591 -+ char prefix[64];
592 -+ char *libname = (char*) data;
593 -+ sprintf(prefix, "/%s", libname);
594 -+ if(strstr(filename, prefix) == NULL)
595 -+ return 0;
596 -+
597 -- dl_handle = lt_dlopenext(libname);
598 -+ dl_handle = lt_dlopenext(filename);
599 - if (!dl_handle) {
600 - dl_error = lt_dlerror();
601 - goto err;
602 -@@ -100,16 +118,15 @@
603 - goto err;
604 - }
605 -
606 - *(void **)(&nut_usb_find_devices) = lt_dlsym(dl_handle,"usb_find_devices");
607 - if ((dl_error = lt_dlerror()) != NULL) {
608 - goto err;
609 - }
610 -
611 -+ fprintf(stderr, "Loaded USB library (%s from %s) : USB search enabled.\n", libname, filename);
612 - return 1;
613 - err:
614 -- fprintf(stderr, "Cannot load USB library (%s) : %s. USB search disabled.\n", libname, dl_error);
615 -- dl_handle = (void *)1;
616 -- lt_dlexit();
617 -+ fprintf(stderr, "Cannot load USB library (%s from %s) : %s. USB search disabled.\n", libname, filename, dl_error);
618 - return 0;
619 - }
620 - /* end of dynamic link library stuff */
621
622 diff --git a/sys-power/nut/nut-2.6.5-r1.ebuild b/sys-power/nut/nut-2.6.5-r1.ebuild
623 deleted file mode 100644
624 index 02735da8d6b..00000000000
625 --- a/sys-power/nut/nut-2.6.5-r1.ebuild
626 +++ /dev/null
627 @@ -1,231 +0,0 @@
628 -# Copyright 1999-2014 Gentoo Foundation
629 -# Distributed under the terms of the GNU General Public License v2
630 -
631 -EAPI=5
632 -inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd
633 -
634 -MY_P=${P/_/-}
635 -
636 -DESCRIPTION="Network-UPS Tools"
637 -HOMEPAGE="http://www.networkupstools.org/"
638 -# Nut mirrors are presently broken
639 -SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz
640 - http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
641 -
642 -LICENSE="GPL-2"
643 -SLOT="0"
644 -KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd"
645 -IUSE="avahi cgi ipmi snmp usb selinux ssl tcpd xml"
646 -
647 -CDEPEND="avahi? ( net-dns/avahi )
648 - cgi? ( >=media-libs/gd-2[png] )
649 - snmp? ( net-analyzer/net-snmp )
650 - usb? ( virtual/libusb:0 )
651 - ssl? ( >=dev-libs/openssl-1 )
652 - tcpd? ( sys-apps/tcp-wrappers )
653 - xml? ( >=net-libs/neon-0.25.0 )
654 - ipmi? ( sys-libs/freeipmi )
655 - virtual/udev"
656 -DEPEND="$CDEPEND
657 - >=sys-apps/sed-4
658 - virtual/pkgconfig"
659 -RDEPEND="${CDEPEND}
660 - selinux? ( sec-policy/selinux-nut )
661 -"
662 -
663 -S=${WORKDIR}/${MY_P}
664 -
665 -# public files should be 644 root:root
666 -NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf"
667 -# private files should be 640 root:nut - readable by nut, writeable by root,
668 -NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
669 -# public files should be 644 root:root, only installed if USE=cgi
670 -NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}"
671 -
672 -pkg_setup() {
673 - enewgroup nut 84
674 - enewuser nut 84 -1 /var/lib/nut nut,uucp
675 - # As of udev-104, NUT must be in uucp and NOT in tty.
676 - gpasswd -d nut tty 2>/dev/null
677 - gpasswd -a nut uucp 2>/dev/null
678 - # in some cases on old systems it wasn't in the nut group either!
679 - gpasswd -a nut nut 2>/dev/null
680 - warningmsg ewarn
681 -}
682 -
683 -src_prepare() {
684 - ht_fix_file configure.in
685 -
686 - epatch "${FILESDIR}"/${PN}-2.4.1-no-libdummy.patch
687 - epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
688 - #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
689 - epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
690 -
691 - sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
692 - -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \
693 - -i configure.in || die
694 -
695 - sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
696 - -i scripts/udev/Makefile.am || die
697 -
698 - rm -f ltmain.sh m4/lt* m4/libtool.m4
699 -
700 - sed -i \
701 - -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \
702 - lib/libupsclient{.pc,-config}.in || die #361685
703 -
704 - eautoreconf
705 -}
706 -
707 -src_configure() {
708 - local myconf
709 -
710 - if [ -n "${NUT_DRIVERS}" ]; then
711 - myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}"
712 - fi
713 -
714 - use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi"
715 -
716 - # TODO: USE flag for sys-power/powerman
717 - econf \
718 - --sysconfdir=/etc/nut \
719 - --datarootdir=/usr/share/nut \
720 - --datadir=/usr/share/nut \
721 - --disable-static \
722 - --with-statepath=/var/lib/nut \
723 - --with-drvpath=/$(get_libdir)/nut \
724 - --with-htmlpath=/usr/share/nut/html \
725 - --with-user=nut \
726 - --with-group=nut \
727 - --with-logfacility=LOG_DAEMON \
728 - --with-dev \
729 - --with-serial \
730 - --without-hal \
731 - --without-powerman \
732 - $(use_with avahi) \
733 - $(use_with cgi) \
734 - $(use_with ipmi) \
735 - $(use_with ipmi freeipmi) \
736 - $(use_with snmp) \
737 - $(use_with ssl) \
738 - $(use_with tcpd wrap) \
739 - $(use_with usb) \
740 - $(use_with xml neon) \
741 - $(systemd_with_unitdir) \
742 - ${myconf}
743 -}
744 -
745 -src_install() {
746 - emake DESTDIR="${D}" install || die
747 -
748 - find "${D}" -name '*.la' -exec rm -f {} +
749 -
750 - dodir /sbin
751 - dosym /$(get_libdir)/nut/upsdrvctl /sbin/upsdrvctl
752 - # This needs to exist for the scripts
753 - dosym /$(get_libdir)/nut/upsdrvctl /usr/sbin/upsdrvctl
754 -
755 - if use cgi; then
756 - elog "CGI monitoring scripts are installed in /usr/share/nut/cgi."
757 - elog "copy them to your web server's ScriptPath to activate (this is a"
758 - elog "change from the old location)."
759 - elog "If you use lighttpd, see lighttpd_nut.conf in the documentation."
760 - fi
761 -
762 - # this must be done after all of the install phases
763 - for i in "${D}"/etc/nut/*.sample ; do
764 - mv "${i}" "${i/.sample/}"
765 - done
766 -
767 - dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die
768 -
769 - newdoc lib/README README.lib || die
770 - newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die
771 -
772 - docinto cables
773 - dodoc docs/cables/* || die
774 -
775 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die
776 - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
777 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die
778 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die
779 - newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
780 -
781 - keepdir /var/lib/nut
782 -
783 - einfo "Setting up permissions on files and directories"
784 - fperms 0700 /var/lib/nut
785 - fowners nut:nut /var/lib/nut
786 -
787 - # Do not remove eval here, because the variables contain shell expansions.
788 - eval fperms 0640 ${NUT_PRIVATE_FILES}
789 - eval fowners root:nut ${NUT_PRIVATE_FILES}
790 -
791 - # Do not remove eval here, because the variables contain shell expansions.
792 - eval fperms 0644 ${NUT_PUBLIC_FILES}
793 - eval fowners root:root ${NUT_PUBLIC_FILES}
794 -
795 - # Do not remove eval here, because the variables contain shell expansions.
796 - if use cgi; then
797 - eval fperms 0644 ${NUT_CGI_FILES}
798 - eval fowners root:root ${NUT_CGI_FILES}
799 - fi
800 -
801 - # this is installed for 2.4 and fbsd guys
802 - if ! has_version virtual/udev; then
803 - einfo "Installing non-udev hotplug support"
804 - insinto /etc/hotplug/usb
805 - insopts -m 755
806 - doins scripts/hotplug/nut-usbups.hotplug
807 - fi
808 -
809 - dobashcomp "${S}"/scripts/misc/nut.bash_completion
810 -}
811 -
812 -pkg_postinst() {
813 - # this is to ensure that everybody that installed old versions still has
814 - # correct permissions
815 -
816 - chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null
817 - chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null
818 -
819 - # Do not remove eval here, because the variables contain shell expansions.
820 - eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
821 - eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
822 -
823 - # Do not remove eval here, because the variables contain shell expansions.
824 - eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
825 - eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
826 -
827 - # Do not remove eval here, because the variables contain shell expansions.
828 - if use cgi; then
829 - eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
830 - eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
831 - fi
832 -
833 - warningmsg elog
834 -}
835 -
836 -warningmsg() {
837 - msgfunc="$1"
838 - [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!"
839 - ${msgfunc} "Please note that NUT now runs under the 'nut' user."
840 - ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS."
841 - ${msgfunc} "However if you use a USB UPS you may need to look at the udev or"
842 - ${msgfunc} "hotplug rules that are installed, and alter them suitably."
843 - ${msgfunc} ''
844 - ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream."
845 - ${msgfunc} ''
846 - ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore."
847 - ${msgfunc} "If you have multiple UPS units, you can use their NUT names to"
848 - ${msgfunc} "have a service per UPS:"
849 - ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME"
850 - ${msgfunc} ''
851 - ${msgfunc} 'If you want apcupsd to power off your UPS when it'
852 - ${msgfunc} 'shuts down your system in a power failure, you must'
853 - ${msgfunc} 'add nut.powerfail to your shutdown runlevel:'
854 - ${msgfunc} ''
855 - ${msgfunc} 'rc-update add nut.powerfail shutdown'
856 - ${msgfunc} ''
857 -
858 -}
859
860 diff --git a/sys-power/nut/nut-2.7.2-r2.ebuild b/sys-power/nut/nut-2.7.2-r2.ebuild
861 deleted file mode 100644
862 index f787827f293..00000000000
863 --- a/sys-power/nut/nut-2.7.2-r2.ebuild
864 +++ /dev/null
865 @@ -1,274 +0,0 @@
866 -# Copyright 1999-2018 Gentoo Authors
867 -# Distributed under the terms of the GNU General Public License v2
868 -
869 -EAPI=5
870 -inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs
871 -
872 -MY_P=${P/_/-}
873 -
874 -DESCRIPTION="Network-UPS Tools"
875 -HOMEPAGE="http://www.networkupstools.org/"
876 -# Nut mirrors are presently broken
877 -SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz
878 - http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
879 -
880 -LICENSE="GPL-2"
881 -SLOT="0"
882 -KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
883 -
884 -IUSE="avahi cgi ipmi snmp +usb selinux ssl tcpd xml"
885 -CDEPEND="avahi? ( net-dns/avahi )
886 - cgi? ( >=media-libs/gd-2[png] )
887 - snmp? ( net-analyzer/net-snmp )
888 - usb? ( virtual/libusb:0 )
889 - ssl? ( >=dev-libs/openssl-1 )
890 - tcpd? ( sys-apps/tcp-wrappers )
891 - xml? ( >=net-libs/neon-0.25.0 )
892 - ipmi? ( sys-libs/freeipmi )
893 - virtual/udev"
894 -DEPEND="$CDEPEND
895 - >=sys-apps/sed-4
896 - virtual/pkgconfig"
897 -RDEPEND="${CDEPEND}
898 - selinux? ( sec-policy/selinux-nut )
899 -"
900 -
901 -S=${WORKDIR}/${MY_P}
902 -
903 -# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package
904 -SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx"
905 -SNMP_DRIVERLIST="snmp-ups"
906 -USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx"
907 -USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST}
908 -#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx"
909 -NEONXML_DRIVERLIST="netxml-ups"
910 -IPMI_DRIVERLIST="nut-ipmipsu"
911 -# Now we build from it:
912 -for name in ${SERIAL_DRIVERLIST} ; do
913 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
914 -done
915 -for name in ${USB_DRIVERLIST} ; do
916 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
917 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )"
918 -done
919 -for name in ${NEONXML_DRIVERLIST}; do
920 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
921 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )"
922 -done
923 -for name in ${SNMP_DRIVERLIST} ; do
924 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
925 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )"
926 -done
927 -for name in ${IPMI_DRIVERLIST} ; do
928 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
929 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )"
930 -done
931 -IUSE="${IUSE} ${IUSE_UPS_DRIVERS}"
932 -
933 -# public files should be 644 root:root
934 -NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf"
935 -# private files should be 640 root:nut - readable by nut, writeable by root,
936 -NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
937 -# public files should be 644 root:root, only installed if USE=cgi
938 -NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}"
939 -
940 -pkg_setup() {
941 - enewgroup nut 84
942 - enewuser nut 84 -1 /var/lib/nut nut,uucp
943 - # As of udev-104, NUT must be in uucp and NOT in tty.
944 - gpasswd -d nut tty 2>/dev/null
945 - gpasswd -a nut uucp 2>/dev/null
946 - # in some cases on old systems it wasn't in the nut group either!
947 - gpasswd -a nut nut 2>/dev/null
948 - warningmsg ewarn
949 -}
950 -
951 -src_prepare() {
952 - #ht_fix_file configure.in
953 -
954 - epatch "${FILESDIR}"/nut-2.7.2-no-libdummy.patch
955 - epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
956 - #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
957 - #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
958 - epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch
959 - epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
960 -
961 - sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
962 - -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \
963 - -i configure.ac || die
964 -
965 - sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
966 - -i scripts/udev/Makefile.am || die
967 -
968 - rm -f ltmain.sh m4/lt* m4/libtool.m4
969 -
970 - sed -i \
971 - -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \
972 - lib/libupsclient{.pc,-config}.in || die #361685
973 -
974 - # This file appears twice in the install list, and if both install rules
975 - # trigger simultaneously during parallel-make, it fails.
976 - sed -i \
977 - -e '/nodist_sysconf_DATA/s,upsmon.conf.sample,,g' \
978 - conf/Makefile.am || die
979 -
980 - eautoreconf
981 -}
982 -
983 -src_configure() {
984 - local myconf
985 - append-flags -fno-lto
986 - tc-export CC
987 - tc-export CXX
988 - tc-export AR
989 -
990 - local UPS_DRIVERS=""
991 - for u in $USE ; do
992 - u2=${u#ups_drivers_}
993 - [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}"
994 - done
995 - UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }"
996 - myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}"
997 -
998 - use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi"
999 -
1000 - # TODO: USE flag for sys-power/powerman
1001 - econf \
1002 - --sysconfdir=/etc/nut \
1003 - --datarootdir=/usr/share/nut \
1004 - --datadir=/usr/share/nut \
1005 - --disable-static \
1006 - --with-statepath=/var/lib/nut \
1007 - --with-drvpath=/$(get_libdir)/nut \
1008 - --with-htmlpath=/usr/share/nut/html \
1009 - --with-user=nut \
1010 - --with-group=nut \
1011 - --with-logfacility=LOG_DAEMON \
1012 - --with-dev \
1013 - --with-serial \
1014 - --without-powerman \
1015 - $(use_with avahi) \
1016 - $(use_with cgi) \
1017 - $(use_with ipmi) \
1018 - $(use_with ipmi freeipmi) \
1019 - $(use_with snmp) \
1020 - $(use_with ssl) \
1021 - $(use_with tcpd wrap) \
1022 - $(use_with usb) \
1023 - $(use_with xml neon) \
1024 - $(systemd_with_unitdir) \
1025 - ${myconf}
1026 -}
1027 -
1028 -src_install() {
1029 - emake DESTDIR="${D}" install || die
1030 -
1031 - find "${D}" -name '*.la' -exec rm -f {} +
1032 -
1033 - dodir /sbin
1034 - dosym /usr/sbin/upsdrvctl /sbin/upsdrvctl
1035 -
1036 - if use cgi; then
1037 - elog "CGI monitoring scripts are installed in /usr/share/nut/cgi."
1038 - elog "copy them to your web server's ScriptPath to activate (this is a"
1039 - elog "change from the old location)."
1040 - elog "If you use lighttpd, see lighttpd_nut.conf in the documentation."
1041 - fi
1042 -
1043 - # this must be done after all of the install phases
1044 - for i in "${D}"/etc/nut/*.sample ; do
1045 - mv "${i}" "${i/.sample/}"
1046 - done
1047 -
1048 - dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die
1049 -
1050 - newdoc lib/README README.lib || die
1051 - newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die
1052 -
1053 - docinto cables
1054 - dodoc docs/cables/* || die
1055 -
1056 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die
1057 - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
1058 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die
1059 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die
1060 - newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
1061 -
1062 - keepdir /var/lib/nut
1063 -
1064 - einfo "Setting up permissions on files and directories"
1065 - fperms 0700 /var/lib/nut
1066 - fowners nut:nut /var/lib/nut
1067 -
1068 - # Do not remove eval here, because the variables contain shell expansions.
1069 - eval fperms 0640 ${NUT_PRIVATE_FILES}
1070 - eval fowners root:nut ${NUT_PRIVATE_FILES}
1071 -
1072 - # Do not remove eval here, because the variables contain shell expansions.
1073 - eval fperms 0644 ${NUT_PUBLIC_FILES}
1074 - eval fowners root:root ${NUT_PUBLIC_FILES}
1075 -
1076 - # Do not remove eval here, because the variables contain shell expansions.
1077 - if use cgi; then
1078 - eval fperms 0644 ${NUT_CGI_FILES}
1079 - eval fowners root:root ${NUT_CGI_FILES}
1080 - fi
1081 -
1082 - # this is installed for 2.4 and fbsd guys
1083 - if ! has_version virtual/udev; then
1084 - einfo "Installing non-udev hotplug support"
1085 - insinto /etc/hotplug/usb
1086 - insopts -m 755
1087 - doins scripts/hotplug/nut-usbups.hotplug
1088 - fi
1089 -
1090 - dobashcomp "${S}"/scripts/misc/nut.bash_completion
1091 -}
1092 -
1093 -pkg_postinst() {
1094 - # this is to ensure that everybody that installed old versions still has
1095 - # correct permissions
1096 -
1097 - chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null
1098 - chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null
1099 -
1100 - # Do not remove eval here, because the variables contain shell expansions.
1101 - eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
1102 - eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
1103 -
1104 - # Do not remove eval here, because the variables contain shell expansions.
1105 - eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
1106 - eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
1107 -
1108 - # Do not remove eval here, because the variables contain shell expansions.
1109 - if use cgi; then
1110 - eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
1111 - eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
1112 - fi
1113 -
1114 - warningmsg elog
1115 -}
1116 -
1117 -warningmsg() {
1118 - msgfunc="$1"
1119 - [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!"
1120 - ${msgfunc} "Please note that NUT now runs under the 'nut' user."
1121 - ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS."
1122 - ${msgfunc} "However if you use a USB UPS you may need to look at the udev or"
1123 - ${msgfunc} "hotplug rules that are installed, and alter them suitably."
1124 - ${msgfunc} ''
1125 - ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream."
1126 - ${msgfunc} ''
1127 - ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore."
1128 - ${msgfunc} "If you have multiple UPS units, you can use their NUT names to"
1129 - ${msgfunc} "have a service per UPS:"
1130 - ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME"
1131 - ${msgfunc} ''
1132 - ${msgfunc} 'If you want apcupsd to power off your UPS when it'
1133 - ${msgfunc} 'shuts down your system in a power failure, you must'
1134 - ${msgfunc} 'add nut.powerfail to your shutdown runlevel:'
1135 - ${msgfunc} ''
1136 - ${msgfunc} 'rc-update add nut.powerfail shutdown'
1137 - ${msgfunc} ''
1138 -
1139 -}
1140
1141 diff --git a/sys-power/nut/nut-2.7.3.ebuild b/sys-power/nut/nut-2.7.3.ebuild
1142 deleted file mode 100644
1143 index efe9d9f33f9..00000000000
1144 --- a/sys-power/nut/nut-2.7.3.ebuild
1145 +++ /dev/null
1146 @@ -1,269 +0,0 @@
1147 -# Copyright 1999-2018 Gentoo Authors
1148 -# Distributed under the terms of the GNU General Public License v2
1149 -
1150 -EAPI=5
1151 -inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs
1152 -
1153 -MY_P=${P/_/-}
1154 -
1155 -DESCRIPTION="Network-UPS Tools"
1156 -HOMEPAGE="http://www.networkupstools.org/"
1157 -# Nut mirrors are presently broken
1158 -SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz
1159 - http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
1160 -
1161 -LICENSE="GPL-2"
1162 -SLOT="0"
1163 -KEYWORDS="amd64 arm ppc ppc64 x86 ~x86-fbsd"
1164 -
1165 -IUSE="cgi ipmi snmp +usb selinux ssl tcpd xml zeroconf"
1166 -CDEPEND="
1167 - cgi? ( >=media-libs/gd-2[png] )
1168 - snmp? ( net-analyzer/net-snmp )
1169 - usb? ( virtual/libusb:0 )
1170 - ssl? ( >=dev-libs/openssl-1 )
1171 - tcpd? ( sys-apps/tcp-wrappers )
1172 - xml? ( >=net-libs/neon-0.25.0 )
1173 - ipmi? ( sys-libs/freeipmi )
1174 - zeroconf? ( net-dns/avahi )
1175 - virtual/udev"
1176 -DEPEND="$CDEPEND
1177 - >=sys-apps/sed-4
1178 - virtual/pkgconfig"
1179 -RDEPEND="${CDEPEND}
1180 - selinux? ( sec-policy/selinux-nut )
1181 -"
1182 -
1183 -S=${WORKDIR}/${MY_P}
1184 -
1185 -# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package
1186 -SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx"
1187 -SNMP_DRIVERLIST="snmp-ups"
1188 -USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx"
1189 -USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST}
1190 -#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx"
1191 -NEONXML_DRIVERLIST="netxml-ups"
1192 -IPMI_DRIVERLIST="nut-ipmipsu"
1193 -# Now we build from it:
1194 -for name in ${SERIAL_DRIVERLIST} ; do
1195 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
1196 -done
1197 -for name in ${USB_DRIVERLIST} ; do
1198 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
1199 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )"
1200 -done
1201 -for name in ${NEONXML_DRIVERLIST}; do
1202 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
1203 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )"
1204 -done
1205 -for name in ${SNMP_DRIVERLIST} ; do
1206 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
1207 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )"
1208 -done
1209 -for name in ${IPMI_DRIVERLIST} ; do
1210 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
1211 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )"
1212 -done
1213 -IUSE="${IUSE} ${IUSE_UPS_DRIVERS}"
1214 -
1215 -# public files should be 644 root:root
1216 -NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf"
1217 -# private files should be 640 root:nut - readable by nut, writeable by root,
1218 -NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
1219 -# public files should be 644 root:root, only installed if USE=cgi
1220 -NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}"
1221 -
1222 -pkg_setup() {
1223 - enewgroup nut 84
1224 - enewuser nut 84 -1 /var/lib/nut nut,uucp
1225 - # As of udev-104, NUT must be in uucp and NOT in tty.
1226 - gpasswd -d nut tty 2>/dev/null
1227 - gpasswd -a nut uucp 2>/dev/null
1228 - # in some cases on old systems it wasn't in the nut group either!
1229 - gpasswd -a nut nut 2>/dev/null
1230 - warningmsg ewarn
1231 -}
1232 -
1233 -src_prepare() {
1234 - #ht_fix_file configure.in
1235 -
1236 - epatch "${FILESDIR}"/nut-2.7.2-no-libdummy.patch
1237 - epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
1238 - #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
1239 - #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
1240 - epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch
1241 - epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
1242 -
1243 - sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
1244 - -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \
1245 - -i configure.ac || die
1246 -
1247 - sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
1248 - -i scripts/udev/Makefile.am || die
1249 -
1250 - rm -f ltmain.sh m4/lt* m4/libtool.m4
1251 -
1252 - sed -i \
1253 - -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \
1254 - lib/libupsclient{.pc,-config}.in || die #361685
1255 -
1256 - eautoreconf
1257 -}
1258 -
1259 -src_configure() {
1260 - local myconf
1261 - append-flags -fno-lto
1262 - tc-export CC
1263 - tc-export CXX
1264 - tc-export AR
1265 -
1266 - local UPS_DRIVERS=""
1267 - for u in $USE ; do
1268 - u2=${u#ups_drivers_}
1269 - [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}"
1270 - done
1271 - UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }"
1272 - myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}"
1273 -
1274 - use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi"
1275 -
1276 - # TODO: USE flag for sys-power/powerman
1277 - econf \
1278 - --sysconfdir=/etc/nut \
1279 - --datarootdir=/usr/share/nut \
1280 - --datadir=/usr/share/nut \
1281 - --disable-static \
1282 - --with-statepath=/var/lib/nut \
1283 - --with-drvpath=/$(get_libdir)/nut \
1284 - --with-htmlpath=/usr/share/nut/html \
1285 - --with-user=nut \
1286 - --with-group=nut \
1287 - --with-logfacility=LOG_DAEMON \
1288 - --with-dev \
1289 - --with-serial \
1290 - --without-powerman \
1291 - $(use_with cgi) \
1292 - $(use_with ipmi) \
1293 - $(use_with ipmi freeipmi) \
1294 - $(use_with snmp) \
1295 - $(use_with ssl) \
1296 - $(use_with tcpd wrap) \
1297 - $(use_with usb) \
1298 - $(use_with xml neon) \
1299 - $(use_with zeroconf avahi) \
1300 - $(systemd_with_unitdir) \
1301 - ${myconf}
1302 -}
1303 -
1304 -src_install() {
1305 - emake DESTDIR="${D}" install || die
1306 -
1307 - find "${D}" -name '*.la' -exec rm -f {} +
1308 -
1309 - dodir /sbin
1310 - dosym /usr/sbin/upsdrvctl /sbin/upsdrvctl
1311 -
1312 - if use cgi; then
1313 - elog "CGI monitoring scripts are installed in /usr/share/nut/cgi."
1314 - elog "copy them to your web server's ScriptPath to activate (this is a"
1315 - elog "change from the old location)."
1316 - elog "If you use lighttpd, see lighttpd_nut.conf in the documentation."
1317 - fi
1318 -
1319 - # this must be done after all of the install phases
1320 - for i in "${D}"/etc/nut/*.sample ; do
1321 - mv "${i}" "${i/.sample/}"
1322 - done
1323 -
1324 - dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die
1325 -
1326 - newdoc lib/README README.lib || die
1327 - newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die
1328 -
1329 - docinto cables
1330 - dodoc docs/cables/* || die
1331 -
1332 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die
1333 - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
1334 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die
1335 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die
1336 - newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
1337 -
1338 - keepdir /var/lib/nut
1339 -
1340 - einfo "Setting up permissions on files and directories"
1341 - fperms 0700 /var/lib/nut
1342 - fowners nut:nut /var/lib/nut
1343 -
1344 - # Do not remove eval here, because the variables contain shell expansions.
1345 - eval fperms 0640 ${NUT_PRIVATE_FILES}
1346 - eval fowners root:nut ${NUT_PRIVATE_FILES}
1347 -
1348 - # Do not remove eval here, because the variables contain shell expansions.
1349 - eval fperms 0644 ${NUT_PUBLIC_FILES}
1350 - eval fowners root:root ${NUT_PUBLIC_FILES}
1351 -
1352 - # Do not remove eval here, because the variables contain shell expansions.
1353 - if use cgi; then
1354 - eval fperms 0644 ${NUT_CGI_FILES}
1355 - eval fowners root:root ${NUT_CGI_FILES}
1356 - fi
1357 -
1358 - # this is installed for 2.4 and fbsd guys
1359 - if ! has_version virtual/udev; then
1360 - einfo "Installing non-udev hotplug support"
1361 - insinto /etc/hotplug/usb
1362 - insopts -m 755
1363 - doins scripts/hotplug/nut-usbups.hotplug
1364 - fi
1365 -
1366 - dobashcomp "${S}"/scripts/misc/nut.bash_completion
1367 -}
1368 -
1369 -pkg_postinst() {
1370 - # this is to ensure that everybody that installed old versions still has
1371 - # correct permissions
1372 -
1373 - chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null
1374 - chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null
1375 -
1376 - # Do not remove eval here, because the variables contain shell expansions.
1377 - eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
1378 - eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
1379 -
1380 - # Do not remove eval here, because the variables contain shell expansions.
1381 - eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
1382 - eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
1383 -
1384 - # Do not remove eval here, because the variables contain shell expansions.
1385 - if use cgi; then
1386 - eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
1387 - eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
1388 - fi
1389 -
1390 - warningmsg elog
1391 -}
1392 -
1393 -warningmsg() {
1394 - msgfunc="$1"
1395 - [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!"
1396 - ${msgfunc} "Please note that NUT now runs under the 'nut' user."
1397 - ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS."
1398 - ${msgfunc} "However if you use a USB UPS you may need to look at the udev or"
1399 - ${msgfunc} "hotplug rules that are installed, and alter them suitably."
1400 - ${msgfunc} ''
1401 - ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream."
1402 - ${msgfunc} ''
1403 - ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore."
1404 - ${msgfunc} "If you have multiple UPS units, you can use their NUT names to"
1405 - ${msgfunc} "have a service per UPS:"
1406 - ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME"
1407 - ${msgfunc} ''
1408 - ${msgfunc} 'If you want apcupsd to power off your UPS when it'
1409 - ${msgfunc} 'shuts down your system in a power failure, you must'
1410 - ${msgfunc} 'add nut.powerfail to your shutdown runlevel:'
1411 - ${msgfunc} ''
1412 - ${msgfunc} 'rc-update add nut.powerfail shutdown'
1413 - ${msgfunc} ''
1414 -
1415 -}
1416
1417 diff --git a/sys-power/nut/nut-2.7.4-r1.ebuild b/sys-power/nut/nut-2.7.4-r1.ebuild
1418 index 3d3d49eec6f..ebebb9ba345 100644
1419 --- a/sys-power/nut/nut-2.7.4-r1.ebuild
1420 +++ b/sys-power/nut/nut-2.7.4-r1.ebuild
1421 @@ -90,9 +90,6 @@ src_prepare() {
1422
1423 epatch "${FILESDIR}"/nut-2.7.2-no-libdummy.patch
1424 epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
1425 - #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
1426 - #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
1427 - #epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch
1428 epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
1429
1430 sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
1431
1432 diff --git a/sys-power/nut/nut-2.7.4.ebuild b/sys-power/nut/nut-2.7.4.ebuild
1433 deleted file mode 100644
1434 index 236c60cfcba..00000000000
1435 --- a/sys-power/nut/nut-2.7.4.ebuild
1436 +++ /dev/null
1437 @@ -1,269 +0,0 @@
1438 -# Copyright 1999-2018 Gentoo Authors
1439 -# Distributed under the terms of the GNU General Public License v2
1440 -
1441 -EAPI=5
1442 -inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs
1443 -
1444 -MY_P=${P/_/-}
1445 -
1446 -DESCRIPTION="Network-UPS Tools"
1447 -HOMEPAGE="http://www.networkupstools.org/"
1448 -# Nut mirrors are presently broken
1449 -SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz
1450 - http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
1451 -
1452 -LICENSE="GPL-2"
1453 -SLOT="0"
1454 -KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
1455 -
1456 -IUSE="cgi ipmi snmp +usb selinux ssl tcpd xml zeroconf"
1457 -CDEPEND="
1458 - cgi? ( >=media-libs/gd-2[png] )
1459 - snmp? ( net-analyzer/net-snmp )
1460 - usb? ( virtual/libusb:0 )
1461 - ssl? ( >=dev-libs/openssl-1 )
1462 - tcpd? ( sys-apps/tcp-wrappers )
1463 - xml? ( >=net-libs/neon-0.25.0 )
1464 - ipmi? ( sys-libs/freeipmi )
1465 - zeroconf? ( net-dns/avahi )
1466 - virtual/udev"
1467 -DEPEND="$CDEPEND
1468 - >=sys-apps/sed-4
1469 - virtual/pkgconfig"
1470 -RDEPEND="${CDEPEND}
1471 - selinux? ( sec-policy/selinux-nut )
1472 -"
1473 -
1474 -S=${WORKDIR}/${MY_P}
1475 -
1476 -# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package
1477 -SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx"
1478 -SNMP_DRIVERLIST="snmp-ups"
1479 -USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx"
1480 -USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST}
1481 -#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx"
1482 -NEONXML_DRIVERLIST="netxml-ups"
1483 -IPMI_DRIVERLIST="nut-ipmipsu"
1484 -# Now we build from it:
1485 -for name in ${SERIAL_DRIVERLIST} ; do
1486 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
1487 -done
1488 -for name in ${USB_DRIVERLIST} ; do
1489 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
1490 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )"
1491 -done
1492 -for name in ${NEONXML_DRIVERLIST}; do
1493 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
1494 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )"
1495 -done
1496 -for name in ${SNMP_DRIVERLIST} ; do
1497 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
1498 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )"
1499 -done
1500 -for name in ${IPMI_DRIVERLIST} ; do
1501 - IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
1502 - REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )"
1503 -done
1504 -IUSE="${IUSE} ${IUSE_UPS_DRIVERS}"
1505 -
1506 -# public files should be 644 root:root
1507 -NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf"
1508 -# private files should be 640 root:nut - readable by nut, writeable by root,
1509 -NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
1510 -# public files should be 644 root:root, only installed if USE=cgi
1511 -NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}"
1512 -
1513 -pkg_setup() {
1514 - enewgroup nut 84
1515 - enewuser nut 84 -1 /var/lib/nut nut,uucp
1516 - # As of udev-104, NUT must be in uucp and NOT in tty.
1517 - gpasswd -d nut tty 2>/dev/null
1518 - gpasswd -a nut uucp 2>/dev/null
1519 - # in some cases on old systems it wasn't in the nut group either!
1520 - gpasswd -a nut nut 2>/dev/null
1521 - warningmsg ewarn
1522 -}
1523 -
1524 -src_prepare() {
1525 - #ht_fix_file configure.in
1526 -
1527 - epatch "${FILESDIR}"/nut-2.7.2-no-libdummy.patch
1528 - epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
1529 - #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
1530 - #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
1531 - #epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch
1532 - epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
1533 -
1534 - sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
1535 - -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \
1536 - -i configure.ac || die
1537 -
1538 - sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
1539 - -i scripts/udev/Makefile.am || die
1540 -
1541 - rm -f ltmain.sh m4/lt* m4/libtool.m4
1542 -
1543 - sed -i \
1544 - -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \
1545 - lib/libupsclient{.pc,-config}.in || die #361685
1546 -
1547 - eautoreconf
1548 -}
1549 -
1550 -src_configure() {
1551 - local myconf
1552 - append-flags -fno-lto
1553 - tc-export CC
1554 - tc-export CXX
1555 - tc-export AR
1556 -
1557 - local UPS_DRIVERS=""
1558 - for u in $USE ; do
1559 - u2=${u#ups_drivers_}
1560 - [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}"
1561 - done
1562 - UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }"
1563 - myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}"
1564 -
1565 - use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi"
1566 -
1567 - # TODO: USE flag for sys-power/powerman
1568 - econf \
1569 - --sysconfdir=/etc/nut \
1570 - --datarootdir=/usr/share/nut \
1571 - --datadir=/usr/share/nut \
1572 - --disable-static \
1573 - --with-statepath=/var/lib/nut \
1574 - --with-drvpath=/$(get_libdir)/nut \
1575 - --with-htmlpath=/usr/share/nut/html \
1576 - --with-user=nut \
1577 - --with-group=nut \
1578 - --with-logfacility=LOG_DAEMON \
1579 - --with-dev \
1580 - --with-serial \
1581 - --without-powerman \
1582 - $(use_with cgi) \
1583 - $(use_with ipmi) \
1584 - $(use_with ipmi freeipmi) \
1585 - $(use_with snmp) \
1586 - $(use_with ssl) \
1587 - $(use_with tcpd wrap) \
1588 - $(use_with usb) \
1589 - $(use_with xml neon) \
1590 - $(use_with zeroconf avahi) \
1591 - $(systemd_with_unitdir) \
1592 - ${myconf}
1593 -}
1594 -
1595 -src_install() {
1596 - emake DESTDIR="${D}" install || die
1597 -
1598 - find "${D}" -name '*.la' -exec rm -f {} +
1599 -
1600 - dodir /sbin
1601 - dosym /usr/sbin/upsdrvctl /sbin/upsdrvctl
1602 -
1603 - if use cgi; then
1604 - elog "CGI monitoring scripts are installed in /usr/share/nut/cgi."
1605 - elog "copy them to your web server's ScriptPath to activate (this is a"
1606 - elog "change from the old location)."
1607 - elog "If you use lighttpd, see lighttpd_nut.conf in the documentation."
1608 - fi
1609 -
1610 - # this must be done after all of the install phases
1611 - for i in "${D}"/etc/nut/*.sample ; do
1612 - mv "${i}" "${i/.sample/}"
1613 - done
1614 -
1615 - dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die
1616 -
1617 - newdoc lib/README README.lib || die
1618 - newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die
1619 -
1620 - docinto cables
1621 - dodoc docs/cables/* || die
1622 -
1623 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die
1624 - newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
1625 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die
1626 - newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die
1627 - newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
1628 -
1629 - keepdir /var/lib/nut
1630 -
1631 - einfo "Setting up permissions on files and directories"
1632 - fperms 0700 /var/lib/nut
1633 - fowners nut:nut /var/lib/nut
1634 -
1635 - # Do not remove eval here, because the variables contain shell expansions.
1636 - eval fperms 0640 ${NUT_PRIVATE_FILES}
1637 - eval fowners root:nut ${NUT_PRIVATE_FILES}
1638 -
1639 - # Do not remove eval here, because the variables contain shell expansions.
1640 - eval fperms 0644 ${NUT_PUBLIC_FILES}
1641 - eval fowners root:root ${NUT_PUBLIC_FILES}
1642 -
1643 - # Do not remove eval here, because the variables contain shell expansions.
1644 - if use cgi; then
1645 - eval fperms 0644 ${NUT_CGI_FILES}
1646 - eval fowners root:root ${NUT_CGI_FILES}
1647 - fi
1648 -
1649 - # this is installed for 2.4 and fbsd guys
1650 - if ! has_version virtual/udev; then
1651 - einfo "Installing non-udev hotplug support"
1652 - insinto /etc/hotplug/usb
1653 - insopts -m 755
1654 - doins scripts/hotplug/nut-usbups.hotplug
1655 - fi
1656 -
1657 - dobashcomp "${S}"/scripts/misc/nut.bash_completion
1658 -}
1659 -
1660 -pkg_postinst() {
1661 - # this is to ensure that everybody that installed old versions still has
1662 - # correct permissions
1663 -
1664 - chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null
1665 - chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null
1666 -
1667 - # Do not remove eval here, because the variables contain shell expansions.
1668 - eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
1669 - eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
1670 -
1671 - # Do not remove eval here, because the variables contain shell expansions.
1672 - eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
1673 - eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
1674 -
1675 - # Do not remove eval here, because the variables contain shell expansions.
1676 - if use cgi; then
1677 - eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
1678 - eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
1679 - fi
1680 -
1681 - warningmsg elog
1682 -}
1683 -
1684 -warningmsg() {
1685 - msgfunc="$1"
1686 - [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!"
1687 - ${msgfunc} "Please note that NUT now runs under the 'nut' user."
1688 - ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS."
1689 - ${msgfunc} "However if you use a USB UPS you may need to look at the udev or"
1690 - ${msgfunc} "hotplug rules that are installed, and alter them suitably."
1691 - ${msgfunc} ''
1692 - ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream."
1693 - ${msgfunc} ''
1694 - ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore."
1695 - ${msgfunc} "If you have multiple UPS units, you can use their NUT names to"
1696 - ${msgfunc} "have a service per UPS:"
1697 - ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME"
1698 - ${msgfunc} ''
1699 - ${msgfunc} 'If you want apcupsd to power off your UPS when it'
1700 - ${msgfunc} 'shuts down your system in a power failure, you must'
1701 - ${msgfunc} 'add nut.powerfail to your shutdown runlevel:'
1702 - ${msgfunc} ''
1703 - ${msgfunc} 'rc-update add nut.powerfail shutdown'
1704 - ${msgfunc} ''
1705 -
1706 -}