1 |
commit: 9bace2960c71f0384e949596feae06b0bc71b6f9 |
2 |
Author: John Helmert III <ajak <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 8 04:46:37 2022 +0000 |
4 |
Commit: John Helmert III <ajak <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 10 03:38:12 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bace296 |
7 |
|
8 |
sys-apps/ipmitool: add 1.8.19 |
9 |
|
10 |
Don't use a tarball for patches, stop tying initscript to PV, drop |
11 |
obolete Debian handling cruft, various other simplifications and style |
12 |
fixes. |
13 |
|
14 |
Signed-off-by: John Helmert III <ajak <AT> gentoo.org> |
15 |
|
16 |
sys-apps/ipmitool/Manifest | 2 + |
17 |
sys-apps/ipmitool/files/exchange-bmc-os-info.initd | 23 ++++ |
18 |
sys-apps/ipmitool/files/ipmievd.confd | 27 ++++ |
19 |
sys-apps/ipmitool/files/ipmievd.initd | 28 ++++ |
20 |
.../files/ipmitool-1.8.19-CVE-2011-4339.patch | 20 +++ |
21 |
.../ipmitool-1.8.19-fix-buffer-overflow.patch | 21 +++ |
22 |
.../files/ipmitool-1.8.19-manpage-longlines.patch | 55 ++++++++ |
23 |
.../files/ipmitool-1.8.19-nvidia-iana.patch | 23 ++++ |
24 |
sys-apps/ipmitool/files/log_bmc.initd | 25 ++++ |
25 |
sys-apps/ipmitool/ipmitool-1.8.19.ebuild | 146 +++++++++++++++++++++ |
26 |
10 files changed, 370 insertions(+) |
27 |
|
28 |
diff --git a/sys-apps/ipmitool/Manifest b/sys-apps/ipmitool/Manifest |
29 |
index 5c974ac3707b..a38bac6ab786 100644 |
30 |
--- a/sys-apps/ipmitool/Manifest |
31 |
+++ b/sys-apps/ipmitool/Manifest |
32 |
@@ -1,3 +1,5 @@ |
33 |
+DIST enterprise-numbers-1.8.19.xz 1500100 BLAKE2B 15c21792bf46220c5908ecf4f0ddafe2fdf13a1799c054a0cb0cb647e7f489768855c4c25fba8a4408505ff0cf02d1a43408d5c4de557b1b30fe8abb477a7926 SHA512 e88cb459a9c8a3172770bcfefbec0a7ad7d65395063c8c0173fce776ea0beb7ad9f3610e636dfbd71d0af8c952c2b9bc6c25c815daa4ab281bed983cbe2ebcc4 |
34 |
DIST enterprise-numbers.2020-10-21.xz 1426932 BLAKE2B bfe39ceea321ba47cd40eafa67862eb4dfd6dc29b192afb20ad0c908cd93a16b4103c5de64d042df012417c8cadc03000f2b2a00779bcc582a430603cad5f3cf SHA512 4a854a56e8ed51997c320cbfba041d43cb98b14743ef80b67e701942068d3729604abaedb617655a83ca21a7e20ea5a622ede4de317ca492cefd46da784d28f3 |
35 |
DIST ipmitool-1.8.18_p20201004.tar.gz 638493 BLAKE2B 52f4ec8c82336b88640d1b91fc17af8f2fe0948a5c48c16067867dcad0852168d48bb21fdd99bde7ed957b66df888fd369c909079d1f81c861acd8c7f8dfa6f2 SHA512 8d72eef3584f4d2c86bfe43f70b5d687f3b7bbdf75b8979f7132c5c98b01baae22c336e540c197652187749fc9bb221a92e546b56e5cf2eb5650fad5094e9433 |
36 |
+DIST ipmitool-1.8.19.tar.gz 641383 BLAKE2B e1db12bb7301cb4b551f87fbfcd405b3597a1f32c45447b2b239d9d43a2cdbe213ee5408291d50801035cc80e28078fb3a778ab28335665bc3316798c13ea1fc SHA512 2d91706e9feba4b2ce4808eca087b81b842c4292a5840830001919c06ec8babd8f8761b74bb9dcf8fbc7765f028a5b1a192a3c1b643f2adaa157fed6fb0d1ee3 |
37 |
DIST ipmitool_1.8.18-9.debian-ported-gentoo.tar.xz 3208 BLAKE2B b37a127eff361039b3b810e19dd97f0c395462b658803f56f10f2dd1abbbe92743dc409ce6b83560db15621b7fa7a3c0f989100077893993df18108a082e49d2 SHA512 0f7646a2307ac98425e99dece9d3e3b23026136a97524151efdecc910fb537af41a91702782989046e44163da98610fa05792878473e228b45c16351f6015a45 |
38 |
|
39 |
diff --git a/sys-apps/ipmitool/files/exchange-bmc-os-info.initd b/sys-apps/ipmitool/files/exchange-bmc-os-info.initd |
40 |
new file mode 100644 |
41 |
index 000000000000..9c63983f21f3 |
42 |
--- /dev/null |
43 |
+++ b/sys-apps/ipmitool/files/exchange-bmc-os-info.initd |
44 |
@@ -0,0 +1,23 @@ |
45 |
+#!/sbin/openrc-run |
46 |
+# Copyright 2020 Gentoo Authors |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+# /etc/init.d/exchange-bmc-os-info |
49 |
+ |
50 |
+name="exchange-bmc-os-info" |
51 |
+description="Exchange Information between BMC and OS" |
52 |
+command=/usr/libexec/exchange-bmc-os-info |
53 |
+command_args="" |
54 |
+: "${DEVICENUM:=0}" # which BMC |
55 |
+required_files=/dev/ipmi${DEVICENUM} |
56 |
+ |
57 |
+depend() { |
58 |
+ use hostname modules |
59 |
+ keyword -docker -lxc -prefix -systemd-nspawn |
60 |
+} |
61 |
+ |
62 |
+start() { |
63 |
+ "${command}" start |
64 |
+} |
65 |
+stop() { |
66 |
+ "${command}" stop |
67 |
+} |
68 |
|
69 |
diff --git a/sys-apps/ipmitool/files/ipmievd.confd b/sys-apps/ipmitool/files/ipmievd.confd |
70 |
new file mode 100644 |
71 |
index 000000000000..b860c23c7f89 |
72 |
--- /dev/null |
73 |
+++ b/sys-apps/ipmitool/files/ipmievd.confd |
74 |
@@ -0,0 +1,27 @@ |
75 |
+# Copyright 1999-2020 Gentoo Authors |
76 |
+# Distributed under the terms of the GNU General Public License v2 |
77 |
+# /etc/conf.d/ipmievd |
78 |
+ |
79 |
+# Interfaces: |
80 |
+# open Linux OpenIPMI Interface |
81 |
+# imb Intel IMB Interface |
82 |
+# bmc IPMI v2.0 BMC interface |
83 |
+# lan IPMI v1.5 LAN Interface |
84 |
+# lanplus IPMI v2.0 RMCP+ LAN Interface |
85 |
+ |
86 |
+INTERFACE="open" |
87 |
+ |
88 |
+# Commands: |
89 |
+# open Use OpenIPMI for asyncronous notification of events |
90 |
+# sel Poll SEL for notification of events |
91 |
+# |
92 |
+# 'pidfile=...' will be appended! |
93 |
+COMMAND="open daemon" |
94 |
+ |
95 |
+# Options. |
96 |
+ |
97 |
+OPTIONS="" |
98 |
+ |
99 |
+# Device number: |
100 |
+# Used to target a specific BMC on a multi-node, multi-BMC system via the open interface |
101 |
+DEVICENUM=0 |
102 |
|
103 |
diff --git a/sys-apps/ipmitool/files/ipmievd.initd b/sys-apps/ipmitool/files/ipmievd.initd |
104 |
new file mode 100644 |
105 |
index 000000000000..e8ef2c39d454 |
106 |
--- /dev/null |
107 |
+++ b/sys-apps/ipmitool/files/ipmievd.initd |
108 |
@@ -0,0 +1,28 @@ |
109 |
+#!/sbin/openrc-run |
110 |
+# Copyright 1999-2020 Gentoo Authors |
111 |
+# Distributed under the terms of the GNU General Public License v2 |
112 |
+# /etc/init.d/ipmievd |
113 |
+ |
114 |
+depend() { |
115 |
+ use logger modules |
116 |
+ keyword -docker -lxc -prefix -systemd-nspawn |
117 |
+} |
118 |
+ |
119 |
+# TODO: ipmievd has a mode where it could be used to monitor multiple BMCs via |
120 |
+# DEVICENUM or remote systems, and it would be valid to run multiple instances. |
121 |
+# That is not supported by this init script at this time. |
122 |
+ |
123 |
+description="IPMI event daemon for sending events to syslog LOCAL4" |
124 |
+ |
125 |
+: "${DEVICENUM:=0}" |
126 |
+: "${INTERFACE:=open}" |
127 |
+: "${COMMAND:=open daemon}" |
128 |
+: "${OPTIONS:=}" |
129 |
+ |
130 |
+daemon=ipmievd |
131 |
+ |
132 |
+pidfile=/run/${daemon}.pid${DEVICENUM} # see manpage re suffix |
133 |
+command=/usr/sbin/${daemon} |
134 |
+cachefile=/run/${daemon}.${DEVICENUM}.sdr-cache |
135 |
+command_args="-d ${DEVICENUM} -S ${cachefile} -I ${INTERFACE} ${OPTIONS} ${COMMAND} pidfile=${pidfile}" |
136 |
+required_files=/dev/ipmi$DEVICENUM |
137 |
|
138 |
diff --git a/sys-apps/ipmitool/files/ipmitool-1.8.19-CVE-2011-4339.patch b/sys-apps/ipmitool/files/ipmitool-1.8.19-CVE-2011-4339.patch |
139 |
new file mode 100644 |
140 |
index 000000000000..4a25280662b5 |
141 |
--- /dev/null |
142 |
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.19-CVE-2011-4339.patch |
143 |
@@ -0,0 +1,20 @@ |
144 |
+Description: CVE-2011-4339 |
145 |
+ insecure file permission when creating PID files |
146 |
+ based on 112_fix_CVE-2011-4339 |
147 |
+Author: Jörg Frings-Fürst <debian@××××××××××××××.net> |
148 |
+Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651917 |
149 |
+Forwarded: https://sourceforge.net/p/ipmitool/patches/99/ |
150 |
+Last-Update: 2020-10-21 |
151 |
+--- |
152 |
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
153 |
+diff -Nuar --exclude '*.orig' ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/lib/helper.c ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/lib/helper.c |
154 |
+--- ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/lib/helper.c 2020-08-07 00:53:06.000000000 -0700 |
155 |
++++ ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/lib/helper.c 2020-10-21 13:59:02.335206233 -0700 |
156 |
+@@ -917,7 +917,6 @@ |
157 |
+ lprintf(LOG_ERR, "chdir failed: %s (%d)", strerror(errno), errno); |
158 |
+ exit(1); |
159 |
+ } |
160 |
+- umask(0); |
161 |
+ |
162 |
+ for (fd=0; fd<64; fd++) { |
163 |
+ if (fd != intf->fd) |
164 |
|
165 |
diff --git a/sys-apps/ipmitool/files/ipmitool-1.8.19-fix-buffer-overflow.patch b/sys-apps/ipmitool/files/ipmitool-1.8.19-fix-buffer-overflow.patch |
166 |
new file mode 100644 |
167 |
index 000000000000..ceeffde085a7 |
168 |
--- /dev/null |
169 |
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.19-fix-buffer-overflow.patch |
170 |
@@ -0,0 +1,21 @@ |
171 |
+Description: fix buffer overflow |
172 |
+ based on 101_fix_buf_overflow from Leo Iannacone <l3on@××××××.com> |
173 |
+Author: Jörg Frings-Fürst <debian@××××××××××××××.net> |
174 |
+Bug: TSOL buffer overflow |
175 |
+Bug-ubuntu: https://bugs.launchpad.net/ubuntu/+source/ipmitool/+bug/633054 |
176 |
+Forwarded: https://sourceforge.net/p/ipmitool/patches/100/ |
177 |
+Last-Update: 2020-20-21 |
178 |
+--- |
179 |
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
180 |
+diff -Nuar --exclude '*.orig' ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/lib/ipmi_tsol.c ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/lib/ipmi_tsol.c |
181 |
+--- ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/lib/ipmi_tsol.c 2020-08-07 00:53:06.000000000 -0700 |
182 |
++++ ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/lib/ipmi_tsol.c 2020-10-21 13:55:58.571536858 -0700 |
183 |
+@@ -374,7 +374,7 @@ |
184 |
+ char *recvip = NULL; |
185 |
+ char in_buff[IPMI_BUF_SIZE]; |
186 |
+ char out_buff[IPMI_BUF_SIZE * 8]; |
187 |
+- char buff[IPMI_BUF_SIZE + 4]; |
188 |
++ char buff[IPMI_BUF_SIZE * 8 + 4]; |
189 |
+ int fd_socket, result, i; |
190 |
+ int out_buff_fill, in_buff_fill; |
191 |
+ int ip1, ip2, ip3, ip4; |
192 |
|
193 |
diff --git a/sys-apps/ipmitool/files/ipmitool-1.8.19-manpage-longlines.patch b/sys-apps/ipmitool/files/ipmitool-1.8.19-manpage-longlines.patch |
194 |
new file mode 100644 |
195 |
index 000000000000..6c0e00da3e15 |
196 |
--- /dev/null |
197 |
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.19-manpage-longlines.patch |
198 |
@@ -0,0 +1,55 @@ |
199 |
+Description: long lines in man-page |
200 |
+ prevent "can't break line" warnings |
201 |
+Author: Jörg Frings-Fürst <debian@××××××××××××××.net> |
202 |
+Forwarded: not-needed |
203 |
+Last-Update: 2020-10-21 |
204 |
+--- |
205 |
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
206 |
+diff -Nuar --exclude '*.orig' ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/doc/ipmitool.1.in ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/doc/ipmitool.1.in |
207 |
+--- ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/doc/ipmitool.1.in 2020-08-07 00:53:06.000000000 -0700 |
208 |
++++ ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/doc/ipmitool.1.in 2020-10-21 14:00:23.383643880 -0700 |
209 |
+@@ -1038,7 +1038,7 @@ |
210 |
+ AMC slot B2 topology: |
211 |
+ Port 0 =====> On Carrier Device ID 0, Port 3 |
212 |
+ Port 2 =====> AMC slot B1, Port 2 |
213 |
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
214 |
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-* |
215 |
+ From Carrier file: carrierfru |
216 |
+ On Carrier Device ID 0 topology: |
217 |
+ Port 0 =====> AMC slot B1, Port 4 |
218 |
+@@ -1094,7 +1094,7 @@ |
219 |
+ \-Link Type: AMC.2 Ethernet |
220 |
+ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link |
221 |
+ \-Link Group ID: 0 || Link Asym. Match: exact match |
222 |
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
223 |
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-* |
224 |
+ AMC slot B1 port 1 ==> On-Carrier Device 0 port 12 |
225 |
+ Matching Result |
226 |
+ - From On-Carrier Device ID 0 |
227 |
+@@ -1107,7 +1107,7 @@ |
228 |
+ \-Link Type: AMC.2 Ethernet |
229 |
+ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link |
230 |
+ \-Link Group ID: 0 || Link Asym. Match: exact match |
231 |
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
232 |
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-* |
233 |
+ On-Carrier Device vs AMC slot A2 |
234 |
+ AMC slot A2 port 0 ==> On-Carrier Device 0 port 3 |
235 |
+ Matching Result |
236 |
+@@ -1121,7 +1121,7 @@ |
237 |
+ \-Link Type: AMC.2 Ethernet |
238 |
+ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link |
239 |
+ \-Link Group ID: 0 || Link Asym. Match: exact match |
240 |
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
241 |
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-* |
242 |
+ AMC slot B1 vs AMC slot A2 |
243 |
+ AMC slot A2 port 2 ==> AMC slot B1 port 2 |
244 |
+ Matching Result |
245 |
+@@ -1135,7 +1135,7 @@ |
246 |
+ \-Link Type: AMC.3 Storage |
247 |
+ \-Link Type extension: Serial Attached SCSI (SAS/SATA) |
248 |
+ \-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match} |
249 |
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
250 |
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-* |
251 |
+ .TP |
252 |
+ \fIunmatch\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr |
253 |
+ .br |
254 |
|
255 |
diff --git a/sys-apps/ipmitool/files/ipmitool-1.8.19-nvidia-iana.patch b/sys-apps/ipmitool/files/ipmitool-1.8.19-nvidia-iana.patch |
256 |
new file mode 100644 |
257 |
index 000000000000..31b1a42dcf59 |
258 |
--- /dev/null |
259 |
+++ b/sys-apps/ipmitool/files/ipmitool-1.8.19-nvidia-iana.patch |
260 |
@@ -0,0 +1,23 @@ |
261 |
+Description: Add IANA ID for NVIDIA hardware |
262 |
+ Add the NVIDIA IANA ID to the hardcoded list used in ipmitool <= 1.8.18. |
263 |
+ After upstream commit "9d41136 ID:491 - Fetch vendor IDs from IANA", ipmitool |
264 |
+ generates a list of vendor IDs dynamically at build time, so we can drop this |
265 |
+ patch in future releases. |
266 |
+Author: dann frazier <dannf@××××××.org> |
267 |
+Origin: backport |
268 |
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903616 |
269 |
+Forwarded: not-needed |
270 |
+Last-Update: 2020-10-21 |
271 |
+--- |
272 |
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
273 |
+diff -Nuar --exclude '*.orig' --exclude '*.rej' ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/include/ipmitool/ipmi.h ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/include/ipmitool/ipmi.h |
274 |
+--- ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f.orig/include/ipmitool/ipmi.h 2020-08-07 00:53:06.000000000 -0700 |
275 |
++++ ipmitool-50d8c36edf9657720e25445a435dabc44572cf5f/include/ipmitool/ipmi.h 2020-10-21 14:04:11.675128602 -0700 |
276 |
+@@ -281,6 +281,7 @@ |
277 |
+ /* 4769 for [IBM Corporation] */ |
278 |
+ IPMI_OEM_IBM_4769 = 4769, |
279 |
+ IPMI_OEM_MAGNUM = 5593, |
280 |
++ IPMI_OEM_NVIDIA = 5703, |
281 |
+ IPMI_OEM_TYAN = 6653, |
282 |
+ IPMI_OEM_QUANTA = 7244, |
283 |
+ IPMI_OEM_VIKING = 9237, |
284 |
|
285 |
diff --git a/sys-apps/ipmitool/files/log_bmc.initd b/sys-apps/ipmitool/files/log_bmc.initd |
286 |
new file mode 100644 |
287 |
index 000000000000..4064edf3b84d |
288 |
--- /dev/null |
289 |
+++ b/sys-apps/ipmitool/files/log_bmc.initd |
290 |
@@ -0,0 +1,25 @@ |
291 |
+#!/sbin/openrc-run |
292 |
+# Copyright 2020 Gentoo Authors |
293 |
+# Distributed under the terms of the GNU General Public License v2 |
294 |
+ |
295 |
+name="log_bmc" |
296 |
+description="Add SEL entries to indicate OS Boot status" |
297 |
+command=/usr/libexec/log_bmc.sh |
298 |
+command_args="" |
299 |
+: "${DEVICENUM:=0}" # which BMC |
300 |
+required_files=/dev/ipmi${DEVICENUM} |
301 |
+ |
302 |
+depend() { |
303 |
+ use modules |
304 |
+ after ipmievd # to capture our own log event |
305 |
+ keyword -docker -lxc -prefix -systemd-nspawn |
306 |
+} |
307 |
+ |
308 |
+start() { |
309 |
+ # TODO: should this keep start so it only fires once per boot? |
310 |
+ "${command}" os_boot |
311 |
+} |
312 |
+ |
313 |
+stop() { |
314 |
+ "${command}" os_shutdown |
315 |
+} |
316 |
|
317 |
diff --git a/sys-apps/ipmitool/ipmitool-1.8.19.ebuild b/sys-apps/ipmitool/ipmitool-1.8.19.ebuild |
318 |
new file mode 100644 |
319 |
index 000000000000..fabe705490a8 |
320 |
--- /dev/null |
321 |
+++ b/sys-apps/ipmitool/ipmitool-1.8.19.ebuild |
322 |
@@ -0,0 +1,146 @@ |
323 |
+# Copyright 1999-2022 Gentoo Authors |
324 |
+# Distributed under the terms of the GNU General Public License v2 |
325 |
+ |
326 |
+EAPI=8 |
327 |
+ |
328 |
+inherit autotools systemd |
329 |
+ |
330 |
+DESCRIPTION="Utility for controlling IPMI enabled devices" |
331 |
+HOMEPAGE="https://github.com/ipmitool/ipmitool" |
332 |
+ |
333 |
+COMMIT_ID= |
334 |
+if [[ -n "${COMMIT_ID}" ]]; then |
335 |
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz" |
336 |
+ S="${WORKDIR}/${PN}-${COMMIT_ID}" |
337 |
+else |
338 |
+ MY_P="${PN^^}_${PV//./_}" |
339 |
+ SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/${MY_P}.tar.gz -> ${P}.tar.gz" |
340 |
+ S="${WORKDIR}/${PN}-${MY_P}" |
341 |
+fi |
342 |
+ |
343 |
+# to generate: `make enterprise-numbers` from git checkout of release tag |
344 |
+SRC_URI+=" |
345 |
+ https://dev.gentoo.org/~ajak/distfiles/${CATEGORY}/${PN}/enterprise-numbers-${PV}.xz" |
346 |
+ |
347 |
+LICENSE="BSD" |
348 |
+SLOT="0" |
349 |
+KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86" |
350 |
+IUSE="openbmc openipmi static" |
351 |
+ |
352 |
+RDEPEND="dev-libs/openssl:0= |
353 |
+ sys-libs/readline:0= |
354 |
+ openbmc? ( sys-apps/systemd:0= )" |
355 |
+DEPEND="${RDEPEND} |
356 |
+ >=sys-devel/autoconf-2.69-r5 |
357 |
+ virtual/os-headers |
358 |
+ openipmi? ( sys-libs/openipmi )" |
359 |
+ #freeipmi? ( sys-libs/freeipmi ) |
360 |
+# ipmitool CAN build against || ( sys-libs/openipmi sys-libs/freeipmi ) |
361 |
+# but it doesn't actually need either. |
362 |
+ |
363 |
+PATCHES=( |
364 |
+ # yoinked out of debian's patchset, previously carried in a SRC_URI |
365 |
+ # tarball |
366 |
+ "${FILESDIR}/${P}-fix-buffer-overflow.patch" |
367 |
+ "${FILESDIR}/${P}-CVE-2011-4339.patch" |
368 |
+ "${FILESDIR}/${P}-manpage-longlines.patch" |
369 |
+ "${FILESDIR}/${P}-nvidia-iana.patch" |
370 |
+) |
371 |
+ |
372 |
+src_prepare() { |
373 |
+ default |
374 |
+ |
375 |
+ # Gentoo chooses to install ipmitool in /usr/sbin |
376 |
+ # Where RedHat chooses /usr/bin |
377 |
+ sed -i -e \ |
378 |
+ 's,/usr/bin/ipmitool,/usr/sbin/ipmitool,g' \ |
379 |
+ "${S}"/contrib/* \ |
380 |
+ || die "sed bindir failed" |
381 |
+ |
382 |
+ eautoreconf |
383 |
+ |
384 |
+ # If this file is not present, then ipmitool will try to download it during make install! |
385 |
+ cp -al "${WORKDIR}/enterprise-numbers-${PV}" "${S}/enterprise-numbers" \ |
386 |
+ || die "Could not place IANA enterprise-numbers" |
387 |
+} |
388 |
+ |
389 |
+src_configure() { |
390 |
+ # - LIPMI and BMC are the Solaris libs |
391 |
+ # - OpenIPMI is unconditionally enabled in the configure as there is compat |
392 |
+ # code that is used if the library itself is not available |
393 |
+ # FreeIPMI does build now, but is disabled until the other arches keyword it |
394 |
+ # `use_enable freeipmi intf-free` \ |
395 |
+ # --enable-ipmievd is now unconditional |
396 |
+ |
397 |
+ local econfargs=( |
398 |
+ $(use_enable static) \ |
399 |
+ --enable-ipmishell \ |
400 |
+ --enable-intf-lan \ |
401 |
+ --enable-intf-usb \ |
402 |
+ $(use_enable openbmc intf-dbus) \ |
403 |
+ --enable-intf-lanplus \ |
404 |
+ --enable-intf-open \ |
405 |
+ --enable-intf-serial \ |
406 |
+ --disable-intf-bmc \ |
407 |
+ --disable-intf-dummy \ |
408 |
+ --disable-intf-free \ |
409 |
+ --disable-intf-imb \ |
410 |
+ --disable-intf-lipmi \ |
411 |
+ --disable-internal-md5 \ |
412 |
+ --with-kerneldir=/usr \ |
413 |
+ --bindir=/usr/sbin \ |
414 |
+ --runstatedir=/run \ |
415 |
+ CFLAGS="${CFLAGS}" |
416 |
+ ) |
417 |
+ |
418 |
+ econf "${econfargs[@]}" |
419 |
+} |
420 |
+ |
421 |
+src_install() { |
422 |
+ emake DESTDIR="${D}" PACKAGE="${PF}" install |
423 |
+ into /usr |
424 |
+ |
425 |
+ newinitd "${FILESDIR}/ipmievd.initd" ipmievd |
426 |
+ newconfd "${FILESDIR}/ipmievd.confd" ipmievd |
427 |
+ |
428 |
+ # From debian, less configurable than OpenRC |
429 |
+ systemd_dounit "${FILESDIR}/ipmievd.service" |
430 |
+ |
431 |
+ dosbin contrib/bmclanconf |
432 |
+ |
433 |
+ exeinto /usr/libexec |
434 |
+ doexe contrib/log_bmc.sh |
435 |
+ newinitd "${FILESDIR}/log_bmc.initd" log_bmc |
436 |
+ |
437 |
+ # contrib/exchange-bmc-os-info.init.redhat |
438 |
+ # contrib/exchange-bmc-os-info.service.redhat |
439 |
+ # contrib/exchange-bmc-os-info.sysconf |
440 |
+ exeinto /usr/libexec |
441 |
+ newexe contrib/exchange-bmc-os-info.init.redhat exchange-bmc-os-info |
442 |
+ |
443 |
+ insinto /etc/sysconfig |
444 |
+ newins contrib/exchange-bmc-os-info.sysconf exchange-bmc-os-info |
445 |
+ |
446 |
+ systemd_newunit contrib/exchange-bmc-os-info.service.redhat exchange-bmc-os-info.service |
447 |
+ newinitd "${FILESDIR}/exchange-bmc-os-info.initd" exchange-bmc-os-info |
448 |
+ |
449 |
+ # contrib/bmc-snmp-proxy |
450 |
+ # contrib/bmc-snmp-proxy.service |
451 |
+ # contrib/bmc-snmp-proxy.sysconf |
452 |
+ exeinto /usr/libexec |
453 |
+ doexe contrib/bmc-snmp-proxy |
454 |
+ |
455 |
+ insinto /etc/sysconfig |
456 |
+ newins contrib/bmc-snmp-proxy.sysconf bmc-snmp-proxy |
457 |
+ |
458 |
+ systemd_dounit contrib/bmc-snmp-proxy.service |
459 |
+ # TODO: initd for bmc-snmp-proxy |
460 |
+ |
461 |
+ insinto "/usr/share/${PN}" |
462 |
+ doins contrib/oem_ibm_sel_map |
463 |
+ |
464 |
+ cd "${S}/contrib" |
465 |
+ |
466 |
+ docinto contrib |
467 |
+ dodoc collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh README |
468 |
+} |