Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/freeipmi/files/, sys-libs/freeipmi/
Date: Fri, 04 Nov 2022 02:24:22
Message-Id: 1667528632.cb0066ceaed2332a3b7e376a31b7085d8056a802.sam@gentoo
1 commit: cb0066ceaed2332a3b7e376a31b7085d8056a802
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 4 02:21:40 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 4 02:23:52 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb0066ce
7
8 sys-libs/freeipmi: fix build w/ clang 16
9
10 Closes: https://bugs.gentoo.org/874072
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 ...c-Fix-Wimplicit-function-declaration-for-.patch | 27 ++
14 ...re.ac-Fix-detecting-sighandler_t-on-glibc.patch | 27 ++
15 ...c-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch | 331 +++++++++++++++++++++
16 .../files/freeipmi-1.6.10-header-fixes.patch | 118 ++++++++
17 sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild | 107 +++++++
18 5 files changed, 610 insertions(+)
19
20 diff --git a/sys-libs/freeipmi/files/freeipmi-1.6.10-0001-configure.ac-Fix-Wimplicit-function-declaration-for-.patch b/sys-libs/freeipmi/files/freeipmi-1.6.10-0001-configure.ac-Fix-Wimplicit-function-declaration-for-.patch
21 new file mode 100644
22 index 000000000000..8d8cfcc2ae7a
23 --- /dev/null
24 +++ b/sys-libs/freeipmi/files/freeipmi-1.6.10-0001-configure.ac-Fix-Wimplicit-function-declaration-for-.patch
25 @@ -0,0 +1,27 @@
26 +https://marc.info/?l=freeipmi-devel&m=166752785904895&w=2
27 +
28 +From 3ec9097fc558c888be9268344ea94a4caf5f7883 Mon Sep 17 00:00:00 2001
29 +From: Sam James <sam@g.o>
30 +Date: Fri, 4 Nov 2022 01:58:38 +0000
31 +Subject: [PATCH 1/3] configure.ac: Fix -Wimplicit-function-declaration for
32 + printf
33 +
34 +Clang 16 makes these errors fatal by default:
35 +```
36 +error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
37 +```
38 +
39 +printf(3) is provided by <stdio.h>, not <stdlib.h>.
40 +
41 +Signed-off-by: Sam James <sam@g.o>
42 +--- a/configure.ac
43 ++++ b/configure.ac
44 +@@ -692,7 +692,7 @@ fi
45 +
46 + AM_CONDITIONAL(WITH_FREEIPMI_ARGP, test "$have_argp" = "no")
47 +
48 +-AC_TRY_COMPILE([#include <stdlib.h>],
49 ++AC_TRY_COMPILE([#include <stdio.h>],
50 + [printf("%s\n", __FUNCTION__);],
51 + [AC_DEFINE([HAVE_FUNCTION_MACRO], [1], [Define is you have __FUNCTION__])])
52 +
53
54 diff --git a/sys-libs/freeipmi/files/freeipmi-1.6.10-0002-configure.ac-Fix-detecting-sighandler_t-on-glibc.patch b/sys-libs/freeipmi/files/freeipmi-1.6.10-0002-configure.ac-Fix-detecting-sighandler_t-on-glibc.patch
55 new file mode 100644
56 index 000000000000..4ffd569ae71d
57 --- /dev/null
58 +++ b/sys-libs/freeipmi/files/freeipmi-1.6.10-0002-configure.ac-Fix-detecting-sighandler_t-on-glibc.patch
59 @@ -0,0 +1,27 @@
60 +https://marc.info/?l=freeipmi-devel&m=166752785904895&w=2
61 +
62 +From e3f759741ffc96c92c3a97e4518b09becce622b7 Mon Sep 17 00:00:00 2001
63 +From: Sam James <sam@g.o>
64 +Date: Fri, 4 Nov 2022 02:01:51 +0000
65 +Subject: [PATCH 2/3] configure.ac: Fix detecting sighandler_t on glibc
66 +
67 +Fixes the following error/misdetection of sighandler_t:
68 +```
69 +config.log:2639:conftest.c:83:13: error: 'sighandler_t' undeclared (first use in this function); did you mean 'sa_handler'?
70 +```
71 +
72 +sighandler_t requires -D_GNU_SOURCE on glibc systems.
73 +
74 +Signed-off-by: Sam James <sam@g.o>
75 +--- a/configure.ac
76 ++++ b/configure.ac
77 +@@ -490,7 +490,8 @@ AC_CHECK_FUNCS([cbrt])
78 + AC_CHECK_FUNCS([getmsg putmsg])
79 +
80 + dnl sighandler_t apparently not defined in Apple/OS X
81 +-AC_CHECK_TYPES([sighandler_t], [], [], [[#include <signal.h>]])
82 ++AC_CHECK_TYPES([sighandler_t], [], [], [[#define _GNU_SOURCE
83 ++#include <signal.h>]])
84 +
85 + # At least on freebsd, putc_unlocked is a macro, so the standard
86 + # AC_CHECK_FUNCS doesn't work well.
87
88 diff --git a/sys-libs/freeipmi/files/freeipmi-1.6.10-0003-configure.ac-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch b/sys-libs/freeipmi/files/freeipmi-1.6.10-0003-configure.ac-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch
89 new file mode 100644
90 index 000000000000..2219ddd8719d
91 --- /dev/null
92 +++ b/sys-libs/freeipmi/files/freeipmi-1.6.10-0003-configure.ac-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch
93 @@ -0,0 +1,331 @@
94 +https://marc.info/?l=freeipmi-devel&m=166752785904895&w=2
95 +
96 +From e89f234b9032ce5b2a9477c91a25ce982e14cc63 Mon Sep 17 00:00:00 2001
97 +From: Sam James <sam@g.o>
98 +Date: Fri, 4 Nov 2022 02:05:53 +0000
99 +Subject: [PATCH 3/3] configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of
100 + appending -D_GNU_SOURCE
101 +
102 +This achieves the same effect as it'll use -D_GNU_SOURCE when possible
103 +but it ensures we never forget it in an individual Makefile.am.
104 +
105 +AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60, so we bump
106 +the requirement from 2.57->2.60. Given the comment mentions "modern
107 +autoconf and automake", we could really justify bumping this to 2.69
108 +which itself is not exactly brand new, if we want.
109 +
110 +Signed-off-by: Sam James <sam@g.o>
111 +--- a/bmc-device/Makefile.am
112 ++++ b/bmc-device/Makefile.am
113 +@@ -7,7 +7,6 @@ bmc_device_CPPFLAGS = \
114 + -I$(top_srcdir)/common/portability \
115 + -I$(top_builddir)/libfreeipmi/include \
116 + -I$(top_srcdir)/libfreeipmi/include \
117 +- -D_GNU_SOURCE \
118 + -D_REENTRANT
119 +
120 + bmc_device_LDADD = \
121 +--- a/bmc-info/Makefile.am
122 ++++ b/bmc-info/Makefile.am
123 +@@ -7,7 +7,6 @@ bmc_info_CPPFLAGS = \
124 + -I$(top_srcdir)/common/portability \
125 + -I$(top_builddir)/libfreeipmi/include \
126 + -I$(top_srcdir)/libfreeipmi/include \
127 +- -D_GNU_SOURCE \
128 + -D_REENTRANT
129 +
130 + bmc_info_LDADD = \
131 +--- a/bmc-watchdog/Makefile.am
132 ++++ b/bmc-watchdog/Makefile.am
133 +@@ -7,7 +7,6 @@ bmc_watchdog_CPPFLAGS = \
134 + -I$(top_srcdir)/common/portability \
135 + -I$(top_builddir)/libfreeipmi/include \
136 + -I$(top_srcdir)/libfreeipmi/include \
137 +- -D_GNU_SOURCE \
138 + -D_REENTRANT \
139 + -DBMC_WATCHDOG_LOCALSTATEDIR='"$(localstatedir)"'
140 +
141 +--- a/common/debugutil/Makefile.am
142 ++++ b/common/debugutil/Makefile.am
143 +@@ -5,7 +5,6 @@ libdebugutil_la_CPPFLAGS = \
144 + -I$(top_srcdir)/common/portability \
145 + -I$(top_builddir)/libfreeipmi/include \
146 + -I$(top_srcdir)/libfreeipmi/include \
147 +- -D_GNU_SOURCE \
148 + -D_REENTRANT
149 +
150 + libdebugutil_la_SOURCES = \
151 +--- a/common/miscutil/Makefile.am
152 ++++ b/common/miscutil/Makefile.am
153 +@@ -2,7 +2,6 @@ noinst_LTLIBRARIES = \
154 + libmiscutil.la
155 +
156 + libmiscutil_la_CPPFLAGS = \
157 +- -D_GNU_SOURCE \
158 + -D_REENTRANT
159 +
160 + libmiscutil_la_SOURCES = \
161 +--- a/common/parsecommon/Makefile.am
162 ++++ b/common/parsecommon/Makefile.am
163 +@@ -5,7 +5,6 @@ libparsecommon_la_CPPFLAGS = \
164 + -I$(top_srcdir)/common/portability \
165 + -I$(top_builddir)/libfreeipmi/include \
166 + -I$(top_srcdir)/libfreeipmi/include \
167 +- -D_GNU_SOURCE \
168 + -D_REENTRANT
169 +
170 + libparsecommon_la_SOURCES = \
171 +--- a/common/pingtool/Makefile.am
172 ++++ b/common/pingtool/Makefile.am
173 +@@ -6,7 +6,6 @@ libpingtool_la_CPPFLAGS = \
174 + -I$(top_srcdir)/common/toolcommon \
175 + -I$(top_builddir)/libfreeipmi/include \
176 + -I$(top_srcdir)/libfreeipmi/include \
177 +- -D_GNU_SOURCE \
178 + -D_REENTRANT
179 +
180 + libpingtool_la_SOURCES = \
181 +--- a/common/portability/Makefile.am
182 ++++ b/common/portability/Makefile.am
183 +@@ -16,7 +16,6 @@ noinst_LTLIBRARIES = \
184 + libportability.la
185 +
186 + libportability_la_CPPFLAGS = \
187 +- -D_GNU_SOURCE \
188 + -D_REENTRANT
189 +
190 + libportability_la_SOURCES = \
191 +--- a/common/toolcommon/Makefile.am
192 ++++ b/common/toolcommon/Makefile.am
193 +@@ -11,7 +11,6 @@ libtoolcommon_la_CPPFLAGS = \
194 + -I$(top_builddir)/libipmidetect \
195 + -I$(top_builddir)/libfreeipmi/include \
196 + -I$(top_srcdir)/libfreeipmi/include \
197 +- -D_GNU_SOURCE \
198 + -D_REENTRANT
199 +
200 + libtoolcommon_la_SOURCES = \
201 +--- a/configure.ac
202 ++++ b/configure.ac
203 +@@ -12,7 +12,7 @@ AC_SUBST(FREEIPMI_PACKAGE_VERSION_MINOR)
204 + AC_SUBST(FREEIPMI_PACKAGE_VERSION_PATCH)
205 +
206 + dnl We require a modern autoconf and automake
207 +-AC_PREREQ([2.57])
208 ++AC_PREREQ([2.60])
209 +
210 + AC_CONFIG_AUX_DIR([config])
211 +
212 +@@ -304,6 +304,8 @@ AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes")
213 + AC_PROG_MAKE_SET
214 + AC_PROG_LN_S
215 +
216 ++AC_USE_SYSTEM_EXTENSIONS
217 ++
218 + dnl Enable error tracing. Lower level calls will spit error messages
219 + dnl on to the console
220 + AC_ARG_ENABLE([trace],
221 +--- a/ipmi-chassis/Makefile.am
222 ++++ b/ipmi-chassis/Makefile.am
223 +@@ -7,7 +7,6 @@ ipmi_chassis_CPPFLAGS = \
224 + -I$(top_srcdir)/common/portability \
225 + -I$(top_builddir)/libfreeipmi/include \
226 + -I$(top_srcdir)/libfreeipmi/include \
227 +- -D_GNU_SOURCE \
228 + -D_REENTRANT
229 +
230 + ipmi_chassis_LDADD = \
231 +--- a/ipmi-config/Makefile.am
232 ++++ b/ipmi-config/Makefile.am
233 +@@ -13,7 +13,6 @@ ipmi_config_CPPFLAGS = \
234 + -I$(top_srcdir)/common/portability \
235 + -I$(top_builddir)/libfreeipmi/include \
236 + -I$(top_srcdir)/libfreeipmi/include \
237 +- -D_GNU_SOURCE \
238 + -D_REENTRANT
239 +
240 + ipmi_config_LDADD = \
241 +--- a/ipmi-dcmi/Makefile.am
242 ++++ b/ipmi-dcmi/Makefile.am
243 +@@ -7,7 +7,6 @@ ipmi_dcmi_CPPFLAGS = \
244 + -I$(top_srcdir)/common/portability \
245 + -I$(top_builddir)/libfreeipmi/include \
246 + -I$(top_srcdir)/libfreeipmi/include \
247 +- -D_GNU_SOURCE \
248 + -D_REENTRANT
249 +
250 + ipmi_dcmi_LDADD = \
251 +--- a/ipmi-fru/Makefile.am
252 ++++ b/ipmi-fru/Makefile.am
253 +@@ -7,7 +7,6 @@ ipmi_fru_CPPFLAGS = \
254 + -I$(top_srcdir)/common/portability \
255 + -I$(top_builddir)/libfreeipmi/include \
256 + -I$(top_srcdir)/libfreeipmi/include \
257 +- -D_GNU_SOURCE \
258 + -D_REENTRANT
259 +
260 + ipmi_fru_LDADD = \
261 +--- a/ipmi-locate/Makefile.am
262 ++++ b/ipmi-locate/Makefile.am
263 +@@ -7,7 +7,6 @@ ipmi_locate_CPPFLAGS = \
264 + -I$(top_srcdir)/common/miscutil \
265 + -I$(top_builddir)/libfreeipmi/include \
266 + -I$(top_srcdir)/libfreeipmi/include \
267 +- -D_GNU_SOURCE \
268 + -D_REENTRANT
269 +
270 + ipmi_locate_LDADD = \
271 +--- a/ipmi-oem/Makefile.am
272 ++++ b/ipmi-oem/Makefile.am
273 +@@ -7,7 +7,6 @@ ipmi_oem_CPPFLAGS = \
274 + -I$(top_srcdir)/common/portability \
275 + -I$(top_builddir)/libfreeipmi/include \
276 + -I$(top_srcdir)/libfreeipmi/include \
277 +- -D_GNU_SOURCE \
278 + -D_REENTRANT
279 +
280 + ipmi_oem_LDADD = \
281 +--- a/ipmi-pet/Makefile.am
282 ++++ b/ipmi-pet/Makefile.am
283 +@@ -7,7 +7,6 @@ ipmi_pet_CPPFLAGS = \
284 + -I$(top_srcdir)/common/portability \
285 + -I$(top_builddir)/libfreeipmi/include \
286 + -I$(top_srcdir)/libfreeipmi/include \
287 +- -D_GNU_SOURCE \
288 + -D_REENTRANT
289 +
290 + ipmi_pet_LDADD = \
291 +--- a/ipmi-raw/Makefile.am
292 ++++ b/ipmi-raw/Makefile.am
293 +@@ -7,7 +7,6 @@ ipmi_raw_CPPFLAGS = \
294 + -I$(top_srcdir)/common/portability \
295 + -I$(top_builddir)/libfreeipmi/include \
296 + -I$(top_srcdir)/libfreeipmi/include \
297 +- -D_GNU_SOURCE \
298 + -D_REENTRANT
299 +
300 + ipmi_raw_LDADD = \
301 +--- a/ipmi-sel/Makefile.am
302 ++++ b/ipmi-sel/Makefile.am
303 +@@ -8,7 +8,6 @@ ipmi_sel_CPPFLAGS = \
304 + -I$(top_srcdir)/common/portability \
305 + -I$(top_builddir)/libfreeipmi/include \
306 + -I$(top_srcdir)/libfreeipmi/include \
307 +- -D_GNU_SOURCE \
308 + -D_REENTRANT
309 +
310 + ipmi_sel_LDADD = \
311 +--- a/ipmi-sensors/Makefile.am
312 ++++ b/ipmi-sensors/Makefile.am
313 +@@ -9,7 +9,6 @@ ipmi_sensors_CPPFLAGS = \
314 + -I$(top_srcdir)/common/portability \
315 + -I$(top_builddir)/libfreeipmi/include \
316 + -I$(top_srcdir)/libfreeipmi/include \
317 +- -D_GNU_SOURCE \
318 + -D_REENTRANT
319 +
320 + ipmi_sensors_LDADD = \
321 +--- a/ipmiconsole/Makefile.am
322 ++++ b/ipmiconsole/Makefile.am
323 +@@ -8,7 +8,6 @@ ipmiconsole_CPPFLAGS = \
324 + -I$(top_builddir)/libfreeipmi/include \
325 + -I$(top_srcdir)/libfreeipmi/include \
326 + -I$(top_builddir)/libipmiconsole/ \
327 +- -D_GNU_SOURCE \
328 + -D_REENTRANT
329 +
330 +
331 +--- a/ipmidetect/Makefile.am
332 ++++ b/ipmidetect/Makefile.am
333 +@@ -10,7 +10,6 @@ ipmidetect_CPPFLAGS = \
334 + -I$(top_srcdir)/common/miscutil \
335 + -I$(top_srcdir)/common/portability \
336 + -I$(top_builddir)/libipmidetect/ \
337 +- -D_GNU_SOURCE \
338 + -D_REENTRANT
339 +
340 + ipmidetect_LDADD = \
341 +--- a/ipmidetectd/Makefile.am
342 ++++ b/ipmidetectd/Makefile.am
343 +@@ -12,7 +12,6 @@ ipmidetectd_CPPFLAGS = \
344 + -I$(top_srcdir)/common/portability \
345 + -I$(top_builddir)/libfreeipmi/include \
346 + -I$(top_srcdir)/libfreeipmi/include \
347 +- -D_GNU_SOURCE \
348 + -D_REENTRANT \
349 + -DIPMIDETECTD_LOCALSTATEDIR='"$(localstatedir)"'
350 +
351 +--- a/ipmiping/Makefile.am
352 ++++ b/ipmiping/Makefile.am
353 +@@ -5,8 +5,7 @@ ipmiping_CPPFLAGS = \
354 + -I$(top_srcdir)/common/debugutil \
355 + -I$(top_srcdir)/common/portability \
356 + -I$(top_builddir)/libfreeipmi/include \
357 +- -I$(top_srcdir)/libfreeipmi/include \
358 +- -D_GNU_SOURCE
359 ++ -I$(top_srcdir)/libfreeipmi/include
360 +
361 + ipmiping_LDADD = \
362 + $(top_builddir)/common/pingtool/libpingtool.la \
363 +--- a/ipmipower/Makefile.am
364 ++++ b/ipmipower/Makefile.am
365 +@@ -11,7 +11,6 @@ ipmipower_CPPFLAGS = \
366 + -I$(top_srcdir)/libfreeipmi/include \
367 + -DWITH_LSD_FATAL_ERROR_FUNC=1 \
368 + -DWITH_LSD_NOMEM_ERROR_FUNC=1 \
369 +- -D_GNU_SOURCE \
370 + -D_REENTRANT
371 +
372 + ipmipower_LDADD = \
373 +--- a/ipmiseld/Makefile.am
374 ++++ b/ipmiseld/Makefile.am
375 +@@ -13,7 +13,6 @@ ipmiseld_CPPFLAGS = \
376 + -I$(top_srcdir)/common/portability \
377 + -I$(top_builddir)/libfreeipmi/include \
378 + -I$(top_srcdir)/libfreeipmi/include \
379 +- -D_GNU_SOURCE \
380 + -D_REENTRANT \
381 + -DIPMISELD_LOCALSTATEDIR='"$(localstatedir)"'
382 +
383 +--- a/libfreeipmi/Makefile.am
384 ++++ b/libfreeipmi/Makefile.am
385 +@@ -25,7 +25,6 @@ libfreeipmi_la_CPPFLAGS = \
386 + -I$(top_srcdir)/libfreeipmi \
387 + -DIPMI_IPCKEY=\"$(localstatedir)/lib/$(PACKAGE_NAME)/ipckey\" \
388 + -DIPMI_DEBUG_IPCKEY=\"$(top_builddir)/libfreeipmi/driver/ipmi-semaphores.h\" \
389 +- -D_GNU_SOURCE \
390 + -D_REENTRANT
391 +
392 + libfreeipmi_la_LDFLAGS = \
393 +--- a/libipmiconsole/Makefile.am
394 ++++ b/libipmiconsole/Makefile.am
395 +@@ -21,7 +21,6 @@ libipmiconsole_la_CPPFLAGS = \
396 + -I$(top_builddir)/libfreeipmi/include \
397 + -I$(top_srcdir)/libfreeipmi/include \
398 + -DWITH_PTHREADS=1 \
399 +- -D_GNU_SOURCE \
400 + -D_REENTRANT
401 +
402 + libipmiconsole_la_LDFLAGS = \
403 +--- a/libipmimonitoring/Makefile.am
404 ++++ b/libipmimonitoring/Makefile.am
405 +@@ -30,7 +30,6 @@ libipmimonitoring_la_CPPFLAGS = \
406 + -I$(top_srcdir)/common/portability \
407 + -I$(top_builddir)/libfreeipmi/include \
408 + -I$(top_srcdir)/libfreeipmi/include \
409 +- -D_GNU_SOURCE \
410 + -D_REENTRANT
411 +
412 + libipmimonitoring_la_LDFLAGS = \
413 +--- a/rmcpping/Makefile.am
414 ++++ b/rmcpping/Makefile.am
415 +@@ -5,8 +5,7 @@ rmcpping_CPPFLAGS = \
416 + -I$(top_srcdir)/common/debugutil \
417 + -I$(top_srcdir)/common/portability \
418 + -I$(top_builddir)/libfreeipmi/include \
419 +- -I$(top_srcdir)/libfreeipmi/include \
420 +- -D_GNU_SOURCE
421 ++ -I$(top_srcdir)/libfreeipmi/include
422 +
423 + rmcpping_LDADD = \
424 + $(top_builddir)/common/pingtool/libpingtool.la \
425
426 diff --git a/sys-libs/freeipmi/files/freeipmi-1.6.10-header-fixes.patch b/sys-libs/freeipmi/files/freeipmi-1.6.10-header-fixes.patch
427 new file mode 100644
428 index 000000000000..ccd1262333db
429 --- /dev/null
430 +++ b/sys-libs/freeipmi/files/freeipmi-1.6.10-header-fixes.patch
431 @@ -0,0 +1,118 @@
432 +https://git.savannah.gnu.org/cgit/freeipmi.git/commit/?id=587b0cce3d0f146c9f97efbf33d599d23217d610
433 +https://git.savannah.gnu.org/cgit/freeipmi.git/commit/?id=9cc6f981b55d6aa784788674a5a77c5b970bcabe
434 +https://git.savannah.gnu.org/cgit/freeipmi.git/commit/?id=14c6e2d373173d06fa3f2148629b4d8bdedec0a2
435 +https://git.savannah.gnu.org/cgit/freeipmi.git/commit/?id=66cf8d0bb7e47d3360389ce427a6303cc0b63d00
436 +
437 +From 587b0cce3d0f146c9f97efbf33d599d23217d610 Mon Sep 17 00:00:00 2001
438 +From: Albert Chu <chu11@××××.gov>
439 +Date: Tue, 7 Jan 2020 13:48:12 -0800
440 +Subject: [PATCH 1/7] ipmi-sensors: Fix header guards
441 +
442 +--- a/ipmi-sensors/ipmi-sensors-oem-intel-quanta-qssc-s4r.h
443 ++++ b/ipmi-sensors/ipmi-sensors-oem-intel-quanta-qssc-s4r.h
444 +@@ -17,7 +17,7 @@
445 + */
446 +
447 + #ifndef IPMI_SENSORS_OEM_INTEL_QUANTA_QSSC_S4R_H
448 +-#define IPMI_SENSORS_OEM_INTEL_H
449 ++#define IPMI_SENSORS_OEM_INTEL_QUANTA_QSSC_S4R_H
450 +
451 + #include "ipmi-sensors.h"
452 +
453 +--- a/ipmi-sensors/ipmi-sensors-oem-intel-s2600jf.h
454 ++++ b/ipmi-sensors/ipmi-sensors-oem-intel-s2600jf.h
455 +@@ -17,7 +17,7 @@
456 + */
457 +
458 + #ifndef IPMI_SENSORS_OEM_INTEL_S2600JF_H
459 +-#define IPMI_SENSORS_OEM_INTEL_H
460 ++#define IPMI_SENSORS_OEM_INTEL_S2600JF_H
461 +
462 + #include "ipmi-sensors.h"
463 +
464 +--- a/ipmi-sensors/ipmi-sensors-oem-intel-s2600wp.h
465 ++++ b/ipmi-sensors/ipmi-sensors-oem-intel-s2600wp.h
466 +@@ -17,7 +17,7 @@
467 + */
468 +
469 + #ifndef IPMI_SENSORS_OEM_INTEL_S2600WP_H
470 +-#define IPMI_SENSORS_OEM_INTEL_H
471 ++#define IPMI_SENSORS_OEM_INTEL_S2600WP_H
472 +
473 + #include "ipmi-sensors.h"
474 +
475 +--- a/ipmi-sensors/ipmi-sensors-oem-intel-s5500wb.h
476 ++++ b/ipmi-sensors/ipmi-sensors-oem-intel-s5500wb.h
477 +@@ -17,7 +17,7 @@
478 + */
479 +
480 + #ifndef IPMI_SENSORS_OEM_INTEL_S5500WB_H
481 +-#define IPMI_SENSORS_OEM_INTEL_H
482 ++#define IPMI_SENSORS_OEM_INTEL_S5500WB_H
483 +
484 + #include "ipmi-sensors.h"
485 +
486 +From 9cc6f981b55d6aa784788674a5a77c5b970bcabe Mon Sep 17 00:00:00 2001
487 +From: Albert Chu <chu11@××××.gov>
488 +Date: Tue, 7 Jan 2020 14:06:27 -0800
489 +Subject: [PATCH 4/7] libipmiconsole: Move header guard macros to top of file
490 +
491 +--- a/libipmiconsole/ipmiconsole_defs.h
492 ++++ b/libipmiconsole/ipmiconsole_defs.h
493 +@@ -24,6 +24,9 @@
494 + * with Ipmiconsole. If not, see <http://www.gnu.org/licenses/>.
495 + \*****************************************************************************/
496 +
497 ++#ifndef IPMICONSOLE_DEFS_H
498 ++#define IPMICONSOLE_DEFS_H
499 ++
500 + #ifdef HAVE_CONFIG_H
501 + #include "config.h"
502 + #endif /* HAVE_CONFIG_H */
503 +@@ -54,9 +57,6 @@
504 +
505 + #include "scbuf.h"
506 +
507 +-#ifndef IPMICONSOLE_DEFS_H
508 +-#define IPMICONSOLE_DEFS_H
509 +-
510 + #ifndef MAXHOSTNAMELEN
511 + #define MAXHOSTNAMELEN 64
512 + #endif /* MAXHOSTNAMELEN */
513 +From 14c6e2d373173d06fa3f2148629b4d8bdedec0a2 Mon Sep 17 00:00:00 2001
514 +From: Albert Chu <chu11@××××.gov>
515 +Date: Tue, 7 Jan 2020 15:30:39 -0800
516 +Subject: [PATCH 6/7] libfreeipmi/sel: Add missing functions to header
517 +
518 +--- a/libfreeipmi/sel/ipmi-sel-string-supermicro-common.h
519 ++++ b/libfreeipmi/sel/ipmi-sel-string-supermicro-common.h
520 +@@ -39,4 +39,14 @@ int sel_string_output_supermicro_overheat_event_data1_class_oem (ipmi_sel_ctx_t
521 + unsigned int *wlen,
522 + struct ipmi_sel_system_event_record_data *system_event_record_data);
523 +
524 ++int sel_string_output_supermicro_dimm_event_data2_event_data3 (ipmi_sel_ctx_t ctx,
525 ++ struct ipmi_sel_entry *sel_entry,
526 ++ uint8_t sel_record_type,
527 ++ char *buf,
528 ++ unsigned int buflen,
529 ++ unsigned int flags,
530 ++ unsigned int *wlen,
531 ++ struct ipmi_sel_system_event_record_data *system_event_record_data,
532 ++ int *oem_rv);
533 ++
534 + #endif /* IPMI_SEL_STRING_SUPERMICRO_COMMON_H */
535 +From 66cf8d0bb7e47d3360389ce427a6303cc0b63d00 Mon Sep 17 00:00:00 2001
536 +From: Albert Chu <chu11@××××.gov>
537 +Date: Tue, 7 Jan 2020 15:32:22 -0800
538 +Subject: [PATCH 7/7] ipmi-sensors: Add missing header to file
539 +
540 +--- a/ipmi-sensors/ipmi-sensors-oem-intel.c
541 ++++ b/ipmi-sensors/ipmi-sensors-oem-intel.c
542 +@@ -34,6 +34,7 @@
543 + #include "ipmi-sensors-oem-intel.h"
544 + #include "ipmi-sensors-oem-intel-s5500wb.h"
545 + #include "ipmi-sensors-oem-intel-s2600jf.h"
546 ++#include "ipmi-sensors-oem-intel-s2600wp.h"
547 + #include "ipmi-sensors-oem-intel-quanta-qssc-s4r.h"
548 + #include "ipmi-sensors-oem-intel-node-manager.h"
549 +
550
551 diff --git a/sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild b/sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild
552 new file mode 100644
553 index 000000000000..db22dec05250
554 --- /dev/null
555 +++ b/sys-libs/freeipmi/freeipmi-1.6.10-r1.ebuild
556 @@ -0,0 +1,107 @@
557 +# Copyright 1999-2022 Gentoo Authors
558 +# Distributed under the terms of the GNU General Public License v2
559 +
560 +EAPI=8
561 +
562 +AT_M4DIR="config"
563 +inherit autotools toolchain-funcs
564 +
565 +DESCRIPTION="Provides Remote-Console and System Management Software as per IPMI v1.5/2.0"
566 +HOMEPAGE="https://www.gnu.org/software/freeipmi/"
567 +
568 +MY_P="${P/_/.}"
569 +[[ ${MY_P} == *.beta* ]] && ALPHA="-alpha"
570 +SRC_URI="mirror://gnu${ALPHA}/${PN}/${MY_P}.tar.gz"
571 +S="${WORKDIR}/${MY_P}"
572 +
573 +LICENSE="GPL-3"
574 +SLOT="0"
575 +KEYWORDS="~amd64 ~hppa ~ppc64 ~x86"
576 +IUSE="debug nagios without-root"
577 +
578 +RDEPEND="dev-libs/libgcrypt:0="
579 +DEPEND="${RDEPEND}
580 + virtual/os-headers"
581 +RDEPEND="${RDEPEND}
582 + nagios? (
583 + || ( net-analyzer/icinga net-analyzer/nagios )
584 + dev-lang/perl
585 + )
586 +"
587 +
588 +PATCHES=(
589 + "${FILESDIR}"/${PN}-1.6.10-0001-configure.ac-Fix-Wimplicit-function-declaration-for-.patch
590 + "${FILESDIR}"/${PN}-1.6.10-0002-configure.ac-Fix-detecting-sighandler_t-on-glibc.patch
591 + "${FILESDIR}"/${PN}-1.6.10-0003-configure.ac-Use-AC_USE_SYSTEM_EXTENSIONS-instead-of.patch
592 + "${FILESDIR}"/${P}-header-fixes.patch
593 +)
594 +
595 +src_prepare() {
596 + default
597 +
598 + # Needed for configure.ac patches, drop if/when merged
599 + eautoreconf
600 +}
601 +
602 +src_configure() {
603 + local myeconfargs=(
604 + $(use_enable debug)
605 + $(usex without-root --with-dont-check-for-root "")
606 + --disable-static
607 + --disable-init-scripts
608 + --localstatedir="${EPREFIX}"/var
609 + ac_cv_path_CPP_FOR_BUILD="$(tc-getPROG CPP cpp)"
610 + )
611 +
612 + econf "${myeconfargs[@]}"
613 +}
614 +
615 +src_install() {
616 + default
617 +
618 + # freeipmi by defaults install _all_ commands to /usr/sbin, but
619 + # quite a few can be run remotely as standard user, so move them
620 + # in /usr/bin afterwards.
621 + dodir /usr/bin
622 + local prog
623 + for prog in ipmi{detect,ping,power,console}; do
624 + mv "${ED}"/usr/{s,}bin/${prog} || die
625 +
626 + # The default install symlinks these commands to add a dash
627 + # after the ipmi prefix; we repeat those after move for
628 + # consistency.
629 + rm "${ED}"/usr/sbin/${prog/ipmi/ipmi-}
630 + dosym ${prog} /usr/bin/${prog/ipmi/ipmi-}
631 + done
632 +
633 + # Install the nagios plugin in its proper place, if desired
634 + if use nagios; then
635 + dodir /usr/$(get_libdir)/nagios/plugins
636 + mv "${ED}"/usr/share/doc/${PF}/contrib/nagios/nagios_ipmi_sensors.pl \
637 + "${ED}"/usr/$(get_libdir)/nagios/plugins/ || die
638 + fperms 0755 /usr/$(get_libdir)/nagios/plugins/nagios_ipmi_sensors.pl
639 +
640 + insinto /etc/icinga/conf.d
641 + newins "${FILESDIR}"/freeipmi.icinga freeipmi-command.cfg
642 + fi
643 +
644 + dodoc AUTHORS ChangeLog* DISCLAIMER* NEWS README* TODO doc/*.txt
645 +
646 + keepdir \
647 + /var/cache/ipmiseld \
648 + /var/cache/ipmimonitoringsdrcache \
649 + /var/lib/freeipmi \
650 + /var/log/ipmiconsole
651 +
652 + # starting from version 1.2.0 the two daemons are similar enough
653 + newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmidetectd
654 + newconfd "${FILESDIR}"/ipmidetectd.confd ipmidetectd
655 +
656 + newinitd "${FILESDIR}"/bmc-watchdog.initd.4 bmc-watchdog
657 + newconfd "${FILESDIR}"/bmc-watchdog.confd bmc-watchdog
658 +
659 + newinitd "${FILESDIR}"/bmc-watchdog.initd.4 ipmiseld
660 + newconfd "${FILESDIR}"/ipmiseld.confd ipmiseld
661 +
662 + find "${ED}" -type f -name "*.la" -delete || die
663 +}